@lionweb/cli 0.9.1 → 0.10.0-alpha.1
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/serialization/diff-command.d.ts.map +1 -1
- package/dist/serialization/diff-command.js +3 -2
- package/dist/serialization/diff-command.js.map +1 -1
- package/dist/serialization/measure-command.d.ts.map +1 -1
- package/dist/serialization/measure-command.js +3 -2
- package/dist/serialization/measure-command.js.map +1 -1
- package/dist/serialization/repair-command.d.ts.map +1 -1
- package/dist/serialization/repair-command.js +3 -2
- package/dist/serialization/repair-command.js.map +1 -1
- package/dist/serialization/sort-command.d.ts.map +1 -1
- package/dist/serialization/sort-command.js +3 -2
- package/dist/serialization/sort-command.js.map +1 -1
- package/package.json +8 -7
- package/src/serialization/diff-command.ts +3 -2
- package/src/serialization/measure-command.ts +3 -2
- package/src/serialization/repair-command.ts +3 -2
- package/src/serialization/sort-command.ts +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-command.d.ts","sourceRoot":"","sources":["../../src/serialization/diff-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diff-command.d.ts","sourceRoot":"","sources":["../../src/serialization/diff-command.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,uBAAuB,GAAU,UAAU,MAAM,EAAE,WAAW,MAAM,EAAE,UAAU,MAAM,kBAIlG,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { readSerializationChunk, writeJsonAsFile } from "@lionweb/utilities";
|
|
2
1
|
import { LionWebJsonDiff } from "@lionweb/json-diff";
|
|
2
|
+
import { writeJsonAsFileSync } from "@lionweb/node-utils";
|
|
3
|
+
import { readSerializationChunk } from "@lionweb/utilities";
|
|
3
4
|
export const diffSerializationChunks = async (leftPath, rightPath, diffPath) => {
|
|
4
5
|
const differ = new LionWebJsonDiff();
|
|
5
6
|
differ.diffLwChunk(await readSerializationChunk(leftPath), await readSerializationChunk(rightPath));
|
|
6
|
-
|
|
7
|
+
writeJsonAsFileSync(diffPath, differ.diffResult.changes);
|
|
7
8
|
};
|
|
8
9
|
// TODO re-interpret diff of two languages in a LionCore/M3-specific way, i.e. in terms of domain-specific ∂s
|
|
9
10
|
//# sourceMappingURL=diff-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-command.js","sourceRoot":"","sources":["../../src/serialization/diff-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"diff-command.js","sourceRoot":"","sources":["../../src/serialization/diff-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAAE,QAAgB,EAAE,SAAiB,EAAE,QAAgB,EAAE,EAAE;IACnG,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAA;IACpC,MAAM,CAAC,WAAW,CAAC,MAAM,sBAAsB,CAAC,QAAQ,CAAC,EAAE,MAAM,sBAAsB,CAAC,SAAS,CAAC,CAAC,CAAA;IACnG,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;AAC5D,CAAC,CAAA;AAED,8GAA8G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measure-command.d.ts","sourceRoot":"","sources":["../../src/serialization/measure-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"measure-command.d.ts","sourceRoot":"","sources":["../../src/serialization/measure-command.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,qBAAqB,GAAU,MAAM,MAAM,EAAE,kBAMzD,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { writeJsonAsFileSync } from "@lionweb/node-utils";
|
|
2
|
+
import { measure, readSerializationChunk, tryReadAllAsLanguages } from "@lionweb/utilities";
|
|
2
3
|
import { extname } from "path";
|
|
3
4
|
import { separate } from "../language-aware-args.js";
|
|
4
5
|
export const executeMeasureCommand = async (args) => {
|
|
@@ -12,7 +13,7 @@ const measureSerializationChunk = async (path, languages) => {
|
|
|
12
13
|
const chunk = await readSerializationChunk(path);
|
|
13
14
|
const extLessPath = path.substring(0, path.length - extname(path).length);
|
|
14
15
|
const metricsPath = extLessPath + ".metrics.json";
|
|
15
|
-
|
|
16
|
+
writeJsonAsFileSync(metricsPath, measure(chunk, languages));
|
|
16
17
|
console.log(`Wrote metrics for ${path} --> ${metricsPath}`);
|
|
17
18
|
};
|
|
18
19
|
//# sourceMappingURL=measure-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measure-command.js","sourceRoot":"","sources":["../../src/serialization/measure-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"measure-command.js","sourceRoot":"","sources":["../../src/serialization/measure-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC3F,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAEpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,EAAE,IAAc,EAAE,EAAE;IAC1D,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;IACpD,MAAM,SAAS,GAAG,MAAM,qBAAqB,CAAC,aAAa,CAAC,CAAA;IAC5D,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QAC3B,yBAAyB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;IACnD,CAAC,CAAC,CAAA;AACN,CAAC,CAAA;AAED,MAAM,yBAAyB,GAAG,KAAK,EAAE,IAAY,EAAE,SAAqB,EAAE,EAAE;IAC5E,MAAM,KAAK,GAAG,MAAM,sBAAsB,CAAC,IAAI,CAAC,CAAA;IAChD,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAA;IACzE,MAAM,WAAW,GAAG,WAAW,GAAG,eAAe,CAAA;IACjD,mBAAmB,CAAC,WAAW,EAAE,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAA;IAC3D,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,QAAQ,WAAW,EAAE,CAAC,CAAA;AAC/D,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repair-command.d.ts","sourceRoot":"","sources":["../../src/serialization/repair-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"repair-command.d.ts","sourceRoot":"","sources":["../../src/serialization/repair-command.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,0BAA0B,GAAU,MAAM,MAAM,kBAI5D,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { writeJsonAsFileSync } from "@lionweb/node-utils";
|
|
2
|
+
import { orderedSerializationChunk, readSerializationChunk } from "@lionweb/utilities";
|
|
2
3
|
export const repairSerializationChunkAt = async (path) => {
|
|
3
4
|
const chunk = await readSerializationChunk(path);
|
|
4
|
-
|
|
5
|
+
writeJsonAsFileSync(path, orderedSerializationChunk(chunk));
|
|
5
6
|
console.log(`ordered(/"repaired"): ${path}`);
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=repair-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repair-command.js","sourceRoot":"","sources":["../../src/serialization/repair-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"repair-command.js","sourceRoot":"","sources":["../../src/serialization/repair-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEtF,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE;IAC7D,MAAM,KAAK,GAAG,MAAM,sBAAsB,CAAC,IAAI,CAAC,CAAA;IAChD,mBAAmB,CAAC,IAAI,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAA;IAC3D,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAA;AAChD,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-command.d.ts","sourceRoot":"","sources":["../../src/serialization/sort-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sort-command.d.ts","sourceRoot":"","sources":["../../src/serialization/sort-command.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB,GAAU,MAAM,MAAM,kBAM1D,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { writeJsonAsFileSync } from "@lionweb/node-utils";
|
|
2
|
+
import { readSerializationChunk, sortedSerializationChunk } from "@lionweb/utilities";
|
|
2
3
|
import { extname } from "path";
|
|
3
4
|
export const sortSerializationChunkAt = async (path) => {
|
|
4
5
|
const chunk = await readSerializationChunk(path);
|
|
5
6
|
const extLessPath = path.substring(0, path.length - extname(path).length);
|
|
6
7
|
const sortedJson = sortedSerializationChunk(chunk);
|
|
7
|
-
|
|
8
|
+
writeJsonAsFileSync(extLessPath + ".sorted.json", sortedJson);
|
|
8
9
|
console.log(`sorted: "${path}" -> ${extLessPath}`);
|
|
9
10
|
};
|
|
10
11
|
//# sourceMappingURL=sort-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-command.js","sourceRoot":"","sources":["../../src/serialization/sort-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sort-command.js","sourceRoot":"","sources":["../../src/serialization/sort-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AACrF,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAE9B,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE;IAC3D,MAAM,KAAK,GAAG,MAAM,sBAAsB,CAAC,IAAI,CAAC,CAAA;IAChD,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAA;IACzE,MAAM,UAAU,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAA;IAClD,mBAAmB,CAAC,WAAW,GAAG,cAAc,EAAE,UAAU,CAAC,CAAA;IAC7D,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,QAAQ,WAAW,EAAE,CAAC,CAAA;AACtD,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lionweb/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0-alpha.1",
|
|
4
4
|
"description": "LionWeb CLI for {Java|Type}Script",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lionweb-cli": "./dist/lionweb-cli.js"
|
|
@@ -29,11 +29,12 @@
|
|
|
29
29
|
"release": "npm publish"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@lionweb/class-core-generator": "0.
|
|
33
|
-
"@lionweb/core": "0.
|
|
34
|
-
"@lionweb/json-diff": "0.
|
|
35
|
-
"@lionweb/
|
|
36
|
-
"@lionweb/
|
|
37
|
-
"@lionweb/
|
|
32
|
+
"@lionweb/class-core-generator": "0.10.0-alpha.1",
|
|
33
|
+
"@lionweb/core": "0.10.0-alpha.1",
|
|
34
|
+
"@lionweb/json-diff": "0.10.0-alpha.1",
|
|
35
|
+
"@lionweb/node-utils": "0.10.0-alpha.1",
|
|
36
|
+
"@lionweb/ts-utils": "0.10.0-alpha.1",
|
|
37
|
+
"@lionweb/utilities": "0.10.0-alpha.1",
|
|
38
|
+
"@lionweb/validation": "0.10.0-alpha.1"
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { readSerializationChunk, writeJsonAsFile } from "@lionweb/utilities"
|
|
2
1
|
import { LionWebJsonDiff } from "@lionweb/json-diff"
|
|
2
|
+
import { writeJsonAsFileSync } from "@lionweb/node-utils"
|
|
3
|
+
import { readSerializationChunk } from "@lionweb/utilities"
|
|
3
4
|
|
|
4
5
|
export const diffSerializationChunks = async (leftPath: string, rightPath: string, diffPath: string) => {
|
|
5
6
|
const differ = new LionWebJsonDiff()
|
|
6
7
|
differ.diffLwChunk(await readSerializationChunk(leftPath), await readSerializationChunk(rightPath))
|
|
7
|
-
|
|
8
|
+
writeJsonAsFileSync(diffPath, differ.diffResult.changes)
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
// TODO re-interpret diff of two languages in a LionCore/M3-specific way, i.e. in terms of domain-specific ∂s
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Language } from "@lionweb/core"
|
|
2
|
-
import {
|
|
2
|
+
import { writeJsonAsFileSync } from "@lionweb/node-utils"
|
|
3
|
+
import { measure, readSerializationChunk, tryReadAllAsLanguages } from "@lionweb/utilities"
|
|
3
4
|
import { extname } from "path"
|
|
4
5
|
import { separate } from "../language-aware-args.js"
|
|
5
6
|
|
|
@@ -15,6 +16,6 @@ const measureSerializationChunk = async (path: string, languages: Language[]) =>
|
|
|
15
16
|
const chunk = await readSerializationChunk(path)
|
|
16
17
|
const extLessPath = path.substring(0, path.length - extname(path).length)
|
|
17
18
|
const metricsPath = extLessPath + ".metrics.json"
|
|
18
|
-
|
|
19
|
+
writeJsonAsFileSync(metricsPath, measure(chunk, languages))
|
|
19
20
|
console.log(`Wrote metrics for ${path} --> ${metricsPath}`)
|
|
20
21
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { writeJsonAsFileSync } from "@lionweb/node-utils"
|
|
2
|
+
import { orderedSerializationChunk, readSerializationChunk } from "@lionweb/utilities"
|
|
2
3
|
|
|
3
4
|
export const repairSerializationChunkAt = async (path: string) => {
|
|
4
5
|
const chunk = await readSerializationChunk(path)
|
|
5
|
-
|
|
6
|
+
writeJsonAsFileSync(path, orderedSerializationChunk(chunk))
|
|
6
7
|
console.log(`ordered(/"repaired"): ${path}`)
|
|
7
8
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { writeJsonAsFileSync } from "@lionweb/node-utils"
|
|
2
|
+
import { readSerializationChunk, sortedSerializationChunk } from "@lionweb/utilities"
|
|
2
3
|
import { extname } from "path"
|
|
3
4
|
|
|
4
5
|
export const sortSerializationChunkAt = async (path: string) => {
|
|
5
6
|
const chunk = await readSerializationChunk(path)
|
|
6
7
|
const extLessPath = path.substring(0, path.length - extname(path).length)
|
|
7
8
|
const sortedJson = sortedSerializationChunk(chunk)
|
|
8
|
-
|
|
9
|
+
writeJsonAsFileSync(extLessPath + ".sorted.json", sortedJson)
|
|
9
10
|
console.log(`sorted: "${path}" -> ${extLessPath}`)
|
|
10
11
|
}
|