Closed DzmVasileusky closed 1 year ago
transformSync(src, options) {
var _a, _b, _c;
const isModule = typeof src !== "string";
options = options || {};
if ((_a = options === null || options === void 0 ? void 0 : options.jsc) === null || _a === void 0 ? void 0 : _a.parser) {
options.jsc.parser.syntax = (_b = options.jsc.parser.syntax) !== null && _b !== void 0 ? _b : 'ecmascript';
}
const { plugin } = options, newOptions = __rest(options, ["plugin"]);
if (bindings) {
if (plugin) {
const m = typeof src === "string" ? this.parseSync(src, (_c = options === null || options === void 0 ? void 0 : options.jsc) === null || _c === void 0 ? void 0 : _c.parser, options.filename) : src;
return this.transformSync(plugin(m), newOptions);
}
return bindings.transformSync(isModule ? JSON.stringify(src) : src, isModule, toBuffer(newOptions));
}
else if (fallbackBindings) {
if (plugin && !this.fallbackBindingsPluginWarningDisplayed) {
console.warn(`Fallback bindings does not support legacy plugins, it'll be ignored.`);
this.fallbackBindingsPluginWarningDisplayed = true;
}
return fallbackBindings.transformSync(isModule ? JSON.stringify(src) : src, options);
}
console.log('11');
throw new Error("Bindings not found");
}
this function is failing
Solved it here
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
We have a custom generator like this
generator.ts
schema.json
Calling it on MacOS is causing an error
Expected Behavior
Generator is working on MacOS
Github Repo
No response
Steps to Reproduce
npx nx g @project/plug:library fingerprinting --directory=util --type=util --verbose
Nx Report
Failure Logs
No response
Additional Information
No response