@platforma-sdk/tengo-builder 4.0.9 → 4.0.11
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/bin/run.js +5 -10
- package/dist/cli.cjs +27 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +26 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/build.cjs +18 -16
- package/dist/commands/build.cjs.map +1 -1
- package/dist/commands/build.js +16 -14
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/check.cjs +13 -15
- package/dist/commands/check.cjs.map +1 -1
- package/dist/commands/check.js +14 -15
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/dump/artifacts.cjs +10 -15
- package/dist/commands/dump/artifacts.cjs.map +1 -1
- package/dist/commands/dump/artifacts.js +11 -15
- package/dist/commands/dump/artifacts.js.map +1 -1
- package/dist/commands/dump/software.cjs +10 -12
- package/dist/commands/dump/software.cjs.map +1 -1
- package/dist/commands/dump/software.js +11 -12
- package/dist/commands/dump/software.js.map +1 -1
- package/dist/commands/test.cjs +13 -15
- package/dist/commands/test.cjs.map +1 -1
- package/dist/commands/test.js +14 -15
- package/dist/commands/test.js.map +1 -1
- package/dist/compiler/artifactset.cjs +2 -0
- package/dist/compiler/artifactset.cjs.map +1 -1
- package/dist/compiler/artifactset.js +2 -1
- package/dist/compiler/artifactset.js.map +1 -1
- package/dist/compiler/compiler.cjs +1 -0
- package/dist/compiler/compiler.cjs.map +1 -1
- package/dist/compiler/compiler.js +1 -0
- package/dist/compiler/compiler.js.map +1 -1
- package/dist/compiler/compileroptions.cjs +1 -0
- package/dist/compiler/compileroptions.cjs.map +1 -1
- package/dist/compiler/compileroptions.js +1 -1
- package/dist/compiler/compileroptions.js.map +1 -1
- package/dist/compiler/main.cjs +5 -3
- package/dist/compiler/main.cjs.map +1 -1
- package/dist/compiler/main.js +1 -1
- package/dist/compiler/main.js.map +1 -1
- package/dist/compiler/pack_limits.cjs +2 -0
- package/dist/compiler/pack_limits.cjs.map +1 -1
- package/dist/compiler/pack_limits.js +1 -1
- package/dist/compiler/pack_limits.js.map +1 -1
- package/dist/compiler/package.cjs.map +1 -1
- package/dist/compiler/package.js.map +1 -1
- package/dist/compiler/source.cjs +10 -1
- package/dist/compiler/source.cjs.map +1 -1
- package/dist/compiler/source.js +8 -1
- package/dist/compiler/source.js.map +1 -1
- package/dist/compiler/template.cjs +0 -1
- package/dist/compiler/template.cjs.map +1 -1
- package/dist/compiler/template.js.map +1 -1
- package/dist/compiler/util.cjs +3 -3
- package/dist/compiler/util.cjs.map +1 -1
- package/dist/compiler/util.js.map +1 -1
- package/dist/index.cjs +3 -17
- package/dist/index.d.ts +2 -17
- package/dist/index.js +2 -17
- package/dist/shared/basecmd.cjs +33 -45
- package/dist/shared/basecmd.cjs.map +1 -1
- package/dist/shared/basecmd.js +30 -42
- package/dist/shared/basecmd.js.map +1 -1
- package/dist/shared/dump.cjs.map +1 -1
- package/dist/shared/dump.js.map +1 -1
- package/dist/shared/proc.cjs +0 -1
- package/dist/shared/proc.cjs.map +1 -1
- package/dist/shared/proc.js.map +1 -1
- package/package.json +9 -20
- package/src/cli.ts +27 -0
- package/src/commands/build.ts +16 -12
- package/src/commands/check.ts +14 -19
- package/src/commands/dump/artifacts.ts +11 -14
- package/src/commands/dump/software.ts +11 -13
- package/src/commands/test.ts +14 -15
- package/src/index.ts +1 -15
- package/src/shared/basecmd.ts +36 -32
- package/dist/commands/build.d.ts +0 -18
- package/dist/commands/build.d.ts.map +0 -1
- package/dist/commands/check.d.ts +0 -16
- package/dist/commands/check.d.ts.map +0 -1
- package/dist/commands/dump/artifacts.d.ts +0 -16
- package/dist/commands/dump/artifacts.d.ts.map +0 -1
- package/dist/commands/dump/software.d.ts +0 -15
- package/dist/commands/dump/software.d.ts.map +0 -1
- package/dist/commands/test.d.ts +0 -16
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/src/shared/basecmd.ts
CHANGED
|
@@ -1,37 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Command, Option } from "commander";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
3
|
+
/** Add one or more groups of options to a command, preserving group order. */
|
|
4
|
+
export function addOptions(cmd: Command, ...optionGroups: Option[][]): Command {
|
|
5
|
+
for (const group of optionGroups) {
|
|
6
|
+
for (const opt of group) cmd.addOption(opt);
|
|
7
|
+
}
|
|
8
|
+
return cmd;
|
|
9
|
+
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
// Comma-delimited, repeatable collector: `--tags-additional-args -e,-x` and/or
|
|
12
|
+
// repeated occurrences accumulate into a single string[].
|
|
13
|
+
function collectComma(value: string, previous: string[]): string[] {
|
|
14
|
+
return previous.concat(value.split(","));
|
|
15
|
+
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
export const GlobalOptions = (): Option[] => [
|
|
18
|
+
new Option("--log-level <level>", "logging level")
|
|
19
|
+
.choices(["error", "warn", "info", "debug"])
|
|
20
|
+
.default("info"),
|
|
21
|
+
];
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
export const CtagsOptions = (): Option[] => [
|
|
24
|
+
new Option("--generate-tags", "generate tags, default false").default(false),
|
|
25
|
+
new Option(
|
|
26
|
+
"--tags-file <path>",
|
|
27
|
+
'where to put ".tags" file, it should be a root of VS Code project',
|
|
28
|
+
).default("../../.tags"), // usually a user opens a directory with all blocks
|
|
29
|
+
new Option(
|
|
30
|
+
"--tags-additional-args <args>",
|
|
31
|
+
"additional flags for universal-ctags command: e.g. -e for emacs",
|
|
32
|
+
)
|
|
33
|
+
.argParser(collectComma)
|
|
34
|
+
.default([] as string[]),
|
|
35
|
+
];
|
|
29
36
|
|
|
30
|
-
export const
|
|
31
|
-
type
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
default: "all",
|
|
36
|
-
}),
|
|
37
|
-
};
|
|
37
|
+
export const ArtifactTypeOptions = (): Option[] => [
|
|
38
|
+
new Option("-t, --type <type>", "artifact type")
|
|
39
|
+
.choices(["all", "library", "template", "test", "software", "asset", "wasm"])
|
|
40
|
+
.default("all"),
|
|
41
|
+
];
|
package/dist/commands/build.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Command } from "@oclif/core";
|
|
2
|
-
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
3
|
-
|
|
4
|
-
//#region src/commands/build.d.ts
|
|
5
|
-
declare class Build extends Command {
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
"generate-tags": _$_oclif_core_interfaces0.BooleanFlag<boolean>;
|
|
10
|
-
"tags-file": _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
11
|
-
"tags-additional-args": _$_oclif_core_interfaces0.OptionFlag<string[], _$_oclif_core_interfaces0.CustomOptions>;
|
|
12
|
-
"log-level": _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
13
|
-
};
|
|
14
|
-
run(): Promise<void>;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { Build };
|
|
18
|
-
//# sourceMappingURL=build.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","names":[],"sources":["../../src/commands/build.ts"],"mappings":";;;;cAYqB,KAAA,SAAc,OAAA;EAAA,OACjB,WAAA;EAAA,OAEA,QAAA;EAAA,OAEA,KAAA;qBALS,yBAAA,CAAA,WAAA;;;;;EAUZ,GAAA,CAAA,GAAO,OAAA;AAAA"}
|
package/dist/commands/check.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Command } from "@oclif/core";
|
|
2
|
-
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
3
|
-
|
|
4
|
-
//#region src/commands/check.d.ts
|
|
5
|
-
declare class Check extends Command {
|
|
6
|
-
static description: string;
|
|
7
|
-
static strict: boolean;
|
|
8
|
-
static flags: {
|
|
9
|
-
"log-level": _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
static examples: string[];
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { Check };
|
|
16
|
-
//# sourceMappingURL=check.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","names":[],"sources":["../../src/commands/check.ts"],"mappings":";;;;cAOqB,KAAA,SAAc,OAAA;EAAA,OACjB,WAAA;EAAA,OAMT,MAAA;EAAA,OAES,KAAA;8DATS,yBAAA,CAAA,aAAA;EAAA;EAAA,OAWT,QAAA;EAEH,GAAA,CAAA,GAAO,OAAA;AAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Command } from "@oclif/core";
|
|
2
|
-
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
3
|
-
|
|
4
|
-
//#region src/commands/dump/artifacts.d.ts
|
|
5
|
-
declare class DumpArtifacts extends Command {
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
type: _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
10
|
-
"log-level": _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
11
|
-
};
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { DumpArtifacts };
|
|
16
|
-
//# sourceMappingURL=artifacts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.d.ts","names":[],"sources":["../../../src/commands/dump/artifacts.ts"],"mappings":";;;;cAOqB,aAAA,SAAsB,OAAA;EAAA,OACzB,WAAA;EAAA,OAGA,QAAA;EAAA,OAEA,KAAA;uDANiB,yBAAA,CAAA,aAAA;;;EAWpB,GAAA,CAAA,GAAO,OAAA;AAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Command } from "@oclif/core";
|
|
2
|
-
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
3
|
-
|
|
4
|
-
//#region src/commands/dump/software.d.ts
|
|
5
|
-
declare class DumpSoftware extends Command {
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
"log-level": _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
run(): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { DumpSoftware };
|
|
15
|
-
//# sourceMappingURL=software.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"software.d.ts","names":[],"sources":["../../../src/commands/dump/software.ts"],"mappings":";;;;cAMqB,YAAA,SAAqB,OAAA;EAAA,OACxB,WAAA;EAAA,OAGA,QAAA;EAAA,OAEA,KAAA;8DANgB,yBAAA,CAAA,aAAA;EAAA;EAUnB,GAAA,CAAA,GAAO,OAAA;AAAA"}
|
package/dist/commands/test.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Command } from "@oclif/core";
|
|
2
|
-
import * as _$_oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
3
|
-
|
|
4
|
-
//#region src/commands/test.d.ts
|
|
5
|
-
declare class Test extends Command {
|
|
6
|
-
static description: string;
|
|
7
|
-
static strict: boolean;
|
|
8
|
-
static flags: {
|
|
9
|
-
"log-level": _$_oclif_core_interfaces0.OptionFlag<string, _$_oclif_core_interfaces0.CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
static examples: string[];
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { Test };
|
|
16
|
-
//# sourceMappingURL=test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.ts","names":[],"sources":["../../src/commands/test.ts"],"mappings":";;;;cAOqB,IAAA,SAAa,OAAA;EAAA,OAChB,WAAA;EAAA,OAET,MAAA;EAAA,OAES,KAAA;8DALQ,yBAAA,CAAA,aAAA;EAAA;EAAA,OAOR,QAAA;EAEH,GAAA,CAAA,GAAO,OAAA;AAAA"}
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["Cmd0","Cmd1","Cmd2","Cmd3","Cmd4"],"sources":["../src/index.ts"],"sourcesContent":["// DO NOT EDIT. This file was generated by oclif-index utility.\n\nimport Cmd0 from \"./commands/build\";\nimport Cmd1 from \"./commands/check\";\nimport Cmd2 from \"./commands/test\";\nimport Cmd3 from \"./commands/dump/artifacts\";\nimport Cmd4 from \"./commands/dump/software\";\n\nexport const COMMANDS = {\n build: Cmd0,\n check: Cmd1,\n test: Cmd2,\n \"dump:artifacts\": Cmd3,\n \"dump:software\": Cmd4,\n};\n"],"mappings":";;;;;;;AAQA,MAAa,WAAW;CACtB,OAAOA,cAAAA;CACP,OAAOC,cAAAA;CACP,MAAMC,aAAAA;CACN,kBAAkBC,kBAAAA;CAClB,iBAAiBC,iBAAAA;CAClB"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;cAQa,QAAA"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Cmd0","Cmd1","Cmd2","Cmd3","Cmd4"],"sources":["../src/index.ts"],"sourcesContent":["// DO NOT EDIT. This file was generated by oclif-index utility.\n\nimport Cmd0 from \"./commands/build\";\nimport Cmd1 from \"./commands/check\";\nimport Cmd2 from \"./commands/test\";\nimport Cmd3 from \"./commands/dump/artifacts\";\nimport Cmd4 from \"./commands/dump/software\";\n\nexport const COMMANDS = {\n build: Cmd0,\n check: Cmd1,\n test: Cmd2,\n \"dump:artifacts\": Cmd3,\n \"dump:software\": Cmd4,\n};\n"],"mappings":";;;;;;AAQA,MAAa,WAAW;CACtB,OAAOA;CACP,OAAOC;CACP,MAAMC;CACN,kBAAkBC;CAClB,iBAAiBC;CAClB"}
|