@lionweb/textgen-utils 0.7.0-beta.13 → 0.7.0-beta.15

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.
@@ -1 +1 @@
1
- {"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../src/javascript.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAG7C;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MAGhB,CAAA;AAG7B;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAA;AAErE;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,YAAY,MAAM,EAAE,OAAO,SAAS,EAAE,EAAE,cAAc,QAAQ,eAuBhF,CAAA;AAGT;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,OAAO,WACwB,CAAA"}
1
+ {"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../src/javascript.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAG7C;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MAGhB,CAAA;AAG7B;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAA;AAErE;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,YAAY,MAAM,EAAE,OAAO,SAAS,EAAE,EAAE,cAAc,QAAQ,eAuBhF,CAAA;AAGT;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,OAAO,WACmB,CAAA"}
@@ -14,6 +14,7 @@
14
14
  //
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
+ import { asPrettyJsonString } from "@lionweb/ts-utils";
17
18
  import { indent } from "./general.js";
18
19
  /**
19
20
  * @return a sanitized version of the given string that should be suitable as a valid JavaScript identifier.
@@ -53,5 +54,5 @@ export const switchOrIf = (expression, cases, defaultBlock) => cases.length > 1
53
54
  /**
54
55
  * @return the given JSON as valid TypeScript source, meaning: without quotation marks around object keys.
55
56
  */
56
- export const asTypeScript = (json) => JSON.stringify(json, null, 4).replaceAll(/"(.+?)": /g, `$1: `);
57
+ export const asTypeScript = (json) => asPrettyJsonString(json).replaceAll(/"(.+?)": /g, `$1: `);
57
58
  //# sourceMappingURL=javascript.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"javascript.js","sourceRoot":"","sources":["../src/javascript.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAGtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAU,EAAE,CAClD,GAAG;KACE,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC;KACpB,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AAQ7B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAAkB,EAAE,KAAkB,EAAE,YAAsB,EAAE,EAAE,CACzF,KAAK,CAAC,MAAM,GAAG,CAAC;IACZ,CAAC,CAAC;QACE,WAAW,UAAU,KAAK;QAC1B,MAAM,CAAC;YACH,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,QAAQ,cAAc,YAAY,WAAW,GAAG,CAAC;YAC9F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EAAE,YAAsB,EAAE,EAAE,CACzF,KAAK,CAAC,MAAM,GAAG,CAAC;IACZ,CAAC,CAAC;QACE,WAAW,UAAU,KAAK;QAC1B,MAAM,CAAC;YACH,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,QAAQ,cAAc,YAAY,WAAW,GAAG,CAAC;YAC9F,OAAO,YAAY,KAAK,QAAQ;gBAC5B,CAAC,CAAC,YAAY,YAAY,EAAE;gBAC5B,CAAC,CAAC;oBACE,YAAY;oBACZ,MAAM,CAAC,YAAY,CAAC;oBACpB,GAAG;iBACN;SACR,CAAC;QACF,GAAG;KACN;IACD,CAAC,CAAC;QACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC;YACzC,OAAO,UAAU,QAAQ,cAAc,KAAK;YAC5C,MAAM,CAAC,UAAU,WAAW,GAAG,CAAC;YAChC,GAAG;SACN,CAAC;QACF,YAAY;KACf,CAAA;AAGT;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,EAAE,CAC1C,kBAAkB,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,32 +1,33 @@
1
1
  {
2
- "name": "@lionweb/textgen-utils",
3
- "version": "0.7.0-beta.13",
4
- "description": "Utilities for text generation",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "typings": "dist/index.d.ts",
8
- "type": "module",
9
- "license": "Apache-2.0",
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/LionWeb-io/lionweb-typescript.git"
13
- },
14
- "bugs": {
15
- "url": "https://github.com/LionWeb-io/lionweb-typescript/issues"
16
- },
17
- "scripts": {
18
- "clean": "npx rimraf dist node_modules -g lionweb-textgen-utils-*.tgz",
19
- "build": "tsc",
20
- "lint": "eslint src",
21
- "prep:pre-release": "npm run clean && npm install && npm run build",
22
- "prerelease-alpha": "npm run prep:pre-release",
23
- "release-alpha": "npm publish --tag alpha",
24
- "prerelease-beta": "npm run prep:pre-release",
25
- "release-beta": "npm publish --tag beta",
26
- "prerelease": "npm run prep:pre-release",
27
- "release": "npm publish"
28
- },
29
- "dependencies": {
30
- "littoral-templates": "0.5.0"
31
- }
2
+ "name": "@lionweb/textgen-utils",
3
+ "version": "0.7.0-beta.15",
4
+ "description": "Utilities for text generation",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "typings": "dist/index.d.ts",
8
+ "type": "module",
9
+ "license": "Apache-2.0",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/LionWeb-io/lionweb-typescript.git"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/LionWeb-io/lionweb-typescript/issues"
16
+ },
17
+ "scripts": {
18
+ "clean": "npx rimraf dist node_modules -g lionweb-textgen-utils-*.tgz",
19
+ "build": "tsc",
20
+ "lint": "eslint src",
21
+ "prep:pre-release": "npm run clean && npm install && npm run build",
22
+ "prerelease-alpha": "npm run prep:pre-release",
23
+ "release-alpha": "npm publish --tag alpha",
24
+ "prerelease-beta": "npm run prep:pre-release",
25
+ "release-beta": "npm publish --tag beta",
26
+ "prerelease": "npm run prep:pre-release",
27
+ "release": "npm publish"
28
+ },
29
+ "dependencies": {
30
+ "@lionweb/ts-utils": "0.7.0-beta.15",
31
+ "littoral-templates": "0.5.0"
32
+ }
32
33
  }