@platforma-sdk/tengo-builder 2.4.13 → 2.4.15

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 (123) hide show
  1. package/README.md +4 -4
  2. package/bin/run.js +5 -5
  3. package/dist/commands/build.cjs +36 -36
  4. package/dist/commands/build.cjs.map +1 -1
  5. package/dist/commands/build.d.ts +5 -5
  6. package/dist/commands/build.js +36 -36
  7. package/dist/commands/build.js.map +1 -1
  8. package/dist/commands/check.cjs +5 -5
  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 -1
  12. package/dist/commands/check.js +5 -5
  13. package/dist/commands/check.js.map +1 -1
  14. package/dist/commands/dump/artifacts.cjs +4 -6
  15. package/dist/commands/dump/artifacts.cjs.map +1 -1
  16. package/dist/commands/dump/artifacts.d.ts +2 -2
  17. package/dist/commands/dump/artifacts.d.ts.map +1 -1
  18. package/dist/commands/dump/artifacts.js +4 -6
  19. package/dist/commands/dump/artifacts.js.map +1 -1
  20. package/dist/commands/dump/software.cjs +3 -5
  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 -1
  24. package/dist/commands/dump/software.js +3 -5
  25. package/dist/commands/dump/software.js.map +1 -1
  26. package/dist/commands/test.cjs +5 -5
  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 -1
  30. package/dist/commands/test.js +5 -5
  31. package/dist/commands/test.js.map +1 -1
  32. package/dist/compiler/artifactset.cjs +2 -2
  33. package/dist/compiler/artifactset.cjs.map +1 -1
  34. package/dist/compiler/artifactset.d.ts +1 -1
  35. package/dist/compiler/artifactset.d.ts.map +1 -1
  36. package/dist/compiler/artifactset.js +2 -2
  37. package/dist/compiler/artifactset.js.map +1 -1
  38. package/dist/compiler/compiler.cjs +37 -34
  39. package/dist/compiler/compiler.cjs.map +1 -1
  40. package/dist/compiler/compiler.d.ts +3 -3
  41. package/dist/compiler/compiler.d.ts.map +1 -1
  42. package/dist/compiler/compiler.js +37 -34
  43. package/dist/compiler/compiler.js.map +1 -1
  44. package/dist/compiler/compileroptions.cjs +12 -12
  45. package/dist/compiler/compileroptions.cjs.map +1 -1
  46. package/dist/compiler/compileroptions.d.ts +2 -2
  47. package/dist/compiler/compileroptions.js +12 -12
  48. package/dist/compiler/compileroptions.js.map +1 -1
  49. package/dist/compiler/main.cjs +58 -58
  50. package/dist/compiler/main.cjs.map +1 -1
  51. package/dist/compiler/main.d.ts +6 -6
  52. package/dist/compiler/main.d.ts.map +1 -1
  53. package/dist/compiler/main.js +58 -58
  54. package/dist/compiler/main.js.map +1 -1
  55. package/dist/compiler/package.cjs +5 -2
  56. package/dist/compiler/package.cjs.map +1 -1
  57. package/dist/compiler/package.d.ts +6 -6
  58. package/dist/compiler/package.d.ts.map +1 -1
  59. package/dist/compiler/package.js +5 -2
  60. package/dist/compiler/package.js.map +1 -1
  61. package/dist/compiler/source.cjs +50 -52
  62. package/dist/compiler/source.cjs.map +1 -1
  63. package/dist/compiler/source.d.ts +2 -2
  64. package/dist/compiler/source.d.ts.map +1 -1
  65. package/dist/compiler/source.js +50 -52
  66. package/dist/compiler/source.js.map +1 -1
  67. package/dist/compiler/template.cjs +7 -7
  68. package/dist/compiler/template.cjs.map +1 -1
  69. package/dist/compiler/template.d.ts +2 -2
  70. package/dist/compiler/template.d.ts.map +1 -1
  71. package/dist/compiler/template.js +7 -7
  72. package/dist/compiler/template.js.map +1 -1
  73. package/dist/compiler/test.artifacts.d.ts +1 -1
  74. package/dist/compiler/test.artifacts.d.ts.map +1 -1
  75. package/dist/compiler/util.cjs +12 -12
  76. package/dist/compiler/util.cjs.map +1 -1
  77. package/dist/compiler/util.d.ts +2 -2
  78. package/dist/compiler/util.js +12 -12
  79. package/dist/compiler/util.js.map +1 -1
  80. package/dist/index.cjs +5 -5
  81. package/dist/index.cjs.map +1 -1
  82. package/dist/index.d.ts +7 -7
  83. package/dist/index.js +5 -5
  84. package/dist/index.js.map +1 -1
  85. package/dist/shared/basecmd.cjs +15 -15
  86. package/dist/shared/basecmd.cjs.map +1 -1
  87. package/dist/shared/basecmd.d.ts +4 -4
  88. package/dist/shared/basecmd.js +15 -15
  89. package/dist/shared/basecmd.js.map +1 -1
  90. package/dist/shared/dump.cjs +28 -28
  91. package/dist/shared/dump.cjs.map +1 -1
  92. package/dist/shared/dump.d.ts +2 -2
  93. package/dist/shared/dump.d.ts.map +1 -1
  94. package/dist/shared/dump.js +28 -28
  95. package/dist/shared/dump.js.map +1 -1
  96. package/dist/shared/proc.cjs +5 -5
  97. package/dist/shared/proc.cjs.map +1 -1
  98. package/dist/shared/proc.d.ts +2 -2
  99. package/dist/shared/proc.js +5 -5
  100. package/dist/shared/proc.js.map +1 -1
  101. package/package.json +21 -19
  102. package/src/commands/build.ts +57 -55
  103. package/src/commands/check.ts +15 -12
  104. package/src/commands/dump/artifacts.ts +11 -15
  105. package/src/commands/dump/software.ts +9 -10
  106. package/src/commands/test.ts +15 -12
  107. package/src/compiler/artifactset.ts +7 -9
  108. package/src/compiler/compiler.test.ts +134 -137
  109. package/src/compiler/compiler.ts +62 -62
  110. package/src/compiler/compileroptions.ts +15 -15
  111. package/src/compiler/main.test.ts +23 -23
  112. package/src/compiler/main.ts +83 -100
  113. package/src/compiler/package.ts +14 -12
  114. package/src/compiler/source.test.ts +191 -183
  115. package/src/compiler/source.ts +106 -79
  116. package/src/compiler/template.test.ts +50 -49
  117. package/src/compiler/template.ts +11 -21
  118. package/src/compiler/test.artifacts.ts +47 -47
  119. package/src/compiler/util.ts +17 -17
  120. package/src/index.ts +10 -10
  121. package/src/shared/basecmd.ts +16 -16
  122. package/src/shared/dump.ts +49 -70
  123. package/src/shared/proc.ts +8 -8
@@ -3,18 +3,18 @@ import * as winston from 'winston';
3
3
 
4
4
  function assertNever(x) {
5
5
  // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
6
- throw new Error('Unexpected object: ' + x);
6
+ throw new Error("Unexpected object: " + x);
7
7
  }
8
- function createLogger(level = 'debug') {
8
+ function createLogger(level = "debug") {
9
9
  return winston.createLogger({
10
10
  level: level,
11
11
  format: winston.format.combine(winston.format.errors({ stack: true }), winston.format.printf(({ level, message, stack }) => {
12
- const baseMessage = `${level.padStart(6, ' ')}: ${message}`;
12
+ const baseMessage = `${level.padStart(6, " ")}: ${message}`;
13
13
  return stack ? `${baseMessage}\n${stack}` : baseMessage;
14
14
  })),
15
15
  transports: [
16
16
  new winston.transports.Console({
17
- stderrLevels: ['error', 'warn', 'info', 'debug'],
17
+ stderrLevels: ["error", "warn", "info", "debug"],
18
18
  handleExceptions: true,
19
19
  }),
20
20
  ],
@@ -24,19 +24,19 @@ function pathType(path) {
24
24
  try {
25
25
  const s = fs.statSync(path);
26
26
  if (s.isDirectory())
27
- return 'dir';
27
+ return "dir";
28
28
  if (s.isFile())
29
- return 'file';
29
+ return "file";
30
30
  if (s.isSymbolicLink())
31
- return 'link';
32
- return 'unknown';
31
+ return "link";
32
+ return "unknown";
33
33
  }
34
34
  catch (error) {
35
35
  const err = error;
36
- if (err.code == 'ENOENT')
37
- return 'absent';
38
- if (err.code == 'ENOTDIR')
39
- return 'absent';
36
+ if (err.code == "ENOENT")
37
+ return "absent";
38
+ if (err.code == "ENOTDIR")
39
+ return "absent";
40
40
  else
41
41
  throw err;
42
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","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"],"names":[],"mappings":";;;AAIM,SAAU,WAAW,CAAC,CAAQ,EAAA;;AAElC,IAAA,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,CAAC,CAAC;AAC5C;AAEM,SAAU,YAAY,CAAC,KAAA,GAAgB,OAAO,EAAA;IAClD,OAAO,OAAO,CAAC,YAAY,CAAC;AAC1B,QAAA,KAAK,EAAE,KAAK;AACZ,QAAA,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAC5B,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE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IAC9F,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AAC3C;;;;"}
1
+ {"version":3,"file":"util.js","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}-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O,MAAM;QAC7B,IAAI,CAAC,CAAC,cAAc,EAAE;AAAE,YAAA,OAAO,MAAM;AACrC,QAAA,OAAO,SAAS;IAClB;IAAE,OAAO,KAAc,EAAE;QACvB,MAAM,GAAG,GAAG,KAA8B;AAC1C,QAAA,IAAI,GAAG,CAAC,IAAI,IAAI,QAAQ;AAAE,YAAA,OAAO,QAAQ;AACzC,QAAA,IAAI,GAAG,CAAC,IAAI,IAAI,SAAS;AAAE,YAAA,OAAO,QAAQ;;AACrC,YAAA,MAAM,GAAG;IAChB;AACF;AAEM,SAAU,MAAM,CAAC,IAAY,EAAA;IACjC,MAAM,SAAS,GAAG,4EAA4E;IAC9F,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AAC3C;;;;"}
package/dist/index.cjs CHANGED
@@ -8,11 +8,11 @@ var software = require('./commands/dump/software.cjs');
8
8
 
9
9
  // DO NOT EDIT. This file was generated by oclif-index utility.
10
10
  const COMMANDS = {
11
- 'build': build,
12
- 'check': check,
13
- 'test': test,
14
- 'dump:artifacts': artifacts,
15
- 'dump:software': software,
11
+ build: build,
12
+ check: check,
13
+ test: test,
14
+ "dump:artifacts": artifacts,
15
+ "dump:software": software,
16
16
  };
17
17
 
18
18
  exports.COMMANDS = COMMANDS;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","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"],"names":["Cmd0","Cmd1","Cmd2","Cmd3","Cmd4"],"mappings":";;;;;;;;AAAA;AAQO,MAAM,QAAQ,GAAG;AACtB,IAAA,OAAO,EAAEA,KAAI;AACb,IAAA,OAAO,EAAEC,KAAI;AACb,IAAA,MAAM,EAAEC,IAAI;AACZ,IAAA,gBAAgB,EAAEC,SAAI;AACtB,IAAA,eAAe,EAAEC,QAAI;;;;;"}
1
+ {"version":3,"file":"index.cjs","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"],"names":["Cmd0","Cmd1","Cmd2","Cmd3","Cmd4"],"mappings":";;;;;;;;AAAA;AAQO,MAAM,QAAQ,GAAG;AACtB,IAAA,KAAK,EAAEA,KAAI;AACX,IAAA,KAAK,EAAEC,KAAI;AACX,IAAA,IAAI,EAAEC,IAAI;AACV,IAAA,gBAAgB,EAAEC,SAAI;AACtB,IAAA,eAAe,EAAEC,QAAI;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import Cmd0 from './commands/build';
2
- import Cmd1 from './commands/check';
3
- import Cmd2 from './commands/test';
4
- import Cmd3 from './commands/dump/artifacts';
5
- import Cmd4 from './commands/dump/software';
1
+ import Cmd0 from "./commands/build";
2
+ import Cmd1 from "./commands/check";
3
+ import Cmd2 from "./commands/test";
4
+ import Cmd3 from "./commands/dump/artifacts";
5
+ import Cmd4 from "./commands/dump/software";
6
6
  export declare const COMMANDS: {
7
7
  build: typeof Cmd0;
8
8
  check: typeof Cmd1;
9
9
  test: typeof Cmd2;
10
- 'dump:artifacts': typeof Cmd3;
11
- 'dump:software': typeof Cmd4;
10
+ "dump:artifacts": typeof Cmd3;
11
+ "dump:software": typeof Cmd4;
12
12
  };
13
13
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -6,11 +6,11 @@ import DumpSoftware from './commands/dump/software.js';
6
6
 
7
7
  // DO NOT EDIT. This file was generated by oclif-index utility.
8
8
  const COMMANDS = {
9
- 'build': Build,
10
- 'check': Check,
11
- 'test': Test,
12
- 'dump:artifacts': DumpArtifacts,
13
- 'dump:software': DumpSoftware,
9
+ build: Build,
10
+ check: Check,
11
+ test: Test,
12
+ "dump:artifacts": DumpArtifacts,
13
+ "dump:software": DumpSoftware,
14
14
  };
15
15
 
16
16
  export { COMMANDS };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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"],"names":["Cmd0","Cmd1","Cmd2","Cmd3","Cmd4"],"mappings":";;;;;;AAAA;AAQO,MAAM,QAAQ,GAAG;AACtB,IAAA,OAAO,EAAEA,KAAI;AACb,IAAA,OAAO,EAAEC,KAAI;AACb,IAAA,MAAM,EAAEC,IAAI;AACZ,IAAA,gBAAgB,EAAEC,aAAI;AACtB,IAAA,eAAe,EAAEC,YAAI;;;;;"}
1
+ {"version":3,"file":"index.js","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"],"names":["Cmd0","Cmd1","Cmd2","Cmd3","Cmd4"],"mappings":";;;;;;AAAA;AAQO,MAAM,QAAQ,GAAG;AACtB,IAAA,KAAK,EAAEA,KAAI;AACX,IAAA,KAAK,EAAEC,KAAI;AACX,IAAA,IAAI,EAAEC,IAAI;AACV,IAAA,gBAAgB,EAAEC,aAAI;AACtB,IAAA,eAAe,EAAEC,YAAI;;;;;"}
@@ -3,34 +3,34 @@
3
3
  var core = require('@oclif/core');
4
4
 
5
5
  const GlobalFlags = {
6
- 'log-level': core.Flags.string({
7
- description: 'logging level',
8
- default: 'info',
9
- options: ['error', 'warn', 'info', 'debug'],
6
+ "log-level": core.Flags.string({
7
+ description: "logging level",
8
+ default: "info",
9
+ options: ["error", "warn", "info", "debug"],
10
10
  }),
11
11
  };
12
12
  const CtagsFlags = {
13
- 'generate-tags': core.Flags.boolean({
14
- description: 'generate tags, default false',
13
+ "generate-tags": core.Flags.boolean({
14
+ description: "generate tags, default false",
15
15
  default: false,
16
16
  }),
17
- 'tags-file': core.Flags.file({
17
+ "tags-file": core.Flags.file({
18
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
19
+ default: "../../.tags", // usually a user opens a directory with all blocks
20
20
  }),
21
- 'tags-additional-args': core.Flags.string({
22
- description: 'additional flags for universal-ctags command: e.g. -e for emacs',
21
+ "tags-additional-args": core.Flags.string({
22
+ description: "additional flags for universal-ctags command: e.g. -e for emacs",
23
23
  default: [],
24
24
  multiple: true,
25
- delimiter: ',',
25
+ delimiter: ",",
26
26
  }),
27
27
  };
28
28
  const ArtifactTypeFlag = {
29
29
  type: core.Flags.string({
30
- aliases: ['t'],
31
- description: 'artifact type',
32
- options: ['all', 'library', 'template', 'test', 'software', 'asset'],
33
- default: 'all',
30
+ aliases: ["t"],
31
+ description: "artifact type",
32
+ options: ["all", "library", "template", "test", "software", "asset"],
33
+ default: "all",
34
34
  }),
35
35
  };
36
36
 
@@ -1 +1 @@
1
- {"version":3,"file":"basecmd.cjs","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"],"names":["Flags"],"mappings":";;;;AAEO,MAAM,WAAW,GAAG;AACzB,IAAA,WAAW,EAAEA,UAAK,CAAC,MAAM,CAAC;AACxB,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;KAC5C,CAAC;;AAGG,MAAM,UAAU,GAAG;AACxB,IAAA,eAAe,EAAEA,UAAK,CAAC,OAAO,CAAC;AAC7B,QAAA,WAAW,EAAE,8BAA8B;AAC3C,QAAA,OAAO,EAAE,KAAK;KACf,CAAC;AAEF,IAAA,WAAW,EAAEA,UAAK,CAAC,IAAI,CAAC;AACtB,QAAA,WAAW,EAAE,mEAAmE;QAChF,OAAO,EAAE,aAAa;KACvB,CAAC;AAEF,IAAA,sBAAsB,EAAEA,UAAK,CAAC,MAAM,CAAC;AACnC,QAAA,WAAW,EAAE,iEAAiE;AAC9E,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,SAAS,EAAE,GAAG;KACf,CAAC;;AAGG,MAAM,gBAAgB,GAAG;AAC9B,IAAA,IAAI,EAAEA,UAAK,CAAC,MAAM,CAAC;QACjB,OAAO,EAAE,CAAC,GAAG,CAAC;AACd,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC;AACpE,QAAA,OAAO,EAAE,KAAK;KACf,CAAC;;;;;;;"}
1
+ {"version":3,"file":"basecmd.cjs","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"],"names":["Flags"],"mappings":";;;;AAEO,MAAM,WAAW,GAAG;AACzB,IAAA,WAAW,EAAEA,UAAK,CAAC,MAAM,CAAC;AACxB,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;KAC5C,CAAC;;AAGG,MAAM,UAAU,GAAG;AACxB,IAAA,eAAe,EAAEA,UAAK,CAAC,OAAO,CAAC;AAC7B,QAAA,WAAW,EAAE,8BAA8B;AAC3C,QAAA,OAAO,EAAE,KAAK;KACf,CAAC;AAEF,IAAA,WAAW,EAAEA,UAAK,CAAC,IAAI,CAAC;AACtB,QAAA,WAAW,EAAE,mEAAmE;QAChF,OAAO,EAAE,aAAa;KACvB,CAAC;AAEF,IAAA,sBAAsB,EAAEA,UAAK,CAAC,MAAM,CAAC;AACnC,QAAA,WAAW,EAAE,iEAAiE;AAC9E,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,SAAS,EAAE,GAAG;KACf,CAAC;;AAGG,MAAM,gBAAgB,GAAG;AAC9B,IAAA,IAAI,EAAEA,UAAK,CAAC,MAAM,CAAC;QACjB,OAAO,EAAE,CAAC,GAAG,CAAC;AACd,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC;AACpE,QAAA,OAAO,EAAE,KAAK;KACf,CAAC;;;;;;;"}
@@ -1,10 +1,10 @@
1
1
  export declare const GlobalFlags: {
2
- 'log-level': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
2
+ "log-level": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
3
3
  };
4
4
  export declare const CtagsFlags: {
5
- 'generate-tags': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
- 'tags-file': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
- 'tags-additional-args': import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
5
+ "generate-tags": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
+ "tags-file": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ "tags-additional-args": import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
8
8
  };
9
9
  export declare const ArtifactTypeFlag: {
10
10
  type: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -1,34 +1,34 @@
1
1
  import { Flags } from '@oclif/core';
2
2
 
3
3
  const GlobalFlags = {
4
- 'log-level': Flags.string({
5
- description: 'logging level',
6
- default: 'info',
7
- options: ['error', 'warn', 'info', 'debug'],
4
+ "log-level": Flags.string({
5
+ description: "logging level",
6
+ default: "info",
7
+ options: ["error", "warn", "info", "debug"],
8
8
  }),
9
9
  };
10
10
  const CtagsFlags = {
11
- 'generate-tags': Flags.boolean({
12
- description: 'generate tags, default false',
11
+ "generate-tags": Flags.boolean({
12
+ description: "generate tags, default false",
13
13
  default: false,
14
14
  }),
15
- 'tags-file': Flags.file({
15
+ "tags-file": Flags.file({
16
16
  description: 'where to put ".tags" file, it should be a root of VS Code project',
17
- default: '../../.tags', // usually a user opens a directory with all blocks
17
+ default: "../../.tags", // usually a user opens a directory with all blocks
18
18
  }),
19
- 'tags-additional-args': Flags.string({
20
- description: 'additional flags for universal-ctags command: e.g. -e for emacs',
19
+ "tags-additional-args": Flags.string({
20
+ description: "additional flags for universal-ctags command: e.g. -e for emacs",
21
21
  default: [],
22
22
  multiple: true,
23
- delimiter: ',',
23
+ delimiter: ",",
24
24
  }),
25
25
  };
26
26
  const ArtifactTypeFlag = {
27
27
  type: Flags.string({
28
- aliases: ['t'],
29
- description: 'artifact type',
30
- options: ['all', 'library', 'template', 'test', 'software', 'asset'],
31
- default: 'all',
28
+ aliases: ["t"],
29
+ description: "artifact type",
30
+ options: ["all", "library", "template", "test", "software", "asset"],
31
+ default: "all",
32
32
  }),
33
33
  };
34
34
 
@@ -1 +1 @@
1
- {"version":3,"file":"basecmd.js","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"],"names":[],"mappings":";;AAEO,MAAM,WAAW,GAAG;AACzB,IAAA,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;AACxB,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;KAC5C,CAAC;;AAGG,MAAM,UAAU,GAAG;AACxB,IAAA,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC;AAC7B,QAAA,WAAW,EAAE,8BAA8B;AAC3C,QAAA,OAAO,EAAE,KAAK;KACf,CAAC;AAEF,IAAA,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC;AACtB,QAAA,WAAW,EAAE,mEAAmE;QAChF,OAAO,EAAE,aAAa;KACvB,CAAC;AAEF,IAAA,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC;AACnC,QAAA,WAAW,EAAE,iEAAiE;AAC9E,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,SAAS,EAAE,GAAG;KACf,CAAC;;AAGG,MAAM,gBAAgB,GAAG;AAC9B,IAAA,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,OAAO,EAAE,CAAC,GAAG,CAAC;AACd,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC;AACpE,QAAA,OAAO,EAAE,KAAK;KACf,CAAC;;;;;"}
1
+ {"version":3,"file":"basecmd.js","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"],"names":[],"mappings":";;AAEO,MAAM,WAAW,GAAG;AACzB,IAAA,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;AACxB,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;KAC5C,CAAC;;AAGG,MAAM,UAAU,GAAG;AACxB,IAAA,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC;AAC7B,QAAA,WAAW,EAAE,8BAA8B;AAC3C,QAAA,OAAO,EAAE,KAAK;KACf,CAAC;AAEF,IAAA,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC;AACtB,QAAA,WAAW,EAAE,mEAAmE;QAChF,OAAO,EAAE,aAAa;KACvB,CAAC;AAEF,IAAA,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC;AACnC,QAAA,WAAW,EAAE,iEAAiE;AAC9E,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,SAAS,EAAE,GAAG;KACf,CAAC;;AAGG,MAAM,gBAAgB,GAAG;AAC9B,IAAA,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,OAAO,EAAE,CAAC,GAAG,CAAC;AACd,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC;AACpE,QAAA,OAAO,EAAE,KAAK;KACf,CAAC;;;;;"}
@@ -5,8 +5,8 @@ var _package = require('../compiler/package.cjs');
5
5
 
6
6
  function dumpArtifacts(logger, stream, aType) {
7
7
  const packageInfo = main.getPackageInfo(process.cwd(), logger);
8
- const sources = main.parseSources(logger, packageInfo, 'dist', 'src', '');
9
- const compiler = main.newCompiler(logger, packageInfo, 'dist');
8
+ const sources = main.parseSources(logger, packageInfo, "dist", "src", "");
9
+ const compiler = main.newCompiler(logger, packageInfo, "dist");
10
10
  // group output by type:
11
11
  // - all libs
12
12
  // - all templates
@@ -14,86 +14,86 @@ function dumpArtifacts(logger, stream, aType) {
14
14
  // - all assets
15
15
  // - all tests
16
16
  // Libs
17
- if (!aType || aType === 'library') {
17
+ if (!aType || aType === "library") {
18
18
  for (const lib of compiler.allLibs()) {
19
19
  logger.debug(`Dumping to pl-tester: ${_package.typedArtifactNameToString(lib.fullName)}`);
20
- stream.write(JSON.stringify(lib) + '\n');
20
+ stream.write(JSON.stringify(lib) + "\n");
21
21
  }
22
22
  for (const src of sources) {
23
- if (src.fullName.type === 'library') {
23
+ if (src.fullName.type === "library") {
24
24
  logger.debug(`Dumping to pl-tester: ${_package.typedArtifactNameToString(src.fullName)}`);
25
- stream.write(JSON.stringify(src) + '\n');
25
+ stream.write(JSON.stringify(src) + "\n");
26
26
  }
27
27
  }
28
28
  }
29
29
  // Templates
30
- if (!aType || aType === 'template') {
30
+ if (!aType || aType === "template") {
31
31
  for (const tpl of compiler.allTemplates()) {
32
32
  logger.debug(`Dumping to pl-tester: ${_package.typedArtifactNameToString(tpl.fullName)}`);
33
- stream.write(JSON.stringify(tpl) + '\n');
33
+ stream.write(JSON.stringify(tpl) + "\n");
34
34
  }
35
35
  for (const src of sources) {
36
- if (src.fullName.type === 'template') {
36
+ if (src.fullName.type === "template") {
37
37
  logger.debug(`Dumping to pl-tester: ${_package.typedArtifactNameToString(src.fullName)} ${src.srcName}`);
38
- stream.write(JSON.stringify(src) + '\n');
38
+ stream.write(JSON.stringify(src) + "\n");
39
39
  }
40
40
  }
41
41
  }
42
42
  // Software
43
- if (!aType || aType === 'software') {
43
+ if (!aType || aType === "software") {
44
44
  for (const sw of compiler.allSoftware()) {
45
45
  logger.debug(`Dumping to pl-tester: ${_package.typedArtifactNameToString(sw.fullName)}`);
46
- stream.write(JSON.stringify(sw) + '\n');
46
+ stream.write(JSON.stringify(sw) + "\n");
47
47
  }
48
48
  for (const src of sources) {
49
- if (src.fullName.type === 'software') {
49
+ if (src.fullName.type === "software") {
50
50
  logger.debug(`Dumping to pl-tester: ${_package.typedArtifactNameToString(src.fullName)}`);
51
- stream.write(JSON.stringify(src) + '\n');
51
+ stream.write(JSON.stringify(src) + "\n");
52
52
  }
53
53
  }
54
54
  }
55
55
  // Assets
56
- if (!aType || aType === 'asset') {
56
+ if (!aType || aType === "asset") {
57
57
  for (const asset of compiler.allAssets()) {
58
58
  logger.debug(`Dumping to pl-tester: ${_package.typedArtifactNameToString(asset.fullName)}`);
59
- stream.write(JSON.stringify(asset) + '\n');
59
+ stream.write(JSON.stringify(asset) + "\n");
60
60
  }
61
61
  for (const src of sources) {
62
- if (src.fullName.type === 'asset') {
62
+ if (src.fullName.type === "asset") {
63
63
  logger.debug(`Dumping to pl-tester: ${_package.typedArtifactNameToString(src.fullName)}`);
64
- stream.write(JSON.stringify(src) + '\n');
64
+ stream.write(JSON.stringify(src) + "\n");
65
65
  }
66
66
  }
67
67
  }
68
68
  // Tests
69
- if (!aType || aType === 'test') {
69
+ if (!aType || aType === "test") {
70
70
  for (const src of sources) {
71
- if (src.fullName.type === 'test') {
71
+ if (src.fullName.type === "test") {
72
72
  logger.debug(`Dumping to pl-tester: ${_package.typedArtifactNameToString(src.fullName)} ${src.srcName}`);
73
- stream.write(JSON.stringify(src) + '\n');
73
+ stream.write(JSON.stringify(src) + "\n");
74
74
  }
75
75
  }
76
76
  }
77
77
  }
78
78
  function dumpSoftware(logger, stream) {
79
79
  const packageInfo = main.getPackageInfo(process.cwd(), logger);
80
- const compiled = main.compile(logger, packageInfo, 'dist');
80
+ const compiled = main.compile(logger, packageInfo, "dist");
81
81
  const hashes = new Set();
82
82
  const sourceMap = new Map();
83
83
  for (const tpl of compiled.templates) {
84
84
  Object.entries(tpl.data.hashToSource).forEach(([hash, src]) => sourceMap.set(hash, src));
85
- getTemplateSoftware(stream, tpl.data.template).forEach((hash) => hashes.add(hash));
85
+ getTemplateSoftware(tpl.data.template).forEach((hash) => hashes.add(hash));
86
86
  }
87
87
  for (const hash of hashes) {
88
88
  const src = sourceMap.get(hash);
89
89
  if (src) {
90
- if (Object.hasOwn(JSON.parse(src), 'asset')) {
90
+ if (Object.hasOwn(JSON.parse(src), "asset")) {
91
91
  // Skip assets. They are kept in templates software because of backward compatibility with backend.
92
92
  continue;
93
93
  }
94
94
  stream.write(src);
95
- if (!src.endsWith('\n')) {
96
- stream.write('\n');
95
+ if (!src.endsWith("\n")) {
96
+ stream.write("\n");
97
97
  }
98
98
  }
99
99
  else {
@@ -101,13 +101,13 @@ function dumpSoftware(logger, stream) {
101
101
  }
102
102
  }
103
103
  }
104
- function getTemplateSoftware(stream, tpl) {
104
+ function getTemplateSoftware(tpl) {
105
105
  const hashes = new Set();
106
106
  for (const sw of Object.values(tpl.software)) {
107
107
  hashes.add(sw.sourceHash);
108
108
  }
109
109
  for (const subTpl of Object.values(tpl.templates)) {
110
- getTemplateSoftware(stream, subTpl).forEach((hash) => hashes.add(hash));
110
+ getTemplateSoftware(subTpl).forEach((hash) => hashes.add(hash));
111
111
  }
112
112
  return new Set(hashes);
113
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dump.cjs","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(\n `Dumping to pl-tester: ${typedArtifactNameToString(lib.fullName)}`,\n );\n stream.write(JSON.stringify(lib) + '\\n');\n }\n\n for (const src of sources) {\n if (src.fullName.type === 'library') {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`,\n );\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(\n `Dumping to pl-tester: ${typedArtifactNameToString(tpl.fullName)}`,\n );\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)} ${\n src.srcName\n }`,\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(\n `Dumping to pl-tester: ${typedArtifactNameToString(sw.fullName)}`,\n );\n stream.write(JSON.stringify(sw) + '\\n');\n }\n\n for (const src of sources) {\n if (src.fullName.type === 'software') {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`,\n );\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(\n `Dumping to pl-tester: ${typedArtifactNameToString(asset.fullName)}`,\n );\n stream.write(JSON.stringify(asset) + '\\n');\n }\n\n for (const src of sources) {\n if (src.fullName.type === 'asset') {\n logger.debug(\n `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`,\n );\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)} ${\n src.srcName\n }`,\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(\n logger: winston.Logger,\n stream: NodeJS.WritableStream,\n): 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(stream, 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(stream: NodeJS.WritableStream, 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(stream, subTpl).forEach((hash) => hashes.add(hash));\n }\n\n return new Set(hashes);\n}\n"],"names":["getPackageInfo","parseSources","newCompiler","typedArtifactNameToString","compile"],"mappings":";;;;;SAMgB,aAAa,CAC3B,MAAsB,EACtB,MAA6B,EAC7B,KAAoB,EAAA;IAEpB,MAAM,WAAW,GAAGA,mBAAc,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC;AAEzD,IAAA,MAAM,OAAO,GAAGC,iBAAY,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;IAEpE,MAAM,QAAQ,GAAGC,gBAAW,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC;;;;;;;;AAWzD,IAAA,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,SAAS,EAAE;QACjC,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;AACpC,YAAA,MAAM,CAAC,KAAK,CACV,CAAA,sBAAA,EAAyB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AM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;QAC/B,IAAI,GAAG,EAAE;AACP,YAAA,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAW,EAAE,OAAO,CAAC,EAAE;;gBAErD;YACF;AACA,YAAA,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;YACjB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;AACvB,gBAAA,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;YACpB;QACF;aAAO;AACL,YAAA,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,CAAA,CAAE,CAAC;QACvD;IACF;AACF;AAEA,SAAS,mBAAmB,CAAC,MAA6B,EAAE,GAAmB,EAAA;AAC7E,IAAA,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU;AAChC,IAAA,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;AAC5C,QAAA,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC;IAC3B;AACA,IAAA,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;QACjD,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACzE;AAEA,IAAA,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC;AACxB;;;;;"}
1
+ {"version":3,"file":"dump.cjs","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"],"names":["getPackageInfo","parseSources","newCompiler","typedArtifactNameToString","compile"],"mappings":";;;;;SAMgB,aAAa,CAC3B,MAAsB,EACtB,MAA6B,EAC7B,KAAoB,EAAA;IAEpB,MAAM,WAAW,GAAGA,mBAAc,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC;AAEzD,IAAA,MAAM,OAAO,GAAGC,iBAAY,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;IAEpE,MAAM,QAAQ,GAAGC,gBAAW,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC;;;;;;;;AAWzD,IAAA,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,SAAS,EAAE;QACjC,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;AACpC,YAAA,MAAM,CAAC,KAAK,CAAC,CAAA,sBAAA,EAAyBC,kCAAyB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA,CAAE,CAAC;AAChF,YAAA,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QAC1C;AAEA,QAAA,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;YACzB,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE;AACnC,gBAAA,MAAM,CAAC,KAAK,CAAC,CAAA,sBAAA,EAAyBA,kCAAyB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA,CAAE,CAAC;AAChF,gBAAA,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;YAC1C;QACF;IACF;;AAIA,IAAA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AA,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU;AAChC,IAAA,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;AAC5C,QAAA,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC;IAC3B;AACA,IAAA,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;AACjD,QAAA,mBAAmB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjE;AAEA,IAAA,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC;AACxB;;;;;"}
@@ -1,5 +1,5 @@
1
- import type winston from 'winston';
2
- import type { ArtifactType } from '../compiler/package';
1
+ import type winston from "winston";
2
+ import type { ArtifactType } from "../compiler/package";
3
3
  export declare function dumpArtifacts(logger: winston.Logger, stream: NodeJS.WritableStream, aType?: ArtifactType): void;
4
4
  export declare function dumpLibs(logger: winston.Logger, stream: NodeJS.WritableStream, recursive: boolean): void;
5
5
  export declare function dumpSoftware(logger: winston.Logger, stream: NodeJS.WritableStream): void;
@@ -1 +1 @@
1
- {"version":3,"file":"dump.d.ts","sourceRoot":"","sources":["../../src/shared/dump.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,wBAAgB,aAAa,CAC3B,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,KAAK,CAAC,EAAE,YAAY,GACnB,IAAI,CA8GN;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,SAAS,EAAE,OAAO,GACjB,IAAI,CAyBN;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,MAAM,EAAE,MAAM,CAAC,cAAc,GAC5B,IAAI,CA0BN"}
1
+ {"version":3,"file":"dump.d.ts","sourceRoot":"","sources":["../../src/shared/dump.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,wBAAgB,aAAa,CAC3B,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,KAAK,CAAC,EAAE,YAAY,GACnB,IAAI,CA4FN;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,SAAS,EAAE,OAAO,GACjB,IAAI,CAyBN;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI,CA0BxF"}