@milaboratories/pl-model-middle-layer 1.4.0 → 1.4.2

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.
@@ -21,6 +21,7 @@ export declare const BlockPackOverview: z.ZodObject<{
21
21
  title: z.ZodString;
22
22
  description: z.ZodString;
23
23
  longDescription: z.ZodOptional<z.ZodString>;
24
+ changelog: z.ZodOptional<z.ZodString>;
24
25
  logo: z.ZodOptional<z.ZodObject<{
25
26
  type: z.ZodLiteral<"explicit-bytes">;
26
27
  mimeType: z.ZodString;
@@ -85,6 +86,7 @@ export declare const BlockPackOverview: z.ZodObject<{
85
86
  description: string;
86
87
  url?: string | undefined;
87
88
  longDescription?: string | undefined;
89
+ changelog?: string | undefined;
88
90
  logo?: {
89
91
  type: "explicit-bytes";
90
92
  content: Uint8Array;
@@ -107,6 +109,7 @@ export declare const BlockPackOverview: z.ZodObject<{
107
109
  description: string;
108
110
  url?: string | undefined;
109
111
  longDescription?: string | undefined;
112
+ changelog?: string | undefined;
110
113
  logo?: {
111
114
  type: "explicit-bytes";
112
115
  content: Uint8Array;
@@ -221,6 +224,7 @@ export declare const BlockPackOverview: z.ZodObject<{
221
224
  description: string;
222
225
  url?: string | undefined;
223
226
  longDescription?: string | undefined;
227
+ changelog?: string | undefined;
224
228
  logo?: {
225
229
  type: "explicit-bytes";
226
230
  content: Uint8Array;
@@ -277,6 +281,7 @@ export declare const BlockPackOverview: z.ZodObject<{
277
281
  description: string;
278
282
  url?: string | undefined;
279
283
  longDescription?: string | undefined;
284
+ changelog?: string | undefined;
280
285
  logo?: {
281
286
  type: "explicit-bytes";
282
287
  content: Uint8Array;
@@ -465,6 +470,7 @@ export declare const BlockPackListing: z.ZodObject<{
465
470
  title: z.ZodString;
466
471
  description: z.ZodString;
467
472
  longDescription: z.ZodOptional<z.ZodString>;
473
+ changelog: z.ZodOptional<z.ZodString>;
468
474
  logo: z.ZodOptional<z.ZodObject<{
469
475
  type: z.ZodLiteral<"explicit-bytes">;
470
476
  mimeType: z.ZodString;
@@ -529,6 +535,7 @@ export declare const BlockPackListing: z.ZodObject<{
529
535
  description: string;
530
536
  url?: string | undefined;
531
537
  longDescription?: string | undefined;
538
+ changelog?: string | undefined;
532
539
  logo?: {
533
540
  type: "explicit-bytes";
534
541
  content: Uint8Array;
@@ -551,6 +558,7 @@ export declare const BlockPackListing: z.ZodObject<{
551
558
  description: string;
552
559
  url?: string | undefined;
553
560
  longDescription?: string | undefined;
561
+ changelog?: string | undefined;
554
562
  logo?: {
555
563
  type: "explicit-bytes";
556
564
  content: Uint8Array;
@@ -665,6 +673,7 @@ export declare const BlockPackListing: z.ZodObject<{
665
673
  description: string;
666
674
  url?: string | undefined;
667
675
  longDescription?: string | undefined;
676
+ changelog?: string | undefined;
668
677
  logo?: {
669
678
  type: "explicit-bytes";
670
679
  content: Uint8Array;
@@ -721,6 +730,7 @@ export declare const BlockPackListing: z.ZodObject<{
721
730
  description: string;
722
731
  url?: string | undefined;
723
732
  longDescription?: string | undefined;
733
+ changelog?: string | undefined;
724
734
  logo?: {
725
735
  type: "explicit-bytes";
726
736
  content: Uint8Array;
@@ -794,6 +804,7 @@ export declare const BlockPackListing: z.ZodObject<{
794
804
  description: string;
795
805
  url?: string | undefined;
796
806
  longDescription?: string | undefined;
807
+ changelog?: string | undefined;
797
808
  logo?: {
798
809
  type: "explicit-bytes";
799
810
  content: Uint8Array;
@@ -867,6 +878,7 @@ export declare const BlockPackListing: z.ZodObject<{
867
878
  description: string;
868
879
  url?: string | undefined;
869
880
  longDescription?: string | undefined;
881
+ changelog?: string | undefined;
870
882
  logo?: {
871
883
  type: "explicit-bytes";
872
884
  content: Uint8Array;
@@ -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;AAKxB;;KAEK;AACL,eAAO,MAAM,iBAAiB;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),r=t.z.object({type:t.z.literal("explicit-string"),content:t.z.string().describe("Actual string value")}).strict(),i=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(),o=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(),c=t.z.object({type:t.z.literal("absolute-file"),file:t.z.string().startsWith("/").describe("Absolute address of the file in local file system")}).strict(),l=t.z.object({type:t.z.literal("absolute-url"),url:t.z.string().url().describe("Global URL to reach the requested file")}).strict(),B=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(),_=t.z.object({type:t.z.literal("absolute-folder"),folder:t.z.string().startsWith("/").describe("Absolute address of the folder in local file system")}).strict(),$=t.z.discriminatedUnion("type",[r,i,o,c,l]),q=t.z.discriminatedUnion("type",[r,i,o]),J=t.z.discriminatedUnion("type",[r,i,o,c]),N=t.z.discriminatedUnion("type",[r,i,o,l]),f=t.z.discriminatedUnion("type",[i,o,c]),C=t.z.discriminatedUnion("type",[r,o,c]),G=t.z.discriminatedUnion("type",[i,l]),H=t.z.discriminatedUnion("type",[i,c]),K=t.z.discriminatedUnion("type",[r,l]),Q=t.z.discriminatedUnion("type",[r,c]),p=t.z.discriminatedUnion("type",[i,o]),P=t.z.discriminatedUnion("type",[r,o]),R=t.z.union([t.z.string().startsWith("file:").transform((e,n)=>({type:"relative",path:e.slice(5)})),f]),v=t.z.union([t.z.string().transform((e,n)=>e.startsWith("file:")?{type:"relative",path:e.slice(5)}:{type:"explicit-string",content:e}),C]),k=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 s=>s.type==="relative"?{type:"absolute-url",url:n+s.path}:s}function X(e){const n=e.endsWith("/")?e:`${e}/`;return s=>s.type==="relative"?{type:"relative",path:n+s.path}:s}const a=t.z.object({organization:t.z.string(),name:t.z.string(),version:k}).strict(),Y=a.omit({version:!0});function A(e){return t.z.union([e.transform(n=>({type:"workflow-v1",main:n})),t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("workflow-v1"),main:e.describe("Main workflow")})])])}function d(e,n){return t.z.object({workflow:A(e),model:e,ui:n})}const m=d(t.z.string(),t.z.string());function tt(e){return d(p.transform(y(e)),p.transform(y(e)))}function z(e,n){return t.z.object({title:t.z.string(),description:t.z.string(),longDescription: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()})})}const g=z(v,R),et=z(t.z.string(),i),h=z(t.z.string(),B),nt=t.z.object({components:m,meta:g});function b(e,n){return t.z.object({id:a,components:e,meta:n})}const ot=b(m,g),j=d(o,o),x=z(P,p),M=b(j,x),S=t.z.string().regex(/[0-9a-fA-F]/).toUpperCase().length(64),w=t.z.object({name:t.z.string(),size:t.z.number().int(),sha256:S}),it=t.z.object({schema:t.z.literal("v2"),description:M,files:t.z.array(w)}),rt="manifest.json",D=t.z.object({type:t.z.literal("dev-v1"),folder:t.z.string(),mtime:t.z.string().optional()}),U=t.z.object({type:t.z.literal("dev-v2"),folder:t.z.string(),mtime:t.z.string().optional()}),F=t.z.object({type:t.z.literal("from-registry-v1"),registryUrl:t.z.string(),id:a}),L=t.z.object({type:t.z.literal("from-registry-v2"),registryUrl:t.z.string(),id:a}),T=t.z.discriminatedUnion("type",[D,U,F,L]),V=t.z.object({type:t.z.literal("local-dev"),path:t.z.string()}),E=t.z.object({type:t.z.literal("remote-v1"),url:t.z.string().url()}),W=t.z.object({type:t.z.literal("remote-v2"),url:t.z.string().url()}),I=t.z.discriminatedUnion("type",[E,W,V]),u=t.z.object({id:t.z.string(),title:t.z.string().optional(),spec:I}),st=t.z.array(u),O=t.z.object({registryId:t.z.string(),id:a,meta:h,spec:T,otherVersions:t.z.array(k)}),Z=u.extend({status:t.z.union([t.z.literal("online"),t.z.literal("offline")])}),ct=t.z.object({registries:t.z.array(Z),blockPacks:t.z.array(O)}),at=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.BlockComponents=d;exports.BlockComponentsAbsoluteUrl=tt;exports.BlockComponentsDescriptionRaw=m;exports.BlockComponentsManifest=j;exports.BlockPackDescriptionFromPackageJsonRaw=nt;exports.BlockPackDescriptionManifest=M;exports.BlockPackDescriptionRaw=ot;exports.BlockPackDevV1=D;exports.BlockPackDevV2=U;exports.BlockPackFromRegistryV1=F;exports.BlockPackFromRegistryV2=L;exports.BlockPackId=a;exports.BlockPackIdNoVersion=Y;exports.BlockPackListing=ct;exports.BlockPackManifest=it;exports.BlockPackManifestFile=rt;exports.BlockPackMeta=z;exports.BlockPackMetaDescriptionRaw=g;exports.BlockPackMetaEmbeddedBase64=et;exports.BlockPackMetaEmbeddedBytes=h;exports.BlockPackMetaManifest=x;exports.BlockPackOverview=O;exports.BlockPackSpec=T;exports.ContentAbsoluteBinaryLocal=H;exports.ContentAbsoluteBinaryRemote=G;exports.ContentAbsoluteFile=c;exports.ContentAbsoluteFolder=_;exports.ContentAbsoluteTextLocal=Q;exports.ContentAbsoluteTextRemote=K;exports.ContentAbsoluteUrl=l;exports.ContentAny=$;exports.ContentAnyBinaryLocal=f;exports.ContentAnyLocal=J;exports.ContentAnyRemote=N;exports.ContentAnyTextLocal=C;exports.ContentExplicitBase64=i;exports.ContentExplicitBytes=B;exports.ContentExplicitOrRelative=q;exports.ContentExplicitString=r;exports.ContentRelative=o;exports.ContentRelativeBinary=p;exports.ContentRelativeText=P;exports.CreateBlockPackDescriptionSchema=b;exports.DescriptionContentBinary=R;exports.DescriptionContentText=v;exports.LocalDevFolder=V;exports.ManifestFileInfo=w;exports.PFrameInternal=at;exports.RegistryEntry=u;exports.RegistryList=st;exports.RegistrySpec=I;exports.RegistryStatus=Z;exports.RemoteRegistryV1Spec=E;exports.RemoteRegistryV2Spec=W;exports.SemVer=k;exports.Sha256Schema=S;exports.Workflow=A;exports.addPrefixToRelative=X;exports.mapRemoteToAbsolute=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),r=t.z.object({type:t.z.literal("explicit-string"),content:t.z.string().describe("Actual string value")}).strict(),i=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(),o=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(),c=t.z.object({type:t.z.literal("absolute-file"),file:t.z.string().startsWith("/").describe("Absolute address of the file in local file system")}).strict(),l=t.z.object({type:t.z.literal("absolute-url"),url:t.z.string().url().describe("Global URL to reach the requested file")}).strict(),f=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(),$=t.z.object({type:t.z.literal("absolute-folder"),folder:t.z.string().startsWith("/").describe("Absolute address of the folder in local file system")}).strict(),q=t.z.discriminatedUnion("type",[r,i,o,c,l]),J=t.z.discriminatedUnion("type",[r,i,o]),N=t.z.discriminatedUnion("type",[r,i,o,c]),G=t.z.discriminatedUnion("type",[r,i,o,l]),C=t.z.discriminatedUnion("type",[i,o,c]),P=t.z.discriminatedUnion("type",[r,o,c]),H=t.z.discriminatedUnion("type",[i,l]),K=t.z.discriminatedUnion("type",[i,c]),Q=t.z.discriminatedUnion("type",[r,l]),X=t.z.discriminatedUnion("type",[r,c]),p=t.z.discriminatedUnion("type",[i,o]),R=t.z.discriminatedUnion("type",[r,o]),v=t.z.union([t.z.string().startsWith("file:").transform((e,n)=>({type:"relative",path:e.slice(5)})),C]),A=t.z.union([t.z.string().transform((e,n)=>e.startsWith("file:")?{type:"relative",path:e.slice(5)}:{type:"explicit-string",content:e}),P]),m=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 s=>s.type==="relative"?{type:"absolute-url",url:n+s.path}:s}function Y(e){const n=e.endsWith("/")?e:`${e}/`;return s=>s.type==="relative"?{type:"relative",path:n+s.path}:s}const a=t.z.object({organization:t.z.string(),name:t.z.string(),version:m}).strict(),tt=a.omit({version:!0});function k(e){return t.z.object({type:t.z.literal("workflow-v1"),main:e.describe("Main workflow")})}function h(e){return t.z.union([e.transform(n=>({type:"workflow-v1",main:n})).pipe(k(e)),t.z.discriminatedUnion("type",[k(e)])])}function d(e,n){return t.z.object({workflow:h(e),model:e,ui:n})}const g=d(t.z.string(),t.z.string());function et(e){return d(p.transform(y(e)),p.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()})})}const u=z(A,v),nt=z(t.z.string(),i),j=z(t.z.string(),f),ot=t.z.object({components:g,meta:u});function b(e,n){return t.z.object({id:a,components:e,meta:n})}const it=b(g,u),x=d(o,o),M=z(R,p),w=b(x,M),S=t.z.string().regex(/[0-9a-fA-F]/).toUpperCase().length(64),D=t.z.object({name:t.z.string(),size:t.z.number().int(),sha256:S}),rt=t.z.object({schema:t.z.literal("v2"),description:w,files:t.z.array(D)}),st="manifest.json",U=t.z.object({type:t.z.literal("dev-v1"),folder:t.z.string(),mtime:t.z.string().optional()}),V=t.z.object({type:t.z.literal("dev-v2"),folder:t.z.string(),mtime:t.z.string().optional()}),F=t.z.object({type:t.z.literal("from-registry-v1"),registryUrl:t.z.string(),id:a}),L=t.z.object({type:t.z.literal("from-registry-v2"),registryUrl:t.z.string(),id:a}),E=t.z.discriminatedUnion("type",[U,V,F,L]),T=t.z.object({type:t.z.literal("local-dev"),path:t.z.string()}),W=t.z.object({type:t.z.literal("remote-v1"),url:t.z.string().url()}),I=t.z.object({type:t.z.literal("remote-v2"),url:t.z.string().url()}),O=t.z.discriminatedUnion("type",[W,I,T]),B=t.z.object({id:t.z.string(),title:t.z.string().optional(),spec:O}),ct=t.z.array(B),Z=t.z.object({registryId:t.z.string(),id:a,meta:j,spec:E,otherVersions:t.z.array(m)}),_=B.extend({status:t.z.union([t.z.literal("online"),t.z.literal("offline")])}),at=t.z.object({registries:t.z.array(_),blockPacks:t.z.array(Z)}),lt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.BlockComponents=d;exports.BlockComponentsAbsoluteUrl=et;exports.BlockComponentsDescriptionRaw=g;exports.BlockComponentsManifest=x;exports.BlockPackDescriptionFromPackageJsonRaw=ot;exports.BlockPackDescriptionManifest=w;exports.BlockPackDescriptionRaw=it;exports.BlockPackDevV1=U;exports.BlockPackDevV2=V;exports.BlockPackFromRegistryV1=F;exports.BlockPackFromRegistryV2=L;exports.BlockPackId=a;exports.BlockPackIdNoVersion=tt;exports.BlockPackListing=at;exports.BlockPackManifest=rt;exports.BlockPackManifestFile=st;exports.BlockPackMeta=z;exports.BlockPackMetaDescriptionRaw=u;exports.BlockPackMetaEmbeddedBase64=nt;exports.BlockPackMetaEmbeddedBytes=j;exports.BlockPackMetaManifest=M;exports.BlockPackOverview=Z;exports.BlockPackSpec=E;exports.ContentAbsoluteBinaryLocal=K;exports.ContentAbsoluteBinaryRemote=H;exports.ContentAbsoluteFile=c;exports.ContentAbsoluteFolder=$;exports.ContentAbsoluteTextLocal=X;exports.ContentAbsoluteTextRemote=Q;exports.ContentAbsoluteUrl=l;exports.ContentAny=q;exports.ContentAnyBinaryLocal=C;exports.ContentAnyLocal=N;exports.ContentAnyRemote=G;exports.ContentAnyTextLocal=P;exports.ContentExplicitBase64=i;exports.ContentExplicitBytes=f;exports.ContentExplicitOrRelative=J;exports.ContentExplicitString=r;exports.ContentRelative=o;exports.ContentRelativeBinary=p;exports.ContentRelativeText=R;exports.CreateBlockPackDescriptionSchema=b;exports.DescriptionContentBinary=v;exports.DescriptionContentText=A;exports.LocalDevFolder=T;exports.ManifestFileInfo=D;exports.PFrameInternal=lt;exports.RegistryEntry=B;exports.RegistryList=ct;exports.RegistrySpec=O;exports.RegistryStatus=_;exports.RemoteRegistryV1Spec=W;exports.RemoteRegistryV2Spec=I;exports.SemVer=m;exports.Sha256Schema=S;exports.Workflow=h;exports.WorkflowV1=k;exports.addPrefixToRelative=Y;exports.mapRemoteToAbsolute=y;
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../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":["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\nexport const ContentAbsoluteFile = z\n .object({\n type: z.literal('absolute-file'),\n file: z.string().startsWith('/').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 .startsWith('/')\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","import { z } from 'zod';\nimport { ContentRelativeBinary } from './content_types';\nimport { mapRemoteToAbsolute } from './content_conversion';\n\nexport type BlockPackComponents = {};\n\nexport function Workflow<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.union([\n // string is converted to v1 workflow\n contentType.transform((value) => ({\n type: 'workflow-v1',\n main: value\n })),\n // structured objects are decoded as union with type descriptor\n z.discriminatedUnion('type', [\n z.object({\n type: z.literal('workflow-v1'),\n main: contentType.describe('Main workflow')\n })\n ])\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 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}\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';\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","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';\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 files: z.array(ManifestFileInfo)\n});\nexport type BlockPackManifest = z.infer<typeof BlockPackManifest>;\n\nexport const BlockPackManifestFile = 'manifest.json';\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});\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 { BlockPackId, BlockPackMetaEmbeddedBytes, SemVer } from '../block_meta';\nimport { 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 BlockPackOverview = z.object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer)\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"],"names":["ContentExplicitString","z","ContentExplicitBase64","ContentRelative","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","Workflow","contentType","BlockComponents","wfAndModel","ui","BlockComponentsDescriptionRaw","BlockComponentsAbsoluteUrl","BlockPackMeta","longString","binary","BlockPackMetaDescriptionRaw","BlockPackMetaEmbeddedBase64","BlockPackMetaEmbeddedBytes","BlockPackDescriptionFromPackageJsonRaw","CreateBlockPackDescriptionSchema","components","meta","BlockPackDescriptionRaw","BlockComponentsManifest","BlockPackMetaManifest","BlockPackDescriptionManifest","Sha256Schema","ManifestFileInfo","BlockPackManifest","BlockPackManifestFile","BlockPackDevV1","BlockPackDevV2","BlockPackFromRegistryV1","BlockPackFromRegistryV2","BlockPackSpec","LocalDevFolder","RemoteRegistryV1Spec","RemoteRegistryV2Spec","RegistrySpec","RegistryEntry","RegistryList","BlockPackOverview","RegistryStatus","BlockPackListing"],"mappings":"uGAMaA,EAAwBC,IAClC,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,iBAAiB,EACjC,QAASA,EAAAA,EAAE,SAAS,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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pE,IAAE,OAAO,CACxC,WAAYA,IAAE,OAAO,EACrB,GAAI8B,EACJ,KAAMc,EACN,KAAMiB,EACN,cAAe7D,EAAAA,EAAE,MAAMuB,CAAM,CAC/B,CAAC,EAGY8C,EAAiBH,EAAc,OAAO,CACjD,OAAQlE,EAAA,EAAE,MAAM,CAACA,IAAE,QAAQ,QAAQ,EAAGA,EAAE,EAAA,QAAQ,SAAS,CAAC,CAAC,CAC7D,CAAC,EAGYsE,GAAmBtE,IAAE,OAAO,CACvC,WAAYA,EAAAA,EAAE,MAAMqE,CAAc,EAClC,WAAYrE,EAAAA,EAAE,MAAMoE,CAAiB,CACvC,CAAC"}
1
+ {"version":3,"file":"index.js","sources":["../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":["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\nexport const ContentAbsoluteFile = z\n .object({\n type: z.literal('absolute-file'),\n file: z.string().startsWith('/').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 .startsWith('/')\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","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}\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';\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","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';\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 files: z.array(ManifestFileInfo)\n});\nexport type BlockPackManifest = z.infer<typeof BlockPackManifest>;\n\nexport const BlockPackManifestFile = 'manifest.json';\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});\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 { BlockPackId, BlockPackMetaEmbeddedBytes, SemVer } from '../block_meta';\nimport { 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 BlockPackOverview = z.object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer)\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"],"names":["ContentExplicitString","z","ContentExplicitBase64","ContentRelative","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","WorkflowV1","contentType","Workflow","BlockComponents","wfAndModel","ui","BlockComponentsDescriptionRaw","BlockComponentsAbsoluteUrl","BlockPackMeta","longString","binary","BlockPackMetaDescriptionRaw","BlockPackMetaEmbeddedBase64","BlockPackMetaEmbeddedBytes","BlockPackDescriptionFromPackageJsonRaw","CreateBlockPackDescriptionSchema","components","meta","BlockPackDescriptionRaw","BlockComponentsManifest","BlockPackMetaManifest","BlockPackDescriptionManifest","Sha256Schema","ManifestFileInfo","BlockPackManifest","BlockPackManifestFile","BlockPackDevV1","BlockPackDevV2","BlockPackFromRegistryV1","BlockPackFromRegistryV2","BlockPackSpec","LocalDevFolder","RemoteRegistryV1Spec","RemoteRegistryV2Spec","RegistrySpec","RegistryEntry","RegistryList","BlockPackOverview","RegistryStatus","BlockPackListing"],"mappings":"uGAMaA,EAAwBC,IAClC,OAAO,CACN,KAAMA,EAAAA,EAAE,QAAQ,iBAAiB,EACjC,QAASA,EAAAA,EAAE,SAAS,SAAS,qBAAqB,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