@milaboratories/pl-model-middle-layer 1.8.41 → 1.8.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/block_meta/block_components.cjs +4 -4
- package/dist/block_meta/block_components.cjs.map +1 -1
- package/dist/block_meta/block_components.d.ts +0 -1
- package/dist/block_meta/block_components.d.ts.map +1 -1
- package/dist/block_meta/block_components.js +4 -4
- package/dist/block_meta/block_components.js.map +1 -1
- package/dist/block_meta/block_description.cjs +2 -2
- package/dist/block_meta/block_description.cjs.map +1 -1
- package/dist/block_meta/block_description.d.ts +116 -115
- package/dist/block_meta/block_description.d.ts.map +1 -1
- package/dist/block_meta/block_description.js +2 -2
- package/dist/block_meta/block_description.js.map +1 -1
- package/dist/block_meta/block_id.cjs +1 -1
- package/dist/block_meta/block_id.cjs.map +1 -1
- package/dist/block_meta/block_id.js +1 -1
- package/dist/block_meta/block_id.js.map +1 -1
- package/dist/block_meta/block_manifest.cjs +2 -2
- package/dist/block_meta/block_manifest.cjs.map +1 -1
- package/dist/block_meta/block_manifest.d.ts +1 -1
- package/dist/block_meta/block_manifest.d.ts.map +1 -1
- package/dist/block_meta/block_manifest.js +2 -2
- package/dist/block_meta/block_manifest.js.map +1 -1
- package/dist/block_meta/block_meta.cjs +3 -3
- package/dist/block_meta/block_meta.cjs.map +1 -1
- package/dist/block_meta/block_meta.js +3 -3
- package/dist/block_meta/block_meta.js.map +1 -1
- package/dist/block_meta/content_conversion.cjs.map +1 -1
- package/dist/block_meta/content_conversion.d.ts +1 -1
- package/dist/block_meta/content_conversion.d.ts.map +1 -1
- package/dist/block_meta/content_conversion.js.map +1 -1
- package/dist/block_meta/content_types.cjs +23 -23
- package/dist/block_meta/content_types.cjs.map +1 -1
- package/dist/block_meta/content_types.js +23 -23
- package/dist/block_meta/content_types.js.map +1 -1
- package/dist/block_meta/semver.cjs.map +1 -1
- package/dist/block_meta/semver.js.map +1 -1
- package/dist/block_registry/block_pack_spec.cjs +5 -5
- package/dist/block_registry/block_pack_spec.cjs.map +1 -1
- package/dist/block_registry/block_pack_spec.js +5 -5
- package/dist/block_registry/block_pack_spec.js.map +1 -1
- package/dist/block_registry/overview.cjs +6 -6
- package/dist/block_registry/overview.cjs.map +1 -1
- package/dist/block_registry/overview.d.ts.map +1 -1
- package/dist/block_registry/overview.js +6 -6
- package/dist/block_registry/overview.js.map +1 -1
- package/dist/block_registry/registry_spec.cjs +5 -5
- package/dist/block_registry/registry_spec.cjs.map +1 -1
- package/dist/block_registry/registry_spec.js +5 -5
- package/dist/block_registry/registry_spec.js.map +1 -1
- package/dist/block_state.d.ts +2 -2
- package/dist/block_state.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_factory.cjs.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts +2 -2
- package/dist/pframe/internal_api/api_factory.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_factory.js.map +1 -1
- package/dist/pframe/internal_api/api_read.d.ts +34 -6
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
- package/dist/pframe/internal_api/common.d.ts +3 -1
- package/dist/pframe/internal_api/common.d.ts.map +1 -1
- package/dist/pframe/internal_api/create_table.d.ts +2 -2
- package/dist/pframe/internal_api/create_table.d.ts.map +1 -1
- package/dist/pframe/internal_api/delete_column.d.ts +1 -1
- package/dist/pframe/internal_api/delete_column.d.ts.map +1 -1
- package/dist/pframe/internal_api/find_columns.d.ts +2 -2
- package/dist/pframe/internal_api/find_columns.d.ts.map +1 -1
- package/dist/pframe/internal_api/http_helpers.cjs.map +1 -1
- package/dist/pframe/internal_api/http_helpers.d.ts +27 -27
- package/dist/pframe/internal_api/http_helpers.d.ts.map +1 -1
- package/dist/pframe/internal_api/http_helpers.js.map +1 -1
- package/dist/pframe/internal_api/pframe.d.ts +28 -1
- package/dist/pframe/internal_api/pframe.d.ts.map +1 -1
- package/dist/pframe/internal_api/table.d.ts +55 -2
- package/dist/pframe/internal_api/table.d.ts.map +1 -1
- package/dist/project_list.d.ts +1 -1
- package/dist/project_list.d.ts.map +1 -1
- package/dist/project_overview.d.ts +5 -5
- package/dist/project_overview.d.ts.map +1 -1
- package/dist/update_info.d.ts +1 -1
- package/dist/update_info.d.ts.map +1 -1
- package/package.json +7 -4
- package/src/block_meta/block_components.ts +6 -8
- package/src/block_meta/block_description.ts +8 -7
- package/src/block_meta/block_id.ts +4 -4
- package/src/block_meta/block_manifest.ts +5 -5
- package/src/block_meta/block_meta.ts +8 -8
- package/src/block_meta/content_conversion.ts +4 -4
- package/src/block_meta/content_types.ts +24 -24
- package/src/block_meta/semver.ts +1 -1
- package/src/block_registry/block_pack_spec.ts +5 -5
- package/src/block_registry/overview.ts +10 -9
- package/src/block_registry/registry_spec.ts +5 -5
- package/src/block_state.ts +3 -3
- package/src/pframe/internal_api/api_factory.ts +3 -6
- package/src/pframe/internal_api/api_read.ts +49 -8
- package/src/pframe/internal_api/common.ts +11 -2
- package/src/pframe/internal_api/create_table.ts +3 -3
- package/src/pframe/internal_api/delete_column.ts +1 -1
- package/src/pframe/internal_api/find_columns.ts +2 -2
- package/src/pframe/internal_api/http_helpers.ts +44 -44
- package/src/pframe/internal_api/pframe.ts +36 -2
- package/src/pframe/internal_api/table.ts +75 -7
- package/src/project_list.ts +1 -1
- package/src/project_overview.ts +5 -5
- package/src/update_info.ts +1 -1
|
@@ -6,7 +6,7 @@ import { z } from 'zod';
|
|
|
6
6
|
const ContentExplicitString = z
|
|
7
7
|
.object({
|
|
8
8
|
type: z.literal('explicit-string'),
|
|
9
|
-
content: z.string().describe('Actual string value')
|
|
9
|
+
content: z.string().describe('Actual string value'),
|
|
10
10
|
})
|
|
11
11
|
.strict();
|
|
12
12
|
const ContentExplicitBase64 = z
|
|
@@ -16,7 +16,7 @@ const ContentExplicitBase64 = z
|
|
|
16
16
|
.string()
|
|
17
17
|
.regex(/\w+\/[-+.\w]+/)
|
|
18
18
|
.describe('MIME type to interpret content'),
|
|
19
|
-
content: z.string().base64().describe('Base64 encoded binary value')
|
|
19
|
+
content: z.string().base64().describe('Base64 encoded binary value'),
|
|
20
20
|
})
|
|
21
21
|
.strict();
|
|
22
22
|
const ContentRelative = z
|
|
@@ -24,7 +24,7 @@ const ContentRelative = z
|
|
|
24
24
|
type: z.literal('relative'),
|
|
25
25
|
path: z
|
|
26
26
|
.string()
|
|
27
|
-
.describe('Address of the file, in most cases relative to the file which this structure is a part of')
|
|
27
|
+
.describe('Address of the file, in most cases relative to the file which this structure is a part of'),
|
|
28
28
|
})
|
|
29
29
|
.strict();
|
|
30
30
|
const absPathRegex = new RegExp(`^(/|[A-Z]:\\\\)`);
|
|
@@ -34,13 +34,13 @@ const ContentAbsoluteFile = z
|
|
|
34
34
|
file: z
|
|
35
35
|
.string()
|
|
36
36
|
.regex(absPathRegex, 'path to file must be absolute')
|
|
37
|
-
.describe('Absolute address of the file in local file system')
|
|
37
|
+
.describe('Absolute address of the file in local file system'),
|
|
38
38
|
})
|
|
39
39
|
.strict();
|
|
40
40
|
const ContentAbsoluteUrl = z
|
|
41
41
|
.object({
|
|
42
42
|
type: z.literal('absolute-url'),
|
|
43
|
-
url: z.string().url().describe('Global URL to reach the requested file')
|
|
43
|
+
url: z.string().url().describe('Global URL to reach the requested file'),
|
|
44
44
|
})
|
|
45
45
|
.strict();
|
|
46
46
|
//
|
|
@@ -53,7 +53,7 @@ const ContentExplicitBytes = z
|
|
|
53
53
|
.string()
|
|
54
54
|
.regex(/\w+\/[-+.\w]+/)
|
|
55
55
|
.describe('MIME type to interpret content'),
|
|
56
|
-
content: z.instanceof(Uint8Array).describe('Raw content')
|
|
56
|
+
content: z.instanceof(Uint8Array).describe('Raw content'),
|
|
57
57
|
})
|
|
58
58
|
.strict();
|
|
59
59
|
const ContentAbsoluteFolder = z
|
|
@@ -62,7 +62,7 @@ const ContentAbsoluteFolder = z
|
|
|
62
62
|
folder: z
|
|
63
63
|
.string()
|
|
64
64
|
.regex(absPathRegex, 'path to folder must be absolute')
|
|
65
|
-
.describe('Absolute address of the folder in local file system')
|
|
65
|
+
.describe('Absolute address of the folder in local file system'),
|
|
66
66
|
})
|
|
67
67
|
.strict();
|
|
68
68
|
//
|
|
@@ -73,24 +73,24 @@ const ContentAny = z.discriminatedUnion('type', [
|
|
|
73
73
|
ContentExplicitBase64,
|
|
74
74
|
ContentRelative,
|
|
75
75
|
ContentAbsoluteFile,
|
|
76
|
-
ContentAbsoluteUrl
|
|
76
|
+
ContentAbsoluteUrl,
|
|
77
77
|
]);
|
|
78
78
|
const ContentExplicitOrRelative = z.discriminatedUnion('type', [
|
|
79
79
|
ContentExplicitString,
|
|
80
80
|
ContentExplicitBase64,
|
|
81
|
-
ContentRelative
|
|
81
|
+
ContentRelative,
|
|
82
82
|
]);
|
|
83
83
|
const ContentAnyLocal = z.discriminatedUnion('type', [
|
|
84
84
|
ContentExplicitString,
|
|
85
85
|
ContentExplicitBase64,
|
|
86
86
|
ContentRelative,
|
|
87
|
-
ContentAbsoluteFile
|
|
87
|
+
ContentAbsoluteFile,
|
|
88
88
|
]);
|
|
89
89
|
const ContentAnyRemote = z.discriminatedUnion('type', [
|
|
90
90
|
ContentExplicitString,
|
|
91
91
|
ContentExplicitBase64,
|
|
92
92
|
ContentRelative,
|
|
93
|
-
ContentAbsoluteUrl
|
|
93
|
+
ContentAbsoluteUrl,
|
|
94
94
|
]);
|
|
95
95
|
//
|
|
96
96
|
// Narrow types with relative option
|
|
@@ -104,7 +104,7 @@ const ContentAnyRemote = z.discriminatedUnion('type', [
|
|
|
104
104
|
const ContentAnyBinaryLocal = z.discriminatedUnion('type', [
|
|
105
105
|
ContentExplicitBase64,
|
|
106
106
|
ContentRelative,
|
|
107
|
-
ContentAbsoluteFile
|
|
107
|
+
ContentAbsoluteFile,
|
|
108
108
|
]);
|
|
109
109
|
// export const ContentAnyTextRemote = z.discriminatedUnion('type', [
|
|
110
110
|
// ContentExplicitString,
|
|
@@ -115,37 +115,37 @@ const ContentAnyBinaryLocal = z.discriminatedUnion('type', [
|
|
|
115
115
|
const ContentAnyTextLocal = z.discriminatedUnion('type', [
|
|
116
116
|
ContentExplicitString,
|
|
117
117
|
ContentRelative,
|
|
118
|
-
ContentAbsoluteFile
|
|
118
|
+
ContentAbsoluteFile,
|
|
119
119
|
]);
|
|
120
120
|
//
|
|
121
121
|
// Narrow absolute types
|
|
122
122
|
//
|
|
123
123
|
const ContentAbsoluteBinaryRemote = z.discriminatedUnion('type', [
|
|
124
124
|
ContentExplicitBase64,
|
|
125
|
-
ContentAbsoluteUrl
|
|
125
|
+
ContentAbsoluteUrl,
|
|
126
126
|
]);
|
|
127
127
|
const ContentAbsoluteBinaryLocal = z.discriminatedUnion('type', [
|
|
128
128
|
ContentExplicitBase64,
|
|
129
|
-
ContentAbsoluteFile
|
|
129
|
+
ContentAbsoluteFile,
|
|
130
130
|
]);
|
|
131
131
|
const ContentAbsoluteTextRemote = z.discriminatedUnion('type', [
|
|
132
132
|
ContentExplicitString,
|
|
133
|
-
ContentAbsoluteUrl
|
|
133
|
+
ContentAbsoluteUrl,
|
|
134
134
|
]);
|
|
135
135
|
const ContentAbsoluteTextLocal = z.discriminatedUnion('type', [
|
|
136
136
|
ContentExplicitString,
|
|
137
|
-
ContentAbsoluteFile
|
|
137
|
+
ContentAbsoluteFile,
|
|
138
138
|
]);
|
|
139
139
|
//
|
|
140
140
|
// Narrow relative types
|
|
141
141
|
//
|
|
142
142
|
const ContentRelativeBinary = z.discriminatedUnion('type', [
|
|
143
143
|
ContentExplicitBase64,
|
|
144
|
-
ContentRelative
|
|
144
|
+
ContentRelative,
|
|
145
145
|
]);
|
|
146
146
|
const ContentRelativeText = z.discriminatedUnion('type', [
|
|
147
147
|
ContentExplicitString,
|
|
148
|
-
ContentRelative
|
|
148
|
+
ContentRelative,
|
|
149
149
|
]);
|
|
150
150
|
// export function ConstructContent(
|
|
151
151
|
// contentType: 'text',
|
|
@@ -184,17 +184,17 @@ const DescriptionContentBinary = z.union([
|
|
|
184
184
|
z
|
|
185
185
|
.string()
|
|
186
186
|
.startsWith('file:')
|
|
187
|
-
.transform((value
|
|
188
|
-
ContentAnyBinaryLocal
|
|
187
|
+
.transform((value) => ({ type: 'relative', path: value.slice(5) })),
|
|
188
|
+
ContentAnyBinaryLocal,
|
|
189
189
|
]);
|
|
190
190
|
const DescriptionContentText = z.union([
|
|
191
|
-
z.string().transform((value
|
|
191
|
+
z.string().transform((value) => {
|
|
192
192
|
if (value.startsWith('file:'))
|
|
193
193
|
return { type: 'relative', path: value.slice(5) };
|
|
194
194
|
else
|
|
195
195
|
return { type: 'explicit-string', content: value };
|
|
196
196
|
}),
|
|
197
|
-
ContentAnyTextLocal
|
|
197
|
+
ContentAnyTextLocal,
|
|
198
198
|
]);
|
|
199
199
|
|
|
200
200
|
export { ContentAbsoluteBinaryLocal, ContentAbsoluteBinaryRemote, ContentAbsoluteFile, ContentAbsoluteFolder, ContentAbsoluteTextLocal, ContentAbsoluteTextRemote, ContentAbsoluteUrl, ContentAny, ContentAnyBinaryLocal, ContentAnyLocal, ContentAnyRemote, ContentAnyTextLocal, ContentExplicitBase64, ContentExplicitBytes, ContentExplicitOrRelative, ContentExplicitString, ContentRelative, ContentRelativeBinary, ContentRelativeText, DescriptionContentBinary, DescriptionContentText };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content_types.js","sources":["../../src/block_meta/content_types.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\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 ContentA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AAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC;IAC5C,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAsB,CAAC,KAAK,EAAE,GAAG,KAAI;AACvD,QAAA,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC;AAAE,YAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;;YAC3E,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,KAAK,EAAE;AACzD,IAAA,CAAC,CAAC;IACF;AACD,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"content_types.js","sources":["../../src/block_meta/content_types.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\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) => ({ 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) => {\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"],"names":[],"mappings":";;AAEA;AACA;AACA;AAEO,MAAM,qBAAqB,GAAG;AAClC,KAAA,MAAM,CAAC;AACN,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;CACpD;AACA,KAAA,MAAM;AAGF,MAAM,qBAAqB,GAAG;AAClC,KAAA,MAAM,CAAC;AACN,IAAA,IAAI,EAAE,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EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;;YAC3E,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,KAAK,EAAE;AACzD,IAAA,CAAC,CAAC;IACF,mBAAmB;AACpB,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semver.cjs","sources":["../../src/block_meta/semver.ts"],"sourcesContent":["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'
|
|
1
|
+
{"version":3,"file":"semver.cjs","sources":["../../src/block_meta/semver.ts"],"sourcesContent":["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"],"names":["z"],"mappings":";;;;AAEA;AACA;AACO,MAAM,MAAM,GAAGA;AACnB,KAAA,MAAM;AACN,KAAA,KAAK,CACJ,qLAAqL,EACrL,+CAA+C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semver.js","sources":["../../src/block_meta/semver.ts"],"sourcesContent":["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'
|
|
1
|
+
{"version":3,"file":"semver.js","sources":["../../src/block_meta/semver.ts"],"sourcesContent":["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"],"names":[],"mappings":";;AAEA;AACA;AACO,MAAM,MAAM,GAAG;AACnB,KAAA,MAAM;AACN,KAAA,KAAK,CACJ,qLAAqL,EACrL,+CAA+C;;;;"}
|
|
@@ -14,13 +14,13 @@ require('../block_meta/block_manifest.cjs');
|
|
|
14
14
|
const BlockPackDevV1 = zod.z.object({
|
|
15
15
|
type: zod.z.literal('dev-v1'),
|
|
16
16
|
folder: zod.z.string(),
|
|
17
|
-
mtime: zod.z.string().optional()
|
|
17
|
+
mtime: zod.z.string().optional(),
|
|
18
18
|
});
|
|
19
19
|
/** Block pack from local folder, to be used during block development. New layout. */
|
|
20
20
|
const BlockPackDevV2 = zod.z.object({
|
|
21
21
|
type: zod.z.literal('dev-v2'),
|
|
22
22
|
folder: zod.z.string(),
|
|
23
|
-
mtime: zod.z.string().optional()
|
|
23
|
+
mtime: zod.z.string().optional(),
|
|
24
24
|
});
|
|
25
25
|
/**
|
|
26
26
|
* Block pack from registry with version 2 layout, to be loaded directly
|
|
@@ -30,7 +30,7 @@ const BlockPackDevV2 = zod.z.object({
|
|
|
30
30
|
const BlockPackFromRegistryV1 = zod.z.object({
|
|
31
31
|
type: zod.z.literal('from-registry-v1'),
|
|
32
32
|
registryUrl: zod.z.string(),
|
|
33
|
-
id: block_id.BlockPackId
|
|
33
|
+
id: block_id.BlockPackId,
|
|
34
34
|
});
|
|
35
35
|
/** Block pack from registry with version 2 layout, to be loaded directly
|
|
36
36
|
* from the client. */
|
|
@@ -38,14 +38,14 @@ const BlockPackFromRegistryV2 = zod.z.object({
|
|
|
38
38
|
type: zod.z.literal('from-registry-v2'),
|
|
39
39
|
registryUrl: zod.z.string(),
|
|
40
40
|
id: block_id.BlockPackId,
|
|
41
|
-
channel: zod.z.string().optional()
|
|
41
|
+
channel: zod.z.string().optional(),
|
|
42
42
|
});
|
|
43
43
|
/** Information about block origin, can be used to instantiate new blocks */
|
|
44
44
|
const BlockPackSpec = zod.z.discriminatedUnion('type', [
|
|
45
45
|
BlockPackDevV1,
|
|
46
46
|
BlockPackDevV2,
|
|
47
47
|
BlockPackFromRegistryV1,
|
|
48
|
-
BlockPackFromRegistryV2
|
|
48
|
+
BlockPackFromRegistryV2,
|
|
49
49
|
]);
|
|
50
50
|
|
|
51
51
|
exports.BlockPackDevV1 = BlockPackDevV1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_pack_spec.cjs","sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["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()
|
|
1
|
+
{"version":3,"file":"block_pack_spec.cjs","sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["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"],"names":["z","BlockPackId"],"mappings":";;;;;;;;;;;AAGA;AAC2B;AACpB,MAAM,cAAc,GAAGA,KAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACzB,IAAA,MAAM,EAAEA,KAAC,CAAC,MAAM,EAAE;AAClB,IAAA,KAAK,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC7B,CAAA;AAID;AACO,MAAM,cAAc,GAAGA,KAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACzB,IAAA,MAAM,EAAEA,KAAC,CAAC,MAAM,EAAE;AAClB,IAAA,KAAK,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC7B,CAAA;AAGD;;;;AAIK;AACE,MAAM,uBAAuB,GAAGA,KAAC,CAAC,MAAM,CAAC;AAC9C,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;AACnC,IAAA,WAAW,EAAEA,KAAC,CAAC,MAAM,EAAE;AACvB,IAAA,EAAE,EAAEC,oBAAW;AAChB,CAAA;AAID;AACsB;AACf,MAAM,uBAAuB,GAAGD,KAAC,CAAC,MAAM,CAAC;AAC9C,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;AACnC,IAAA,WAAW,EAAEA,KAAC,CAAC,MAAM,EAAE;AACvB,IAAA,EAAE,EAAEC,oBAAW;AACf,IAAA,OAAO,EAAED,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC/B,CAAA;AAGD;MACa,aAAa,GAAGA,KAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACxD,cAAc;IACd,cAAc;IACd,uBAAuB;IACvB,uBAAuB;AACxB,CAAA;;;;;;;;"}
|
|
@@ -12,13 +12,13 @@ import '../block_meta/block_manifest.js';
|
|
|
12
12
|
const BlockPackDevV1 = z.object({
|
|
13
13
|
type: z.literal('dev-v1'),
|
|
14
14
|
folder: z.string(),
|
|
15
|
-
mtime: z.string().optional()
|
|
15
|
+
mtime: z.string().optional(),
|
|
16
16
|
});
|
|
17
17
|
/** Block pack from local folder, to be used during block development. New layout. */
|
|
18
18
|
const BlockPackDevV2 = z.object({
|
|
19
19
|
type: z.literal('dev-v2'),
|
|
20
20
|
folder: z.string(),
|
|
21
|
-
mtime: z.string().optional()
|
|
21
|
+
mtime: z.string().optional(),
|
|
22
22
|
});
|
|
23
23
|
/**
|
|
24
24
|
* Block pack from registry with version 2 layout, to be loaded directly
|
|
@@ -28,7 +28,7 @@ const BlockPackDevV2 = z.object({
|
|
|
28
28
|
const BlockPackFromRegistryV1 = z.object({
|
|
29
29
|
type: z.literal('from-registry-v1'),
|
|
30
30
|
registryUrl: z.string(),
|
|
31
|
-
id: BlockPackId
|
|
31
|
+
id: BlockPackId,
|
|
32
32
|
});
|
|
33
33
|
/** Block pack from registry with version 2 layout, to be loaded directly
|
|
34
34
|
* from the client. */
|
|
@@ -36,14 +36,14 @@ const BlockPackFromRegistryV2 = z.object({
|
|
|
36
36
|
type: z.literal('from-registry-v2'),
|
|
37
37
|
registryUrl: z.string(),
|
|
38
38
|
id: BlockPackId,
|
|
39
|
-
channel: z.string().optional()
|
|
39
|
+
channel: z.string().optional(),
|
|
40
40
|
});
|
|
41
41
|
/** Information about block origin, can be used to instantiate new blocks */
|
|
42
42
|
const BlockPackSpec = z.discriminatedUnion('type', [
|
|
43
43
|
BlockPackDevV1,
|
|
44
44
|
BlockPackDevV2,
|
|
45
45
|
BlockPackFromRegistryV1,
|
|
46
|
-
BlockPackFromRegistryV2
|
|
46
|
+
BlockPackFromRegistryV2,
|
|
47
47
|
]);
|
|
48
48
|
|
|
49
49
|
export { BlockPackDevV1, BlockPackDevV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackSpec };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_pack_spec.js","sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["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()
|
|
1
|
+
{"version":3,"file":"block_pack_spec.js","sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["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"],"names":[],"mappings":";;;;;;;;;AAGA;AAC2B;AACpB,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACzB,IAAA,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;AAClB,IAAA,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC7B,CAAA;AAID;AACO,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACzB,IAAA,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;AAClB,IAAA,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC7B,CAAA;AAGD;;;;AAIK;AACE,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC9C,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;AACnC,IAAA,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;AACvB,IAAA,EAAE,EAAE,WAAW;AAChB,CAAA;AAID;AACsB;AACf,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC9C,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;AACnC,IAAA,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;AACvB,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC/B,CAAA;AAGD;MACa,aAAa,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACxD,cAAc;IACd,cAAc;IACd,uBAAuB;IACvB,uBAAuB;AACxB,CAAA;;;;"}
|
|
@@ -19,13 +19,13 @@ const BlockPackOverviewLegacy = zod.z.object({
|
|
|
19
19
|
id: block_id.BlockPackId,
|
|
20
20
|
meta: block_meta.BlockPackMetaEmbeddedBytes,
|
|
21
21
|
spec: block_pack_spec.BlockPackSpec,
|
|
22
|
-
otherVersions: zod.z.array(semver.SemVer)
|
|
22
|
+
otherVersions: zod.z.array(semver.SemVer),
|
|
23
23
|
}).passthrough();
|
|
24
24
|
const AnyChannel = 'any';
|
|
25
25
|
const StableChannel = 'stable';
|
|
26
26
|
const VersionWithChannels = zod.z.object({
|
|
27
27
|
version: semver.SemVer,
|
|
28
|
-
channels: zod.z.array(zod.z.string())
|
|
28
|
+
channels: zod.z.array(zod.z.string()),
|
|
29
29
|
}).passthrough();
|
|
30
30
|
/**
|
|
31
31
|
* Information about specific block pack version.
|
|
@@ -43,16 +43,16 @@ const BlockPackOverviewRaw = zod.z.object({
|
|
|
43
43
|
id: block_id.BlockPackIdNoVersion,
|
|
44
44
|
latestByChannel: zod.z.record(zod.z.string(), SingleBlockPackOverview),
|
|
45
45
|
allVersions: zod.z.array(VersionWithChannels),
|
|
46
|
-
registryId: zod.z.string()
|
|
46
|
+
registryId: zod.z.string(),
|
|
47
47
|
});
|
|
48
48
|
const BlockPackOverview = BlockPackOverviewRaw.passthrough();
|
|
49
49
|
const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({ registryId: true }).passthrough();
|
|
50
50
|
const RegistryStatus = registry_spec.RegistryEntry.extend({
|
|
51
|
-
status: zod.z.union([zod.z.literal('online'), zod.z.literal('offline')])
|
|
51
|
+
status: zod.z.union([zod.z.literal('online'), zod.z.literal('offline')]),
|
|
52
52
|
});
|
|
53
53
|
const BlockPackListing = zod.z.object({
|
|
54
54
|
registries: zod.z.array(RegistryStatus),
|
|
55
|
-
blockPacks: zod.z.array(BlockPackOverview)
|
|
55
|
+
blockPacks: zod.z.array(BlockPackOverview),
|
|
56
56
|
});
|
|
57
57
|
function blockPackOverviewToLegacy(bpo) {
|
|
58
58
|
const mainChannel = bpo.latestByChannel[StableChannel] !== undefined ? StableChannel : AnyChannel;
|
|
@@ -65,7 +65,7 @@ function blockPackOverviewToLegacy(bpo) {
|
|
|
65
65
|
otherVersions: bpo.allVersions
|
|
66
66
|
.filter((v) => v.channels.indexOf(mainChannel) >= 0)
|
|
67
67
|
.map((v) => v.version),
|
|
68
|
-
registryId: bpo.registryId
|
|
68
|
+
registryId: bpo.registryId,
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview.cjs","sources":["../../src/block_registry/overview.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n FeatureFlags,\n SemVer
|
|
1
|
+
{"version":3,"file":"overview.cjs","sources":["../../src/block_registry/overview.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n FeatureFlags,\n SemVer,\n} from '../block_meta';\nimport type { BlockPackFromRegistryV2 } from './block_pack_spec';\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 BlockPackOverviewLegacy = z.object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer),\n}).passthrough();\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}).passthrough();\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}).passthrough();\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 BlockPackOverviewRaw = z.object({\n id: BlockPackIdNoVersion,\n latestByChannel: z.record(z.string(), SingleBlockPackOverview),\n allVersions: z.array(VersionWithChannels),\n registryId: z.string(),\n});\nexport const BlockPackOverview = BlockPackOverviewRaw.passthrough();\nexport type BlockPackOverview = z.infer<typeof BlockPackOverview>;\n\nexport const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({ registryId: true }).passthrough();\nexport type BlockPackOverviewNoRegistryId = z.infer<typeof BlockPackOverviewNoRegistryId>;\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":["z","BlockPackId","BlockPackMetaEmbeddedBytes","BlockPackSpec","SemVer","FeatureFlags","BlockPackIdNoVersion","RegistryEntry"],"mappings":";;;;;;;;;;;;;AAYA;;AAEK;AACE,MAAM,uBAAuB,GAAGA,KAAC,CAAC,MAAM,CAAC;AAC9C,IAAA,UAAU,EAAEA,KAAC,CAAC,MAAM,EAAE;AACtB,IAAA,EAAE,EAAEC,oBAAW;AACf,IAAA,IAAI,EAAEC,qCAA0B;AAChC,IAAA,IAAI,EAAEC,6BAAa;AACnB,IAAA,aAAa,EAAEH,KAAC,CAAC,KAAK,CAACI,aAAM,CAAC;CAC/B,CAAC,CAAC,WAAW;AAGP,MAAM,UAAU,GAAG;AACnB,MAAM,aAAa,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yB,CAAC,GAAG,EAAE,iBAAiB,GAAG,uBAAuB,CAazF"}
|
|
@@ -17,13 +17,13 @@ const BlockPackOverviewLegacy = z.object({
|
|
|
17
17
|
id: BlockPackId,
|
|
18
18
|
meta: BlockPackMetaEmbeddedBytes,
|
|
19
19
|
spec: BlockPackSpec,
|
|
20
|
-
otherVersions: z.array(SemVer)
|
|
20
|
+
otherVersions: z.array(SemVer),
|
|
21
21
|
}).passthrough();
|
|
22
22
|
const AnyChannel = 'any';
|
|
23
23
|
const StableChannel = 'stable';
|
|
24
24
|
const VersionWithChannels = z.object({
|
|
25
25
|
version: SemVer,
|
|
26
|
-
channels: z.array(z.string())
|
|
26
|
+
channels: z.array(z.string()),
|
|
27
27
|
}).passthrough();
|
|
28
28
|
/**
|
|
29
29
|
* Information about specific block pack version.
|
|
@@ -41,16 +41,16 @@ const BlockPackOverviewRaw = z.object({
|
|
|
41
41
|
id: BlockPackIdNoVersion,
|
|
42
42
|
latestByChannel: z.record(z.string(), SingleBlockPackOverview),
|
|
43
43
|
allVersions: z.array(VersionWithChannels),
|
|
44
|
-
registryId: z.string()
|
|
44
|
+
registryId: z.string(),
|
|
45
45
|
});
|
|
46
46
|
const BlockPackOverview = BlockPackOverviewRaw.passthrough();
|
|
47
47
|
const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({ registryId: true }).passthrough();
|
|
48
48
|
const RegistryStatus = RegistryEntry.extend({
|
|
49
|
-
status: z.union([z.literal('online'), z.literal('offline')])
|
|
49
|
+
status: z.union([z.literal('online'), z.literal('offline')]),
|
|
50
50
|
});
|
|
51
51
|
const BlockPackListing = z.object({
|
|
52
52
|
registries: z.array(RegistryStatus),
|
|
53
|
-
blockPacks: z.array(BlockPackOverview)
|
|
53
|
+
blockPacks: z.array(BlockPackOverview),
|
|
54
54
|
});
|
|
55
55
|
function blockPackOverviewToLegacy(bpo) {
|
|
56
56
|
const mainChannel = bpo.latestByChannel[StableChannel] !== undefined ? StableChannel : AnyChannel;
|
|
@@ -63,7 +63,7 @@ function blockPackOverviewToLegacy(bpo) {
|
|
|
63
63
|
otherVersions: bpo.allVersions
|
|
64
64
|
.filter((v) => v.channels.indexOf(mainChannel) >= 0)
|
|
65
65
|
.map((v) => v.version),
|
|
66
|
-
registryId: bpo.registryId
|
|
66
|
+
registryId: bpo.registryId,
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview.js","sources":["../../src/block_registry/overview.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n FeatureFlags,\n SemVer
|
|
1
|
+
{"version":3,"file":"overview.js","sources":["../../src/block_registry/overview.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n FeatureFlags,\n SemVer,\n} from '../block_meta';\nimport type { BlockPackFromRegistryV2 } from './block_pack_spec';\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 BlockPackOverviewLegacy = z.object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer),\n}).passthrough();\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}).passthrough();\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}).passthrough();\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 BlockPackOverviewRaw = z.object({\n id: BlockPackIdNoVersion,\n latestByChannel: z.record(z.string(), SingleBlockPackOverview),\n allVersions: z.array(VersionWithChannels),\n registryId: z.string(),\n});\nexport const BlockPackOverview = BlockPackOverviewRaw.passthrough();\nexport type BlockPackOverview = z.infer<typeof BlockPackOverview>;\n\nexport const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({ registryId: true }).passthrough();\nexport type BlockPackOverviewNoRegistryId = z.infer<typeof BlockPackOverviewNoRegistryId>;\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":[],"mappings":";;;;;;;;;;;AAYA;;AAEK;AACE,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC9C,IAAA,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;AACtB,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,IAAI,EAAE,0BAA0B;AAChC,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;CAC/B,CAAC,CAAC,WAAW;AAGP,MAAM,U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AC,CAAC,KAAK,CAAC,iBAAiB,CAAC;AACvC,CAAA;AAGK,SAAU,yBAAyB,CAAC,GAAsB,EAAA;AAC9D,IAAA,MAAM,WAAW,GAAG,GAAG,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,SAAS,GAAG,aAAa,GAAG,UAAU;IACjG,MAAM,cAAc,GAAG,GAAG,CAAC,eAAe,CAAC,WAAW,CAAC;IACvD,OAAO;QACL,EAAE,EAAE,cAAc,CAAC,EAAE;QACrB,IAAI,EAAE,cAAc,CAAC,IAAI;;QAEzB,IAAI,EAAE,EAAE,GAAI,cAAc,CAAC,IAAgC,EAAE,OAAO,EAAE,aAAa,EAAE;QACrF,aAAa,EAAE,GAAG,CAAC;AAChB,aAAA,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;aAClD,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;QACxB,UAAU,EAAE,GAAG,CAAC,UAAU;KAC3B;AACH;;;;"}
|
|
@@ -4,26 +4,26 @@ var zod = require('zod');
|
|
|
4
4
|
|
|
5
5
|
const LocalDevFolder = zod.z.object({
|
|
6
6
|
type: zod.z.literal('local-dev'),
|
|
7
|
-
path: zod.z.string()
|
|
7
|
+
path: zod.z.string(),
|
|
8
8
|
});
|
|
9
9
|
/** @deprecated don't use */
|
|
10
10
|
const RemoteRegistryV1Spec = zod.z.object({
|
|
11
11
|
type: zod.z.literal('remote-v1'),
|
|
12
|
-
url: zod.z.string().url()
|
|
12
|
+
url: zod.z.string().url(),
|
|
13
13
|
});
|
|
14
14
|
const RemoteRegistryV2Spec = zod.z.object({
|
|
15
15
|
type: zod.z.literal('remote-v2'),
|
|
16
|
-
url: zod.z.string().url()
|
|
16
|
+
url: zod.z.string().url(),
|
|
17
17
|
});
|
|
18
18
|
const RegistrySpec = zod.z.discriminatedUnion('type', [
|
|
19
19
|
RemoteRegistryV1Spec,
|
|
20
20
|
RemoteRegistryV2Spec,
|
|
21
|
-
LocalDevFolder
|
|
21
|
+
LocalDevFolder,
|
|
22
22
|
]);
|
|
23
23
|
const RegistryEntry = zod.z.object({
|
|
24
24
|
id: zod.z.string(),
|
|
25
25
|
title: zod.z.string().optional(),
|
|
26
|
-
spec: RegistrySpec
|
|
26
|
+
spec: RegistrySpec,
|
|
27
27
|
});
|
|
28
28
|
const RegistryList = zod.z.array(RegistryEntry);
|
|
29
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry_spec.cjs","sources":["../../src/block_registry/registry_spec.ts"],"sourcesContent":["import { z } from 'zod';\n\nexport const LocalDevFolder = z.object({\n type: z.literal('local-dev'),\n path: z.string()
|
|
1
|
+
{"version":3,"file":"registry_spec.cjs","sources":["../../src/block_registry/registry_spec.ts"],"sourcesContent":["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"],"names":["z"],"mappings":";;;;AAEO,MAAM,cAAc,GAAGA,KAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,IAAI,EAAEA,KAAC,CAAC,MAAM,EAAE;AACjB,CAAA;AAGD;AACO,MAAM,oBAAoB,GAAGA,KAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,GAAG,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,CAAA;AAIM,MAAM,oBAAoB,GAAGA,KAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,GAAG,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,CAAA;MAGY,YAAY,GAAGA,KAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACvD,oBAAoB;IACpB,oBAAoB;IACpB,cAAc;AACf,CAAA;AAGM,MAAM,aAAa,GAAGA,KAAC,CAAC,MAAM,CAAC;AACpC,IAAA,EAAE,EAAEA,KAAC,CAAC,MAAM,EAAE;AACd,IAAA,KAAK,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC5B,IAAA,IAAI,EAAE,YAAY;AACnB,CAAA;AAGM,MAAM,YAAY,GAAGA,KAAC,CAAC,KAAK,CAAC,aAAa;;;;;;;;;"}
|