@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_description.d.ts","sourceRoot":"","sources":["../../src/block_meta/block_description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"block_description.d.ts","sourceRoot":"","sources":["../../src/block_meta/block_description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,KAAK,EAAE,0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;;;;;;;;;;;;;;;;;;;8BAGnC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,wBAAgB,0BAA0B,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,WAAW,CAAA;CAAE,EACtE,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,MAAM,GACjB,CAAC,CAEH"}
|
|
@@ -9,7 +9,7 @@ import * as R from 'remeda';
|
|
|
9
9
|
* strings are converted to explicit content type. */
|
|
10
10
|
const BlockPackDescriptionFromPackageJsonRaw = z.object({
|
|
11
11
|
components: BlockComponentsDescriptionRaw,
|
|
12
|
-
meta: BlockPackMetaDescriptionRaw
|
|
12
|
+
meta: BlockPackMetaDescriptionRaw,
|
|
13
13
|
});
|
|
14
14
|
const FeatureFlags = z.record(z.string(), z.union([z.boolean(), z.number()]))
|
|
15
15
|
.transform((flags) => flags);
|
|
@@ -18,7 +18,7 @@ function CreateBlockPackDescriptionSchema(components, meta) {
|
|
|
18
18
|
id: BlockPackId,
|
|
19
19
|
components,
|
|
20
20
|
meta,
|
|
21
|
-
featureFlags: FeatureFlags.optional()
|
|
21
|
+
featureFlags: FeatureFlags.optional(),
|
|
22
22
|
}).passthrough();
|
|
23
23
|
}
|
|
24
24
|
const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(BlockComponentsDescriptionRaw, BlockPackMetaDescriptionRaw);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_description.js","sources":["../../src/block_meta/block_description.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"block_description.js","sources":["../../src/block_meta/block_description.ts"],"sourcesContent":["import type { ZodTypeAny } from 'zod';\nimport { z } from 'zod';\nimport { BlockComponentsDescriptionRaw } from './block_components';\nimport { BlockPackMetaDescriptionRaw } from './block_meta';\nimport { BlockPackId } from './block_id';\nimport * as R from 'remeda';\nimport type { BlockCodeKnownFeatureFlags } from '@milaboratories/pl-model-common';\n\n/** Description, as appears in root block package.json file,\n * `file:` references are parsed into relative content of corresponding type, depending on the context,\n * strings are converted to explicit content type. */\nexport const BlockPackDescriptionFromPackageJsonRaw = z.object({\n components: BlockComponentsDescriptionRaw,\n meta: BlockPackMetaDescriptionRaw,\n});\n\nexport const FeatureFlags = z.record(z.string(), z.union([z.boolean(), z.number()]))\n .transform((flags) => flags as BlockCodeKnownFeatureFlags);\n\nexport function CreateBlockPackDescriptionSchema<\n Components extends ZodTypeAny,\n Meta extends ZodTypeAny,\n>(components: Components, meta: Meta) {\n return z.object({\n id: BlockPackId,\n components,\n meta,\n featureFlags: FeatureFlags.optional(),\n }).passthrough();\n}\n\nexport const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(\n BlockComponentsDescriptionRaw,\n BlockPackMetaDescriptionRaw,\n);\nexport type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;\n\nexport function overrideDescriptionVersion<T extends { id: BlockPackId }>(\n manifest: T,\n newVersion: string,\n): T {\n return R.mergeDeep(manifest, { id: { version: newVersion } }) as T;\n}\n"],"names":[],"mappings":";;;;;;AAQA;;AAEqD;AAC9C,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;AAC7D,IAAA,UAAU,EAAE,6BAA6B;AACzC,IAAA,IAAI,EAAE,2BAA2B;AAClC,CAAA;AAEM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;KAChF,SAAS,CAAC,CAAC,KAAK,KAAK,KAAmC;AAErD,SAAU,gCAAgC,CAG9C,UAAsB,EAAE,IAAU,EAAA;IAClC,OAAO,CAAC,CAAC,MAAM,CAAC;AACd,QAAA,EAAE,EAAE,WAAW;QACf,UAAU;QACV,IAAI;AACJ,QAAA,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE;KACtC,CAAC,CAAC,WAAW,EAAE;AAClB;AAEO,MAAM,uBAAuB,GAAG,gCAAgC,CACrE,6BAA6B,EAC7B,2BAA2B;AAIvB,SAAU,0BAA0B,CACxC,QAAW,EACX,UAAkB,EAAA;AAElB,IAAA,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,CAAM;AACpE;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_id.cjs","sources":["../../src/block_meta/block_id.ts"],"sourcesContent":["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
|
|
1
|
+
{"version":3,"file":"block_id.cjs","sources":["../../src/block_meta/block_id.ts"],"sourcesContent":["import { z } from 'zod';\nimport { SemVer } from './semver';\n\n/** Global identifier of the block */\nexport const BlockPackId = z\n .object({\n organization: z.string(),\n name: z.string(),\n version: SemVer,\n })\n .strict();\nexport type BlockPackId = z.infer<typeof BlockPackId>;\n\nexport const BlockPackIdNoVersion = BlockPackId.omit({ version: true });\nexport type BlockPackIdNoVersion = z.infer<typeof BlockPackIdNoVersion>;\n\nexport function blockPackIdToString(bp: BlockPackId): string;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}:${bp.version}`;\n}\n\nexport function blockPackIdNoVersionToString(bp: BlockPackIdNoVersion): string;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined\n): string | undefined;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined,\n): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}`;\n}\n\nexport function blockPackIdEquals(\n bp1: BlockPackId | undefined,\n bp2: BlockPackId | undefined,\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return (\n bp1.name === bp2.name && bp1.organization === bp2.organization && bp1.version === bp2.version\n );\n}\n\nexport function blockPackIdNoVersionEquals(\n bp1: BlockPackIdNoVersion | undefined,\n bp2: BlockPackIdNoVersion | undefined,\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return bp1.name === bp2.name && bp1.organization === bp2.organization;\n}\n"],"names":["z","SemVer"],"mappings":";;;;;AAGA;AACO,MAAM,WAAW,GAAGA;AACxB,KAAA,MAAM,CAAC;AACN,IAAA,YAAY,EAAEA,KAAC,CAAC,MAAM,EAAE;AACxB,IAAA,IAAI,EAAEA,KAAC,CAAC,MAAM,EAAE;AAChB,IAAA,OAAO,EAAEC,aAAM;CAChB;AACA,KAAA,MAAM;AAGF,MAAM,oBAAoB,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AAKhE,SAAU,mBAAmB,CAAC,EAA2B,EAAA;IAC7D,IAAI,EAAE,KAAK,SAAS;AAAE,QAAA,OAAO,SAAS;AACtC,IAAA,OAAO,CAAA,EAAG,EAAE,CAAC,YAAY,CAAA,CAAA,EAAI,EAAE,CAAC,IAAI,CAAA,CAAA,EAAI,EAAE,CAAC,OAAO,EAAE;AACtD;AAMM,SAAU,4BAA4B,CAC1C,EAAoC,EAAA;IAEpC,IAAI,EAAE,KAAK,SAAS;AAAE,QAAA,OAAO,SAAS;IACtC,OAAO,CAAA,EAAG,EAAE,CAAC,YAAY,IAAI,EAAE,CAAC,IAAI,CAAA,CAAE;AACxC;AAEM,SAAU,iBAAiB,CAC/B,GAA4B,EAC5B,GAA4B,EAAA;AAE5B,IAAA,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;AAAE,QAAA,OAAO,IAAI;AACvD,IAAA,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;AAAE,QAAA,OAAO,KAAK;IACxD,QACE,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,OAAO,KAAK,GAAG,CAAC,OAAO;AAEjG;AAEM,SAAU,0BAA0B,CACxC,GAAqC,EACrC,GAAqC,EAAA;AAErC,IAAA,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;AAAE,QAAA,OAAO,IAAI;AACvD,IAAA,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;AAAE,QAAA,OAAO,KAAK;AACxD,IAAA,OAAO,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY;AACvE;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_id.js","sources":["../../src/block_meta/block_id.ts"],"sourcesContent":["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
|
|
1
|
+
{"version":3,"file":"block_id.js","sources":["../../src/block_meta/block_id.ts"],"sourcesContent":["import { z } from 'zod';\nimport { SemVer } from './semver';\n\n/** Global identifier of the block */\nexport const BlockPackId = z\n .object({\n organization: z.string(),\n name: z.string(),\n version: SemVer,\n })\n .strict();\nexport type BlockPackId = z.infer<typeof BlockPackId>;\n\nexport const BlockPackIdNoVersion = BlockPackId.omit({ version: true });\nexport type BlockPackIdNoVersion = z.infer<typeof BlockPackIdNoVersion>;\n\nexport function blockPackIdToString(bp: BlockPackId): string;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined;\nexport function blockPackIdToString(bp: BlockPackId | undefined): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}:${bp.version}`;\n}\n\nexport function blockPackIdNoVersionToString(bp: BlockPackIdNoVersion): string;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined\n): string | undefined;\nexport function blockPackIdNoVersionToString(\n bp: BlockPackIdNoVersion | undefined,\n): string | undefined {\n if (bp === undefined) return undefined;\n return `${bp.organization}:${bp.name}`;\n}\n\nexport function blockPackIdEquals(\n bp1: BlockPackId | undefined,\n bp2: BlockPackId | undefined,\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return (\n bp1.name === bp2.name && bp1.organization === bp2.organization && bp1.version === bp2.version\n );\n}\n\nexport function blockPackIdNoVersionEquals(\n bp1: BlockPackIdNoVersion | undefined,\n bp2: BlockPackIdNoVersion | undefined,\n): boolean {\n if (bp1 === undefined && bp2 === undefined) return true;\n if (bp1 === undefined || bp2 === undefined) return false;\n return bp1.name === bp2.name && bp1.organization === bp2.organization;\n}\n"],"names":[],"mappings":";;;AAGA;AACO,MAAM,WAAW,GAAG;AACxB,KAAA,MAAM,CAAC;AACN,IAAA,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;AACxB,IAAA,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;AAChB,IAAA,OAAO,EAAE,MAAM;CAChB;AACA,KAAA,MAAM;AAGF,MAAM,oBAAoB,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AAKhE,SAAU,mBAAmB,CAAC,EAA2B,EAAA;IAC7D,IAAI,EAAE,KAAK,SAAS;AAAE,QAAA,OAAO,SAAS;AACtC,IAAA,OAAO,CAAA,EAAG,EAAE,CAAC,YAAY,CAAA,CAAA,EAAI,EAAE,CAAC,IAAI,CAAA,CAAA,EAAI,EAAE,CAAC,OAAO,EAAE;AACtD;AAMM,SAAU,4BAA4B,CAC1C,EAAoC,EAAA;IAEpC,IAAI,EAAE,KAAK,SAAS;AAAE,QAAA,OAAO,SAAS;IACtC,OAAO,CAAA,EAAG,EAAE,CAAC,YAAY,IAAI,EAAE,CAAC,IAAI,CAAA,CAAE;AACxC;AAEM,SAAU,iBAAiB,CAC/B,GAA4B,EAC5B,GAA4B,EAAA;AAE5B,IAAA,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;AAAE,QAAA,OAAO,IAAI;AACvD,IAAA,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;AAAE,QAAA,OAAO,KAAK;IACxD,QACE,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,OAAO,KAAK,GAAG,CAAC,OAAO;AAEjG;AAEM,SAAU,0BAA0B,CACxC,GAAqC,EACrC,GAAqC,EAAA;AAErC,IAAA,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;AAAE,QAAA,OAAO,IAAI;AACvD,IAAA,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;AAAE,QAAA,OAAO,KAAK;AACxD,IAAA,OAAO,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY;AACvE;;;;"}
|
|
@@ -38,13 +38,13 @@ const Sha256Schema = zod.z
|
|
|
38
38
|
const ManifestFileInfo = zod.z.object({
|
|
39
39
|
name: zod.z.string(),
|
|
40
40
|
size: zod.z.number().int(),
|
|
41
|
-
sha256: Sha256Schema
|
|
41
|
+
sha256: Sha256Schema,
|
|
42
42
|
});
|
|
43
43
|
const BlockPackManifest = zod.z.object({
|
|
44
44
|
schema: zod.z.literal('v2'),
|
|
45
45
|
description: BlockPackDescriptionManifest,
|
|
46
46
|
timestamp: zod.z.number().optional(),
|
|
47
|
-
files: zod.z.array(ManifestFileInfo)
|
|
47
|
+
files: zod.z.array(ManifestFileInfo),
|
|
48
48
|
}).passthrough();
|
|
49
49
|
const BlockPackManifestFile = 'manifest.json';
|
|
50
50
|
function overrideManifestVersion(manifest, newVersion) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_manifest.cjs","sources":["../../src/block_meta/block_manifest.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BlockComponents } from './block_components';\nimport { ContentRelative, ContentRelativeBinary, ContentRelativeText } from './content_types';\nimport { CreateBlockPackDescriptionSchema } from './block_description';\nimport { BlockPackMeta } from './block_meta';\nimport * as R from 'remeda';\nimport { BlockPackId } from './block_id';\n\nexport const BlockComponentsManifest = BlockComponents(ContentRelative, ContentRelative);\nexport type BlockComponentsManifest = z.infer<typeof BlockComponentsManifest>;\n\nexport const BlockPackMetaManifest = BlockPackMeta(ContentRelativeText, ContentRelativeBinary);\nexport type BlockPackMetaManifest = z.infer<typeof BlockPackMetaManifest>;\n\n/** Block description to be used in block manifest */\nexport const BlockPackDescriptionManifest = CreateBlockPackDescriptionSchema(\n BlockComponentsManifest,\n BlockPackMetaManifest
|
|
1
|
+
{"version":3,"file":"block_manifest.cjs","sources":["../../src/block_meta/block_manifest.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BlockComponents } from './block_components';\nimport { ContentRelative, ContentRelativeBinary, ContentRelativeText } from './content_types';\nimport { CreateBlockPackDescriptionSchema } from './block_description';\nimport { BlockPackMeta } from './block_meta';\nimport * as R from 'remeda';\nimport type { BlockPackId } from './block_id';\n\nexport const BlockComponentsManifest = BlockComponents(ContentRelative, ContentRelative);\nexport type BlockComponentsManifest = z.infer<typeof BlockComponentsManifest>;\n\nexport const BlockPackMetaManifest = BlockPackMeta(ContentRelativeText, ContentRelativeBinary);\nexport type BlockPackMetaManifest = z.infer<typeof BlockPackMetaManifest>;\n\n/** Block description to be used in block manifest */\nexport const BlockPackDescriptionManifest = CreateBlockPackDescriptionSchema(\n BlockComponentsManifest,\n BlockPackMetaManifest,\n);\nexport type BlockPackDescriptionManifest = z.infer<typeof BlockPackDescriptionManifest>;\n\nexport const Sha256Schema = z\n .string()\n .regex(/[0-9a-fA-F]/)\n .toUpperCase()\n .length(64); // 256 / 4 (bits per hex register);\n\nexport const ManifestFileInfo = z.object({\n name: z.string(),\n size: z.number().int(),\n sha256: Sha256Schema,\n});\nexport type ManifestFileInfo = z.infer<typeof ManifestFileInfo>;\n\nexport const BlockPackManifest = z.object({\n schema: z.literal('v2'),\n description: BlockPackDescriptionManifest,\n timestamp: z.number().optional(),\n files: z.array(ManifestFileInfo),\n}).passthrough();\nexport type BlockPackManifest = z.infer<typeof BlockPackManifest>;\n\nexport const BlockPackManifestFile = 'manifest.json';\n\nexport function overrideManifestVersion<T extends { description: { id: BlockPackId } }>(\n manifest: T,\n newVersion: string,\n): T {\n return R.mergeDeep(manifest, { description: { id: { version: newVersion } } }) as T;\n}\n"],"names":["BlockComponents","ContentRelative","BlockPackMeta","ContentRelativeText","ContentRelativeBinary","CreateBlockPackDescriptionSchema","z","R"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,MAAM,uBAAuB,GAAGA,gCAAe,CAACC,6BAAe,EAAEA,6BAAe;AAGhF,MAAM,qBAAqB,GAAGC,wBAAa,CAACC,iCAAmB,EAAEC,mCAAqB;AAG7F;AACO,MAAM,4BAA4B,GAAGC,kDAAgC,CAC1E,uBAAuB,EACvB,qBAAqB;AAIhB,MAAM,YAAY,GAAGC;AACzB,KAAA,MAAM;KACN,KAAK,CAAC,aAAa;AACnB,KAAA,WAAW;AACX,KAAA,MAAM,CAAC,EAAE,EAAE;AAEP,MAAM,gBAAgB,GAAGA,KAAC,CAAC,MAAM,CAAC;AACvC,IAAA,IAAI,EAAEA,KAAC,CAAC,MAAM,EAAE;AAChB,IAAA,IAAI,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,IAAA,MAAM,EAAE,YAAY;AACrB,CAAA;AAGM,MAAM,iBAAiB,GAAGA,KAAC,CAAC,MAAM,CAAC;AACxC,IAAA,MAAM,EAAEA,KAAC,CAAC,OAAO,CAAC,IAAI,CAAC;AACvB,IAAA,WAAW,EAAE,4BAA4B;AACzC,IAAA,SAAS,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAChC,IAAA,KAAK,EAAEA,KAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;CACjC,CAAC,CAAC,WAAW;AAGP,MAAM,qBAAqB,GAAG;AAE/B,SAAU,uBAAuB,CACrC,QAAW,EACX,UAAkB,EAAA;IAElB,OAAOC,YAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAM;AACrF;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { BlockPackId } from './block_id';
|
|
2
|
+
import type { BlockPackId } from './block_id';
|
|
3
3
|
export declare const BlockComponentsManifest: z.ZodObject<{
|
|
4
4
|
workflow: z.ZodUnion<[z.ZodPipeline<z.ZodEffects<z.ZodObject<{
|
|
5
5
|
type: z.ZodLiteral<"relative">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_manifest.d.ts","sourceRoot":"","sources":["../../src/block_meta/block_manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"block_manifest.d.ts","sourceRoot":"","sources":["../../src/block_meta/block_manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAKd,CAAC;AACjB,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,qBAAqB,kBAAkB,CAAC;AAErD,wBAAgB,uBAAuB,CAAC,CAAC,SAAS;IAAE,WAAW,EAAE;QAAE,EAAE,EAAE,WAAW,CAAA;KAAE,CAAA;CAAE,EACpF,QAAQ,EAAE,CAAC,EACX,UAAU,EAAE,MAAM,GACjB,CAAC,CAEH"}
|
|
@@ -17,13 +17,13 @@ const Sha256Schema = z
|
|
|
17
17
|
const ManifestFileInfo = z.object({
|
|
18
18
|
name: z.string(),
|
|
19
19
|
size: z.number().int(),
|
|
20
|
-
sha256: Sha256Schema
|
|
20
|
+
sha256: Sha256Schema,
|
|
21
21
|
});
|
|
22
22
|
const BlockPackManifest = z.object({
|
|
23
23
|
schema: z.literal('v2'),
|
|
24
24
|
description: BlockPackDescriptionManifest,
|
|
25
25
|
timestamp: z.number().optional(),
|
|
26
|
-
files: z.array(ManifestFileInfo)
|
|
26
|
+
files: z.array(ManifestFileInfo),
|
|
27
27
|
}).passthrough();
|
|
28
28
|
const BlockPackManifestFile = 'manifest.json';
|
|
29
29
|
function overrideManifestVersion(manifest, newVersion) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_manifest.js","sources":["../../src/block_meta/block_manifest.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BlockComponents } from './block_components';\nimport { ContentRelative, ContentRelativeBinary, ContentRelativeText } from './content_types';\nimport { CreateBlockPackDescriptionSchema } from './block_description';\nimport { BlockPackMeta } from './block_meta';\nimport * as R from 'remeda';\nimport { BlockPackId } from './block_id';\n\nexport const BlockComponentsManifest = BlockComponents(ContentRelative, ContentRelative);\nexport type BlockComponentsManifest = z.infer<typeof BlockComponentsManifest>;\n\nexport const BlockPackMetaManifest = BlockPackMeta(ContentRelativeText, ContentRelativeBinary);\nexport type BlockPackMetaManifest = z.infer<typeof BlockPackMetaManifest>;\n\n/** Block description to be used in block manifest */\nexport const BlockPackDescriptionManifest = CreateBlockPackDescriptionSchema(\n BlockComponentsManifest,\n BlockPackMetaManifest
|
|
1
|
+
{"version":3,"file":"block_manifest.js","sources":["../../src/block_meta/block_manifest.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BlockComponents } from './block_components';\nimport { ContentRelative, ContentRelativeBinary, ContentRelativeText } from './content_types';\nimport { CreateBlockPackDescriptionSchema } from './block_description';\nimport { BlockPackMeta } from './block_meta';\nimport * as R from 'remeda';\nimport type { BlockPackId } from './block_id';\n\nexport const BlockComponentsManifest = BlockComponents(ContentRelative, ContentRelative);\nexport type BlockComponentsManifest = z.infer<typeof BlockComponentsManifest>;\n\nexport const BlockPackMetaManifest = BlockPackMeta(ContentRelativeText, ContentRelativeBinary);\nexport type BlockPackMetaManifest = z.infer<typeof BlockPackMetaManifest>;\n\n/** Block description to be used in block manifest */\nexport const BlockPackDescriptionManifest = CreateBlockPackDescriptionSchema(\n BlockComponentsManifest,\n BlockPackMetaManifest,\n);\nexport type BlockPackDescriptionManifest = z.infer<typeof BlockPackDescriptionManifest>;\n\nexport const Sha256Schema = z\n .string()\n .regex(/[0-9a-fA-F]/)\n .toUpperCase()\n .length(64); // 256 / 4 (bits per hex register);\n\nexport const ManifestFileInfo = z.object({\n name: z.string(),\n size: z.number().int(),\n sha256: Sha256Schema,\n});\nexport type ManifestFileInfo = z.infer<typeof ManifestFileInfo>;\n\nexport const BlockPackManifest = z.object({\n schema: z.literal('v2'),\n description: BlockPackDescriptionManifest,\n timestamp: z.number().optional(),\n files: z.array(ManifestFileInfo),\n}).passthrough();\nexport type BlockPackManifest = z.infer<typeof BlockPackManifest>;\n\nexport const BlockPackManifestFile = 'manifest.json';\n\nexport function overrideManifestVersion<T extends { description: { id: BlockPackId } }>(\n manifest: T,\n newVersion: string,\n): T {\n return R.mergeDeep(manifest, { description: { id: { version: newVersion } } }) as T;\n}\n"],"names":[],"mappings":";;;;;;;AAQO,MAAM,uBAAuB,GAAG,eAAe,CAAC,eAAe,EAAE,eAAe;AAGhF,MAAM,qBAAqB,GAAG,aAAa,CAAC,mBAAmB,EAAE,qBAAqB;AAG7F;AACO,MAAM,4BAA4B,GAAG,gCAAgC,CAC1E,uBAAuB,EACvB,qBAAqB;AAIhB,MAAM,YAAY,GAAG;AACzB,KAAA,MAAM;KACN,KAAK,CAAC,aAAa;AACnB,KAAA,WAAW;AACX,KAAA,MAAM,CAAC,EAAE,EAAE;AAEP,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;AACvC,IAAA,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;AAChB,IAAA,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,IAAA,MAAM,EAAE,YAAY;AACrB,CAAA;AAGM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;AACxC,IAAA,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;AACvB,IAAA,WAAW,EAAE,4BAA4B;AACzC,IAAA,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAChC,IAAA,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;CACjC,CAAC,CAAC,WAAW;AAGP,MAAM,qBAAqB,GAAG;AAE/B,SAAU,uBAAuB,CACrC,QAAW,EACX,UAAkB,EAAA;IAElB,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAM;AACrF;;;;"}
|
|
@@ -9,7 +9,7 @@ const BlockPlatform = zod.z.enum([
|
|
|
9
9
|
'macosx-x64',
|
|
10
10
|
'macosx-aarch64',
|
|
11
11
|
'linux-x64',
|
|
12
|
-
'linux-aarch64'
|
|
12
|
+
'linux-aarch64',
|
|
13
13
|
]);
|
|
14
14
|
function BlockPackMeta(longString, binary) {
|
|
15
15
|
return zod.z.object({
|
|
@@ -25,7 +25,7 @@ function BlockPackMeta(longString, binary) {
|
|
|
25
25
|
organization: zod.z.object({
|
|
26
26
|
name: zod.z.string(),
|
|
27
27
|
url: zod.z.string().url(),
|
|
28
|
-
logo: binary.optional()
|
|
28
|
+
logo: binary.optional(),
|
|
29
29
|
}).passthrough(),
|
|
30
30
|
/**
|
|
31
31
|
* The order of blocks on the "marketplace" (higher values push block higher to the top of the list).
|
|
@@ -44,7 +44,7 @@ function BlockPackMeta(longString, binary) {
|
|
|
44
44
|
* Supported operating systems.
|
|
45
45
|
* If not provided, the block is supported on all operating systems.
|
|
46
46
|
*/
|
|
47
|
-
supportedPlatforms: zod.z.array(BlockPlatform).optional()
|
|
47
|
+
supportedPlatforms: zod.z.array(BlockPlatform).optional(),
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
// prettier-ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_meta.cjs","sources":["../../src/block_meta/block_meta.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n ContentExplicitBase64,\n ContentExplicitBytes,\n DescriptionContentBinary,\n DescriptionContentText
|
|
1
|
+
{"version":3,"file":"block_meta.cjs","sources":["../../src/block_meta/block_meta.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n ContentExplicitBase64,\n ContentExplicitBytes,\n DescriptionContentBinary,\n DescriptionContentText,\n} from './content_types';\n\nexport const BlockPlatform = z.enum([\n 'windows-x64',\n 'windows-aarch64',\n 'macosx-x64',\n 'macosx-aarch64',\n 'linux-x64',\n 'linux-aarch64',\n]);\nexport type BlockPlatform = z.infer<typeof BlockPlatform>;\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 }).passthrough(),\n /**\n * The order of blocks on the \"marketplace\" (higher values push block higher to the top of the list).\n * `undefined` value or absent field is treated exactly the same as number `0`.\n */\n marketplaceRanking: z.number().optional(),\n /**\n * If true, the block is deprecated and should not be used.\n */\n deprecated: z.boolean().optional(),\n /**\n * The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.\n */\n termsOfServiceUrl: z.string().url().optional(),\n /**\n * Supported operating systems.\n * If not provided, the block is supported on all operating systems.\n */\n supportedPlatforms: z.array(BlockPlatform).optional(),\n });\n}\n\n// prettier-ignore\nexport const BlockPackMetaDescriptionRaw = BlockPackMeta(\n DescriptionContentText,\n DescriptionContentBinary,\n);\nexport type BlockPackMetaDescriptionRaw = z.infer<typeof BlockPackMetaDescriptionRaw>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBase64 = BlockPackMeta(\n z.string(),\n ContentExplicitBase64,\n);\nexport type BlockPackMetaEmbeddedBase64 = z.infer<typeof BlockPackMetaEmbeddedBase64>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBytes = BlockPackMeta(\n z.string(),\n ContentExplicitBytes,\n);\nexport type BlockPackMetaEmbeddedBytes = z.infer<typeof BlockPackMetaEmbeddedBytes>;\n"],"names":["z","DescriptionContentText","DescriptionContent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A,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AACzC;;AAEG;AACH,QAAA,UAAU,EAAEA,KAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;AAClC;;AAEG;QACH,iBAAiB,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;AAC9C;;;AAGG;QACH,kBAAkB,EAAEA,KAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;AACtD,KAAA,CAAC;AACJ;AAEA;AACO,MAAM,2BAA2B,GAAG,aAAa,CACtDC,oCAAsB,EACtBC,sCAAwB;AAI1B;AACO,MAAM,2BAA2B,GAAG,aAAa,CACtDF,KAAC,CAAC,MAAM,EAAE,EACVG,mCAAqB;AAIvB;AACO,MAAM,0BAA0B,GAAG,aAAa,CACrDH,KAAC,CAAC,MAAM,EAAE,EACVI,kCAAoB;;;;;;;;"}
|
|
@@ -7,7 +7,7 @@ const BlockPlatform = z.enum([
|
|
|
7
7
|
'macosx-x64',
|
|
8
8
|
'macosx-aarch64',
|
|
9
9
|
'linux-x64',
|
|
10
|
-
'linux-aarch64'
|
|
10
|
+
'linux-aarch64',
|
|
11
11
|
]);
|
|
12
12
|
function BlockPackMeta(longString, binary) {
|
|
13
13
|
return z.object({
|
|
@@ -23,7 +23,7 @@ function BlockPackMeta(longString, binary) {
|
|
|
23
23
|
organization: z.object({
|
|
24
24
|
name: z.string(),
|
|
25
25
|
url: z.string().url(),
|
|
26
|
-
logo: binary.optional()
|
|
26
|
+
logo: binary.optional(),
|
|
27
27
|
}).passthrough(),
|
|
28
28
|
/**
|
|
29
29
|
* The order of blocks on the "marketplace" (higher values push block higher to the top of the list).
|
|
@@ -42,7 +42,7 @@ function BlockPackMeta(longString, binary) {
|
|
|
42
42
|
* Supported operating systems.
|
|
43
43
|
* If not provided, the block is supported on all operating systems.
|
|
44
44
|
*/
|
|
45
|
-
supportedPlatforms: z.array(BlockPlatform).optional()
|
|
45
|
+
supportedPlatforms: z.array(BlockPlatform).optional(),
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
// prettier-ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_meta.js","sources":["../../src/block_meta/block_meta.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n ContentExplicitBase64,\n ContentExplicitBytes,\n DescriptionContentBinary,\n DescriptionContentText
|
|
1
|
+
{"version":3,"file":"block_meta.js","sources":["../../src/block_meta/block_meta.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n ContentExplicitBase64,\n ContentExplicitBytes,\n DescriptionContentBinary,\n DescriptionContentText,\n} from './content_types';\n\nexport const BlockPlatform = z.enum([\n 'windows-x64',\n 'windows-aarch64',\n 'macosx-x64',\n 'macosx-aarch64',\n 'linux-x64',\n 'linux-aarch64',\n]);\nexport type BlockPlatform = z.infer<typeof BlockPlatform>;\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 }).passthrough(),\n /**\n * The order of blocks on the \"marketplace\" (higher values push block higher to the top of the list).\n * `undefined` value or absent field is treated exactly the same as number `0`.\n */\n marketplaceRanking: z.number().optional(),\n /**\n * If true, the block is deprecated and should not be used.\n */\n deprecated: z.boolean().optional(),\n /**\n * The URL to the Terms of Service for the block. If provided checkbox with link to this URL should be shown in order to add block.\n */\n termsOfServiceUrl: z.string().url().optional(),\n /**\n * Supported operating systems.\n * If not provided, the block is supported on all operating systems.\n */\n supportedPlatforms: z.array(BlockPlatform).optional(),\n });\n}\n\n// prettier-ignore\nexport const BlockPackMetaDescriptionRaw = BlockPackMeta(\n DescriptionContentText,\n DescriptionContentBinary,\n);\nexport type BlockPackMetaDescriptionRaw = z.infer<typeof BlockPackMetaDescriptionRaw>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBase64 = BlockPackMeta(\n z.string(),\n ContentExplicitBase64,\n);\nexport type BlockPackMetaEmbeddedBase64 = z.infer<typeof BlockPackMetaEmbeddedBase64>;\n\n// prettier-ignore\nexport const BlockPackMetaEmbeddedBytes = BlockPackMeta(\n z.string(),\n ContentExplicitBytes,\n);\nexport type BlockPackMetaEmbeddedBytes = z.infer<typeof BlockPackMetaEmbeddedBytes>;\n"],"names":[],"mappings":";;;AAQO,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC;IAClC,aAAa;IACb,iBAAiB;IACjB,YAAY;IACZ,gBAAgB;IAChB,WAAW;IACX,eAAe;AAChB,CAAA;AAGK,SAAU,aAAa,CAG3B,UAA0B,EAAE,MAAkB,EAAA;IAC9C,OAAO,CAAC,CAAC,MAAM,CAAC;AACd,QAAA,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;AACjB,QAAA,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;AACvB,QAAA,eAAe,EAAE,UAAU,CAAC,QAAQ,EAAE;AACtC,QAAA,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAE;AAChC,QAAA,IAAI,EAAE,MAAM,CAAC,QAAQ,EAAE;QACvB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAChC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QACjC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;AACnE,QAAA,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;AACpC,QAAA,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC;AACrB,YAAA,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;AAChB,YAAA,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACrB,YAAA,IAAI,EAAE,MAAM,CAAC,QAAQ,EAAE;SACxB,CAAC,CAAC,WAAW,EAAE;AAChB;;;AAGG;AACH,QAAA,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AACzC;;AAEG;AACH,QAAA,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;AAClC;;AAEG;QACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;AAC9C;;;AAGG;QACH,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;AACtD,KAAA,CAAC;AACJ;AAEA;AACO,MAAM,2BAA2B,GAAG,aAAa,CACtD,sBAAsB,EACtB,wBAAwB;AAI1B;AACO,MAAM,2BAA2B,GAAG,aAAa,CACtD,CAAC,CAAC,MAAM,EAAE,EACV,qBAAqB;AAIvB;AACO,MAAM,0BAA0B,GAAG,aAAa,CACrD,CAAC,CAAC,MAAM,EAAE,EACV,oBAAoB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content_conversion.cjs","sources":["../../src/block_meta/content_conversion.ts"],"sourcesContent":["import {\n ContentAbsoluteUrl,\n ContentAnyLocal,\n ContentExplicitOrRelative,\n ContentRelative
|
|
1
|
+
{"version":3,"file":"content_conversion.cjs","sources":["../../src/block_meta/content_conversion.ts"],"sourcesContent":["import type {\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"],"names":[],"mappings":";;AAOM,SAAU,mBAAmB,CACjC,OAAe,EAAA;AAEf,IAAA,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,CAAA,EAAG,OAAO,GAAG;IACrE,OAAO,CAA4B,KAAQ,KACzC,KAAK,CAAC,IAAI,KAAK;AACb,UAAE,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,KAAK,CAAC,IAAI;UACtD,KAAqC;AAC9C;AAEA;;;;;;AAMG;AACG,SAAU,mBAAmB,CACjC,MAAc,EAAA;AAEd,IAAA,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAA,EAAG,MAAM,GAAG;IACpE,OAAO,CAAsC,KAAQ,MAClD,KAAK,CAAC,IAAI,KAAK;AACd,UAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,GAAG,KAAK,CAAC,IAAI;UACtD,KAAK,CAAM;AACnB;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContentAbsoluteUrl, ContentAnyLocal, ContentExplicitOrRelative, ContentRelative } from './content_types';
|
|
1
|
+
import type { ContentAbsoluteUrl, ContentAnyLocal, ContentExplicitOrRelative, ContentRelative } from './content_types';
|
|
2
2
|
export declare function mapRemoteToAbsolute(rootUrl: string): <T extends ContentAnyLocal>(value: T) => Exclude<T, ContentRelative> | ContentAbsoluteUrl;
|
|
3
3
|
/**
|
|
4
4
|
* Creates transformer of relative content paths, that adds a specific prefix to the relative path.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content_conversion.d.ts","sourceRoot":"","sources":["../../src/block_meta/content_conversion.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"content_conversion.d.ts","sourceRoot":"","sources":["../../src/block_meta/content_conversion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,GACd,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,EAAE,eAAe,CAAC,GAAG,kBAAkB,CAM3F;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,GACb,CAAC,CAAC,SAAS,yBAAyB,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,CAMtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content_conversion.js","sources":["../../src/block_meta/content_conversion.ts"],"sourcesContent":["import {\n ContentAbsoluteUrl,\n ContentAnyLocal,\n ContentExplicitOrRelative,\n ContentRelative
|
|
1
|
+
{"version":3,"file":"content_conversion.js","sources":["../../src/block_meta/content_conversion.ts"],"sourcesContent":["import type {\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"],"names":[],"mappings":"AAOM,SAAU,mBAAmB,CACjC,OAAe,EAAA;AAEf,IAAA,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,CAAA,EAAG,OAAO,GAAG;IACrE,OAAO,CAA4B,KAAQ,KACzC,KAAK,CAAC,IAAI,KAAK;AACb,UAAE,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,KAAK,CAAC,IAAI;UACtD,KAAqC;AAC9C;AAEA;;;;;;AAMG;AACG,SAAU,mBAAmB,CACjC,MAAc,EAAA;AAEd,IAAA,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,CAAA,EAAG,MAAM,GAAG;IACpE,OAAO,CAAsC,KAAQ,MAClD,KAAK,CAAC,IAAI,KAAK;AACd,UAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,GAAG,KAAK,CAAC,IAAI;UACtD,KAAK,CAAM;AACnB;;;;"}
|
|
@@ -8,7 +8,7 @@ var zod = require('zod');
|
|
|
8
8
|
const ContentExplicitString = zod.z
|
|
9
9
|
.object({
|
|
10
10
|
type: zod.z.literal('explicit-string'),
|
|
11
|
-
content: zod.z.string().describe('Actual string value')
|
|
11
|
+
content: zod.z.string().describe('Actual string value'),
|
|
12
12
|
})
|
|
13
13
|
.strict();
|
|
14
14
|
const ContentExplicitBase64 = zod.z
|
|
@@ -18,7 +18,7 @@ const ContentExplicitBase64 = zod.z
|
|
|
18
18
|
.string()
|
|
19
19
|
.regex(/\w+\/[-+.\w]+/)
|
|
20
20
|
.describe('MIME type to interpret content'),
|
|
21
|
-
content: zod.z.string().base64().describe('Base64 encoded binary value')
|
|
21
|
+
content: zod.z.string().base64().describe('Base64 encoded binary value'),
|
|
22
22
|
})
|
|
23
23
|
.strict();
|
|
24
24
|
const ContentRelative = zod.z
|
|
@@ -26,7 +26,7 @@ const ContentRelative = zod.z
|
|
|
26
26
|
type: zod.z.literal('relative'),
|
|
27
27
|
path: zod.z
|
|
28
28
|
.string()
|
|
29
|
-
.describe('Address of the file, in most cases relative to the file which this structure is a part of')
|
|
29
|
+
.describe('Address of the file, in most cases relative to the file which this structure is a part of'),
|
|
30
30
|
})
|
|
31
31
|
.strict();
|
|
32
32
|
const absPathRegex = new RegExp(`^(/|[A-Z]:\\\\)`);
|
|
@@ -36,13 +36,13 @@ const ContentAbsoluteFile = zod.z
|
|
|
36
36
|
file: zod.z
|
|
37
37
|
.string()
|
|
38
38
|
.regex(absPathRegex, 'path to file must be absolute')
|
|
39
|
-
.describe('Absolute address of the file in local file system')
|
|
39
|
+
.describe('Absolute address of the file in local file system'),
|
|
40
40
|
})
|
|
41
41
|
.strict();
|
|
42
42
|
const ContentAbsoluteUrl = zod.z
|
|
43
43
|
.object({
|
|
44
44
|
type: zod.z.literal('absolute-url'),
|
|
45
|
-
url: zod.z.string().url().describe('Global URL to reach the requested file')
|
|
45
|
+
url: zod.z.string().url().describe('Global URL to reach the requested file'),
|
|
46
46
|
})
|
|
47
47
|
.strict();
|
|
48
48
|
//
|
|
@@ -55,7 +55,7 @@ const ContentExplicitBytes = zod.z
|
|
|
55
55
|
.string()
|
|
56
56
|
.regex(/\w+\/[-+.\w]+/)
|
|
57
57
|
.describe('MIME type to interpret content'),
|
|
58
|
-
content: zod.z.instanceof(Uint8Array).describe('Raw content')
|
|
58
|
+
content: zod.z.instanceof(Uint8Array).describe('Raw content'),
|
|
59
59
|
})
|
|
60
60
|
.strict();
|
|
61
61
|
const ContentAbsoluteFolder = zod.z
|
|
@@ -64,7 +64,7 @@ const ContentAbsoluteFolder = zod.z
|
|
|
64
64
|
folder: zod.z
|
|
65
65
|
.string()
|
|
66
66
|
.regex(absPathRegex, 'path to folder must be absolute')
|
|
67
|
-
.describe('Absolute address of the folder in local file system')
|
|
67
|
+
.describe('Absolute address of the folder in local file system'),
|
|
68
68
|
})
|
|
69
69
|
.strict();
|
|
70
70
|
//
|
|
@@ -75,24 +75,24 @@ const ContentAny = zod.z.discriminatedUnion('type', [
|
|
|
75
75
|
ContentExplicitBase64,
|
|
76
76
|
ContentRelative,
|
|
77
77
|
ContentAbsoluteFile,
|
|
78
|
-
ContentAbsoluteUrl
|
|
78
|
+
ContentAbsoluteUrl,
|
|
79
79
|
]);
|
|
80
80
|
const ContentExplicitOrRelative = zod.z.discriminatedUnion('type', [
|
|
81
81
|
ContentExplicitString,
|
|
82
82
|
ContentExplicitBase64,
|
|
83
|
-
ContentRelative
|
|
83
|
+
ContentRelative,
|
|
84
84
|
]);
|
|
85
85
|
const ContentAnyLocal = zod.z.discriminatedUnion('type', [
|
|
86
86
|
ContentExplicitString,
|
|
87
87
|
ContentExplicitBase64,
|
|
88
88
|
ContentRelative,
|
|
89
|
-
ContentAbsoluteFile
|
|
89
|
+
ContentAbsoluteFile,
|
|
90
90
|
]);
|
|
91
91
|
const ContentAnyRemote = zod.z.discriminatedUnion('type', [
|
|
92
92
|
ContentExplicitString,
|
|
93
93
|
ContentExplicitBase64,
|
|
94
94
|
ContentRelative,
|
|
95
|
-
ContentAbsoluteUrl
|
|
95
|
+
ContentAbsoluteUrl,
|
|
96
96
|
]);
|
|
97
97
|
//
|
|
98
98
|
// Narrow types with relative option
|
|
@@ -106,7 +106,7 @@ const ContentAnyRemote = zod.z.discriminatedUnion('type', [
|
|
|
106
106
|
const ContentAnyBinaryLocal = zod.z.discriminatedUnion('type', [
|
|
107
107
|
ContentExplicitBase64,
|
|
108
108
|
ContentRelative,
|
|
109
|
-
ContentAbsoluteFile
|
|
109
|
+
ContentAbsoluteFile,
|
|
110
110
|
]);
|
|
111
111
|
// export const ContentAnyTextRemote = z.discriminatedUnion('type', [
|
|
112
112
|
// ContentExplicitString,
|
|
@@ -117,37 +117,37 @@ const ContentAnyBinaryLocal = zod.z.discriminatedUnion('type', [
|
|
|
117
117
|
const ContentAnyTextLocal = zod.z.discriminatedUnion('type', [
|
|
118
118
|
ContentExplicitString,
|
|
119
119
|
ContentRelative,
|
|
120
|
-
ContentAbsoluteFile
|
|
120
|
+
ContentAbsoluteFile,
|
|
121
121
|
]);
|
|
122
122
|
//
|
|
123
123
|
// Narrow absolute types
|
|
124
124
|
//
|
|
125
125
|
const ContentAbsoluteBinaryRemote = zod.z.discriminatedUnion('type', [
|
|
126
126
|
ContentExplicitBase64,
|
|
127
|
-
ContentAbsoluteUrl
|
|
127
|
+
ContentAbsoluteUrl,
|
|
128
128
|
]);
|
|
129
129
|
const ContentAbsoluteBinaryLocal = zod.z.discriminatedUnion('type', [
|
|
130
130
|
ContentExplicitBase64,
|
|
131
|
-
ContentAbsoluteFile
|
|
131
|
+
ContentAbsoluteFile,
|
|
132
132
|
]);
|
|
133
133
|
const ContentAbsoluteTextRemote = zod.z.discriminatedUnion('type', [
|
|
134
134
|
ContentExplicitString,
|
|
135
|
-
ContentAbsoluteUrl
|
|
135
|
+
ContentAbsoluteUrl,
|
|
136
136
|
]);
|
|
137
137
|
const ContentAbsoluteTextLocal = zod.z.discriminatedUnion('type', [
|
|
138
138
|
ContentExplicitString,
|
|
139
|
-
ContentAbsoluteFile
|
|
139
|
+
ContentAbsoluteFile,
|
|
140
140
|
]);
|
|
141
141
|
//
|
|
142
142
|
// Narrow relative types
|
|
143
143
|
//
|
|
144
144
|
const ContentRelativeBinary = zod.z.discriminatedUnion('type', [
|
|
145
145
|
ContentExplicitBase64,
|
|
146
|
-
ContentRelative
|
|
146
|
+
ContentRelative,
|
|
147
147
|
]);
|
|
148
148
|
const ContentRelativeText = zod.z.discriminatedUnion('type', [
|
|
149
149
|
ContentExplicitString,
|
|
150
|
-
ContentRelative
|
|
150
|
+
ContentRelative,
|
|
151
151
|
]);
|
|
152
152
|
// export function ConstructContent(
|
|
153
153
|
// contentType: 'text',
|
|
@@ -186,17 +186,17 @@ const DescriptionContentBinary = zod.z.union([
|
|
|
186
186
|
zod.z
|
|
187
187
|
.string()
|
|
188
188
|
.startsWith('file:')
|
|
189
|
-
.transform((value
|
|
190
|
-
ContentAnyBinaryLocal
|
|
189
|
+
.transform((value) => ({ type: 'relative', path: value.slice(5) })),
|
|
190
|
+
ContentAnyBinaryLocal,
|
|
191
191
|
]);
|
|
192
192
|
const DescriptionContentText = zod.z.union([
|
|
193
|
-
zod.z.string().transform((value
|
|
193
|
+
zod.z.string().transform((value) => {
|
|
194
194
|
if (value.startsWith('file:'))
|
|
195
195
|
return { type: 'relative', path: value.slice(5) };
|
|
196
196
|
else
|
|
197
197
|
return { type: 'explicit-string', content: value };
|
|
198
198
|
}),
|
|
199
|
-
ContentAnyTextLocal
|
|
199
|
+
ContentAnyTextLocal,
|
|
200
200
|
]);
|
|
201
201
|
|
|
202
202
|
exports.ContentAbsoluteBinaryLocal = ContentAbsoluteBinaryLocal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content_types.cjs","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 ContentAnyTextLocal\n]);\nexport type DescriptionContentText = z.infer<typeof DescriptionContentText>;\n"],"names":["z"],"mappings":";;;;AAEA;AACA;AACA;AAEO,MAAM,qBAAqB,GAAGA;AAClC,KAAA,MAAM,CAAC;AACN,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAClC,OAAO,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB;CACnD;AACA,KAAA,MAAM;AAGF,MAAM,qBAAqB,GAAGA;AAClC,KAAA,MAAM,CAAC;AACN,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;AAClC,IAAA,QAAQ,EAAEA;AACP,SAAA,MAAM;SACN,KAAK,CAAC,eAAe;SACrB,QAAQ,CAAC,gCAAgC,CAAC;AAC7C,IAAA,OAAO,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B;CACpE;AACA,KAAA,MAAM;AAGF,MAAM,eAAe,GAAGA;AAC5B,KAAA,MAAM,CAAC;AACN,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC3B,IAAA,IAAI,EAAEA;AACH,SAAA,MAA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C,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC9D,qBAAqB;IACrB;AACD,CAAA;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAM,wBAAwB,GAAGA,KAAC,CAAC,KAAK,CAAC;IAC9CA;AACG,SAAA,MAAM;SACN,UAAU,CAAC,OAAO;SAClB,SAAS,CAAwB,CAAC,KAAK,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACjG;AACD,CAAA;AAGM,MAAM,sBAAsB,GAAGA,KAAC,CAAC,KAAK,CAAC;IAC5CA,KAAC,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.cjs","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":["z"],"mappings":";;;;AAEA;AACA;AACA;AAEO,MAAM,qBAAqB,GAAGA;AAClC,KAAA,MAAM,CAAC;AACN,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAClC,OAAO,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;CACpD;AACA,KAAA,MAAM;AAGF,MAAM,qBAAqB,GAAGA;AAClC,KAAA,MAAM,CAAC;AACN,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;AAClC,IAAA,QAAQ,EAAEA;AACP,SAAA,MAAM;SACN,KAAK,CAAC,eAAe;SACrB,QAAQ,CAAC,gCAAgC,CAAC;AAC7C,IAAA,OAAO,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;CACrE;AACA,KAAA,MAAM;AAGF,MAAM,eAAe,GAAGA;AAC5B,KAAA,MAAM,CAAC;AACN,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC3B,IAAA,IAAI,EAAEA;AACH,SAAA,MAAM;SACN,QAAQ,CACP,2FAA2F,CAC5F;CACJ;AACA,KAAA,MAAM;AAGT,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,CAAA,eAAA,CAAiB,CAAC;AAE3C,MAAM,mBAAmB,GAAGA;AAChC,KAAA,MAAM,CAAC;AACN,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,eAAe,CAAC;AAChC,IAAA,IAAI,EAAEA;AACH,SAAA,MAAM;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