react-figma
Advanced tools
Comparing version 0.0.50 to 0.0.51
{ | ||
"name": "react-figma", | ||
"version": "0.0.50", | ||
"version": "0.0.51", | ||
"description": "Render React components to Figma", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -88,4 +88,6 @@ # React Figma | ||
const handler = uiWorker({ yoga, fetch }); | ||
onmessage = event => { | ||
uiWorker({ yoga })(event); | ||
handler(event); | ||
}; | ||
@@ -92,0 +94,0 @@ ``` |
@@ -1,4 +0,6 @@ | ||
export declare const uiWorker: ({ yoga, fetch }: { | ||
yoga: any; | ||
fetch: any; | ||
}) => (event: any) => void; | ||
interface TUIWorkerConfig { | ||
yoga?: Object; | ||
fetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>; | ||
} | ||
export declare const uiWorker: (config: TUIWorkerConfig) => (event: any) => void; | ||
export {}; |
@@ -6,4 +6,12 @@ "use strict"; | ||
var fetchWorker_1 = require("./workers/fetchWorker"); | ||
exports.uiWorker = function (_a) { | ||
var yoga = _a.yoga, fetch = _a.fetch; | ||
exports.uiWorker = function (config) { | ||
var yoga = config.yoga, fetch = config.fetch; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (typeof fetch !== 'function') { | ||
console.warn("Fetch function don't passed to uiWorker: useFetch cannot work correctly"); | ||
} | ||
if (typeof yoga !== 'object') { | ||
console.warn("Yoga don't passed to uiWorker, auto-layout cannot work correctly"); | ||
} | ||
} | ||
return function (event) { | ||
@@ -10,0 +18,0 @@ var message = event.data.pluginMessage; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
314420
4793
169
1
4