@milaboratories/pl-model-middle-layer 1.6.11 → 1.7.1
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.
- package/dist/block_meta/block_components.d.ts +13 -13
- package/dist/block_meta/block_description.d.ts +8 -8
- package/dist/block_meta/block_manifest.d.ts +39 -39
- package/dist/block_settings.d.ts +26 -0
- package/dist/block_settings.d.ts.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +67 -66
- package/dist/index.mjs.map +1 -1
- package/dist/project_overview.d.ts +6 -0
- package/dist/project_overview.d.ts.map +1 -1
- package/dist/update_info.d.ts +9 -0
- package/dist/update_info.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/block_settings.ts +27 -0
- package/src/index.ts +5 -2
- package/src/project_overview.ts +9 -1
- package/src/update_info.ts +10 -0
|
@@ -262,19 +262,19 @@ export declare const BlockComponentsDescriptionRaw: z.ZodObject<{
|
|
|
262
262
|
model: z.ZodString;
|
|
263
263
|
ui: z.ZodString;
|
|
264
264
|
}, "strip", z.ZodTypeAny, {
|
|
265
|
+
ui: string;
|
|
265
266
|
workflow: {
|
|
266
267
|
type: "workflow-v1";
|
|
267
268
|
main: string;
|
|
268
269
|
};
|
|
269
270
|
model: string;
|
|
270
|
-
ui: string;
|
|
271
271
|
}, {
|
|
272
|
+
ui: string;
|
|
272
273
|
workflow: string | {
|
|
273
274
|
type: "workflow-v1";
|
|
274
275
|
main: string;
|
|
275
276
|
};
|
|
276
277
|
model: string;
|
|
277
|
-
ui: string;
|
|
278
278
|
}>;
|
|
279
279
|
export type BlockComponentsDescriptionRaw = z.infer<typeof BlockComponentsDescriptionRaw>;
|
|
280
280
|
export declare function BlockComponentsAbsoluteUrl(prefix: string): z.ZodObject<{
|
|
@@ -520,6 +520,14 @@ export declare function BlockComponentsAbsoluteUrl(prefix: string): z.ZodObject<
|
|
|
520
520
|
path: string;
|
|
521
521
|
}>;
|
|
522
522
|
}, "strip", z.ZodTypeAny, {
|
|
523
|
+
ui: {
|
|
524
|
+
type: "explicit-base64";
|
|
525
|
+
content: string;
|
|
526
|
+
mimeType: string;
|
|
527
|
+
} | {
|
|
528
|
+
type: "absolute-url";
|
|
529
|
+
url: string;
|
|
530
|
+
};
|
|
523
531
|
workflow: {
|
|
524
532
|
type: "workflow-v1";
|
|
525
533
|
main: {
|
|
@@ -539,15 +547,15 @@ export declare function BlockComponentsAbsoluteUrl(prefix: string): z.ZodObject<
|
|
|
539
547
|
type: "absolute-url";
|
|
540
548
|
url: string;
|
|
541
549
|
};
|
|
550
|
+
}, {
|
|
542
551
|
ui: {
|
|
543
552
|
type: "explicit-base64";
|
|
544
553
|
content: string;
|
|
545
554
|
mimeType: string;
|
|
546
555
|
} | {
|
|
547
|
-
type: "
|
|
548
|
-
|
|
556
|
+
type: "relative";
|
|
557
|
+
path: string;
|
|
549
558
|
};
|
|
550
|
-
}, {
|
|
551
559
|
workflow: {
|
|
552
560
|
type: "explicit-base64";
|
|
553
561
|
content: string;
|
|
@@ -574,14 +582,6 @@ export declare function BlockComponentsAbsoluteUrl(prefix: string): z.ZodObject<
|
|
|
574
582
|
type: "relative";
|
|
575
583
|
path: string;
|
|
576
584
|
};
|
|
577
|
-
ui: {
|
|
578
|
-
type: "explicit-base64";
|
|
579
|
-
content: string;
|
|
580
|
-
mimeType: string;
|
|
581
|
-
} | {
|
|
582
|
-
type: "relative";
|
|
583
|
-
path: string;
|
|
584
|
-
};
|
|
585
585
|
}>;
|
|
586
586
|
export type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;
|
|
587
587
|
//# sourceMappingURL=block_components.d.ts.map
|
|
@@ -30,19 +30,19 @@ export declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
30
30
|
model: z.ZodString;
|
|
31
31
|
ui: z.ZodString;
|
|
32
32
|
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
ui: string;
|
|
33
34
|
workflow: {
|
|
34
35
|
type: "workflow-v1";
|
|
35
36
|
main: string;
|
|
36
37
|
};
|
|
37
38
|
model: string;
|
|
38
|
-
ui: string;
|
|
39
39
|
}, {
|
|
40
|
+
ui: string;
|
|
40
41
|
workflow: string | {
|
|
41
42
|
type: "workflow-v1";
|
|
42
43
|
main: string;
|
|
43
44
|
};
|
|
44
45
|
model: string;
|
|
45
|
-
ui: string;
|
|
46
46
|
}>;
|
|
47
47
|
meta: z.ZodObject<{
|
|
48
48
|
title: z.ZodString;
|
|
@@ -339,12 +339,12 @@ export declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
339
339
|
}>;
|
|
340
340
|
}, "strip", z.ZodTypeAny, {
|
|
341
341
|
components: {
|
|
342
|
+
ui: string;
|
|
342
343
|
workflow: {
|
|
343
344
|
type: "workflow-v1";
|
|
344
345
|
main: string;
|
|
345
346
|
};
|
|
346
347
|
model: string;
|
|
347
|
-
ui: string;
|
|
348
348
|
};
|
|
349
349
|
meta: {
|
|
350
350
|
organization: {
|
|
@@ -403,12 +403,12 @@ export declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
403
403
|
};
|
|
404
404
|
}, {
|
|
405
405
|
components: {
|
|
406
|
+
ui: string;
|
|
406
407
|
workflow: string | {
|
|
407
408
|
type: "workflow-v1";
|
|
408
409
|
main: string;
|
|
409
410
|
};
|
|
410
411
|
model: string;
|
|
411
|
-
ui: string;
|
|
412
412
|
};
|
|
413
413
|
meta: {
|
|
414
414
|
organization: {
|
|
@@ -587,19 +587,19 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
587
587
|
model: z.ZodString;
|
|
588
588
|
ui: z.ZodString;
|
|
589
589
|
}, "strip", z.ZodTypeAny, {
|
|
590
|
+
ui: string;
|
|
590
591
|
workflow: {
|
|
591
592
|
type: "workflow-v1";
|
|
592
593
|
main: string;
|
|
593
594
|
};
|
|
594
595
|
model: string;
|
|
595
|
-
ui: string;
|
|
596
596
|
}, {
|
|
597
|
+
ui: string;
|
|
597
598
|
workflow: string | {
|
|
598
599
|
type: "workflow-v1";
|
|
599
600
|
main: string;
|
|
600
601
|
};
|
|
601
602
|
model: string;
|
|
602
|
-
ui: string;
|
|
603
603
|
}>;
|
|
604
604
|
meta: z.ZodObject<{
|
|
605
605
|
title: z.ZodString;
|
|
@@ -896,12 +896,12 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
896
896
|
}>;
|
|
897
897
|
}, "strip", z.ZodTypeAny, {
|
|
898
898
|
components: {
|
|
899
|
+
ui: string;
|
|
899
900
|
workflow: {
|
|
900
901
|
type: "workflow-v1";
|
|
901
902
|
main: string;
|
|
902
903
|
};
|
|
903
904
|
model: string;
|
|
904
|
-
ui: string;
|
|
905
905
|
};
|
|
906
906
|
meta: {
|
|
907
907
|
organization: {
|
|
@@ -965,12 +965,12 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
965
965
|
};
|
|
966
966
|
}, {
|
|
967
967
|
components: {
|
|
968
|
+
ui: string;
|
|
968
969
|
workflow: string | {
|
|
969
970
|
type: "workflow-v1";
|
|
970
971
|
main: string;
|
|
971
972
|
};
|
|
972
973
|
model: string;
|
|
973
|
-
ui: string;
|
|
974
974
|
};
|
|
975
975
|
meta: {
|
|
976
976
|
organization: {
|
|
@@ -89,6 +89,10 @@ export declare const BlockComponentsManifest: z.ZodObject<{
|
|
|
89
89
|
path: string;
|
|
90
90
|
}>;
|
|
91
91
|
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
ui: {
|
|
93
|
+
type: "relative";
|
|
94
|
+
path: string;
|
|
95
|
+
};
|
|
92
96
|
workflow: {
|
|
93
97
|
type: "workflow-v1";
|
|
94
98
|
main: {
|
|
@@ -100,11 +104,11 @@ export declare const BlockComponentsManifest: z.ZodObject<{
|
|
|
100
104
|
type: "relative";
|
|
101
105
|
path: string;
|
|
102
106
|
};
|
|
107
|
+
}, {
|
|
103
108
|
ui: {
|
|
104
109
|
type: "relative";
|
|
105
110
|
path: string;
|
|
106
111
|
};
|
|
107
|
-
}, {
|
|
108
112
|
workflow: {
|
|
109
113
|
type: "relative";
|
|
110
114
|
path: string;
|
|
@@ -119,10 +123,6 @@ export declare const BlockComponentsManifest: z.ZodObject<{
|
|
|
119
123
|
type: "relative";
|
|
120
124
|
path: string;
|
|
121
125
|
};
|
|
122
|
-
ui: {
|
|
123
|
-
type: "relative";
|
|
124
|
-
path: string;
|
|
125
|
-
};
|
|
126
126
|
}>;
|
|
127
127
|
export type BlockComponentsManifest = z.infer<typeof BlockComponentsManifest>;
|
|
128
128
|
export declare const BlockPackMetaManifest: z.ZodObject<{
|
|
@@ -431,6 +431,10 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
431
431
|
path: string;
|
|
432
432
|
}>;
|
|
433
433
|
}, "strip", z.ZodTypeAny, {
|
|
434
|
+
ui: {
|
|
435
|
+
type: "relative";
|
|
436
|
+
path: string;
|
|
437
|
+
};
|
|
434
438
|
workflow: {
|
|
435
439
|
type: "workflow-v1";
|
|
436
440
|
main: {
|
|
@@ -442,11 +446,11 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
442
446
|
type: "relative";
|
|
443
447
|
path: string;
|
|
444
448
|
};
|
|
449
|
+
}, {
|
|
445
450
|
ui: {
|
|
446
451
|
type: "relative";
|
|
447
452
|
path: string;
|
|
448
453
|
};
|
|
449
|
-
}, {
|
|
450
454
|
workflow: {
|
|
451
455
|
type: "relative";
|
|
452
456
|
path: string;
|
|
@@ -461,10 +465,6 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
461
465
|
type: "relative";
|
|
462
466
|
path: string;
|
|
463
467
|
};
|
|
464
|
-
ui: {
|
|
465
|
-
type: "relative";
|
|
466
|
-
path: string;
|
|
467
|
-
};
|
|
468
468
|
}>;
|
|
469
469
|
meta: z.ZodObject<{
|
|
470
470
|
title: z.ZodString;
|
|
@@ -669,6 +669,10 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
669
669
|
}>;
|
|
670
670
|
}, "strip", z.ZodTypeAny, {
|
|
671
671
|
components: {
|
|
672
|
+
ui: {
|
|
673
|
+
type: "relative";
|
|
674
|
+
path: string;
|
|
675
|
+
};
|
|
672
676
|
workflow: {
|
|
673
677
|
type: "workflow-v1";
|
|
674
678
|
main: {
|
|
@@ -680,10 +684,6 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
680
684
|
type: "relative";
|
|
681
685
|
path: string;
|
|
682
686
|
};
|
|
683
|
-
ui: {
|
|
684
|
-
type: "relative";
|
|
685
|
-
path: string;
|
|
686
|
-
};
|
|
687
687
|
};
|
|
688
688
|
meta: {
|
|
689
689
|
organization: {
|
|
@@ -735,6 +735,10 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
735
735
|
};
|
|
736
736
|
}, {
|
|
737
737
|
components: {
|
|
738
|
+
ui: {
|
|
739
|
+
type: "relative";
|
|
740
|
+
path: string;
|
|
741
|
+
};
|
|
738
742
|
workflow: {
|
|
739
743
|
type: "relative";
|
|
740
744
|
path: string;
|
|
@@ -749,10 +753,6 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
749
753
|
type: "relative";
|
|
750
754
|
path: string;
|
|
751
755
|
};
|
|
752
|
-
ui: {
|
|
753
|
-
type: "relative";
|
|
754
|
-
path: string;
|
|
755
|
-
};
|
|
756
756
|
};
|
|
757
757
|
meta: {
|
|
758
758
|
organization: {
|
|
@@ -924,6 +924,10 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
924
924
|
path: string;
|
|
925
925
|
}>;
|
|
926
926
|
}, "strip", z.ZodTypeAny, {
|
|
927
|
+
ui: {
|
|
928
|
+
type: "relative";
|
|
929
|
+
path: string;
|
|
930
|
+
};
|
|
927
931
|
workflow: {
|
|
928
932
|
type: "workflow-v1";
|
|
929
933
|
main: {
|
|
@@ -935,11 +939,11 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
935
939
|
type: "relative";
|
|
936
940
|
path: string;
|
|
937
941
|
};
|
|
942
|
+
}, {
|
|
938
943
|
ui: {
|
|
939
944
|
type: "relative";
|
|
940
945
|
path: string;
|
|
941
946
|
};
|
|
942
|
-
}, {
|
|
943
947
|
workflow: {
|
|
944
948
|
type: "relative";
|
|
945
949
|
path: string;
|
|
@@ -954,10 +958,6 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
954
958
|
type: "relative";
|
|
955
959
|
path: string;
|
|
956
960
|
};
|
|
957
|
-
ui: {
|
|
958
|
-
type: "relative";
|
|
959
|
-
path: string;
|
|
960
|
-
};
|
|
961
961
|
}>;
|
|
962
962
|
meta: z.ZodObject<{
|
|
963
963
|
title: z.ZodString;
|
|
@@ -1162,6 +1162,10 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1162
1162
|
}>;
|
|
1163
1163
|
}, "strip", z.ZodTypeAny, {
|
|
1164
1164
|
components: {
|
|
1165
|
+
ui: {
|
|
1166
|
+
type: "relative";
|
|
1167
|
+
path: string;
|
|
1168
|
+
};
|
|
1165
1169
|
workflow: {
|
|
1166
1170
|
type: "workflow-v1";
|
|
1167
1171
|
main: {
|
|
@@ -1173,10 +1177,6 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1173
1177
|
type: "relative";
|
|
1174
1178
|
path: string;
|
|
1175
1179
|
};
|
|
1176
|
-
ui: {
|
|
1177
|
-
type: "relative";
|
|
1178
|
-
path: string;
|
|
1179
|
-
};
|
|
1180
1180
|
};
|
|
1181
1181
|
meta: {
|
|
1182
1182
|
organization: {
|
|
@@ -1228,6 +1228,10 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1228
1228
|
};
|
|
1229
1229
|
}, {
|
|
1230
1230
|
components: {
|
|
1231
|
+
ui: {
|
|
1232
|
+
type: "relative";
|
|
1233
|
+
path: string;
|
|
1234
|
+
};
|
|
1231
1235
|
workflow: {
|
|
1232
1236
|
type: "relative";
|
|
1233
1237
|
path: string;
|
|
@@ -1242,10 +1246,6 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1242
1246
|
type: "relative";
|
|
1243
1247
|
path: string;
|
|
1244
1248
|
};
|
|
1245
|
-
ui: {
|
|
1246
|
-
type: "relative";
|
|
1247
|
-
path: string;
|
|
1248
|
-
};
|
|
1249
1249
|
};
|
|
1250
1250
|
meta: {
|
|
1251
1251
|
organization: {
|
|
@@ -1313,6 +1313,10 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1313
1313
|
}, "strip", z.ZodTypeAny, {
|
|
1314
1314
|
description: {
|
|
1315
1315
|
components: {
|
|
1316
|
+
ui: {
|
|
1317
|
+
type: "relative";
|
|
1318
|
+
path: string;
|
|
1319
|
+
};
|
|
1316
1320
|
workflow: {
|
|
1317
1321
|
type: "workflow-v1";
|
|
1318
1322
|
main: {
|
|
@@ -1324,10 +1328,6 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1324
1328
|
type: "relative";
|
|
1325
1329
|
path: string;
|
|
1326
1330
|
};
|
|
1327
|
-
ui: {
|
|
1328
|
-
type: "relative";
|
|
1329
|
-
path: string;
|
|
1330
|
-
};
|
|
1331
1331
|
};
|
|
1332
1332
|
meta: {
|
|
1333
1333
|
organization: {
|
|
@@ -1388,6 +1388,10 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1388
1388
|
}, {
|
|
1389
1389
|
description: {
|
|
1390
1390
|
components: {
|
|
1391
|
+
ui: {
|
|
1392
|
+
type: "relative";
|
|
1393
|
+
path: string;
|
|
1394
|
+
};
|
|
1391
1395
|
workflow: {
|
|
1392
1396
|
type: "relative";
|
|
1393
1397
|
path: string;
|
|
@@ -1402,10 +1406,6 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1402
1406
|
type: "relative";
|
|
1403
1407
|
path: string;
|
|
1404
1408
|
};
|
|
1405
|
-
ui: {
|
|
1406
|
-
type: "relative";
|
|
1407
|
-
path: string;
|
|
1408
|
-
};
|
|
1409
1409
|
};
|
|
1410
1410
|
meta: {
|
|
1411
1411
|
organization: {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What part of block version should be locked against updates.
|
|
3
|
+
*
|
|
4
|
+
* - `major` - 1.2.3 can be updated to 1.4.7
|
|
5
|
+
* - `minor` - 1.2.3 can be updated to 1.2.5
|
|
6
|
+
* - `patch` - version of the block is completely locked
|
|
7
|
+
*
|
|
8
|
+
* */
|
|
9
|
+
export type VersionLock = 'major' | 'minor' | 'patch';
|
|
10
|
+
/**
|
|
11
|
+
* Block settings, persisted on the backend.
|
|
12
|
+
*
|
|
13
|
+
* Settings modulate different aspects of block behaviour,
|
|
14
|
+
* currently only updates.
|
|
15
|
+
* */
|
|
16
|
+
export type BlockSettings = {
|
|
17
|
+
/** Only version stricktly greater that this one will be suggested for auto-update. */
|
|
18
|
+
skipVersion?: string;
|
|
19
|
+
/**
|
|
20
|
+
* If certain version locking policy is set, auto-updates will only be suggested,
|
|
21
|
+
* if there is an update within the specified release line.
|
|
22
|
+
* */
|
|
23
|
+
versionLock?: VersionLock;
|
|
24
|
+
};
|
|
25
|
+
export declare const InitialBlockSettings: BlockSettings;
|
|
26
|
+
//# sourceMappingURL=block_settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block_settings.d.ts","sourceRoot":"","sources":["../src/block_settings.ts"],"names":[],"mappings":"AAAA;;;;;;;KAOK;AACL,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD;;;;;KAKK;AACL,MAAM,MAAM,aAAa,GAAG;IAC1B,sFAAsF;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;SAGK;IACL,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aAAkB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from './author_marker';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './block_settings';
|
|
3
3
|
export * from './block_state';
|
|
4
|
-
export * from './block_meta';
|
|
5
4
|
export * from './project';
|
|
6
5
|
export * from './project_list';
|
|
7
6
|
export * from './project_overview';
|
|
7
|
+
export * from './update_info';
|
|
8
|
+
export * from './block_meta';
|
|
9
|
+
export * from './block_registry';
|
|
8
10
|
export * from './pframe';
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAE9B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),X=require("remeda");function Y(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,l.get?l:{enumerable:!0,get:()=>e[o]})}}return n.default=e,Object.freeze(n)}const h=Y(X),c=t.z.object({type:t.z.literal("explicit-string"),content:t.z.string().describe("Actual string value")}).strict(),r=t.z.object({type:t.z.literal("explicit-base64"),mimeType:t.z.string().regex(/\w+\/[-+.\w]+/).describe("MIME type to interpret content"),content:t.z.string().base64().describe("Base64 encoded binary value")}).strict(),i=t.z.object({type:t.z.literal("relative"),path:t.z.string().describe("Address of the file, in most cases relative to the file which this structure is a part of")}).strict(),R=new RegExp("^(/|[A-Z]:\\\\)"),s=t.z.object({type:t.z.literal("absolute-file"),file:t.z.string().regex(R,"path to file must be absolute").describe("Absolute address of the file in local file system")}).strict(),d=t.z.object({type:t.z.literal("absolute-url"),url:t.z.string().url().describe("Global URL to reach the requested file")}).strict(),A=t.z.object({type:t.z.literal("explicit-bytes"),mimeType:t.z.string().regex(/\w+\/[-+.\w]+/).describe("MIME type to interpret content"),content:t.z.instanceof(Uint8Array).describe("Raw content")}).strict(),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),X=require("remeda");function Y(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,l.get?l:{enumerable:!0,get:()=>e[o]})}}return n.default=e,Object.freeze(n)}const h=Y(X),tt={},c=t.z.object({type:t.z.literal("explicit-string"),content:t.z.string().describe("Actual string value")}).strict(),r=t.z.object({type:t.z.literal("explicit-base64"),mimeType:t.z.string().regex(/\w+\/[-+.\w]+/).describe("MIME type to interpret content"),content:t.z.string().base64().describe("Base64 encoded binary value")}).strict(),i=t.z.object({type:t.z.literal("relative"),path:t.z.string().describe("Address of the file, in most cases relative to the file which this structure is a part of")}).strict(),R=new RegExp("^(/|[A-Z]:\\\\)"),s=t.z.object({type:t.z.literal("absolute-file"),file:t.z.string().regex(R,"path to file must be absolute").describe("Absolute address of the file in local file system")}).strict(),d=t.z.object({type:t.z.literal("absolute-url"),url:t.z.string().url().describe("Global URL to reach the requested file")}).strict(),A=t.z.object({type:t.z.literal("explicit-bytes"),mimeType:t.z.string().regex(/\w+\/[-+.\w]+/).describe("MIME type to interpret content"),content:t.z.instanceof(Uint8Array).describe("Raw content")}).strict(),et=t.z.object({type:t.z.literal("absolute-folder"),folder:t.z.string().regex(R,"path to folder must be absolute").describe("Absolute address of the folder in local file system")}).strict(),nt=t.z.discriminatedUnion("type",[c,r,i,s,d]),ot=t.z.discriminatedUnion("type",[c,r,i]),it=t.z.discriminatedUnion("type",[c,r,i,s]),rt=t.z.discriminatedUnion("type",[c,r,i,d]),j=t.z.discriminatedUnion("type",[r,i,s]),S=t.z.discriminatedUnion("type",[c,i,s]),ct=t.z.discriminatedUnion("type",[r,d]),st=t.z.discriminatedUnion("type",[r,s]),at=t.z.discriminatedUnion("type",[c,d]),lt=t.z.discriminatedUnion("type",[c,s]),g=t.z.discriminatedUnion("type",[r,i]),w=t.z.discriminatedUnion("type",[c,i]),x=t.z.union([t.z.string().startsWith("file:").transform((e,n)=>({type:"relative",path:e.slice(5)})),j]),V=t.z.union([t.z.string().transform((e,n)=>e.startsWith("file:")?{type:"relative",path:e.slice(5)}:{type:"explicit-string",content:e}),S]),p=t.z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,"Wrong version format, please use valid semver");function y(e){const n=e.endsWith("/")?e:`${e}/`;return o=>o.type==="relative"?{type:"absolute-url",url:n+o.path}:o}function dt(e){const n=e.endsWith("/")?e:`${e}/`;return o=>o.type==="relative"?{type:"relative",path:n+o.path}:o}const a=t.z.object({organization:t.z.string(),name:t.z.string(),version:p}).strict(),M=a.omit({version:!0});function zt(e){if(e!==void 0)return`${e.organization}:${e.name}:${e.version}`}function kt(e){if(e!==void 0)return`${e.organization}:${e.name}`}function gt(e,n){return e===void 0&&n===void 0?!0:e===void 0||n===void 0?!1:e.name===n.name&&e.organization===n.organization&&e.version===n.version}function pt(e,n){return e===void 0&&n===void 0?!0:e===void 0||n===void 0?!1:e.name===n.name&&e.organization===n.organization}function m(e){return t.z.object({type:t.z.literal("workflow-v1"),main:e.describe("Main workflow")})}function D(e){return t.z.union([e.transform(n=>({type:"workflow-v1",main:n})).pipe(m(e)),t.z.discriminatedUnion("type",[m(e)])])}function u(e,n){return t.z.object({workflow:D(e),model:e,ui:n})}const f=u(t.z.string(),t.z.string());function ut(e){return u(g.transform(y(e)),g.transform(y(e)))}function z(e,n){return t.z.object({title:t.z.string(),description:t.z.string(),longDescription:e.optional(),changelog:e.optional(),logo:n.optional(),url:t.z.string().url().optional(),docs:t.z.string().url().optional(),support:t.z.union([t.z.string().url(),t.z.string().email()]).optional(),tags:t.z.array(t.z.string()).optional(),organization:t.z.object({name:t.z.string(),url:t.z.string().url(),logo:n.optional()}),marketplaceRanking:t.z.number().optional()})}const b=z(V,x),yt=z(t.z.string(),r),v=z(t.z.string(),A),mt=t.z.object({components:f,meta:b});function B(e,n){return t.z.object({id:a,components:e,meta:n})}const ft=B(f,b);function bt(e,n){return h.mergeDeep(e,{id:{version:n}})}const I=u(i,i),T=z(w,g),U=B(I,T),E=t.z.string().regex(/[0-9a-fA-F]/).toUpperCase().length(64),L=t.z.object({name:t.z.string(),size:t.z.number().int(),sha256:E}),vt=t.z.object({schema:t.z.literal("v2"),description:U,timestamp:t.z.number().optional(),files:t.z.array(L)}),Bt="manifest.json";function Pt(e,n){return h.mergeDeep(e,{description:{id:{version:n}}})}const O=t.z.object({type:t.z.literal("dev-v1"),folder:t.z.string(),mtime:t.z.string().optional()}),F=t.z.object({type:t.z.literal("dev-v2"),folder:t.z.string(),mtime:t.z.string().optional()}),W=t.z.object({type:t.z.literal("from-registry-v1"),registryUrl:t.z.string(),id:a}),$=t.z.object({type:t.z.literal("from-registry-v2"),registryUrl:t.z.string(),id:a,channel:t.z.string().optional()}),P=t.z.discriminatedUnion("type",[O,F,W,$]),q=t.z.object({type:t.z.literal("local-dev"),path:t.z.string()}),N=t.z.object({type:t.z.literal("remote-v1"),url:t.z.string().url()}),Z=t.z.object({type:t.z.literal("remote-v2"),url:t.z.string().url()}),_=t.z.discriminatedUnion("type",[N,Z,q]),C=t.z.object({id:t.z.string(),title:t.z.string().optional(),spec:_}),Ct=t.z.array(C),ht=t.z.object({registryId:t.z.string(),id:a,meta:v,spec:P,otherVersions:t.z.array(p)}),J="any",k="stable",G=t.z.object({version:p,channels:t.z.array(t.z.string())}),H=t.z.object({id:a,meta:v,spec:P}),K=t.z.object({id:M,latestByChannel:t.z.record(t.z.string(),H),allVersions:t.z.array(G),registryId:t.z.string()}),Q=C.extend({status:t.z.union([t.z.literal("online"),t.z.literal("offline")])}),Rt=t.z.object({registries:t.z.array(Q),blockPacks:t.z.array(K)});function At(e){const n=e.latestByChannel[k]!==void 0?k:J,o=e.latestByChannel[n];return{id:o.id,meta:o.meta,spec:{...o.spec,channel:k},otherVersions:e.allVersions.filter(l=>l.channels.indexOf(n)>=0).map(l=>l.version),registryId:e.registryId}}const jt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.AnyChannel=J;exports.BlockComponents=u;exports.BlockComponentsAbsoluteUrl=ut;exports.BlockComponentsDescriptionRaw=f;exports.BlockComponentsManifest=I;exports.BlockPackDescriptionFromPackageJsonRaw=mt;exports.BlockPackDescriptionManifest=U;exports.BlockPackDescriptionRaw=ft;exports.BlockPackDevV1=O;exports.BlockPackDevV2=F;exports.BlockPackFromRegistryV1=W;exports.BlockPackFromRegistryV2=$;exports.BlockPackId=a;exports.BlockPackIdNoVersion=M;exports.BlockPackListing=Rt;exports.BlockPackManifest=vt;exports.BlockPackManifestFile=Bt;exports.BlockPackMeta=z;exports.BlockPackMetaDescriptionRaw=b;exports.BlockPackMetaEmbeddedBase64=yt;exports.BlockPackMetaEmbeddedBytes=v;exports.BlockPackMetaManifest=T;exports.BlockPackOverview=K;exports.BlockPackOverviewLegacy=ht;exports.BlockPackSpec=P;exports.ContentAbsoluteBinaryLocal=st;exports.ContentAbsoluteBinaryRemote=ct;exports.ContentAbsoluteFile=s;exports.ContentAbsoluteFolder=et;exports.ContentAbsoluteTextLocal=lt;exports.ContentAbsoluteTextRemote=at;exports.ContentAbsoluteUrl=d;exports.ContentAny=nt;exports.ContentAnyBinaryLocal=j;exports.ContentAnyLocal=it;exports.ContentAnyRemote=rt;exports.ContentAnyTextLocal=S;exports.ContentExplicitBase64=r;exports.ContentExplicitBytes=A;exports.ContentExplicitOrRelative=ot;exports.ContentExplicitString=c;exports.ContentRelative=i;exports.ContentRelativeBinary=g;exports.ContentRelativeText=w;exports.CreateBlockPackDescriptionSchema=B;exports.DescriptionContentBinary=x;exports.DescriptionContentText=V;exports.InitialBlockSettings=tt;exports.LocalDevFolder=q;exports.ManifestFileInfo=L;exports.PFrameInternal=jt;exports.RegistryEntry=C;exports.RegistryList=Ct;exports.RegistrySpec=_;exports.RegistryStatus=Q;exports.RemoteRegistryV1Spec=N;exports.RemoteRegistryV2Spec=Z;exports.SemVer=p;exports.Sha256Schema=E;exports.SingleBlockPackOverview=H;exports.StableChannel=k;exports.VersionWithChannels=G;exports.Workflow=D;exports.WorkflowV1=m;exports.addPrefixToRelative=dt;exports.blockPackIdEquals=gt;exports.blockPackIdNoVersionEquals=pt;exports.blockPackIdNoVersionToString=kt;exports.blockPackIdToString=zt;exports.blockPackOverviewToLegacy=At;exports.mapRemoteToAbsolute=y;exports.overrideDescriptionVersion=bt;exports.overrideManifestVersion=Pt;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|