@platforma-sdk/tengo-builder 2.2.4 → 2.3.0

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 (84) hide show
  1. package/dist/commands/build.cjs.map +1 -1
  2. package/dist/commands/build.js.map +1 -1
  3. package/dist/commands/check.cjs +1 -1
  4. package/dist/commands/check.cjs.map +1 -1
  5. package/dist/commands/check.js +2 -2
  6. package/dist/commands/check.js.map +1 -1
  7. package/dist/commands/dump/artifacts.cjs +26 -0
  8. package/dist/commands/dump/artifacts.cjs.map +1 -0
  9. package/dist/commands/dump/artifacts.d.ts +11 -0
  10. package/dist/commands/dump/artifacts.d.ts.map +1 -0
  11. package/dist/commands/dump/artifacts.js +24 -0
  12. package/dist/commands/dump/artifacts.js.map +1 -0
  13. package/dist/commands/dump/software.cjs +7 -2
  14. package/dist/commands/dump/software.cjs.map +1 -1
  15. package/dist/commands/dump/software.d.ts +3 -0
  16. package/dist/commands/dump/software.d.ts.map +1 -1
  17. package/dist/commands/dump/software.js +7 -2
  18. package/dist/commands/dump/software.js.map +1 -1
  19. package/dist/commands/test.cjs +1 -1
  20. package/dist/commands/test.cjs.map +1 -1
  21. package/dist/commands/test.js +2 -2
  22. package/dist/commands/test.js.map +1 -1
  23. package/dist/index.cjs +2 -10
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.ts +4 -12
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +2 -10
  28. package/dist/index.js.map +1 -1
  29. package/dist/shared/basecmd.cjs +9 -0
  30. package/dist/shared/basecmd.cjs.map +1 -1
  31. package/dist/shared/basecmd.d.ts +3 -0
  32. package/dist/shared/basecmd.d.ts.map +1 -1
  33. package/dist/shared/basecmd.js +9 -1
  34. package/dist/shared/basecmd.js.map +1 -1
  35. package/dist/shared/dump.cjs +76 -76
  36. package/dist/shared/dump.cjs.map +1 -1
  37. package/dist/shared/dump.d.ts +3 -5
  38. package/dist/shared/dump.d.ts.map +1 -1
  39. package/dist/shared/dump.js +77 -73
  40. package/dist/shared/dump.js.map +1 -1
  41. package/package.json +6 -6
  42. package/src/commands/build.ts +3 -3
  43. package/src/commands/check.ts +2 -2
  44. package/src/commands/dump/artifacts.ts +28 -0
  45. package/src/commands/dump/software.ts +8 -2
  46. package/src/commands/test.ts +2 -2
  47. package/src/index.ts +4 -12
  48. package/src/shared/basecmd.ts +9 -0
  49. package/src/shared/dump.ts +100 -89
  50. package/dist/commands/dump/all.cjs +0 -20
  51. package/dist/commands/dump/all.cjs.map +0 -1
  52. package/dist/commands/dump/all.d.ts +0 -7
  53. package/dist/commands/dump/all.d.ts.map +0 -1
  54. package/dist/commands/dump/all.js +0 -18
  55. package/dist/commands/dump/all.js.map +0 -1
  56. package/dist/commands/dump/assets.cjs +0 -20
  57. package/dist/commands/dump/assets.cjs.map +0 -1
  58. package/dist/commands/dump/assets.d.ts +0 -7
  59. package/dist/commands/dump/assets.d.ts.map +0 -1
  60. package/dist/commands/dump/assets.js +0 -18
  61. package/dist/commands/dump/assets.js.map +0 -1
  62. package/dist/commands/dump/libs.cjs +0 -24
  63. package/dist/commands/dump/libs.cjs.map +0 -1
  64. package/dist/commands/dump/libs.d.ts +0 -10
  65. package/dist/commands/dump/libs.d.ts.map +0 -1
  66. package/dist/commands/dump/libs.js +0 -22
  67. package/dist/commands/dump/libs.js.map +0 -1
  68. package/dist/commands/dump/templates.cjs +0 -20
  69. package/dist/commands/dump/templates.cjs.map +0 -1
  70. package/dist/commands/dump/templates.d.ts +0 -7
  71. package/dist/commands/dump/templates.d.ts.map +0 -1
  72. package/dist/commands/dump/templates.js +0 -18
  73. package/dist/commands/dump/templates.js.map +0 -1
  74. package/dist/commands/dump/tests.cjs +0 -20
  75. package/dist/commands/dump/tests.cjs.map +0 -1
  76. package/dist/commands/dump/tests.d.ts +0 -7
  77. package/dist/commands/dump/tests.d.ts.map +0 -1
  78. package/dist/commands/dump/tests.js +0 -18
  79. package/dist/commands/dump/tests.js.map +0 -1
  80. package/src/commands/dump/all.ts +0 -17
  81. package/src/commands/dump/assets.ts +0 -17
  82. package/src/commands/dump/libs.ts +0 -23
  83. package/src/commands/dump/templates.ts +0 -17
  84. package/src/commands/dump/tests.ts +0 -17
@@ -2,16 +2,22 @@ import { Command } from '@oclif/core';
2
2
  import { createLogger } from '../../compiler/util';
3
3
  import { dumpSoftware } from '../../shared/dump';
4
4
  import { stdout } from 'node:process';
5
+ import * as opts from '../../shared/basecmd';
5
6
 
6
7
  export default class DumpSoftware extends Command {
7
- static override description = 'parse sources in current package and dump all found software to stdout';
8
+ static override description = 'parse sources in current package and dump all software descriptors used by templates';
8
9
 
9
10
  static override examples = [
10
11
  '<%= config.bin %> <%= command.id %>',
11
12
  ];
12
13
 
14
+ static override flags = {
15
+ ...opts.GlobalFlags,
16
+ };
17
+
13
18
  public async run(): Promise<void> {
14
- const logger = createLogger();
19
+ const { flags } = await this.parse(DumpSoftware);
20
+ const logger = createLogger(flags['log-level']);
15
21
  dumpSoftware(logger, stdout);
16
22
  }
17
23
  }
@@ -1,6 +1,6 @@
1
1
  import { Command } from '@oclif/core';
2
2
  import { createLogger } from '../compiler/util';
3
- import { dumpAll } from '../shared/dump';
3
+ import { dumpArtifacts } from '../shared/dump';
4
4
  import { GlobalFlags } from '../shared/basecmd';
5
5
  import { spawnEmbed, waitFor } from '../shared/proc';
6
6
  import { TengoTesterBinaryPath } from '@milaboratories/tengo-tester';
@@ -29,7 +29,7 @@ export default class Test extends Command {
29
29
  );
30
30
 
31
31
  try {
32
- dumpAll(logger, tester.stdin);
32
+ dumpArtifacts(logger, tester.stdin);
33
33
  } catch (err: unknown) {
34
34
  logger.error(err);
35
35
  } finally {
package/src/index.ts CHANGED
@@ -3,22 +3,14 @@
3
3
  import Cmd0 from './commands/build';
4
4
  import Cmd1 from './commands/check';
5
5
  import Cmd2 from './commands/test';
6
- import Cmd3 from './commands/dump/all';
7
- import Cmd4 from './commands/dump/assets';
8
- import Cmd5 from './commands/dump/libs';
9
- import Cmd6 from './commands/dump/software';
10
- import Cmd7 from './commands/dump/templates';
11
- import Cmd8 from './commands/dump/tests';
6
+ import Cmd3 from './commands/dump/artifacts';
7
+ import Cmd4 from './commands/dump/software';
12
8
 
13
9
  // prettier-ignore
14
10
  export const COMMANDS = {
15
11
  'build': Cmd0,
16
12
  'check': Cmd1,
17
13
  'test': Cmd2,
18
- 'dump:all': Cmd3,
19
- 'dump:assets': Cmd4,
20
- 'dump:libs': Cmd5,
21
- 'dump:software': Cmd6,
22
- 'dump:templates': Cmd7,
23
- 'dump:tests': Cmd8,
14
+ 'dump:artifacts': Cmd3,
15
+ 'dump:software': Cmd4,
24
16
  };
@@ -26,3 +26,12 @@ export const CtagsFlags = {
26
26
  delimiter: ',',
27
27
  }),
28
28
  };
29
+
30
+ export const ArtifactTypeFlag = {
31
+ type: Flags.string({
32
+ aliases: ['t'],
33
+ description: 'artifact type',
34
+ options: ['all', 'library', 'template', 'test', 'software', 'asset'],
35
+ default: 'all',
36
+ }),
37
+ };
@@ -1,11 +1,13 @@
1
1
  import type winston from 'winston';
2
- import { getPackageInfo, newCompiler, parseSources } from '../compiler/main';
2
+ import { getPackageInfo, newCompiler, compile, parseSources } from '../compiler/main';
3
3
  import type { ArtifactType } from '../compiler/package';
4
4
  import { typedArtifactNameToString } from '../compiler/package';
5
+ import type { TemplateDataV3 } from '@milaboratories/pl-model-backend';
5
6
 
6
- export function dumpAll(
7
+ export function dumpArtifacts(
7
8
  logger: winston.Logger,
8
9
  stream: NodeJS.WritableStream,
10
+ aType?: ArtifactType,
9
11
  ): void {
10
12
  const packageInfo = getPackageInfo(process.cwd(), logger);
11
13
 
@@ -22,102 +24,112 @@ export function dumpAll(
22
24
 
23
25
  // Libs
24
26
 
25
- for (const lib of compiler.allLibs()) {
26
- logger.debug(
27
- `Dumping to pl-tester: ${typedArtifactNameToString(lib.fullName)}`,
28
- );
29
- stream.write(JSON.stringify(lib) + '\n');
30
- }
31
-
32
- for (const src of sources) {
33
- if (src.fullName.type === 'library') {
27
+ if (!aType || aType === 'library') {
28
+ for (const lib of compiler.allLibs()) {
34
29
  logger.debug(
35
- `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`,
30
+ `Dumping to pl-tester: ${typedArtifactNameToString(lib.fullName)}`,
36
31
  );
37
- stream.write(JSON.stringify(src) + '\n');
32
+ stream.write(JSON.stringify(lib) + '\n');
33
+ }
34
+
35
+ for (const src of sources) {
36
+ if (src.fullName.type === 'library') {
37
+ logger.debug(
38
+ `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`,
39
+ );
40
+ stream.write(JSON.stringify(src) + '\n');
41
+ }
38
42
  }
39
43
  }
40
44
 
41
45
  // Templates
42
46
 
43
- for (const tpl of compiler.allTemplates()) {
44
- logger.debug(
45
- `Dumping to pl-tester: ${typedArtifactNameToString(tpl.fullName)}`,
46
- );
47
- stream.write(JSON.stringify(tpl) + '\n');
48
- }
49
-
50
- for (const src of sources) {
51
- if (src.fullName.type === 'template') {
47
+ if (!aType || aType === 'template') {
48
+ for (const tpl of compiler.allTemplates()) {
52
49
  logger.debug(
53
- `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${
54
- src.srcName
55
- }`,
50
+ `Dumping to pl-tester: ${typedArtifactNameToString(tpl.fullName)}`,
56
51
  );
57
- stream.write(JSON.stringify(src) + '\n');
52
+ stream.write(JSON.stringify(tpl) + '\n');
53
+ }
54
+
55
+ for (const src of sources) {
56
+ if (src.fullName.type === 'template') {
57
+ logger.debug(
58
+ `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${
59
+ src.srcName
60
+ }`,
61
+ );
62
+ stream.write(JSON.stringify(src) + '\n');
63
+ }
58
64
  }
59
65
  }
60
66
 
61
67
  // Software
62
68
 
63
- for (const sw of compiler.allSoftware()) {
64
- logger.debug(
65
- `Dumping to pl-tester: ${typedArtifactNameToString(sw.fullName)}`,
66
- );
67
- stream.write(JSON.stringify(sw) + '\n');
68
- }
69
-
70
- for (const src of sources) {
71
- if (src.fullName.type === 'software') {
69
+ if (!aType || aType === 'software') {
70
+ for (const sw of compiler.allSoftware()) {
72
71
  logger.debug(
73
- `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`,
72
+ `Dumping to pl-tester: ${typedArtifactNameToString(sw.fullName)}`,
74
73
  );
75
- stream.write(JSON.stringify(src) + '\n');
74
+ stream.write(JSON.stringify(sw) + '\n');
75
+ }
76
+
77
+ for (const src of sources) {
78
+ if (src.fullName.type === 'software') {
79
+ logger.debug(
80
+ `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`,
81
+ );
82
+ stream.write(JSON.stringify(src) + '\n');
83
+ }
76
84
  }
77
85
  }
78
86
 
79
87
  // Assets
80
88
 
81
- for (const asset of compiler.allAssets()) {
82
- logger.debug(
83
- `Dumping to pl-tester: ${typedArtifactNameToString(asset.fullName)}`,
84
- );
85
- stream.write(JSON.stringify(asset) + '\n');
86
- }
87
-
88
- for (const src of sources) {
89
- if (src.fullName.type === 'asset') {
89
+ if (!aType || aType === 'asset') {
90
+ for (const asset of compiler.allAssets()) {
90
91
  logger.debug(
91
- `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`,
92
+ `Dumping to pl-tester: ${typedArtifactNameToString(asset.fullName)}`,
92
93
  );
93
- stream.write(JSON.stringify(src) + '\n');
94
+ stream.write(JSON.stringify(asset) + '\n');
95
+ }
96
+
97
+ for (const src of sources) {
98
+ if (src.fullName.type === 'asset') {
99
+ logger.debug(
100
+ `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)}`,
101
+ );
102
+ stream.write(JSON.stringify(src) + '\n');
103
+ }
94
104
  }
95
105
  }
96
106
 
97
107
  // Tests
98
108
 
99
- for (const src of sources) {
100
- if (src.fullName.type === 'test') {
101
- logger.debug(
102
- `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${
103
- src.srcName
104
- }`,
105
- );
106
- stream.write(JSON.stringify(src) + '\n');
109
+ if (!aType || aType === 'test') {
110
+ for (const src of sources) {
111
+ if (src.fullName.type === 'test') {
112
+ logger.debug(
113
+ `Dumping to pl-tester: ${typedArtifactNameToString(src.fullName)} ${
114
+ src.srcName
115
+ }`,
116
+ );
117
+ stream.write(JSON.stringify(src) + '\n');
118
+ }
107
119
  }
108
120
  }
109
121
  }
110
122
 
111
123
  export function dumpLibs(
112
124
  logger: winston.Logger,
113
- dumpDeps: boolean,
114
125
  stream: NodeJS.WritableStream,
126
+ recursive: boolean,
115
127
  ): void {
116
128
  const packageInfo = getPackageInfo(process.cwd(), logger);
117
129
 
118
130
  const sources = parseSources(logger, packageInfo, 'dist', 'src', '');
119
131
 
120
- if (!dumpDeps) {
132
+ if (!recursive) {
121
133
  for (const src of sources) {
122
134
  if (src.fullName.type === 'library') {
123
135
  stream.write(JSON.stringify(src) + '\n');
@@ -139,46 +151,45 @@ export function dumpLibs(
139
151
  }
140
152
  }
141
153
 
142
- function dumpArtifacts(
154
+ export function dumpSoftware(
143
155
  logger: winston.Logger,
144
156
  stream: NodeJS.WritableStream,
145
- aType: ArtifactType,
146
157
  ): void {
147
158
  const packageInfo = getPackageInfo(process.cwd(), logger);
159
+ const compiled = compile(logger, packageInfo, 'dist');
148
160
 
149
- const sources = parseSources(logger, packageInfo, 'dist', 'src', '');
161
+ const hashes = new Set<string>();
162
+ const sourceMap = new Map<string, string>();
163
+ for (const tpl of compiled.templates) {
164
+ Object.entries(tpl.data.hashToSource).forEach(([hash, src]) => sourceMap.set(hash, src));
165
+ getTemplateSoftware(stream, tpl.data.template).forEach((hash) => hashes.add(hash));
166
+ }
150
167
 
151
- for (const src of sources) {
152
- if (src.fullName.type === aType) {
153
- stream.write(JSON.stringify(src) + '\n');
168
+ for (const hash of hashes) {
169
+ const src = sourceMap.get(hash);
170
+ if (src) {
171
+ if (Object.hasOwn(JSON.parse(src) as object, 'asset')) {
172
+ // Skip assets. They are kept in templates software because of backward compatibility with backend.
173
+ continue;
174
+ }
175
+ stream.write(src);
176
+ if (!src.endsWith('\n')) {
177
+ stream.write('\n');
178
+ }
179
+ } else {
180
+ throw new Error(`Source not found for hash: ${hash}`);
154
181
  }
155
182
  }
156
183
  }
157
184
 
158
- export function dumpTemplates(
159
- logger: winston.Logger,
160
- stream: NodeJS.WritableStream,
161
- ): void {
162
- dumpArtifacts(logger, stream, 'template');
163
- }
164
-
165
- export function dumpSoftware(
166
- logger: winston.Logger,
167
- stream: NodeJS.WritableStream,
168
- ): void {
169
- dumpArtifacts(logger, stream, 'software');
170
- }
171
-
172
- export function dumpAssets(
173
- logger: winston.Logger,
174
- stream: NodeJS.WritableStream,
175
- ): void {
176
- dumpArtifacts(logger, stream, 'asset');
177
- }
185
+ function getTemplateSoftware(stream: NodeJS.WritableStream, tpl: TemplateDataV3): Set<string> {
186
+ const hashes = new Set<string>();
187
+ for (const sw of Object.values(tpl.software)) {
188
+ hashes.add(sw.sourceHash);
189
+ }
190
+ for (const subTpl of Object.values(tpl.templates)) {
191
+ getTemplateSoftware(stream, subTpl).forEach((hash) => hashes.add(hash));
192
+ }
178
193
 
179
- export function dumpTests(
180
- logger: winston.Logger,
181
- stream: NodeJS.WritableStream,
182
- ): void {
183
- dumpArtifacts(logger, stream, 'test');
194
+ return new Set(hashes);
184
195
  }
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@oclif/core');
4
- var util = require('../../compiler/util.cjs');
5
- var dump = require('../../shared/dump.cjs');
6
- var node_process = require('node:process');
7
-
8
- class DumpAll extends core.Command {
9
- static description = 'parse sources in current package and dump all found artifacts to stdout';
10
- static examples = [
11
- '<%= config.bin %> <%= command.id %>',
12
- ];
13
- async run() {
14
- const logger = util.createLogger();
15
- dump.dumpAll(logger, node_process.stdout);
16
- }
17
- }
18
-
19
- module.exports = DumpAll;
20
- //# sourceMappingURL=all.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"all.cjs","sources":["../../../src/commands/dump/all.ts"],"sourcesContent":["import { Command } from '@oclif/core';\nimport { createLogger } from '../../compiler/util';\nimport { dumpAll } from '../../shared/dump';\nimport { stdout } from 'node:process';\n\nexport default class DumpAll extends Command {\n static override description = 'parse sources in current package and dump all found artifacts to stdout';\n\n static override examples = [\n '<%= config.bin %> <%= command.id %>',\n ];\n\n public async run(): Promise<void> {\n const logger = createLogger();\n dumpAll(logger, stdout);\n }\n}\n"],"names":["Command","createLogger","dumpAll","stdout"],"mappings":";;;;;;;AAKc,MAAO,OAAQ,SAAQA,YAAO,CAAA;AAC1C,IAAA,OAAgB,WAAW,GAAG,yEAAyE;IAEvG,OAAgB,QAAQ,GAAG;QACzB,qCAAqC;KACtC;AAEM,IAAA,MAAM,GAAG,GAAA;AACd,QAAA,MAAM,MAAM,GAAGC,iBAAY,EAAE;AAC7B,QAAAC,YAAO,CAAC,MAAM,EAAEC,mBAAM,CAAC;IACzB;;;;;"}
@@ -1,7 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class DumpAll extends Command {
3
- static description: string;
4
- static examples: string[];
5
- run(): Promise<void>;
6
- }
7
- //# sourceMappingURL=all.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../../src/commands/dump/all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAKtC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,OAAO;IAC1C,OAAgB,WAAW,SAA6E;IAExG,OAAgB,QAAQ,WAEtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAIlC"}
@@ -1,18 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- import { createLogger } from '../../compiler/util.js';
3
- import { dumpAll } from '../../shared/dump.js';
4
- import { stdout } from 'node:process';
5
-
6
- class DumpAll extends Command {
7
- static description = 'parse sources in current package and dump all found artifacts to stdout';
8
- static examples = [
9
- '<%= config.bin %> <%= command.id %>',
10
- ];
11
- async run() {
12
- const logger = createLogger();
13
- dumpAll(logger, stdout);
14
- }
15
- }
16
-
17
- export { DumpAll as default };
18
- //# sourceMappingURL=all.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"all.js","sources":["../../../src/commands/dump/all.ts"],"sourcesContent":["import { Command } from '@oclif/core';\nimport { createLogger } from '../../compiler/util';\nimport { dumpAll } from '../../shared/dump';\nimport { stdout } from 'node:process';\n\nexport default class DumpAll extends Command {\n static override description = 'parse sources in current package and dump all found artifacts to stdout';\n\n static override examples = [\n '<%= config.bin %> <%= command.id %>',\n ];\n\n public async run(): Promise<void> {\n const logger = createLogger();\n dumpAll(logger, stdout);\n }\n}\n"],"names":[],"mappings":";;;;;AAKc,MAAO,OAAQ,SAAQ,OAAO,CAAA;AAC1C,IAAA,OAAgB,WAAW,GAAG,yEAAyE;IAEvG,OAAgB,QAAQ,GAAG;QACzB,qCAAqC;KACtC;AAEM,IAAA,MAAM,GAAG,GAAA;AACd,QAAA,MAAM,MAAM,GAAG,YAAY,EAAE;AAC7B,QAAA,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB;;;;;"}
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@oclif/core');
4
- var util = require('../../compiler/util.cjs');
5
- var dump = require('../../shared/dump.cjs');
6
- var node_process = require('node:process');
7
-
8
- class DumpAssets extends core.Command {
9
- static description = 'parse sources in current package and dump all found assets to stdout';
10
- static examples = [
11
- '<%= config.bin %> <%= command.id %>',
12
- ];
13
- async run() {
14
- const logger = util.createLogger();
15
- dump.dumpAssets(logger, node_process.stdout);
16
- }
17
- }
18
-
19
- module.exports = DumpAssets;
20
- //# sourceMappingURL=assets.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assets.cjs","sources":["../../../src/commands/dump/assets.ts"],"sourcesContent":["import { Command } from '@oclif/core';\nimport { createLogger } from '../../compiler/util';\nimport { dumpAssets } from '../../shared/dump';\nimport { stdout } from 'node:process';\n\nexport default class DumpAssets extends Command {\n static override description = 'parse sources in current package and dump all found assets to stdout';\n\n static override examples = [\n '<%= config.bin %> <%= command.id %>',\n ];\n\n public async run(): Promise<void> {\n const logger = createLogger();\n dumpAssets(logger, stdout);\n }\n}\n"],"names":["Command","createLogger","dumpAssets","stdout"],"mappings":";;;;;;;AAKc,MAAO,UAAW,SAAQA,YAAO,CAAA;AAC7C,IAAA,OAAgB,WAAW,GAAG,sEAAsE;IAEpG,OAAgB,QAAQ,GAAG;QACzB,qCAAqC;KACtC;AAEM,IAAA,MAAM,GAAG,GAAA;AACd,QAAA,MAAM,MAAM,GAAGC,iBAAY,EAAE;AAC7B,QAAAC,eAAU,CAAC,MAAM,EAAEC,mBAAM,CAAC;IAC5B;;;;;"}
@@ -1,7 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class DumpAssets extends Command {
3
- static description: string;
4
- static examples: string[];
5
- run(): Promise<void>;
6
- }
7
- //# sourceMappingURL=assets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../src/commands/dump/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAKtC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,OAAO;IAC7C,OAAgB,WAAW,SAA0E;IAErG,OAAgB,QAAQ,WAEtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAIlC"}
@@ -1,18 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- import { createLogger } from '../../compiler/util.js';
3
- import { dumpAssets } from '../../shared/dump.js';
4
- import { stdout } from 'node:process';
5
-
6
- class DumpAssets extends Command {
7
- static description = 'parse sources in current package and dump all found assets to stdout';
8
- static examples = [
9
- '<%= config.bin %> <%= command.id %>',
10
- ];
11
- async run() {
12
- const logger = createLogger();
13
- dumpAssets(logger, stdout);
14
- }
15
- }
16
-
17
- export { DumpAssets as default };
18
- //# sourceMappingURL=assets.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assets.js","sources":["../../../src/commands/dump/assets.ts"],"sourcesContent":["import { Command } from '@oclif/core';\nimport { createLogger } from '../../compiler/util';\nimport { dumpAssets } from '../../shared/dump';\nimport { stdout } from 'node:process';\n\nexport default class DumpAssets extends Command {\n static override description = 'parse sources in current package and dump all found assets to stdout';\n\n static override examples = [\n '<%= config.bin %> <%= command.id %>',\n ];\n\n public async run(): Promise<void> {\n const logger = createLogger();\n dumpAssets(logger, stdout);\n }\n}\n"],"names":[],"mappings":";;;;;AAKc,MAAO,UAAW,SAAQ,OAAO,CAAA;AAC7C,IAAA,OAAgB,WAAW,GAAG,sEAAsE;IAEpG,OAAgB,QAAQ,GAAG;QACzB,qCAAqC;KACtC;AAEM,IAAA,MAAM,GAAG,GAAA;AACd,QAAA,MAAM,MAAM,GAAG,YAAY,EAAE;AAC7B,QAAA,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC;IAC5B;;;;;"}
@@ -1,24 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@oclif/core');
4
- var util = require('../../compiler/util.cjs');
5
- var dump = require('../../shared/dump.cjs');
6
- var node_process = require('node:process');
7
-
8
- class DumpLibs extends core.Command {
9
- static description = 'parse sources in current package and dump all found libs to stdout';
10
- static examples = [
11
- '<%= config.bin %> <%= command.id %>',
12
- ];
13
- static flags = {
14
- deps: core.Flags.boolean({ name: 'deps', description: 'add also all libraries found in node_modules' }),
15
- };
16
- async run() {
17
- const { flags } = await this.parse(DumpLibs);
18
- const logger = util.createLogger();
19
- dump.dumpLibs(logger, flags.deps, node_process.stdout);
20
- }
21
- }
22
-
23
- module.exports = DumpLibs;
24
- //# sourceMappingURL=libs.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"libs.cjs","sources":["../../../src/commands/dump/libs.ts"],"sourcesContent":["import { Command, Flags } from '@oclif/core';\nimport { createLogger } from '../../compiler/util';\nimport { dumpLibs } from '../../shared/dump';\nimport { stdout } from 'node:process';\n\nexport default class DumpLibs extends Command {\n static override description = 'parse sources in current package and dump all found libs to stdout';\n\n static override examples = [\n '<%= config.bin %> <%= command.id %>',\n ];\n\n static override flags = {\n deps: Flags.boolean({ name: 'deps', description: 'add also all libraries found in node_modules' }),\n };\n\n public async run(): Promise<void> {\n const { flags } = await this.parse(DumpLibs);\n\n const logger = createLogger();\n dumpLibs(logger, flags.deps, stdout);\n }\n}\n"],"names":["Command","Flags","createLogger","dumpLibs","stdout"],"mappings":";;;;;;;AAKc,MAAO,QAAS,SAAQA,YAAO,CAAA;AAC3C,IAAA,OAAgB,WAAW,GAAG,oEAAoE;IAElG,OAAgB,QAAQ,GAAG;QACzB,qCAAqC;KACtC;IAED,OAAgB,KAAK,GAAG;AACtB,QAAA,IAAI,EAAEC,UAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;KACnG;AAEM,IAAA,MAAM,GAAG,GAAA;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;AAE5C,QAAA,MAAM,MAAM,GAAGC,iBAAY,EAAE;QAC7BC,aAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAEC,mBAAM,CAAC;IACtC;;;;;"}
@@ -1,10 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class DumpLibs extends Command {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {
6
- deps: import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
- };
8
- run(): Promise<void>;
9
- }
10
- //# sourceMappingURL=libs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"libs.d.ts","sourceRoot":"","sources":["../../../src/commands/dump/libs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAK7C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO;IAC3C,OAAgB,WAAW,SAAwE;IAEnG,OAAgB,QAAQ,WAEtB;IAEF,OAAgB,KAAK;;MAEnB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAMlC"}
@@ -1,22 +0,0 @@
1
- import { Command, Flags } from '@oclif/core';
2
- import { createLogger } from '../../compiler/util.js';
3
- import { dumpLibs } from '../../shared/dump.js';
4
- import { stdout } from 'node:process';
5
-
6
- class DumpLibs extends Command {
7
- static description = 'parse sources in current package and dump all found libs to stdout';
8
- static examples = [
9
- '<%= config.bin %> <%= command.id %>',
10
- ];
11
- static flags = {
12
- deps: Flags.boolean({ name: 'deps', description: 'add also all libraries found in node_modules' }),
13
- };
14
- async run() {
15
- const { flags } = await this.parse(DumpLibs);
16
- const logger = createLogger();
17
- dumpLibs(logger, flags.deps, stdout);
18
- }
19
- }
20
-
21
- export { DumpLibs as default };
22
- //# sourceMappingURL=libs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"libs.js","sources":["../../../src/commands/dump/libs.ts"],"sourcesContent":["import { Command, Flags } from '@oclif/core';\nimport { createLogger } from '../../compiler/util';\nimport { dumpLibs } from '../../shared/dump';\nimport { stdout } from 'node:process';\n\nexport default class DumpLibs extends Command {\n static override description = 'parse sources in current package and dump all found libs to stdout';\n\n static override examples = [\n '<%= config.bin %> <%= command.id %>',\n ];\n\n static override flags = {\n deps: Flags.boolean({ name: 'deps', description: 'add also all libraries found in node_modules' }),\n };\n\n public async run(): Promise<void> {\n const { flags } = await this.parse(DumpLibs);\n\n const logger = createLogger();\n dumpLibs(logger, flags.deps, stdout);\n }\n}\n"],"names":[],"mappings":";;;;;AAKc,MAAO,QAAS,SAAQ,OAAO,CAAA;AAC3C,IAAA,OAAgB,WAAW,GAAG,oEAAoE;IAElG,OAAgB,QAAQ,GAAG;QACzB,qCAAqC;KACtC;IAED,OAAgB,KAAK,GAAG;AACtB,QAAA,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;KACnG;AAEM,IAAA,MAAM,GAAG,GAAA;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;AAE5C,QAAA,MAAM,MAAM,GAAG,YAAY,EAAE;QAC7B,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;IACtC;;;;;"}
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@oclif/core');
4
- var util = require('../../compiler/util.cjs');
5
- var dump = require('../../shared/dump.cjs');
6
- var node_process = require('node:process');
7
-
8
- class DumpTemplates extends core.Command {
9
- static description = 'parse sources in current package and dump all found templates to stdout';
10
- static examples = [
11
- '<%= config.bin %> <%= command.id %>',
12
- ];
13
- async run() {
14
- const logger = util.createLogger();
15
- dump.dumpTemplates(logger, node_process.stdout);
16
- }
17
- }
18
-
19
- module.exports = DumpTemplates;
20
- //# sourceMappingURL=templates.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.cjs","sources":["../../../src/commands/dump/templates.ts"],"sourcesContent":["import { Command } from '@oclif/core';\nimport { createLogger } from '../../compiler/util';\nimport { dumpTemplates } from '../../shared/dump';\nimport { stdout } from 'node:process';\n\nexport default class DumpTemplates extends Command {\n static override description = 'parse sources in current package and dump all found templates to stdout';\n\n static override examples = [\n '<%= config.bin %> <%= command.id %>',\n ];\n\n public async run(): Promise<void> {\n const logger = createLogger();\n dumpTemplates(logger, stdout);\n }\n}\n"],"names":["Command","createLogger","dumpTemplates","stdout"],"mappings":";;;;;;;AAKc,MAAO,aAAc,SAAQA,YAAO,CAAA;AAChD,IAAA,OAAgB,WAAW,GAAG,yEAAyE;IAEvG,OAAgB,QAAQ,GAAG;QACzB,qCAAqC;KACtC;AAEM,IAAA,MAAM,GAAG,GAAA;AACd,QAAA,MAAM,MAAM,GAAGC,iBAAY,EAAE;AAC7B,QAAAC,kBAAa,CAAC,MAAM,EAAEC,mBAAM,CAAC;IAC/B;;;;;"}
@@ -1,7 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class DumpTemplates extends Command {
3
- static description: string;
4
- static examples: string[];
5
- run(): Promise<void>;
6
- }
7
- //# sourceMappingURL=templates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/commands/dump/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAKtC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IAChD,OAAgB,WAAW,SAA6E;IAExG,OAAgB,QAAQ,WAEtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAIlC"}
@@ -1,18 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- import { createLogger } from '../../compiler/util.js';
3
- import { dumpTemplates } from '../../shared/dump.js';
4
- import { stdout } from 'node:process';
5
-
6
- class DumpTemplates extends Command {
7
- static description = 'parse sources in current package and dump all found templates to stdout';
8
- static examples = [
9
- '<%= config.bin %> <%= command.id %>',
10
- ];
11
- async run() {
12
- const logger = createLogger();
13
- dumpTemplates(logger, stdout);
14
- }
15
- }
16
-
17
- export { DumpTemplates as default };
18
- //# sourceMappingURL=templates.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.js","sources":["../../../src/commands/dump/templates.ts"],"sourcesContent":["import { Command } from '@oclif/core';\nimport { createLogger } from '../../compiler/util';\nimport { dumpTemplates } from '../../shared/dump';\nimport { stdout } from 'node:process';\n\nexport default class DumpTemplates extends Command {\n static override description = 'parse sources in current package and dump all found templates to stdout';\n\n static override examples = [\n '<%= config.bin %> <%= command.id %>',\n ];\n\n public async run(): Promise<void> {\n const logger = createLogger();\n dumpTemplates(logger, stdout);\n }\n}\n"],"names":[],"mappings":";;;;;AAKc,MAAO,aAAc,SAAQ,OAAO,CAAA;AAChD,IAAA,OAAgB,WAAW,GAAG,yEAAyE;IAEvG,OAAgB,QAAQ,GAAG;QACzB,qCAAqC;KACtC;AAEM,IAAA,MAAM,GAAG,GAAA;AACd,QAAA,MAAM,MAAM,GAAG,YAAY,EAAE;AAC7B,QAAA,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC;IAC/B;;;;;"}
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- var core = require('@oclif/core');
4
- var util = require('../../compiler/util.cjs');
5
- var dump = require('../../shared/dump.cjs');
6
- var node_process = require('node:process');
7
-
8
- class DumpTests extends core.Command {
9
- static description = 'parse sources in current package and dump all found tests to stdout';
10
- static examples = [
11
- '<%= config.bin %> <%= command.id %>',
12
- ];
13
- async run() {
14
- const logger = util.createLogger();
15
- dump.dumpTests(logger, node_process.stdout);
16
- }
17
- }
18
-
19
- module.exports = DumpTests;
20
- //# sourceMappingURL=tests.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tests.cjs","sources":["../../../src/commands/dump/tests.ts"],"sourcesContent":["import { Command } from '@oclif/core';\nimport { createLogger } from '../../compiler/util';\nimport { dumpTests } from '../../shared/dump';\nimport { stdout } from 'node:process';\n\nexport default class DumpTests extends Command {\n static override description = 'parse sources in current package and dump all found tests to stdout';\n\n static override examples = [\n '<%= config.bin %> <%= command.id %>',\n ];\n\n public async run(): Promise<void> {\n const logger = createLogger();\n dumpTests(logger, stdout);\n }\n}\n"],"names":["Command","createLogger","dumpTests","stdout"],"mappings":";;;;;;;AAKc,MAAO,SAAU,SAAQA,YAAO,CAAA;AAC5C,IAAA,OAAgB,WAAW,GAAG,qEAAqE;IAEnG,OAAgB,QAAQ,GAAG;QACzB,qCAAqC;KACtC;AAEM,IAAA,MAAM,GAAG,GAAA;AACd,QAAA,MAAM,MAAM,GAAGC,iBAAY,EAAE;AAC7B,QAAAC,cAAS,CAAC,MAAM,EAAEC,mBAAM,CAAC;IAC3B;;;;;"}
@@ -1,7 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class DumpTests extends Command {
3
- static description: string;
4
- static examples: string[];
5
- run(): Promise<void>;
6
- }
7
- //# sourceMappingURL=tests.d.ts.map