@platforma-sdk/tengo-builder 2.5.6 → 2.5.7

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 (80) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +7 -13
  2. package/dist/commands/build.cjs +5 -6
  3. package/dist/commands/build.cjs.map +1 -1
  4. package/dist/commands/build.d.ts +5 -5
  5. package/dist/commands/build.d.ts.map +1 -0
  6. package/dist/commands/build.js +1 -2
  7. package/dist/commands/build.js.map +1 -1
  8. package/dist/commands/check.cjs +6 -7
  9. package/dist/commands/check.cjs.map +1 -1
  10. package/dist/commands/check.d.ts +2 -2
  11. package/dist/commands/check.d.ts.map +1 -0
  12. package/dist/commands/check.js +1 -2
  13. package/dist/commands/check.js.map +1 -1
  14. package/dist/commands/dump/artifacts.cjs +5 -6
  15. package/dist/commands/dump/artifacts.cjs.map +1 -1
  16. package/dist/commands/dump/artifacts.d.ts +3 -3
  17. package/dist/commands/dump/artifacts.d.ts.map +1 -0
  18. package/dist/commands/dump/artifacts.js +1 -2
  19. package/dist/commands/dump/artifacts.js.map +1 -1
  20. package/dist/commands/dump/software.cjs +5 -6
  21. package/dist/commands/dump/software.cjs.map +1 -1
  22. package/dist/commands/dump/software.d.ts +2 -2
  23. package/dist/commands/dump/software.d.ts.map +1 -0
  24. package/dist/commands/dump/software.js +1 -2
  25. package/dist/commands/dump/software.js.map +1 -1
  26. package/dist/commands/test.cjs +6 -7
  27. package/dist/commands/test.cjs.map +1 -1
  28. package/dist/commands/test.d.ts +2 -2
  29. package/dist/commands/test.d.ts.map +1 -0
  30. package/dist/commands/test.js +1 -2
  31. package/dist/commands/test.js.map +1 -1
  32. package/dist/compiler/artifactset.cjs +3 -4
  33. package/dist/compiler/artifactset.cjs.map +1 -1
  34. package/dist/compiler/artifactset.js +1 -2
  35. package/dist/compiler/artifactset.js.map +1 -1
  36. package/dist/compiler/compiler.cjs +6 -7
  37. package/dist/compiler/compiler.cjs.map +1 -1
  38. package/dist/compiler/compiler.js +1 -2
  39. package/dist/compiler/compiler.js.map +1 -1
  40. package/dist/compiler/compileroptions.cjs +2 -3
  41. package/dist/compiler/compileroptions.cjs.map +1 -1
  42. package/dist/compiler/compileroptions.js +1 -2
  43. package/dist/compiler/compileroptions.js.map +1 -1
  44. package/dist/compiler/main.cjs +7 -8
  45. package/dist/compiler/main.cjs.map +1 -1
  46. package/dist/compiler/main.js +1 -2
  47. package/dist/compiler/main.js.map +1 -1
  48. package/dist/compiler/package.cjs +1 -2
  49. package/dist/compiler/package.cjs.map +1 -1
  50. package/dist/compiler/package.js +1 -1
  51. package/dist/compiler/source.cjs +4 -5
  52. package/dist/compiler/source.cjs.map +1 -1
  53. package/dist/compiler/source.js +1 -2
  54. package/dist/compiler/source.js.map +1 -1
  55. package/dist/compiler/template.cjs +3 -4
  56. package/dist/compiler/template.cjs.map +1 -1
  57. package/dist/compiler/template.js +2 -3
  58. package/dist/compiler/template.js.map +1 -1
  59. package/dist/compiler/util.cjs +2 -3
  60. package/dist/compiler/util.cjs.map +1 -1
  61. package/dist/compiler/util.js +1 -2
  62. package/dist/compiler/util.js.map +1 -1
  63. package/dist/index.cjs +7 -8
  64. package/dist/index.cjs.map +1 -1
  65. package/dist/index.d.ts.map +1 -0
  66. package/dist/index.js +1 -2
  67. package/dist/index.js.map +1 -1
  68. package/dist/shared/basecmd.cjs +2 -3
  69. package/dist/shared/basecmd.cjs.map +1 -1
  70. package/dist/shared/basecmd.js +1 -2
  71. package/dist/shared/basecmd.js.map +1 -1
  72. package/dist/shared/dump.cjs +3 -4
  73. package/dist/shared/dump.cjs.map +1 -1
  74. package/dist/shared/dump.js +1 -2
  75. package/dist/shared/dump.js.map +1 -1
  76. package/dist/shared/proc.cjs +2 -3
  77. package/dist/shared/proc.cjs.map +1 -1
  78. package/dist/shared/proc.js +1 -2
  79. package/dist/shared/proc.js.map +1 -1
  80. package/package.json +7 -7
@@ -1,7 +1,6 @@
1
1
  import "node:path";
2
2
  import * as fs from "node:fs";
3
3
  import * as winston from "winston";
4
-
5
4
  //#region src/compiler/util.ts
6
5
  function assertNever(x) {
7
6
  throw new Error("Unexpected object: " + x);
@@ -41,7 +40,7 @@ function pathType(path) {
41
40
  function isUUID(uuid) {
42
41
  return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(uuid.toLowerCase());
43
42
  }
44
-
45
43
  //#endregion
46
44
  export { assertNever, createLogger, isUUID, pathType };
45
+
47
46
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","names":[],"sources":["../../src/compiler/util.ts"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport * as winston from \"winston\";\n\nexport function assertNever(x: never): never {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n throw new Error(\"Unexpected object: \" + x);\n}\n\nexport function createLogger(level: string = \"debug\"): winston.Logger {\n return winston.createLogger({\n level: level,\n format: winston.format.combine(\n winston.format.errors({ stack: true }),\n winston.format.printf(({ level, message, stack }) => {\n const baseMessage = `${level.padStart(6, \" \")}: ${message as string}`;\n return stack ? `${baseMessage}\\n${stack as string}` : baseMessage;\n }),\n ),\n transports: [\n new winston.transports.Console({\n stderrLevels: [\"error\", \"warn\", \"info\", \"debug\"],\n handleExceptions: true,\n }),\n ],\n });\n}\n\nexport function findNodeModules(): string {\n let currentDir = process.cwd();\n\n while (currentDir) {\n const possibleNodeModulesPath = path.join(currentDir, \"node_modules\");\n\n if (fs.existsSync(possibleNodeModulesPath)) return possibleNodeModulesPath;\n\n const parentDir = path.resolve(currentDir, \"..\");\n if (parentDir === currentDir) break; // reached the root directory\n\n currentDir = parentDir;\n }\n\n throw new Error(\"Unable to find node_modules directory.\");\n}\n\nexport type PathType = \"absent\" | \"file\" | \"dir\" | \"link\" | \"unknown\";\n\nexport function pathType(path: string): PathType {\n try {\n const s = fs.statSync(path);\n if (s.isDirectory()) return \"dir\";\n if (s.isFile()) return \"file\";\n if (s.isSymbolicLink()) return \"link\";\n return \"unknown\";\n } catch (error: unknown) {\n const err = error as NodeJS.ErrnoException;\n if (err.code == \"ENOENT\") return \"absent\";\n if (err.code == \"ENOTDIR\") return \"absent\";\n else throw err;\n }\n}\n\nexport function isUUID(uuid: string): boolean {\n const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n return uuidRegex.test(uuid.toLowerCase());\n}\n"],"mappings":";;;;;AAIA,SAAgB,YAAY,GAAiB;AAE3C,OAAM,IAAI,MAAM,wBAAwB,EAAE;;AAG5C,SAAgB,aAAa,QAAgB,SAAyB;AACpE,QAAO,QAAQ,aAAa;EACnB;EACP,QAAQ,QAAQ,OAAO,QACrB,QAAQ,OAAO,OAAO,EAAE,OAAO,MAAM,CAAC,EACtC,QAAQ,OAAO,QAAQ,EAAE,OAAO,SAAS,YAAY;GACnD,MAAM,cAAc,GAAG,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI;AAClD,UAAO,QAAQ,GAAG,YAAY,IAAI,UAAoB;IACtD,CACH;EACD,YAAY,CACV,IAAI,QAAQ,WAAW,QAAQ;GAC7B,cAAc;IAAC;IAAS;IAAQ;IAAQ;IAAQ;GAChD,kBAAkB;GACnB,CAAC,CACH;EACF,CAAC;;AAsBJ,SAAgB,SAAS,MAAwB;AAC/C,KAAI;EACF,MAAM,IAAI,GAAG,SAAS,KAAK;AAC3B,MAAI,EAAE,aAAa,CAAE,QAAO;AAC5B,MAAI,EAAE,QAAQ,CAAE,QAAO;AACvB,MAAI,EAAE,gBAAgB,CAAE,QAAO;AAC/B,SAAO;UACA,OAAgB;EACvB,MAAM,MAAM;AACZ,MAAI,IAAI,QAAQ,SAAU,QAAO;AACjC,MAAI,IAAI,QAAQ,UAAW,QAAO;MAC7B,OAAM;;;AAIf,SAAgB,OAAO,MAAuB;AAE5C,QADkB,6EACD,KAAK,KAAK,aAAa,CAAC"}
1
+ {"version":3,"file":"util.js","names":[],"sources":["../../src/compiler/util.ts"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport * as winston from \"winston\";\n\nexport function assertNever(x: never): never {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n throw new Error(\"Unexpected object: \" + x);\n}\n\nexport function createLogger(level: string = \"debug\"): winston.Logger {\n return winston.createLogger({\n level: level,\n format: winston.format.combine(\n winston.format.errors({ stack: true }),\n winston.format.printf(({ level, message, stack }) => {\n const baseMessage = `${level.padStart(6, \" \")}: ${message as string}`;\n return stack ? `${baseMessage}\\n${stack as string}` : baseMessage;\n }),\n ),\n transports: [\n new winston.transports.Console({\n stderrLevels: [\"error\", \"warn\", \"info\", \"debug\"],\n handleExceptions: true,\n }),\n ],\n });\n}\n\nexport function findNodeModules(): string {\n let currentDir = process.cwd();\n\n while (currentDir) {\n const possibleNodeModulesPath = path.join(currentDir, \"node_modules\");\n\n if (fs.existsSync(possibleNodeModulesPath)) return possibleNodeModulesPath;\n\n const parentDir = path.resolve(currentDir, \"..\");\n if (parentDir === currentDir) break; // reached the root directory\n\n currentDir = parentDir;\n }\n\n throw new Error(\"Unable to find node_modules directory.\");\n}\n\nexport type PathType = \"absent\" | \"file\" | \"dir\" | \"link\" | \"unknown\";\n\nexport function pathType(path: string): PathType {\n try {\n const s = fs.statSync(path);\n if (s.isDirectory()) return \"dir\";\n if (s.isFile()) return \"file\";\n if (s.isSymbolicLink()) return \"link\";\n return \"unknown\";\n } catch (error: unknown) {\n const err = error as NodeJS.ErrnoException;\n if (err.code == \"ENOENT\") return \"absent\";\n if (err.code == \"ENOTDIR\") return \"absent\";\n else throw err;\n }\n}\n\nexport function isUUID(uuid: string): boolean {\n const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n return uuidRegex.test(uuid.toLowerCase());\n}\n"],"mappings":";;;;AAIA,SAAgB,YAAY,GAAiB;AAE3C,OAAM,IAAI,MAAM,wBAAwB,EAAE;;AAG5C,SAAgB,aAAa,QAAgB,SAAyB;AACpE,QAAO,QAAQ,aAAa;EACnB;EACP,QAAQ,QAAQ,OAAO,QACrB,QAAQ,OAAO,OAAO,EAAE,OAAO,MAAM,CAAC,EACtC,QAAQ,OAAO,QAAQ,EAAE,OAAO,SAAS,YAAY;GACnD,MAAM,cAAc,GAAG,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI;AAClD,UAAO,QAAQ,GAAG,YAAY,IAAI,UAAoB;IACtD,CACH;EACD,YAAY,CACV,IAAI,QAAQ,WAAW,QAAQ;GAC7B,cAAc;IAAC;IAAS;IAAQ;IAAQ;IAAQ;GAChD,kBAAkB;GACnB,CAAC,CACH;EACF,CAAC;;AAsBJ,SAAgB,SAAS,MAAwB;AAC/C,KAAI;EACF,MAAM,IAAI,GAAG,SAAS,KAAK;AAC3B,MAAI,EAAE,aAAa,CAAE,QAAO;AAC5B,MAAI,EAAE,QAAQ,CAAE,QAAO;AACvB,MAAI,EAAE,gBAAgB,CAAE,QAAO;AAC/B,SAAO;UACA,OAAgB;EACvB,MAAM,MAAM;AACZ,MAAI,IAAI,QAAQ,SAAU,QAAO;AACjC,MAAI,IAAI,QAAQ,UAAW,QAAO;MAC7B,OAAM;;;AAIf,SAAgB,OAAO,MAAuB;AAE5C,QADkB,6EACD,KAAK,KAAK,aAAa,CAAC"}
package/dist/index.cjs CHANGED
@@ -1,10 +1,9 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_build = require('./commands/build.cjs');
3
- const require_check = require('./commands/check.cjs');
4
- const require_test = require('./commands/test.cjs');
5
- const require_artifacts = require('./commands/dump/artifacts.cjs');
6
- const require_software = require('./commands/dump/software.cjs');
7
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_build = require("./commands/build.cjs");
3
+ const require_check = require("./commands/check.cjs");
4
+ const require_test = require("./commands/test.cjs");
5
+ const require_artifacts = require("./commands/dump/artifacts.cjs");
6
+ const require_software = require("./commands/dump/software.cjs");
8
7
  //#region src/index.ts
9
8
  const COMMANDS = {
10
9
  build: require_build.default,
@@ -13,7 +12,7 @@ const COMMANDS = {
13
12
  "dump:artifacts": require_artifacts.default,
14
13
  "dump:software": require_software.default
15
14
  };
16
-
17
15
  //#endregion
18
16
  exports.COMMANDS = COMMANDS;
17
+
19
18
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
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;CACP,OAAOC;CACP,MAAMC;CACN,kBAAkBC;CAClB,iBAAiBC;CAClB"}
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"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;cAQa,QAAA"}
package/dist/index.js CHANGED
@@ -3,7 +3,6 @@ import Check from "./commands/check.js";
3
3
  import Test from "./commands/test.js";
4
4
  import DumpArtifacts from "./commands/dump/artifacts.js";
5
5
  import DumpSoftware from "./commands/dump/software.js";
6
-
7
6
  //#region src/index.ts
8
7
  const COMMANDS = {
9
8
  build: Build,
@@ -12,7 +11,7 @@ const COMMANDS = {
12
11
  "dump:artifacts": DumpArtifacts,
13
12
  "dump:software": DumpSoftware
14
13
  };
15
-
16
14
  //#endregion
17
15
  export { COMMANDS };
16
+
18
17
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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"}
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"}
@@ -1,6 +1,5 @@
1
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
1
+ require("../_virtual/_rolldown/runtime.cjs");
2
2
  let _oclif_core = require("@oclif/core");
3
-
4
3
  //#region src/shared/basecmd.ts
5
4
  const GlobalFlags = { "log-level": _oclif_core.Flags.string({
6
5
  description: "logging level",
@@ -41,9 +40,9 @@ const ArtifactTypeFlag = { type: _oclif_core.Flags.string({
41
40
  ],
42
41
  default: "all"
43
42
  }) };
44
-
45
43
  //#endregion
46
44
  exports.ArtifactTypeFlag = ArtifactTypeFlag;
47
45
  exports.CtagsFlags = CtagsFlags;
48
46
  exports.GlobalFlags = GlobalFlags;
47
+
49
48
  //# sourceMappingURL=basecmd.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"basecmd.cjs","names":["Flags"],"sources":["../../src/shared/basecmd.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\";\n\nexport const GlobalFlags = {\n \"log-level\": Flags.string({\n description: \"logging level\",\n default: \"info\",\n options: [\"error\", \"warn\", \"info\", \"debug\"],\n }),\n};\n\nexport const CtagsFlags = {\n \"generate-tags\": Flags.boolean({\n description: \"generate tags, default false\",\n default: false,\n }),\n\n \"tags-file\": Flags.file({\n description: 'where to put \".tags\" file, it should be a root of VS Code project',\n default: \"../../.tags\", // usually a user opens a directory with all blocks\n }),\n\n \"tags-additional-args\": Flags.string({\n description: \"additional flags for universal-ctags command: e.g. -e for emacs\",\n default: [],\n multiple: true,\n delimiter: \",\",\n }),\n};\n\nexport const ArtifactTypeFlag = {\n type: Flags.string({\n aliases: [\"t\"],\n description: \"artifact type\",\n options: [\"all\", \"library\", \"template\", \"test\", \"software\", \"asset\"],\n default: \"all\",\n }),\n};\n"],"mappings":";;;;AAEA,MAAa,cAAc,EACzB,aAAaA,kBAAM,OAAO;CACxB,aAAa;CACb,SAAS;CACT,SAAS;EAAC;EAAS;EAAQ;EAAQ;EAAQ;CAC5C,CAAC,EACH;AAED,MAAa,aAAa;CACxB,iBAAiBA,kBAAM,QAAQ;EAC7B,aAAa;EACb,SAAS;EACV,CAAC;CAEF,aAAaA,kBAAM,KAAK;EACtB,aAAa;EACb,SAAS;EACV,CAAC;CAEF,wBAAwBA,kBAAM,OAAO;EACnC,aAAa;EACb,SAAS,EAAE;EACX,UAAU;EACV,WAAW;EACZ,CAAC;CACH;AAED,MAAa,mBAAmB,EAC9B,MAAMA,kBAAM,OAAO;CACjB,SAAS,CAAC,IAAI;CACd,aAAa;CACb,SAAS;EAAC;EAAO;EAAW;EAAY;EAAQ;EAAY;EAAQ;CACpE,SAAS;CACV,CAAC,EACH"}
1
+ {"version":3,"file":"basecmd.cjs","names":["Flags"],"sources":["../../src/shared/basecmd.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\";\n\nexport const GlobalFlags = {\n \"log-level\": Flags.string({\n description: \"logging level\",\n default: \"info\",\n options: [\"error\", \"warn\", \"info\", \"debug\"],\n }),\n};\n\nexport const CtagsFlags = {\n \"generate-tags\": Flags.boolean({\n description: \"generate tags, default false\",\n default: false,\n }),\n\n \"tags-file\": Flags.file({\n description: 'where to put \".tags\" file, it should be a root of VS Code project',\n default: \"../../.tags\", // usually a user opens a directory with all blocks\n }),\n\n \"tags-additional-args\": Flags.string({\n description: \"additional flags for universal-ctags command: e.g. -e for emacs\",\n default: [],\n multiple: true,\n delimiter: \",\",\n }),\n};\n\nexport const ArtifactTypeFlag = {\n type: Flags.string({\n aliases: [\"t\"],\n description: \"artifact type\",\n options: [\"all\", \"library\", \"template\", \"test\", \"software\", \"asset\"],\n default: \"all\",\n }),\n};\n"],"mappings":";;;AAEA,MAAa,cAAc,EACzB,aAAaA,YAAAA,MAAM,OAAO;CACxB,aAAa;CACb,SAAS;CACT,SAAS;EAAC;EAAS;EAAQ;EAAQ;EAAQ;CAC5C,CAAC,EACH;AAED,MAAa,aAAa;CACxB,iBAAiBA,YAAAA,MAAM,QAAQ;EAC7B,aAAa;EACb,SAAS;EACV,CAAC;CAEF,aAAaA,YAAAA,MAAM,KAAK;EACtB,aAAa;EACb,SAAS;EACV,CAAC;CAEF,wBAAwBA,YAAAA,MAAM,OAAO;EACnC,aAAa;EACb,SAAS,EAAE;EACX,UAAU;EACV,WAAW;EACZ,CAAC;CACH;AAED,MAAa,mBAAmB,EAC9B,MAAMA,YAAAA,MAAM,OAAO;CACjB,SAAS,CAAC,IAAI;CACd,aAAa;CACb,SAAS;EAAC;EAAO;EAAW;EAAY;EAAQ;EAAY;EAAQ;CACpE,SAAS;CACV,CAAC,EACH"}
@@ -1,5 +1,4 @@
1
1
  import { Flags } from "@oclif/core";
2
-
3
2
  //#region src/shared/basecmd.ts
4
3
  const GlobalFlags = { "log-level": Flags.string({
5
4
  description: "logging level",
@@ -40,7 +39,7 @@ const ArtifactTypeFlag = { type: Flags.string({
40
39
  ],
41
40
  default: "all"
42
41
  }) };
43
-
44
42
  //#endregion
45
43
  export { ArtifactTypeFlag, CtagsFlags, GlobalFlags };
44
+
46
45
  //# sourceMappingURL=basecmd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"basecmd.js","names":[],"sources":["../../src/shared/basecmd.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\";\n\nexport const GlobalFlags = {\n \"log-level\": Flags.string({\n description: \"logging level\",\n default: \"info\",\n options: [\"error\", \"warn\", \"info\", \"debug\"],\n }),\n};\n\nexport const CtagsFlags = {\n \"generate-tags\": Flags.boolean({\n description: \"generate tags, default false\",\n default: false,\n }),\n\n \"tags-file\": Flags.file({\n description: 'where to put \".tags\" file, it should be a root of VS Code project',\n default: \"../../.tags\", // usually a user opens a directory with all blocks\n }),\n\n \"tags-additional-args\": Flags.string({\n description: \"additional flags for universal-ctags command: e.g. -e for emacs\",\n default: [],\n multiple: true,\n delimiter: \",\",\n }),\n};\n\nexport const ArtifactTypeFlag = {\n type: Flags.string({\n aliases: [\"t\"],\n description: \"artifact type\",\n options: [\"all\", \"library\", \"template\", \"test\", \"software\", \"asset\"],\n default: \"all\",\n }),\n};\n"],"mappings":";;;AAEA,MAAa,cAAc,EACzB,aAAa,MAAM,OAAO;CACxB,aAAa;CACb,SAAS;CACT,SAAS;EAAC;EAAS;EAAQ;EAAQ;EAAQ;CAC5C,CAAC,EACH;AAED,MAAa,aAAa;CACxB,iBAAiB,MAAM,QAAQ;EAC7B,aAAa;EACb,SAAS;EACV,CAAC;CAEF,aAAa,MAAM,KAAK;EACtB,aAAa;EACb,SAAS;EACV,CAAC;CAEF,wBAAwB,MAAM,OAAO;EACnC,aAAa;EACb,SAAS,EAAE;EACX,UAAU;EACV,WAAW;EACZ,CAAC;CACH;AAED,MAAa,mBAAmB,EAC9B,MAAM,MAAM,OAAO;CACjB,SAAS,CAAC,IAAI;CACd,aAAa;CACb,SAAS;EAAC;EAAO;EAAW;EAAY;EAAQ;EAAY;EAAQ;CACpE,SAAS;CACV,CAAC,EACH"}
1
+ {"version":3,"file":"basecmd.js","names":[],"sources":["../../src/shared/basecmd.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\";\n\nexport const GlobalFlags = {\n \"log-level\": Flags.string({\n description: \"logging level\",\n default: \"info\",\n options: [\"error\", \"warn\", \"info\", \"debug\"],\n }),\n};\n\nexport const CtagsFlags = {\n \"generate-tags\": Flags.boolean({\n description: \"generate tags, default false\",\n default: false,\n }),\n\n \"tags-file\": Flags.file({\n description: 'where to put \".tags\" file, it should be a root of VS Code project',\n default: \"../../.tags\", // usually a user opens a directory with all blocks\n }),\n\n \"tags-additional-args\": Flags.string({\n description: \"additional flags for universal-ctags command: e.g. -e for emacs\",\n default: [],\n multiple: true,\n delimiter: \",\",\n }),\n};\n\nexport const ArtifactTypeFlag = {\n type: Flags.string({\n aliases: [\"t\"],\n description: \"artifact type\",\n options: [\"all\", \"library\", \"template\", \"test\", \"software\", \"asset\"],\n default: \"all\",\n }),\n};\n"],"mappings":";;AAEA,MAAa,cAAc,EACzB,aAAa,MAAM,OAAO;CACxB,aAAa;CACb,SAAS;CACT,SAAS;EAAC;EAAS;EAAQ;EAAQ;EAAQ;CAC5C,CAAC,EACH;AAED,MAAa,aAAa;CACxB,iBAAiB,MAAM,QAAQ;EAC7B,aAAa;EACb,SAAS;EACV,CAAC;CAEF,aAAa,MAAM,KAAK;EACtB,aAAa;EACb,SAAS;EACV,CAAC;CAEF,wBAAwB,MAAM,OAAO;EACnC,aAAa;EACb,SAAS,EAAE;EACX,UAAU;EACV,WAAW;EACZ,CAAC;CACH;AAED,MAAa,mBAAmB,EAC9B,MAAM,MAAM,OAAO;CACjB,SAAS,CAAC,IAAI;CACd,aAAa;CACb,SAAS;EAAC;EAAO;EAAW;EAAY;EAAQ;EAAY;EAAQ;CACpE,SAAS;CACV,CAAC,EACH"}
@@ -1,6 +1,5 @@
1
- const require_package = require('../compiler/package.cjs');
2
- const require_main = require('../compiler/main.cjs');
3
-
1
+ const require_package = require("../compiler/package.cjs");
2
+ const require_main = require("../compiler/main.cjs");
4
3
  //#region src/shared/dump.ts
5
4
  function dumpArtifacts(logger, stream, aType) {
6
5
  const packageInfo = require_main.getPackageInfo(process.cwd(), logger);
@@ -76,8 +75,8 @@ function getTemplateSoftware(tpl) {
76
75
  for (const subTpl of Object.values(tpl.templates)) getTemplateSoftware(subTpl).forEach((hash) => hashes.add(hash));
77
76
  return new Set(hashes);
78
77
  }
79
-
80
78
  //#endregion
81
79
  exports.dumpArtifacts = dumpArtifacts;
82
80
  exports.dumpSoftware = dumpSoftware;
81
+
83
82
  //# sourceMappingURL=dump.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dump.cjs","names":["getPackageInfo","parseSources","newCompiler","typedArtifactNameToString","compile"],"sources":["../../src/shared/dump.ts"],"sourcesContent":["import type winston from \"winston\";\nimport { getPackageInfo, newCompiler, compile, parseSources } from \"../compiler/main\";\nimport type { ArtifactType } from \"../compiler/package\";\nimport { typedArtifactNameToString } from \"../compiler/package\";\nimport type { TemplateDataV3 } from \"@milaboratories/pl-model-backend\";\n\nexport function dumpArtifacts(\n logger: winston.Logger,\n stream: NodeJS.WritableStream,\n aType?: ArtifactType,\n): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n\n const sources = parseSources(logger, packageInfo, \"dist\", \"src\", \"\");\n\n const compiler = newCompiler(logger, packageInfo, \"dist\");\n\n // group output by type:\n // - all libs\n // - all templates\n // - all software\n // - all assets\n // - all tests\n\n // Libs\n\n if (!aType || aType === \"library\") {\n for (const lib of compiler.allLibs()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(lib.fullName)}`);\n stream.write(JSON.stringify(lib) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Templates\n\n if (!aType || aType === \"template\") {\n for (const tpl of compiler.allTemplates()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(tpl.fullName)}`);\n stream.write(JSON.stringify(tpl) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"template\") {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${src.srcName}`,\n );\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Software\n\n if (!aType || aType === \"software\") {\n for (const sw of compiler.allSoftware()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(sw.fullName)}`);\n stream.write(JSON.stringify(sw) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"software\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Assets\n\n if (!aType || aType === \"asset\") {\n for (const asset of compiler.allAssets()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(asset.fullName)}`);\n stream.write(JSON.stringify(asset) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"asset\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Tests\n\n if (!aType || aType === \"test\") {\n for (const src of sources) {\n if (src.fullName.type === \"test\") {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${src.srcName}`,\n );\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n}\n\nexport function dumpLibs(\n logger: winston.Logger,\n stream: NodeJS.WritableStream,\n recursive: boolean,\n): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n\n const sources = parseSources(logger, packageInfo, \"dist\", \"src\", \"\");\n\n if (!recursive) {\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n\n return;\n }\n\n const compiler = newCompiler(logger, packageInfo, \"dist\");\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n compiler.addLib(src);\n }\n }\n\n for (const lib of compiler.allLibs()) {\n stream.write(JSON.stringify(lib) + \"\\n\");\n }\n}\n\nexport function dumpSoftware(logger: winston.Logger, stream: NodeJS.WritableStream): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n const compiled = compile(logger, packageInfo, \"dist\");\n\n const hashes = new Set<string>();\n const sourceMap = new Map<string, string>();\n for (const tpl of compiled.templates) {\n Object.entries(tpl.data.hashToSource).forEach(([hash, src]) => sourceMap.set(hash, src));\n getTemplateSoftware(tpl.data.template).forEach((hash) => hashes.add(hash));\n }\n\n for (const hash of hashes) {\n const src = sourceMap.get(hash);\n if (src) {\n if (Object.hasOwn(JSON.parse(src) as object, \"asset\")) {\n // Skip assets. They are kept in templates software because of backward compatibility with backend.\n continue;\n }\n stream.write(src);\n if (!src.endsWith(\"\\n\")) {\n stream.write(\"\\n\");\n }\n } else {\n throw new Error(`Source not found for hash: ${hash}`);\n }\n }\n}\n\nfunction getTemplateSoftware(tpl: TemplateDataV3): Set<string> {\n const hashes = new Set<string>();\n for (const sw of Object.values(tpl.software)) {\n hashes.add(sw.sourceHash);\n }\n for (const subTpl of Object.values(tpl.templates)) {\n getTemplateSoftware(subTpl).forEach((hash) => hashes.add(hash));\n }\n\n return new Set(hashes);\n}\n"],"mappings":";;;;AAMA,SAAgB,cACd,QACA,QACA,OACM;CACN,MAAM,cAAcA,4BAAe,QAAQ,KAAK,EAAE,OAAO;CAEzD,MAAM,UAAUC,0BAAa,QAAQ,aAAa,QAAQ,OAAO,GAAG;CAEpE,MAAM,WAAWC,yBAAY,QAAQ,aAAa,OAAO;AAWzD,KAAI,CAAC,SAAS,UAAU,WAAW;AACjC,OAAK,MAAM,OAAO,SAAS,SAAS,EAAE;AACpC,UAAO,MAAM,yBAAyBC,0CAA0B,IAAI,SAAS,GAAG;AAChF,UAAO,MAAM,KAAK,UAAU,IAAI,GAAG,KAAK;;AAG1C,OAAK,MAAM,OAAO,QAChB,KAAI,IAAI,SAAS,SAAS,WAAW;AACnC,UAAO,MAAM,yBAAyBA,0CAA0B,IAAI,SAAS,GAAG;AAChF,UAAO,MAAM,KAAK,UAAU,IAAI,GAAG,KAAK;;;AAO9C,KAAI,CAAC,SAAS,UAAU,YAAY;AAClC,OAAK,MAAM,OAAO,SAAS,cAAc,EAAE;AACzC,UAAO,MAAM,yBAAyBA,0CAA0B,IAAI,SAAS,GAAG;AAChF,UAAO,MAAM,KAAK,UAAU,IAAI,GAAG,KAAK;;AAG1C,OAAK,MAAM,OAAO,QAChB,KAAI,IAAI,SAAS,SAAS,YAAY;AACpC,UAAO,MACL,yBAAyB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AAO,QAAQ,IAAI,KAAK,aAAa,CAAC,SAAS,CAAC,MAAM,SAAS,UAAU,IAAI,MAAM,IAAI,CAAC;AACxF,sBAAoB,IAAI,KAAK,SAAS,CAAC,SAAS,SAAS,OAAO,IAAI,KAAK,CAAC;;AAG5E,MAAK,MAAM,QAAQ,QAAQ;EACzB,MAAM,MAAM,UAAU,IAAI,KAAK;AAC/B,MAAI,KAAK;AACP,OAAI,OAAO,OAAO,KAAK,MAAM,IAAI,EAAY,QAAQ,CAEnD;AAEF,UAAO,MAAM,IAAI;AACjB,OAAI,CAAC,IAAI,SAAS,KAAK,CACrB,QAAO,MAAM,KAAK;QAGpB,OAAM,IAAI,MAAM,8BAA8B,OAAO;;;AAK3D,SAAS,oBAAoB,KAAkC;CAC7D,MAAM,yBAAS,IAAI,KAAa;AAChC,MAAK,MAAM,MAAM,OAAO,OAAO,IAAI,SAAS,CAC1C,QAAO,IAAI,GAAG,WAAW;AAE3B,MAAK,MAAM,UAAU,OAAO,OAAO,IAAI,UAAU,CAC/C,qBAAoB,OAAO,CAAC,SAAS,SAAS,OAAO,IAAI,KAAK,CAAC;AAGjE,QAAO,IAAI,IAAI,OAAO"}
1
+ {"version":3,"file":"dump.cjs","names":["getPackageInfo","parseSources","newCompiler","typedArtifactNameToString","compile"],"sources":["../../src/shared/dump.ts"],"sourcesContent":["import type winston from \"winston\";\nimport { getPackageInfo, newCompiler, compile, parseSources } from \"../compiler/main\";\nimport type { ArtifactType } from \"../compiler/package\";\nimport { typedArtifactNameToString } from \"../compiler/package\";\nimport type { TemplateDataV3 } from \"@milaboratories/pl-model-backend\";\n\nexport function dumpArtifacts(\n logger: winston.Logger,\n stream: NodeJS.WritableStream,\n aType?: ArtifactType,\n): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n\n const sources = parseSources(logger, packageInfo, \"dist\", \"src\", \"\");\n\n const compiler = newCompiler(logger, packageInfo, \"dist\");\n\n // group output by type:\n // - all libs\n // - all templates\n // - all software\n // - all assets\n // - all tests\n\n // Libs\n\n if (!aType || aType === \"library\") {\n for (const lib of compiler.allLibs()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(lib.fullName)}`);\n stream.write(JSON.stringify(lib) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Templates\n\n if (!aType || aType === \"template\") {\n for (const tpl of compiler.allTemplates()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(tpl.fullName)}`);\n stream.write(JSON.stringify(tpl) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"template\") {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${src.srcName}`,\n );\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Software\n\n if (!aType || aType === \"software\") {\n for (const sw of compiler.allSoftware()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(sw.fullName)}`);\n stream.write(JSON.stringify(sw) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"software\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Assets\n\n if (!aType || aType === \"asset\") {\n for (const asset of compiler.allAssets()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(asset.fullName)}`);\n stream.write(JSON.stringify(asset) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"asset\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Tests\n\n if (!aType || aType === \"test\") {\n for (const src of sources) {\n if (src.fullName.type === \"test\") {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${src.srcName}`,\n );\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n}\n\nexport function dumpLibs(\n logger: winston.Logger,\n stream: NodeJS.WritableStream,\n recursive: boolean,\n): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n\n const sources = parseSources(logger, packageInfo, \"dist\", \"src\", \"\");\n\n if (!recursive) {\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n\n return;\n }\n\n const compiler = newCompiler(logger, packageInfo, \"dist\");\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n compiler.addLib(src);\n }\n }\n\n for (const lib of compiler.allLibs()) {\n stream.write(JSON.stringify(lib) + \"\\n\");\n }\n}\n\nexport function dumpSoftware(logger: winston.Logger, stream: NodeJS.WritableStream): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n const compiled = compile(logger, packageInfo, \"dist\");\n\n const hashes = new Set<string>();\n const sourceMap = new Map<string, string>();\n for (const tpl of compiled.templates) {\n Object.entries(tpl.data.hashToSource).forEach(([hash, src]) => sourceMap.set(hash, src));\n getTemplateSoftware(tpl.data.template).forEach((hash) => hashes.add(hash));\n }\n\n for (const hash of hashes) {\n const src = sourceMap.get(hash);\n if (src) {\n if (Object.hasOwn(JSON.parse(src) as object, \"asset\")) {\n // Skip assets. They are kept in templates software because of backward compatibility with backend.\n continue;\n }\n stream.write(src);\n if (!src.endsWith(\"\\n\")) {\n stream.write(\"\\n\");\n }\n } else {\n throw new Error(`Source not found for hash: ${hash}`);\n }\n }\n}\n\nfunction getTemplateSoftware(tpl: TemplateDataV3): Set<string> {\n const hashes = new Set<string>();\n for (const sw of Object.values(tpl.software)) {\n hashes.add(sw.sourceHash);\n }\n for (const subTpl of Object.values(tpl.templates)) {\n getTemplateSoftware(subTpl).forEach((hash) => hashes.add(hash));\n }\n\n return new Set(hashes);\n}\n"],"mappings":";;;AAMA,SAAgB,cACd,QACA,QACA,OACM;CACN,MAAM,cAAc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AK,CACrB,QAAO,MAAM,KAAK;QAGpB,OAAM,IAAI,MAAM,8BAA8B,OAAO;;;AAK3D,SAAS,oBAAoB,KAAkC;CAC7D,MAAM,yBAAS,IAAI,KAAa;AAChC,MAAK,MAAM,MAAM,OAAO,OAAO,IAAI,SAAS,CAC1C,QAAO,IAAI,GAAG,WAAW;AAE3B,MAAK,MAAM,UAAU,OAAO,OAAO,IAAI,UAAU,CAC/C,qBAAoB,OAAO,CAAC,SAAS,SAAS,OAAO,IAAI,KAAK,CAAC;AAGjE,QAAO,IAAI,IAAI,OAAO"}
@@ -1,6 +1,5 @@
1
1
  import { typedArtifactNameToString } from "../compiler/package.js";
2
2
  import { compile, getPackageInfo, newCompiler, parseSources } from "../compiler/main.js";
3
-
4
3
  //#region src/shared/dump.ts
5
4
  function dumpArtifacts(logger, stream, aType) {
6
5
  const packageInfo = getPackageInfo(process.cwd(), logger);
@@ -76,7 +75,7 @@ function getTemplateSoftware(tpl) {
76
75
  for (const subTpl of Object.values(tpl.templates)) getTemplateSoftware(subTpl).forEach((hash) => hashes.add(hash));
77
76
  return new Set(hashes);
78
77
  }
79
-
80
78
  //#endregion
81
79
  export { dumpArtifacts, dumpSoftware };
80
+
82
81
  //# sourceMappingURL=dump.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dump.js","names":[],"sources":["../../src/shared/dump.ts"],"sourcesContent":["import type winston from \"winston\";\nimport { getPackageInfo, newCompiler, compile, parseSources } from \"../compiler/main\";\nimport type { ArtifactType } from \"../compiler/package\";\nimport { typedArtifactNameToString } from \"../compiler/package\";\nimport type { TemplateDataV3 } from \"@milaboratories/pl-model-backend\";\n\nexport function dumpArtifacts(\n logger: winston.Logger,\n stream: NodeJS.WritableStream,\n aType?: ArtifactType,\n): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n\n const sources = parseSources(logger, packageInfo, \"dist\", \"src\", \"\");\n\n const compiler = newCompiler(logger, packageInfo, \"dist\");\n\n // group output by type:\n // - all libs\n // - all templates\n // - all software\n // - all assets\n // - all tests\n\n // Libs\n\n if (!aType || aType === \"library\") {\n for (const lib of compiler.allLibs()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(lib.fullName)}`);\n stream.write(JSON.stringify(lib) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Templates\n\n if (!aType || aType === \"template\") {\n for (const tpl of compiler.allTemplates()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(tpl.fullName)}`);\n stream.write(JSON.stringify(tpl) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"template\") {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${src.srcName}`,\n );\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Software\n\n if (!aType || aType === \"software\") {\n for (const sw of compiler.allSoftware()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(sw.fullName)}`);\n stream.write(JSON.stringify(sw) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"software\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Assets\n\n if (!aType || aType === \"asset\") {\n for (const asset of compiler.allAssets()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(asset.fullName)}`);\n stream.write(JSON.stringify(asset) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"asset\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Tests\n\n if (!aType || aType === \"test\") {\n for (const src of sources) {\n if (src.fullName.type === \"test\") {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${src.srcName}`,\n );\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n}\n\nexport function dumpLibs(\n logger: winston.Logger,\n stream: NodeJS.WritableStream,\n recursive: boolean,\n): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n\n const sources = parseSources(logger, packageInfo, \"dist\", \"src\", \"\");\n\n if (!recursive) {\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n\n return;\n }\n\n const compiler = newCompiler(logger, packageInfo, \"dist\");\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n compiler.addLib(src);\n }\n }\n\n for (const lib of compiler.allLibs()) {\n stream.write(JSON.stringify(lib) + \"\\n\");\n }\n}\n\nexport function dumpSoftware(logger: winston.Logger, stream: NodeJS.WritableStream): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n const compiled = compile(logger, packageInfo, \"dist\");\n\n const hashes = new Set<string>();\n const sourceMap = new Map<string, string>();\n for (const tpl of compiled.templates) {\n Object.entries(tpl.data.hashToSource).forEach(([hash, src]) => sourceMap.set(hash, src));\n getTemplateSoftware(tpl.data.template).forEach((hash) => hashes.add(hash));\n }\n\n for (const hash of hashes) {\n const src = sourceMap.get(hash);\n if (src) {\n if (Object.hasOwn(JSON.parse(src) as object, \"asset\")) {\n // Skip assets. They are kept in templates software because of backward compatibility with backend.\n continue;\n }\n stream.write(src);\n if (!src.endsWith(\"\\n\")) {\n stream.write(\"\\n\");\n }\n } else {\n throw new Error(`Source not found for hash: ${hash}`);\n }\n }\n}\n\nfunction getTemplateSoftware(tpl: TemplateDataV3): Set<string> {\n const hashes = new Set<string>();\n for (const sw of Object.values(tpl.software)) {\n hashes.add(sw.sourceHash);\n }\n for (const subTpl of Object.values(tpl.templates)) {\n getTemplateSoftware(subTpl).forEach((hash) => hashes.add(hash));\n }\n\n return new Set(hashes);\n}\n"],"mappings":";;;;AAMA,SAAgB,cACd,QACA,QACA,OAC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MAAM,yBAAS,IAAI,KAAa;AAChC,MAAK,MAAM,MAAM,OAAO,OAAO,IAAI,SAAS,CAC1C,QAAO,IAAI,GAAG,WAAW;AAE3B,MAAK,MAAM,UAAU,OAAO,OAAO,IAAI,UAAU,CAC/C,qBAAoB,OAAO,CAAC,SAAS,SAAS,OAAO,IAAI,KAAK,CAAC;AAGjE,QAAO,IAAI,IAAI,OAAO"}
1
+ {"version":3,"file":"dump.js","names":[],"sources":["../../src/shared/dump.ts"],"sourcesContent":["import type winston from \"winston\";\nimport { getPackageInfo, newCompiler, compile, parseSources } from \"../compiler/main\";\nimport type { ArtifactType } from \"../compiler/package\";\nimport { typedArtifactNameToString } from \"../compiler/package\";\nimport type { TemplateDataV3 } from \"@milaboratories/pl-model-backend\";\n\nexport function dumpArtifacts(\n logger: winston.Logger,\n stream: NodeJS.WritableStream,\n aType?: ArtifactType,\n): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n\n const sources = parseSources(logger, packageInfo, \"dist\", \"src\", \"\");\n\n const compiler = newCompiler(logger, packageInfo, \"dist\");\n\n // group output by type:\n // - all libs\n // - all templates\n // - all software\n // - all assets\n // - all tests\n\n // Libs\n\n if (!aType || aType === \"library\") {\n for (const lib of compiler.allLibs()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(lib.fullName)}`);\n stream.write(JSON.stringify(lib) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Templates\n\n if (!aType || aType === \"template\") {\n for (const tpl of compiler.allTemplates()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(tpl.fullName)}`);\n stream.write(JSON.stringify(tpl) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"template\") {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${src.srcName}`,\n );\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Software\n\n if (!aType || aType === \"software\") {\n for (const sw of compiler.allSoftware()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(sw.fullName)}`);\n stream.write(JSON.stringify(sw) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"software\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Assets\n\n if (!aType || aType === \"asset\") {\n for (const asset of compiler.allAssets()) {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(asset.fullName)}`);\n stream.write(JSON.stringify(asset) + \"\\n\");\n }\n\n for (const src of sources) {\n if (src.fullName.type === \"asset\") {\n logger.debug(`Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`);\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n\n // Tests\n\n if (!aType || aType === \"test\") {\n for (const src of sources) {\n if (src.fullName.type === \"test\") {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${src.srcName}`,\n );\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n }\n}\n\nexport function dumpLibs(\n logger: winston.Logger,\n stream: NodeJS.WritableStream,\n recursive: boolean,\n): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n\n const sources = parseSources(logger, packageInfo, \"dist\", \"src\", \"\");\n\n if (!recursive) {\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n stream.write(JSON.stringify(src) + \"\\n\");\n }\n }\n\n return;\n }\n\n const compiler = newCompiler(logger, packageInfo, \"dist\");\n for (const src of sources) {\n if (src.fullName.type === \"library\") {\n compiler.addLib(src);\n }\n }\n\n for (const lib of compiler.allLibs()) {\n stream.write(JSON.stringify(lib) + \"\\n\");\n }\n}\n\nexport function dumpSoftware(logger: winston.Logger, stream: NodeJS.WritableStream): void {\n const packageInfo = getPackageInfo(process.cwd(), logger);\n const compiled = compile(logger, packageInfo, \"dist\");\n\n const hashes = new Set<string>();\n const sourceMap = new Map<string, string>();\n for (const tpl of compiled.templates) {\n Object.entries(tpl.data.hashToSource).forEach(([hash, src]) => sourceMap.set(hash, src));\n getTemplateSoftware(tpl.data.template).forEach((hash) => hashes.add(hash));\n }\n\n for (const hash of hashes) {\n const src = sourceMap.get(hash);\n if (src) {\n if (Object.hasOwn(JSON.parse(src) as object, \"asset\")) {\n // Skip assets. They are kept in templates software because of backward compatibility with backend.\n continue;\n }\n stream.write(src);\n if (!src.endsWith(\"\\n\")) {\n stream.write(\"\\n\");\n }\n } else {\n throw new Error(`Source not found for hash: ${hash}`);\n }\n }\n}\n\nfunction getTemplateSoftware(tpl: TemplateDataV3): Set<string> {\n const hashes = new Set<string>();\n for (const sw of Object.values(tpl.software)) {\n hashes.add(sw.sourceHash);\n }\n for (const subTpl of Object.values(tpl.templates)) {\n getTemplateSoftware(subTpl).forEach((hash) => hashes.add(hash));\n }\n\n return new Set(hashes);\n}\n"],"mappings":";;;AAMA,SAAgB,cACd,QACA,QACA,OACM;CACN,MAAM,cAAc,eAAe,QAAQ,KAAK,EAAE,OAAO;CAEzD,MAAM,UAAU,aAAa,QAAQ,aAAa,QAAQ,OAAO,GAAG;CAEpE,MAAM,WAAW,YAAY,QAAQ,aAAa,OAAO;AAWzD,KAAI,CAAC,SAAS,UAAU,WAAW;AACjC,OAAK,MAAM,OAAO,SAAS,SAAS,EAAE;AACpC,UAAO,MAAM,yBAAyB,0BAA0B,IAAI,SAAS,GAAG;AAChF,UAAO,MAAM,KAAK,UAAU,IAAI,GAAG,KAAK;;AAG1C,OAAK,MAAM,OAAO,QAChB,KAAI,IAAI,SAAS,SAAS,WAAW;AACnC,UAAO,MAAM,yBAAyB,0BAA0B,IAAI,SAAS,GAAG;AAChF,UAAO,MAAM,KAAK,UAAU,IAAI,GAAG,KAAK;;;AAO9C,KAAI,CAAC,SAAS,UAAU,YAAY;AA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SAAgB,aAAa,QAAwB,QAAqC;CAExF,MAAM,WAAW,QAAQ,QADL,eAAe,QAAQ,KAAK,EAAE,OAAO,EACX,OAAO;CAErD,MAAM,yBAAS,IAAI,KAAa;CAChC,MAAM,4BAAY,IAAI,KAAqB;AAC3C,MAAK,MAAM,OAAO,SAAS,WAAW;AACpC,SAAO,QAAQ,IAAI,KAAK,aAAa,CAAC,SAAS,CAAC,MAAM,SAAS,UAAU,IAAI,MAAM,IAAI,CAAC;AACxF,sBAAoB,IAAI,KAAK,SAAS,CAAC,SAAS,SAAS,OAAO,IAAI,KAAK,CAAC;;AAG5E,MAAK,MAAM,QAAQ,QAAQ;EACzB,MAAM,MAAM,UAAU,IAAI,KAAK;AAC/B,MAAI,KAAK;AACP,OAAI,OAAO,OAAO,KAAK,MAAM,IAAI,EAAY,QAAQ,CAEnD;AAEF,UAAO,MAAM,IAAI;AACjB,OAAI,CAAC,IAAI,SAAS,KAAK,CACrB,QAAO,MAAM,KAAK;QAGpB,OAAM,IAAI,MAAM,8BAA8B,OAAO;;;AAK3D,SAAS,oBAAoB,KAAkC;CAC7D,MAAM,yBAAS,IAAI,KAAa;AAChC,MAAK,MAAM,MAAM,OAAO,OAAO,IAAI,SAAS,CAC1C,QAAO,IAAI,GAAG,WAAW;AAE3B,MAAK,MAAM,UAAU,OAAO,OAAO,IAAI,UAAU,CAC/C,qBAAoB,OAAO,CAAC,SAAS,SAAS,OAAO,IAAI,KAAK,CAAC;AAGjE,QAAO,IAAI,IAAI,OAAO"}
@@ -1,6 +1,5 @@
1
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
1
+ require("../_virtual/_rolldown/runtime.cjs");
2
2
  let node_child_process = require("node:child_process");
3
-
4
3
  //#region src/shared/proc.ts
5
4
  function spawnEmbed(cmd, ...args) {
6
5
  const p = (0, node_child_process.spawn)(cmd, args, { stdio: [
@@ -23,8 +22,8 @@ function waitFor(p) {
23
22
  });
24
23
  });
25
24
  }
26
-
27
25
  //#endregion
28
26
  exports.spawnEmbed = spawnEmbed;
29
27
  exports.waitFor = waitFor;
28
+
30
29
  //# sourceMappingURL=proc.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"proc.cjs","names":[],"sources":["../../src/shared/proc.ts"],"sourcesContent":["import type { ChildProcess, ChildProcessByStdio } from \"node:child_process\";\nimport { spawn } from \"node:child_process\";\nimport type { Writable } from \"node:stream\";\n\nexport function spawnEmbed(\n cmd: string,\n ...args: string[]\n): ChildProcessByStdio<Writable, null, null> {\n const p = spawn(cmd, args, { stdio: [\"pipe\", \"inherit\", \"inherit\"] });\n\n p.stdin.on(\"error\", (err: Error) => {\n const systemError = err as NodeJS.ErrnoException;\n if (systemError.code === \"EPIPE\") {\n // ignore EPIPE error as it stands for broken command run.\n // The command will write normal problem description by itself.\n }\n });\n\n return p;\n}\n\nexport function waitFor(p: ChildProcess): Promise<number> {\n return new Promise((resolve, reject) => {\n p.on(\"close\", (code: number) => {\n resolve(code);\n });\n p.on(\"error\", (err) => {\n reject(err);\n });\n });\n}\n"],"mappings":";;;;AAIA,SAAgB,WACd,KACA,GAAG,MACwC;CAC3C,MAAM,kCAAU,KAAK,MAAM,EAAE,OAAO;EAAC;EAAQ;EAAW;EAAU,EAAE,CAAC;AAErE,GAAE,MAAM,GAAG,UAAU,QAAe;AAElC,MADoB,IACJ,SAAS,SAAS;GAIlC;AAEF,QAAO;;AAGT,SAAgB,QAAQ,GAAkC;AACxD,QAAO,IAAI,SAAS,SAAS,WAAW;AACtC,IAAE,GAAG,UAAU,SAAiB;AAC9B,WAAQ,KAAK;IACb;AACF,IAAE,GAAG,UAAU,QAAQ;AACrB,UAAO,IAAI;IACX;GACF"}
1
+ {"version":3,"file":"proc.cjs","names":[],"sources":["../../src/shared/proc.ts"],"sourcesContent":["import type { ChildProcess, ChildProcessByStdio } from \"node:child_process\";\nimport { spawn } from \"node:child_process\";\nimport type { Writable } from \"node:stream\";\n\nexport function spawnEmbed(\n cmd: string,\n ...args: string[]\n): ChildProcessByStdio<Writable, null, null> {\n const p = spawn(cmd, args, { stdio: [\"pipe\", \"inherit\", \"inherit\"] });\n\n p.stdin.on(\"error\", (err: Error) => {\n const systemError = err as NodeJS.ErrnoException;\n if (systemError.code === \"EPIPE\") {\n // ignore EPIPE error as it stands for broken command run.\n // The command will write normal problem description by itself.\n }\n });\n\n return p;\n}\n\nexport function waitFor(p: ChildProcess): Promise<number> {\n return new Promise((resolve, reject) => {\n p.on(\"close\", (code: number) => {\n resolve(code);\n });\n p.on(\"error\", (err) => {\n reject(err);\n });\n });\n}\n"],"mappings":";;;AAIA,SAAgB,WACd,KACA,GAAG,MACwC;CAC3C,MAAM,KAAA,GAAA,mBAAA,OAAU,KAAK,MAAM,EAAE,OAAO;EAAC;EAAQ;EAAW;EAAU,EAAE,CAAC;AAErE,GAAE,MAAM,GAAG,UAAU,QAAe;AAElC,MADoB,IACJ,SAAS,SAAS;GAIlC;AAEF,QAAO;;AAGT,SAAgB,QAAQ,GAAkC;AACxD,QAAO,IAAI,SAAS,SAAS,WAAW;AACtC,IAAE,GAAG,UAAU,SAAiB;AAC9B,WAAQ,KAAK;IACb;AACF,IAAE,GAAG,UAAU,QAAQ;AACrB,UAAO,IAAI;IACX;GACF"}
@@ -1,5 +1,4 @@
1
1
  import { spawn } from "node:child_process";
2
-
3
2
  //#region src/shared/proc.ts
4
3
  function spawnEmbed(cmd, ...args) {
5
4
  const p = spawn(cmd, args, { stdio: [
@@ -22,7 +21,7 @@ function waitFor(p) {
22
21
  });
23
22
  });
24
23
  }
25
-
26
24
  //#endregion
27
25
  export { spawnEmbed, waitFor };
26
+
28
27
  //# sourceMappingURL=proc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"proc.js","names":[],"sources":["../../src/shared/proc.ts"],"sourcesContent":["import type { ChildProcess, ChildProcessByStdio } from \"node:child_process\";\nimport { spawn } from \"node:child_process\";\nimport type { Writable } from \"node:stream\";\n\nexport function spawnEmbed(\n cmd: string,\n ...args: string[]\n): ChildProcessByStdio<Writable, null, null> {\n const p = spawn(cmd, args, { stdio: [\"pipe\", \"inherit\", \"inherit\"] });\n\n p.stdin.on(\"error\", (err: Error) => {\n const systemError = err as NodeJS.ErrnoException;\n if (systemError.code === \"EPIPE\") {\n // ignore EPIPE error as it stands for broken command run.\n // The command will write normal problem description by itself.\n }\n });\n\n return p;\n}\n\nexport function waitFor(p: ChildProcess): Promise<number> {\n return new Promise((resolve, reject) => {\n p.on(\"close\", (code: number) => {\n resolve(code);\n });\n p.on(\"error\", (err) => {\n reject(err);\n });\n });\n}\n"],"mappings":";;;AAIA,SAAgB,WACd,KACA,GAAG,MACwC;CAC3C,MAAM,IAAI,MAAM,KAAK,MAAM,EAAE,OAAO;EAAC;EAAQ;EAAW;EAAU,EAAE,CAAC;AAErE,GAAE,MAAM,GAAG,UAAU,QAAe;AAElC,MADoB,IACJ,SAAS,SAAS;GAIlC;AAEF,QAAO;;AAGT,SAAgB,QAAQ,GAAkC;AACxD,QAAO,IAAI,SAAS,SAAS,WAAW;AACtC,IAAE,GAAG,UAAU,SAAiB;AAC9B,WAAQ,KAAK;IACb;AACF,IAAE,GAAG,UAAU,QAAQ;AACrB,UAAO,IAAI;IACX;GACF"}
1
+ {"version":3,"file":"proc.js","names":[],"sources":["../../src/shared/proc.ts"],"sourcesContent":["import type { ChildProcess, ChildProcessByStdio } from \"node:child_process\";\nimport { spawn } from \"node:child_process\";\nimport type { Writable } from \"node:stream\";\n\nexport function spawnEmbed(\n cmd: string,\n ...args: string[]\n): ChildProcessByStdio<Writable, null, null> {\n const p = spawn(cmd, args, { stdio: [\"pipe\", \"inherit\", \"inherit\"] });\n\n p.stdin.on(\"error\", (err: Error) => {\n const systemError = err as NodeJS.ErrnoException;\n if (systemError.code === \"EPIPE\") {\n // ignore EPIPE error as it stands for broken command run.\n // The command will write normal problem description by itself.\n }\n });\n\n return p;\n}\n\nexport function waitFor(p: ChildProcess): Promise<number> {\n return new Promise((resolve, reject) => {\n p.on(\"close\", (code: number) => {\n resolve(code);\n });\n p.on(\"error\", (err) => {\n reject(err);\n });\n });\n}\n"],"mappings":";;AAIA,SAAgB,WACd,KACA,GAAG,MACwC;CAC3C,MAAM,IAAI,MAAM,KAAK,MAAM,EAAE,OAAO;EAAC;EAAQ;EAAW;EAAU,EAAE,CAAC;AAErE,GAAE,MAAM,GAAG,UAAU,QAAe;AAElC,MADoB,IACJ,SAAS,SAAS;GAIlC;AAEF,QAAO;;AAGT,SAAgB,QAAQ,GAAkC;AACxD,QAAO,IAAI,SAAS,SAAS,WAAW;AACtC,IAAE,GAAG,UAAU,SAAiB;AAC9B,WAAQ,KAAK;IACb;AACF,IAAE,GAAG,UAAU,QAAQ;AACrB,UAAO,IAAI;IACX;GACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/tengo-builder",
3
- "version": "2.5.6",
3
+ "version": "2.5.7",
4
4
  "description": "Pl Tengo Template Builder",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -16,19 +16,19 @@
16
16
  "@milaboratories/tengo-tester": "^1.6.4",
17
17
  "@oclif/core": "^4.0.37",
18
18
  "winston": "^3.17.0",
19
- "@milaboratories/pl-model-backend": "1.2.6",
19
+ "@milaboratories/pl-model-backend": "1.2.7",
20
20
  "@milaboratories/resolve-helper": "1.1.3",
21
21
  "@milaboratories/ts-helpers": "1.8.1"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "~24.5.2",
25
- "@vitest/coverage-istanbul": "^4.0.18",
25
+ "@vitest/coverage-istanbul": "^4.1.3",
26
26
  "typescript": "~5.9.3",
27
- "vitest": "^4.0.18",
28
- "@milaboratories/build-configs": "1.5.2",
29
- "@milaboratories/ts-builder": "1.3.0",
27
+ "vitest": "^4.1.3",
28
+ "@milaboratories/build-configs": "2.0.0",
30
29
  "@milaboratories/oclif-index": "1.1.1",
31
- "@milaboratories/ts-configs": "1.2.2"
30
+ "@milaboratories/ts-builder": "1.3.1",
31
+ "@milaboratories/ts-configs": "1.2.3"
32
32
  },
33
33
  "oclif": {
34
34
  "bin": "pl-tengo",