Comparing version 1.0.5 to 1.0.6
74
index.js
@@ -12,2 +12,4 @@ var __create = Object.create, __defProp = Object.defineProperty, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __getOwnPropNames = Object.getOwnPropertyNames, __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
}, __toModule = (module2) => module2 && module2.__esModule ? module2 : __exportStar(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", {value: module2, enumerable: !0})), module2); | ||
// index.ts | ||
__markAsModule(exports); | ||
@@ -24,7 +26,28 @@ __export(exports, { | ||
}); | ||
var fs = __toModule(require("fs")), import_decorators = __toModule(require("./decorators")), path = __toModule(require("path")); | ||
function trim(input) { | ||
return input.trim(); | ||
var fs = __toModule(require("fs")); | ||
// decorators.ts | ||
var esbuild = __toModule(require("esbuild")), import_fast_glob = __toModule(require("fast-glob")), DecoratorType; | ||
(function(DecoratorType2) { | ||
DecoratorType2[DecoratorType2.property = 0] = "property", DecoratorType2[DecoratorType2.klass = 1] = "klass"; | ||
})(DecoratorType || (DecoratorType = {})); | ||
async function decorators(decoratorGlob = "./**/*.{decorator.ts,dec.ts,decorators.ts,decky.ts}", additionalConfig = {}) { | ||
let entryPoints = additionalConfig?.entryPoints?.length ? additionalConfig.entryPoints : await import_fast_glob.default(decoratorGlob); | ||
return await esbuild.build({ | ||
minify: !1, | ||
minifySyntax: !0, | ||
format: "cjs", | ||
sourcemap: "both", | ||
outdir: ".", | ||
outbase: ".", | ||
...additionalConfig, | ||
platform: "node", | ||
entryPoints, | ||
bundle: !1 | ||
}), entryPoints; | ||
} | ||
class ProcessorError extends Error { | ||
// index.ts | ||
var path = __toModule(require("path")); | ||
var ProcessorError = class extends Error { | ||
constructor(message, file, lineNumber, lineText, column) { | ||
@@ -42,9 +65,9 @@ super(message); | ||
} | ||
} | ||
}; | ||
function buildDecoratorProcessor(decoratorsModuleMap) { | ||
const fileMapping = {}, allPrefixes = new Set(); | ||
let fileMapping = {}, allPrefixes = new Set(); | ||
for (let moduleName in decoratorsModuleMap) { | ||
const decorators = decoratorsModuleMap[moduleName], decoratorKeys = Object.keys(decorators).sort().reverse(), decoratorPrefixes = decoratorKeys.map((a) => a.toString()), decoratorFunctions = new Array(decoratorKeys.length), flattenedFuncs = decoratorKeys.map((a) => decorators[a].callback); | ||
let decorators2 = decoratorsModuleMap[moduleName], decoratorKeys = Object.keys(decorators2).sort().reverse(), decoratorPrefixes = decoratorKeys.map((a) => a.toString()), decoratorFunctions = new Array(decoratorKeys.length), flattenedFuncs = decoratorKeys.map((a) => decorators2[a].callback); | ||
for (let i = 0; i < decoratorKeys.length; i++) { | ||
const key = decoratorKeys[i], prefix = decoratorPrefixes[i], length = key.length, decoratorFunc = flattenedFuncs[i], processDecorator = async (prefixStart, result) => { | ||
let key = decoratorKeys[i], prefix = decoratorPrefixes[i], length = key.length, decoratorFunc = flattenedFuncs[i], processDecorator = async (prefixStart, result) => { | ||
let code = result.code, prefixEnd = prefixStart + length, argStart = prefixEnd, lineEnd = code.indexOf(` | ||
@@ -84,3 +107,3 @@ `, prefixStart), argEnd = -1, argList; | ||
semicolonIndex > -1 && (typeName = typeName.substring(0, semicolonIndex)), result.code = code; | ||
const newCode = await decoratorFunc({ | ||
let newCode = await decoratorFunc({ | ||
key: key2, | ||
@@ -103,3 +126,3 @@ type: typeName, | ||
} | ||
const modulesToCheck = Object.keys(fileMapping); | ||
let modulesToCheck = Object.keys(fileMapping); | ||
return { | ||
@@ -110,4 +133,3 @@ process: async (code, filePath) => { | ||
continue; | ||
const {decoratorFunctions, decoratorPrefixes} = fileMapping[decoratorModuleName]; | ||
let startIndex = -1, symbolI = code.lastIndexOf("@") - 1, _prefixI = -1; | ||
let {decoratorFunctions, decoratorPrefixes} = fileMapping[decoratorModuleName], startIndex = -1, symbolI = code.lastIndexOf("@") - 1, _prefixI = -1; | ||
if (symbolI < -1) | ||
@@ -172,3 +194,3 @@ return {contents: code, note: null}; | ||
} | ||
const staticDecoratorCode = [property, klass].map((stub) => `/* @__PURE__ */ | ||
var staticDecoratorCode = [property, klass].map((stub) => `/* @__PURE__ */ | ||
export function ${stub}(...args){return args;} | ||
@@ -183,4 +205,4 @@ `).join(` | ||
} | ||
function plugin(decorators) { | ||
const {prefixes, process: process2} = buildDecoratorProcessor(decorators); | ||
function plugin(decorators2) { | ||
let {prefixes, process: process2} = buildDecoratorProcessor(decorators2); | ||
function isPotentialMatch(content) { | ||
@@ -193,3 +215,3 @@ for (let prefix of prefixes) | ||
function onLoadDecoratorStub(args) { | ||
const stub = require(args.path).decorators; | ||
let stub = require(args.path).decorators; | ||
return { | ||
@@ -210,3 +232,3 @@ contents: Object.keys(stub).map((stub2) => `/* @__PURE__ */ | ||
}; | ||
const {note, contents: _contents} = await process2(contents, args.path) ?? {}; | ||
let {note, contents: _contents} = await process2(contents, args.path) ?? {}; | ||
return { | ||
@@ -219,3 +241,3 @@ contents: _contents, | ||
async function onLoadTS(args) { | ||
const contents = await fs.promises.readFile(args.path, "utf8"); | ||
let contents = await fs.promises.readFile(args.path, "utf8"); | ||
if (!isPotentialMatch(contents)) | ||
@@ -226,3 +248,3 @@ return { | ||
}; | ||
const {note, contents: _contents} = await process2(contents, args.path) ?? {}; | ||
let {note, contents: _contents} = await process2(contents, args.path) ?? {}; | ||
return { | ||
@@ -236,4 +258,4 @@ contents: _contents, | ||
name: "design-time-decorators", | ||
setup(build) { | ||
build.onResolve({filter: /\.(decorator|dec)\.(ts)$/}, onResolveDecorator), build.onResolve({filter: /\.(decorator|dec)\.(tsx)$/}, onResolveDecorator), build.onResolve({filter: /^decky$/}, onResolveStaticDecorators), build.onLoad({filter: /^decky$/, namespace: "decky"}, onLoadStaticDecorators), build.onLoad({filter: /\.(decorator|dec)\.(ts)$/, namespace: "decorator-stub"}, onLoadDecoratorStub), build.onLoad({filter: /\.(decorator|dec)\.(tsx)$/, namespace: "decorator-stub"}, onLoadDecoratorStub), build.onLoad({filter: /\.(ts)$/}, onLoadTS), build.onLoad({filter: /\.(tsx)$/}, onLoadTSX); | ||
setup(build2) { | ||
build2.onResolve({filter: /\.(decorator|dec)\.(ts)$/}, onResolveDecorator), build2.onResolve({filter: /\.(decorator|dec)\.(tsx)$/}, onResolveDecorator), build2.onResolve({filter: /^decky$/}, onResolveStaticDecorators), build2.onLoad({filter: /^decky$/, namespace: "decky"}, onLoadStaticDecorators), build2.onLoad({filter: /\.(decorator|dec)\.(ts)$/, namespace: "decorator-stub"}, onLoadDecoratorStub), build2.onLoad({filter: /\.(decorator|dec)\.(tsx)$/, namespace: "decorator-stub"}, onLoadDecoratorStub), build2.onLoad({filter: /\.(ts)$/}, onLoadTS), build2.onLoad({filter: /\.(tsx)$/}, onLoadTSX); | ||
} | ||
@@ -245,3 +267,3 @@ }; | ||
callback, | ||
type: import_decorators.DecoratorType.property | ||
type: DecoratorType.property | ||
}; | ||
@@ -252,3 +274,3 @@ } | ||
callback, | ||
type: import_decorators.DecoratorType.property | ||
type: DecoratorType.property | ||
}; | ||
@@ -259,7 +281,7 @@ } | ||
callback, | ||
type: import_decorators.DecoratorType.klass | ||
type: DecoratorType.klass | ||
}; | ||
} | ||
async function load(decoratorsGlob, additionalConfig) { | ||
const {decorators} = require("./decorators"), entryPoints = await decorators(decoratorsGlob, additionalConfig), files = {}; | ||
let entryPoints = await decorators(decoratorsGlob, additionalConfig), files = {}; | ||
for (let file of entryPoints) | ||
@@ -271,2 +293,2 @@ Object.assign(files, { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiaW5kZXgudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCB7IEJ1aWxkT3B0aW9ucywgT25Mb2FkUmVzdWx0LCBQYXJ0aWFsTm90ZSB9IGZyb20gXCJlc2J1aWxkXCI7XG5pbXBvcnQgKiBhcyBmcyBmcm9tIFwiZnNcIjtcbmltcG9ydCB7IERlY29yYXRvclR5cGUgfSBmcm9tIFwiL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RlY29yYXRvckZ1bmM6XG4gICAgICAgIHwgRGVzaWduVGltZUNsYXNzRnVuY3Rpb248YW55PlxuICAgICAgICB8IERlc2lnblRpbWVQcm9wZXJ0eURlY29yYXRvckZ1bmN0aW9uPGFueT4gPSBmbGF0dGVuZWRGdW5jc1tpXTtcblxuICAgICAgY29uc3QgcHJvY2Vzc0RlY29yYXRvcjogRGVjb3JhdG9yUHJvY2Vzc29yID0gYXN5bmMgKFxuICAgICAgICBwcmVmaXhTdGFydCxcbiAgICAgICAgcmVzdWx0XG4gICAgICApID0+IHtcbiAgICAgICAgbGV0IGNvZGUgPSByZXN1bHQuY29kZTtcbiAgICAgICAgbGV0IHByZWZpeEVuZCA9IHByZWZpeFN0YXJ0ICsgbGVuZ3RoO1xuICAgICAgICBsZXQgYXJnU3RhcnQgPSBwcmVmaXhFbmQ7XG4gICAgICAgIGxldCBsaW5lRW5kID0gY29kZS5pbmRleE9mKFwiXFxuXCIsIHByZWZpeFN0YXJ0KTtcbiAgICAgICAgbGV0IGFyZ0VuZCA9IC0xO1xuICAgICAgICBsZXQgYXJnTGlzdDtcbiAgICAgICAgaWYgKGNvZGVbYXJnU3RhcnQrK10gPT09IFwiKFwiKSB7XG4gICAgICAgICAgYXJnRW5kID0gY29kZS5pbmRleE9mKFwiKVwiLCBhcmdTdGFydCk7XG4gICAgICAgICAgaWYgKGFyZ0VuZCAtIDEgPiBhcmdTdGFydCkge1xuICAgICAgICAgICAgaWYgKGFyZ0VuZCA8IDApXG4gICAgICAgICAgICAgIHRocm93IG5ldyBQcm9jZXNzb3JFcnJvcihcbiAgICAgICAgICAgICAgICBgTWlzc2luZyApIGZvciAke3ByZWZpeH1gLFxuICAgICAgICAgICAgICAgIHJlc3VsdC5maWxlUGF0aCxcbiAgICAgICAgICAgICAgICByZXN1bHQuY29kZS5zdWJzdHJpbmcoMCwgcHJlZml4U3RhcnQpLnNwbGl0KFwiXFxuXCIpLmxlbmd0aCxcbiAgICAgICAgICAgICAgICByZXN1bHQuY29kZS5zcGxpdChcIlxcblwiKVtcbiAgICAgICAgICAgICAgICAgIHJlc3VsdC5jb2RlLnN1YnN0cmluZygwLCBwcmVmaXhTdGFydCkuc3BsaXQoXCJcXG5cIikubGVuZ3RoXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICBwcmVmaXhFbmRcbiAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgYXJnTGlzdCA9IEpTT04ucGFyc2UoXG4gICAgICAgICAgICAgICAgXCJbXCIgKyBjb2RlLnN1YnN0cmluZyhhcmdTdGFydCwgYXJnRW5kKSArIFwiXVwiXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9IGNhdGNoIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IFByb2Nlc3NvckVycm9yKFxuICAgICAgICAgICAgICAgIGBBcmd1bWVudHMgdG8gJHtwcmVmaXh9IG11c3QgYmUgSlNPTi4gUmVjZWl2ZWQ6IFske2NvZGUuc3Vic3RyaW5nKFxuICAgICAgICAgICAgICAgICAgYXJnU3RhcnQsXG4gICAgICAgICAgICAgICAgICBhcmdFbmRcbiAgICAgICAgICAgICAgICApfV1gLFxuICAgICAgICAgICAgICAgIHJlc3VsdC5maWxlUGF0aCxcbiAgICAgICAgICAgICAgICByZXN1bHQuY29kZS5zdWJzdHJpbmcoMCwgcHJlZml4U3RhcnQpLnNwbGl0KFwiXFxuXCIpLmxlbmd0aCAtIDEsXG4gICAgICAgICAgICAgICAgcmVzdWx0LmNvZGUuc3BsaXQoXCJcXG5cIilbXG4gICAgICAgICAgICAgICAgICByZXN1bHQuY29kZS5zdWJzdHJpbmcoMCwgcHJlZml4U3RhcnQpLnNwbGl0KFwiXFxuXCIpLmxlbmd0aCAtIDFcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIGFyZ1N0YXJ0XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGFyZ1N0YXJ0ID0gLTE7XG4gICAgICAgICAgICBhcmdMaXN0ID0gW107XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGFyZ1N0YXJ0ID0gLTE7XG4gICAgICAgICAgYXJnTGlzdCA9IFtdO1xuICAgICAgICB9XG4gICAgICAgIGxldCBuZXh0TGluZVN0YXJ0ID0gbGluZUVuZCArIDE7XG4gICAgICAgIGxldCBuZXh0TGluZUVuZCA9IGNvZGUuaW5kZXhPZihcIlxcblwiLCBuZXh0TGluZVN0YXJ0KTtcbiAgICAgICAgY29uc3Qgb3JpZ2luYWxMaW5lID0gY29kZS5zdWJzdHJpbmcobmV4dExpbmVTdGFydCwgbmV4dExpbmVFbmQpLnRyaW0oKTtcbiAgICAgICAgbGV0IG5leHRMaW5lID0gb3JpZ2luYWxMaW5lO1xuICAgICAgICBsZXQgaXNTdGF0aWMgPSBmYWxzZTtcbiAgICAgICAgbGV0IHF1YWxpZmllcjogUXVhbGlmaWVyID0gbnVsbDtcblxuICAgICAgICBpZiAobmV4dExpbmUuc3RhcnRzV2l0aChcImV4cG9ydCBcIikpIHtcbiAgICAgICAgICBuZXh0TGluZSA9IG5leHRMaW5lLnN1YnN0cmluZyhcImV4cG9ydCBcIi5sZW5ndGgpLnRyaW0oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChuZXh0TGluZS5zdGFydHNXaXRoKFwicHVibGljIFwiKSkge1xuICAgICAgICAgIHF1YWxpZmllciA9IFwicHVibGljXCI7XG4gICAgICAgICAgbmV4dExpbmUgPSBuZXh0TGluZS5zdWJzdHJpbmcoXCJwdWJsaWNcIi5sZW5ndGgpO1xuICAgICAgICB9IGVsc2UgaWYgKG5leHRMaW5lLnN0YXJ0c1dpdGgoXCJwcml2YXRlIFwiKSkge1xuICAgICAgICAgIHF1YWxpZmllciA9IFwicHJpdmF0ZVwiO1xuICAgICAgICAgIG5leHRMaW5lID0gbmV4dExpbmUuc3Vic3RyaW5nKFwicHJpdmF0ZVwiLmxlbmd0aCk7XG4gICAgICAgIH0gZWxzZSBpZiAobmV4dExpbmUuc3RhcnRzV2l0aChcInByb3RlY3RlZCBcIikpIHtcbiAgICAgICAgICBxdWFsaWZpZXIgPSBcInByb3RlY3RlZFwiO1xuICAgICAgICAgIG5leHRMaW5lID0gbmV4dExpbmUuc3Vic3RyaW5nKFwicHJvdGVjdGVkXCIubGVuZ3RoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIG5leHRMaW5lID0gbmV4dExpbmUudHJpbSgpO1xuICAgICAgICBsZXQgaXNDbGFzcyA9IG5leHRMaW5lLnN0YXJ0c1dpdGgoXCJjbGFzcyBcIik7XG5cbiAgICAgICAgaWYgKCFpc0NsYXNzKSB7XG4gICAgICAgICAgaXNTdGF0aWMgPSBuZXh0TGluZS5zdGFydHNXaXRoKFwic3RhdGljIFwiKTtcbiAgICAgICAgICBpZiAoaXNTdGF0aWMpIHtcbiAgICAgICAgICAgIG5leHRMaW5lLnN1YnN0cmluZyhcInN0YXRpYyBcIi5sZW5ndGgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpc0NsYXNzKSB7XG4gICAgICAgICAgbmV4dExpbmUgPSBuZXh0TGluZS5zdWJzdHJpbmcoXCJjbGFzcyBcIi5sZW5ndGgpO1xuICAgICAgICAgIC8vIFRPRE86IG9iamVjdCBwb29saW5nXG4gICAgICAgICAgYXdhaXQgKGRlY29yYXRvckZ1bmMgYXMgRGVzaWduVGltZUNsYXNzRnVuY3Rpb248YW55Pikoe1xuICAgICAgICAgICAgY2xhc3NOYW1lOiBuZXh0TGluZS5zdWJzdHJpbmcoMCwgbmV4dExpbmUuaW5kZXhPZihcIiBcIikpLFxuICAgICAgICAgICAgYXJnczogYXJnTGlzdCxcbiAgICAgICAgICAgIG1ldGFkYXRhOiByZXN1bHQsXG4gICAgICAgICAgfSBhcyBEZXNpZ25UaW1lQ2xhc3MpO1xuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAvLyBsZXQgY29sb25cbiAgICAgICAgICBsZXQgdHlwZVNlcGFyYXRvckluZGV4ID0gbmV4dExpbmUuaW5kZXhPZihcIjpcIik7XG4gICAgICAgICAgbGV0IGtleSA9IG5leHRMaW5lLnN1YnN0cmluZygwLCB0eXBlU2VwYXJhdG9ySW5kZXgpLnRyaW0oKTtcbiAgICAgICAgICBsZXQgdHlwZU5hbWUgPSBuZXh0TGluZS5zdWJzdHJpbmcodHlwZVNlcGFyYXRvckluZGV4ICsgMSkudHJpbSgpO1xuXG4gICAgICAgICAgbGV0IHNlbWljb2xvbkluZGV4ID0gdHlwZU5hbWUuaW5kZXhPZihcIjtcIik7XG4gICAgICAgICAgaWYgKHNlbWljb2xvbkluZGV4ID4gLTEpIHtcbiAgICAgICAgICAgIHR5cGVOYW1lID0gdHlwZU5hbWUuc3Vic3RyaW5nKDAsIHNlbWljb2xvbkluZGV4KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAocmVzdWx0LmNvZGUgYXMgYW55KSA9IGNvZGU7XG4gICAgICAgICAgLy8gVE9ETzogb2JqZWN0IHBvb2xpbmdcbiAgICAgICAgICBjb25zdCBuZXdDb2RlID0gYXdhaXQgKGRlY29yYXRvckZ1bmMgYXMgRGVzaWduVGltZVByb3BlcnR5RGVjb3JhdG9yRnVuY3Rpb248YW55PikoXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgdHlwZTogdHlwZU5hbWUsXG4gICAgICAgICAgICAgIGFyZ3M6IGFyZ0xpc3QsXG4gICAgICAgICAgICAgIGlzU3RhdGljLFxuICAgICAgICAgICAgICBxdWFsaWZpZXIsXG4gICAgICAgICAgICAgIG1ldGFkYXRhOiByZXN1bHQsXG4gICAgICAgICAgICB9XG4gICAgICAgICAgKTtcbiAgICAgIC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mVzdWx0LnN0YXJ0SW5kZXggPSBjb2RlLmluZGV4T2YoXG4gICAgICAgICAgICBkZWNvcmF0b3JQcmVmaXhlc1tfcHJlZml4SV0sXG4gICAgICAgICAgICBzeW1ib2xJXG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAocmVzdWx0LnN0YXJ0SW5kZXggPiAtMSkge1xuICAgICAgICAgICAgcHJlZml4SSA9IF9wcmVmaXhJO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgbGV0IHByZWZpeCA9IFwiXCI7XG5cbiAgICAgICAgd2hpbGUgKHByZWZpeEkgPiAtMSkge1xuICAgICAgICAgIHByZWZpeCA9IGRlY29yYXRvclByZWZpeGVzW3ByZWZpeEldO1xuICAgICAgICAgIGlmIChyZXN1bHQuc3RhcnRJbmRleCA+IC0xKSB7XG4gICAgICAgICAgICBsZXQgX2NvZGUgPSByZXN1bHQuY29kZTtcbiAgICAgICAgICAgIGxldCBkaWRDaGFuZ2UgPSBmYWxzZTtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGRpZENoYW5nZSA9IGF3YWl0IGRlY29yYXRvckZ1bmN0aW9uc1twcmVmaXhJXShcbiAgICAgICAgICAgICAgICByZXN1bHQuc3RhcnRJbmRleCxcbiAgICAgICAgICAgICAgICByZXN1bHRcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGV4Y2VwdGlvbikge1xuICAgICAgICAgICAgICBpZiAoZXhjZXB0aW9uIGluc3RhbmNlb2YgUHJvY2Vzc29yRXJyb3IpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgY29udGVudHM6IFwiXCIsXG4gICAgICAgICAgICAgICAgICBub3RlOiBleGNlcHRpb24ubm90ZSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRocm93IGV4Y2VwdGlvbjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZGlkQ2hhbmdlKSB7XG4gICAgICAgICAgICAgIGlmIChyZXN1bHQuc3RhcnRJbmRleCA+IC0xICYmIHJlc3VsdC5zdG9wSW5kZXggPiAtMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5jb2RlID1cbiAgICAgICAgICAgICAgICAgIF9jb2RlLnN1YnN0cmluZygwLCByZXN1bHQuc3RhcnRJbmRleCkgK1xuICAgICAgICAgICAgICAgICAgcmVzdWx0LmNvZGUgK1xuICAgICAgICAgICAgICAgICAgX2NvZGUuc3Vic3RyaW5nKHJlc3VsdC5zdG9wSW5kZXgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHQuY29kZSA9XG4gICAgICAgICAgICAgICAgX2NvZGUuc3Vic3RyaW5nKDAsIHJlc3VsdC5zdGFydEluZGV4IC0gMSkgK1xuICAgICAgICAgICAgICAgIF9jb2RlLnN1YnN0cmluZyhfY29kZS5pbmRleE9mKFwiXFxuXCIsIHJlc3VsdC5zdGFydEluZGV4KSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJlc3VsdC5zdGFydEluZGV4ID0gcmVzdWx0LnN0b3BJbmRleCA9IC0xO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHByZWZpeEkgPSAtMTtcbiAgICAgICAgICBmb3IgKF9wcmVmaXhJID0gMDsgX3ByZWZpeEkgPCBkZWNvcmF0b3JQcmVmaXhlcy5sZW5ndGg7IF9wcmVmaXhJKyspIHtcbiAgICAgICAgICAgIHN5bWJvbEkgPSByZXN1bHQuY29kZS5sYXN0SW5kZXhPZihcIkBcIik7XG4gICAgICAgICAgICBpZiAoc3ltYm9sSSA9PT0gLTEpIGJyZWFrO1xuXG4gICAgICAgICAgICByZXN1bHQuc3RhcnRJbmRleCA9IHJl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KGNvZGVbYXJnU3RhcnQrK10gPT09IFwiKFwiKSB7XG4gICAgICAgICAgYXJnRW5kID0gY29kZS5pbmRleE9mKFwiKVwiLCBhcmdTdGFydCk7XG4gICAgICAgICAgaWYgKGFyZ0VuZCAtIDEgPiBhcmdTdGFydCkge1xuICAgICAgICAgICAgaWYgKGFyZ0VuZCA8IDApXG4gICAgICAgICAgICAgIHRocm93IG5ldyBQcm9jZXNzb3JFcnJvcihcbiAgICAgICAgICAgICAgICBgTWlzc2luZyApIGZvciAke3ByZWZpeH1gLFxuICAgICAgICAgICAgICAgIHJlc3VsdC5maWxlUGF0aCxcbiAgICAgICAgICAgICAgICByZXN1bHQuY29kZS5zdWJzdHJpbmcoMCwgcHJlZml4U3RhcnQpLnNwbGl0KFwiXFxuXCIpLmxlbmd0aCxcbiAgICAgICAgICAgICAgICByZXN1bHQuY29kZS5zcGxpdChcIlxcblwiKVtcbiAgICAgICAgICAgICAgICAgIHJlc3VsdC5jb2RlLnN1YnN0cmluZygwLCBwcmVmaXhTdGFydCkuc3BsaXQoXCJcXG5cIikubGVuZ3RoXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICBwcmVmaXhFbmRcbiAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgYXJnTGlzdCA9IEpTT04ucGFyc2UoXG4gICAgICAgICAgICAgICAgXCJbXCIgKyBjb2RlLnN1YnN0cmluZyhhcmdTdGFydCwgYXJnRW5kKSArIFwiXVwiXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9IGNhdGNoIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IFByb2Nlc3NvckVycm9yKFxuICAgICAgICAgICAgICAgIGBBcmd1bWVudHMgdG8gJHtwcmVmaXh9IG11c3QgYmUgSlNPTi4gUmVjZWl2ZWQ6IFske2NvZGUuc3Vic3RyaW5nKFxuICAgICAgICAgICAgICAgICAgYXJnU3RhcnQsXG4gICAgICAgICAgICAgICAgICBhcmdFbmRcbiAgICAgICAgICAgICAgICApfV1gLFxuICAgICAgICAgICAgICAgIHJlc3VsdC5maWxlUGF0aCxcbiAgICAgICAgICAgICAgICByZXN1bHQuY29kZS5zdWJzdHJpbmcoMCwgcHJlZml4U3RhcnQpLnNwbGl0KFwiXFxuXCIpLmxlbmd0aCAtIDEsXG4gICAgICAgICAgICAgICAgcmVzdWx0LmNvZGUuc3BsaXQoXCJcXG5cIilbXG4gICAgICAgICAgICAgICAgICByZXN1bHQuY29kZS5zdWJzdHJpbmcoMCwgcHJlZml4U3RhcnQpLnNwbGl0KFwiXFxuXCIpLmxlbmd0aCAtIDFcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIGFyZ1N0YXJ0XG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGFyZ1N0YXJ0ID0gLTE7XG4gICAgICAgICAgICBhcmdMaXN0ID0gW107XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGFyZ1N0YXJ0ID0gLTE7XG4gICAgICAgICAgYXJnTGlzdCA9IFtdO1xuICAgICAgICB9XG4gICAgICAgIGxldCBuZXh0TGluZVN0YXJ0ID0gbGluZUVuZCArIDE7XG4gICAgICAgIGxldCBuZXh0TGluZUVuZCA9IGNvZGUuaW5kZXhPZihcIlxcblwiLCBuZXh0TGluZVN0YXJ0KTtcbiAgICAgICAgY29uc3Qgb3JpZ2luYWxMaW5lID0gY29kZS5zdWJzdHJpbmcobmV4dExpbmVTdGFydCwgbmV4dExpbmVFbmQpLnRyaW0oKTtcbiAgICAgICAgbGV0IG5leHRMaW5lID0gb3JpZ2luYWxMaW5lO1xuICAgICAgICBsZXQgaXNTdGF0aWMgPSBmYWxzZTtcbiAgICAgICAgbGV0IHF1YWxpZmllcjogUXVhbGlmaWVyID0gbnVsbDtcblxuICAgICAgICB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W5ndGgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpc0NsYXNzKSB7XG4gICAgICAgICAgbmV4dExpbmUgPSBuZXh0TGluZS5zdWJzdHJpbmcoXCJjbGFzcyBcIi5sZW5ndGgpO1xuICAgICAgICAgIC8vIFRPRE86IG9iamVjdCBwb29saW5nXG4gICAgICAgICAgYXdhaXQgKGRlY29yYXRvckZ1bmMgYXMgRGVzaWduVGltZUNsYXNzRnVuY3Rpb248YW55Pikoe1xuICAgICAgICAgICAgY2xhc3NOYW1lOiBuZXh0TGluZS5zdWJzdHJpbmcoMCwgbmV4dExpbmUuaW5kZXhPZihcIiBcIikpLFxuICAgICAgICAgICAgYXJnczogYXJnTGlzdCxcbiAgICAgICAgICAgIG1ldGFkYXRhOiByZXN1bHQsXG4gICAgICAgICAgfSBhcyBEZXNpZ25UaW1lQ2xhc3MpO1xuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAvLyBsZXQgY29sb25cbiAgICAgICAgICBsZXQgdHlwZVNlcGFyYXRvckluZGV4ID0gbmV4dExpbmUuaW5kZXhPZihcIjpcIik7XG4gICAgICAgICAgbGV0IGtleSA9IG5leHRMaW5lLnN1YnN0cmluZygwLCB0eXBlU2VwYXJhdG9ySW5kZXgpLnRyaW0oKTtcbiAgICAgICAgICBsZXQgdHlwZU5hbWUgPSBuZXh0TGluZS5zdWJzdHJpbmcodHlwZVNlcGFyYXRvckluZGV4ICsgMSkudHJpbSgpO1xuXG4gICAgICAgICAgbGV0IHNlbWljb2xvbkluZGV4ID0gdHlwZU5hbWUuaW5kZXhPZihcIjtcIik7XG4gICAgICAgICAgaWYgKHNlbWljb2xvbkluZGV4ID4gLTEpIHtcbiAgICAgICAgICAgIHR5cGVOYW1lID0gdHlwZU5hbWUuc3Vic3RyaW5nKDAsIHNlbWljb2xvbkluZGV4KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAocmVzdWx0LmNvZGUgYXMgYW55KSA9IGNvZGU7XG4gICAgICAgICAgLy8gVE9ETzogb2JqZWN0IHBvb2xpbmdcbiAgICAgICAgICBjb25zdCBuZXdDb2RlID0gYXdhaXQgKGRlY29yYXRvckZ1bmMgYXMgRGVzaWduVGltZVByb3BlcnR5RGVjb3JhdG9yRnVuY3Rpb248YW55PikoXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgdHlwZTogdHlwZU5hbWUsXG4gICAgICAgICAgICAgIGFyZ3M6IGFyZ0xpc3QsXG4gICAgICAgICAgICAgIGlzU3RhdGljLFxuICAgICAgICAgICAgICBxdWFsaWZpZXIsXG4gICAgICAgICAgICAgIG1ldGFkYXRhOiByZXN1bHQsXG4gICAgICAgICAgICB9XG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAoIW5ld0NvZGUgJiYgbmV3Q29kZSAhPT0gXCJcIikge1xuICAgICAgICAgICAgKHJlc3VsdC5zdGFydEluZGV4IGFzIGFueSkgPSBwcmVmaXhTdGFydDtcbiAgICAgICAgICAgIChyZXN1bHQuc3RvcEluZGV4IGFzIGFueSkgPSBwcmVmaXhFbmQ7XG4gICAgICAgICAgICAocmVzdWx0LmNvZGUgYXMgYW55KSA9IG5ld0NvZGUgfHwgXCJcIjtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAocmVzdWx0LnN0YXJ0SW5kZXggYXMgYW55KSA9IHByZWZpeFN0YXJ0IC0gMTtcbiAgICAgICAgICAocmVzdWx0LnN0b3BJbmRleCBhcyBhbnkpID0gbmV4dExpbmVFbmQgLSAxO1xuICAgICAgICAgIChyZXN1bHQuY29kZSBhcyBhbnkpID0gbmV3Q29kZSB8fCBcIlwiO1xuICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICB9O1xuXG4gICAgICBkZWNvcmF0b3JGdW5jdGlvbnNbaV0gPS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pIHJldHVybiB7IGNvbnRlbnRzOiBjb2RlLCBub3RlOiBudWxsIH07XG4gICAgICAgIGlmIChzeW1ib2xJIDwgMCkgc3ltYm9sSSA9IDA7XG5cbiAgICAgICAgbGV0IHJlc3VsdCA9IHtcbiAgICAgICAgICBjb2RlLFxuICAgICAgICAgIG9yaWdpbmFsU291cmNlOiBjb2RlLFxuICAgICAgICAgIGZpbGVQYXRoLFxuICAgICAgICAgIHN0YXJ0SW5kZXg6IC0xLFxuICAgICAgICAgIHN0b3BJbmRleDogLTEsXG4gICAgICAgIH07XG5cbiAgICAgICAgbGV0IHByZWZpeEkgPSAtMTtcbiAgICAgICAgZm9yIChfcHJlZml4SSA9IDA7IF9wcmVmaXhJIDwgZGVjb3JhdG9yUHJlZml4ZXMubGVuZ3RoOyBfcHJlZml4SSsrKSB7XG4gICAgICAgICAgcmVzdWx0LnN0YXJ0SW5kZXggPSBjb2RlLmluZGV4T2YoXG4gICAgICAgICAgICBkZWNvcmF0b3JQcmVmaXhlc1tfcHJlZml4SV0sXG4gICAgICAgICAgICBzeW1ib2xJXG4gICAgICAgICAgKTtcbiAgICAgICAgICBpZiAocmVzdWx0LnN0YXJ0SW5kZXggPiAtMSkge1xuICAgICAgICAgICAgcHJlZml4SSA9IF9wcmVmaXhJO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgbGV0IHByZWZpeCA9IFwiXCI7XG5cbiAgICAgICAgd2hpbGUgKHByZWZpeEkgPiAtMSkge1xuICAgICAgICAgIHByZWZpeCA9IGRlY29yYXRvclByZWZpeGVzW3ByZWZpeEldO1xuICAgICAgICAgIGlmIChyZXN1bHQuc3RhcnRJbmRleCA+IC0xKSB7XG4gICAgICAgICAgICBsZXQgX2NvZGUgPSByZXN1bHQuY29kZTtcbiAgICAgICAgICAgIGxldCBkaWRDaGFuZ2UgPSBmYWxzZTtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGRpZENoYW5nZSA9IGF3YWl0IGRlY29yYXRvckZ1bmN0aW9uc1twcmVmaXhJXShcbiAgICAgICAgICAgICAgICByZXN1bHQuc3RhcnRJbmRleCxcbiAgICAgICAgICAgICAgICByZXN1bHRcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGV4Y2VwdGlvbikge1xuICAgICAgICAgICAgICBpZiAoZXhjZXB0aW9uIGluc3RhbmNlb2YgUHJvY2Vzc29yRXJyb3IpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgY29udGVudHM6IFwiXCIsXG4gICAgICAgICAgICAgICAgICBub3RlOiBleGNlcHRpb24ubm90ZSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRocm93IGV4Y2VwdGlvbjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZGlkQ2hhbmdlKSB7XG4gICAgICAgICAgICAgIGlmIChyZXN1bHQuc3RhcnRJbmRleCA+IC0xICYmIHJlc3VsdC5zdG9wSW5kZXggPiAtMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5jb2RlID1cbiAgICAgICAgICAgICAgICAgIF9jb2RlLnN1YnN0cmluZygwLCByZXN1bHQuc3RhcnRJbmRleCkgK1xuICAgICAgICAgICAgICAgICAgcmVzdWx0LmNvZGUgK1xuICAgICAgICAgICAgICAgICAgX2NvZGUuc3Vic3RyaW5nKHJlc3VsdC5zdG9wSW5kZXgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHQuY29kZSA9XG4gICAgICAgICAgICAgICAgX2NvZGUuc3Vic3RyaW5nKDAsIHJlc3VsdC5zdGFydEluZGV4IC0gMSkgK1xuICAgICAgICAgICAgICAgIF9jb2RlLnN1YnN0cmluZyhfY29kZS5pbmRleE9mKFwiXFxuXCIsIHJlc3VsdC5zdGFydEluZGV4KSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJlc3VsdC5zdGFydEluZGV4ID0gcmVzdWx0LnN0b3BJbmRleCA9IC0xO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHByZWZpeEkgPSAtMTtcbiAgICAgICAgICBmb3IgKF9wcmVmaXhJID0gMDsgX3ByZWZpeEkgPCBkZWNvcmF0b3JQcmVmaXhlcy5sZW5ndGg7IF9wcmVmaXhJKyspIHtcbiAgICAgICAgICAgIHN5bWJvbEkgPSByZXN1bHQuY29kZS5sYXN0SW5kZXhPZihcIkBcIik7XG4gICAgICAgICAgICBpZiAoc3ltYm9sSSA9PT0gLTEpIGJyZWFrO1xuXG4gICAgICAgICAgICByZXN1bHQuc3RhcnRJbmRleCA9IHJlc3VsdC5jb2RlLmluZGV4T2YoXG4gICAgICAgICAgICAgIGRlY29yYXRvclByZWZpeGVzW19wcmVmaXhJXSxcbiAgICAgICAgICAgICAgc3ltYm9sSVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXN1bHQuc3RhcnRJbmRleCA+IC0xKSB7XG4gICAgICAgICAgICAgIHByZWZpeEkgPSBfcHJlZml4STtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBjb250ZW50czogcmVzdWx0LmNvZGUsXG4gICAgICAgICAgbm90ZTogbnVsbCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9LFxuICAgIHByZWZpeGVzOiBbLi4uYWxsUHJlZml4ZXNdLFxuICB9O1xufVxuXG5mdW5jdGlvbiBvblJlc29sdmVEZWNvcmF0b3IoYXJncykge1xuICByZXR1cm4ge1xuICAgIHBhdGg6IGFyZ3MucGF0aCxcbiAgICBuYW1lc3BhY2U6IFwiZGVjb3JhdG9yLXN0d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UFhLDRCQUN2QyxPQUFNLE9BQ0osQ0FBRSxRQUFRLFdBQVcsV0FBVyxVQUNoQyx5QkFFRixPQUFNLE9BQ0osQ0FBRSxRQUFRLDRCQUE0QixXQUFXLG1CQUNqRCxzQkFFRixPQUFNLE9BQ0osQ0FBRSxRQUFRLDZCQUE2QixXQUFXLG1CQUNsRCxzQkFFRixPQUFNLE9BQU8sQ0FBRSxRQUFRLFlBQWEsV0FDcEMsT0FBTSxPQUFPLENBQUUsUUFBUSxhQUFjO0FBQUE7QUFBQTtBQUFBO0FBWXBDLGtCQUNMO0FBRUEsU0FBTztBQUFBLElBQ0w7QUFBQSxJQUNBLE1BQU0sY0FBYztBQUFBO0FBQUE7QUFJakIsc0JBQ0w7QUFFQSxTQUFPO0FBQUEsSUFDTDtBQUFBLElBQ0EsTUFBTSxjQUFjO0FBQUE7QUFBQTtBQU9qQixlQUNMO0FBRUEsU0FBbUI7QUFBQSxJQUNqQjtBQUFBLElBQ0EsTUFBTSxjQUFjO0FBQUE7QUFBQTtBQUl4QixvQkFDRSxnQkFDQTtBQUVBLE1BQU0sY0FBYyxNQUFNLFdBQVcsZ0JBQWdCLG1CQUMvQyxRQUFRO0FBQ2QsV0FBUyxRQUFRO0FBQ2YsV0FBTyxPQUFPLE9BQU87QUFBQSxPQUNsQixPQUFPLEFBQVEsQUFBUixRQUFRLEFBQUssVUFDbkIsUUFBUSxPQUNSLEFBQUssYUFBUSxPQUNiLEFBQUssY0FBUyxNQUFNLFFBQVEsT0FBTyxTQUNsQztBQUFBO0FBSVAsU0FBTyxPQUFPO0FBQUE7IiwKICAibmFtZXMiOiBbXQp9Cg== |
{ | ||
"name": "decky", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"keywords": [ | ||
@@ -16,9 +16,10 @@ "typescript", | ||
"experimental-decorators", | ||
"designDecorators", | ||
"design-time-decorators", | ||
"emitDecoratorMetadata", | ||
"types" | ||
], | ||
"types": "./types.d.ts", | ||
"description": "Use experimental decorators with zero runtime overhead.", | ||
"author": "@jarred-sumner", | ||
"module": "./index.mjs", | ||
"module": "index.mjs", | ||
"repository": "https://github.com/jarred-sumner/decky", | ||
@@ -28,5 +29,5 @@ "homepage": "https://github.com/jarred-sumner/decky", | ||
"build": "node build.js", | ||
"types": "tsc --esModuleInterop --downlevelIteration --emitDeclarationOnly --declaration index.ts decorators.ts" | ||
"types": "tsc -p ./tsconfig.build.json" | ||
}, | ||
"main": "./index.js", | ||
"main": "index.js", | ||
"files": [ | ||
@@ -33,0 +34,0 @@ "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
126998
1222
7
10