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/package.json
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-QWNCR7EZ.js";
|
|
31
31
|
|
|
32
32
|
// packages/safejs/src/migrate.ts
|
|
33
33
|
import { createHash } from "node:crypto";
|
|
@@ -8055,4 +8055,4 @@ export {
|
|
|
8055
8055
|
parseMcpConfig,
|
|
8056
8056
|
makeMcpModule
|
|
8057
8057
|
};
|
|
8058
|
-
//# sourceMappingURL=chunk-
|
|
8058
|
+
//# sourceMappingURL=chunk-2M5F6OIT.js.map
|
|
@@ -3767,26 +3767,31 @@ var Parser = class {
|
|
|
3767
3767
|
`Generator shorthand methods are not supported at line ${generatorToken.start.line}, column ${generatorToken.start.column}.`
|
|
3768
3768
|
);
|
|
3769
3769
|
}
|
|
3770
|
-
if (this.currentToken().type === "identifier" && (this.currentToken().value === "get" || this.currentToken().value === "set") && this.
|
|
3770
|
+
if (this.currentToken().type === "identifier" && (this.currentToken().value === "get" || this.currentToken().value === "set") && this.isObjectMethodStart()) {
|
|
3771
3771
|
const token2 = this.currentToken();
|
|
3772
3772
|
const syntax = token2.value === "get" ? "Getter" : "Setter";
|
|
3773
3773
|
throw new Error(
|
|
3774
3774
|
`${syntax} shorthand methods are not supported at line ${token2.start.line}, column ${token2.start.column}.`
|
|
3775
3775
|
);
|
|
3776
3776
|
}
|
|
3777
|
+
const modifierToken = this.currentToken();
|
|
3778
|
+
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;
|
|
3779
|
+
if (asyncToken !== void 0) {
|
|
3780
|
+
this.index += 1;
|
|
3781
|
+
}
|
|
3777
3782
|
if (this.consumePunctuator("[") !== void 0) {
|
|
3778
3783
|
const propertyStart = this.previousToken();
|
|
3779
3784
|
const key = this.parseExpression();
|
|
3780
3785
|
this.expectPunctuator("]");
|
|
3781
3786
|
if (this.currentToken().type === "punctuator" && this.currentToken().value === "(") {
|
|
3782
|
-
const value2 = this.parseObjectMethod(
|
|
3787
|
+
const value2 = this.parseObjectMethod(asyncToken, propertyStart.start);
|
|
3783
3788
|
return {
|
|
3784
3789
|
type: "Property",
|
|
3785
3790
|
computed: true,
|
|
3786
3791
|
shorthand: false,
|
|
3787
3792
|
key: key.node,
|
|
3788
3793
|
value: value2,
|
|
3789
|
-
span: createSpan2(propertyStart.start, value2.span.end)
|
|
3794
|
+
span: createSpan2(asyncToken?.start ?? propertyStart.start, value2.span.end)
|
|
3790
3795
|
};
|
|
3791
3796
|
}
|
|
3792
3797
|
this.expectPunctuator(":");
|
|
@@ -3800,12 +3805,8 @@ var Parser = class {
|
|
|
3800
3805
|
span: createSpan2(propertyStart.start, value.node.span.end)
|
|
3801
3806
|
};
|
|
3802
3807
|
}
|
|
3803
|
-
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;
|
|
3804
|
-
if (asyncToken !== void 0) {
|
|
3805
|
-
this.index += 1;
|
|
3806
|
-
}
|
|
3807
3808
|
const token = this.currentToken();
|
|
3808
|
-
if (isIdentifierLikeToken(token)) {
|
|
3809
|
+
if (isIdentifierLikeToken(token) || token.type === "keyword" && this.peekToken(1).type === "punctuator" && this.peekToken(1).value === "(") {
|
|
3809
3810
|
this.index += 1;
|
|
3810
3811
|
const key = createIdentifier2(token);
|
|
3811
3812
|
if (this.currentToken().type === "punctuator" && this.currentToken().value === "(") {
|
|
@@ -3844,14 +3845,14 @@ var Parser = class {
|
|
|
3844
3845
|
this.index += 1;
|
|
3845
3846
|
const key = createLiteralFromToken(token);
|
|
3846
3847
|
if (this.currentToken().type === "punctuator" && this.currentToken().value === "(") {
|
|
3847
|
-
const value2 = this.parseObjectMethod(
|
|
3848
|
+
const value2 = this.parseObjectMethod(asyncToken, key.span.start);
|
|
3848
3849
|
return {
|
|
3849
3850
|
type: "Property",
|
|
3850
3851
|
computed: false,
|
|
3851
3852
|
shorthand: false,
|
|
3852
3853
|
key,
|
|
3853
3854
|
value: value2,
|
|
3854
|
-
span: createSpan2(key.span.start, value2.span.end)
|
|
3855
|
+
span: createSpan2(asyncToken?.start ?? key.span.start, value2.span.end)
|
|
3855
3856
|
};
|
|
3856
3857
|
}
|
|
3857
3858
|
this.expectPunctuator(":");
|
|
@@ -3867,7 +3868,7 @@ var Parser = class {
|
|
|
3867
3868
|
}
|
|
3868
3869
|
throw unexpectedTokenError(token);
|
|
3869
3870
|
}
|
|
3870
|
-
|
|
3871
|
+
isObjectMethodStart() {
|
|
3871
3872
|
const propertyToken = this.peekToken(1);
|
|
3872
3873
|
if (propertyToken.type === "punctuator" && propertyToken.value === "[") {
|
|
3873
3874
|
let depth = 0;
|
|
@@ -3889,7 +3890,7 @@ var Parser = class {
|
|
|
3889
3890
|
offset += 1;
|
|
3890
3891
|
}
|
|
3891
3892
|
}
|
|
3892
|
-
return (
|
|
3893
|
+
return (propertyToken.type === "identifier" || propertyToken.type === "keyword" || propertyToken.type === "numeric" || propertyToken.type === "string") && this.peekToken(2).type === "punctuator" && this.peekToken(2).value === "(";
|
|
3893
3894
|
}
|
|
3894
3895
|
parseObjectMethod(asyncToken, methodStart) {
|
|
3895
3896
|
const params = this.withScope(() => {
|
|
@@ -28149,14 +28150,16 @@ function bindImportDeclaration(declaration, registry, wrappedModules, bindings,
|
|
|
28149
28150
|
declaration.source.span
|
|
28150
28151
|
);
|
|
28151
28152
|
}
|
|
28152
|
-
const wrappedExports = wrappedModules.get(moduleName) ??
|
|
28153
|
-
|
|
28154
|
-
|
|
28155
|
-
|
|
28156
|
-
|
|
28157
|
-
|
|
28158
|
-
|
|
28159
|
-
|
|
28153
|
+
const wrappedExports = wrappedModules.get(moduleName) ?? createBindingRecord(
|
|
28154
|
+
wrapCancelableBindings(
|
|
28155
|
+
wrapCallerInjectedBindings(Object.fromEntries(moduleExports), {
|
|
28156
|
+
budget: options.budget,
|
|
28157
|
+
hostCalls: options.hostCalls,
|
|
28158
|
+
moduleId: moduleName,
|
|
28159
|
+
signal: options.signal
|
|
28160
|
+
}),
|
|
28161
|
+
options.signal
|
|
28162
|
+
)
|
|
28160
28163
|
);
|
|
28161
28164
|
wrappedModules.set(moduleName, wrappedExports);
|
|
28162
28165
|
for (const specifier of declaration.specifiers) {
|
|
@@ -28176,7 +28179,7 @@ function bindImportDeclaration(declaration, registry, wrappedModules, bindings,
|
|
|
28176
28179
|
}
|
|
28177
28180
|
function resolveImportSpecifier(moduleName, specifier, wrappedExports) {
|
|
28178
28181
|
if (specifier.type === "ImportNamespaceSpecifier") {
|
|
28179
|
-
return
|
|
28182
|
+
return wrappedExports;
|
|
28180
28183
|
}
|
|
28181
28184
|
const exportName = specifier.type === "ImportDefaultSpecifier" ? "default" : specifier.imported.name;
|
|
28182
28185
|
const exportedValue = wrappedExports[exportName];
|
|
@@ -28984,4 +28987,4 @@ export {
|
|
|
28984
28987
|
FileSnapshotBackend,
|
|
28985
28988
|
run
|
|
28986
28989
|
};
|
|
28987
|
-
//# sourceMappingURL=chunk-
|
|
28990
|
+
//# sourceMappingURL=chunk-QWNCR7EZ.js.map
|