@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.
Files changed (93) hide show
  1. package/bin/run.js +5 -10
  2. package/dist/cli.cjs +27 -0
  3. package/dist/cli.cjs.map +1 -0
  4. package/dist/cli.d.ts +8 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +26 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/build.cjs +18 -16
  9. package/dist/commands/build.cjs.map +1 -1
  10. package/dist/commands/build.js +16 -14
  11. package/dist/commands/build.js.map +1 -1
  12. package/dist/commands/check.cjs +13 -15
  13. package/dist/commands/check.cjs.map +1 -1
  14. package/dist/commands/check.js +14 -15
  15. package/dist/commands/check.js.map +1 -1
  16. package/dist/commands/dump/artifacts.cjs +10 -15
  17. package/dist/commands/dump/artifacts.cjs.map +1 -1
  18. package/dist/commands/dump/artifacts.js +11 -15
  19. package/dist/commands/dump/artifacts.js.map +1 -1
  20. package/dist/commands/dump/software.cjs +10 -12
  21. package/dist/commands/dump/software.cjs.map +1 -1
  22. package/dist/commands/dump/software.js +11 -12
  23. package/dist/commands/dump/software.js.map +1 -1
  24. package/dist/commands/test.cjs +13 -15
  25. package/dist/commands/test.cjs.map +1 -1
  26. package/dist/commands/test.js +14 -15
  27. package/dist/commands/test.js.map +1 -1
  28. package/dist/compiler/artifactset.cjs +2 -0
  29. package/dist/compiler/artifactset.cjs.map +1 -1
  30. package/dist/compiler/artifactset.js +2 -1
  31. package/dist/compiler/artifactset.js.map +1 -1
  32. package/dist/compiler/compiler.cjs +1 -0
  33. package/dist/compiler/compiler.cjs.map +1 -1
  34. package/dist/compiler/compiler.js +1 -0
  35. package/dist/compiler/compiler.js.map +1 -1
  36. package/dist/compiler/compileroptions.cjs +1 -0
  37. package/dist/compiler/compileroptions.cjs.map +1 -1
  38. package/dist/compiler/compileroptions.js +1 -1
  39. package/dist/compiler/compileroptions.js.map +1 -1
  40. package/dist/compiler/main.cjs +5 -3
  41. package/dist/compiler/main.cjs.map +1 -1
  42. package/dist/compiler/main.js +1 -1
  43. package/dist/compiler/main.js.map +1 -1
  44. package/dist/compiler/pack_limits.cjs +2 -0
  45. package/dist/compiler/pack_limits.cjs.map +1 -1
  46. package/dist/compiler/pack_limits.js +1 -1
  47. package/dist/compiler/pack_limits.js.map +1 -1
  48. package/dist/compiler/package.cjs.map +1 -1
  49. package/dist/compiler/package.js.map +1 -1
  50. package/dist/compiler/source.cjs +10 -1
  51. package/dist/compiler/source.cjs.map +1 -1
  52. package/dist/compiler/source.js +8 -1
  53. package/dist/compiler/source.js.map +1 -1
  54. package/dist/compiler/template.cjs +0 -1
  55. package/dist/compiler/template.cjs.map +1 -1
  56. package/dist/compiler/template.js.map +1 -1
  57. package/dist/compiler/util.cjs +3 -3
  58. package/dist/compiler/util.cjs.map +1 -1
  59. package/dist/compiler/util.js.map +1 -1
  60. package/dist/index.cjs +3 -17
  61. package/dist/index.d.ts +2 -17
  62. package/dist/index.js +2 -17
  63. package/dist/shared/basecmd.cjs +33 -45
  64. package/dist/shared/basecmd.cjs.map +1 -1
  65. package/dist/shared/basecmd.js +30 -42
  66. package/dist/shared/basecmd.js.map +1 -1
  67. package/dist/shared/dump.cjs.map +1 -1
  68. package/dist/shared/dump.js.map +1 -1
  69. package/dist/shared/proc.cjs +0 -1
  70. package/dist/shared/proc.cjs.map +1 -1
  71. package/dist/shared/proc.js.map +1 -1
  72. package/package.json +9 -20
  73. package/src/cli.ts +27 -0
  74. package/src/commands/build.ts +16 -12
  75. package/src/commands/check.ts +14 -19
  76. package/src/commands/dump/artifacts.ts +11 -14
  77. package/src/commands/dump/software.ts +11 -13
  78. package/src/commands/test.ts +14 -15
  79. package/src/index.ts +1 -15
  80. package/src/shared/basecmd.ts +36 -32
  81. package/dist/commands/build.d.ts +0 -18
  82. package/dist/commands/build.d.ts.map +0 -1
  83. package/dist/commands/check.d.ts +0 -16
  84. package/dist/commands/check.d.ts.map +0 -1
  85. package/dist/commands/dump/artifacts.d.ts +0 -16
  86. package/dist/commands/dump/artifacts.d.ts.map +0 -1
  87. package/dist/commands/dump/software.d.ts +0 -15
  88. package/dist/commands/dump/software.d.ts.map +0 -1
  89. package/dist/commands/test.d.ts +0 -16
  90. package/dist/commands/test.d.ts.map +0 -1
  91. package/dist/index.cjs.map +0 -1
  92. package/dist/index.d.ts.map +0 -1
  93. package/dist/index.js.map +0 -1
@@ -1,37 +1,41 @@
1
- import { Flags } from "@oclif/core";
1
+ import { Command, Option } from "commander";
2
2
 
3
- export const GlobalFlags = {
4
- "log-level": Flags.string({
5
- description: "logging level",
6
- default: "info",
7
- options: ["error", "warn", "info", "debug"],
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
- export const CtagsFlags = {
12
- "generate-tags": Flags.boolean({
13
- description: "generate tags, default false",
14
- default: false,
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
- "tags-file": Flags.file({
18
- description: 'where to put ".tags" file, it should be a root of VS Code project',
19
- default: "../../.tags", // usually a user opens a directory with all blocks
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
- "tags-additional-args": Flags.string({
23
- description: "additional flags for universal-ctags command: e.g. -e for emacs",
24
- default: [],
25
- multiple: true,
26
- delimiter: ",",
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 ArtifactTypeFlag = {
31
- type: Flags.string({
32
- aliases: ["t"],
33
- description: "artifact type",
34
- options: ["all", "library", "template", "test", "software", "asset", "wasm"],
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
+ ];
@@ -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"}
@@ -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"}
@@ -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"}
@@ -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"}
@@ -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"}