@milaboratories/pl-model-middle-layer 1.7.5 → 1.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/block_meta/block_description.d.ts +10 -0
- package/dist/block_meta/block_description.d.ts.map +1 -1
- package/dist/block_meta/block_manifest.d.ts +15 -0
- package/dist/block_meta/block_manifest.d.ts.map +1 -1
- package/dist/block_meta/block_meta.d.ts +38 -0
- package/dist/block_meta/block_meta.d.ts.map +1 -1
- package/dist/block_registry/overview.d.ts +26 -0
- package/dist/block_registry/overview.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/block_meta/block_meta.ts +4 -0
|
@@ -228,6 +228,7 @@ export declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
228
228
|
} | undefined;
|
|
229
229
|
}>;
|
|
230
230
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
231
232
|
}, "strip", z.ZodTypeAny, {
|
|
232
233
|
organization: {
|
|
233
234
|
url: string;
|
|
@@ -282,6 +283,7 @@ export declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
282
283
|
support?: string | undefined;
|
|
283
284
|
tags?: string[] | undefined;
|
|
284
285
|
marketplaceRanking?: number | undefined;
|
|
286
|
+
termsOfServiceUrl?: string | undefined;
|
|
285
287
|
}, {
|
|
286
288
|
organization: {
|
|
287
289
|
url: string;
|
|
@@ -336,6 +338,7 @@ export declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
336
338
|
support?: string | undefined;
|
|
337
339
|
tags?: string[] | undefined;
|
|
338
340
|
marketplaceRanking?: number | undefined;
|
|
341
|
+
termsOfServiceUrl?: string | undefined;
|
|
339
342
|
}>;
|
|
340
343
|
}, "strip", z.ZodTypeAny, {
|
|
341
344
|
components: {
|
|
@@ -400,6 +403,7 @@ export declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
400
403
|
support?: string | undefined;
|
|
401
404
|
tags?: string[] | undefined;
|
|
402
405
|
marketplaceRanking?: number | undefined;
|
|
406
|
+
termsOfServiceUrl?: string | undefined;
|
|
403
407
|
};
|
|
404
408
|
}, {
|
|
405
409
|
components: {
|
|
@@ -464,6 +468,7 @@ export declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
464
468
|
support?: string | undefined;
|
|
465
469
|
tags?: string[] | undefined;
|
|
466
470
|
marketplaceRanking?: number | undefined;
|
|
471
|
+
termsOfServiceUrl?: string | undefined;
|
|
467
472
|
};
|
|
468
473
|
}>;
|
|
469
474
|
export declare function CreateBlockPackDescriptionSchema<Components extends ZodTypeAny, Meta extends ZodTypeAny>(components: Components, meta: Meta): z.ZodObject<{
|
|
@@ -785,6 +790,7 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
785
790
|
} | undefined;
|
|
786
791
|
}>;
|
|
787
792
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
793
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
788
794
|
}, "strip", z.ZodTypeAny, {
|
|
789
795
|
organization: {
|
|
790
796
|
url: string;
|
|
@@ -839,6 +845,7 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
839
845
|
support?: string | undefined;
|
|
840
846
|
tags?: string[] | undefined;
|
|
841
847
|
marketplaceRanking?: number | undefined;
|
|
848
|
+
termsOfServiceUrl?: string | undefined;
|
|
842
849
|
}, {
|
|
843
850
|
organization: {
|
|
844
851
|
url: string;
|
|
@@ -893,6 +900,7 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
893
900
|
support?: string | undefined;
|
|
894
901
|
tags?: string[] | undefined;
|
|
895
902
|
marketplaceRanking?: number | undefined;
|
|
903
|
+
termsOfServiceUrl?: string | undefined;
|
|
896
904
|
}>;
|
|
897
905
|
}, "strip", z.ZodTypeAny, {
|
|
898
906
|
components: {
|
|
@@ -957,6 +965,7 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
957
965
|
support?: string | undefined;
|
|
958
966
|
tags?: string[] | undefined;
|
|
959
967
|
marketplaceRanking?: number | undefined;
|
|
968
|
+
termsOfServiceUrl?: string | undefined;
|
|
960
969
|
};
|
|
961
970
|
id: {
|
|
962
971
|
organization: string;
|
|
@@ -1026,6 +1035,7 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
1026
1035
|
support?: string | undefined;
|
|
1027
1036
|
tags?: string[] | undefined;
|
|
1028
1037
|
marketplaceRanking?: number | undefined;
|
|
1038
|
+
termsOfServiceUrl?: string | undefined;
|
|
1029
1039
|
};
|
|
1030
1040
|
id: {
|
|
1031
1041
|
organization: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_description.d.ts","sourceRoot":"","sources":["../../src/block_meta/block_description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAGpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC;;qDAEqD;AACrD,eAAO,MAAM,sCAAsC
|
|
1
|
+
{"version":3,"file":"block_description.d.ts","sourceRoot":"","sources":["../../src/block_meta/block_description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAGpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC;;qDAEqD;AACrD,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;EAGnC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,wBAAgB,0BAA0B,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,WAAW,CAAA;CAAE,EACtE,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,MAAM,GACjB,CAAC,CAEH"}
|
|
@@ -241,6 +241,7 @@ export declare const BlockPackMetaManifest: z.ZodObject<{
|
|
|
241
241
|
} | undefined;
|
|
242
242
|
}>;
|
|
243
243
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
244
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
244
245
|
}, "strip", z.ZodTypeAny, {
|
|
245
246
|
organization: {
|
|
246
247
|
url: string;
|
|
@@ -283,6 +284,7 @@ export declare const BlockPackMetaManifest: z.ZodObject<{
|
|
|
283
284
|
support?: string | undefined;
|
|
284
285
|
tags?: string[] | undefined;
|
|
285
286
|
marketplaceRanking?: number | undefined;
|
|
287
|
+
termsOfServiceUrl?: string | undefined;
|
|
286
288
|
}, {
|
|
287
289
|
organization: {
|
|
288
290
|
url: string;
|
|
@@ -325,6 +327,7 @@ export declare const BlockPackMetaManifest: z.ZodObject<{
|
|
|
325
327
|
support?: string | undefined;
|
|
326
328
|
tags?: string[] | undefined;
|
|
327
329
|
marketplaceRanking?: number | undefined;
|
|
330
|
+
termsOfServiceUrl?: string | undefined;
|
|
328
331
|
}>;
|
|
329
332
|
export type BlockPackMetaManifest = z.infer<typeof BlockPackMetaManifest>;
|
|
330
333
|
/** Block description to be used in block manifest */
|
|
@@ -582,6 +585,7 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
582
585
|
} | undefined;
|
|
583
586
|
}>;
|
|
584
587
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
588
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
585
589
|
}, "strip", z.ZodTypeAny, {
|
|
586
590
|
organization: {
|
|
587
591
|
url: string;
|
|
@@ -624,6 +628,7 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
624
628
|
support?: string | undefined;
|
|
625
629
|
tags?: string[] | undefined;
|
|
626
630
|
marketplaceRanking?: number | undefined;
|
|
631
|
+
termsOfServiceUrl?: string | undefined;
|
|
627
632
|
}, {
|
|
628
633
|
organization: {
|
|
629
634
|
url: string;
|
|
@@ -666,6 +671,7 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
666
671
|
support?: string | undefined;
|
|
667
672
|
tags?: string[] | undefined;
|
|
668
673
|
marketplaceRanking?: number | undefined;
|
|
674
|
+
termsOfServiceUrl?: string | undefined;
|
|
669
675
|
}>;
|
|
670
676
|
}, "strip", z.ZodTypeAny, {
|
|
671
677
|
components: {
|
|
@@ -727,6 +733,7 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
727
733
|
support?: string | undefined;
|
|
728
734
|
tags?: string[] | undefined;
|
|
729
735
|
marketplaceRanking?: number | undefined;
|
|
736
|
+
termsOfServiceUrl?: string | undefined;
|
|
730
737
|
};
|
|
731
738
|
id: {
|
|
732
739
|
organization: string;
|
|
@@ -796,6 +803,7 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
|
|
|
796
803
|
support?: string | undefined;
|
|
797
804
|
tags?: string[] | undefined;
|
|
798
805
|
marketplaceRanking?: number | undefined;
|
|
806
|
+
termsOfServiceUrl?: string | undefined;
|
|
799
807
|
};
|
|
800
808
|
id: {
|
|
801
809
|
organization: string;
|
|
@@ -1075,6 +1083,7 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1075
1083
|
} | undefined;
|
|
1076
1084
|
}>;
|
|
1077
1085
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
1086
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
1078
1087
|
}, "strip", z.ZodTypeAny, {
|
|
1079
1088
|
organization: {
|
|
1080
1089
|
url: string;
|
|
@@ -1117,6 +1126,7 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1117
1126
|
support?: string | undefined;
|
|
1118
1127
|
tags?: string[] | undefined;
|
|
1119
1128
|
marketplaceRanking?: number | undefined;
|
|
1129
|
+
termsOfServiceUrl?: string | undefined;
|
|
1120
1130
|
}, {
|
|
1121
1131
|
organization: {
|
|
1122
1132
|
url: string;
|
|
@@ -1159,6 +1169,7 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1159
1169
|
support?: string | undefined;
|
|
1160
1170
|
tags?: string[] | undefined;
|
|
1161
1171
|
marketplaceRanking?: number | undefined;
|
|
1172
|
+
termsOfServiceUrl?: string | undefined;
|
|
1162
1173
|
}>;
|
|
1163
1174
|
}, "strip", z.ZodTypeAny, {
|
|
1164
1175
|
components: {
|
|
@@ -1220,6 +1231,7 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1220
1231
|
support?: string | undefined;
|
|
1221
1232
|
tags?: string[] | undefined;
|
|
1222
1233
|
marketplaceRanking?: number | undefined;
|
|
1234
|
+
termsOfServiceUrl?: string | undefined;
|
|
1223
1235
|
};
|
|
1224
1236
|
id: {
|
|
1225
1237
|
organization: string;
|
|
@@ -1289,6 +1301,7 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1289
1301
|
support?: string | undefined;
|
|
1290
1302
|
tags?: string[] | undefined;
|
|
1291
1303
|
marketplaceRanking?: number | undefined;
|
|
1304
|
+
termsOfServiceUrl?: string | undefined;
|
|
1292
1305
|
};
|
|
1293
1306
|
id: {
|
|
1294
1307
|
organization: string;
|
|
@@ -1371,6 +1384,7 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1371
1384
|
support?: string | undefined;
|
|
1372
1385
|
tags?: string[] | undefined;
|
|
1373
1386
|
marketplaceRanking?: number | undefined;
|
|
1387
|
+
termsOfServiceUrl?: string | undefined;
|
|
1374
1388
|
};
|
|
1375
1389
|
id: {
|
|
1376
1390
|
organization: string;
|
|
@@ -1449,6 +1463,7 @@ export declare const BlockPackManifest: z.ZodObject<{
|
|
|
1449
1463
|
support?: string | undefined;
|
|
1450
1464
|
tags?: string[] | undefined;
|
|
1451
1465
|
marketplaceRanking?: number | undefined;
|
|
1466
|
+
termsOfServiceUrl?: string | undefined;
|
|
1452
1467
|
};
|
|
1453
1468
|
id: {
|
|
1454
1469
|
organization: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_manifest.d.ts","sourceRoot":"","sources":["../../src/block_meta/block_manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoD,CAAC;AACzF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"block_manifest.d.ts","sourceRoot":"","sources":["../../src/block_meta/block_manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoD,CAAC;AACzF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBA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35
|
* `undefined` value or absent field is treated exactly the same as number `0`.
|
|
36
36
|
*/
|
|
37
37
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
/**
|
|
39
|
+
* The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.
|
|
40
|
+
*/
|
|
41
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
38
42
|
}, "strip", z.ZodTypeAny, { [k_2 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
39
43
|
title: z.ZodString;
|
|
40
44
|
description: z.ZodString;
|
|
@@ -71,6 +75,10 @@ export declare function BlockPackMeta<const LongStringType extends z.ZodTypeAny,
|
|
|
71
75
|
* `undefined` value or absent field is treated exactly the same as number `0`.
|
|
72
76
|
*/
|
|
73
77
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
/**
|
|
79
|
+
* The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.
|
|
80
|
+
*/
|
|
81
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
74
82
|
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
75
83
|
title: z.ZodString;
|
|
76
84
|
description: z.ZodString;
|
|
@@ -107,6 +115,10 @@ export declare function BlockPackMeta<const LongStringType extends z.ZodTypeAny,
|
|
|
107
115
|
* `undefined` value or absent field is treated exactly the same as number `0`.
|
|
108
116
|
*/
|
|
109
117
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
/**
|
|
119
|
+
* The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.
|
|
120
|
+
*/
|
|
121
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
110
122
|
}>, any>[k_2]; }, { [k_1_1 in keyof z.baseObjectInputType<{
|
|
111
123
|
title: z.ZodString;
|
|
112
124
|
description: z.ZodString;
|
|
@@ -143,6 +155,10 @@ export declare function BlockPackMeta<const LongStringType extends z.ZodTypeAny,
|
|
|
143
155
|
* `undefined` value or absent field is treated exactly the same as number `0`.
|
|
144
156
|
*/
|
|
145
157
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
/**
|
|
159
|
+
* The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.
|
|
160
|
+
*/
|
|
161
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
146
162
|
}>]: z.baseObjectInputType<{
|
|
147
163
|
title: z.ZodString;
|
|
148
164
|
description: z.ZodString;
|
|
@@ -179,6 +195,10 @@ export declare function BlockPackMeta<const LongStringType extends z.ZodTypeAny,
|
|
|
179
195
|
* `undefined` value or absent field is treated exactly the same as number `0`.
|
|
180
196
|
*/
|
|
181
197
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
/**
|
|
199
|
+
* The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.
|
|
200
|
+
*/
|
|
201
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
182
202
|
}>[k_1_1]; }>;
|
|
183
203
|
export declare const BlockPackMetaDescriptionRaw: z.ZodObject<{
|
|
184
204
|
title: z.ZodString;
|
|
@@ -368,6 +388,10 @@ export declare const BlockPackMetaDescriptionRaw: z.ZodObject<{
|
|
|
368
388
|
* `undefined` value or absent field is treated exactly the same as number `0`.
|
|
369
389
|
*/
|
|
370
390
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
391
|
+
/**
|
|
392
|
+
* The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.
|
|
393
|
+
*/
|
|
394
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
371
395
|
}, "strip", z.ZodTypeAny, {
|
|
372
396
|
organization: {
|
|
373
397
|
url: string;
|
|
@@ -422,6 +446,7 @@ export declare const BlockPackMetaDescriptionRaw: z.ZodObject<{
|
|
|
422
446
|
support?: string | undefined;
|
|
423
447
|
tags?: string[] | undefined;
|
|
424
448
|
marketplaceRanking?: number | undefined;
|
|
449
|
+
termsOfServiceUrl?: string | undefined;
|
|
425
450
|
}, {
|
|
426
451
|
organization: {
|
|
427
452
|
url: string;
|
|
@@ -476,6 +501,7 @@ export declare const BlockPackMetaDescriptionRaw: z.ZodObject<{
|
|
|
476
501
|
support?: string | undefined;
|
|
477
502
|
tags?: string[] | undefined;
|
|
478
503
|
marketplaceRanking?: number | undefined;
|
|
504
|
+
termsOfServiceUrl?: string | undefined;
|
|
479
505
|
}>;
|
|
480
506
|
export type BlockPackMetaDescriptionRaw = z.infer<typeof BlockPackMetaDescriptionRaw>;
|
|
481
507
|
export declare const BlockPackMetaEmbeddedBase64: z.ZodObject<{
|
|
@@ -538,6 +564,10 @@ export declare const BlockPackMetaEmbeddedBase64: z.ZodObject<{
|
|
|
538
564
|
* `undefined` value or absent field is treated exactly the same as number `0`.
|
|
539
565
|
*/
|
|
540
566
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
567
|
+
/**
|
|
568
|
+
* The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.
|
|
569
|
+
*/
|
|
570
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
541
571
|
}, "strip", z.ZodTypeAny, {
|
|
542
572
|
organization: {
|
|
543
573
|
url: string;
|
|
@@ -562,6 +592,7 @@ export declare const BlockPackMetaEmbeddedBase64: z.ZodObject<{
|
|
|
562
592
|
support?: string | undefined;
|
|
563
593
|
tags?: string[] | undefined;
|
|
564
594
|
marketplaceRanking?: number | undefined;
|
|
595
|
+
termsOfServiceUrl?: string | undefined;
|
|
565
596
|
}, {
|
|
566
597
|
organization: {
|
|
567
598
|
url: string;
|
|
@@ -586,6 +617,7 @@ export declare const BlockPackMetaEmbeddedBase64: z.ZodObject<{
|
|
|
586
617
|
support?: string | undefined;
|
|
587
618
|
tags?: string[] | undefined;
|
|
588
619
|
marketplaceRanking?: number | undefined;
|
|
620
|
+
termsOfServiceUrl?: string | undefined;
|
|
589
621
|
}>;
|
|
590
622
|
export type BlockPackMetaEmbeddedBase64 = z.infer<typeof BlockPackMetaEmbeddedBase64>;
|
|
591
623
|
export declare const BlockPackMetaEmbeddedBytes: z.ZodObject<{
|
|
@@ -648,6 +680,10 @@ export declare const BlockPackMetaEmbeddedBytes: z.ZodObject<{
|
|
|
648
680
|
* `undefined` value or absent field is treated exactly the same as number `0`.
|
|
649
681
|
*/
|
|
650
682
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
683
|
+
/**
|
|
684
|
+
* The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.
|
|
685
|
+
*/
|
|
686
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
651
687
|
}, "strip", z.ZodTypeAny, {
|
|
652
688
|
organization: {
|
|
653
689
|
url: string;
|
|
@@ -672,6 +708,7 @@ export declare const BlockPackMetaEmbeddedBytes: z.ZodObject<{
|
|
|
672
708
|
support?: string | undefined;
|
|
673
709
|
tags?: string[] | undefined;
|
|
674
710
|
marketplaceRanking?: number | undefined;
|
|
711
|
+
termsOfServiceUrl?: string | undefined;
|
|
675
712
|
}, {
|
|
676
713
|
organization: {
|
|
677
714
|
url: string;
|
|
@@ -696,6 +733,7 @@ export declare const BlockPackMetaEmbeddedBytes: z.ZodObject<{
|
|
|
696
733
|
support?: string | undefined;
|
|
697
734
|
tags?: string[] | undefined;
|
|
698
735
|
marketplaceRanking?: number | undefined;
|
|
736
|
+
termsOfServiceUrl?: string | undefined;
|
|
699
737
|
}>;
|
|
700
738
|
export type BlockPackMetaEmbeddedBytes = z.infer<typeof BlockPackMetaEmbeddedBytes>;
|
|
701
739
|
//# sourceMappingURL=block_meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_meta.d.ts","sourceRoot":"","sources":["../../src/block_meta/block_meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASN,CAAC;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAGtF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IApBpC;;;OAGG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBN,CAAC;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAGtF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA3BnC;;;OAGG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBN,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -73,6 +73,7 @@ export declare const BlockPackOverviewLegacy: z.ZodObject<{
|
|
|
73
73
|
} | undefined;
|
|
74
74
|
}>;
|
|
75
75
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
76
77
|
}, "strip", z.ZodTypeAny, {
|
|
77
78
|
organization: {
|
|
78
79
|
url: string;
|
|
@@ -97,6 +98,7 @@ export declare const BlockPackOverviewLegacy: z.ZodObject<{
|
|
|
97
98
|
support?: string | undefined;
|
|
98
99
|
tags?: string[] | undefined;
|
|
99
100
|
marketplaceRanking?: number | undefined;
|
|
101
|
+
termsOfServiceUrl?: string | undefined;
|
|
100
102
|
}, {
|
|
101
103
|
organization: {
|
|
102
104
|
url: string;
|
|
@@ -121,6 +123,7 @@ export declare const BlockPackOverviewLegacy: z.ZodObject<{
|
|
|
121
123
|
support?: string | undefined;
|
|
122
124
|
tags?: string[] | undefined;
|
|
123
125
|
marketplaceRanking?: number | undefined;
|
|
126
|
+
termsOfServiceUrl?: string | undefined;
|
|
124
127
|
}>;
|
|
125
128
|
spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
126
129
|
type: z.ZodLiteral<"dev-v1">;
|
|
@@ -240,6 +243,7 @@ export declare const BlockPackOverviewLegacy: z.ZodObject<{
|
|
|
240
243
|
support?: string | undefined;
|
|
241
244
|
tags?: string[] | undefined;
|
|
242
245
|
marketplaceRanking?: number | undefined;
|
|
246
|
+
termsOfServiceUrl?: string | undefined;
|
|
243
247
|
};
|
|
244
248
|
id: {
|
|
245
249
|
organization: string;
|
|
@@ -299,6 +303,7 @@ export declare const BlockPackOverviewLegacy: z.ZodObject<{
|
|
|
299
303
|
support?: string | undefined;
|
|
300
304
|
tags?: string[] | undefined;
|
|
301
305
|
marketplaceRanking?: number | undefined;
|
|
306
|
+
termsOfServiceUrl?: string | undefined;
|
|
302
307
|
};
|
|
303
308
|
id: {
|
|
304
309
|
organization: string;
|
|
@@ -420,6 +425,7 @@ export declare const SingleBlockPackOverview: z.ZodObject<{
|
|
|
420
425
|
} | undefined;
|
|
421
426
|
}>;
|
|
422
427
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
428
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
423
429
|
}, "strip", z.ZodTypeAny, {
|
|
424
430
|
organization: {
|
|
425
431
|
url: string;
|
|
@@ -444,6 +450,7 @@ export declare const SingleBlockPackOverview: z.ZodObject<{
|
|
|
444
450
|
support?: string | undefined;
|
|
445
451
|
tags?: string[] | undefined;
|
|
446
452
|
marketplaceRanking?: number | undefined;
|
|
453
|
+
termsOfServiceUrl?: string | undefined;
|
|
447
454
|
}, {
|
|
448
455
|
organization: {
|
|
449
456
|
url: string;
|
|
@@ -468,6 +475,7 @@ export declare const SingleBlockPackOverview: z.ZodObject<{
|
|
|
468
475
|
support?: string | undefined;
|
|
469
476
|
tags?: string[] | undefined;
|
|
470
477
|
marketplaceRanking?: number | undefined;
|
|
478
|
+
termsOfServiceUrl?: string | undefined;
|
|
471
479
|
}>;
|
|
472
480
|
spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
473
481
|
type: z.ZodLiteral<"dev-v1">;
|
|
@@ -586,6 +594,7 @@ export declare const SingleBlockPackOverview: z.ZodObject<{
|
|
|
586
594
|
support?: string | undefined;
|
|
587
595
|
tags?: string[] | undefined;
|
|
588
596
|
marketplaceRanking?: number | undefined;
|
|
597
|
+
termsOfServiceUrl?: string | undefined;
|
|
589
598
|
};
|
|
590
599
|
id: {
|
|
591
600
|
organization: string;
|
|
@@ -643,6 +652,7 @@ export declare const SingleBlockPackOverview: z.ZodObject<{
|
|
|
643
652
|
support?: string | undefined;
|
|
644
653
|
tags?: string[] | undefined;
|
|
645
654
|
marketplaceRanking?: number | undefined;
|
|
655
|
+
termsOfServiceUrl?: string | undefined;
|
|
646
656
|
};
|
|
647
657
|
id: {
|
|
648
658
|
organization: string;
|
|
@@ -762,6 +772,7 @@ export declare const BlockPackOverview: z.ZodObject<{
|
|
|
762
772
|
} | undefined;
|
|
763
773
|
}>;
|
|
764
774
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
775
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
765
776
|
}, "strip", z.ZodTypeAny, {
|
|
766
777
|
organization: {
|
|
767
778
|
url: string;
|
|
@@ -786,6 +797,7 @@ export declare const BlockPackOverview: z.ZodObject<{
|
|
|
786
797
|
support?: string | undefined;
|
|
787
798
|
tags?: string[] | undefined;
|
|
788
799
|
marketplaceRanking?: number | undefined;
|
|
800
|
+
termsOfServiceUrl?: string | undefined;
|
|
789
801
|
}, {
|
|
790
802
|
organization: {
|
|
791
803
|
url: string;
|
|
@@ -810,6 +822,7 @@ export declare const BlockPackOverview: z.ZodObject<{
|
|
|
810
822
|
support?: string | undefined;
|
|
811
823
|
tags?: string[] | undefined;
|
|
812
824
|
marketplaceRanking?: number | undefined;
|
|
825
|
+
termsOfServiceUrl?: string | undefined;
|
|
813
826
|
}>;
|
|
814
827
|
spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
815
828
|
type: z.ZodLiteral<"dev-v1">;
|
|
@@ -928,6 +941,7 @@ export declare const BlockPackOverview: z.ZodObject<{
|
|
|
928
941
|
support?: string | undefined;
|
|
929
942
|
tags?: string[] | undefined;
|
|
930
943
|
marketplaceRanking?: number | undefined;
|
|
944
|
+
termsOfServiceUrl?: string | undefined;
|
|
931
945
|
};
|
|
932
946
|
id: {
|
|
933
947
|
organization: string;
|
|
@@ -985,6 +999,7 @@ export declare const BlockPackOverview: z.ZodObject<{
|
|
|
985
999
|
support?: string | undefined;
|
|
986
1000
|
tags?: string[] | undefined;
|
|
987
1001
|
marketplaceRanking?: number | undefined;
|
|
1002
|
+
termsOfServiceUrl?: string | undefined;
|
|
988
1003
|
};
|
|
989
1004
|
id: {
|
|
990
1005
|
organization: string;
|
|
@@ -1060,6 +1075,7 @@ export declare const BlockPackOverview: z.ZodObject<{
|
|
|
1060
1075
|
support?: string | undefined;
|
|
1061
1076
|
tags?: string[] | undefined;
|
|
1062
1077
|
marketplaceRanking?: number | undefined;
|
|
1078
|
+
termsOfServiceUrl?: string | undefined;
|
|
1063
1079
|
};
|
|
1064
1080
|
id: {
|
|
1065
1081
|
organization: string;
|
|
@@ -1128,6 +1144,7 @@ export declare const BlockPackOverview: z.ZodObject<{
|
|
|
1128
1144
|
support?: string | undefined;
|
|
1129
1145
|
tags?: string[] | undefined;
|
|
1130
1146
|
marketplaceRanking?: number | undefined;
|
|
1147
|
+
termsOfServiceUrl?: string | undefined;
|
|
1131
1148
|
};
|
|
1132
1149
|
id: {
|
|
1133
1150
|
organization: string;
|
|
@@ -1375,6 +1392,7 @@ export declare const BlockPackListing: z.ZodObject<{
|
|
|
1375
1392
|
} | undefined;
|
|
1376
1393
|
}>;
|
|
1377
1394
|
marketplaceRanking: z.ZodOptional<z.ZodNumber>;
|
|
1395
|
+
termsOfServiceUrl: z.ZodOptional<z.ZodString>;
|
|
1378
1396
|
}, "strip", z.ZodTypeAny, {
|
|
1379
1397
|
organization: {
|
|
1380
1398
|
url: string;
|
|
@@ -1399,6 +1417,7 @@ export declare const BlockPackListing: z.ZodObject<{
|
|
|
1399
1417
|
support?: string | undefined;
|
|
1400
1418
|
tags?: string[] | undefined;
|
|
1401
1419
|
marketplaceRanking?: number | undefined;
|
|
1420
|
+
termsOfServiceUrl?: string | undefined;
|
|
1402
1421
|
}, {
|
|
1403
1422
|
organization: {
|
|
1404
1423
|
url: string;
|
|
@@ -1423,6 +1442,7 @@ export declare const BlockPackListing: z.ZodObject<{
|
|
|
1423
1442
|
support?: string | undefined;
|
|
1424
1443
|
tags?: string[] | undefined;
|
|
1425
1444
|
marketplaceRanking?: number | undefined;
|
|
1445
|
+
termsOfServiceUrl?: string | undefined;
|
|
1426
1446
|
}>;
|
|
1427
1447
|
spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1428
1448
|
type: z.ZodLiteral<"dev-v1">;
|
|
@@ -1541,6 +1561,7 @@ export declare const BlockPackListing: z.ZodObject<{
|
|
|
1541
1561
|
support?: string | undefined;
|
|
1542
1562
|
tags?: string[] | undefined;
|
|
1543
1563
|
marketplaceRanking?: number | undefined;
|
|
1564
|
+
termsOfServiceUrl?: string | undefined;
|
|
1544
1565
|
};
|
|
1545
1566
|
id: {
|
|
1546
1567
|
organization: string;
|
|
@@ -1598,6 +1619,7 @@ export declare const BlockPackListing: z.ZodObject<{
|
|
|
1598
1619
|
support?: string | undefined;
|
|
1599
1620
|
tags?: string[] | undefined;
|
|
1600
1621
|
marketplaceRanking?: number | undefined;
|
|
1622
|
+
termsOfServiceUrl?: string | undefined;
|
|
1601
1623
|
};
|
|
1602
1624
|
id: {
|
|
1603
1625
|
organization: string;
|
|
@@ -1673,6 +1695,7 @@ export declare const BlockPackListing: z.ZodObject<{
|
|
|
1673
1695
|
support?: string | undefined;
|
|
1674
1696
|
tags?: string[] | undefined;
|
|
1675
1697
|
marketplaceRanking?: number | undefined;
|
|
1698
|
+
termsOfServiceUrl?: string | undefined;
|
|
1676
1699
|
};
|
|
1677
1700
|
id: {
|
|
1678
1701
|
organization: string;
|
|
@@ -1741,6 +1764,7 @@ export declare const BlockPackListing: z.ZodObject<{
|
|
|
1741
1764
|
support?: string | undefined;
|
|
1742
1765
|
tags?: string[] | undefined;
|
|
1743
1766
|
marketplaceRanking?: number | undefined;
|
|
1767
|
+
termsOfServiceUrl?: string | undefined;
|
|
1744
1768
|
};
|
|
1745
1769
|
id: {
|
|
1746
1770
|
organization: string;
|
|
@@ -1826,6 +1850,7 @@ export declare const BlockPackListing: z.ZodObject<{
|
|
|
1826
1850
|
support?: string | undefined;
|
|
1827
1851
|
tags?: string[] | undefined;
|
|
1828
1852
|
marketplaceRanking?: number | undefined;
|
|
1853
|
+
termsOfServiceUrl?: string | undefined;
|
|
1829
1854
|
};
|
|
1830
1855
|
id: {
|
|
1831
1856
|
organization: string;
|
|
@@ -1911,6 +1936,7 @@ export declare const BlockPackListing: z.ZodObject<{
|
|
|
1911
1936
|
support?: string | undefined;
|
|
1912
1937
|
tags?: string[] | undefined;
|
|
1913
1938
|
marketplaceRanking?: number | undefined;
|
|
1939
|
+
termsOfServiceUrl?: string | undefined;
|
|
1914
1940
|
};
|
|
1915
1941
|
id: {
|
|
1916
1942
|
organization: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview.d.ts","sourceRoot":"","sources":["../../src/block_registry/overview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB;;KAEK;AACL,eAAO,MAAM,uBAAuB
|
|
1
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,iBAAiB,GAAG,uBAAuB,CAazF"}
|
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),tt={},
|
|
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={},s=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]:\\\\)"),c=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",[s,r,i,c,d]),ot=t.z.discriminatedUnion("type",[s,r,i]),it=t.z.discriminatedUnion("type",[s,r,i,c]),rt=t.z.discriminatedUnion("type",[s,r,i,d]),S=t.z.discriminatedUnion("type",[r,i,c]),j=t.z.discriminatedUnion("type",[s,i,c]),st=t.z.discriminatedUnion("type",[r,d]),ct=t.z.discriminatedUnion("type",[r,c]),at=t.z.discriminatedUnion("type",[s,d]),lt=t.z.discriminatedUnion("type",[s,c]),g=t.z.discriminatedUnion("type",[r,i]),w=t.z.discriminatedUnion("type",[s,i]),x=t.z.union([t.z.string().startsWith("file:").transform((e,n)=>({type:"relative",path:e.slice(5)})),S]),V=t.z.union([t.z.string().transform((e,n)=>e.startsWith("file:")?{type:"relative",path:e.slice(5)}:{type:"explicit-string",content:e}),j]),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(),termsOfServiceUrl:t.z.string().url().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 St=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=ct;exports.ContentAbsoluteBinaryRemote=st;exports.ContentAbsoluteFile=c;exports.ContentAbsoluteFolder=et;exports.ContentAbsoluteTextLocal=lt;exports.ContentAbsoluteTextRemote=at;exports.ContentAbsoluteUrl=d;exports.ContentAny=nt;exports.ContentAnyBinaryLocal=S;exports.ContentAnyLocal=it;exports.ContentAnyRemote=rt;exports.ContentAnyTextLocal=j;exports.ContentExplicitBase64=r;exports.ContentExplicitBytes=A;exports.ContentExplicitOrRelative=ot;exports.ContentExplicitString=s;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=St;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
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/block_settings.ts","../src/block_meta/content_types.ts","../src/block_meta/semver.ts","../src/block_meta/content_conversion.ts","../src/block_meta/block_id.ts","../src/block_meta/block_components.ts","../src/block_meta/block_meta.ts","../src/block_meta/block_description.ts","../src/block_meta/block_manifest.ts","../src/block_registry/block_pack_spec.ts","../src/block_registry/registry_spec.ts","../src/block_registry/overview.ts"],"sourcesContent":["/**\n * What part of block version should be locked against updates.\n *\n * - `major` - 1.2.3 can be updated to 1.4.7\n * - `minor` - 1.2.3 can be updated to 1.2.5\n * - `patch` - version of the block is completely locked\n *\n * */\nexport type VersionLock = 'major' | 'minor' | 'patch';\n\n/**\n * Block settings, persisted on the backend.\n *\n * Settings modulate different aspects of block behaviour,\n * currently only updates.\n * */\nexport type BlockSettings = {\n /** Only version stricktly greater that this one will be suggested for auto-update. */\n skipVersion?: string;\n /**\n * If certain version locking policy is set, auto-updates will only be suggested,\n * if there is an update within the specified release line.\n * */\n versionLock?: VersionLock;\n};\n\nexport const InitialBlockSettings: BlockSettings = {};\n","import { z } from 'zod';\n\n//\n// Base content types\n//\n\nexport const ContentExplicitString = z\n .object({\n type: z.literal('explicit-string'),\n content: z.string().describe('Actual string value')\n })\n .strict();\nexport type ContentExplicitString = z.infer<typeof ContentExplicitString>;\n\nexport const ContentExplicitBase64 = z\n .object({\n type: z.literal('explicit-base64'),\n mimeType: z\n .string()\n .regex(/\\w+\\/[-+.\\w]+/)\n .describe('MIME type to interpret content'),\n content: z.string().base64().describe('Base64 encoded binary value')\n })\n .strict();\nexport type ContentExplicitBase64 = z.infer<typeof ContentExplicitBase64>;\n\nexport const ContentRelative = z\n .object({\n type: z.literal('relative'),\n path: z\n .string()\n .describe(\n 'Address of the file, in most cases relative to the file which this structure is a part of'\n )\n })\n .strict();\nexport type ContentRelative = z.infer<typeof ContentRelative>;\n\nconst absPathRegex = new RegExp(`^(/|[A-Z]:\\\\\\\\)`);\n\nexport const ContentAbsoluteFile = z\n .object({\n type: z.literal('absolute-file'),\n file: z\n .string()\n .regex(absPathRegex, 'path to file must be absolute')\n .describe('Absolute address of the file in local file system')\n })\n .strict();\nexport type ContentAbsoluteFile = z.infer<typeof ContentAbsoluteFile>;\n\nexport const ContentAbsoluteUrl = z\n .object({\n type: z.literal('absolute-url'),\n url: z.string().url().describe('Global URL to reach the requested file')\n })\n .strict();\nexport type ContentAbsoluteUrl = z.infer<typeof ContentAbsoluteUrl>;\n\n//\n// Special content types\n//\n\nexport const ContentExplicitBytes = z\n .object({\n type: z.literal('explicit-bytes'),\n mimeType: z\n .string()\n .regex(/\\w+\\/[-+.\\w]+/)\n .describe('MIME type to interpret content'),\n content: z.instanceof(Uint8Array).describe('Raw content')\n })\n .strict();\nexport type ContentExplicitBytes = z.infer<typeof ContentExplicitBytes>;\n\nexport const ContentAbsoluteFolder = z\n .object({\n type: z.literal('absolute-folder'),\n folder: z\n .string()\n .regex(absPathRegex, 'path to folder must be absolute')\n .describe('Absolute address of the folder in local file system')\n })\n .strict();\nexport type ContentAbsoluteFolder = z.infer<typeof ContentAbsoluteFolder>;\n\n//\n// Unions\n//\n\nexport const ContentAny = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile,\n ContentAbsoluteUrl\n]);\nexport type ContentAny = z.infer<typeof ContentAny>;\n\nexport const ContentExplicitOrRelative = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative\n]);\nexport type ContentExplicitOrRelative = z.infer<typeof ContentExplicitOrRelative>;\n\nexport const ContentAnyLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyLocal = z.infer<typeof ContentAnyLocal>;\n\nexport const ContentAnyRemote = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteUrl\n]);\nexport type ContentAnyRemote = z.infer<typeof ContentAnyRemote>;\n\n//\n// Narrow types with relative option\n//\n\n// export const ContentAnyBinaryRemote = z.discriminatedUnion('type', [\n// ContentExplicitBase64,\n// ContentRelative,\n// ContentAbsoluteUrl\n// ]);\n// export type ContentAnyBinaryRemote = z.infer<typeof ContentAnyBinaryRemote>;\n\nexport const ContentAnyBinaryLocal = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyBinaryLocal = z.infer<typeof ContentAnyBinaryLocal>;\n\n// export const ContentAnyTextRemote = z.discriminatedUnion('type', [\n// ContentExplicitString,\n// ContentRelative,\n// ContentAbsoluteUrl\n// ]);\n// export type ContentAnyTextRemote = z.infer<typeof ContentAnyTextRemote>;\n\nexport const ContentAnyTextLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyTextLocal = z.infer<typeof ContentAnyTextLocal>;\n\n//\n// Narrow absolute types\n//\n\nexport const ContentAbsoluteBinaryRemote = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentAbsoluteUrl\n]);\nexport type ContentAbsoluteBinaryRemote = z.infer<typeof ContentAbsoluteBinaryRemote>;\n\nexport const ContentAbsoluteBinaryLocal = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentAbsoluteFile\n]);\nexport type ContentAbsoluteBinaryLocal = z.infer<typeof ContentAbsoluteBinaryLocal>;\n\nexport const ContentAbsoluteTextRemote = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentAbsoluteUrl\n]);\nexport type ContentAbsoluteTextRemote = z.infer<typeof ContentAbsoluteTextRemote>;\n\nexport const ContentAbsoluteTextLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentAbsoluteFile\n]);\nexport type ContentAbsoluteTextLocal = z.infer<typeof ContentAbsoluteTextLocal>;\n\n//\n// Narrow relative types\n//\n\nexport const ContentRelativeBinary = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentRelative\n]);\nexport type ContentRelativeBinary = z.infer<typeof ContentRelativeBinary>;\n\nexport const ContentRelativeText = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentRelative\n]);\nexport type ContentRelativeText = z.infer<typeof ContentRelativeText>;\n\n// export function ConstructContent(\n// contentType: 'text',\n// contextType: 'local'\n// ): typeof ContentAnyTextLocal;\n// export function ConstructContent(\n// contentType: 'text',\n// contextType: 'remote'\n// ): typeof ContentAnyTextRemote;\n// export function ConstructContent(\n// contentType: 'binary',\n// contextType: 'local'\n// ): typeof ContentAnyBinaryLocal;\n// export function ConstructContent(\n// contentType: 'binary',\n// contextType: 'remote'\n// ): typeof ContentAnyBinaryRemote;\n// export function ConstructContent(\n// contentType: ContentType,\n// contextType: ContextType\n// ):\n// | typeof ContentAnyTextLocal\n// | typeof ContentAnyTextRemote\n// | typeof ContentAnyBinaryLocal\n// | typeof ContentAnyBinaryRemote;\n// export function ConstructContent(contentType: ContentType, contextType: ContextType) {\n// return contentType === 'text'\n// ? contextType === 'local'\n// ? ContentAnyTextLocal\n// : ContentAnyTextRemote\n// : contextType === 'local'\n// ? ContentAnyBinaryLocal\n// : ContentAnyBinaryRemote;\n// }\n\nexport const DescriptionContentBinary = z.union([\n z\n .string()\n .startsWith('file:')\n .transform<ContentRelativeBinary>((value, ctx) => ({ type: 'relative', path: value.slice(5) })),\n ContentAnyBinaryLocal\n]);\nexport type DescriptionContentBinary = z.infer<typeof DescriptionContentBinary>;\n\nexport const DescriptionContentText = z.union([\n z.string().transform<ContentRelativeText>((value, ctx) => {\n if (value.startsWith('file:')) return { type: 'relative', path: value.slice(5) };\n else return { type: 'explicit-string', content: value };\n }),\n ContentAnyTextLocal\n]);\nexport type DescriptionContentText = z.infer<typeof DescriptionContentText>;\n","import { z } from 'zod';\n\n// Regex taken from here:\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nexport const SemVer = z\n .string()\n .regex(\n /^(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-]+)*))?$/,\n 'Wrong version format, please use valid semver'\n );\n","import {\n ContentAbsoluteUrl,\n ContentAnyLocal,\n ContentExplicitOrRelative,\n ContentRelative\n} from './content_types';\n\nexport function mapRemoteToAbsolute(\n rootUrl: string\n): <T extends ContentAnyLocal>(value: T) => Exclude<T, ContentRelative> | ContentAbsoluteUrl {\n const rootWithSlash = rootUrl.endsWith('/') ? rootUrl : `${rootUrl}/`;\n return <T extends ContentAnyLocal>(value: T) =>\n value.type === 'relative'\n ? { type: 'absolute-url', url: rootWithSlash + value.path }\n : (value as Exclude<T, ContentRelative>);\n}\n\n/**\n * Creates transformer of relative content paths, that adds a specific prefix to the relative path.\n *\n * If prefix = \"nested-path/\", paths like \"somefile.txt\" will be transformed to \"nested-path/somefile.txt\".\n *\n * @param prefix prefix to add to the relaive path, slesh at the end will be added automatically if missed\n */\nexport function addPrefixToRelative(\n prefix: string\n): <T extends ContentExplicitOrRelative>(value: T) => T {\n const prefixWithSlash = prefix.endsWith('/') ? prefix : `${prefix}/`;\n return <T extends ContentExplicitOrRelative>(value: T) =>\n (value.type === 'relative'\n ? { type: 'relative', path: prefixWithSlash + value.path }\n : value) as T;\n}\n","import { z } from 'zod';\nimport { SemVer } from './semver';\n\n/** Global identifier of the block */\nexport const BlockPackId = z\n .object({\n organization: z.string(),\n name: z.string(),\n version: SemVer\n })\n .strict();\nexport type BlockPackId = z.infer<typeof BlockPackId>;\n\nexport const BlockPackIdNoVersion = BlockPackId.omit({ version: true });\nexport type BlockPackIdNoVersion = z.infer<typeof BlockPackIdNoVersion>;\n\nexport function blockPackIdToString(bp: BlockPackId): string;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}:${bp.version}`;\n}\n\nexport function blockPackIdNoVersionToString(bp: BlockPackIdNoVersion): string;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined\n): string | undefined;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined\n): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}`;\n}\n\nexport function blockPackIdEquals(\n bp1: BlockPackId | undefined,\n bp2: BlockPackId | undefined\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return (\n bp1.name === bp2.name && bp1.organization === bp2.organization && bp1.version === bp2.version\n );\n}\n\nexport function blockPackIdNoVersionEquals(\n bp1: BlockPackIdNoVersion | undefined,\n bp2: BlockPackIdNoVersion | undefined\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return bp1.name === bp2.name && bp1.organization === bp2.organization;\n}\n","import { z } from 'zod';\nimport { ContentRelativeBinary } from './content_types';\nimport { mapRemoteToAbsolute } from './content_conversion';\n\nexport type BlockPackComponents = {};\n\nexport function WorkflowV1<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.object({\n type: z.literal('workflow-v1'),\n main: contentType.describe('Main workflow')\n });\n}\n\nexport function Workflow<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.union([\n // string is converted to v1 workflow\n contentType\n .transform((value: z.infer<typeof contentType>) => ({\n type: 'workflow-v1' as const,\n main: value\n }))\n .pipe(WorkflowV1(contentType)),\n // structured objects are decoded as union with type descriptor\n z.discriminatedUnion('type', [WorkflowV1(contentType)])\n ]);\n}\n\nexport function BlockComponents<\n const WfAndModel extends z.ZodTypeAny,\n const UI extends z.ZodTypeAny\n>(wfAndModel: WfAndModel, ui: UI) {\n return z.object({\n workflow: Workflow(wfAndModel),\n model: wfAndModel,\n ui\n });\n}\n\nexport const BlockComponentsDescriptionRaw = BlockComponents(z.string(), z.string());\nexport type BlockComponentsDescriptionRaw = z.infer<typeof BlockComponentsDescriptionRaw>;\n\nexport function BlockComponentsAbsoluteUrl(prefix: string) {\n return BlockComponents(\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix))\n );\n}\nexport type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;\n\n// export const BlockComponentsExplicit = BlockComponents(, ContentRelative);\n// export type BlockComponentsExplicit = z.infer<typeof BlockComponentsExplicit>;\n","import { z } from 'zod';\nimport {\n ContentExplicitBase64,\n ContentExplicitBytes,\n DescriptionContentBinary,\n DescriptionContentText\n} from './content_types';\n\nexport function BlockPackMeta<\n const LongStringType extends z.ZodTypeAny,\n const BinaryType extends z.ZodTypeAny\n>(longString: LongStringType, binary: BinaryType) {\n return z.object({\n title: z.string(),\n description: z.string(),\n longDescription: longString.optional(),\n changelog: longString.optional(),\n logo: binary.optional(),\n url: z.string().url().optional(),\n docs: z.string().url().optional(),\n support: z.union([z.string().url(), z.string().email()]).optional(),\n tags: z.array(z.string()).optional(),\n organization: z.object({\n name: z.string(),\n url: z.string().url(),\n logo: binary.optional()\n }),\n /**\n * The order of blocks on the \"marketplace\" (higher values push block higher to the top of the list).\n * `undefined` value or absent field is treated exactly the same as number `0`.\n */\n marketplaceRanking: z.number().optional(),\n });\n}\n\n// prettier-ignore\nexport const BlockPackMetaDescriptionRaw = BlockPackMeta(\n DescriptionContentText,\n DescriptionContentBinary\n);\nexport type BlockPackMetaDescriptionRaw = z.infer<typeof BlockPackMetaDescriptionRaw>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBase64 = BlockPackMeta(\n z.string(),\n ContentExplicitBase64\n);\nexport type BlockPackMetaEmbeddedBase64 = z.infer<typeof BlockPackMetaEmbeddedBase64>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBytes = BlockPackMeta(\n z.string(),\n ContentExplicitBytes\n);\nexport type BlockPackMetaEmbeddedBytes = z.infer<typeof BlockPackMetaEmbeddedBytes>;\n","import { z, ZodTypeAny } from 'zod';\nimport { BlockComponentsDescriptionRaw } from './block_components';\nimport { BlockPackMetaDescriptionRaw } from './block_meta';\nimport { BlockPackId } from './block_id';\nimport * as R from 'remeda';\n\n/** Description, as appears in root block package.json file,\n * `file:` references are parsed into relative content of corresponding type, depending on the context,\n * strings are converted to explicit content type. */\nexport const BlockPackDescriptionFromPackageJsonRaw = z.object({\n components: BlockComponentsDescriptionRaw,\n meta: BlockPackMetaDescriptionRaw\n});\n\nexport function CreateBlockPackDescriptionSchema<\n Components extends ZodTypeAny,\n Meta extends ZodTypeAny\n>(components: Components, meta: Meta) {\n return z.object({\n id: BlockPackId,\n components,\n meta\n });\n}\n\nexport const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(\n BlockComponentsDescriptionRaw,\n BlockPackMetaDescriptionRaw\n);\nexport type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;\n\nexport function overrideDescriptionVersion<T extends { id: BlockPackId }>(\n manifest: T,\n newVersion: string\n): T {\n return R.mergeDeep(manifest, { id: { version: newVersion } }) as T;\n}\n","import { z } from 'zod';\nimport { BlockComponents } from './block_components';\nimport { ContentRelative, ContentRelativeBinary, ContentRelativeText } from './content_types';\nimport { CreateBlockPackDescriptionSchema } from './block_description';\nimport { BlockPackMeta } from './block_meta';\nimport * as R from 'remeda';\nimport { BlockPackId } from './block_id';\n\nexport const BlockComponentsManifest = BlockComponents(ContentRelative, ContentRelative);\nexport type BlockComponentsManifest = z.infer<typeof BlockComponentsManifest>;\n\nexport const BlockPackMetaManifest = BlockPackMeta(ContentRelativeText, ContentRelativeBinary);\nexport type BlockPackMetaManifest = z.infer<typeof BlockPackMetaManifest>;\n\n/** Block description to be used in block manifest */\nexport const BlockPackDescriptionManifest = CreateBlockPackDescriptionSchema(\n BlockComponentsManifest,\n BlockPackMetaManifest\n);\nexport type BlockPackDescriptionManifest = z.infer<typeof BlockPackDescriptionManifest>;\n\nexport const Sha256Schema = z\n .string()\n .regex(/[0-9a-fA-F]/)\n .toUpperCase()\n .length(64); // 256 / 4 (bits per hex register);\n\nexport const ManifestFileInfo = z.object({\n name: z.string(),\n size: z.number().int(),\n sha256: Sha256Schema\n});\nexport type ManifestFileInfo = z.infer<typeof ManifestFileInfo>;\n\nexport const BlockPackManifest = z.object({\n schema: z.literal('v2'),\n description: BlockPackDescriptionManifest,\n timestamp: z.number().optional(),\n files: z.array(ManifestFileInfo)\n});\nexport type BlockPackManifest = z.infer<typeof BlockPackManifest>;\n\nexport const BlockPackManifestFile = 'manifest.json';\n\nexport function overrideManifestVersion<T extends { description: { id: BlockPackId } }>(\n manifest: T,\n newVersion: string\n): T {\n return R.mergeDeep(manifest, { description: { id: { version: newVersion } } }) as T;\n}\n","import { z } from 'zod';\nimport { BlockPackId } from '../block_meta';\n\n/** Block pack from local folder, to be used during block development. Old layout.\n * @deprecated don't use */\nexport const BlockPackDevV1 = z.object({\n type: z.literal('dev-v1'),\n folder: z.string(),\n mtime: z.string().optional()\n});\n/** @deprecated don't use */\nexport type BlockPackDevV1 = z.infer<typeof BlockPackDevV1>;\n\n/** Block pack from local folder, to be used during block development. New layout. */\nexport const BlockPackDevV2 = z.object({\n type: z.literal('dev-v2'),\n folder: z.string(),\n mtime: z.string().optional()\n});\nexport type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;\n\n/**\n * Block pack from registry with version 2 layout, to be loaded directly\n * from the client.\n * @deprecated don't use\n * */\nexport const BlockPackFromRegistryV1 = z.object({\n type: z.literal('from-registry-v1'),\n registryUrl: z.string(),\n id: BlockPackId\n});\n/** @deprecated don't use */\nexport type BlockPackFromRegistryV1 = z.infer<typeof BlockPackFromRegistryV1>;\n\n/** Block pack from registry with version 2 layout, to be loaded directly\n * from the client. */\nexport const BlockPackFromRegistryV2 = z.object({\n type: z.literal('from-registry-v2'),\n registryUrl: z.string(),\n id: BlockPackId,\n channel: z.string().optional()\n});\nexport type BlockPackFromRegistryV2 = z.infer<typeof BlockPackFromRegistryV2>;\n\n/** Information about block origin, can be used to instantiate new blocks */\nexport const BlockPackSpec = z.discriminatedUnion('type', [\n BlockPackDevV1,\n BlockPackDevV2,\n BlockPackFromRegistryV1,\n BlockPackFromRegistryV2\n]);\nexport type BlockPackSpec = z.infer<typeof BlockPackSpec>;\n","import { z } from 'zod';\n\nexport const LocalDevFolder = z.object({\n type: z.literal('local-dev'),\n path: z.string()\n});\nexport type LocalDevFolder = z.infer<typeof LocalDevFolder>;\n\n/** @deprecated don't use */\nexport const RemoteRegistryV1Spec = z.object({\n type: z.literal('remote-v1'),\n url: z.string().url()\n});\n/** @deprecated don't use */\nexport type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;\n\nexport const RemoteRegistryV2Spec = z.object({\n type: z.literal('remote-v2'),\n url: z.string().url()\n});\nexport type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;\n\nexport const RegistrySpec = z.discriminatedUnion('type', [\n RemoteRegistryV1Spec,\n RemoteRegistryV2Spec,\n LocalDevFolder\n]);\nexport type RegistrySpec = z.infer<typeof RegistrySpec>;\n\nexport const RegistryEntry = z.object({\n id: z.string(),\n title: z.string().optional(),\n spec: RegistrySpec\n});\nexport type RegistryEntry = z.infer<typeof RegistryEntry>;\n\nexport const RegistryList = z.array(RegistryEntry);\nexport type RegistryList = z.infer<typeof RegistryList>;\n","import { z } from 'zod';\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n SemVer\n} from '../block_meta';\nimport { BlockPackFromRegistryV2, BlockPackSpec } from './block_pack_spec';\nimport { RegistryEntry } from './registry_spec';\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverviewLegacy = z.object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer)\n});\nexport type BlockPackOverviewLegacy = z.infer<typeof BlockPackOverviewLegacy>;\n\nexport const AnyChannel = 'any';\nexport const StableChannel = 'stable';\n\nexport const VersionWithChannels = z.object({\n version: SemVer,\n channels: z.array(z.string())\n});\n\n/**\n * Information about specific block pack version.\n * */\nexport const SingleBlockPackOverview = z.object({\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec\n});\nexport type SingleBlockPackOverview = z.infer<typeof SingleBlockPackOverview>;\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverview = z.object({\n id: BlockPackIdNoVersion,\n latestByChannel: z.record(z.string(), SingleBlockPackOverview),\n allVersions: z.array(VersionWithChannels),\n registryId: z.string()\n});\nexport type BlockPackOverview = z.infer<typeof BlockPackOverview>;\n\nexport const RegistryStatus = RegistryEntry.extend({\n status: z.union([z.literal('online'), z.literal('offline')])\n});\nexport type RegistryStatus = z.infer<typeof RegistryStatus>;\n\nexport const BlockPackListing = z.object({\n registries: z.array(RegistryStatus),\n blockPacks: z.array(BlockPackOverview)\n});\nexport type BlockPackListing = z.infer<typeof BlockPackListing>;\n\nexport function blockPackOverviewToLegacy(bpo: BlockPackOverview): BlockPackOverviewLegacy {\n const mainChannel = bpo.latestByChannel[StableChannel] !== undefined ? StableChannel : AnyChannel;\n const latestOverview = bpo.latestByChannel[mainChannel];\n return {\n id: latestOverview.id,\n meta: latestOverview.meta,\n // so we only add stable channel specs to projects, to smooth the transition\n spec: { ...(latestOverview.spec as BlockPackFromRegistryV2), channel: StableChannel },\n otherVersions: bpo.allVersions\n .filter((v) => v.channels.indexOf(mainChannel) >= 0)\n .map((v) => v.version),\n registryId: bpo.registryId\n };\n}\n"],"names":["InitialBlockSettings","ContentExplicitString","z","ContentExplicitBase64","ContentRelative","absPathRegex","ContentAbsoluteFile","ContentAbsoluteUrl","ContentExplicitBytes","ContentAbsoluteFolder","ContentAny","ContentExplicitOrRelative","ContentAnyLocal","ContentAnyRemote","ContentAnyBinaryLocal","ContentAnyTextLocal","ContentAbsoluteBinaryRemote","ContentAbsoluteBinaryLocal","ContentAbsoluteTextRemote","ContentAbsoluteTextLocal","ContentRelativeBinary","ContentRelativeText","DescriptionContentBinary","value","ctx","DescriptionContentText","SemVer","mapRemoteToAbsolute","rootUrl","rootWithSlash","addPrefixToRelative","prefix","prefixWithSlash","BlockPackId","BlockPackIdNoVersion","blockPackIdToString","bp","blockPackIdNoVersionToString","blockPackIdEquals","bp1","bp2","blockPackIdNoVersionEquals","WorkflowV1","contentType","Workflow","BlockComponents","wfAndModel","ui","BlockComponentsDescriptionRaw","BlockComponentsAbsoluteUrl","BlockPackMeta","longString","binary","BlockPackMetaDescriptionRaw","BlockPackMetaEmbeddedBase64","BlockPackMetaEmbeddedBytes","BlockPackDescriptionFromPackageJsonRaw","CreateBlockPackDescriptionSchema","components","meta","BlockPackDescriptionRaw","overrideDescriptionVersion","manifest","newVersion","R","BlockComponentsManifest","BlockPackMetaManifest","BlockPackDescriptionManifest","Sha256Schema","ManifestFileInfo","BlockPackManifest","BlockPackManifestFile","overrideManifestVersion","BlockPackDevV1","BlockPackDevV2","BlockPackFromRegistryV1","BlockPackFromRegistryV2","BlockPackSpec","LocalDevFolder","RemoteRegistryV1Spec","RemoteRegistryV2Spec","RegistrySpec","RegistryEntry","RegistryList","BlockPackOverviewLegacy","AnyChannel","StableChannel","VersionWithChannels","SingleBlockPackOverview","BlockPackOverview","RegistryStatus","BlockPackListing","blockPackOverviewToLegacy","bpo","mainChannel","latestOverview","v"],"mappings":"qZA0BaA,GAAsC,CAAA,ECpBtCC,EAAwBC,IAClC,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,iBAAiB,EACjC,QAASA,EAAA,EAAE,OAAO,EAAE,SAAS,qBAAqB,CACpD,CAAC,EACA,OAAO,EAGGC,EAAwBD,IAClC,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,iBAAiB,EACjC,SAAUA,IACP,OAAO,EACP,MAAM,eAAe,EACrB,SAAS,gCAAgC,EAC5C,QAASA,EAAE,EAAA,OAAA,EAAS,OAAO,EAAE,SAAS,6BAA6B,CACrE,CAAC,EACA,OAAO,EAGGE,EAAkBF,IAC5B,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,UAAU,EAC1B,KAAMA,EAAAA,EACH,OAAA,EACA,SACC,2FAAA,CAEN,CAAC,EACA,OAAO,EAGJG,EAAe,IAAI,OAAO,iBAAiB,EAEpCC,EAAsBJ,IAChC,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,eAAe,EAC/B,KAAMA,EAAAA,EACH,SACA,MAAMG,EAAc,+BAA+B,EACnD,SAAS,mDAAmD,CACjE,CAAC,EACA,OAAO,EAGGE,EAAqBL,IAC/B,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,cAAc,EAC9B,IAAKA,EAAE,EAAA,OAAA,EAAS,IAAI,EAAE,SAAS,wCAAwC,CACzE,CAAC,EACA,OAAO,EAOGM,EAAuBN,IACjC,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,gBAAgB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AC7D,CAAC,EAGYyF,GAAmBzF,IAAE,OAAO,CACvC,WAAYA,EAAAA,EAAE,MAAMwF,CAAc,EAClC,WAAYxF,EAAAA,EAAE,MAAMuF,CAAiB,CACvC,CAAC,EAGM,SAASG,GAA0BC,EAAiD,CACzF,MAAMC,EAAcD,EAAI,gBAAgBP,CAAa,IAAM,OAAYA,EAAgBD,EACjFU,EAAiBF,EAAI,gBAAgBC,CAAW,EAC/C,MAAA,CACL,GAAIC,EAAe,GACnB,KAAMA,EAAe,KAErB,KAAM,CAAE,GAAIA,EAAe,KAAkC,QAAST,CAAc,EACpF,cAAeO,EAAI,YAChB,OAAQG,GAAMA,EAAE,SAAS,QAAQF,CAAW,GAAK,CAAC,EAClD,IAAKE,GAAMA,EAAE,OAAO,EACvB,WAAYH,EAAI,UAClB,CACF"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/block_settings.ts","../src/block_meta/content_types.ts","../src/block_meta/semver.ts","../src/block_meta/content_conversion.ts","../src/block_meta/block_id.ts","../src/block_meta/block_components.ts","../src/block_meta/block_meta.ts","../src/block_meta/block_description.ts","../src/block_meta/block_manifest.ts","../src/block_registry/block_pack_spec.ts","../src/block_registry/registry_spec.ts","../src/block_registry/overview.ts"],"sourcesContent":["/**\n * What part of block version should be locked against updates.\n *\n * - `major` - 1.2.3 can be updated to 1.4.7\n * - `minor` - 1.2.3 can be updated to 1.2.5\n * - `patch` - version of the block is completely locked\n *\n * */\nexport type VersionLock = 'major' | 'minor' | 'patch';\n\n/**\n * Block settings, persisted on the backend.\n *\n * Settings modulate different aspects of block behaviour,\n * currently only updates.\n * */\nexport type BlockSettings = {\n /** Only version stricktly greater that this one will be suggested for auto-update. */\n skipVersion?: string;\n /**\n * If certain version locking policy is set, auto-updates will only be suggested,\n * if there is an update within the specified release line.\n * */\n versionLock?: VersionLock;\n};\n\nexport const InitialBlockSettings: BlockSettings = {};\n","import { z } from 'zod';\n\n//\n// Base content types\n//\n\nexport const ContentExplicitString = z\n .object({\n type: z.literal('explicit-string'),\n content: z.string().describe('Actual string value')\n })\n .strict();\nexport type ContentExplicitString = z.infer<typeof ContentExplicitString>;\n\nexport const ContentExplicitBase64 = z\n .object({\n type: z.literal('explicit-base64'),\n mimeType: z\n .string()\n .regex(/\\w+\\/[-+.\\w]+/)\n .describe('MIME type to interpret content'),\n content: z.string().base64().describe('Base64 encoded binary value')\n })\n .strict();\nexport type ContentExplicitBase64 = z.infer<typeof ContentExplicitBase64>;\n\nexport const ContentRelative = z\n .object({\n type: z.literal('relative'),\n path: z\n .string()\n .describe(\n 'Address of the file, in most cases relative to the file which this structure is a part of'\n )\n })\n .strict();\nexport type ContentRelative = z.infer<typeof ContentRelative>;\n\nconst absPathRegex = new RegExp(`^(/|[A-Z]:\\\\\\\\)`);\n\nexport const ContentAbsoluteFile = z\n .object({\n type: z.literal('absolute-file'),\n file: z\n .string()\n .regex(absPathRegex, 'path to file must be absolute')\n .describe('Absolute address of the file in local file system')\n })\n .strict();\nexport type ContentAbsoluteFile = z.infer<typeof ContentAbsoluteFile>;\n\nexport const ContentAbsoluteUrl = z\n .object({\n type: z.literal('absolute-url'),\n url: z.string().url().describe('Global URL to reach the requested file')\n })\n .strict();\nexport type ContentAbsoluteUrl = z.infer<typeof ContentAbsoluteUrl>;\n\n//\n// Special content types\n//\n\nexport const ContentExplicitBytes = z\n .object({\n type: z.literal('explicit-bytes'),\n mimeType: z\n .string()\n .regex(/\\w+\\/[-+.\\w]+/)\n .describe('MIME type to interpret content'),\n content: z.instanceof(Uint8Array).describe('Raw content')\n })\n .strict();\nexport type ContentExplicitBytes = z.infer<typeof ContentExplicitBytes>;\n\nexport const ContentAbsoluteFolder = z\n .object({\n type: z.literal('absolute-folder'),\n folder: z\n .string()\n .regex(absPathRegex, 'path to folder must be absolute')\n .describe('Absolute address of the folder in local file system')\n })\n .strict();\nexport type ContentAbsoluteFolder = z.infer<typeof ContentAbsoluteFolder>;\n\n//\n// Unions\n//\n\nexport const ContentAny = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile,\n ContentAbsoluteUrl\n]);\nexport type ContentAny = z.infer<typeof ContentAny>;\n\nexport const ContentExplicitOrRelative = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative\n]);\nexport type ContentExplicitOrRelative = z.infer<typeof ContentExplicitOrRelative>;\n\nexport const ContentAnyLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyLocal = z.infer<typeof ContentAnyLocal>;\n\nexport const ContentAnyRemote = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteUrl\n]);\nexport type ContentAnyRemote = z.infer<typeof ContentAnyRemote>;\n\n//\n// Narrow types with relative option\n//\n\n// export const ContentAnyBinaryRemote = z.discriminatedUnion('type', [\n// ContentExplicitBase64,\n// ContentRelative,\n// ContentAbsoluteUrl\n// ]);\n// export type ContentAnyBinaryRemote = z.infer<typeof ContentAnyBinaryRemote>;\n\nexport const ContentAnyBinaryLocal = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyBinaryLocal = z.infer<typeof ContentAnyBinaryLocal>;\n\n// export const ContentAnyTextRemote = z.discriminatedUnion('type', [\n// ContentExplicitString,\n// ContentRelative,\n// ContentAbsoluteUrl\n// ]);\n// export type ContentAnyTextRemote = z.infer<typeof ContentAnyTextRemote>;\n\nexport const ContentAnyTextLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyTextLocal = z.infer<typeof ContentAnyTextLocal>;\n\n//\n// Narrow absolute types\n//\n\nexport const ContentAbsoluteBinaryRemote = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentAbsoluteUrl\n]);\nexport type ContentAbsoluteBinaryRemote = z.infer<typeof ContentAbsoluteBinaryRemote>;\n\nexport const ContentAbsoluteBinaryLocal = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentAbsoluteFile\n]);\nexport type ContentAbsoluteBinaryLocal = z.infer<typeof ContentAbsoluteBinaryLocal>;\n\nexport const ContentAbsoluteTextRemote = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentAbsoluteUrl\n]);\nexport type ContentAbsoluteTextRemote = z.infer<typeof ContentAbsoluteTextRemote>;\n\nexport const ContentAbsoluteTextLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentAbsoluteFile\n]);\nexport type ContentAbsoluteTextLocal = z.infer<typeof ContentAbsoluteTextLocal>;\n\n//\n// Narrow relative types\n//\n\nexport const ContentRelativeBinary = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentRelative\n]);\nexport type ContentRelativeBinary = z.infer<typeof ContentRelativeBinary>;\n\nexport const ContentRelativeText = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentRelative\n]);\nexport type ContentRelativeText = z.infer<typeof ContentRelativeText>;\n\n// export function ConstructContent(\n// contentType: 'text',\n// contextType: 'local'\n// ): typeof ContentAnyTextLocal;\n// export function ConstructContent(\n// contentType: 'text',\n// contextType: 'remote'\n// ): typeof ContentAnyTextRemote;\n// export function ConstructContent(\n// contentType: 'binary',\n// contextType: 'local'\n// ): typeof ContentAnyBinaryLocal;\n// export function ConstructContent(\n// contentType: 'binary',\n// contextType: 'remote'\n// ): typeof ContentAnyBinaryRemote;\n// export function ConstructContent(\n// contentType: ContentType,\n// contextType: ContextType\n// ):\n// | typeof ContentAnyTextLocal\n// | typeof ContentAnyTextRemote\n// | typeof ContentAnyBinaryLocal\n// | typeof ContentAnyBinaryRemote;\n// export function ConstructContent(contentType: ContentType, contextType: ContextType) {\n// return contentType === 'text'\n// ? contextType === 'local'\n// ? ContentAnyTextLocal\n// : ContentAnyTextRemote\n// : contextType === 'local'\n// ? ContentAnyBinaryLocal\n// : ContentAnyBinaryRemote;\n// }\n\nexport const DescriptionContentBinary = z.union([\n z\n .string()\n .startsWith('file:')\n .transform<ContentRelativeBinary>((value, ctx) => ({ type: 'relative', path: value.slice(5) })),\n ContentAnyBinaryLocal\n]);\nexport type DescriptionContentBinary = z.infer<typeof DescriptionContentBinary>;\n\nexport const DescriptionContentText = z.union([\n z.string().transform<ContentRelativeText>((value, ctx) => {\n if (value.startsWith('file:')) return { type: 'relative', path: value.slice(5) };\n else return { type: 'explicit-string', content: value };\n }),\n ContentAnyTextLocal\n]);\nexport type DescriptionContentText = z.infer<typeof DescriptionContentText>;\n","import { z } from 'zod';\n\n// Regex taken from here:\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nexport const SemVer = z\n .string()\n .regex(\n /^(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-]+)*))?$/,\n 'Wrong version format, please use valid semver'\n );\n","import {\n ContentAbsoluteUrl,\n ContentAnyLocal,\n ContentExplicitOrRelative,\n ContentRelative\n} from './content_types';\n\nexport function mapRemoteToAbsolute(\n rootUrl: string\n): <T extends ContentAnyLocal>(value: T) => Exclude<T, ContentRelative> | ContentAbsoluteUrl {\n const rootWithSlash = rootUrl.endsWith('/') ? rootUrl : `${rootUrl}/`;\n return <T extends ContentAnyLocal>(value: T) =>\n value.type === 'relative'\n ? { type: 'absolute-url', url: rootWithSlash + value.path }\n : (value as Exclude<T, ContentRelative>);\n}\n\n/**\n * Creates transformer of relative content paths, that adds a specific prefix to the relative path.\n *\n * If prefix = \"nested-path/\", paths like \"somefile.txt\" will be transformed to \"nested-path/somefile.txt\".\n *\n * @param prefix prefix to add to the relaive path, slesh at the end will be added automatically if missed\n */\nexport function addPrefixToRelative(\n prefix: string\n): <T extends ContentExplicitOrRelative>(value: T) => T {\n const prefixWithSlash = prefix.endsWith('/') ? prefix : `${prefix}/`;\n return <T extends ContentExplicitOrRelative>(value: T) =>\n (value.type === 'relative'\n ? { type: 'relative', path: prefixWithSlash + value.path }\n : value) as T;\n}\n","import { z } from 'zod';\nimport { SemVer } from './semver';\n\n/** Global identifier of the block */\nexport const BlockPackId = z\n .object({\n organization: z.string(),\n name: z.string(),\n version: SemVer\n })\n .strict();\nexport type BlockPackId = z.infer<typeof BlockPackId>;\n\nexport const BlockPackIdNoVersion = BlockPackId.omit({ version: true });\nexport type BlockPackIdNoVersion = z.infer<typeof BlockPackIdNoVersion>;\n\nexport function blockPackIdToString(bp: BlockPackId): string;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}:${bp.version}`;\n}\n\nexport function blockPackIdNoVersionToString(bp: BlockPackIdNoVersion): string;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined\n): string | undefined;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined\n): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}`;\n}\n\nexport function blockPackIdEquals(\n bp1: BlockPackId | undefined,\n bp2: BlockPackId | undefined\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return (\n bp1.name === bp2.name && bp1.organization === bp2.organization && bp1.version === bp2.version\n );\n}\n\nexport function blockPackIdNoVersionEquals(\n bp1: BlockPackIdNoVersion | undefined,\n bp2: BlockPackIdNoVersion | undefined\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return bp1.name === bp2.name && bp1.organization === bp2.organization;\n}\n","import { z } from 'zod';\nimport { ContentRelativeBinary } from './content_types';\nimport { mapRemoteToAbsolute } from './content_conversion';\n\nexport type BlockPackComponents = {};\n\nexport function WorkflowV1<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.object({\n type: z.literal('workflow-v1'),\n main: contentType.describe('Main workflow')\n });\n}\n\nexport function Workflow<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.union([\n // string is converted to v1 workflow\n contentType\n .transform((value: z.infer<typeof contentType>) => ({\n type: 'workflow-v1' as const,\n main: value\n }))\n .pipe(WorkflowV1(contentType)),\n // structured objects are decoded as union with type descriptor\n z.discriminatedUnion('type', [WorkflowV1(contentType)])\n ]);\n}\n\nexport function BlockComponents<\n const WfAndModel extends z.ZodTypeAny,\n const UI extends z.ZodTypeAny\n>(wfAndModel: WfAndModel, ui: UI) {\n return z.object({\n workflow: Workflow(wfAndModel),\n model: wfAndModel,\n ui\n });\n}\n\nexport const BlockComponentsDescriptionRaw = BlockComponents(z.string(), z.string());\nexport type BlockComponentsDescriptionRaw = z.infer<typeof BlockComponentsDescriptionRaw>;\n\nexport function BlockComponentsAbsoluteUrl(prefix: string) {\n return BlockComponents(\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix))\n );\n}\nexport type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;\n\n// export const BlockComponentsExplicit = BlockComponents(, ContentRelative);\n// export type BlockComponentsExplicit = z.infer<typeof BlockComponentsExplicit>;\n","import { z } from 'zod';\nimport {\n ContentExplicitBase64,\n ContentExplicitBytes,\n DescriptionContentBinary,\n DescriptionContentText\n} from './content_types';\n\nexport function BlockPackMeta<\n const LongStringType extends z.ZodTypeAny,\n const BinaryType extends z.ZodTypeAny\n>(longString: LongStringType, binary: BinaryType) {\n return z.object({\n title: z.string(),\n description: z.string(),\n longDescription: longString.optional(),\n changelog: longString.optional(),\n logo: binary.optional(),\n url: z.string().url().optional(),\n docs: z.string().url().optional(),\n support: z.union([z.string().url(), z.string().email()]).optional(),\n tags: z.array(z.string()).optional(),\n organization: z.object({\n name: z.string(),\n url: z.string().url(),\n logo: binary.optional()\n }),\n /**\n * The order of blocks on the \"marketplace\" (higher values push block higher to the top of the list).\n * `undefined` value or absent field is treated exactly the same as number `0`.\n */\n marketplaceRanking: z.number().optional(),\n /**\n * The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.\n */\n termsOfServiceUrl: z.string().url().optional()\n });\n}\n\n// prettier-ignore\nexport const BlockPackMetaDescriptionRaw = BlockPackMeta(\n DescriptionContentText,\n DescriptionContentBinary\n);\nexport type BlockPackMetaDescriptionRaw = z.infer<typeof BlockPackMetaDescriptionRaw>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBase64 = BlockPackMeta(\n z.string(),\n ContentExplicitBase64\n);\nexport type BlockPackMetaEmbeddedBase64 = z.infer<typeof BlockPackMetaEmbeddedBase64>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBytes = BlockPackMeta(\n z.string(),\n ContentExplicitBytes\n);\nexport type BlockPackMetaEmbeddedBytes = z.infer<typeof BlockPackMetaEmbeddedBytes>;\n","import { z, ZodTypeAny } from 'zod';\nimport { BlockComponentsDescriptionRaw } from './block_components';\nimport { BlockPackMetaDescriptionRaw } from './block_meta';\nimport { BlockPackId } from './block_id';\nimport * as R from 'remeda';\n\n/** Description, as appears in root block package.json file,\n * `file:` references are parsed into relative content of corresponding type, depending on the context,\n * strings are converted to explicit content type. */\nexport const BlockPackDescriptionFromPackageJsonRaw = z.object({\n components: BlockComponentsDescriptionRaw,\n meta: BlockPackMetaDescriptionRaw\n});\n\nexport function CreateBlockPackDescriptionSchema<\n Components extends ZodTypeAny,\n Meta extends ZodTypeAny\n>(components: Components, meta: Meta) {\n return z.object({\n id: BlockPackId,\n components,\n meta\n });\n}\n\nexport const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(\n BlockComponentsDescriptionRaw,\n BlockPackMetaDescriptionRaw\n);\nexport type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;\n\nexport function overrideDescriptionVersion<T extends { id: BlockPackId }>(\n manifest: T,\n newVersion: string\n): T {\n return R.mergeDeep(manifest, { id: { version: newVersion } }) as T;\n}\n","import { z } from 'zod';\nimport { BlockComponents } from './block_components';\nimport { ContentRelative, ContentRelativeBinary, ContentRelativeText } from './content_types';\nimport { CreateBlockPackDescriptionSchema } from './block_description';\nimport { BlockPackMeta } from './block_meta';\nimport * as R from 'remeda';\nimport { BlockPackId } from './block_id';\n\nexport const BlockComponentsManifest = BlockComponents(ContentRelative, ContentRelative);\nexport type BlockComponentsManifest = z.infer<typeof BlockComponentsManifest>;\n\nexport const BlockPackMetaManifest = BlockPackMeta(ContentRelativeText, ContentRelativeBinary);\nexport type BlockPackMetaManifest = z.infer<typeof BlockPackMetaManifest>;\n\n/** Block description to be used in block manifest */\nexport const BlockPackDescriptionManifest = CreateBlockPackDescriptionSchema(\n BlockComponentsManifest,\n BlockPackMetaManifest\n);\nexport type BlockPackDescriptionManifest = z.infer<typeof BlockPackDescriptionManifest>;\n\nexport const Sha256Schema = z\n .string()\n .regex(/[0-9a-fA-F]/)\n .toUpperCase()\n .length(64); // 256 / 4 (bits per hex register);\n\nexport const ManifestFileInfo = z.object({\n name: z.string(),\n size: z.number().int(),\n sha256: Sha256Schema\n});\nexport type ManifestFileInfo = z.infer<typeof ManifestFileInfo>;\n\nexport const BlockPackManifest = z.object({\n schema: z.literal('v2'),\n description: BlockPackDescriptionManifest,\n timestamp: z.number().optional(),\n files: z.array(ManifestFileInfo)\n});\nexport type BlockPackManifest = z.infer<typeof BlockPackManifest>;\n\nexport const BlockPackManifestFile = 'manifest.json';\n\nexport function overrideManifestVersion<T extends { description: { id: BlockPackId } }>(\n manifest: T,\n newVersion: string\n): T {\n return R.mergeDeep(manifest, { description: { id: { version: newVersion } } }) as T;\n}\n","import { z } from 'zod';\nimport { BlockPackId } from '../block_meta';\n\n/** Block pack from local folder, to be used during block development. Old layout.\n * @deprecated don't use */\nexport const BlockPackDevV1 = z.object({\n type: z.literal('dev-v1'),\n folder: z.string(),\n mtime: z.string().optional()\n});\n/** @deprecated don't use */\nexport type BlockPackDevV1 = z.infer<typeof BlockPackDevV1>;\n\n/** Block pack from local folder, to be used during block development. New layout. */\nexport const BlockPackDevV2 = z.object({\n type: z.literal('dev-v2'),\n folder: z.string(),\n mtime: z.string().optional()\n});\nexport type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;\n\n/**\n * Block pack from registry with version 2 layout, to be loaded directly\n * from the client.\n * @deprecated don't use\n * */\nexport const BlockPackFromRegistryV1 = z.object({\n type: z.literal('from-registry-v1'),\n registryUrl: z.string(),\n id: BlockPackId\n});\n/** @deprecated don't use */\nexport type BlockPackFromRegistryV1 = z.infer<typeof BlockPackFromRegistryV1>;\n\n/** Block pack from registry with version 2 layout, to be loaded directly\n * from the client. */\nexport const BlockPackFromRegistryV2 = z.object({\n type: z.literal('from-registry-v2'),\n registryUrl: z.string(),\n id: BlockPackId,\n channel: z.string().optional()\n});\nexport type BlockPackFromRegistryV2 = z.infer<typeof BlockPackFromRegistryV2>;\n\n/** Information about block origin, can be used to instantiate new blocks */\nexport const BlockPackSpec = z.discriminatedUnion('type', [\n BlockPackDevV1,\n BlockPackDevV2,\n BlockPackFromRegistryV1,\n BlockPackFromRegistryV2\n]);\nexport type BlockPackSpec = z.infer<typeof BlockPackSpec>;\n","import { z } from 'zod';\n\nexport const LocalDevFolder = z.object({\n type: z.literal('local-dev'),\n path: z.string()\n});\nexport type LocalDevFolder = z.infer<typeof LocalDevFolder>;\n\n/** @deprecated don't use */\nexport const RemoteRegistryV1Spec = z.object({\n type: z.literal('remote-v1'),\n url: z.string().url()\n});\n/** @deprecated don't use */\nexport type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;\n\nexport const RemoteRegistryV2Spec = z.object({\n type: z.literal('remote-v2'),\n url: z.string().url()\n});\nexport type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;\n\nexport const RegistrySpec = z.discriminatedUnion('type', [\n RemoteRegistryV1Spec,\n RemoteRegistryV2Spec,\n LocalDevFolder\n]);\nexport type RegistrySpec = z.infer<typeof RegistrySpec>;\n\nexport const RegistryEntry = z.object({\n id: z.string(),\n title: z.string().optional(),\n spec: RegistrySpec\n});\nexport type RegistryEntry = z.infer<typeof RegistryEntry>;\n\nexport const RegistryList = z.array(RegistryEntry);\nexport type RegistryList = z.infer<typeof RegistryList>;\n","import { z } from 'zod';\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n SemVer\n} from '../block_meta';\nimport { BlockPackFromRegistryV2, BlockPackSpec } from './block_pack_spec';\nimport { RegistryEntry } from './registry_spec';\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverviewLegacy = z.object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer)\n});\nexport type BlockPackOverviewLegacy = z.infer<typeof BlockPackOverviewLegacy>;\n\nexport const AnyChannel = 'any';\nexport const StableChannel = 'stable';\n\nexport const VersionWithChannels = z.object({\n version: SemVer,\n channels: z.array(z.string())\n});\n\n/**\n * Information about specific block pack version.\n * */\nexport const SingleBlockPackOverview = z.object({\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec\n});\nexport type SingleBlockPackOverview = z.infer<typeof SingleBlockPackOverview>;\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverview = z.object({\n id: BlockPackIdNoVersion,\n latestByChannel: z.record(z.string(), SingleBlockPackOverview),\n allVersions: z.array(VersionWithChannels),\n registryId: z.string()\n});\nexport type BlockPackOverview = z.infer<typeof BlockPackOverview>;\n\nexport const RegistryStatus = RegistryEntry.extend({\n status: z.union([z.literal('online'), z.literal('offline')])\n});\nexport type RegistryStatus = z.infer<typeof RegistryStatus>;\n\nexport const BlockPackListing = z.object({\n registries: z.array(RegistryStatus),\n blockPacks: z.array(BlockPackOverview)\n});\nexport type BlockPackListing = z.infer<typeof BlockPackListing>;\n\nexport function blockPackOverviewToLegacy(bpo: BlockPackOverview): BlockPackOverviewLegacy {\n const mainChannel = bpo.latestByChannel[StableChannel] !== undefined ? StableChannel : AnyChannel;\n const latestOverview = bpo.latestByChannel[mainChannel];\n return {\n id: latestOverview.id,\n meta: latestOverview.meta,\n // so we only add stable channel specs to projects, to smooth the transition\n spec: { ...(latestOverview.spec as BlockPackFromRegistryV2), channel: StableChannel },\n otherVersions: bpo.allVersions\n .filter((v) => v.channels.indexOf(mainChannel) >= 0)\n .map((v) => v.version),\n registryId: bpo.registryId\n };\n}\n"],"names":["InitialBlockSettings","ContentExplicitString","z","ContentExplicitBase64","ContentRelative","absPathRegex","ContentAbsoluteFile","ContentAbsoluteUrl","ContentExplicitBytes","ContentAbsoluteFolder","ContentAny","ContentExplicitOrRelative","ContentAnyLocal","ContentAnyRemote","ContentAnyBinaryLocal","ContentAnyTextLocal","ContentAbsoluteBinaryRemote","ContentAbsoluteBinaryLocal","ContentAbsoluteTextRemote","ContentAbsoluteTextLocal","ContentRelativeBinary","ContentRelativeText","DescriptionContentBinary","value","ctx","DescriptionContentText","SemVer","mapRemoteToAbsolute","rootUrl","rootWithSlash","addPrefixToRelative","prefix","prefixWithSlash","BlockPackId","BlockPackIdNoVersion","blockPackIdToString","bp","blockPackIdNoVersionToString","blockPackIdEquals","bp1","bp2","blockPackIdNoVersionEquals","WorkflowV1","contentType","Workflow","BlockComponents","wfAndModel","ui","BlockComponentsDescriptionRaw","BlockComponentsAbsoluteUrl","BlockPackMeta","longString","binary","BlockPackMetaDescriptionRaw","BlockPackMetaEmbeddedBase64","BlockPackMetaEmbeddedBytes","BlockPackDescriptionFromPackageJsonRaw","CreateBlockPackDescriptionSchema","components","meta","BlockPackDescriptionRaw","overrideDescriptionVersion","manifest","newVersion","R","BlockComponentsManifest","BlockPackMetaManifest","BlockPackDescriptionManifest","Sha256Schema","ManifestFileInfo","BlockPackManifest","BlockPackManifestFile","overrideManifestVersion","BlockPackDevV1","BlockPackDevV2","BlockPackFromRegistryV1","BlockPackFromRegistryV2","BlockPackSpec","LocalDevFolder","RemoteRegistryV1Spec","RemoteRegistryV2Spec","RegistrySpec","RegistryEntry","RegistryList","BlockPackOverviewLegacy","AnyChannel","StableChannel","VersionWithChannels","SingleBlockPackOverview","BlockPackOverview","RegistryStatus","BlockPackListing","blockPackOverviewToLegacy","bpo","mainChannel","latestOverview","v"],"mappings":"qZA0BaA,GAAsC,CAAA,ECpBtCC,EAAwBC,IAClC,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,iBAAiB,EACjC,QAASA,EAAA,EAAE,OAAO,EAAE,SAAS,qBAAqB,CACpD,CAAC,EACA,OAAO,EAGGC,EAAwBD,IAClC,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,iBAAiB,EACjC,SAAUA,IACP,OAAO,EACP,MAAM,eAAe,EACrB,SAAS,gCAAgC,EAC5C,QAASA,EAAE,EAAA,OAAA,EAAS,OAAO,EAAE,SAAS,6BAA6B,CACrE,CAAC,EACA,OAAO,EAGGE,EAAkBF,IAC5B,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,UAAU,EAC1B,KAAMA,EAAAA,EACH,OAAA,EACA,SACC,2FAAA,CAEN,CAAC,EACA,OAAO,EAGJG,EAAe,IAAI,OAAO,iBAAiB,EAEpCC,EAAsBJ,IAChC,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,eAAe,EAC/B,KAAMA,EAAAA,EACH,SACA,MAAMG,EAAc,+BAA+B,EACnD,SAAS,mDAAmD,CACjE,CAAC,EACA,OAAO,EAGGE,EAAqBL,IAC/B,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,cAAc,EAC9B,IAAKA,EAAE,EAAA,OAAA,EAAS,IAAI,EAAE,SA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AO,CACvB,CAAC,EAGYwF,EAAiBR,EAAc,OAAO,CACjD,OAAQhF,EAAA,EAAE,MAAM,CAACA,IAAE,QAAQ,QAAQ,EAAGA,EAAE,EAAA,QAAQ,SAAS,CAAC,CAAC,CAC7D,CAAC,EAGYyF,GAAmBzF,IAAE,OAAO,CACvC,WAAYA,EAAAA,EAAE,MAAMwF,CAAc,EAClC,WAAYxF,EAAAA,EAAE,MAAMuF,CAAiB,CACvC,CAAC,EAGM,SAASG,GAA0BC,EAAiD,CACzF,MAAMC,EAAcD,EAAI,gBAAgBP,CAAa,IAAM,OAAYA,EAAgBD,EACjFU,EAAiBF,EAAI,gBAAgBC,CAAW,EAC/C,MAAA,CACL,GAAIC,EAAe,GACnB,KAAMA,EAAe,KAErB,KAAM,CAAE,GAAIA,EAAe,KAAkC,QAAST,CAAc,EACpF,cAAeO,EAAI,YAChB,OAAQG,GAAMA,EAAE,SAAS,QAAQF,CAAW,GAAK,CAAC,EAClD,IAAKE,GAAMA,EAAE,OAAO,EACvB,WAAYH,EAAI,UAClB,CACF"}
|
package/dist/index.mjs
CHANGED
|
@@ -159,7 +159,11 @@ function d(e, n) {
|
|
|
159
159
|
* The order of blocks on the "marketplace" (higher values push block higher to the top of the list).
|
|
160
160
|
* `undefined` value or absent field is treated exactly the same as number `0`.
|
|
161
161
|
*/
|
|
162
|
-
marketplaceRanking: t.number().optional()
|
|
162
|
+
marketplaceRanking: t.number().optional(),
|
|
163
|
+
/**
|
|
164
|
+
* The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.
|
|
165
|
+
*/
|
|
166
|
+
termsOfServiceUrl: t.string().url().optional()
|
|
163
167
|
});
|
|
164
168
|
}
|
|
165
169
|
const B = d(
|
|
@@ -209,11 +213,11 @@ const F = t.object({
|
|
|
209
213
|
type: t.literal("dev-v1"),
|
|
210
214
|
folder: t.string(),
|
|
211
215
|
mtime: t.string().optional()
|
|
212
|
-
}),
|
|
216
|
+
}), O = t.object({
|
|
213
217
|
type: t.literal("dev-v2"),
|
|
214
218
|
folder: t.string(),
|
|
215
219
|
mtime: t.string().optional()
|
|
216
|
-
}),
|
|
220
|
+
}), W = t.object({
|
|
217
221
|
type: t.literal("from-registry-v1"),
|
|
218
222
|
registryUrl: t.string(),
|
|
219
223
|
id: a
|
|
@@ -224,8 +228,8 @@ const F = t.object({
|
|
|
224
228
|
channel: t.string().optional()
|
|
225
229
|
}), j = t.discriminatedUnion("type", [
|
|
226
230
|
F,
|
|
227
|
-
W,
|
|
228
231
|
O,
|
|
232
|
+
W,
|
|
229
233
|
$
|
|
230
234
|
]), Z = t.object({
|
|
231
235
|
type: t.literal("local-dev"),
|
|
@@ -292,8 +296,8 @@ export {
|
|
|
292
296
|
E as BlockPackDescriptionManifest,
|
|
293
297
|
kt as BlockPackDescriptionRaw,
|
|
294
298
|
F as BlockPackDevV1,
|
|
295
|
-
|
|
296
|
-
|
|
299
|
+
O as BlockPackDevV2,
|
|
300
|
+
W as BlockPackFromRegistryV1,
|
|
297
301
|
$ as BlockPackFromRegistryV2,
|
|
298
302
|
a as BlockPackId,
|
|
299
303
|
z as BlockPackIdNoVersion,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/block_settings.ts","../src/block_meta/content_types.ts","../src/block_meta/semver.ts","../src/block_meta/content_conversion.ts","../src/block_meta/block_id.ts","../src/block_meta/block_components.ts","../src/block_meta/block_meta.ts","../src/block_meta/block_description.ts","../src/block_meta/block_manifest.ts","../src/block_registry/block_pack_spec.ts","../src/block_registry/registry_spec.ts","../src/block_registry/overview.ts"],"sourcesContent":["/**\n * What part of block version should be locked against updates.\n *\n * - `major` - 1.2.3 can be updated to 1.4.7\n * - `minor` - 1.2.3 can be updated to 1.2.5\n * - `patch` - version of the block is completely locked\n *\n * */\nexport type VersionLock = 'major' | 'minor' | 'patch';\n\n/**\n * Block settings, persisted on the backend.\n *\n * Settings modulate different aspects of block behaviour,\n * currently only updates.\n * */\nexport type BlockSettings = {\n /** Only version stricktly greater that this one will be suggested for auto-update. */\n skipVersion?: string;\n /**\n * If certain version locking policy is set, auto-updates will only be suggested,\n * if there is an update within the specified release line.\n * */\n versionLock?: VersionLock;\n};\n\nexport const InitialBlockSettings: BlockSettings = {};\n","import { z } from 'zod';\n\n//\n// Base content types\n//\n\nexport const ContentExplicitString = z\n .object({\n type: z.literal('explicit-string'),\n content: z.string().describe('Actual string value')\n })\n .strict();\nexport type ContentExplicitString = z.infer<typeof ContentExplicitString>;\n\nexport const ContentExplicitBase64 = z\n .object({\n type: z.literal('explicit-base64'),\n mimeType: z\n .string()\n .regex(/\\w+\\/[-+.\\w]+/)\n .describe('MIME type to interpret content'),\n content: z.string().base64().describe('Base64 encoded binary value')\n })\n .strict();\nexport type ContentExplicitBase64 = z.infer<typeof ContentExplicitBase64>;\n\nexport const ContentRelative = z\n .object({\n type: z.literal('relative'),\n path: z\n .string()\n .describe(\n 'Address of the file, in most cases relative to the file which this structure is a part of'\n )\n })\n .strict();\nexport type ContentRelative = z.infer<typeof ContentRelative>;\n\nconst absPathRegex = new RegExp(`^(/|[A-Z]:\\\\\\\\)`);\n\nexport const ContentAbsoluteFile = z\n .object({\n type: z.literal('absolute-file'),\n file: z\n .string()\n .regex(absPathRegex, 'path to file must be absolute')\n .describe('Absolute address of the file in local file system')\n })\n .strict();\nexport type ContentAbsoluteFile = z.infer<typeof ContentAbsoluteFile>;\n\nexport const ContentAbsoluteUrl = z\n .object({\n type: z.literal('absolute-url'),\n url: z.string().url().describe('Global URL to reach the requested file')\n })\n .strict();\nexport type ContentAbsoluteUrl = z.infer<typeof ContentAbsoluteUrl>;\n\n//\n// Special content types\n//\n\nexport const ContentExplicitBytes = z\n .object({\n type: z.literal('explicit-bytes'),\n mimeType: z\n .string()\n .regex(/\\w+\\/[-+.\\w]+/)\n .describe('MIME type to interpret content'),\n content: z.instanceof(Uint8Array).describe('Raw content')\n })\n .strict();\nexport type ContentExplicitBytes = z.infer<typeof ContentExplicitBytes>;\n\nexport const ContentAbsoluteFolder = z\n .object({\n type: z.literal('absolute-folder'),\n folder: z\n .string()\n .regex(absPathRegex, 'path to folder must be absolute')\n .describe('Absolute address of the folder in local file system')\n })\n .strict();\nexport type ContentAbsoluteFolder = z.infer<typeof ContentAbsoluteFolder>;\n\n//\n// Unions\n//\n\nexport const ContentAny = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile,\n ContentAbsoluteUrl\n]);\nexport type ContentAny = z.infer<typeof ContentAny>;\n\nexport const ContentExplicitOrRelative = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative\n]);\nexport type ContentExplicitOrRelative = z.infer<typeof ContentExplicitOrRelative>;\n\nexport const ContentAnyLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyLocal = z.infer<typeof ContentAnyLocal>;\n\nexport const ContentAnyRemote = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteUrl\n]);\nexport type ContentAnyRemote = z.infer<typeof ContentAnyRemote>;\n\n//\n// Narrow types with relative option\n//\n\n// export const ContentAnyBinaryRemote = z.discriminatedUnion('type', [\n// ContentExplicitBase64,\n// ContentRelative,\n// ContentAbsoluteUrl\n// ]);\n// export type ContentAnyBinaryRemote = z.infer<typeof ContentAnyBinaryRemote>;\n\nexport const ContentAnyBinaryLocal = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyBinaryLocal = z.infer<typeof ContentAnyBinaryLocal>;\n\n// export const ContentAnyTextRemote = z.discriminatedUnion('type', [\n// ContentExplicitString,\n// ContentRelative,\n// ContentAbsoluteUrl\n// ]);\n// export type ContentAnyTextRemote = z.infer<typeof ContentAnyTextRemote>;\n\nexport const ContentAnyTextLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyTextLocal = z.infer<typeof ContentAnyTextLocal>;\n\n//\n// Narrow absolute types\n//\n\nexport const ContentAbsoluteBinaryRemote = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentAbsoluteUrl\n]);\nexport type ContentAbsoluteBinaryRemote = z.infer<typeof ContentAbsoluteBinaryRemote>;\n\nexport const ContentAbsoluteBinaryLocal = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentAbsoluteFile\n]);\nexport type ContentAbsoluteBinaryLocal = z.infer<typeof ContentAbsoluteBinaryLocal>;\n\nexport const ContentAbsoluteTextRemote = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentAbsoluteUrl\n]);\nexport type ContentAbsoluteTextRemote = z.infer<typeof ContentAbsoluteTextRemote>;\n\nexport const ContentAbsoluteTextLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentAbsoluteFile\n]);\nexport type ContentAbsoluteTextLocal = z.infer<typeof ContentAbsoluteTextLocal>;\n\n//\n// Narrow relative types\n//\n\nexport const ContentRelativeBinary = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentRelative\n]);\nexport type ContentRelativeBinary = z.infer<typeof ContentRelativeBinary>;\n\nexport const ContentRelativeText = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentRelative\n]);\nexport type ContentRelativeText = z.infer<typeof ContentRelativeText>;\n\n// export function ConstructContent(\n// contentType: 'text',\n// contextType: 'local'\n// ): typeof ContentAnyTextLocal;\n// export function ConstructContent(\n// contentType: 'text',\n// contextType: 'remote'\n// ): typeof ContentAnyTextRemote;\n// export function ConstructContent(\n// contentType: 'binary',\n// contextType: 'local'\n// ): typeof ContentAnyBinaryLocal;\n// export function ConstructContent(\n// contentType: 'binary',\n// contextType: 'remote'\n// ): typeof ContentAnyBinaryRemote;\n// export function ConstructContent(\n// contentType: ContentType,\n// contextType: ContextType\n// ):\n// | typeof ContentAnyTextLocal\n// | typeof ContentAnyTextRemote\n// | typeof ContentAnyBinaryLocal\n// | typeof ContentAnyBinaryRemote;\n// export function ConstructContent(contentType: ContentType, contextType: ContextType) {\n// return contentType === 'text'\n// ? contextType === 'local'\n// ? ContentAnyTextLocal\n// : ContentAnyTextRemote\n// : contextType === 'local'\n// ? ContentAnyBinaryLocal\n// : ContentAnyBinaryRemote;\n// }\n\nexport const DescriptionContentBinary = z.union([\n z\n .string()\n .startsWith('file:')\n .transform<ContentRelativeBinary>((value, ctx) => ({ type: 'relative', path: value.slice(5) })),\n ContentAnyBinaryLocal\n]);\nexport type DescriptionContentBinary = z.infer<typeof DescriptionContentBinary>;\n\nexport const DescriptionContentText = z.union([\n z.string().transform<ContentRelativeText>((value, ctx) => {\n if (value.startsWith('file:')) return { type: 'relative', path: value.slice(5) };\n else return { type: 'explicit-string', content: value };\n }),\n ContentAnyTextLocal\n]);\nexport type DescriptionContentText = z.infer<typeof DescriptionContentText>;\n","import { z } from 'zod';\n\n// Regex taken from here:\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nexport const SemVer = z\n .string()\n .regex(\n /^(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-]+)*))?$/,\n 'Wrong version format, please use valid semver'\n );\n","import {\n ContentAbsoluteUrl,\n ContentAnyLocal,\n ContentExplicitOrRelative,\n ContentRelative\n} from './content_types';\n\nexport function mapRemoteToAbsolute(\n rootUrl: string\n): <T extends ContentAnyLocal>(value: T) => Exclude<T, ContentRelative> | ContentAbsoluteUrl {\n const rootWithSlash = rootUrl.endsWith('/') ? rootUrl : `${rootUrl}/`;\n return <T extends ContentAnyLocal>(value: T) =>\n value.type === 'relative'\n ? { type: 'absolute-url', url: rootWithSlash + value.path }\n : (value as Exclude<T, ContentRelative>);\n}\n\n/**\n * Creates transformer of relative content paths, that adds a specific prefix to the relative path.\n *\n * If prefix = \"nested-path/\", paths like \"somefile.txt\" will be transformed to \"nested-path/somefile.txt\".\n *\n * @param prefix prefix to add to the relaive path, slesh at the end will be added automatically if missed\n */\nexport function addPrefixToRelative(\n prefix: string\n): <T extends ContentExplicitOrRelative>(value: T) => T {\n const prefixWithSlash = prefix.endsWith('/') ? prefix : `${prefix}/`;\n return <T extends ContentExplicitOrRelative>(value: T) =>\n (value.type === 'relative'\n ? { type: 'relative', path: prefixWithSlash + value.path }\n : value) as T;\n}\n","import { z } from 'zod';\nimport { SemVer } from './semver';\n\n/** Global identifier of the block */\nexport const BlockPackId = z\n .object({\n organization: z.string(),\n name: z.string(),\n version: SemVer\n })\n .strict();\nexport type BlockPackId = z.infer<typeof BlockPackId>;\n\nexport const BlockPackIdNoVersion = BlockPackId.omit({ version: true });\nexport type BlockPackIdNoVersion = z.infer<typeof BlockPackIdNoVersion>;\n\nexport function blockPackIdToString(bp: BlockPackId): string;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}:${bp.version}`;\n}\n\nexport function blockPackIdNoVersionToString(bp: BlockPackIdNoVersion): string;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined\n): string | undefined;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined\n): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}`;\n}\n\nexport function blockPackIdEquals(\n bp1: BlockPackId | undefined,\n bp2: BlockPackId | undefined\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return (\n bp1.name === bp2.name && bp1.organization === bp2.organization && bp1.version === bp2.version\n );\n}\n\nexport function blockPackIdNoVersionEquals(\n bp1: BlockPackIdNoVersion | undefined,\n bp2: BlockPackIdNoVersion | undefined\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return bp1.name === bp2.name && bp1.organization === bp2.organization;\n}\n","import { z } from 'zod';\nimport { ContentRelativeBinary } from './content_types';\nimport { mapRemoteToAbsolute } from './content_conversion';\n\nexport type BlockPackComponents = {};\n\nexport function WorkflowV1<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.object({\n type: z.literal('workflow-v1'),\n main: contentType.describe('Main workflow')\n });\n}\n\nexport function Workflow<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.union([\n // string is converted to v1 workflow\n contentType\n .transform((value: z.infer<typeof contentType>) => ({\n type: 'workflow-v1' as const,\n main: value\n }))\n .pipe(WorkflowV1(contentType)),\n // structured objects are decoded as union with type descriptor\n z.discriminatedUnion('type', [WorkflowV1(contentType)])\n ]);\n}\n\nexport function BlockComponents<\n const WfAndModel extends z.ZodTypeAny,\n const UI extends z.ZodTypeAny\n>(wfAndModel: WfAndModel, ui: UI) {\n return z.object({\n workflow: Workflow(wfAndModel),\n model: wfAndModel,\n ui\n });\n}\n\nexport const BlockComponentsDescriptionRaw = BlockComponents(z.string(), z.string());\nexport type BlockComponentsDescriptionRaw = z.infer<typeof BlockComponentsDescriptionRaw>;\n\nexport function BlockComponentsAbsoluteUrl(prefix: string) {\n return BlockComponents(\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix))\n );\n}\nexport type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;\n\n// export const BlockComponentsExplicit = BlockComponents(, ContentRelative);\n// export type BlockComponentsExplicit = z.infer<typeof BlockComponentsExplicit>;\n","import { z } from 'zod';\nimport {\n ContentExplicitBase64,\n ContentExplicitBytes,\n DescriptionContentBinary,\n DescriptionContentText\n} from './content_types';\n\nexport function BlockPackMeta<\n const LongStringType extends z.ZodTypeAny,\n const BinaryType extends z.ZodTypeAny\n>(longString: LongStringType, binary: BinaryType) {\n return z.object({\n title: z.string(),\n description: z.string(),\n longDescription: longString.optional(),\n changelog: longString.optional(),\n logo: binary.optional(),\n url: z.string().url().optional(),\n docs: z.string().url().optional(),\n support: z.union([z.string().url(), z.string().email()]).optional(),\n tags: z.array(z.string()).optional(),\n organization: z.object({\n name: z.string(),\n url: z.string().url(),\n logo: binary.optional()\n }),\n /**\n * The order of blocks on the \"marketplace\" (higher values push block higher to the top of the list).\n * `undefined` value or absent field is treated exactly the same as number `0`.\n */\n marketplaceRanking: z.number().optional(),\n });\n}\n\n// prettier-ignore\nexport const BlockPackMetaDescriptionRaw = BlockPackMeta(\n DescriptionContentText,\n DescriptionContentBinary\n);\nexport type BlockPackMetaDescriptionRaw = z.infer<typeof BlockPackMetaDescriptionRaw>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBase64 = BlockPackMeta(\n z.string(),\n ContentExplicitBase64\n);\nexport type BlockPackMetaEmbeddedBase64 = z.infer<typeof BlockPackMetaEmbeddedBase64>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBytes = BlockPackMeta(\n z.string(),\n ContentExplicitBytes\n);\nexport type BlockPackMetaEmbeddedBytes = z.infer<typeof BlockPackMetaEmbeddedBytes>;\n","import { z, ZodTypeAny } from 'zod';\nimport { BlockComponentsDescriptionRaw } from './block_components';\nimport { BlockPackMetaDescriptionRaw } from './block_meta';\nimport { BlockPackId } from './block_id';\nimport * as R from 'remeda';\n\n/** Description, as appears in root block package.json file,\n * `file:` references are parsed into relative content of corresponding type, depending on the context,\n * strings are converted to explicit content type. */\nexport const BlockPackDescriptionFromPackageJsonRaw = z.object({\n components: BlockComponentsDescriptionRaw,\n meta: BlockPackMetaDescriptionRaw\n});\n\nexport function CreateBlockPackDescriptionSchema<\n Components extends ZodTypeAny,\n Meta extends ZodTypeAny\n>(components: Components, meta: Meta) {\n return z.object({\n id: BlockPackId,\n components,\n meta\n });\n}\n\nexport const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(\n BlockComponentsDescriptionRaw,\n BlockPackMetaDescriptionRaw\n);\nexport type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;\n\nexport function overrideDescriptionVersion<T extends { id: BlockPackId }>(\n manifest: T,\n newVersion: string\n): T {\n return R.mergeDeep(manifest, { id: { version: newVersion } }) as T;\n}\n","import { z } from 'zod';\nimport { BlockComponents } from './block_components';\nimport { ContentRelative, ContentRelativeBinary, ContentRelativeText } from './content_types';\nimport { CreateBlockPackDescriptionSchema } from './block_description';\nimport { BlockPackMeta } from './block_meta';\nimport * as R from 'remeda';\nimport { BlockPackId } from './block_id';\n\nexport const BlockComponentsManifest = BlockComponents(ContentRelative, ContentRelative);\nexport type BlockComponentsManifest = z.infer<typeof BlockComponentsManifest>;\n\nexport const BlockPackMetaManifest = BlockPackMeta(ContentRelativeText, ContentRelativeBinary);\nexport type BlockPackMetaManifest = z.infer<typeof BlockPackMetaManifest>;\n\n/** Block description to be used in block manifest */\nexport const BlockPackDescriptionManifest = CreateBlockPackDescriptionSchema(\n BlockComponentsManifest,\n BlockPackMetaManifest\n);\nexport type BlockPackDescriptionManifest = z.infer<typeof BlockPackDescriptionManifest>;\n\nexport const Sha256Schema = z\n .string()\n .regex(/[0-9a-fA-F]/)\n .toUpperCase()\n .length(64); // 256 / 4 (bits per hex register);\n\nexport const ManifestFileInfo = z.object({\n name: z.string(),\n size: z.number().int(),\n sha256: Sha256Schema\n});\nexport type ManifestFileInfo = z.infer<typeof ManifestFileInfo>;\n\nexport const BlockPackManifest = z.object({\n schema: z.literal('v2'),\n description: BlockPackDescriptionManifest,\n timestamp: z.number().optional(),\n files: z.array(ManifestFileInfo)\n});\nexport type BlockPackManifest = z.infer<typeof BlockPackManifest>;\n\nexport const BlockPackManifestFile = 'manifest.json';\n\nexport function overrideManifestVersion<T extends { description: { id: BlockPackId } }>(\n manifest: T,\n newVersion: string\n): T {\n return R.mergeDeep(manifest, { description: { id: { version: newVersion } } }) as T;\n}\n","import { z } from 'zod';\nimport { BlockPackId } from '../block_meta';\n\n/** Block pack from local folder, to be used during block development. Old layout.\n * @deprecated don't use */\nexport const BlockPackDevV1 = z.object({\n type: z.literal('dev-v1'),\n folder: z.string(),\n mtime: z.string().optional()\n});\n/** @deprecated don't use */\nexport type BlockPackDevV1 = z.infer<typeof BlockPackDevV1>;\n\n/** Block pack from local folder, to be used during block development. New layout. */\nexport const BlockPackDevV2 = z.object({\n type: z.literal('dev-v2'),\n folder: z.string(),\n mtime: z.string().optional()\n});\nexport type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;\n\n/**\n * Block pack from registry with version 2 layout, to be loaded directly\n * from the client.\n * @deprecated don't use\n * */\nexport const BlockPackFromRegistryV1 = z.object({\n type: z.literal('from-registry-v1'),\n registryUrl: z.string(),\n id: BlockPackId\n});\n/** @deprecated don't use */\nexport type BlockPackFromRegistryV1 = z.infer<typeof BlockPackFromRegistryV1>;\n\n/** Block pack from registry with version 2 layout, to be loaded directly\n * from the client. */\nexport const BlockPackFromRegistryV2 = z.object({\n type: z.literal('from-registry-v2'),\n registryUrl: z.string(),\n id: BlockPackId,\n channel: z.string().optional()\n});\nexport type BlockPackFromRegistryV2 = z.infer<typeof BlockPackFromRegistryV2>;\n\n/** Information about block origin, can be used to instantiate new blocks */\nexport const BlockPackSpec = z.discriminatedUnion('type', [\n BlockPackDevV1,\n BlockPackDevV2,\n BlockPackFromRegistryV1,\n BlockPackFromRegistryV2\n]);\nexport type BlockPackSpec = z.infer<typeof BlockPackSpec>;\n","import { z } from 'zod';\n\nexport const LocalDevFolder = z.object({\n type: z.literal('local-dev'),\n path: z.string()\n});\nexport type LocalDevFolder = z.infer<typeof LocalDevFolder>;\n\n/** @deprecated don't use */\nexport const RemoteRegistryV1Spec = z.object({\n type: z.literal('remote-v1'),\n url: z.string().url()\n});\n/** @deprecated don't use */\nexport type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;\n\nexport const RemoteRegistryV2Spec = z.object({\n type: z.literal('remote-v2'),\n url: z.string().url()\n});\nexport type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;\n\nexport const RegistrySpec = z.discriminatedUnion('type', [\n RemoteRegistryV1Spec,\n RemoteRegistryV2Spec,\n LocalDevFolder\n]);\nexport type RegistrySpec = z.infer<typeof RegistrySpec>;\n\nexport const RegistryEntry = z.object({\n id: z.string(),\n title: z.string().optional(),\n spec: RegistrySpec\n});\nexport type RegistryEntry = z.infer<typeof RegistryEntry>;\n\nexport const RegistryList = z.array(RegistryEntry);\nexport type RegistryList = z.infer<typeof RegistryList>;\n","import { z } from 'zod';\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n SemVer\n} from '../block_meta';\nimport { BlockPackFromRegistryV2, BlockPackSpec } from './block_pack_spec';\nimport { RegistryEntry } from './registry_spec';\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverviewLegacy = z.object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer)\n});\nexport type BlockPackOverviewLegacy = z.infer<typeof BlockPackOverviewLegacy>;\n\nexport const AnyChannel = 'any';\nexport const StableChannel = 'stable';\n\nexport const VersionWithChannels = z.object({\n version: SemVer,\n channels: z.array(z.string())\n});\n\n/**\n * Information about specific block pack version.\n * */\nexport const SingleBlockPackOverview = z.object({\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec\n});\nexport type SingleBlockPackOverview = z.infer<typeof SingleBlockPackOverview>;\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverview = z.object({\n id: BlockPackIdNoVersion,\n latestByChannel: z.record(z.string(), SingleBlockPackOverview),\n allVersions: z.array(VersionWithChannels),\n registryId: z.string()\n});\nexport type BlockPackOverview = z.infer<typeof BlockPackOverview>;\n\nexport const RegistryStatus = RegistryEntry.extend({\n status: z.union([z.literal('online'), z.literal('offline')])\n});\nexport type RegistryStatus = z.infer<typeof RegistryStatus>;\n\nexport const BlockPackListing = z.object({\n registries: z.array(RegistryStatus),\n blockPacks: z.array(BlockPackOverview)\n});\nexport type BlockPackListing = z.infer<typeof BlockPackListing>;\n\nexport function blockPackOverviewToLegacy(bpo: BlockPackOverview): BlockPackOverviewLegacy {\n const mainChannel = bpo.latestByChannel[StableChannel] !== undefined ? StableChannel : AnyChannel;\n const latestOverview = bpo.latestByChannel[mainChannel];\n return {\n id: latestOverview.id,\n meta: latestOverview.meta,\n // so we only add stable channel specs to projects, to smooth the transition\n spec: { ...(latestOverview.spec as BlockPackFromRegistryV2), channel: StableChannel },\n otherVersions: bpo.allVersions\n .filter((v) => v.channels.indexOf(mainChannel) >= 0)\n .map((v) => v.version),\n registryId: bpo.registryId\n };\n}\n"],"names":["InitialBlockSettings","ContentExplicitString","z","ContentExplicitBase64","ContentRelative","absPathRegex","ContentAbsoluteFile","ContentAbsoluteUrl","ContentExplicitBytes","ContentAbsoluteFolder","ContentAny","ContentExplicitOrRelative","ContentAnyLocal","ContentAnyRemote","ContentAnyBinaryLocal","ContentAnyTextLocal","ContentAbsoluteBinaryRemote","ContentAbsoluteBinaryLocal","ContentAbsoluteTextRemote","ContentAbsoluteTextLocal","ContentRelativeBinary","ContentRelativeText","DescriptionContentBinary","value","ctx","DescriptionContentText","SemVer","mapRemoteToAbsolute","rootUrl","rootWithSlash","addPrefixToRelative","prefix","prefixWithSlash","BlockPackId","BlockPackIdNoVersion","blockPackIdToString","bp","blockPackIdNoVersionToString","blockPackIdEquals","bp1","bp2","blockPackIdNoVersionEquals","WorkflowV1","contentType","Workflow","BlockComponents","wfAndModel","ui","BlockComponentsDescriptionRaw","BlockComponentsAbsoluteUrl","BlockPackMeta","longString","binary","BlockPackMetaDescriptionRaw","BlockPackMetaEmbeddedBase64","BlockPackMetaEmbeddedBytes","BlockPackDescriptionFromPackageJsonRaw","CreateBlockPackDescriptionSchema","components","meta","BlockPackDescriptionRaw","overrideDescriptionVersion","manifest","newVersion","R","BlockComponentsManifest","BlockPackMetaManifest","BlockPackDescriptionManifest","Sha256Schema","ManifestFileInfo","BlockPackManifest","BlockPackManifestFile","overrideManifestVersion","BlockPackDevV1","BlockPackDevV2","BlockPackFromRegistryV1","BlockPackFromRegistryV2","BlockPackSpec","LocalDevFolder","RemoteRegistryV1Spec","RemoteRegistryV2Spec","RegistrySpec","RegistryEntry","RegistryList","BlockPackOverviewLegacy","AnyChannel","StableChannel","VersionWithChannels","SingleBlockPackOverview","BlockPackOverview","RegistryStatus","BlockPackListing","blockPackOverviewToLegacy","bpo","mainChannel","latestOverview","v"],"mappings":";;AA0BO,MAAMA,IAAsC,CAAA,GCpBtCC,IAAwBC,EAClC,OAAO;AAAA,EACN,MAAMA,EAAE,QAAQ,iBAAiB;AAAA,EACjC,SAASA,EAAE,OAAO,EAAE,SAAS,qBAAqB;AACpD,CAAC,EACA,OAAO,GAGGC,IAAwBD,EAClC,OAAO;AAAA,EACN,MAAMA,EAAE,QAAQ,iBAAiB;AAAA,EACjC,UAAUA,EACP,OAAO,EACP,MAAM,eAAe,EACrB,SAAS,gCAAgC;AAAA,EAC5C,SAASA,EAAE,OAAA,EAAS,OAAO,EAAE,SAAS,6BAA6B;AACrE,CAAC,EACA,OAAO,GAGGE,IAAkBF,EAC5B,OAAO;AAAA,EACN,MAAMA,EAAE,QAAQ,UAAU;AAAA,EAC1B,MAAMA,EACH,OAAA,EACA;AAAA,IACC;AAAA,EAAA;AAEN,CAAC,EACA,OAAO,GAGJG,IAAe,IAAI,OAAO,iBAAiB,GAEpCC,IAAsBJ,EAChC,OAAO;AAAA,EACN,MAAMA,EAAE,QAAQ,eAAe;AAAA,EAC/B,MAAMA,EACH,SACA,MAAMG,GA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AClD,IAAI,CAACE,MAAMA,EAAE,OAAO;AAAA,IACvB,YAAYH,EAAI;AAAA,EAClB;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/block_settings.ts","../src/block_meta/content_types.ts","../src/block_meta/semver.ts","../src/block_meta/content_conversion.ts","../src/block_meta/block_id.ts","../src/block_meta/block_components.ts","../src/block_meta/block_meta.ts","../src/block_meta/block_description.ts","../src/block_meta/block_manifest.ts","../src/block_registry/block_pack_spec.ts","../src/block_registry/registry_spec.ts","../src/block_registry/overview.ts"],"sourcesContent":["/**\n * What part of block version should be locked against updates.\n *\n * - `major` - 1.2.3 can be updated to 1.4.7\n * - `minor` - 1.2.3 can be updated to 1.2.5\n * - `patch` - version of the block is completely locked\n *\n * */\nexport type VersionLock = 'major' | 'minor' | 'patch';\n\n/**\n * Block settings, persisted on the backend.\n *\n * Settings modulate different aspects of block behaviour,\n * currently only updates.\n * */\nexport type BlockSettings = {\n /** Only version stricktly greater that this one will be suggested for auto-update. */\n skipVersion?: string;\n /**\n * If certain version locking policy is set, auto-updates will only be suggested,\n * if there is an update within the specified release line.\n * */\n versionLock?: VersionLock;\n};\n\nexport const InitialBlockSettings: BlockSettings = {};\n","import { z } from 'zod';\n\n//\n// Base content types\n//\n\nexport const ContentExplicitString = z\n .object({\n type: z.literal('explicit-string'),\n content: z.string().describe('Actual string value')\n })\n .strict();\nexport type ContentExplicitString = z.infer<typeof ContentExplicitString>;\n\nexport const ContentExplicitBase64 = z\n .object({\n type: z.literal('explicit-base64'),\n mimeType: z\n .string()\n .regex(/\\w+\\/[-+.\\w]+/)\n .describe('MIME type to interpret content'),\n content: z.string().base64().describe('Base64 encoded binary value')\n })\n .strict();\nexport type ContentExplicitBase64 = z.infer<typeof ContentExplicitBase64>;\n\nexport const ContentRelative = z\n .object({\n type: z.literal('relative'),\n path: z\n .string()\n .describe(\n 'Address of the file, in most cases relative to the file which this structure is a part of'\n )\n })\n .strict();\nexport type ContentRelative = z.infer<typeof ContentRelative>;\n\nconst absPathRegex = new RegExp(`^(/|[A-Z]:\\\\\\\\)`);\n\nexport const ContentAbsoluteFile = z\n .object({\n type: z.literal('absolute-file'),\n file: z\n .string()\n .regex(absPathRegex, 'path to file must be absolute')\n .describe('Absolute address of the file in local file system')\n })\n .strict();\nexport type ContentAbsoluteFile = z.infer<typeof ContentAbsoluteFile>;\n\nexport const ContentAbsoluteUrl = z\n .object({\n type: z.literal('absolute-url'),\n url: z.string().url().describe('Global URL to reach the requested file')\n })\n .strict();\nexport type ContentAbsoluteUrl = z.infer<typeof ContentAbsoluteUrl>;\n\n//\n// Special content types\n//\n\nexport const ContentExplicitBytes = z\n .object({\n type: z.literal('explicit-bytes'),\n mimeType: z\n .string()\n .regex(/\\w+\\/[-+.\\w]+/)\n .describe('MIME type to interpret content'),\n content: z.instanceof(Uint8Array).describe('Raw content')\n })\n .strict();\nexport type ContentExplicitBytes = z.infer<typeof ContentExplicitBytes>;\n\nexport const ContentAbsoluteFolder = z\n .object({\n type: z.literal('absolute-folder'),\n folder: z\n .string()\n .regex(absPathRegex, 'path to folder must be absolute')\n .describe('Absolute address of the folder in local file system')\n })\n .strict();\nexport type ContentAbsoluteFolder = z.infer<typeof ContentAbsoluteFolder>;\n\n//\n// Unions\n//\n\nexport const ContentAny = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile,\n ContentAbsoluteUrl\n]);\nexport type ContentAny = z.infer<typeof ContentAny>;\n\nexport const ContentExplicitOrRelative = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative\n]);\nexport type ContentExplicitOrRelative = z.infer<typeof ContentExplicitOrRelative>;\n\nexport const ContentAnyLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyLocal = z.infer<typeof ContentAnyLocal>;\n\nexport const ContentAnyRemote = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteUrl\n]);\nexport type ContentAnyRemote = z.infer<typeof ContentAnyRemote>;\n\n//\n// Narrow types with relative option\n//\n\n// export const ContentAnyBinaryRemote = z.discriminatedUnion('type', [\n// ContentExplicitBase64,\n// ContentRelative,\n// ContentAbsoluteUrl\n// ]);\n// export type ContentAnyBinaryRemote = z.infer<typeof ContentAnyBinaryRemote>;\n\nexport const ContentAnyBinaryLocal = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyBinaryLocal = z.infer<typeof ContentAnyBinaryLocal>;\n\n// export const ContentAnyTextRemote = z.discriminatedUnion('type', [\n// ContentExplicitString,\n// ContentRelative,\n// ContentAbsoluteUrl\n// ]);\n// export type ContentAnyTextRemote = z.infer<typeof ContentAnyTextRemote>;\n\nexport const ContentAnyTextLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentRelative,\n ContentAbsoluteFile\n]);\nexport type ContentAnyTextLocal = z.infer<typeof ContentAnyTextLocal>;\n\n//\n// Narrow absolute types\n//\n\nexport const ContentAbsoluteBinaryRemote = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentAbsoluteUrl\n]);\nexport type ContentAbsoluteBinaryRemote = z.infer<typeof ContentAbsoluteBinaryRemote>;\n\nexport const ContentAbsoluteBinaryLocal = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentAbsoluteFile\n]);\nexport type ContentAbsoluteBinaryLocal = z.infer<typeof ContentAbsoluteBinaryLocal>;\n\nexport const ContentAbsoluteTextRemote = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentAbsoluteUrl\n]);\nexport type ContentAbsoluteTextRemote = z.infer<typeof ContentAbsoluteTextRemote>;\n\nexport const ContentAbsoluteTextLocal = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentAbsoluteFile\n]);\nexport type ContentAbsoluteTextLocal = z.infer<typeof ContentAbsoluteTextLocal>;\n\n//\n// Narrow relative types\n//\n\nexport const ContentRelativeBinary = z.discriminatedUnion('type', [\n ContentExplicitBase64,\n ContentRelative\n]);\nexport type ContentRelativeBinary = z.infer<typeof ContentRelativeBinary>;\n\nexport const ContentRelativeText = z.discriminatedUnion('type', [\n ContentExplicitString,\n ContentRelative\n]);\nexport type ContentRelativeText = z.infer<typeof ContentRelativeText>;\n\n// export function ConstructContent(\n// contentType: 'text',\n// contextType: 'local'\n// ): typeof ContentAnyTextLocal;\n// export function ConstructContent(\n// contentType: 'text',\n// contextType: 'remote'\n// ): typeof ContentAnyTextRemote;\n// export function ConstructContent(\n// contentType: 'binary',\n// contextType: 'local'\n// ): typeof ContentAnyBinaryLocal;\n// export function ConstructContent(\n// contentType: 'binary',\n// contextType: 'remote'\n// ): typeof ContentAnyBinaryRemote;\n// export function ConstructContent(\n// contentType: ContentType,\n// contextType: ContextType\n// ):\n// | typeof ContentAnyTextLocal\n// | typeof ContentAnyTextRemote\n// | typeof ContentAnyBinaryLocal\n// | typeof ContentAnyBinaryRemote;\n// export function ConstructContent(contentType: ContentType, contextType: ContextType) {\n// return contentType === 'text'\n// ? contextType === 'local'\n// ? ContentAnyTextLocal\n// : ContentAnyTextRemote\n// : contextType === 'local'\n// ? ContentAnyBinaryLocal\n// : ContentAnyBinaryRemote;\n// }\n\nexport const DescriptionContentBinary = z.union([\n z\n .string()\n .startsWith('file:')\n .transform<ContentRelativeBinary>((value, ctx) => ({ type: 'relative', path: value.slice(5) })),\n ContentAnyBinaryLocal\n]);\nexport type DescriptionContentBinary = z.infer<typeof DescriptionContentBinary>;\n\nexport const DescriptionContentText = z.union([\n z.string().transform<ContentRelativeText>((value, ctx) => {\n if (value.startsWith('file:')) return { type: 'relative', path: value.slice(5) };\n else return { type: 'explicit-string', content: value };\n }),\n ContentAnyTextLocal\n]);\nexport type DescriptionContentText = z.infer<typeof DescriptionContentText>;\n","import { z } from 'zod';\n\n// Regex taken from here:\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nexport const SemVer = z\n .string()\n .regex(\n /^(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-]+)*))?$/,\n 'Wrong version format, please use valid semver'\n );\n","import {\n ContentAbsoluteUrl,\n ContentAnyLocal,\n ContentExplicitOrRelative,\n ContentRelative\n} from './content_types';\n\nexport function mapRemoteToAbsolute(\n rootUrl: string\n): <T extends ContentAnyLocal>(value: T) => Exclude<T, ContentRelative> | ContentAbsoluteUrl {\n const rootWithSlash = rootUrl.endsWith('/') ? rootUrl : `${rootUrl}/`;\n return <T extends ContentAnyLocal>(value: T) =>\n value.type === 'relative'\n ? { type: 'absolute-url', url: rootWithSlash + value.path }\n : (value as Exclude<T, ContentRelative>);\n}\n\n/**\n * Creates transformer of relative content paths, that adds a specific prefix to the relative path.\n *\n * If prefix = \"nested-path/\", paths like \"somefile.txt\" will be transformed to \"nested-path/somefile.txt\".\n *\n * @param prefix prefix to add to the relaive path, slesh at the end will be added automatically if missed\n */\nexport function addPrefixToRelative(\n prefix: string\n): <T extends ContentExplicitOrRelative>(value: T) => T {\n const prefixWithSlash = prefix.endsWith('/') ? prefix : `${prefix}/`;\n return <T extends ContentExplicitOrRelative>(value: T) =>\n (value.type === 'relative'\n ? { type: 'relative', path: prefixWithSlash + value.path }\n : value) as T;\n}\n","import { z } from 'zod';\nimport { SemVer } from './semver';\n\n/** Global identifier of the block */\nexport const BlockPackId = z\n .object({\n organization: z.string(),\n name: z.string(),\n version: SemVer\n })\n .strict();\nexport type BlockPackId = z.infer<typeof BlockPackId>;\n\nexport const BlockPackIdNoVersion = BlockPackId.omit({ version: true });\nexport type BlockPackIdNoVersion = z.infer<typeof BlockPackIdNoVersion>;\n\nexport function blockPackIdToString(bp: BlockPackId): string;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}:${bp.version}`;\n}\n\nexport function blockPackIdNoVersionToString(bp: BlockPackIdNoVersion): string;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined\n): string | undefined;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined\n): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}`;\n}\n\nexport function blockPackIdEquals(\n bp1: BlockPackId | undefined,\n bp2: BlockPackId | undefined\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return (\n bp1.name === bp2.name && bp1.organization === bp2.organization && bp1.version === bp2.version\n );\n}\n\nexport function blockPackIdNoVersionEquals(\n bp1: BlockPackIdNoVersion | undefined,\n bp2: BlockPackIdNoVersion | undefined\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return bp1.name === bp2.name && bp1.organization === bp2.organization;\n}\n","import { z } from 'zod';\nimport { ContentRelativeBinary } from './content_types';\nimport { mapRemoteToAbsolute } from './content_conversion';\n\nexport type BlockPackComponents = {};\n\nexport function WorkflowV1<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.object({\n type: z.literal('workflow-v1'),\n main: contentType.describe('Main workflow')\n });\n}\n\nexport function Workflow<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.union([\n // string is converted to v1 workflow\n contentType\n .transform((value: z.infer<typeof contentType>) => ({\n type: 'workflow-v1' as const,\n main: value\n }))\n .pipe(WorkflowV1(contentType)),\n // structured objects are decoded as union with type descriptor\n z.discriminatedUnion('type', [WorkflowV1(contentType)])\n ]);\n}\n\nexport function BlockComponents<\n const WfAndModel extends z.ZodTypeAny,\n const UI extends z.ZodTypeAny\n>(wfAndModel: WfAndModel, ui: UI) {\n return z.object({\n workflow: Workflow(wfAndModel),\n model: wfAndModel,\n ui\n });\n}\n\nexport const BlockComponentsDescriptionRaw = BlockComponents(z.string(), z.string());\nexport type BlockComponentsDescriptionRaw = z.infer<typeof BlockComponentsDescriptionRaw>;\n\nexport function BlockComponentsAbsoluteUrl(prefix: string) {\n return BlockComponents(\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix))\n );\n}\nexport type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;\n\n// export const BlockComponentsExplicit = BlockComponents(, ContentRelative);\n// export type BlockComponentsExplicit = z.infer<typeof BlockComponentsExplicit>;\n","import { z } from 'zod';\nimport {\n ContentExplicitBase64,\n ContentExplicitBytes,\n DescriptionContentBinary,\n DescriptionContentText\n} from './content_types';\n\nexport function BlockPackMeta<\n const LongStringType extends z.ZodTypeAny,\n const BinaryType extends z.ZodTypeAny\n>(longString: LongStringType, binary: BinaryType) {\n return z.object({\n title: z.string(),\n description: z.string(),\n longDescription: longString.optional(),\n changelog: longString.optional(),\n logo: binary.optional(),\n url: z.string().url().optional(),\n docs: z.string().url().optional(),\n support: z.union([z.string().url(), z.string().email()]).optional(),\n tags: z.array(z.string()).optional(),\n organization: z.object({\n name: z.string(),\n url: z.string().url(),\n logo: binary.optional()\n }),\n /**\n * The order of blocks on the \"marketplace\" (higher values push block higher to the top of the list).\n * `undefined` value or absent field is treated exactly the same as number `0`.\n */\n marketplaceRanking: z.number().optional(),\n /**\n * The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.\n */\n termsOfServiceUrl: z.string().url().optional()\n });\n}\n\n// prettier-ignore\nexport const BlockPackMetaDescriptionRaw = BlockPackMeta(\n DescriptionContentText,\n DescriptionContentBinary\n);\nexport type BlockPackMetaDescriptionRaw = z.infer<typeof BlockPackMetaDescriptionRaw>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBase64 = BlockPackMeta(\n z.string(),\n ContentExplicitBase64\n);\nexport type BlockPackMetaEmbeddedBase64 = z.infer<typeof BlockPackMetaEmbeddedBase64>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBytes = BlockPackMeta(\n z.string(),\n ContentExplicitBytes\n);\nexport type BlockPackMetaEmbeddedBytes = z.infer<typeof BlockPackMetaEmbeddedBytes>;\n","import { z, ZodTypeAny } from 'zod';\nimport { BlockComponentsDescriptionRaw } from './block_components';\nimport { BlockPackMetaDescriptionRaw } from './block_meta';\nimport { BlockPackId } from './block_id';\nimport * as R from 'remeda';\n\n/** Description, as appears in root block package.json file,\n * `file:` references are parsed into relative content of corresponding type, depending on the context,\n * strings are converted to explicit content type. */\nexport const BlockPackDescriptionFromPackageJsonRaw = z.object({\n components: BlockComponentsDescriptionRaw,\n meta: BlockPackMetaDescriptionRaw\n});\n\nexport function CreateBlockPackDescriptionSchema<\n Components extends ZodTypeAny,\n Meta extends ZodTypeAny\n>(components: Components, meta: Meta) {\n return z.object({\n id: BlockPackId,\n components,\n meta\n });\n}\n\nexport const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(\n BlockComponentsDescriptionRaw,\n BlockPackMetaDescriptionRaw\n);\nexport type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;\n\nexport function overrideDescriptionVersion<T extends { id: BlockPackId }>(\n manifest: T,\n newVersion: string\n): T {\n return R.mergeDeep(manifest, { id: { version: newVersion } }) as T;\n}\n","import { z } from 'zod';\nimport { BlockComponents } from './block_components';\nimport { ContentRelative, ContentRelativeBinary, ContentRelativeText } from './content_types';\nimport { CreateBlockPackDescriptionSchema } from './block_description';\nimport { BlockPackMeta } from './block_meta';\nimport * as R from 'remeda';\nimport { BlockPackId } from './block_id';\n\nexport const BlockComponentsManifest = BlockComponents(ContentRelative, ContentRelative);\nexport type BlockComponentsManifest = z.infer<typeof BlockComponentsManifest>;\n\nexport const BlockPackMetaManifest = BlockPackMeta(ContentRelativeText, ContentRelativeBinary);\nexport type BlockPackMetaManifest = z.infer<typeof BlockPackMetaManifest>;\n\n/** Block description to be used in block manifest */\nexport const BlockPackDescriptionManifest = CreateBlockPackDescriptionSchema(\n BlockComponentsManifest,\n BlockPackMetaManifest\n);\nexport type BlockPackDescriptionManifest = z.infer<typeof BlockPackDescriptionManifest>;\n\nexport const Sha256Schema = z\n .string()\n .regex(/[0-9a-fA-F]/)\n .toUpperCase()\n .length(64); // 256 / 4 (bits per hex register);\n\nexport const ManifestFileInfo = z.object({\n name: z.string(),\n size: z.number().int(),\n sha256: Sha256Schema\n});\nexport type ManifestFileInfo = z.infer<typeof ManifestFileInfo>;\n\nexport const BlockPackManifest = z.object({\n schema: z.literal('v2'),\n description: BlockPackDescriptionManifest,\n timestamp: z.number().optional(),\n files: z.array(ManifestFileInfo)\n});\nexport type BlockPackManifest = z.infer<typeof BlockPackManifest>;\n\nexport const BlockPackManifestFile = 'manifest.json';\n\nexport function overrideManifestVersion<T extends { description: { id: BlockPackId } }>(\n manifest: T,\n newVersion: string\n): T {\n return R.mergeDeep(manifest, { description: { id: { version: newVersion } } }) as T;\n}\n","import { z } from 'zod';\nimport { BlockPackId } from '../block_meta';\n\n/** Block pack from local folder, to be used during block development. Old layout.\n * @deprecated don't use */\nexport const BlockPackDevV1 = z.object({\n type: z.literal('dev-v1'),\n folder: z.string(),\n mtime: z.string().optional()\n});\n/** @deprecated don't use */\nexport type BlockPackDevV1 = z.infer<typeof BlockPackDevV1>;\n\n/** Block pack from local folder, to be used during block development. New layout. */\nexport const BlockPackDevV2 = z.object({\n type: z.literal('dev-v2'),\n folder: z.string(),\n mtime: z.string().optional()\n});\nexport type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;\n\n/**\n * Block pack from registry with version 2 layout, to be loaded directly\n * from the client.\n * @deprecated don't use\n * */\nexport const BlockPackFromRegistryV1 = z.object({\n type: z.literal('from-registry-v1'),\n registryUrl: z.string(),\n id: BlockPackId\n});\n/** @deprecated don't use */\nexport type BlockPackFromRegistryV1 = z.infer<typeof BlockPackFromRegistryV1>;\n\n/** Block pack from registry with version 2 layout, to be loaded directly\n * from the client. */\nexport const BlockPackFromRegistryV2 = z.object({\n type: z.literal('from-registry-v2'),\n registryUrl: z.string(),\n id: BlockPackId,\n channel: z.string().optional()\n});\nexport type BlockPackFromRegistryV2 = z.infer<typeof BlockPackFromRegistryV2>;\n\n/** Information about block origin, can be used to instantiate new blocks */\nexport const BlockPackSpec = z.discriminatedUnion('type', [\n BlockPackDevV1,\n BlockPackDevV2,\n BlockPackFromRegistryV1,\n BlockPackFromRegistryV2\n]);\nexport type BlockPackSpec = z.infer<typeof BlockPackSpec>;\n","import { z } from 'zod';\n\nexport const LocalDevFolder = z.object({\n type: z.literal('local-dev'),\n path: z.string()\n});\nexport type LocalDevFolder = z.infer<typeof LocalDevFolder>;\n\n/** @deprecated don't use */\nexport const RemoteRegistryV1Spec = z.object({\n type: z.literal('remote-v1'),\n url: z.string().url()\n});\n/** @deprecated don't use */\nexport type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;\n\nexport const RemoteRegistryV2Spec = z.object({\n type: z.literal('remote-v2'),\n url: z.string().url()\n});\nexport type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;\n\nexport const RegistrySpec = z.discriminatedUnion('type', [\n RemoteRegistryV1Spec,\n RemoteRegistryV2Spec,\n LocalDevFolder\n]);\nexport type RegistrySpec = z.infer<typeof RegistrySpec>;\n\nexport const RegistryEntry = z.object({\n id: z.string(),\n title: z.string().optional(),\n spec: RegistrySpec\n});\nexport type RegistryEntry = z.infer<typeof RegistryEntry>;\n\nexport const RegistryList = z.array(RegistryEntry);\nexport type RegistryList = z.infer<typeof RegistryList>;\n","import { z } from 'zod';\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n SemVer\n} from '../block_meta';\nimport { BlockPackFromRegistryV2, BlockPackSpec } from './block_pack_spec';\nimport { RegistryEntry } from './registry_spec';\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverviewLegacy = z.object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer)\n});\nexport type BlockPackOverviewLegacy = z.infer<typeof BlockPackOverviewLegacy>;\n\nexport const AnyChannel = 'any';\nexport const StableChannel = 'stable';\n\nexport const VersionWithChannels = z.object({\n version: SemVer,\n channels: z.array(z.string())\n});\n\n/**\n * Information about specific block pack version.\n * */\nexport const SingleBlockPackOverview = z.object({\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec\n});\nexport type SingleBlockPackOverview = z.infer<typeof SingleBlockPackOverview>;\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverview = z.object({\n id: BlockPackIdNoVersion,\n latestByChannel: z.record(z.string(), SingleBlockPackOverview),\n allVersions: z.array(VersionWithChannels),\n registryId: z.string()\n});\nexport type BlockPackOverview = z.infer<typeof BlockPackOverview>;\n\nexport const RegistryStatus = RegistryEntry.extend({\n status: z.union([z.literal('online'), z.literal('offline')])\n});\nexport type RegistryStatus = z.infer<typeof RegistryStatus>;\n\nexport const BlockPackListing = z.object({\n registries: z.array(RegistryStatus),\n blockPacks: z.array(BlockPackOverview)\n});\nexport type BlockPackListing = z.infer<typeof BlockPackListing>;\n\nexport function blockPackOverviewToLegacy(bpo: BlockPackOverview): BlockPackOverviewLegacy {\n const mainChannel = bpo.latestByChannel[StableChannel] !== undefined ? StableChannel : AnyChannel;\n const latestOverview = bpo.latestByChannel[mainChannel];\n return {\n id: latestOverview.id,\n meta: latestOverview.meta,\n // so we only add stable channel specs to projects, to smooth the transition\n spec: { ...(latestOverview.spec as BlockPackFromRegistryV2), channel: StableChannel },\n otherVersions: bpo.allVersions\n .filter((v) => v.channels.indexOf(mainChannel) >= 0)\n .map((v) => v.version),\n registryId: bpo.registryId\n };\n}\n"],"names":["InitialBlockSettings","ContentExplicitString","z","ContentExplicitBase64","ContentRelative","absPathRegex","ContentAbsoluteFile","ContentAbsoluteUrl","ContentExplicitBytes","ContentAbsoluteFolder","ContentAny","ContentExplicitOrRelative","ContentAnyLocal","ContentAnyRemote","ContentAnyBinaryLocal","ContentAnyTextLocal","ContentAbsoluteBinaryRemote","ContentAbsoluteBinaryLocal","ContentAbsoluteTextRemote","ContentAbsoluteTextLocal","ContentRelativeBinary","ContentRelativeText","DescriptionContentBinary","value","ctx","DescriptionContentText","SemVer","mapRemoteToAbsolute","rootUrl","rootWithSlash","addPrefixToRelative","prefix","prefixWithSlash","BlockPackId","BlockPackIdNoVersion","blockPackIdToString","bp","blockPackIdNoVersionToString","blockPackIdEquals","bp1","bp2","blockPackIdNoVersionEquals","WorkflowV1","contentType","Workflow","BlockComponents","wfAndModel","ui","BlockComponentsDescriptionRaw","BlockComponentsAbsoluteUrl","BlockPackMeta","longString","binary","BlockPackMetaDescriptionRaw","BlockPackMetaEmbeddedBase64","BlockPackMetaEmbeddedBytes","BlockPackDescriptionFromPackageJsonRaw","CreateBlockPackDescriptionSchema","components","meta","BlockPackDescriptionRaw","overrideDescriptionVersion","manifest","newVersion","R","BlockComponentsManifest","BlockPackMetaManifest","BlockPackDescriptionManifest","Sha256Schema","ManifestFileInfo","BlockPackManifest","BlockPackManifestFile","overrideManifestVersion","BlockPackDevV1","BlockPackDevV2","BlockPackFromRegistryV1","BlockPackFromRegistryV2","BlockPackSpec","LocalDevFolder","RemoteRegistryV1Spec","RemoteRegistryV2Spec","RegistrySpec","RegistryEntry","RegistryList","BlockPackOverviewLegacy","AnyChannel","StableChannel","VersionWithChannels","SingleBlockPackOverview","BlockPackOverview","RegistryStatus","BlockPackListing","blockPackOverviewToLegacy","bpo","mainChannel","latestOverview","v"],"mappings":";;AA0BO,MAAMA,IAAsC,CAAA,GCp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OAAA,GAAUsF,CAAuB;AAAA,EAC7D,aAAatF,EAAE,MAAMqF,CAAmB;AAAA,EACxC,YAAYrF,EAAE,OAAO;AACvB,CAAC,GAGYwF,IAAiBR,EAAc,OAAO;AAAA,EACjD,QAAQhF,EAAE,MAAM,CAACA,EAAE,QAAQ,QAAQ,GAAGA,EAAE,QAAQ,SAAS,CAAC,CAAC;AAC7D,CAAC,GAGYyF,KAAmBzF,EAAE,OAAO;AAAA,EACvC,YAAYA,EAAE,MAAMwF,CAAc;AAAA,EAClC,YAAYxF,EAAE,MAAMuF,CAAiB;AACvC,CAAC;AAGM,SAASG,GAA0BC,GAAiD;AACzF,QAAMC,IAAcD,EAAI,gBAAgBP,CAAa,MAAM,SAAYA,IAAgBD,GACjFU,IAAiBF,EAAI,gBAAgBC,CAAW;AAC/C,SAAA;AAAA,IACL,IAAIC,EAAe;AAAA,IACnB,MAAMA,EAAe;AAAA;AAAA,IAErB,MAAM,EAAE,GAAIA,EAAe,MAAkC,SAAST,EAAc;AAAA,IACpF,eAAeO,EAAI,YAChB,OAAO,CAACG,MAAMA,EAAE,SAAS,QAAQF,CAAW,KAAK,CAAC,EAClD,IAAI,CAACE,MAAMA,EAAE,OAAO;AAAA,IACvB,YAAYH,EAAI;AAAA,EAClB;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-middle-layer",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"description": "Common model between middle layer and non-block UI code",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"./src/**/*"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"remeda": "^2.
|
|
20
|
+
"remeda": "^2.21.1",
|
|
21
21
|
"zod": "~3.23.8",
|
|
22
22
|
"utility-types": "^3.11.0",
|
|
23
|
-
"@milaboratories/pl-model-common": "^1.10.
|
|
23
|
+
"@milaboratories/pl-model-common": "^1.10.6"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"typescript": "~5.5.4",
|
|
@@ -30,6 +30,10 @@ export function BlockPackMeta<
|
|
|
30
30
|
* `undefined` value or absent field is treated exactly the same as number `0`.
|
|
31
31
|
*/
|
|
32
32
|
marketplaceRanking: z.number().optional(),
|
|
33
|
+
/**
|
|
34
|
+
* The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.
|
|
35
|
+
*/
|
|
36
|
+
termsOfServiceUrl: z.string().url().optional()
|
|
33
37
|
});
|
|
34
38
|
}
|
|
35
39
|
|