@milaboratories/pl-model-middle-layer 1.7.43 → 1.7.45

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.
@@ -1,5 +1,6 @@
1
1
  import { z, ZodTypeAny } from 'zod';
2
2
  import { BlockPackId } from './block_id';
3
+ import { BlockCodeKnownFeatureFlags } from '@milaboratories/pl-model-common';
3
4
  /** Description, as appears in root block package.json file,
4
5
  * `file:` references are parsed into relative content of corresponding type, depending on the context,
5
6
  * strings are converted to explicit content type. */
@@ -471,6 +472,7 @@ export declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
471
472
  termsOfServiceUrl?: string | undefined;
472
473
  };
473
474
  }>;
475
+ export declare const FeatureFlags: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>;
474
476
  export declare function CreateBlockPackDescriptionSchema<Components extends ZodTypeAny, Meta extends ZodTypeAny>(components: Components, meta: Meta): z.ZodObject<{
475
477
  id: z.ZodObject<{
476
478
  organization: z.ZodString;
@@ -487,6 +489,7 @@ export declare function CreateBlockPackDescriptionSchema<Components extends ZodT
487
489
  }>;
488
490
  components: Components;
489
491
  meta: Meta;
492
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
490
493
  }, "strip", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
491
494
  id: z.ZodObject<{
492
495
  organization: z.ZodString;
@@ -503,6 +506,7 @@ export declare function CreateBlockPackDescriptionSchema<Components extends ZodT
503
506
  }>;
504
507
  components: Components;
505
508
  meta: Meta;
509
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
506
510
  }>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
507
511
  id: z.ZodObject<{
508
512
  organization: z.ZodString;
@@ -519,6 +523,7 @@ export declare function CreateBlockPackDescriptionSchema<Components extends ZodT
519
523
  }>;
520
524
  components: Components;
521
525
  meta: Meta;
526
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
522
527
  }>, any>[k]; }, { [k_1 in keyof z.baseObjectInputType<{
523
528
  id: z.ZodObject<{
524
529
  organization: z.ZodString;
@@ -535,6 +540,7 @@ export declare function CreateBlockPackDescriptionSchema<Components extends ZodT
535
540
  }>;
536
541
  components: Components;
537
542
  meta: Meta;
543
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
538
544
  }>]: z.baseObjectInputType<{
539
545
  id: z.ZodObject<{
540
546
  organization: z.ZodString;
@@ -551,6 +557,7 @@ export declare function CreateBlockPackDescriptionSchema<Components extends ZodT
551
557
  }>;
552
558
  components: Components;
553
559
  meta: Meta;
560
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
554
561
  }>[k_1]; }>;
555
562
  export declare const BlockPackDescriptionRaw: z.ZodObject<{
556
563
  id: z.ZodObject<{
@@ -902,6 +909,7 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
902
909
  marketplaceRanking?: number | undefined;
903
910
  termsOfServiceUrl?: string | undefined;
904
911
  }>;
912
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
905
913
  }, "strip", z.ZodTypeAny, {
906
914
  components: {
907
915
  ui: string;
@@ -972,6 +980,7 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
972
980
  name: string;
973
981
  version: string;
974
982
  };
983
+ featureFlags?: BlockCodeKnownFeatureFlags | undefined;
975
984
  }, {
976
985
  components: {
977
986
  ui: string;
@@ -1042,6 +1051,7 @@ export declare const BlockPackDescriptionRaw: z.ZodObject<{
1042
1051
  name: string;
1043
1052
  version: string;
1044
1053
  };
1054
+ featureFlags?: Record<string, number | boolean> | undefined;
1045
1055
  }>;
1046
1056
  export type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;
1047
1057
  export declare function overrideDescriptionVersion<T extends {
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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"}
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { BlockPackId } from './block_id';
3
+ import { BlockCodeKnownFeatureFlags } from '@milaboratories/pl-model-common';
3
4
  export declare const BlockComponentsManifest: z.ZodObject<{
4
5
  workflow: z.ZodUnion<[z.ZodPipeline<z.ZodEffects<z.ZodObject<{
5
6
  type: z.ZodLiteral<"relative">;
@@ -673,6 +674,7 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
673
674
  marketplaceRanking?: number | undefined;
674
675
  termsOfServiceUrl?: string | undefined;
675
676
  }>;
677
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
676
678
  }, "strip", z.ZodTypeAny, {
677
679
  components: {
678
680
  ui: {
@@ -740,6 +742,7 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
740
742
  name: string;
741
743
  version: string;
742
744
  };
745
+ featureFlags?: BlockCodeKnownFeatureFlags | undefined;
743
746
  }, {
744
747
  components: {
745
748
  ui: {
@@ -810,6 +813,7 @@ export declare const BlockPackDescriptionManifest: z.ZodObject<{
810
813
  name: string;
811
814
  version: string;
812
815
  };
816
+ featureFlags?: Record<string, number | boolean> | undefined;
813
817
  }>;
814
818
  export type BlockPackDescriptionManifest = z.infer<typeof BlockPackDescriptionManifest>;
815
819
  export declare const Sha256Schema: z.ZodString;
@@ -1171,6 +1175,7 @@ export declare const BlockPackManifest: z.ZodObject<{
1171
1175
  marketplaceRanking?: number | undefined;
1172
1176
  termsOfServiceUrl?: string | undefined;
1173
1177
  }>;
1178
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
1174
1179
  }, "strip", z.ZodTypeAny, {
1175
1180
  components: {
1176
1181
  ui: {
@@ -1238,6 +1243,7 @@ export declare const BlockPackManifest: z.ZodObject<{
1238
1243
  name: string;
1239
1244
  version: string;
1240
1245
  };
1246
+ featureFlags?: BlockCodeKnownFeatureFlags | undefined;
1241
1247
  }, {
1242
1248
  components: {
1243
1249
  ui: {
@@ -1308,6 +1314,7 @@ export declare const BlockPackManifest: z.ZodObject<{
1308
1314
  name: string;
1309
1315
  version: string;
1310
1316
  };
1317
+ featureFlags?: Record<string, number | boolean> | undefined;
1311
1318
  }>;
1312
1319
  timestamp: z.ZodOptional<z.ZodNumber>;
1313
1320
  files: z.ZodArray<z.ZodObject<{
@@ -1391,6 +1398,7 @@ export declare const BlockPackManifest: z.ZodObject<{
1391
1398
  name: string;
1392
1399
  version: string;
1393
1400
  };
1401
+ featureFlags?: BlockCodeKnownFeatureFlags | undefined;
1394
1402
  };
1395
1403
  schema: "v2";
1396
1404
  files: {
@@ -1470,6 +1478,7 @@ export declare const BlockPackManifest: z.ZodObject<{
1470
1478
  name: string;
1471
1479
  version: string;
1472
1480
  };
1481
+ featureFlags?: Record<string, number | boolean> | undefined;
1473
1482
  };
1474
1483
  schema: "v2";
1475
1484
  files: {
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA4D,CAAC;AAC/F,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,qDAAqD;AACrD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,qBAAqB,kBAAkB,CAAC;AAErD,wBAAgB,uBAAuB,CAAC,CAAC,SAAS;IAAE,WAAW,EAAE;QAAE,EAAE,EAAE,WAAW,CAAA;KAAE,CAAA;CAAE,EACpF,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,MAAM,GACjB,CAAC,CAEH"}
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { BlockCodeKnownFeatureFlags } from '@milaboratories/pl-model-common';
2
3
  /**
3
4
  * Latest information about specific block pack. Contain information about latest version of the package.
4
5
  * */
@@ -477,6 +478,7 @@ export declare const SingleBlockPackOverview: z.ZodObject<{
477
478
  marketplaceRanking?: number | undefined;
478
479
  termsOfServiceUrl?: string | undefined;
479
480
  }>;
481
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
480
482
  spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
481
483
  type: z.ZodLiteral<"dev-v1">;
482
484
  folder: z.ZodString;
@@ -627,6 +629,7 @@ export declare const SingleBlockPackOverview: z.ZodObject<{
627
629
  registryUrl: string;
628
630
  channel?: string | undefined;
629
631
  };
632
+ featureFlags?: BlockCodeKnownFeatureFlags | undefined;
630
633
  }, {
631
634
  meta: {
632
635
  organization: {
@@ -685,6 +688,7 @@ export declare const SingleBlockPackOverview: z.ZodObject<{
685
688
  registryUrl: string;
686
689
  channel?: string | undefined;
687
690
  };
691
+ featureFlags?: Record<string, number | boolean> | undefined;
688
692
  }>;
689
693
  export type SingleBlockPackOverview = z.infer<typeof SingleBlockPackOverview>;
690
694
  /**
@@ -824,6 +828,7 @@ export declare const BlockPackOverview: z.ZodObject<{
824
828
  marketplaceRanking?: number | undefined;
825
829
  termsOfServiceUrl?: string | undefined;
826
830
  }>;
831
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
827
832
  spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
828
833
  type: z.ZodLiteral<"dev-v1">;
829
834
  folder: z.ZodString;
@@ -974,6 +979,7 @@ export declare const BlockPackOverview: z.ZodObject<{
974
979
  registryUrl: string;
975
980
  channel?: string | undefined;
976
981
  };
982
+ featureFlags?: BlockCodeKnownFeatureFlags | undefined;
977
983
  }, {
978
984
  meta: {
979
985
  organization: {
@@ -1032,6 +1038,7 @@ export declare const BlockPackOverview: z.ZodObject<{
1032
1038
  registryUrl: string;
1033
1039
  channel?: string | undefined;
1034
1040
  };
1041
+ featureFlags?: Record<string, number | boolean> | undefined;
1035
1042
  }>>;
1036
1043
  allVersions: z.ZodArray<z.ZodObject<{
1037
1044
  version: z.ZodString;
@@ -1108,6 +1115,7 @@ export declare const BlockPackOverview: z.ZodObject<{
1108
1115
  registryUrl: string;
1109
1116
  channel?: string | undefined;
1110
1117
  };
1118
+ featureFlags?: BlockCodeKnownFeatureFlags | undefined;
1111
1119
  }>;
1112
1120
  allVersions: {
1113
1121
  version: string;
@@ -1177,6 +1185,7 @@ export declare const BlockPackOverview: z.ZodObject<{
1177
1185
  registryUrl: string;
1178
1186
  channel?: string | undefined;
1179
1187
  };
1188
+ featureFlags?: Record<string, number | boolean> | undefined;
1180
1189
  }>;
1181
1190
  allVersions: {
1182
1191
  version: string;
@@ -1444,6 +1453,7 @@ export declare const BlockPackListing: z.ZodObject<{
1444
1453
  marketplaceRanking?: number | undefined;
1445
1454
  termsOfServiceUrl?: string | undefined;
1446
1455
  }>;
1456
+ featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
1447
1457
  spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1448
1458
  type: z.ZodLiteral<"dev-v1">;
1449
1459
  folder: z.ZodString;
@@ -1594,6 +1604,7 @@ export declare const BlockPackListing: z.ZodObject<{
1594
1604
  registryUrl: string;
1595
1605
  channel?: string | undefined;
1596
1606
  };
1607
+ featureFlags?: BlockCodeKnownFeatureFlags | undefined;
1597
1608
  }, {
1598
1609
  meta: {
1599
1610
  organization: {
@@ -1652,6 +1663,7 @@ export declare const BlockPackListing: z.ZodObject<{
1652
1663
  registryUrl: string;
1653
1664
  channel?: string | undefined;
1654
1665
  };
1666
+ featureFlags?: Record<string, number | boolean> | undefined;
1655
1667
  }>>;
1656
1668
  allVersions: z.ZodArray<z.ZodObject<{
1657
1669
  version: z.ZodString;
@@ -1728,6 +1740,7 @@ export declare const BlockPackListing: z.ZodObject<{
1728
1740
  registryUrl: string;
1729
1741
  channel?: string | undefined;
1730
1742
  };
1743
+ featureFlags?: BlockCodeKnownFeatureFlags | undefined;
1731
1744
  }>;
1732
1745
  allVersions: {
1733
1746
  version: string;
@@ -1797,6 +1810,7 @@ export declare const BlockPackListing: z.ZodObject<{
1797
1810
  registryUrl: string;
1798
1811
  channel?: string | undefined;
1799
1812
  };
1813
+ featureFlags?: Record<string, number | boolean> | undefined;
1800
1814
  }>;
1801
1815
  allVersions: {
1802
1816
  version: string;
@@ -1883,6 +1897,7 @@ export declare const BlockPackListing: z.ZodObject<{
1883
1897
  registryUrl: string;
1884
1898
  channel?: string | undefined;
1885
1899
  };
1900
+ featureFlags?: BlockCodeKnownFeatureFlags | undefined;
1886
1901
  }>;
1887
1902
  allVersions: {
1888
1903
  version: string;
@@ -1969,6 +1984,7 @@ export declare const BlockPackListing: z.ZodObject<{
1969
1984
  registryUrl: string;
1970
1985
  channel?: string | undefined;
1971
1986
  };
1987
+ featureFlags?: Record<string, number | boolean> | undefined;
1972
1988
  }>;
1973
1989
  allVersions: {
1974
1990
  version: 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAA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eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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={},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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),Y=require("remeda");function tt(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 R=tt(Y),et={},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(),A=new RegExp("^(/|[A-Z]:\\\\)"),c=t.z.object({type:t.z.literal("absolute-file"),file:t.z.string().regex(A,"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(),S=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(),nt=t.z.object({type:t.z.literal("absolute-folder"),folder:t.z.string().regex(A,"path to folder must be absolute").describe("Absolute address of the folder in local file system")}).strict(),ot=t.z.discriminatedUnion("type",[s,r,i,c,d]),it=t.z.discriminatedUnion("type",[s,r,i]),rt=t.z.discriminatedUnion("type",[s,r,i,c]),st=t.z.discriminatedUnion("type",[s,r,i,d]),j=t.z.discriminatedUnion("type",[r,i,c]),w=t.z.discriminatedUnion("type",[s,i,c]),ct=t.z.discriminatedUnion("type",[r,d]),at=t.z.discriminatedUnion("type",[r,c]),lt=t.z.discriminatedUnion("type",[s,d]),dt=t.z.discriminatedUnion("type",[s,c]),g=t.z.discriminatedUnion("type",[r,i]),x=t.z.discriminatedUnion("type",[s,i]),V=t.z.union([t.z.string().startsWith("file:").transform((e,n)=>({type:"relative",path:e.slice(5)})),j]),M=t.z.union([t.z.string().transform((e,n)=>e.startsWith("file:")?{type:"relative",path:e.slice(5)}:{type:"explicit-string",content:e}),w]),u=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 m(e){const n=e.endsWith("/")?e:`${e}/`;return o=>o.type==="relative"?{type:"absolute-url",url:n+o.path}:o}function zt(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:u}).strict(),D=a.omit({version:!0});function kt(e){if(e!==void 0)return`${e.organization}:${e.name}:${e.version}`}function gt(e){if(e!==void 0)return`${e.organization}:${e.name}`}function ut(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 y(e){return t.z.object({type:t.z.literal("workflow-v1"),main:e.describe("Main workflow")})}function F(e){return t.z.union([e.transform(n=>({type:"workflow-v1",main:n})).pipe(y(e)),t.z.discriminatedUnion("type",[y(e)])])}function p(e,n){return t.z.object({workflow:F(e),model:e,ui:n})}const f=p(t.z.string(),t.z.string());function mt(e){return p(g.transform(m(e)),g.transform(m(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(M,V),yt=z(t.z.string(),r),v=z(t.z.string(),S),ft=t.z.object({components:f,meta:b}),B=t.z.record(t.z.string(),t.z.union([t.z.boolean(),t.z.number()])).transform(e=>e);function P(e,n){return t.z.object({id:a,components:e,meta:n,featureFlags:B.optional()})}const bt=P(f,b);function vt(e,n){return R.mergeDeep(e,{id:{version:n}})}const I=p(i,i),T=z(x,g),U=P(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}),Bt=t.z.object({schema:t.z.literal("v2"),description:U,timestamp:t.z.number().optional(),files:t.z.array(L)}),Pt="manifest.json";function Ct(e,n){return R.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()}),W=t.z.object({type:t.z.literal("dev-v2"),folder:t.z.string(),mtime:t.z.string().optional()}),$=t.z.object({type:t.z.literal("from-registry-v1"),registryUrl:t.z.string(),id:a}),q=t.z.object({type:t.z.literal("from-registry-v2"),registryUrl:t.z.string(),id:a,channel:t.z.string().optional()}),C=t.z.discriminatedUnion("type",[O,W,$,q]),N=t.z.object({type:t.z.literal("local-dev"),path:t.z.string()}),Z=t.z.object({type:t.z.literal("remote-v1"),url:t.z.string().url()}),_=t.z.object({type:t.z.literal("remote-v2"),url:t.z.string().url()}),J=t.z.discriminatedUnion("type",[Z,_,N]),h=t.z.object({id:t.z.string(),title:t.z.string().optional(),spec:J}),ht=t.z.array(h),Rt=t.z.object({registryId:t.z.string(),id:a,meta:v,spec:C,otherVersions:t.z.array(u)}),G="any",k="stable",H=t.z.object({version:u,channels:t.z.array(t.z.string())}),K=t.z.object({id:a,meta:v,featureFlags:B.optional(),spec:C}),Q=t.z.object({id:D,latestByChannel:t.z.record(t.z.string(),K),allVersions:t.z.array(H),registryId:t.z.string()}),X=h.extend({status:t.z.union([t.z.literal("online"),t.z.literal("offline")])}),At=t.z.object({registries:t.z.array(X),blockPacks:t.z.array(Q)});function St(e){const n=e.latestByChannel[k]!==void 0?k:G,o=e.latestByChannel[n];return{id:o.id,meta:o.meta,spec:{...o.spec,channel:k},otherVersions:e.allVersions.filter(l=>l.channels.indexOf(n)>=0).map(l=>l.version),registryId:e.registryId}}const jt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.AnyChannel=G;exports.BlockComponents=p;exports.BlockComponentsAbsoluteUrl=mt;exports.BlockComponentsDescriptionRaw=f;exports.BlockComponentsManifest=I;exports.BlockPackDescriptionFromPackageJsonRaw=ft;exports.BlockPackDescriptionManifest=U;exports.BlockPackDescriptionRaw=bt;exports.BlockPackDevV1=O;exports.BlockPackDevV2=W;exports.BlockPackFromRegistryV1=$;exports.BlockPackFromRegistryV2=q;exports.BlockPackId=a;exports.BlockPackIdNoVersion=D;exports.BlockPackListing=At;exports.BlockPackManifest=Bt;exports.BlockPackManifestFile=Pt;exports.BlockPackMeta=z;exports.BlockPackMetaDescriptionRaw=b;exports.BlockPackMetaEmbeddedBase64=yt;exports.BlockPackMetaEmbeddedBytes=v;exports.BlockPackMetaManifest=T;exports.BlockPackOverview=Q;exports.BlockPackOverviewLegacy=Rt;exports.BlockPackSpec=C;exports.ContentAbsoluteBinaryLocal=at;exports.ContentAbsoluteBinaryRemote=ct;exports.ContentAbsoluteFile=c;exports.ContentAbsoluteFolder=nt;exports.ContentAbsoluteTextLocal=dt;exports.ContentAbsoluteTextRemote=lt;exports.ContentAbsoluteUrl=d;exports.ContentAny=ot;exports.ContentAnyBinaryLocal=j;exports.ContentAnyLocal=rt;exports.ContentAnyRemote=st;exports.ContentAnyTextLocal=w;exports.ContentExplicitBase64=r;exports.ContentExplicitBytes=S;exports.ContentExplicitOrRelative=it;exports.ContentExplicitString=s;exports.ContentRelative=i;exports.ContentRelativeBinary=g;exports.ContentRelativeText=x;exports.CreateBlockPackDescriptionSchema=P;exports.DescriptionContentBinary=V;exports.DescriptionContentText=M;exports.FeatureFlags=B;exports.InitialBlockSettings=et;exports.LocalDevFolder=N;exports.ManifestFileInfo=L;exports.PFrameInternal=jt;exports.RegistryEntry=h;exports.RegistryList=ht;exports.RegistrySpec=J;exports.RegistryStatus=X;exports.RemoteRegistryV1Spec=Z;exports.RemoteRegistryV2Spec=_;exports.SemVer=u;exports.Sha256Schema=E;exports.SingleBlockPackOverview=K;exports.StableChannel=k;exports.VersionWithChannels=H;exports.Workflow=F;exports.WorkflowV1=y;exports.addPrefixToRelative=zt;exports.blockPackIdEquals=ut;exports.blockPackIdNoVersionEquals=pt;exports.blockPackIdNoVersionToString=gt;exports.blockPackIdToString=kt;exports.blockPackOverviewToLegacy=St;exports.mapRemoteToAbsolute=m;exports.overrideDescriptionVersion=vt;exports.overrideManifestVersion=Ct;
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 * 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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../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';\nimport { BlockCodeKnownFeatureFlags } from '@milaboratories/pl-model-common';\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 const FeatureFlags = z.record(z.string(), z.union([z.boolean(), z.number()]))\n .transform((flags) => flags as BlockCodeKnownFeatureFlags);\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 featureFlags: FeatureFlags.optional()\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 FeatureFlags,\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 featureFlags: FeatureFlags.optional(),\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","FeatureFlags","flags","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","blockPackOvervi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