@milaboratories/pl-model-middle-layer 1.12.7 → 1.12.9
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/_virtual/_rolldown/runtime.cjs +43 -0
- package/dist/_virtual/_rolldown/runtime.js +18 -0
- package/dist/author_marker.d.ts +2 -5
- package/dist/block_meta/block_components.cjs +21 -29
- package/dist/block_meta/block_components.cjs.map +1 -1
- package/dist/block_meta/block_components.d.ts +537 -533
- package/dist/block_meta/block_components.js +20 -27
- package/dist/block_meta/block_components.js.map +1 -1
- package/dist/block_meta/block_description.cjs +22 -25
- package/dist/block_meta/block_description.cjs.map +1 -1
- package/dist/block_meta/block_description.d.ts +1815 -1812
- package/dist/block_meta/block_description.js +20 -22
- package/dist/block_meta/block_description.js.map +1 -1
- package/dist/block_meta/block_id.cjs +21 -28
- package/dist/block_meta/block_id.cjs.map +1 -1
- package/dist/block_meta/block_id.d.ts +30 -26
- package/dist/block_meta/block_id.js +20 -26
- package/dist/block_meta/block_id.js.map +1 -1
- package/dist/block_meta/block_manifest.cjs +24 -29
- package/dist/block_meta/block_manifest.cjs.map +1 -1
- package/dist/block_meta/block_manifest.d.ts +4778 -4773
- package/dist/block_meta/block_manifest.js +20 -24
- package/dist/block_meta/block_manifest.js.map +1 -1
- package/dist/block_meta/block_meta.cjs +35 -50
- package/dist/block_meta/block_meta.cjs.map +1 -1
- package/dist/block_meta/block_meta.d.ts +810 -806
- package/dist/block_meta/block_meta.js +31 -45
- package/dist/block_meta/block_meta.js.map +1 -1
- package/dist/block_meta/common.d.ts +5 -2
- package/dist/block_meta/content_conversion.cjs +19 -16
- package/dist/block_meta/content_conversion.cjs.map +1 -1
- package/dist/block_meta/content_conversion.d.ts +7 -3
- package/dist/block_meta/content_conversion.js +19 -15
- package/dist/block_meta/content_conversion.js.map +1 -1
- package/dist/block_meta/content_types.cjs +77 -187
- package/dist/block_meta/content_types.cjs.map +1 -1
- package/dist/block_meta/content_types.d.ts +382 -378
- package/dist/block_meta/content_types.js +76 -185
- package/dist/block_meta/content_types.js.map +1 -1
- package/dist/block_meta/index.cjs +8 -0
- package/dist/block_meta/index.d.ts +9 -10
- package/dist/block_meta/index.js +8 -0
- package/dist/block_meta/semver.cjs +6 -9
- package/dist/block_meta/semver.cjs.map +1 -1
- package/dist/block_meta/semver.d.ts +5 -1
- package/dist/block_meta/semver.js +5 -7
- package/dist/block_meta/semver.js.map +1 -1
- package/dist/block_registry/block_pack_spec.cjs +30 -34
- package/dist/block_registry/block_pack_spec.cjs.map +1 -1
- package/dist/block_registry/block_pack_spec.d.ts +172 -168
- package/dist/block_registry/block_pack_spec.js +29 -32
- package/dist/block_registry/block_pack_spec.js.map +1 -1
- package/dist/block_registry/index.cjs +3 -0
- package/dist/block_registry/index.d.ts +3 -4
- package/dist/block_registry/index.js +3 -0
- package/dist/block_registry/overview.cjs +55 -66
- package/dist/block_registry/overview.cjs.map +1 -1
- package/dist/block_registry/overview.d.ts +10345 -10340
- package/dist/block_registry/overview.js +54 -64
- package/dist/block_registry/overview.js.map +1 -1
- package/dist/block_registry/registry_spec.cjs +17 -16
- package/dist/block_registry/registry_spec.cjs.map +1 -1
- package/dist/block_registry/registry_spec.d.ts +147 -143
- package/dist/block_registry/registry_spec.js +16 -14
- package/dist/block_registry/registry_spec.js.map +1 -1
- package/dist/block_settings.cjs +3 -2
- package/dist/block_settings.cjs.map +1 -1
- package/dist/block_settings.d.ts +12 -10
- package/dist/block_settings.js +3 -1
- package/dist/block_settings.js.map +1 -1
- package/dist/block_state.d.ts +14 -14
- package/dist/index.cjs +102 -99
- package/dist/index.d.ts +25 -12
- package/dist/index.js +18 -16
- package/dist/json.cjs +16 -13
- package/dist/json.cjs.map +1 -1
- package/dist/json.d.ts +11 -7
- package/dist/json.js +14 -11
- package/dist/json.js.map +1 -1
- package/dist/pframe/index.d.ts +1 -2
- package/dist/pframe/internal_api/api_factory.cjs +3 -2
- package/dist/pframe/internal_api/api_factory.cjs.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts +40 -36
- package/dist/pframe/internal_api/api_factory.js +3 -1
- package/dist/pframe/internal_api/api_factory.js.map +1 -1
- package/dist/pframe/internal_api/api_read.d.ts +40 -36
- package/dist/pframe/internal_api/api_wasm.d.ts +71 -70
- package/dist/pframe/internal_api/common.d.ts +18 -14
- package/dist/pframe/internal_api/create_table.d.ts +46 -42
- package/dist/pframe/internal_api/delete_column.d.ts +11 -7
- package/dist/pframe/internal_api/find_columns.d.ts +21 -17
- package/dist/pframe/internal_api/http_helpers.cjs +36 -27
- package/dist/pframe/internal_api/http_helpers.cjs.map +1 -1
- package/dist/pframe/internal_api/http_helpers.d.ts +153 -170
- package/dist/pframe/internal_api/http_helpers.js +36 -26
- package/dist/pframe/internal_api/http_helpers.js.map +1 -1
- package/dist/pframe/internal_api/index.cjs +18 -10
- package/dist/pframe/internal_api/index.cjs.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +18 -11
- package/dist/pframe/internal_api/index.js +15 -3
- package/dist/pframe/internal_api/index.js.map +1 -1
- package/dist/pframe/internal_api/pframe.d.ts +26 -27
- package/dist/pframe/internal_api/table.d.ts +52 -48
- package/dist/project.d.ts +6 -3
- package/dist/project_list.d.ts +18 -14
- package/dist/project_overview.d.ts +135 -143
- package/dist/update_info.d.ts +10 -5
- package/package.json +5 -5
- package/dist/author_marker.d.ts.map +0 -1
- package/dist/block_meta/block_components.d.ts.map +0 -1
- package/dist/block_meta/block_description.d.ts.map +0 -1
- package/dist/block_meta/block_id.d.ts.map +0 -1
- package/dist/block_meta/block_manifest.d.ts.map +0 -1
- package/dist/block_meta/block_meta.d.ts.map +0 -1
- package/dist/block_meta/common.d.ts.map +0 -1
- package/dist/block_meta/content_conversion.d.ts.map +0 -1
- package/dist/block_meta/content_types.d.ts.map +0 -1
- package/dist/block_meta/index.d.ts.map +0 -1
- package/dist/block_meta/semver.d.ts.map +0 -1
- package/dist/block_registry/block_pack_spec.d.ts.map +0 -1
- package/dist/block_registry/index.d.ts.map +0 -1
- package/dist/block_registry/overview.d.ts.map +0 -1
- package/dist/block_registry/registry_spec.d.ts.map +0 -1
- package/dist/block_settings.d.ts.map +0 -1
- package/dist/block_state.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/json.d.ts.map +0 -1
- package/dist/pframe/index.d.ts.map +0 -1
- package/dist/pframe/internal_api/api_factory.d.ts.map +0 -1
- package/dist/pframe/internal_api/api_read.d.ts.map +0 -1
- package/dist/pframe/internal_api/api_wasm.d.ts.map +0 -1
- package/dist/pframe/internal_api/common.d.ts.map +0 -1
- package/dist/pframe/internal_api/create_table.d.ts.map +0 -1
- package/dist/pframe/internal_api/delete_column.d.ts.map +0 -1
- package/dist/pframe/internal_api/find_columns.d.ts.map +0 -1
- package/dist/pframe/internal_api/http_helpers.d.ts.map +0 -1
- package/dist/pframe/internal_api/index.d.ts.map +0 -1
- package/dist/pframe/internal_api/pframe.d.ts.map +0 -1
- package/dist/pframe/internal_api/table.d.ts.map +0 -1
- package/dist/project.d.ts.map +0 -1
- package/dist/project_list.d.ts.map +0 -1
- package/dist/project_overview.d.ts.map +0 -1
- package/dist/update_info.d.ts.map +0 -1
|
@@ -1,79 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import { BlockPackSpec } from './block_pack_spec.js';
|
|
10
|
-
import { RegistryEntry } from './registry_spec.js';
|
|
1
|
+
import { SemVer } from "../block_meta/semver.js";
|
|
2
|
+
import { BlockPackId, BlockPackIdNoVersion } from "../block_meta/block_id.js";
|
|
3
|
+
import { BlockPackMetaEmbeddedBytes } from "../block_meta/block_meta.js";
|
|
4
|
+
import { FeatureFlags } from "../block_meta/block_description.js";
|
|
5
|
+
import "../block_meta/index.js";
|
|
6
|
+
import { BlockPackSpec } from "./block_pack_spec.js";
|
|
7
|
+
import { RegistryEntry } from "./registry_spec.js";
|
|
8
|
+
import { z } from "zod";
|
|
11
9
|
|
|
10
|
+
//#region src/block_registry/overview.ts
|
|
12
11
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const BlockPackOverviewLegacy = z
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
.passthrough();
|
|
12
|
+
* Latest information about specific block pack. Contain information about latest version of the package.
|
|
13
|
+
* */
|
|
14
|
+
const BlockPackOverviewLegacy = z.object({
|
|
15
|
+
registryId: z.string(),
|
|
16
|
+
id: BlockPackId,
|
|
17
|
+
meta: BlockPackMetaEmbeddedBytes,
|
|
18
|
+
spec: BlockPackSpec,
|
|
19
|
+
otherVersions: z.array(SemVer)
|
|
20
|
+
}).passthrough();
|
|
24
21
|
const AnyChannel = "any";
|
|
25
22
|
const StableChannel = "stable";
|
|
26
|
-
const VersionWithChannels = z
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
.passthrough();
|
|
23
|
+
const VersionWithChannels = z.object({
|
|
24
|
+
version: SemVer,
|
|
25
|
+
channels: z.array(z.string())
|
|
26
|
+
}).passthrough();
|
|
32
27
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const SingleBlockPackOverview = z
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
42
|
-
.passthrough();
|
|
28
|
+
* Information about specific block pack version.
|
|
29
|
+
* */
|
|
30
|
+
const SingleBlockPackOverview = z.object({
|
|
31
|
+
id: BlockPackId,
|
|
32
|
+
meta: BlockPackMetaEmbeddedBytes,
|
|
33
|
+
featureFlags: FeatureFlags.optional(),
|
|
34
|
+
spec: BlockPackSpec
|
|
35
|
+
}).passthrough();
|
|
43
36
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
* Latest information about specific block pack. Contain information about latest version of the package.
|
|
38
|
+
* */
|
|
46
39
|
const BlockPackOverviewRaw = z.object({
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
id: BlockPackIdNoVersion,
|
|
41
|
+
latestByChannel: z.record(z.string(), SingleBlockPackOverview),
|
|
42
|
+
allVersions: z.array(VersionWithChannels),
|
|
43
|
+
registryId: z.string()
|
|
51
44
|
});
|
|
52
45
|
const BlockPackOverview = BlockPackOverviewRaw.passthrough();
|
|
53
|
-
const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({
|
|
54
|
-
|
|
55
|
-
}).passthrough();
|
|
56
|
-
const RegistryStatus = RegistryEntry.extend({
|
|
57
|
-
status: z.union([z.literal("online"), z.literal("offline")]),
|
|
58
|
-
});
|
|
46
|
+
const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({ registryId: true }).passthrough();
|
|
47
|
+
const RegistryStatus = RegistryEntry.extend({ status: z.union([z.literal("online"), z.literal("offline")]) });
|
|
59
48
|
const BlockPackListing = z.object({
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
registries: z.array(RegistryStatus),
|
|
50
|
+
blockPacks: z.array(BlockPackOverview)
|
|
62
51
|
});
|
|
63
52
|
function blockPackOverviewToLegacy(bpo) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
53
|
+
const mainChannel = bpo.latestByChannel[StableChannel] !== void 0 ? StableChannel : AnyChannel;
|
|
54
|
+
const latestOverview = bpo.latestByChannel[mainChannel];
|
|
55
|
+
return {
|
|
56
|
+
id: latestOverview.id,
|
|
57
|
+
meta: latestOverview.meta,
|
|
58
|
+
spec: {
|
|
59
|
+
...latestOverview.spec,
|
|
60
|
+
channel: StableChannel
|
|
61
|
+
},
|
|
62
|
+
otherVersions: bpo.allVersions.filter((v) => v.channels.indexOf(mainChannel) >= 0).map((v) => v.version),
|
|
63
|
+
registryId: bpo.registryId
|
|
64
|
+
};
|
|
76
65
|
}
|
|
77
66
|
|
|
67
|
+
//#endregion
|
|
78
68
|
export { AnyChannel, BlockPackListing, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, RegistryStatus, SingleBlockPackOverview, StableChannel, VersionWithChannels, blockPackOverviewToLegacy };
|
|
79
|
-
//# sourceMappingURL=overview.js.map
|
|
69
|
+
//# sourceMappingURL=overview.js.map
|
|
@@ -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,\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\n .object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer),\n })\n .passthrough();\nexport type BlockPackOverviewLegacy = z.infer<typeof BlockPackOverviewLegacy>;\n\nexport const AnyChannel = \"any\";\nexport const StableChannel = \"stable\";\n\nexport const VersionWithChannels = z\n .object({\n version: SemVer,\n channels: z.array(z.string()),\n })\n .passthrough();\n\n/**\n * Information about specific block pack version.\n * */\nexport const SingleBlockPackOverview = z\n .object({\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n featureFlags: FeatureFlags.optional(),\n spec: BlockPackSpec,\n })\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({\n registryId: true,\n}).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"],"
|
|
1
|
+
{"version":3,"file":"overview.js","names":[],"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\n .object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer),\n })\n .passthrough();\nexport type BlockPackOverviewLegacy = z.infer<typeof BlockPackOverviewLegacy>;\n\nexport const AnyChannel = \"any\";\nexport const StableChannel = \"stable\";\n\nexport const VersionWithChannels = z\n .object({\n version: SemVer,\n channels: z.array(z.string()),\n })\n .passthrough();\n\n/**\n * Information about specific block pack version.\n * */\nexport const SingleBlockPackOverview = z\n .object({\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n featureFlags: FeatureFlags.optional(),\n spec: BlockPackSpec,\n })\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({\n registryId: true,\n}).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"],"mappings":";;;;;;;;;;;;;AAeA,MAAa,0BAA0B,EACpC,OAAO;CACN,YAAY,EAAE,QAAQ;CACtB,IAAI;CACJ,MAAM;CACN,MAAM;CACN,eAAe,EAAE,MAAM,OAAO;CAC/B,CAAC,CACD,aAAa;AAGhB,MAAa,aAAa;AAC1B,MAAa,gBAAgB;AAE7B,MAAa,sBAAsB,EAChC,OAAO;CACN,SAAS;CACT,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;CAC9B,CAAC,CACD,aAAa;;;;AAKhB,MAAa,0BAA0B,EACpC,OAAO;CACN,IAAI;CACJ,MAAM;CACN,cAAc,aAAa,UAAU;CACrC,MAAM;CACP,CAAC,CACD,aAAa;;;;AAMhB,MAAa,uBAAuB,EAAE,OAAO;CAC3C,IAAI;CACJ,iBAAiB,EAAE,OAAO,EAAE,QAAQ,EAAE,wBAAwB;CAC9D,aAAa,EAAE,MAAM,oBAAoB;CACzC,YAAY,EAAE,QAAQ;CACvB,CAAC;AACF,MAAa,oBAAoB,qBAAqB,aAAa;AAGnE,MAAa,gCAAgC,qBAAqB,KAAK,EACrE,YAAY,MACb,CAAC,CAAC,aAAa;AAGhB,MAAa,iBAAiB,cAAc,OAAO,EACjD,QAAQ,EAAE,MAAM,CAAC,EAAE,QAAQ,SAAS,EAAE,EAAE,QAAQ,UAAU,CAAC,CAAC,EAC7D,CAAC;AAGF,MAAa,mBAAmB,EAAE,OAAO;CACvC,YAAY,EAAE,MAAM,eAAe;CACnC,YAAY,EAAE,MAAM,kBAAkB;CACvC,CAAC;AAGF,SAAgB,0BAA0B,KAAiD;CACzF,MAAM,cAAc,IAAI,gBAAgB,mBAAmB,SAAY,gBAAgB;CACvF,MAAM,iBAAiB,IAAI,gBAAgB;AAC3C,QAAO;EACL,IAAI,eAAe;EACnB,MAAM,eAAe;EAErB,MAAM;GAAE,GAAI,eAAe;GAAkC,SAAS;GAAe;EACrF,eAAe,IAAI,YAChB,QAAQ,MAAM,EAAE,SAAS,QAAQ,YAAY,IAAI,EAAE,CACnD,KAAK,MAAM,EAAE,QAAQ;EACxB,YAAY,IAAI;EACjB"}
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var zod = require('zod');
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
let zod = require("zod");
|
|
4
3
|
|
|
4
|
+
//#region src/block_registry/registry_spec.ts
|
|
5
5
|
const LocalDevFolder = zod.z.object({
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
type: zod.z.literal("local-dev"),
|
|
7
|
+
path: zod.z.string()
|
|
8
8
|
});
|
|
9
9
|
/** @deprecated don't use */
|
|
10
10
|
const RemoteRegistryV1Spec = zod.z.object({
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
type: zod.z.literal("remote-v1"),
|
|
12
|
+
url: zod.z.string().url()
|
|
13
13
|
});
|
|
14
14
|
const RemoteRegistryV2Spec = zod.z.object({
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
type: zod.z.literal("remote-v2"),
|
|
16
|
+
url: zod.z.string().url()
|
|
17
17
|
});
|
|
18
18
|
const RegistrySpec = zod.z.discriminatedUnion("type", [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
RemoteRegistryV1Spec,
|
|
20
|
+
RemoteRegistryV2Spec,
|
|
21
|
+
LocalDevFolder
|
|
22
22
|
]);
|
|
23
23
|
const RegistryEntry = zod.z.object({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
id: zod.z.string(),
|
|
25
|
+
title: zod.z.string().optional(),
|
|
26
|
+
spec: RegistrySpec
|
|
27
27
|
});
|
|
28
28
|
const RegistryList = zod.z.array(RegistryEntry);
|
|
29
29
|
|
|
30
|
+
//#endregion
|
|
30
31
|
exports.LocalDevFolder = LocalDevFolder;
|
|
31
32
|
exports.RegistryEntry = RegistryEntry;
|
|
32
33
|
exports.RegistryList = RegistryList;
|
|
33
34
|
exports.RegistrySpec = RegistrySpec;
|
|
34
35
|
exports.RemoteRegistryV1Spec = RemoteRegistryV1Spec;
|
|
35
36
|
exports.RemoteRegistryV2Spec = RemoteRegistryV2Spec;
|
|
36
|
-
//# sourceMappingURL=registry_spec.cjs.map
|
|
37
|
+
//# sourceMappingURL=registry_spec.cjs.map
|
|
@@ -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(),\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"],"
|
|
1
|
+
{"version":3,"file":"registry_spec.cjs","names":["z"],"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"],"mappings":";;;;AAEA,MAAa,iBAAiBA,MAAE,OAAO;CACrC,MAAMA,MAAE,QAAQ,YAAY;CAC5B,MAAMA,MAAE,QAAQ;CACjB,CAAC;;AAIF,MAAa,uBAAuBA,MAAE,OAAO;CAC3C,MAAMA,MAAE,QAAQ,YAAY;CAC5B,KAAKA,MAAE,QAAQ,CAAC,KAAK;CACtB,CAAC;AAIF,MAAa,uBAAuBA,MAAE,OAAO;CAC3C,MAAMA,MAAE,QAAQ,YAAY;CAC5B,KAAKA,MAAE,QAAQ,CAAC,KAAK;CACtB,CAAC;AAGF,MAAa,eAAeA,MAAE,mBAAmB,QAAQ;CACvD;CACA;CACA;CACD,CAAC;AAGF,MAAa,gBAAgBA,MAAE,OAAO;CACpC,IAAIA,MAAE,QAAQ;CACd,OAAOA,MAAE,QAAQ,CAAC,UAAU;CAC5B,MAAM;CACP,CAAC;AAGF,MAAa,eAAeA,MAAE,MAAM,cAAc"}
|
|
@@ -1,184 +1,188 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
//#region src/block_registry/registry_spec.d.ts
|
|
4
|
+
declare const LocalDevFolder: z.ZodObject<{
|
|
5
|
+
type: z.ZodLiteral<"local-dev">;
|
|
6
|
+
path: z.ZodString;
|
|
5
7
|
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
path: string;
|
|
9
|
+
type: "local-dev";
|
|
8
10
|
}, {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
path: string;
|
|
12
|
+
type: "local-dev";
|
|
13
|
+
}>;
|
|
14
|
+
type LocalDevFolder = z.infer<typeof LocalDevFolder>;
|
|
15
|
+
/** @deprecated don't use */
|
|
16
|
+
declare const RemoteRegistryV1Spec: z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"remote-v1">;
|
|
18
|
+
url: z.ZodString;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
type: "remote-v1";
|
|
21
|
+
url: string;
|
|
22
|
+
}, {
|
|
23
|
+
type: "remote-v1";
|
|
24
|
+
url: string;
|
|
11
25
|
}>;
|
|
12
|
-
export type LocalDevFolder = z.infer<typeof LocalDevFolder>;
|
|
13
26
|
/** @deprecated don't use */
|
|
14
|
-
|
|
27
|
+
type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;
|
|
28
|
+
declare const RemoteRegistryV2Spec: z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"remote-v2">;
|
|
30
|
+
url: z.ZodString;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
type: "remote-v2";
|
|
33
|
+
url: string;
|
|
34
|
+
}, {
|
|
35
|
+
type: "remote-v2";
|
|
36
|
+
url: string;
|
|
37
|
+
}>;
|
|
38
|
+
type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;
|
|
39
|
+
declare const RegistrySpec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<"remote-v1">;
|
|
41
|
+
url: z.ZodString;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
type: "remote-v1";
|
|
44
|
+
url: string;
|
|
45
|
+
}, {
|
|
46
|
+
type: "remote-v1";
|
|
47
|
+
url: string;
|
|
48
|
+
}>, z.ZodObject<{
|
|
49
|
+
type: z.ZodLiteral<"remote-v2">;
|
|
50
|
+
url: z.ZodString;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
type: "remote-v2";
|
|
53
|
+
url: string;
|
|
54
|
+
}, {
|
|
55
|
+
type: "remote-v2";
|
|
56
|
+
url: string;
|
|
57
|
+
}>, z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"local-dev">;
|
|
59
|
+
path: z.ZodString;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
path: string;
|
|
62
|
+
type: "local-dev";
|
|
63
|
+
}, {
|
|
64
|
+
path: string;
|
|
65
|
+
type: "local-dev";
|
|
66
|
+
}>]>;
|
|
67
|
+
type RegistrySpec = z.infer<typeof RegistrySpec>;
|
|
68
|
+
declare const RegistryEntry: z.ZodObject<{
|
|
69
|
+
id: z.ZodString;
|
|
70
|
+
title: z.ZodOptional<z.ZodString>;
|
|
71
|
+
spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
15
72
|
type: z.ZodLiteral<"remote-v1">;
|
|
16
73
|
url: z.ZodString;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
75
|
type: "remote-v1";
|
|
19
76
|
url: string;
|
|
20
|
-
}, {
|
|
77
|
+
}, {
|
|
21
78
|
type: "remote-v1";
|
|
22
79
|
url: string;
|
|
23
|
-
}
|
|
24
|
-
/** @deprecated don't use */
|
|
25
|
-
export type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;
|
|
26
|
-
export declare const RemoteRegistryV2Spec: z.ZodObject<{
|
|
80
|
+
}>, z.ZodObject<{
|
|
27
81
|
type: z.ZodLiteral<"remote-v2">;
|
|
28
82
|
url: z.ZodString;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
type: "remote-v2";
|
|
85
|
+
url: string;
|
|
86
|
+
}, {
|
|
87
|
+
type: "remote-v2";
|
|
88
|
+
url: string;
|
|
89
|
+
}>, z.ZodObject<{
|
|
90
|
+
type: z.ZodLiteral<"local-dev">;
|
|
91
|
+
path: z.ZodString;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
path: string;
|
|
94
|
+
type: "local-dev";
|
|
95
|
+
}, {
|
|
96
|
+
path: string;
|
|
97
|
+
type: "local-dev";
|
|
98
|
+
}>]>;
|
|
29
99
|
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
id: string;
|
|
101
|
+
spec: {
|
|
102
|
+
type: "remote-v1";
|
|
103
|
+
url: string;
|
|
104
|
+
} | {
|
|
30
105
|
type: "remote-v2";
|
|
31
106
|
url: string;
|
|
107
|
+
} | {
|
|
108
|
+
path: string;
|
|
109
|
+
type: "local-dev";
|
|
110
|
+
};
|
|
111
|
+
title?: string | undefined;
|
|
32
112
|
}, {
|
|
113
|
+
id: string;
|
|
114
|
+
spec: {
|
|
115
|
+
type: "remote-v1";
|
|
116
|
+
url: string;
|
|
117
|
+
} | {
|
|
33
118
|
type: "remote-v2";
|
|
34
119
|
url: string;
|
|
120
|
+
} | {
|
|
121
|
+
path: string;
|
|
122
|
+
type: "local-dev";
|
|
123
|
+
};
|
|
124
|
+
title?: string | undefined;
|
|
35
125
|
}>;
|
|
36
|
-
|
|
37
|
-
|
|
126
|
+
type RegistryEntry = z.infer<typeof RegistryEntry>;
|
|
127
|
+
declare const RegistryList: z.ZodArray<z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
title: z.ZodOptional<z.ZodString>;
|
|
130
|
+
spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
38
131
|
type: z.ZodLiteral<"remote-v1">;
|
|
39
132
|
url: z.ZodString;
|
|
40
|
-
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
134
|
type: "remote-v1";
|
|
42
135
|
url: string;
|
|
43
|
-
}, {
|
|
136
|
+
}, {
|
|
44
137
|
type: "remote-v1";
|
|
45
138
|
url: string;
|
|
46
|
-
}>, z.ZodObject<{
|
|
139
|
+
}>, z.ZodObject<{
|
|
47
140
|
type: z.ZodLiteral<"remote-v2">;
|
|
48
141
|
url: z.ZodString;
|
|
49
|
-
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
143
|
type: "remote-v2";
|
|
51
144
|
url: string;
|
|
52
|
-
}, {
|
|
145
|
+
}, {
|
|
53
146
|
type: "remote-v2";
|
|
54
147
|
url: string;
|
|
55
|
-
}>, z.ZodObject<{
|
|
148
|
+
}>, z.ZodObject<{
|
|
56
149
|
type: z.ZodLiteral<"local-dev">;
|
|
57
150
|
path: z.ZodString;
|
|
58
|
-
}, "strip", z.ZodTypeAny, {
|
|
59
|
-
type: "local-dev";
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
152
|
path: string;
|
|
61
|
-
}, {
|
|
62
153
|
type: "local-dev";
|
|
154
|
+
}, {
|
|
63
155
|
path: string;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export declare const RegistryEntry: z.ZodObject<{
|
|
67
|
-
id: z.ZodString;
|
|
68
|
-
title: z.ZodOptional<z.ZodString>;
|
|
69
|
-
spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
70
|
-
type: z.ZodLiteral<"remote-v1">;
|
|
71
|
-
url: z.ZodString;
|
|
72
|
-
}, "strip", z.ZodTypeAny, {
|
|
73
|
-
type: "remote-v1";
|
|
74
|
-
url: string;
|
|
75
|
-
}, {
|
|
76
|
-
type: "remote-v1";
|
|
77
|
-
url: string;
|
|
78
|
-
}>, z.ZodObject<{
|
|
79
|
-
type: z.ZodLiteral<"remote-v2">;
|
|
80
|
-
url: z.ZodString;
|
|
81
|
-
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
type: "remote-v2";
|
|
83
|
-
url: string;
|
|
84
|
-
}, {
|
|
85
|
-
type: "remote-v2";
|
|
86
|
-
url: string;
|
|
87
|
-
}>, z.ZodObject<{
|
|
88
|
-
type: z.ZodLiteral<"local-dev">;
|
|
89
|
-
path: z.ZodString;
|
|
90
|
-
}, "strip", z.ZodTypeAny, {
|
|
91
|
-
type: "local-dev";
|
|
92
|
-
path: string;
|
|
93
|
-
}, {
|
|
94
|
-
type: "local-dev";
|
|
95
|
-
path: string;
|
|
96
|
-
}>]>;
|
|
97
|
-
}, "strip", z.ZodTypeAny, {
|
|
98
|
-
id: string;
|
|
99
|
-
spec: {
|
|
100
|
-
type: "local-dev";
|
|
101
|
-
path: string;
|
|
102
|
-
} | {
|
|
103
|
-
type: "remote-v1";
|
|
104
|
-
url: string;
|
|
105
|
-
} | {
|
|
106
|
-
type: "remote-v2";
|
|
107
|
-
url: string;
|
|
108
|
-
};
|
|
109
|
-
title?: string | undefined;
|
|
110
|
-
}, {
|
|
111
|
-
id: string;
|
|
112
|
-
spec: {
|
|
113
|
-
type: "local-dev";
|
|
114
|
-
path: string;
|
|
115
|
-
} | {
|
|
116
|
-
type: "remote-v1";
|
|
117
|
-
url: string;
|
|
118
|
-
} | {
|
|
119
|
-
type: "remote-v2";
|
|
120
|
-
url: string;
|
|
121
|
-
};
|
|
122
|
-
title?: string | undefined;
|
|
123
|
-
}>;
|
|
124
|
-
export type RegistryEntry = z.infer<typeof RegistryEntry>;
|
|
125
|
-
export declare const RegistryList: z.ZodArray<z.ZodObject<{
|
|
126
|
-
id: z.ZodString;
|
|
127
|
-
title: z.ZodOptional<z.ZodString>;
|
|
128
|
-
spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
129
|
-
type: z.ZodLiteral<"remote-v1">;
|
|
130
|
-
url: z.ZodString;
|
|
131
|
-
}, "strip", z.ZodTypeAny, {
|
|
132
|
-
type: "remote-v1";
|
|
133
|
-
url: string;
|
|
134
|
-
}, {
|
|
135
|
-
type: "remote-v1";
|
|
136
|
-
url: string;
|
|
137
|
-
}>, z.ZodObject<{
|
|
138
|
-
type: z.ZodLiteral<"remote-v2">;
|
|
139
|
-
url: z.ZodString;
|
|
140
|
-
}, "strip", z.ZodTypeAny, {
|
|
141
|
-
type: "remote-v2";
|
|
142
|
-
url: string;
|
|
143
|
-
}, {
|
|
144
|
-
type: "remote-v2";
|
|
145
|
-
url: string;
|
|
146
|
-
}>, z.ZodObject<{
|
|
147
|
-
type: z.ZodLiteral<"local-dev">;
|
|
148
|
-
path: z.ZodString;
|
|
149
|
-
}, "strip", z.ZodTypeAny, {
|
|
150
|
-
type: "local-dev";
|
|
151
|
-
path: string;
|
|
152
|
-
}, {
|
|
153
|
-
type: "local-dev";
|
|
154
|
-
path: string;
|
|
155
|
-
}>]>;
|
|
156
|
+
type: "local-dev";
|
|
157
|
+
}>]>;
|
|
156
158
|
}, "strip", z.ZodTypeAny, {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
159
|
+
id: string;
|
|
160
|
+
spec: {
|
|
161
|
+
type: "remote-v1";
|
|
162
|
+
url: string;
|
|
163
|
+
} | {
|
|
164
|
+
type: "remote-v2";
|
|
165
|
+
url: string;
|
|
166
|
+
} | {
|
|
167
|
+
path: string;
|
|
168
|
+
type: "local-dev";
|
|
169
|
+
};
|
|
170
|
+
title?: string | undefined;
|
|
169
171
|
}, {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
172
|
+
id: string;
|
|
173
|
+
spec: {
|
|
174
|
+
type: "remote-v1";
|
|
175
|
+
url: string;
|
|
176
|
+
} | {
|
|
177
|
+
type: "remote-v2";
|
|
178
|
+
url: string;
|
|
179
|
+
} | {
|
|
180
|
+
path: string;
|
|
181
|
+
type: "local-dev";
|
|
182
|
+
};
|
|
183
|
+
title?: string | undefined;
|
|
182
184
|
}>, "many">;
|
|
183
|
-
|
|
185
|
+
type RegistryList = z.infer<typeof RegistryList>;
|
|
186
|
+
//#endregion
|
|
187
|
+
export { LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RemoteRegistryV1Spec, RemoteRegistryV2Spec };
|
|
184
188
|
//# sourceMappingURL=registry_spec.d.ts.map
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
|
|
3
|
+
//#region src/block_registry/registry_spec.ts
|
|
3
4
|
const LocalDevFolder = z.object({
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
type: z.literal("local-dev"),
|
|
6
|
+
path: z.string()
|
|
6
7
|
});
|
|
7
8
|
/** @deprecated don't use */
|
|
8
9
|
const RemoteRegistryV1Spec = z.object({
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
type: z.literal("remote-v1"),
|
|
11
|
+
url: z.string().url()
|
|
11
12
|
});
|
|
12
13
|
const RemoteRegistryV2Spec = z.object({
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
type: z.literal("remote-v2"),
|
|
15
|
+
url: z.string().url()
|
|
15
16
|
});
|
|
16
17
|
const RegistrySpec = z.discriminatedUnion("type", [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
RemoteRegistryV1Spec,
|
|
19
|
+
RemoteRegistryV2Spec,
|
|
20
|
+
LocalDevFolder
|
|
20
21
|
]);
|
|
21
22
|
const RegistryEntry = z.object({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
id: z.string(),
|
|
24
|
+
title: z.string().optional(),
|
|
25
|
+
spec: RegistrySpec
|
|
25
26
|
});
|
|
26
27
|
const RegistryList = z.array(RegistryEntry);
|
|
27
28
|
|
|
29
|
+
//#endregion
|
|
28
30
|
export { LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RemoteRegistryV1Spec, RemoteRegistryV2Spec };
|
|
29
|
-
//# sourceMappingURL=registry_spec.js.map
|
|
31
|
+
//# sourceMappingURL=registry_spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry_spec.js","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"],"
|
|
1
|
+
{"version":3,"file":"registry_spec.js","names":[],"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"],"mappings":";;;AAEA,MAAa,iBAAiB,EAAE,OAAO;CACrC,MAAM,EAAE,QAAQ,YAAY;CAC5B,MAAM,EAAE,QAAQ;CACjB,CAAC;;AAIF,MAAa,uBAAuB,EAAE,OAAO;CAC3C,MAAM,EAAE,QAAQ,YAAY;CAC5B,KAAK,EAAE,QAAQ,CAAC,KAAK;CACtB,CAAC;AAIF,MAAa,uBAAuB,EAAE,OAAO;CAC3C,MAAM,EAAE,QAAQ,YAAY;CAC5B,KAAK,EAAE,QAAQ,CAAC,KAAK;CACtB,CAAC;AAGF,MAAa,eAAe,EAAE,mBAAmB,QAAQ;CACvD;CACA;CACA;CACD,CAAC;AAGF,MAAa,gBAAgB,EAAE,OAAO;CACpC,IAAI,EAAE,QAAQ;CACd,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC5B,MAAM;CACP,CAAC;AAGF,MAAa,eAAe,EAAE,MAAM,cAAc"}
|
package/dist/block_settings.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_settings.cjs","sources":["../src/block_settings.ts"],"sourcesContent":["/**\n * What part of block version should be locked against updates.\n *\n * - `major` - 1.2.3 can be updated to 1.4.7\n * - `minor` - 1.2.3 can be updated to 1.2.5\n * - `patch` - version of the block is completely locked\n *\n * */\nexport type VersionLock = \"major\" | \"minor\" | \"patch\";\n\n/**\n * Block settings, persisted on the backend.\n *\n * Settings modulate different aspects of block behaviour,\n * currently only updates.\n * */\nexport type BlockSettings = {\n /** Only version strictly greater that this one will be suggested for auto-update. */\n skipVersion?: string;\n /**\n * If certain version locking policy is set, auto-updates will only be suggested,\n * if there is an update within the specified release line.\n * */\n versionLock?: VersionLock;\n};\n\nexport const InitialBlockSettings: BlockSettings = {};\n"],"
|
|
1
|
+
{"version":3,"file":"block_settings.cjs","names":[],"sources":["../src/block_settings.ts"],"sourcesContent":["/**\n * What part of block version should be locked against updates.\n *\n * - `major` - 1.2.3 can be updated to 1.4.7\n * - `minor` - 1.2.3 can be updated to 1.2.5\n * - `patch` - version of the block is completely locked\n *\n * */\nexport type VersionLock = \"major\" | \"minor\" | \"patch\";\n\n/**\n * Block settings, persisted on the backend.\n *\n * Settings modulate different aspects of block behaviour,\n * currently only updates.\n * */\nexport type BlockSettings = {\n /** Only version strictly greater that this one will be suggested for auto-update. */\n skipVersion?: string;\n /**\n * If certain version locking policy is set, auto-updates will only be suggested,\n * if there is an update within the specified release line.\n * */\n versionLock?: VersionLock;\n};\n\nexport const InitialBlockSettings: BlockSettings = {};\n"],"mappings":";;AA0BA,MAAa,uBAAsC,EAAE"}
|