poe-code 11.0.9 → 11.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +25 -22
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-APPD5CFI.js → chunk-2M5F6OIT.js} +2 -2
- package/packages/safejs/dist/chunks/{chunk-2GHBBE5J.js → chunk-QWNCR7EZ.js} +25 -22
- package/packages/safejs/dist/chunks/chunk-QWNCR7EZ.js.map +7 -0
- package/packages/safejs/dist/cli.js +2 -2
- package/packages/safejs/dist/core.js +1 -1
- package/packages/safejs/dist/index.js +2 -2
- package/packages/safejs/dist/modules/registry.js +3 -3
- package/packages/safejs/dist/parse/parser.js +23 -19
- package/packages/safejs/dist/chunks/chunk-2GHBBE5J.js.map +0 -7
- /package/packages/safejs/dist/chunks/{chunk-APPD5CFI.js.map → chunk-2M5F6OIT.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -123520,26 +123520,31 @@ var init_parser3 = __esm({
|
|
|
123520
123520
|
`Generator shorthand methods are not supported at line ${generatorToken.start.line}, column ${generatorToken.start.column}.`
|
|
123521
123521
|
);
|
|
123522
123522
|
}
|
|
123523
|
-
if (this.currentToken().type === "identifier" && (this.currentToken().value === "get" || this.currentToken().value === "set") && this.
|
|
123523
|
+
if (this.currentToken().type === "identifier" && (this.currentToken().value === "get" || this.currentToken().value === "set") && this.isObjectMethodStart()) {
|
|
123524
123524
|
const token2 = this.currentToken();
|
|
123525
123525
|
const syntax = token2.value === "get" ? "Getter" : "Setter";
|
|
123526
123526
|
throw new Error(
|
|
123527
123527
|
`${syntax} shorthand methods are not supported at line ${token2.start.line}, column ${token2.start.column}.`
|
|
123528
123528
|
);
|
|
123529
123529
|
}
|
|
123530
|
+
const modifierToken = this.currentToken();
|
|
123531
|
+
const asyncToken = modifierToken.type === "keyword" && modifierToken.value === "async" && modifierToken.end.offset - modifierToken.start.offset === modifierToken.value.length && this.isObjectMethodStart() && !hasLineBreakBetween(modifierToken, this.peekToken(1)) ? modifierToken : void 0;
|
|
123532
|
+
if (asyncToken !== void 0) {
|
|
123533
|
+
this.index += 1;
|
|
123534
|
+
}
|
|
123530
123535
|
if (this.consumePunctuator("[") !== void 0) {
|
|
123531
123536
|
const propertyStart = this.previousToken();
|
|
123532
123537
|
const key3 = this.parseExpression();
|
|
123533
123538
|
this.expectPunctuator("]");
|
|
123534
123539
|
if (this.currentToken().type === "punctuator" && this.currentToken().value === "(") {
|
|
123535
|
-
const value2 = this.parseObjectMethod(
|
|
123540
|
+
const value2 = this.parseObjectMethod(asyncToken, propertyStart.start);
|
|
123536
123541
|
return {
|
|
123537
123542
|
type: "Property",
|
|
123538
123543
|
computed: true,
|
|
123539
123544
|
shorthand: false,
|
|
123540
123545
|
key: key3.node,
|
|
123541
123546
|
value: value2,
|
|
123542
|
-
span: createSpan2(propertyStart.start, value2.span.end)
|
|
123547
|
+
span: createSpan2(asyncToken?.start ?? propertyStart.start, value2.span.end)
|
|
123543
123548
|
};
|
|
123544
123549
|
}
|
|
123545
123550
|
this.expectPunctuator(":");
|
|
@@ -123553,12 +123558,8 @@ var init_parser3 = __esm({
|
|
|
123553
123558
|
span: createSpan2(propertyStart.start, value.node.span.end)
|
|
123554
123559
|
};
|
|
123555
123560
|
}
|
|
123556
|
-
const asyncToken = this.currentToken().type === "keyword" && this.currentToken().value === "async" && isIdentifierLikeToken(this.peekToken(1)) && this.peekToken(2).type === "punctuator" && this.peekToken(2).value === "(" && !hasLineBreakBetween(this.currentToken(), this.peekToken(1)) ? this.currentToken() : void 0;
|
|
123557
|
-
if (asyncToken !== void 0) {
|
|
123558
|
-
this.index += 1;
|
|
123559
|
-
}
|
|
123560
123561
|
const token = this.currentToken();
|
|
123561
|
-
if (isIdentifierLikeToken(token)) {
|
|
123562
|
+
if (isIdentifierLikeToken(token) || token.type === "keyword" && this.peekToken(1).type === "punctuator" && this.peekToken(1).value === "(") {
|
|
123562
123563
|
this.index += 1;
|
|
123563
123564
|
const key3 = createIdentifier2(token);
|
|
123564
123565
|
if (this.currentToken().type === "punctuator" && this.currentToken().value === "(") {
|
|
@@ -123597,14 +123598,14 @@ var init_parser3 = __esm({
|
|
|
123597
123598
|
this.index += 1;
|
|
123598
123599
|
const key3 = createLiteralFromToken(token);
|
|
123599
123600
|
if (this.currentToken().type === "punctuator" && this.currentToken().value === "(") {
|
|
123600
|
-
const value2 = this.parseObjectMethod(
|
|
123601
|
+
const value2 = this.parseObjectMethod(asyncToken, key3.span.start);
|
|
123601
123602
|
return {
|
|
123602
123603
|
type: "Property",
|
|
123603
123604
|
computed: false,
|
|
123604
123605
|
shorthand: false,
|
|
123605
123606
|
key: key3,
|
|
123606
123607
|
value: value2,
|
|
123607
|
-
span: createSpan2(key3.span.start, value2.span.end)
|
|
123608
|
+
span: createSpan2(asyncToken?.start ?? key3.span.start, value2.span.end)
|
|
123608
123609
|
};
|
|
123609
123610
|
}
|
|
123610
123611
|
this.expectPunctuator(":");
|
|
@@ -123620,7 +123621,7 @@ var init_parser3 = __esm({
|
|
|
123620
123621
|
}
|
|
123621
123622
|
throw unexpectedTokenError(token);
|
|
123622
123623
|
}
|
|
123623
|
-
|
|
123624
|
+
isObjectMethodStart() {
|
|
123624
123625
|
const propertyToken = this.peekToken(1);
|
|
123625
123626
|
if (propertyToken.type === "punctuator" && propertyToken.value === "[") {
|
|
123626
123627
|
let depth = 0;
|
|
@@ -123642,7 +123643,7 @@ var init_parser3 = __esm({
|
|
|
123642
123643
|
offset += 1;
|
|
123643
123644
|
}
|
|
123644
123645
|
}
|
|
123645
|
-
return (
|
|
123646
|
+
return (propertyToken.type === "identifier" || propertyToken.type === "keyword" || propertyToken.type === "numeric" || propertyToken.type === "string") && this.peekToken(2).type === "punctuator" && this.peekToken(2).value === "(";
|
|
123646
123647
|
}
|
|
123647
123648
|
parseObjectMethod(asyncToken, methodStart) {
|
|
123648
123649
|
const params = this.withScope(() => {
|
|
@@ -147382,14 +147383,16 @@ function bindImportDeclaration(declaration, registry, wrappedModules, bindings,
|
|
|
147382
147383
|
declaration.source.span
|
|
147383
147384
|
);
|
|
147384
147385
|
}
|
|
147385
|
-
const wrappedExports = wrappedModules.get(moduleName) ??
|
|
147386
|
-
|
|
147387
|
-
|
|
147388
|
-
|
|
147389
|
-
|
|
147390
|
-
|
|
147391
|
-
|
|
147392
|
-
|
|
147386
|
+
const wrappedExports = wrappedModules.get(moduleName) ?? createBindingRecord(
|
|
147387
|
+
wrapCancelableBindings(
|
|
147388
|
+
wrapCallerInjectedBindings(Object.fromEntries(moduleExports), {
|
|
147389
|
+
budget: options.budget,
|
|
147390
|
+
hostCalls: options.hostCalls,
|
|
147391
|
+
moduleId: moduleName,
|
|
147392
|
+
signal: options.signal
|
|
147393
|
+
}),
|
|
147394
|
+
options.signal
|
|
147395
|
+
)
|
|
147393
147396
|
);
|
|
147394
147397
|
wrappedModules.set(moduleName, wrappedExports);
|
|
147395
147398
|
for (const specifier of declaration.specifiers) {
|
|
@@ -147409,7 +147412,7 @@ function bindImportDeclaration(declaration, registry, wrappedModules, bindings,
|
|
|
147409
147412
|
}
|
|
147410
147413
|
function resolveImportSpecifier(moduleName, specifier, wrappedExports) {
|
|
147411
147414
|
if (specifier.type === "ImportNamespaceSpecifier") {
|
|
147412
|
-
return
|
|
147415
|
+
return wrappedExports;
|
|
147413
147416
|
}
|
|
147414
147417
|
const exportName = specifier.type === "ImportDefaultSpecifier" ? "default" : specifier.imported.name;
|
|
147415
147418
|
const exportedValue = wrappedExports[exportName];
|
|
@@ -155562,7 +155565,7 @@ var init_package2 = __esm({
|
|
|
155562
155565
|
"package.json"() {
|
|
155563
155566
|
package_default2 = {
|
|
155564
155567
|
name: "poe-code",
|
|
155565
|
-
version: "11.0.
|
|
155568
|
+
version: "11.0.11",
|
|
155566
155569
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
155567
155570
|
license: "MIT",
|
|
155568
155571
|
type: "module",
|