@platforma-sdk/block-tools 2.1.11 → 2.2.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 (59) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/cli.mjs +266 -80
  4. package/dist/cli.mjs.map +1 -1
  5. package/dist/cmd/index.d.ts +2 -0
  6. package/dist/cmd/index.d.ts.map +1 -1
  7. package/dist/cmd/publish.d.ts +11 -0
  8. package/dist/cmd/publish.d.ts.map +1 -0
  9. package/dist/config-DJqN5LSx.js +3 -0
  10. package/dist/config-DJqN5LSx.js.map +1 -0
  11. package/dist/{config-Br5DwFuM.mjs → config-rGaQLD-7.mjs} +636 -603
  12. package/dist/config-rGaQLD-7.mjs.map +1 -0
  13. package/dist/index.js +1 -1
  14. package/dist/index.mjs +29 -27
  15. package/dist/registry_v1/config_schema.d.ts +13 -13
  16. package/dist/v2/build_dist.d.ts +2 -1
  17. package/dist/v2/build_dist.d.ts.map +1 -1
  18. package/dist/v2/model/block_components.d.ts +169 -177
  19. package/dist/v2/model/block_components.d.ts.map +1 -1
  20. package/dist/v2/model/block_description.d.ts +2873 -0
  21. package/dist/v2/model/block_description.d.ts.map +1 -0
  22. package/dist/v2/model/{meta.d.ts → block_meta.d.ts} +1 -1
  23. package/dist/v2/model/block_meta.d.ts.map +1 -0
  24. package/dist/v2/model/content_conversion.d.ts +5 -2
  25. package/dist/v2/model/content_conversion.d.ts.map +1 -1
  26. package/dist/v2/model/index.d.ts +3 -2079
  27. package/dist/v2/model/index.d.ts.map +1 -1
  28. package/dist/v2/registry/registry.d.ts +16 -0
  29. package/dist/v2/registry/registry.d.ts.map +1 -0
  30. package/dist/v2/registry/schema_internal.d.ts +7 -0
  31. package/dist/v2/registry/schema_internal.d.ts.map +1 -0
  32. package/dist/v2/registry/schema_public.d.ts +2828 -0
  33. package/dist/v2/registry/schema_public.d.ts.map +1 -0
  34. package/package.json +3 -3
  35. package/src/cmd/build-meta.ts +1 -1
  36. package/src/cmd/index.ts +2 -0
  37. package/src/cmd/publish.ts +69 -0
  38. package/src/v2/build_dist.ts +16 -12
  39. package/src/v2/model/block_components.ts +14 -10
  40. package/src/v2/model/block_description.ts +49 -0
  41. package/src/v2/model/{meta.ts → block_meta.ts} +1 -1
  42. package/src/v2/model/content_conversion.ts +49 -10
  43. package/src/v2/model/index.ts +3 -44
  44. package/src/v2/registry/registry.ts +233 -0
  45. package/src/v2/registry/schema_internal.ts +13 -0
  46. package/src/v2/registry/schema_public.ts +90 -0
  47. package/dist/config-Br5DwFuM.mjs.map +0 -1
  48. package/dist/config-DMAm68Pm.js +0 -3
  49. package/dist/config-DMAm68Pm.js.map +0 -1
  50. package/dist/v2/model/common.d.ts +0 -3
  51. package/dist/v2/model/common.d.ts.map +0 -1
  52. package/dist/v2/model/content_types.d.ts +0 -478
  53. package/dist/v2/model/content_types.d.ts.map +0 -1
  54. package/dist/v2/model/meta.d.ts.map +0 -1
  55. package/dist/v2/registry/schema.d.ts +0 -15
  56. package/dist/v2/registry/schema.d.ts.map +0 -1
  57. package/src/v2/model/common.ts +0 -2
  58. package/src/v2/model/content_types.ts +0 -233
  59. package/src/v2/registry/schema.ts +0 -29
@@ -1,3 +1,4 @@
1
- import { BlockPackDescriptionAbsolute, BlockPackManifest } from './model';
1
+ import { BlockPackManifest } from '@milaboratories/pl-model-middle-layer';
2
+ import { BlockPackDescriptionAbsolute } from './model';
2
3
  export declare function buildBlockPackDist(description: BlockPackDescriptionAbsolute, dst: string): Promise<BlockPackManifest>;
3
4
  //# sourceMappingURL=build_dist.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build_dist.d.ts","sourceRoot":"","sources":["../../src/v2/build_dist.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAG5B,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAMjB,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,4BAA4B,EACzC,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,iBAAiB,CAAC,CAa5B"}
1
+ {"version":3,"file":"build_dist.d.ts","sourceRoot":"","sources":["../../src/v2/build_dist.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAGlB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,4BAA4B,EAA2C,MAAM,SAAS,CAAC;AAIhG,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,4BAA4B,EACzC,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,iBAAiB,CAAC,CAmB5B"}
@@ -1,9 +1,27 @@
1
1
  import { z } from 'zod';
2
2
  export declare function BlockComponentsDescription(moduleRoot: string): z.ZodObject<{
3
- workflow: z.ZodEffects<z.ZodString, {
3
+ workflow: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, {
4
4
  type: "absolute-file";
5
5
  file: string;
6
- }, string>;
6
+ }, string>, {
7
+ type: string;
8
+ main: any;
9
+ }, string>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
10
+ type: z.ZodLiteral<"workflow-v1">;
11
+ main: z.ZodEffects<z.ZodString, {
12
+ type: "absolute-file";
13
+ file: string;
14
+ }, string>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ type: "workflow-v1";
17
+ main: {
18
+ type: "absolute-file";
19
+ file: string;
20
+ };
21
+ }, {
22
+ type: "workflow-v1";
23
+ main: string;
24
+ }>]>]>;
7
25
  model: z.ZodEffects<z.ZodString, {
8
26
  type: "absolute-file";
9
27
  file: string;
@@ -14,8 +32,14 @@ export declare function BlockComponentsDescription(moduleRoot: string): z.ZodObj
14
32
  }, string>;
15
33
  }, "strip", z.ZodTypeAny, {
16
34
  workflow: {
17
- type: "absolute-file";
18
- file: string;
35
+ type: string;
36
+ main: any;
37
+ } | {
38
+ type: "workflow-v1";
39
+ main: {
40
+ type: "absolute-file";
41
+ file: string;
42
+ };
19
43
  };
20
44
  model: {
21
45
  type: "absolute-file";
@@ -26,13 +50,16 @@ export declare function BlockComponentsDescription(moduleRoot: string): z.ZodObj
26
50
  folder: string;
27
51
  };
28
52
  }, {
29
- workflow: string;
53
+ workflow: string | {
54
+ type: "workflow-v1";
55
+ main: string;
56
+ };
30
57
  model: string;
31
58
  ui: string;
32
59
  }>;
33
60
  export type BlockComponentsDescription = z.infer<ReturnType<typeof BlockComponentsDescription>>;
34
61
  export declare function BlockComponentsConsolidate(dstFolder: string, fileAccumulator?: string[]): z.ZodPipeline<z.ZodObject<{
35
- workflow: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
62
+ workflow: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
36
63
  type: z.ZodLiteral<"explicit-base64">;
37
64
  mimeType: z.ZodString;
38
65
  content: z.ZodString;
@@ -67,7 +94,75 @@ export declare function BlockComponentsConsolidate(dstFolder: string, fileAccumu
67
94
  } | {
68
95
  type: "absolute-file";
69
96
  file: string;
70
- }>;
97
+ }>, {
98
+ type: string;
99
+ main: any;
100
+ }, {
101
+ type: "explicit-base64";
102
+ content: string;
103
+ mimeType: string;
104
+ } | {
105
+ type: "absolute-file";
106
+ file: string;
107
+ }>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
108
+ type: z.ZodLiteral<"workflow-v1">;
109
+ main: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
110
+ type: z.ZodLiteral<"explicit-base64">;
111
+ mimeType: z.ZodString;
112
+ content: z.ZodString;
113
+ }, "strict", z.ZodTypeAny, {
114
+ type: "explicit-base64";
115
+ content: string;
116
+ mimeType: string;
117
+ }, {
118
+ type: "explicit-base64";
119
+ content: string;
120
+ mimeType: string;
121
+ }>, z.ZodObject<{
122
+ type: z.ZodLiteral<"absolute-file">;
123
+ file: z.ZodString;
124
+ }, "strict", z.ZodTypeAny, {
125
+ type: "absolute-file";
126
+ file: string;
127
+ }, {
128
+ type: "absolute-file";
129
+ file: string;
130
+ }>]>, {
131
+ type: "relative";
132
+ path: string;
133
+ } | {
134
+ type: "explicit-base64";
135
+ content: string;
136
+ mimeType: string;
137
+ }, {
138
+ type: "explicit-base64";
139
+ content: string;
140
+ mimeType: string;
141
+ } | {
142
+ type: "absolute-file";
143
+ file: string;
144
+ }>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ type: "workflow-v1";
147
+ main: {
148
+ type: "relative";
149
+ path: string;
150
+ } | {
151
+ type: "explicit-base64";
152
+ content: string;
153
+ mimeType: string;
154
+ };
155
+ }, {
156
+ type: "workflow-v1";
157
+ main: {
158
+ type: "explicit-base64";
159
+ content: string;
160
+ mimeType: string;
161
+ } | {
162
+ type: "absolute-file";
163
+ file: string;
164
+ };
165
+ }>]>]>;
71
166
  model: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
72
167
  type: z.ZodLiteral<"explicit-base64">;
73
168
  mimeType: z.ZodString;
@@ -122,12 +217,18 @@ export declare function BlockComponentsConsolidate(dstFolder: string, fileAccumu
122
217
  }>;
123
218
  }, "strip", z.ZodTypeAny, {
124
219
  workflow: {
125
- type: "relative";
126
- path: string;
220
+ type: string;
221
+ main: any;
127
222
  } | {
128
- type: "explicit-base64";
129
- content: string;
130
- mimeType: string;
223
+ type: "workflow-v1";
224
+ main: {
225
+ type: "relative";
226
+ path: string;
227
+ } | {
228
+ type: "explicit-base64";
229
+ content: string;
230
+ mimeType: string;
231
+ };
131
232
  };
132
233
  model: {
133
234
  type: "relative";
@@ -149,6 +250,16 @@ export declare function BlockComponentsConsolidate(dstFolder: string, fileAccumu
149
250
  } | {
150
251
  type: "absolute-file";
151
252
  file: string;
253
+ } | {
254
+ type: "workflow-v1";
255
+ main: {
256
+ type: "explicit-base64";
257
+ content: string;
258
+ mimeType: string;
259
+ } | {
260
+ type: "absolute-file";
261
+ file: string;
262
+ };
152
263
  };
153
264
  model: {
154
265
  type: "explicit-base64";
@@ -163,7 +274,7 @@ export declare function BlockComponentsConsolidate(dstFolder: string, fileAccumu
163
274
  folder: string;
164
275
  };
165
276
  }>, z.ZodObject<{
166
- workflow: z.ZodObject<{
277
+ workflow: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
167
278
  type: z.ZodLiteral<"relative">;
168
279
  path: z.ZodString;
169
280
  }, "strict", z.ZodTypeAny, {
@@ -172,7 +283,37 @@ export declare function BlockComponentsConsolidate(dstFolder: string, fileAccumu
172
283
  }, {
173
284
  type: "relative";
174
285
  path: string;
175
- }>;
286
+ }>, {
287
+ type: string;
288
+ main: any;
289
+ }, {
290
+ type: "relative";
291
+ path: string;
292
+ }>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
293
+ type: z.ZodLiteral<"workflow-v1">;
294
+ main: z.ZodObject<{
295
+ type: z.ZodLiteral<"relative">;
296
+ path: z.ZodString;
297
+ }, "strict", z.ZodTypeAny, {
298
+ type: "relative";
299
+ path: string;
300
+ }, {
301
+ type: "relative";
302
+ path: string;
303
+ }>;
304
+ }, "strip", z.ZodTypeAny, {
305
+ type: "workflow-v1";
306
+ main: {
307
+ type: "relative";
308
+ path: string;
309
+ };
310
+ }, {
311
+ type: "workflow-v1";
312
+ main: {
313
+ type: "relative";
314
+ path: string;
315
+ };
316
+ }>]>]>;
176
317
  model: z.ZodObject<{
177
318
  type: z.ZodLiteral<"relative">;
178
319
  path: z.ZodString;
@@ -199,8 +340,14 @@ export declare function BlockComponentsConsolidate(dstFolder: string, fileAccumu
199
340
  path: string;
200
341
  };
201
342
  workflow: {
202
- type: "relative";
203
- path: string;
343
+ type: string;
344
+ main: any;
345
+ } | {
346
+ type: "workflow-v1";
347
+ main: {
348
+ type: "relative";
349
+ path: string;
350
+ };
204
351
  };
205
352
  model: {
206
353
  type: "relative";
@@ -214,171 +361,16 @@ export declare function BlockComponentsConsolidate(dstFolder: string, fileAccumu
214
361
  workflow: {
215
362
  type: "relative";
216
363
  path: string;
217
- };
218
- model: {
219
- type: "relative";
220
- path: string;
221
- };
222
- }>>;
223
- export declare function BlockComponentsAbsoluteUrl(prefix: string): z.ZodObject<{
224
- workflow: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
225
- type: z.ZodLiteral<"explicit-base64">;
226
- mimeType: z.ZodString;
227
- content: z.ZodString;
228
- }, "strict", z.ZodTypeAny, {
229
- type: "explicit-base64";
230
- content: string;
231
- mimeType: string;
232
- }, {
233
- type: "explicit-base64";
234
- content: string;
235
- mimeType: string;
236
- }>, z.ZodObject<{
237
- type: z.ZodLiteral<"relative">;
238
- path: z.ZodString;
239
- }, "strict", z.ZodTypeAny, {
240
- type: "relative";
241
- path: string;
242
- }, {
243
- type: "relative";
244
- path: string;
245
- }>]>, {
246
- type: "absolute-url";
247
- url: string;
248
364
  } | {
249
- type: "explicit-base64";
250
- content: string;
251
- mimeType: string;
252
- }, {
253
- type: "explicit-base64";
254
- content: string;
255
- mimeType: string;
256
- } | {
257
- type: "relative";
258
- path: string;
259
- }>;
260
- model: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
261
- type: z.ZodLiteral<"explicit-base64">;
262
- mimeType: z.ZodString;
263
- content: z.ZodString;
264
- }, "strict", z.ZodTypeAny, {
265
- type: "explicit-base64";
266
- content: string;
267
- mimeType: string;
268
- }, {
269
- type: "explicit-base64";
270
- content: string;
271
- mimeType: string;
272
- }>, z.ZodObject<{
273
- type: z.ZodLiteral<"relative">;
274
- path: z.ZodString;
275
- }, "strict", z.ZodTypeAny, {
276
- type: "relative";
277
- path: string;
278
- }, {
279
- type: "relative";
280
- path: string;
281
- }>]>, {
282
- type: "absolute-url";
283
- url: string;
284
- } | {
285
- type: "explicit-base64";
286
- content: string;
287
- mimeType: string;
288
- }, {
289
- type: "explicit-base64";
290
- content: string;
291
- mimeType: string;
292
- } | {
293
- type: "relative";
294
- path: string;
295
- }>;
296
- ui: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
297
- type: z.ZodLiteral<"explicit-base64">;
298
- mimeType: z.ZodString;
299
- content: z.ZodString;
300
- }, "strict", z.ZodTypeAny, {
301
- type: "explicit-base64";
302
- content: string;
303
- mimeType: string;
304
- }, {
305
- type: "explicit-base64";
306
- content: string;
307
- mimeType: string;
308
- }>, z.ZodObject<{
309
- type: z.ZodLiteral<"relative">;
310
- path: z.ZodString;
311
- }, "strict", z.ZodTypeAny, {
312
- type: "relative";
313
- path: string;
314
- }, {
315
- type: "relative";
316
- path: string;
317
- }>]>, {
318
- type: "absolute-url";
319
- url: string;
320
- } | {
321
- type: "explicit-base64";
322
- content: string;
323
- mimeType: string;
324
- }, {
325
- type: "explicit-base64";
326
- content: string;
327
- mimeType: string;
328
- } | {
329
- type: "relative";
330
- path: string;
331
- }>;
332
- }, "strip", z.ZodTypeAny, {
333
- workflow: {
334
- type: "absolute-url";
335
- url: string;
336
- } | {
337
- type: "explicit-base64";
338
- content: string;
339
- mimeType: string;
340
- };
341
- model: {
342
- type: "absolute-url";
343
- url: string;
344
- } | {
345
- type: "explicit-base64";
346
- content: string;
347
- mimeType: string;
348
- };
349
- ui: {
350
- type: "absolute-url";
351
- url: string;
352
- } | {
353
- type: "explicit-base64";
354
- content: string;
355
- mimeType: string;
356
- };
357
- }, {
358
- workflow: {
359
- type: "explicit-base64";
360
- content: string;
361
- mimeType: string;
362
- } | {
363
- type: "relative";
364
- path: string;
365
+ type: "workflow-v1";
366
+ main: {
367
+ type: "relative";
368
+ path: string;
369
+ };
365
370
  };
366
371
  model: {
367
- type: "explicit-base64";
368
- content: string;
369
- mimeType: string;
370
- } | {
371
372
  type: "relative";
372
373
  path: string;
373
374
  };
374
- ui: {
375
- type: "explicit-base64";
376
- content: string;
377
- mimeType: string;
378
- } | {
379
- type: "relative";
380
- path: string;
381
- };
382
- }>;
383
- export type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;
375
+ }>>;
384
376
  //# sourceMappingURL=block_components.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"block_components.d.ts","sourceRoot":"","sources":["../../../src/v2/model/block_components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK5D;AACD,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC;AAEhG,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKvF;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAKxD;AACD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"block_components.d.ts","sourceRoot":"","sources":["../../../src/v2/model/block_components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK5D;AACD,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC;AAEhG,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKvF"}