poe-code 11.0.9 → 11.0.10
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 +14 -13
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-2GHBBE5J.js → chunk-BESE73VB.js} +14 -13
- package/packages/safejs/dist/chunks/chunk-BESE73VB.js.map +7 -0
- package/packages/safejs/dist/chunks/{chunk-APPD5CFI.js → chunk-DF7PY5YX.js} +2 -2
- 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/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-DF7PY5YX.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-BESE73VB.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-DF7PY5YX.js.map
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
parseMcpConfig,
|
|
21
21
|
splitFrontmatter,
|
|
22
22
|
withBrokenPipeGuard
|
|
23
|
-
} from "./chunks/chunk-
|
|
23
|
+
} from "./chunks/chunk-DF7PY5YX.js";
|
|
24
24
|
import {
|
|
25
25
|
Budget,
|
|
26
26
|
SandboxError,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
replaceErrorStack,
|
|
33
33
|
restore,
|
|
34
34
|
run
|
|
35
|
-
} from "./chunks/chunk-
|
|
35
|
+
} from "./chunks/chunk-BESE73VB.js";
|
|
36
36
|
import "./chunks/chunk-4YIDX44G.js";
|
|
37
37
|
|
|
38
38
|
// packages/safejs/src/cli.ts
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
runWithSpawnUsageAccumulator,
|
|
28
28
|
splitFrontmatter,
|
|
29
29
|
supportsSpawnMode
|
|
30
|
-
} from "./chunks/chunk-
|
|
30
|
+
} from "./chunks/chunk-DF7PY5YX.js";
|
|
31
31
|
import {
|
|
32
32
|
Budget,
|
|
33
33
|
FileSnapshotBackend,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
registerPendingHostCallPolicy,
|
|
50
50
|
restore,
|
|
51
51
|
run
|
|
52
|
-
} from "./chunks/chunk-
|
|
52
|
+
} from "./chunks/chunk-BESE73VB.js";
|
|
53
53
|
import "./chunks/chunk-4YIDX44G.js";
|
|
54
54
|
|
|
55
55
|
// packages/safejs/src/runner/run-harness.ts
|
|
@@ -1966,24 +1966,35 @@ class Parser {
|
|
|
1966
1966
|
}
|
|
1967
1967
|
if (this.currentToken().type === "identifier" &&
|
|
1968
1968
|
(this.currentToken().value === "get" || this.currentToken().value === "set") &&
|
|
1969
|
-
this.
|
|
1969
|
+
this.isObjectMethodStart()) {
|
|
1970
1970
|
const token = this.currentToken();
|
|
1971
1971
|
const syntax = token.value === "get" ? "Getter" : "Setter";
|
|
1972
1972
|
throw new Error(`${syntax} shorthand methods are not supported at line ${token.start.line}, column ${token.start.column}.`);
|
|
1973
1973
|
}
|
|
1974
|
+
const modifierToken = this.currentToken();
|
|
1975
|
+
const asyncToken = modifierToken.type === "keyword" &&
|
|
1976
|
+
modifierToken.value === "async" &&
|
|
1977
|
+
modifierToken.end.offset - modifierToken.start.offset === modifierToken.value.length &&
|
|
1978
|
+
this.isObjectMethodStart() &&
|
|
1979
|
+
!hasLineBreakBetween(modifierToken, this.peekToken(1))
|
|
1980
|
+
? modifierToken
|
|
1981
|
+
: undefined;
|
|
1982
|
+
if (asyncToken !== undefined) {
|
|
1983
|
+
this.index += 1;
|
|
1984
|
+
}
|
|
1974
1985
|
if (this.consumePunctuator("[") !== undefined) {
|
|
1975
1986
|
const propertyStart = this.previousToken();
|
|
1976
1987
|
const key = this.parseExpression();
|
|
1977
1988
|
this.expectPunctuator("]");
|
|
1978
1989
|
if (this.currentToken().type === "punctuator" && this.currentToken().value === "(") {
|
|
1979
|
-
const value = this.parseObjectMethod(
|
|
1990
|
+
const value = this.parseObjectMethod(asyncToken, propertyStart.start);
|
|
1980
1991
|
return {
|
|
1981
1992
|
type: "Property",
|
|
1982
1993
|
computed: true,
|
|
1983
1994
|
shorthand: false,
|
|
1984
1995
|
key: key.node,
|
|
1985
1996
|
value,
|
|
1986
|
-
span: createSpan(propertyStart.start, value.span.end)
|
|
1997
|
+
span: createSpan(asyncToken?.start ?? propertyStart.start, value.span.end)
|
|
1987
1998
|
};
|
|
1988
1999
|
}
|
|
1989
2000
|
this.expectPunctuator(":");
|
|
@@ -1997,19 +2008,11 @@ class Parser {
|
|
|
1997
2008
|
span: createSpan(propertyStart.start, value.node.span.end)
|
|
1998
2009
|
};
|
|
1999
2010
|
}
|
|
2000
|
-
const asyncToken = this.currentToken().type === "keyword" &&
|
|
2001
|
-
this.currentToken().value === "async" &&
|
|
2002
|
-
isIdentifierLikeToken(this.peekToken(1)) &&
|
|
2003
|
-
this.peekToken(2).type === "punctuator" &&
|
|
2004
|
-
this.peekToken(2).value === "(" &&
|
|
2005
|
-
!hasLineBreakBetween(this.currentToken(), this.peekToken(1))
|
|
2006
|
-
? this.currentToken()
|
|
2007
|
-
: undefined;
|
|
2008
|
-
if (asyncToken !== undefined) {
|
|
2009
|
-
this.index += 1;
|
|
2010
|
-
}
|
|
2011
2011
|
const token = this.currentToken();
|
|
2012
|
-
if (isIdentifierLikeToken(token)
|
|
2012
|
+
if (isIdentifierLikeToken(token) ||
|
|
2013
|
+
(token.type === "keyword" &&
|
|
2014
|
+
this.peekToken(1).type === "punctuator" &&
|
|
2015
|
+
this.peekToken(1).value === "(")) {
|
|
2013
2016
|
this.index += 1;
|
|
2014
2017
|
const key = createIdentifier(token);
|
|
2015
2018
|
if (this.currentToken().type === "punctuator" && this.currentToken().value === "(") {
|
|
@@ -2048,14 +2051,14 @@ class Parser {
|
|
|
2048
2051
|
this.index += 1;
|
|
2049
2052
|
const key = createLiteralFromToken(token);
|
|
2050
2053
|
if (this.currentToken().type === "punctuator" && this.currentToken().value === "(") {
|
|
2051
|
-
const value = this.parseObjectMethod(
|
|
2054
|
+
const value = this.parseObjectMethod(asyncToken, key.span.start);
|
|
2052
2055
|
return {
|
|
2053
2056
|
type: "Property",
|
|
2054
2057
|
computed: false,
|
|
2055
2058
|
shorthand: false,
|
|
2056
2059
|
key,
|
|
2057
2060
|
value,
|
|
2058
|
-
span: createSpan(key.span.start, value.span.end)
|
|
2061
|
+
span: createSpan(asyncToken?.start ?? key.span.start, value.span.end)
|
|
2059
2062
|
};
|
|
2060
2063
|
}
|
|
2061
2064
|
this.expectPunctuator(":");
|
|
@@ -2071,7 +2074,7 @@ class Parser {
|
|
|
2071
2074
|
}
|
|
2072
2075
|
throw unexpectedTokenError(token);
|
|
2073
2076
|
}
|
|
2074
|
-
|
|
2077
|
+
isObjectMethodStart() {
|
|
2075
2078
|
const propertyToken = this.peekToken(1);
|
|
2076
2079
|
if (propertyToken.type === "punctuator" && propertyToken.value === "[") {
|
|
2077
2080
|
let depth = 0;
|
|
@@ -2094,7 +2097,8 @@ class Parser {
|
|
|
2094
2097
|
offset += 1;
|
|
2095
2098
|
}
|
|
2096
2099
|
}
|
|
2097
|
-
return ((
|
|
2100
|
+
return ((propertyToken.type === "identifier" ||
|
|
2101
|
+
propertyToken.type === "keyword" ||
|
|
2098
2102
|
propertyToken.type === "numeric" ||
|
|
2099
2103
|
propertyToken.type === "string") &&
|
|
2100
2104
|
this.peekToken(2).type === "punctuator" &&
|