@ja-platform/parser-expressions 0.0.0-stage → 7.1.0
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/README.md +111 -2
- package/dist/@types/CombinedParser.d.ts +11 -0
- package/dist/@types/ExpressionParser.d.ts +12 -0
- package/dist/@types/code-parsers/CodeParser.d.ts +25 -0
- package/dist/@types/code-parsers/JavaScriptParser.d.ts +18 -0
- package/dist/@types/definitions/ValidationContext.d.ts +8 -0
- package/dist/@types/expressions/AbstractExpression.d.ts +42 -0
- package/dist/@types/expressions/EvaluatedExpression.d.ts +35 -0
- package/dist/@types/expressions/ListExpression.d.ts +31 -0
- package/dist/@types/expressions/constant/ConstantExpression.d.ts +28 -0
- package/dist/@types/expressions/function/FunctionExpression.d.ts +38 -0
- package/dist/@types/expressions/shorthand/FormatShorthandExpression.d.ts +31 -0
- package/dist/@types/expressions/shorthand/ShorthandExpression.d.ts +43 -0
- package/dist/@types/expressions/text/AbstractFormatExpression.d.ts +45 -0
- package/dist/@types/expressions/text/FormatStringExpression.d.ts +18 -0
- package/dist/@types/index.d.ts +26 -0
- package/dist/@types/tokens/AbstractToken.d.ts +12 -0
- package/dist/@types/tokens/DelimiterToken.d.ts +10 -0
- package/dist/@types/tokens/EnumToken.d.ts +10 -0
- package/dist/@types/tokens/code/CodeToken.d.ts +142 -0
- package/dist/@types/tokens/code/IdentifierToken.d.ts +12 -0
- package/dist/@types/tokens/code/JSToken.d.ts +31 -0
- package/dist/@types/tokens/code/PrefixToken.d.ts +9 -0
- package/dist/@types/tokens/text/PlaceholderToken.d.ts +12 -0
- package/dist/@types/tokens/text/TextToken.d.ts +12 -0
- package/dist/@types/utils/parserUtils.d.ts +7 -0
- package/dist/@types/utils/tokenUtils.d.ts +11 -0
- package/dist/@types/utils/valueFormatting.d.ts +9 -0
- package/dist/CombinedParser.js +24 -0
- package/dist/CombinedParser.js.map +1 -0
- package/dist/ExpressionParser.js +20 -0
- package/dist/ExpressionParser.js.map +1 -0
- package/dist/code-parsers/CodeParser.js +45 -0
- package/dist/code-parsers/CodeParser.js.map +1 -0
- package/dist/code-parsers/JavaScriptParser.js +56 -0
- package/dist/code-parsers/JavaScriptParser.js.map +1 -0
- package/dist/definitions/ValidationContext.js +3 -0
- package/dist/definitions/ValidationContext.js.map +1 -0
- package/dist/expressions/AbstractExpression.js +47 -0
- package/dist/expressions/AbstractExpression.js.map +1 -0
- package/dist/expressions/EvaluatedExpression.js +106 -0
- package/dist/expressions/EvaluatedExpression.js.map +1 -0
- package/dist/expressions/ListExpression.js +63 -0
- package/dist/expressions/ListExpression.js.map +1 -0
- package/dist/expressions/constant/ConstantExpression.js +54 -0
- package/dist/expressions/constant/ConstantExpression.js.map +1 -0
- package/dist/expressions/function/FunctionExpression.js +79 -0
- package/dist/expressions/function/FunctionExpression.js.map +1 -0
- package/dist/expressions/shorthand/FormatShorthandExpression.js +61 -0
- package/dist/expressions/shorthand/FormatShorthandExpression.js.map +1 -0
- package/dist/expressions/shorthand/ShorthandExpression.js +92 -0
- package/dist/expressions/shorthand/ShorthandExpression.js.map +1 -0
- package/dist/expressions/text/AbstractFormatExpression.js +179 -0
- package/dist/expressions/text/AbstractFormatExpression.js.map +1 -0
- package/dist/expressions/text/FormatStringExpression.js +44 -0
- package/dist/expressions/text/FormatStringExpression.js.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/tokens/AbstractToken.js +22 -0
- package/dist/tokens/AbstractToken.js.map +1 -0
- package/dist/tokens/DelimiterToken.js +22 -0
- package/dist/tokens/DelimiterToken.js.map +1 -0
- package/dist/tokens/EnumToken.js +22 -0
- package/dist/tokens/EnumToken.js.map +1 -0
- package/dist/tokens/code/CodeToken.js +33 -0
- package/dist/tokens/code/CodeToken.js.map +1 -0
- package/dist/tokens/code/IdentifierToken.js +28 -0
- package/dist/tokens/code/IdentifierToken.js.map +1 -0
- package/dist/tokens/code/JSToken.js +251 -0
- package/dist/tokens/code/JSToken.js.map +1 -0
- package/dist/tokens/code/PrefixToken.js +24 -0
- package/dist/tokens/code/PrefixToken.js.map +1 -0
- package/dist/tokens/text/PlaceholderToken.js +25 -0
- package/dist/tokens/text/PlaceholderToken.js.map +1 -0
- package/dist/tokens/text/TextToken.js +28 -0
- package/dist/tokens/text/TextToken.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utils/parserUtils.js +23 -0
- package/dist/utils/parserUtils.js.map +1 -0
- package/dist/utils/tokenUtils.js +43 -0
- package/dist/utils/tokenUtils.js.map +1 -0
- package/dist/utils/valueFormatting.js +34 -0
- package/dist/utils/valueFormatting.js.map +1 -0
- package/package.json +37 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextToken = void 0;
|
|
4
|
+
const AbstractToken_1 = require("../AbstractToken");
|
|
5
|
+
/**
|
|
6
|
+
* Original text, including any escaped format-string braces.
|
|
7
|
+
*/
|
|
8
|
+
class TextToken extends AbstractToken_1.AbstractToken {
|
|
9
|
+
static fromValue(value, start = 0) {
|
|
10
|
+
return new TextToken(value.replace(/{/g, '{{').replace(/}/g, '}}'), start);
|
|
11
|
+
}
|
|
12
|
+
constructor(source, start = 0) {
|
|
13
|
+
super(start);
|
|
14
|
+
this.source = source;
|
|
15
|
+
Object.freeze(this);
|
|
16
|
+
}
|
|
17
|
+
raw() {
|
|
18
|
+
return this.source;
|
|
19
|
+
}
|
|
20
|
+
clone() {
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
get decodedText() {
|
|
24
|
+
return this.source.replace(/{{/g, '{').replace(/}}/g, '}');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.TextToken = TextToken;
|
|
28
|
+
//# sourceMappingURL=TextToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextToken.js","sourceRoot":"","sources":["../../../src/tokens/text/TextToken.ts"],"names":[],"mappings":";;;AAAA,oDAAiD;AAEjD;;GAEG;AACH,eAAuB,SAAQ,6BAAa;IAC1C,MAAM,CAAC,SAAS,CAAC,KAAa,EAAE,KAAK,GAAG,CAAC;QACvC,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;IAC7E,CAAC;IAED,YACW,MAAc,EACvB,KAAK,GAAG,CAAC;QAET,KAAK,CAAC,KAAK,CAAC,CAAC;sBAHJ,MAAM;QAIf,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAED,GAAG;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC7D,CAAC;CACF","sourcesContent":["import { AbstractToken } from '../AbstractToken';\n\n/**\n * Original text, including any escaped format-string braces.\n */\nexport class TextToken extends AbstractToken {\n static fromValue(value: string, start = 0): TextToken {\n return new TextToken(value.replace(/{/g, '{{').replace(/}/g, '}}'), start);\n }\n\n constructor(\n readonly source: string,\n start = 0\n ) {\n super(start);\n Object.freeze(this);\n }\n\n raw(): string {\n return this.source;\n }\n\n clone(): this {\n return this;\n }\n\n get decodedText(): string {\n return this.source.replace(/{{/g, '{').replace(/}}/g, '}');\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"7.0.2","root":[[89,90],[102,105],[108,109],[111,129]],"packageJsons":["../../../node_modules/.pnpm/@babel+parser@8.0.7/node_modules/@babel/parser/package.json","../../../node_modules/.pnpm/@babel+traverse@8.0.7/node_modules/@babel/traverse/package.json","../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/package.json","../package.json","../../type-system/package.json"],"missingPackageJsons":["../../../node_modules/.pnpm/@babel+parser@8.0.7/node_modules/@babel/parser/lib/package.json","../../../node_modules/.pnpm/@babel+parser@8.0.7/node_modules/@babel/parser/node_modules/@babel/types/package.json","../../../node_modules/.pnpm/@babel+traverse@8.0.7/node_modules/@babel/traverse/lib/package.json","../../../node_modules/.pnpm/@babel+traverse@8.0.7/node_modules/@babel/traverse/node_modules/@babel/types/package.json","../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2024.d.ts","lib.es2025.d.ts","lib.esnext.d.ts","lib.dom.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2024.arraybuffer.d.ts","lib.es2024.collection.d.ts","lib.es2024.object.d.ts","lib.es2024.promise.d.ts","lib.es2024.regexp.d.ts","lib.es2024.sharedmemory.d.ts","lib.es2024.string.d.ts","lib.es2025.collection.d.ts","lib.es2025.float16.d.ts","lib.es2025.intl.d.ts","lib.es2025.iterator.d.ts","lib.es2025.promise.d.ts","lib.es2025.regexp.d.ts","lib.esnext.array.d.ts","lib.esnext.collection.d.ts","lib.esnext.date.d.ts","lib.esnext.decorators.d.ts","lib.esnext.disposable.d.ts","lib.esnext.error.d.ts","lib.esnext.intl.d.ts","lib.esnext.sharedmemory.d.ts","lib.esnext.temporal.d.ts","lib.esnext.typedarrays.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../src/tokens/AbstractToken.ts","../src/tokens/code/CodeToken.ts","../../type-system/dist/@types/Formatter.d.ts","../../type-system/dist/@types/Type.d.ts","../../type-system/dist/@types/ObjectType.d.ts","../../type-system/dist/@types/ArrayType.d.ts","../../type-system/dist/@types/UnknownType.d.ts","../../type-system/dist/@types/ScalarType.d.ts","../../type-system/dist/@types/TextType.d.ts","../../type-system/dist/@types/NumberType.d.ts","../../type-system/dist/@types/IntegerType.d.ts","../../type-system/dist/@types/BooleanType.d.ts","../../type-system/dist/@types/index.d.ts","../src/definitions/ValidationContext.ts","../src/expressions/AbstractExpression.ts","../src/ExpressionParser.ts","../src/CombinedParser.ts","../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/index.d.ts","../../../node_modules/.pnpm/@babel+traverse@8.0.7/node_modules/@babel/traverse/lib/index.d.ts","../src/tokens/text/TextToken.ts","../src/code-parsers/CodeParser.ts","../../../node_modules/.pnpm/@babel+parser@8.0.7/node_modules/@babel/parser/lib/index.d.ts","../src/code-parsers/JavaScriptParser.ts","../src/tokens/code/JSToken.ts","../src/tokens/code/IdentifierToken.ts","../src/tokens/code/PrefixToken.ts","../src/utils/tokenUtils.ts","../src/expressions/EvaluatedExpression.ts","../src/expressions/constant/ConstantExpression.ts","../src/expressions/shorthand/ShorthandExpression.ts","../src/expressions/shorthand/FormatShorthandExpression.ts","../src/expressions/function/FunctionExpression.ts","../src/utils/parserUtils.ts","../src/utils/valueFormatting.ts","../src/tokens/EnumToken.ts","../src/tokens/DelimiterToken.ts","../src/expressions/ListExpression.ts","../src/tokens/text/PlaceholderToken.ts","../src/expressions/text/AbstractFormatExpression.ts","../src/expressions/text/FormatStringExpression.ts","../src/index.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995","793cee405385076e27c24f409659dccd","09f69c6610266eaee1ac9e3e30df2c71","62bad718844246b8e17547f37bad6085",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"38856f70edcd2115c355d96ec77cc09e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"de8700156c1275465bcd473c28b359aa","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d47cfdb6ede40518357bb5a4cd7cd9fb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e5773860cd9e5b15e683113f642ab47","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"30ff5fe1682f7fcd629880476ca3c2e0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf23d7d1b40b9015b694ddc2f011752f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2cc585d42e2c548f9f24a30a1989fd33","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"713906ce9d332d2242b7f05ed9304be3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6009ffff7e43c93318804d2d28e37fe3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"03be89b227587594fbb50509fc1c2e45","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b30df52dc24740c0bad7c55c3511df7d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ab8d3c9b5ed5c2ab8f383607eef439f0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d950ec671d0a8e07f3c1a31e94abed86","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1abef2ace5eccb02d60dd73cd5a5ee4c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5f0a3044029d1cc081b5887eb4deb07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d57c697f1446940ec4bfe669c962e2c4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"10f7d9da7564f27f8ddf4a162b6da6d3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1d0520af549e0c3581f15173cc713ca1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d65083f97fd741cff028472563eddb79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"da7f24f00653ebac660ac1c0821ed33d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cb5ae9e65516ea2235f0721f6aac43c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1f9398f3eec050714be4f9b1c3a2317d","signature":"510b0b622fafd6eff2bf5d020de046ee","impliedNodeFormat":1},{"version":"79de825e280a92f200bf8ab73df74aaa","signature":"968dbf07ccc13a1a84f319c26e9909b3","impliedNodeFormat":1},"e5fb7990b84f5089ba92554ea3614810","770ee32ef332fd48bfef508442b30edb","5c1b5931ee0c894699ca56f5b573f88a","e37fe31d1631404aaee1668c9a2acfdd","89b6053090a8d01f57cb8f521fae777d","26302a8b72d74f944dcf8f6452e54f7c","bc95bdb594a5aece18248fbf4387dd2e","90125a76f2ae701181f7e09dea41f3ad","ac52bb76ccad935a013384d2a71ab267","2c96eeb69afb823580d4e1e5f1b188e0","c06213bcb24cd658dfcd1239777159bd",{"version":"3d6cee06532f3e1ef9fc29d5fe956ff5","signature":"84519ebe510a4219ef71e5a0a973c591","impliedNodeFormat":1},{"version":"640db1f77b2da18d43b76ffabce559a9","signature":"0c68f6d853b53c3d34189f5c99c4b624","impliedNodeFormat":1},{"version":"155b9d6b514ed17bdf5948ab5b0f65cf","signature":"18408a4ba98e42e70324ba5c0b71f379","impliedNodeFormat":1},{"version":"20aa964875521a143a6b38455b528b74","signature":"d6ca1e855d5b6554555a009a40e806a2","impliedNodeFormat":1},{"version":"3575b2b8e50b5a5b3acce219e08900c5","impliedNodeFormat":99},{"version":"ba148a7a8b1b345b82e2255648d7a2a0","impliedNodeFormat":99},{"version":"36194741ebb41739843db9a2ee86ca6f","signature":"f25290e9ca5aee09a0210e2a454437f8","impliedNodeFormat":1},{"version":"cbe2ad0843a3b4397021171b675d91e2","signature":"e78cf9dc5bca6011a220581f56da19cb","impliedNodeFormat":1},{"version":"436d7d9cea8d7f3e41e2ea50138ad4da","impliedNodeFormat":99},{"version":"6341abc9e164a58cd4faf7db00c2125e","signature":"25aba7d58ecafcf7098f9bcca63ea72a","impliedNodeFormat":1},{"version":"1f637dbc1f68ca19c0568ac3979a5a59","signature":"354fc88481ff608fcbbfaf7851a29043","impliedNodeFormat":1},{"version":"8c8e53d56beef78deb845941070bc387","signature":"3058c9c4ad1200a2ff62094072deed53","impliedNodeFormat":1},{"version":"72d344412c308ce31e59dd6752f5abca","signature":"bf6d579deb9596ec514083ea94789be0","impliedNodeFormat":1},{"version":"4b2dcd692e0308ac4cee04202b63a5c0","signature":"d33a7d16b8bb10392237228466f959f8","impliedNodeFormat":1},{"version":"f3e07630161c6300fd4cf880bdab3fc3","signature":"cc36a10654ee721a890569de343ee4a0","impliedNodeFormat":1},{"version":"64fec2dff04aac9bd06613fd1896637e","signature":"c3b9b5f9be217e9fabbfc9f5b48da439","impliedNodeFormat":1},{"version":"5ff38488838238777aa56346a29f7f4a","signature":"81bde6b904e09fb337a80f52526d0c49","impliedNodeFormat":1},{"version":"49525dcd83e110eceea010cecebb179f","signature":"61b4c95d7a2ba531a5faae6b4e0694f1","impliedNodeFormat":1},{"version":"982a7904a33ce1cdfa35429f420cd65c","signature":"be6a700c7b2a3007e5ff5eccccd1e6ca","impliedNodeFormat":1},{"version":"5dc06e0d4f3ebe90cd0cedb894c16f36","signature":"92d25cb01f547225fee7d19311179220","impliedNodeFormat":1},{"version":"e8e9d0b6b6e01ab0a9a3b771fca4b37b","signature":"90506d77482148f93c56044616613958","impliedNodeFormat":1},{"version":"09feabedf70ed610ed9ea0425e1f97e4","signature":"57845437bcd4011990eb52478f02c4a0","impliedNodeFormat":1},{"version":"416eeb96c107bd2015080f4249d3ee38","signature":"ae63a2414b6a326b93ee65bba693d617","impliedNodeFormat":1},{"version":"2e94ece9db7745b4b0231851cb479a5b","signature":"a950824f78fe1cb40eeff5cf89a2245d","impliedNodeFormat":1},{"version":"2f588b7565009cf660e49f19128363d2","signature":"cf3121ca4479d3afdaceb690d14cf086","impliedNodeFormat":1},{"version":"2fedba8910cc4596445d6e387abf7d19","signature":"c115de0a80c101e99244da31e79527d1","impliedNodeFormat":1},{"version":"9de65f540c5986bb7e0fe983bc5b25d0","signature":"cabc47d72ba300dd603c14a7bb2b7cde","impliedNodeFormat":1},{"version":"ea42ca69ffe874ebf9d6b022eaa58b87","signature":"4678acee57e4a32f080f3a53600abf18","impliedNodeFormat":1}],"fileIdsList":[[106],[89,103,104],[89,103],[106,107,109,110],[90,101],[89,102],[89,90,103,104,108,112,114,115],[89,101,103,104,117,123,124],[89,101,103,104,108,115],[89,90,103,104,116],[89,104,108,115,118],[89,90,101,102,103,104,112,115],[89,102,103,104,108,126],[89,105,116,118,119,120,127],[89,90,102,103,104,105,108,109,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128],[89],[89,90,106,107,108,109,111],[89,113],[89,103,105,116,117,118,119,120],[89,90,112,114],[101],[92],[92,96],[91],[91,92,93,94,95,96,97,98,99,100]],"options":{"composite":true,"declaration":true,"declarationDir":"./@types","inlineSources":true,"module":199,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":false,"stripInternal":true,"sourceMap":true,"target":4,"tsBuildInfoFile":"./tsconfig.tsbuildinfo","esModuleInterop":true},"referencedMap":[[110,1],[107,1],[105,2],[104,3],[111,4],[102,5],[103,6],[116,7],[125,8],[117,9],[120,10],[119,11],[118,12],[127,13],[128,14],[129,15],[124,16],[123,16],[90,16],[113,16],[112,17],[114,18],[126,3],[108,16],[121,19],[115,20],[122,21],[94,22],[100,23],[99,23],[98,23],[93,22],[96,22],[97,23],[92,24],[95,22],[101,25]],"latestChangedDtsFile":"./@types/index.d.ts"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseExpression = parseExpression;
|
|
4
|
+
const CombinedParser_1 = require("../CombinedParser");
|
|
5
|
+
const EvaluatedExpression_1 = require("../expressions/EvaluatedExpression");
|
|
6
|
+
const ConstantExpression_1 = require("../expressions/constant/ConstantExpression");
|
|
7
|
+
const FormatShorthandExpression_1 = require("../expressions/shorthand/FormatShorthandExpression");
|
|
8
|
+
const FunctionExpression_1 = require("../expressions/function/FunctionExpression");
|
|
9
|
+
const ShorthandExpression_1 = require("../expressions/shorthand/ShorthandExpression");
|
|
10
|
+
/**
|
|
11
|
+
* Recognize evaluated code and references before preserving remaining input as constant text.
|
|
12
|
+
* Callers can compose their own parser order instead.
|
|
13
|
+
*/
|
|
14
|
+
function parseExpression(source, start = 0) {
|
|
15
|
+
return new CombinedParser_1.CombinedParser([
|
|
16
|
+
new FunctionExpression_1.FunctionExpressionParser(),
|
|
17
|
+
new EvaluatedExpression_1.EvaluatedExpressionParser(),
|
|
18
|
+
new FormatShorthandExpression_1.FormatShorthandExpressionParser(),
|
|
19
|
+
new ShorthandExpression_1.ShorthandExpressionParser(),
|
|
20
|
+
new ConstantExpression_1.ConstantExpressionParser()
|
|
21
|
+
]).tryParse(source, start);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=parserUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parserUtils.js","sourceRoot":"","sources":["../../src/utils/parserUtils.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAEnD,4EAA+E;AAC/E,mFAAsF;AACtF,kGAAqG;AACrG,mFAAsF;AACtF,sFAAyF;AAGzF;;;GAGG;AACH,yBAAgC,MAAwB,EAAE,KAAK,GAAG,CAAC;IACjE,OAAO,IAAI,+BAAc,CAAqB;QAC5C,IAAI,6CAAwB,EAAE;QAC9B,IAAI,+CAAyB,EAAE;QAC/B,IAAI,2DAA+B,EAAE;QACrC,IAAI,+CAAyB,EAAE;QAC/B,IAAI,6CAAwB,EAAE;KAC/B,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["import { CombinedParser } from '../CombinedParser';\nimport { AbstractExpression } from '../expressions/AbstractExpression';\nimport { EvaluatedExpressionParser } from '../expressions/EvaluatedExpression';\nimport { ConstantExpressionParser } from '../expressions/constant/ConstantExpression';\nimport { FormatShorthandExpressionParser } from '../expressions/shorthand/FormatShorthandExpression';\nimport { FunctionExpressionParser } from '../expressions/function/FunctionExpression';\nimport { ShorthandExpressionParser } from '../expressions/shorthand/ShorthandExpression';\nimport { ExpressionSource } from '../tokens/AbstractToken';\n\n/**\n * Recognize evaluated code and references before preserving remaining input as constant text.\n * Callers can compose their own parser order instead.\n */\nexport function parseExpression(source: ExpressionSource, start = 0): AbstractExpression | null {\n return new CombinedParser<AbstractExpression>([\n new FunctionExpressionParser(),\n new EvaluatedExpressionParser(),\n new FormatShorthandExpressionParser(),\n new ShorthandExpressionParser(),\n new ConstantExpressionParser()\n ]).tryParse(source, start);\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stringify = stringify;
|
|
4
|
+
exports.codeToken = codeToken;
|
|
5
|
+
exports.javascriptToken = javascriptToken;
|
|
6
|
+
exports.hasFunctionPrefix = hasFunctionPrefix;
|
|
7
|
+
exports.leadingTrivia = leadingTrivia;
|
|
8
|
+
const CodeToken_1 = require("../tokens/code/CodeToken");
|
|
9
|
+
const JSToken_1 = require("../tokens/code/JSToken");
|
|
10
|
+
const PrefixToken_1 = require("../tokens/code/PrefixToken");
|
|
11
|
+
function stringify(source) {
|
|
12
|
+
let text;
|
|
13
|
+
if (typeof source === 'string') {
|
|
14
|
+
text = source;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
text = source.map((token) => token.raw()).join('');
|
|
18
|
+
}
|
|
19
|
+
return text;
|
|
20
|
+
}
|
|
21
|
+
function codeToken(tokens) {
|
|
22
|
+
const code = tokens.filter((token) => token instanceof CodeToken_1.CodeToken);
|
|
23
|
+
if (code.length !== 1)
|
|
24
|
+
throw new SyntaxError('Expected one code token.');
|
|
25
|
+
return code[0];
|
|
26
|
+
}
|
|
27
|
+
function javascriptToken(tokens) {
|
|
28
|
+
const javascript = tokens.filter((token) => token instanceof JSToken_1.JSToken);
|
|
29
|
+
if (javascript.length !== 1) {
|
|
30
|
+
throw new SyntaxError('Expected one JavaScript token.');
|
|
31
|
+
}
|
|
32
|
+
return javascript[0];
|
|
33
|
+
}
|
|
34
|
+
function hasFunctionPrefix(source) {
|
|
35
|
+
return source.slice(leadingTrivia(source).length).startsWith(PrefixToken_1.FUNCTION_PREFIX);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Whitespace and comments before a Journey prefix remain original source text.
|
|
39
|
+
*/
|
|
40
|
+
function leadingTrivia(source) {
|
|
41
|
+
return source.match(/^(?:\s+|\/\*[\s\S]*?\*\/|\/\/[^\r\n]*(?:\r?\n|$))*/)[0];
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=tokenUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenUtils.js","sourceRoot":"","sources":["../../src/utils/tokenUtils.ts"],"names":[],"mappings":";;;;;;;AACA,wDAAqD;AACrD,oDAAiD;AACjD,4DAA6D;AAE7D,mBAA0B,MAAwB;IAChD,IAAI,IAAY,CAAC;IACjB,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,IAAI,GAAG,MAAM,CAAC;IAChB,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,mBAA0B,MAAgC;IACxD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAsB,EAAE,CAAC,KAAK,YAAY,qBAAS,CAAC,CAAC;IACtF,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,WAAW,CAAC,0BAA0B,CAAC,CAAC;IACzE,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC;AAED,yBAAgC,MAAgC;IAC9D,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAoB,EAAE,CAAC,KAAK,YAAY,iBAAO,CAAC,CAAC;IACxF,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,WAAW,CAAC,gCAAgC,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;AACvB,CAAC;AAED,2BAAkC,MAAc;IAC9C,OAAO,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,6BAAe,CAAC,CAAC;AAChF,CAAC;AAED;;GAEG;AACH,uBAA8B,MAAc;IAC1C,OAAO,MAAM,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC","sourcesContent":["import { AbstractToken, ExpressionSource } from '../tokens/AbstractToken';\nimport { CodeToken } from '../tokens/code/CodeToken';\nimport { JSToken } from '../tokens/code/JSToken';\nimport { FUNCTION_PREFIX } from '../tokens/code/PrefixToken';\n\nexport function stringify(source: ExpressionSource): string {\n let text: string;\n if (typeof source === 'string') {\n text = source;\n } else {\n text = source.map((token) => token.raw()).join('');\n }\n return text;\n}\n\nexport function codeToken(tokens: readonly AbstractToken[]): CodeToken {\n const code = tokens.filter((token): token is CodeToken => token instanceof CodeToken);\n if (code.length !== 1) throw new SyntaxError('Expected one code token.');\n return code[0];\n}\n\nexport function javascriptToken(tokens: readonly AbstractToken[]): JSToken {\n const javascript = tokens.filter((token): token is JSToken => token instanceof JSToken);\n if (javascript.length !== 1) {\n throw new SyntaxError('Expected one JavaScript token.');\n }\n return javascript[0];\n}\n\nexport function hasFunctionPrefix(source: string): boolean {\n return source.slice(leadingTrivia(source).length).startsWith(FUNCTION_PREFIX);\n}\n\n/**\n * Whitespace and comments before a Journey prefix remain original source text.\n */\nexport function leadingTrivia(source: string): string {\n return source.match(/^(?:\\s+|\\/\\*[\\s\\S]*?\\*\\/|\\/\\/[^\\r\\n]*(?:\\r?\\n|$))*/)[0];\n}\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatValue = formatValue;
|
|
4
|
+
exports.formatValueAsync = formatValueAsync;
|
|
5
|
+
/**
|
|
6
|
+
* Format an expression with a specific format.
|
|
7
|
+
*/
|
|
8
|
+
function formatValue(value, formatter, format) {
|
|
9
|
+
if (value == null) {
|
|
10
|
+
return '';
|
|
11
|
+
}
|
|
12
|
+
else if ((formatter === null || formatter === void 0 ? void 0 : formatter.format) != null) {
|
|
13
|
+
return formatter.format(value, format !== null && format !== void 0 ? format : undefined);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
// This should generally not happen. However, we still try to handle it gracefully.
|
|
17
|
+
// This is useful for tests where we don't want to define the type for every variable.
|
|
18
|
+
return value.toString();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Resolve an object's asynchronous display value before falling back to its type formatter.
|
|
23
|
+
*/
|
|
24
|
+
async function formatValueAsync(value, formatter, format) {
|
|
25
|
+
let formatted;
|
|
26
|
+
if (value != null && typeof value._display === 'function') {
|
|
27
|
+
formatted = await value._display();
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
formatted = formatValue(value, formatter, format);
|
|
31
|
+
}
|
|
32
|
+
return formatted;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=valueFormatting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valueFormatting.js","sourceRoot":"","sources":["../../src/utils/valueFormatting.ts"],"names":[],"mappings":";;;;AAEA;;GAEG;AACH,qBAA4B,KAAU,EAAE,SAA2B,EAAE,MAAsB;IACzF,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACZ,CAAC;SAAM,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,KAAI,IAAI,EAAE,CAAC;QACrC,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,SAAS,CAAC,CAAC;IACtD,CAAC;SAAM,CAAC;QACN,mFAAmF;QACnF,sFAAsF;QACtF,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;AACH,CAAC;AAED;;GAEG;AACI,KAAK,2BACV,KAAU,EACV,SAA2B,EAC3B,MAAsB;IAEtB,IAAI,SAAiB,CAAC;IACtB,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC1D,SAAS,GAAG,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;IACrC,CAAC;SAAM,CAAC;QACN,SAAS,GAAG,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { Formatter } from '@ja-platform/parser-type-system';\n\n/**\n * Format an expression with a specific format.\n */\nexport function formatValue(value: any, formatter: Formatter | null, format?: string | null): string {\n if (value == null) {\n return '';\n } else if (formatter?.format != null) {\n return formatter.format(value, format ?? undefined);\n } else {\n // This should generally not happen. However, we still try to handle it gracefully.\n // This is useful for tests where we don't want to define the type for every variable.\n return value.toString();\n }\n}\n\n/**\n * Resolve an object's asynchronous display value before falling back to its type formatter.\n */\nexport async function formatValueAsync(\n value: any,\n formatter: Formatter | null,\n format?: string | null\n): Promise<string> {\n let formatted: string;\n if (value != null && typeof value._display === 'function') {\n formatted = await value._display();\n } else {\n formatted = formatValue(value, formatter, format);\n }\n return formatted;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ja-platform/parser-expressions",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
"engines": {
|
|
4
|
+
"node": "^22.19.0 || ^24.11.0 || >=26.0.0"
|
|
5
|
+
},
|
|
6
|
+
"version": "7.1.0",
|
|
7
|
+
"description": "JourneyApps Platform expression parsing, representation and reference analysis",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"typings": "./dist/@types/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@babel/parser": "^8.0.7",
|
|
15
|
+
"@babel/traverse": "^8.0.7",
|
|
16
|
+
"@babel/types": "^8.0.6",
|
|
17
|
+
"@ja-platform/parser-type-system": "1.0.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/babel__traverse": "^7.28.0",
|
|
21
|
+
"vitest": "^5.0.5",
|
|
22
|
+
"@vitest/browser": "^5.0.5",
|
|
23
|
+
"@vitest/browser-webdriverio": "^5.0.0",
|
|
24
|
+
"webdriverio": "^10.1.0"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"registry": "https://registry.npmjs.org/",
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/journeyapps-platform/parser.git",
|
|
33
|
+
"directory": "packages/expressions"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"test": "pnpm test:node && pnpm test:browser",
|
|
37
|
+
"test:browser": "vitest --run --configLoader runner --config vitest.config.browser.ts",
|
|
38
|
+
"test:node": "vitest --run --configLoader runner --config vitest.config.unit.ts"
|
|
39
|
+
}
|
|
6
40
|
}
|