@platforma-sdk/tengo-builder 2.4.24 → 2.4.26
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/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/commands/build.cjs +106 -150
- package/dist/commands/build.cjs.map +1 -1
- package/dist/commands/build.d.ts +15 -10
- package/dist/commands/build.js +101 -126
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/check.cjs +32 -36
- package/dist/commands/check.cjs.map +1 -1
- package/dist/commands/check.d.ts +13 -8
- package/dist/commands/check.js +30 -33
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/dump/artifacts.cjs +22 -22
- package/dist/commands/dump/artifacts.cjs.map +1 -1
- package/dist/commands/dump/artifacts.d.ts +13 -8
- package/dist/commands/dump/artifacts.js +20 -19
- package/dist/commands/dump/artifacts.js.map +1 -1
- package/dist/commands/dump/software.cjs +19 -21
- package/dist/commands/dump/software.cjs.map +1 -1
- package/dist/commands/dump/software.d.ts +12 -7
- package/dist/commands/dump/software.js +17 -18
- package/dist/commands/dump/software.js.map +1 -1
- package/dist/commands/test.cjs +32 -33
- package/dist/commands/test.cjs.map +1 -1
- package/dist/commands/test.d.ts +13 -8
- package/dist/commands/test.js +30 -30
- package/dist/commands/test.js.map +1 -1
- package/dist/compiler/artifactset.cjs +59 -68
- package/dist/compiler/artifactset.cjs.map +1 -1
- package/dist/compiler/artifactset.js +60 -66
- package/dist/compiler/artifactset.js.map +1 -1
- package/dist/compiler/compiler.cjs +241 -314
- package/dist/compiler/compiler.cjs.map +1 -1
- package/dist/compiler/compiler.js +241 -312
- package/dist/compiler/compiler.js.map +1 -1
- package/dist/compiler/compileroptions.cjs +16 -35
- package/dist/compiler/compileroptions.cjs.map +1 -1
- package/dist/compiler/compileroptions.js +17 -33
- package/dist/compiler/compileroptions.js.map +1 -1
- package/dist/compiler/main.cjs +258 -334
- package/dist/compiler/main.cjs.map +1 -1
- package/dist/compiler/main.js +256 -311
- package/dist/compiler/main.js.map +1 -1
- package/dist/compiler/package.cjs +21 -35
- package/dist/compiler/package.cjs.map +1 -1
- package/dist/compiler/package.js +21 -34
- package/dist/compiler/package.js.map +1 -1
- package/dist/compiler/source.cjs +239 -308
- package/dist/compiler/source.cjs.map +1 -1
- package/dist/compiler/source.js +239 -304
- package/dist/compiler/source.js.map +1 -1
- package/dist/compiler/template.cjs +30 -35
- package/dist/compiler/template.cjs.map +1 -1
- package/dist/compiler/template.js +29 -33
- package/dist/compiler/template.js.map +1 -1
- package/dist/compiler/util.cjs +40 -61
- package/dist/compiler/util.cjs.map +1 -1
- package/dist/compiler/util.js +36 -39
- package/dist/compiler/util.js.map +1 -1
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -11
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/dist/shared/basecmd.cjs +42 -33
- package/dist/shared/basecmd.cjs.map +1 -1
- package/dist/shared/basecmd.js +41 -31
- package/dist/shared/basecmd.js.map +1 -1
- package/dist/shared/dump.cjs +73 -107
- package/dist/shared/dump.cjs.map +1 -1
- package/dist/shared/dump.js +73 -105
- package/dist/shared/dump.js.map +1 -1
- package/dist/shared/proc.cjs +22 -18
- package/dist/shared/proc.cjs.map +1 -1
- package/dist/shared/proc.js +21 -16
- package/dist/shared/proc.js.map +1 -1
- package/package.json +10 -10
- package/dist/commands/build.d.ts.map +0 -1
- package/dist/commands/check.d.ts.map +0 -1
- package/dist/commands/dump/artifacts.d.ts.map +0 -1
- package/dist/commands/dump/software.d.ts.map +0 -1
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/compiler/artifactset.d.ts +0 -24
- package/dist/compiler/artifactset.d.ts.map +0 -1
- package/dist/compiler/compiler.d.ts +0 -42
- package/dist/compiler/compiler.d.ts.map +0 -1
- package/dist/compiler/compileroptions.d.ts +0 -6
- package/dist/compiler/compileroptions.d.ts.map +0 -1
- package/dist/compiler/main.d.ts +0 -35
- package/dist/compiler/main.d.ts.map +0 -1
- package/dist/compiler/package.d.ts +0 -44
- package/dist/compiler/package.d.ts.map +0 -1
- package/dist/compiler/source.d.ts +0 -54
- package/dist/compiler/source.d.ts.map +0 -1
- package/dist/compiler/template.d.ts +0 -22
- package/dist/compiler/template.d.ts.map +0 -1
- package/dist/compiler/test.artifacts.d.ts +0 -47
- package/dist/compiler/test.artifacts.d.ts.map +0 -1
- package/dist/compiler/util.d.ts +0 -8
- package/dist/compiler/util.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/shared/basecmd.d.ts +0 -12
- package/dist/shared/basecmd.d.ts.map +0 -1
- package/dist/shared/dump.d.ts +0 -6
- package/dist/shared/dump.d.ts.map +0 -1
- package/dist/shared/proc.d.ts +0 -5
- package/dist/shared/proc.d.ts.map +0 -1
|
@@ -1,71 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { assertNever } from "./util.js";
|
|
2
|
+
import { artifactKey } from "./package.js";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
4
|
+
//#region src/compiler/artifactset.ts
|
|
5
|
+
var ArtifactMap = class {
|
|
6
|
+
map = /* @__PURE__ */ new Map();
|
|
7
|
+
constructor(nameExtractor) {
|
|
8
|
+
this.nameExtractor = nameExtractor;
|
|
9
|
+
}
|
|
10
|
+
add(obj, replace = true) {
|
|
11
|
+
const key = artifactKey(this.nameExtractor(obj));
|
|
12
|
+
const ret = this.map.get(key);
|
|
13
|
+
if (ret && !replace) return ret;
|
|
14
|
+
this.map.set(key, obj);
|
|
15
|
+
return ret;
|
|
16
|
+
}
|
|
17
|
+
get(name) {
|
|
18
|
+
return this.map.get(artifactKey(name));
|
|
19
|
+
}
|
|
20
|
+
get array() {
|
|
21
|
+
const ret = [];
|
|
22
|
+
this.map.forEach((obj) => ret.push(obj));
|
|
23
|
+
return ret;
|
|
24
|
+
}
|
|
25
|
+
forEach(callback) {
|
|
26
|
+
this.map.forEach((v) => callback(v, this.nameExtractor(v)));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
30
29
|
function createArtifactNameSet() {
|
|
31
|
-
|
|
30
|
+
return new ArtifactMap((obj) => obj);
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return ret;
|
|
64
|
-
}
|
|
65
|
-
forEach(mode, callback) {
|
|
66
|
-
this.dist.forEach((obj, k) => callback(this.get(mode, k) ?? obj, k));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
33
|
+
* ArtifactStore is a store for artifacts that are compiled for different modes.
|
|
34
|
+
* It is used to collect all artifacts from the dependency tree and compile them for different modes.
|
|
35
|
+
*/
|
|
36
|
+
var ArtifactStore = class {
|
|
37
|
+
dist;
|
|
38
|
+
constructor(nameExtractor) {
|
|
39
|
+
this.dist = new ArtifactMap(nameExtractor);
|
|
40
|
+
}
|
|
41
|
+
add(mode, obj, replace = true) {
|
|
42
|
+
switch (mode) {
|
|
43
|
+
case "dist": return this.dist.add(obj, replace);
|
|
44
|
+
default: assertNever(mode);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
get(mode, name) {
|
|
48
|
+
switch (mode) {
|
|
49
|
+
case "dist": return this.dist.get(name);
|
|
50
|
+
default: assertNever(mode);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
array(mode) {
|
|
54
|
+
const ret = [];
|
|
55
|
+
this.forEach(mode, (obj) => ret.push(obj));
|
|
56
|
+
return ret;
|
|
57
|
+
}
|
|
58
|
+
forEach(mode, callback) {
|
|
59
|
+
this.dist.forEach((obj, k) => callback(this.get(mode, k) ?? obj, k));
|
|
60
|
+
}
|
|
61
|
+
};
|
|
69
62
|
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
//#endregion
|
|
64
|
+
export { ArtifactStore, createArtifactNameSet };
|
|
65
|
+
//# sourceMappingURL=artifactset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifactset.js","sources":["../../src/compiler/artifactset.ts"],"sourcesContent":["import type { CompileMode, TypedArtifactName } from \"./package\";\nimport { artifactKey } from \"./package\";\nimport { assertNever } from \"./util\";\n\nexport class ArtifactMap<T> {\n private readonly map = new Map<string, T>();\n\n constructor(private readonly nameExtractor: (obj: T) => TypedArtifactName) {}\n\n add(obj: T, replace: boolean = true): T | undefined {\n const key = artifactKey(this.nameExtractor(obj));\n const ret = this.map.get(key);\n if (ret && !replace) return ret;\n this.map.set(key, obj);\n return ret;\n }\n\n get(name: TypedArtifactName): T | undefined {\n return this.map.get(artifactKey(name));\n }\n\n get array(): T[] {\n const ret: T[] = [];\n this.map.forEach((obj) => ret.push(obj));\n return ret;\n }\n\n forEach(callback: (value: T, key: TypedArtifactName) => void) {\n this.map.forEach((v) => callback(v, this.nameExtractor(v)));\n }\n}\n\nexport function createArtifactNameSet(): ArtifactMap<TypedArtifactName> {\n return new ArtifactMap<TypedArtifactName>((obj) => obj);\n}\n\n/**\n * ArtifactStore is a store for artifacts that are compiled for different modes.\n * It is used to collect all artifacts from the dependency tree and compile them for different modes.\n */\nexport class ArtifactStore<T> {\n // private readonly dev: ArtifactMap<T>;\n private readonly dist: ArtifactMap<T>;\n\n constructor(nameExtractor: (obj: T) => TypedArtifactName) {\n // this.dev = new ArtifactMap<T>(nameExtractor);\n this.dist = new ArtifactMap<T>(nameExtractor);\n }\n\n add(mode: CompileMode, obj: T, replace: boolean = true): T | undefined {\n switch (mode) {\n case \"dist\":\n return this.dist.add(obj, replace);\n\n default:\n assertNever(mode);\n }\n }\n\n get(mode: CompileMode, name: TypedArtifactName): T | undefined {\n switch (mode) {\n case \"dist\":\n return this.dist.get(name);\n\n default:\n assertNever(mode);\n }\n }\n\n array(mode: CompileMode): T[] {\n const ret: T[] = [];\n this.forEach(mode, (obj) => ret.push(obj));\n return ret;\n }\n\n forEach(mode: CompileMode, callback: (value: T, key: TypedArtifactName) => void) {\n this.dist.forEach((obj, k) => callback(this.get(mode, k) ?? obj, k));\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"artifactset.js","names":[],"sources":["../../src/compiler/artifactset.ts"],"sourcesContent":["import type { CompileMode, TypedArtifactName } from \"./package\";\nimport { artifactKey } from \"./package\";\nimport { assertNever } from \"./util\";\n\nexport class ArtifactMap<T> {\n private readonly map = new Map<string, T>();\n\n constructor(private readonly nameExtractor: (obj: T) => TypedArtifactName) {}\n\n add(obj: T, replace: boolean = true): T | undefined {\n const key = artifactKey(this.nameExtractor(obj));\n const ret = this.map.get(key);\n if (ret && !replace) return ret;\n this.map.set(key, obj);\n return ret;\n }\n\n get(name: TypedArtifactName): T | undefined {\n return this.map.get(artifactKey(name));\n }\n\n get array(): T[] {\n const ret: T[] = [];\n this.map.forEach((obj) => ret.push(obj));\n return ret;\n }\n\n forEach(callback: (value: T, key: TypedArtifactName) => void) {\n this.map.forEach((v) => callback(v, this.nameExtractor(v)));\n }\n}\n\nexport function createArtifactNameSet(): ArtifactMap<TypedArtifactName> {\n return new ArtifactMap<TypedArtifactName>((obj) => obj);\n}\n\n/**\n * ArtifactStore is a store for artifacts that are compiled for different modes.\n * It is used to collect all artifacts from the dependency tree and compile them for different modes.\n */\nexport class ArtifactStore<T> {\n // private readonly dev: ArtifactMap<T>;\n private readonly dist: ArtifactMap<T>;\n\n constructor(nameExtractor: (obj: T) => TypedArtifactName) {\n // this.dev = new ArtifactMap<T>(nameExtractor);\n this.dist = new ArtifactMap<T>(nameExtractor);\n }\n\n add(mode: CompileMode, obj: T, replace: boolean = true): T | undefined {\n switch (mode) {\n case \"dist\":\n return this.dist.add(obj, replace);\n\n default:\n assertNever(mode);\n }\n }\n\n get(mode: CompileMode, name: TypedArtifactName): T | undefined {\n switch (mode) {\n case \"dist\":\n return this.dist.get(name);\n\n default:\n assertNever(mode);\n }\n }\n\n array(mode: CompileMode): T[] {\n const ret: T[] = [];\n this.forEach(mode, (obj) => ret.push(obj));\n return ret;\n }\n\n forEach(mode: CompileMode, callback: (value: T, key: TypedArtifactName) => void) {\n this.dist.forEach((obj, k) => callback(this.get(mode, k) ?? obj, k));\n }\n}\n"],"mappings":";;;;AAIA,IAAa,cAAb,MAA4B;CAC1B,AAAiB,sBAAM,IAAI,KAAgB;CAE3C,YAAY,AAAiB,eAA8C;EAA9C;;CAE7B,IAAI,KAAQ,UAAmB,MAAqB;EAClD,MAAM,MAAM,YAAY,KAAK,cAAc,IAAI,CAAC;EAChD,MAAM,MAAM,KAAK,IAAI,IAAI,IAAI;AAC7B,MAAI,OAAO,CAAC,QAAS,QAAO;AAC5B,OAAK,IAAI,IAAI,KAAK,IAAI;AACtB,SAAO;;CAGT,IAAI,MAAwC;AAC1C,SAAO,KAAK,IAAI,IAAI,YAAY,KAAK,CAAC;;CAGxC,IAAI,QAAa;EACf,MAAM,MAAW,EAAE;AACnB,OAAK,IAAI,SAAS,QAAQ,IAAI,KAAK,IAAI,CAAC;AACxC,SAAO;;CAGT,QAAQ,UAAsD;AAC5D,OAAK,IAAI,SAAS,MAAM,SAAS,GAAG,KAAK,cAAc,EAAE,CAAC,CAAC;;;AAI/D,SAAgB,wBAAwD;AACtE,QAAO,IAAI,aAAgC,QAAQ,IAAI;;;;;;AAOzD,IAAa,gBAAb,MAA8B;CAE5B,AAAiB;CAEjB,YAAY,eAA8C;AAExD,OAAK,OAAO,IAAI,YAAe,cAAc;;CAG/C,IAAI,MAAmB,KAAQ,UAAmB,MAAqB;AACrE,UAAQ,MAAR;GACE,KAAK,OACH,QAAO,KAAK,KAAK,IAAI,KAAK,QAAQ;GAEpC,QACE,aAAY,KAAK;;;CAIvB,IAAI,MAAmB,MAAwC;AAC7D,UAAQ,MAAR;GACE,KAAK,OACH,QAAO,KAAK,KAAK,IAAI,KAAK;GAE5B,QACE,aAAY,KAAK;;;CAIvB,MAAM,MAAwB;EAC5B,MAAM,MAAW,EAAE;AACnB,OAAK,QAAQ,OAAO,QAAQ,IAAI,KAAK,IAAI,CAAC;AAC1C,SAAO;;CAGT,QAAQ,MAAmB,UAAsD;AAC/E,OAAK,KAAK,SAAS,KAAK,MAAM,SAAS,KAAK,IAAI,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC"}
|