@milaboratories/pl-model-middle-layer 1.11.3 → 1.11.5
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/author_marker.d.ts +1 -1
- 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 +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 +6 -3
- package/dist/block_meta/block_description.cjs.map +1 -1
- package/dist/block_meta/block_description.d.ts +4 -4
- package/dist/block_meta/block_description.d.ts.map +1 -1
- package/dist/block_meta/block_description.js +6 -3
- package/dist/block_meta/block_description.js.map +1 -1
- package/dist/block_meta/block_id.cjs.map +1 -1
- package/dist/block_meta/block_id.d.ts +1 -1
- package/dist/block_meta/block_id.js.map +1 -1
- package/dist/block_meta/block_manifest.cjs +6 -4
- package/dist/block_meta/block_manifest.cjs.map +1 -1
- package/dist/block_meta/block_manifest.d.ts +2 -2
- package/dist/block_meta/block_manifest.d.ts.map +1 -1
- package/dist/block_meta/block_manifest.js +6 -4
- package/dist/block_meta/block_manifest.js.map +1 -1
- package/dist/block_meta/block_meta.cjs +10 -8
- package/dist/block_meta/block_meta.cjs.map +1 -1
- package/dist/block_meta/block_meta.d.ts +1 -1
- package/dist/block_meta/block_meta.d.ts.map +1 -1
- package/dist/block_meta/block_meta.js +10 -8
- package/dist/block_meta/block_meta.js.map +1 -1
- package/dist/block_meta/common.d.ts +2 -2
- package/dist/block_meta/content_conversion.cjs +6 -6
- 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.js +6 -6
- package/dist/block_meta/content_conversion.js.map +1 -1
- package/dist/block_meta/content_types.cjs +35 -35
- package/dist/block_meta/content_types.cjs.map +1 -1
- package/dist/block_meta/content_types.d.ts +1 -1
- package/dist/block_meta/content_types.js +35 -35
- package/dist/block_meta/content_types.js.map +1 -1
- package/dist/block_meta/index.d.ts +9 -9
- package/dist/block_meta/semver.cjs +1 -1
- package/dist/block_meta/semver.cjs.map +1 -1
- package/dist/block_meta/semver.d.ts +1 -1
- package/dist/block_meta/semver.js +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.d.ts +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/index.d.ts +3 -3
- package/dist/block_registry/overview.cjs +18 -10
- package/dist/block_registry/overview.cjs.map +1 -1
- package/dist/block_registry/overview.d.ts +1 -1
- package/dist/block_registry/overview.d.ts.map +1 -1
- package/dist/block_registry/overview.js +18 -10
- package/dist/block_registry/overview.js.map +1 -1
- package/dist/block_registry/registry_spec.cjs +4 -4
- package/dist/block_registry/registry_spec.cjs.map +1 -1
- package/dist/block_registry/registry_spec.d.ts +1 -1
- package/dist/block_registry/registry_spec.js +4 -4
- package/dist/block_registry/registry_spec.js.map +1 -1
- package/dist/block_settings.cjs.map +1 -1
- package/dist/block_settings.d.ts +1 -1
- package/dist/block_settings.js.map +1 -1
- package/dist/block_state.d.ts +4 -4
- package/dist/block_state.d.ts.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/json.cjs +4 -4
- package/dist/json.cjs.map +1 -1
- package/dist/json.d.ts +1 -1
- package/dist/json.d.ts.map +1 -1
- package/dist/json.js +4 -4
- package/dist/json.js.map +1 -1
- package/dist/pframe/index.d.ts +1 -1
- package/dist/pframe/internal_api/api_factory.cjs +2 -2
- package/dist/pframe/internal_api/api_factory.cjs.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts +3 -3
- package/dist/pframe/internal_api/api_factory.js +2 -2
- package/dist/pframe/internal_api/api_factory.js.map +1 -1
- package/dist/pframe/internal_api/api_read.d.ts +6 -6
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_wasm.d.ts +4 -4
- package/dist/pframe/internal_api/api_wasm.d.ts.map +1 -1
- package/dist/pframe/internal_api/common.d.ts +3 -3
- package/dist/pframe/internal_api/common.d.ts.map +1 -1
- package/dist/pframe/internal_api/create_table.d.ts +9 -9
- 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/find_columns.d.ts +2 -2
- package/dist/pframe/internal_api/http_helpers.cjs +4 -4
- package/dist/pframe/internal_api/http_helpers.cjs.map +1 -1
- package/dist/pframe/internal_api/http_helpers.d.ts +43 -43
- package/dist/pframe/internal_api/http_helpers.d.ts.map +1 -1
- package/dist/pframe/internal_api/http_helpers.js +4 -4
- package/dist/pframe/internal_api/http_helpers.js.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +11 -11
- package/dist/pframe/internal_api/pframe.d.ts +4 -4
- package/dist/pframe/internal_api/table.d.ts +2 -2
- package/dist/pframe/internal_api/table.d.ts.map +1 -1
- package/dist/project_list.d.ts +1 -1
- package/dist/project_overview.d.ts +7 -7
- package/dist/project_overview.d.ts.map +1 -1
- package/dist/update_info.d.ts +2 -2
- package/package.json +18 -17
- package/src/author_marker.ts +1 -1
- package/src/block_meta/block_components.ts +7 -7
- package/src/block_meta/block_description.ts +17 -14
- package/src/block_meta/block_id.ts +3 -3
- package/src/block_meta/block_manifest.ts +16 -14
- package/src/block_meta/block_meta.ts +17 -21
- package/src/block_meta/common.ts +2 -2
- package/src/block_meta/content_conversion.ts +7 -7
- package/src/block_meta/content_types.ts +35 -35
- package/src/block_meta/index.ts +9 -9
- package/src/block_meta/semver.ts +2 -2
- package/src/block_registry/block_pack_spec.ts +7 -7
- package/src/block_registry/index.ts +3 -3
- package/src/block_registry/overview.ts +34 -26
- package/src/block_registry/registry_spec.ts +5 -5
- package/src/block_settings.ts +1 -1
- package/src/block_state.ts +10 -4
- package/src/index.ts +11 -11
- package/src/json.ts +17 -11
- package/src/pframe/index.ts +1 -1
- package/src/pframe/internal_api/api_factory.ts +6 -6
- package/src/pframe/internal_api/api_read.ts +20 -14
- package/src/pframe/internal_api/api_wasm.ts +9 -20
- package/src/pframe/internal_api/common.ts +5 -7
- package/src/pframe/internal_api/create_table.ts +14 -9
- 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 +52 -52
- package/src/pframe/internal_api/index.ts +11 -11
- package/src/pframe/internal_api/pframe.ts +5 -5
- package/src/pframe/internal_api/table.ts +4 -8
- package/src/project_list.ts +1 -1
- package/src/project_overview.ts +14 -7
- package/src/update_info.ts +2 -2
|
@@ -12,13 +12,13 @@ require('../block_meta/block_manifest.cjs');
|
|
|
12
12
|
/** Block pack from local folder, to be used during block development. Old layout.
|
|
13
13
|
* @deprecated don't use */
|
|
14
14
|
const BlockPackDevV1 = zod.z.object({
|
|
15
|
-
type: zod.z.literal(
|
|
15
|
+
type: zod.z.literal("dev-v1"),
|
|
16
16
|
folder: zod.z.string(),
|
|
17
17
|
mtime: zod.z.string().optional(),
|
|
18
18
|
});
|
|
19
19
|
/** Block pack from local folder, to be used during block development. New layout. */
|
|
20
20
|
const BlockPackDevV2 = zod.z.object({
|
|
21
|
-
type: zod.z.literal(
|
|
21
|
+
type: zod.z.literal("dev-v2"),
|
|
22
22
|
folder: zod.z.string(),
|
|
23
23
|
mtime: zod.z.string().optional(),
|
|
24
24
|
});
|
|
@@ -28,20 +28,20 @@ const BlockPackDevV2 = zod.z.object({
|
|
|
28
28
|
* @deprecated don't use
|
|
29
29
|
* */
|
|
30
30
|
const BlockPackFromRegistryV1 = zod.z.object({
|
|
31
|
-
type: zod.z.literal(
|
|
31
|
+
type: zod.z.literal("from-registry-v1"),
|
|
32
32
|
registryUrl: zod.z.string(),
|
|
33
33
|
id: block_id.BlockPackId,
|
|
34
34
|
});
|
|
35
35
|
/** Block pack from registry with version 2 layout, to be loaded directly
|
|
36
36
|
* from the client. */
|
|
37
37
|
const BlockPackFromRegistryV2 = zod.z.object({
|
|
38
|
-
type: zod.z.literal(
|
|
38
|
+
type: zod.z.literal("from-registry-v2"),
|
|
39
39
|
registryUrl: zod.z.string(),
|
|
40
40
|
id: block_id.BlockPackId,
|
|
41
41
|
channel: zod.z.string().optional(),
|
|
42
42
|
});
|
|
43
43
|
/** Information about block origin, can be used to instantiate new blocks */
|
|
44
|
-
const BlockPackSpec = zod.z.discriminatedUnion(
|
|
44
|
+
const BlockPackSpec = zod.z.discriminatedUnion("type", [
|
|
45
45
|
BlockPackDevV1,
|
|
46
46
|
BlockPackDevV2,
|
|
47
47
|
BlockPackFromRegistryV1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_pack_spec.cjs","sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"block_pack_spec.cjs","sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { BlockPackId } from \"../block_meta\";\n\n/** Block pack from local folder, to be used during block development. Old layout.\n * @deprecated don't use */\nexport const BlockPackDevV1 = z.object({\n type: z.literal(\"dev-v1\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\n/** @deprecated don't use */\nexport type BlockPackDevV1 = z.infer<typeof BlockPackDevV1>;\n\n/** Block pack from local folder, to be used during block development. New layout. */\nexport const BlockPackDevV2 = z.object({\n type: z.literal(\"dev-v2\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\nexport type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;\n\n/**\n * Block pack from registry with version 2 layout, to be loaded directly\n * from the client.\n * @deprecated don't use\n * */\nexport const BlockPackFromRegistryV1 = z.object({\n type: z.literal(\"from-registry-v1\"),\n registryUrl: z.string(),\n id: BlockPackId,\n});\n/** @deprecated don't use */\nexport type BlockPackFromRegistryV1 = z.infer<typeof BlockPackFromRegistryV1>;\n\n/** Block pack from registry with version 2 layout, to be loaded directly\n * from the client. */\nexport const BlockPackFromRegistryV2 = z.object({\n type: z.literal(\"from-registry-v2\"),\n registryUrl: z.string(),\n id: BlockPackId,\n channel: z.string().optional(),\n});\nexport type BlockPackFromRegistryV2 = z.infer<typeof BlockPackFromRegistryV2>;\n\n/** Information about block origin, can be used to instantiate new blocks */\nexport const BlockPackSpec = z.discriminatedUnion(\"type\", [\n BlockPackDevV1,\n BlockPackDevV2,\n BlockPackFromRegistryV1,\n BlockPackFromRegistryV2,\n]);\nexport type BlockPackSpec = z.infer<typeof BlockPackSpec>;\n"],"names":["z","BlockPackId"],"mappings":";;;;;;;;;;;AAGA;AAC2B;AACpB,MAAM,cAAc,GAAGA,KAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACzB,IAAA,MAAM,EAAEA,KAAC,CAAC,MAAM,EAAE;AAClB,IAAA,KAAK,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC7B,CAAA;AAID;AACO,MAAM,cAAc,GAAGA,KAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACzB,IAAA,MAAM,EAAEA,KAAC,CAAC,MAAM,EAAE;AAClB,IAAA,KAAK,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC7B,CAAA;AAGD;;;;AAIK;AACE,MAAM,uBAAuB,GAAGA,KAAC,CAAC,MAAM,CAAC;AAC9C,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;AACnC,IAAA,WAAW,EAAEA,KAAC,CAAC,MAAM,EAAE;AACvB,IAAA,EAAE,EAAEC,oBAAW;AAChB,CAAA;AAID;AACsB;AACf,MAAM,uBAAuB,GAAGD,KAAC,CAAC,MAAM,CAAC;AAC9C,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;AACnC,IAAA,WAAW,EAAEA,KAAC,CAAC,MAAM,EAAE;AACvB,IAAA,EAAE,EAAEC,oBAAW;AACf,IAAA,OAAO,EAAED,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC/B,CAAA;AAGD;MACa,aAAa,GAAGA,KAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACxD,cAAc;IACd,cAAc;IACd,uBAAuB;IACvB,uBAAuB;AACxB,CAAA;;;;;;;;"}
|
|
@@ -10,13 +10,13 @@ import '../block_meta/block_manifest.js';
|
|
|
10
10
|
/** Block pack from local folder, to be used during block development. Old layout.
|
|
11
11
|
* @deprecated don't use */
|
|
12
12
|
const BlockPackDevV1 = z.object({
|
|
13
|
-
type: z.literal(
|
|
13
|
+
type: z.literal("dev-v1"),
|
|
14
14
|
folder: z.string(),
|
|
15
15
|
mtime: z.string().optional(),
|
|
16
16
|
});
|
|
17
17
|
/** Block pack from local folder, to be used during block development. New layout. */
|
|
18
18
|
const BlockPackDevV2 = z.object({
|
|
19
|
-
type: z.literal(
|
|
19
|
+
type: z.literal("dev-v2"),
|
|
20
20
|
folder: z.string(),
|
|
21
21
|
mtime: z.string().optional(),
|
|
22
22
|
});
|
|
@@ -26,20 +26,20 @@ const BlockPackDevV2 = z.object({
|
|
|
26
26
|
* @deprecated don't use
|
|
27
27
|
* */
|
|
28
28
|
const BlockPackFromRegistryV1 = z.object({
|
|
29
|
-
type: z.literal(
|
|
29
|
+
type: z.literal("from-registry-v1"),
|
|
30
30
|
registryUrl: z.string(),
|
|
31
31
|
id: BlockPackId,
|
|
32
32
|
});
|
|
33
33
|
/** Block pack from registry with version 2 layout, to be loaded directly
|
|
34
34
|
* from the client. */
|
|
35
35
|
const BlockPackFromRegistryV2 = z.object({
|
|
36
|
-
type: z.literal(
|
|
36
|
+
type: z.literal("from-registry-v2"),
|
|
37
37
|
registryUrl: z.string(),
|
|
38
38
|
id: BlockPackId,
|
|
39
39
|
channel: z.string().optional(),
|
|
40
40
|
});
|
|
41
41
|
/** Information about block origin, can be used to instantiate new blocks */
|
|
42
|
-
const BlockPackSpec = z.discriminatedUnion(
|
|
42
|
+
const BlockPackSpec = z.discriminatedUnion("type", [
|
|
43
43
|
BlockPackDevV1,
|
|
44
44
|
BlockPackDevV2,
|
|
45
45
|
BlockPackFromRegistryV1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_pack_spec.js","sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"block_pack_spec.js","sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { BlockPackId } from \"../block_meta\";\n\n/** Block pack from local folder, to be used during block development. Old layout.\n * @deprecated don't use */\nexport const BlockPackDevV1 = z.object({\n type: z.literal(\"dev-v1\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\n/** @deprecated don't use */\nexport type BlockPackDevV1 = z.infer<typeof BlockPackDevV1>;\n\n/** Block pack from local folder, to be used during block development. New layout. */\nexport const BlockPackDevV2 = z.object({\n type: z.literal(\"dev-v2\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\nexport type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;\n\n/**\n * Block pack from registry with version 2 layout, to be loaded directly\n * from the client.\n * @deprecated don't use\n * */\nexport const BlockPackFromRegistryV1 = z.object({\n type: z.literal(\"from-registry-v1\"),\n registryUrl: z.string(),\n id: BlockPackId,\n});\n/** @deprecated don't use */\nexport type BlockPackFromRegistryV1 = z.infer<typeof BlockPackFromRegistryV1>;\n\n/** Block pack from registry with version 2 layout, to be loaded directly\n * from the client. */\nexport const BlockPackFromRegistryV2 = z.object({\n type: z.literal(\"from-registry-v2\"),\n registryUrl: z.string(),\n id: BlockPackId,\n channel: z.string().optional(),\n});\nexport type BlockPackFromRegistryV2 = z.infer<typeof BlockPackFromRegistryV2>;\n\n/** Information about block origin, can be used to instantiate new blocks */\nexport const BlockPackSpec = z.discriminatedUnion(\"type\", [\n BlockPackDevV1,\n BlockPackDevV2,\n BlockPackFromRegistryV1,\n BlockPackFromRegistryV2,\n]);\nexport type BlockPackSpec = z.infer<typeof BlockPackSpec>;\n"],"names":[],"mappings":";;;;;;;;;AAGA;AAC2B;AACpB,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACzB,IAAA,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;AAClB,IAAA,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC7B,CAAA;AAID;AACO,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACzB,IAAA,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;AAClB,IAAA,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC7B,CAAA;AAGD;;;;AAIK;AACE,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC9C,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;AACnC,IAAA,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;AACvB,IAAA,EAAE,EAAE,WAAW;AAChB,CAAA;AAID;AACsB;AACf,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC9C,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;AACnC,IAAA,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;AACvB,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC/B,CAAA;AAGD;MACa,aAAa,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACxD,cAAc;IACd,cAAc;IACd,uBAAuB;IACvB,uBAAuB;AACxB,CAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from "./block_pack_spec";
|
|
2
|
+
export * from "./overview";
|
|
3
|
+
export * from "./registry_spec";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -14,28 +14,34 @@ var registry_spec = require('./registry_spec.cjs');
|
|
|
14
14
|
/**
|
|
15
15
|
* Latest information about specific block pack. Contain information about latest version of the package.
|
|
16
16
|
* */
|
|
17
|
-
const BlockPackOverviewLegacy = zod.z
|
|
17
|
+
const BlockPackOverviewLegacy = zod.z
|
|
18
|
+
.object({
|
|
18
19
|
registryId: zod.z.string(),
|
|
19
20
|
id: block_id.BlockPackId,
|
|
20
21
|
meta: block_meta.BlockPackMetaEmbeddedBytes,
|
|
21
22
|
spec: block_pack_spec.BlockPackSpec,
|
|
22
23
|
otherVersions: zod.z.array(semver.SemVer),
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
const
|
|
24
|
+
})
|
|
25
|
+
.passthrough();
|
|
26
|
+
const AnyChannel = "any";
|
|
27
|
+
const StableChannel = "stable";
|
|
28
|
+
const VersionWithChannels = zod.z
|
|
29
|
+
.object({
|
|
27
30
|
version: semver.SemVer,
|
|
28
31
|
channels: zod.z.array(zod.z.string()),
|
|
29
|
-
})
|
|
32
|
+
})
|
|
33
|
+
.passthrough();
|
|
30
34
|
/**
|
|
31
35
|
* Information about specific block pack version.
|
|
32
36
|
* */
|
|
33
|
-
const SingleBlockPackOverview = zod.z
|
|
37
|
+
const SingleBlockPackOverview = zod.z
|
|
38
|
+
.object({
|
|
34
39
|
id: block_id.BlockPackId,
|
|
35
40
|
meta: block_meta.BlockPackMetaEmbeddedBytes,
|
|
36
41
|
featureFlags: block_description.FeatureFlags.optional(),
|
|
37
42
|
spec: block_pack_spec.BlockPackSpec,
|
|
38
|
-
})
|
|
43
|
+
})
|
|
44
|
+
.passthrough();
|
|
39
45
|
/**
|
|
40
46
|
* Latest information about specific block pack. Contain information about latest version of the package.
|
|
41
47
|
* */
|
|
@@ -46,9 +52,11 @@ const BlockPackOverviewRaw = zod.z.object({
|
|
|
46
52
|
registryId: zod.z.string(),
|
|
47
53
|
});
|
|
48
54
|
const BlockPackOverview = BlockPackOverviewRaw.passthrough();
|
|
49
|
-
const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({
|
|
55
|
+
const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({
|
|
56
|
+
registryId: true,
|
|
57
|
+
}).passthrough();
|
|
50
58
|
const RegistryStatus = registry_spec.RegistryEntry.extend({
|
|
51
|
-
status: zod.z.union([zod.z.literal(
|
|
59
|
+
status: zod.z.union([zod.z.literal("online"), zod.z.literal("offline")]),
|
|
52
60
|
});
|
|
53
61
|
const BlockPackListing = zod.z.object({
|
|
54
62
|
registries: zod.z.array(RegistryStatus),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview.cjs","sources":["../../src/block_registry/overview.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"overview.cjs","sources":["../../src/block_registry/overview.ts"],"sourcesContent":["import { z } from \"zod\";\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n FeatureFlags,\n SemVer,\n} from \"../block_meta\";\nimport type { BlockPackFromRegistryV2 } from \"./block_pack_spec\";\nimport { BlockPackSpec } from \"./block_pack_spec\";\nimport { RegistryEntry } from \"./registry_spec\";\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverviewLegacy = z\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"],"names":["z","BlockPackId","BlockPackMetaEmbeddedBytes","BlockPackSpec","SemVer","FeatureFlags","BlockPackIdNoVersion","RegistryEntry"],"mappings":";;;;;;;;;;;;;AAYA;;AAEK;AACE,MAAM,uBAAuB,GAAGA;AACpC,KAAA,MAAM,CAAC;AACN,IAAA,UAAU,EAAEA,KAAC,CAAC,MAAM,EAAE;AACtB,IAAA,EAAE,EAAEC,oBAAW;AACf,IAAA,IAAI,EAAEC,qCAA0B;AAChC,IAAA,IAAI,EAAEC,6BAAa;AACnB,IAAA,aAAa,EAAEH,KAAC,CAAC,KAAK,CAACI,aAAM,CAAC;CAC/B;AACA,KAAA,WAAW;AAGP,MAAM,UAAU,GAAG;AACnB,MAAM,aAAa,GAAG;AAEtB,MAAM,mBAAmB,GAAGJ;AAChC,KAAA,MAAM,CAAC;AACN,IAAA,OAAO,EAAEI,aAAM;IACf,QAAQ,EAAEJ,KAAC,CAAC,KAAK,CAACA,KAAC,CAAC,MAAM,EAAE,CAAC;CAC9B;AACA,KAAA,WAAW;AAEd;;AAEK;AACE,MAAM,uBAAuB,GAAGA;AACpC,KAAA,MAAM,CAAC;AACN,IAAA,EAAE,EAAEC,oBAAW;AACf,IAAA,IAAI,EAAEC,qCAA0B;AAChC,IAAA,YAAY,EAAEG,8BAAY,CAAC,QAAQ,EAAE;AACrC,IAAA,IAAI,EAAEF,6BAAa;CACpB;AACA,KAAA,WAAW;AAGd;;AAEK;AACE,MAAM,oBAAoB,GAAGH,KAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,EAAE,EAAEM,6BAAoB;IACxB,eAAe,EAAEN,KAAC,CAAC,MAAM,CAACA,KAAC,CAAC,MAAM,EAAE,EAAE,uBAAuB,CAAC;AAC9D,IAAA,WAAW,EAAEA,KAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC;AACzC,IAAA,UAAU,EAAEA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,iBAAiB,GAAG,uBAAuB,CAazF"}
|
|
@@ -12,28 +12,34 @@ import { RegistryEntry } from './registry_spec.js';
|
|
|
12
12
|
/**
|
|
13
13
|
* Latest information about specific block pack. Contain information about latest version of the package.
|
|
14
14
|
* */
|
|
15
|
-
const BlockPackOverviewLegacy = z
|
|
15
|
+
const BlockPackOverviewLegacy = z
|
|
16
|
+
.object({
|
|
16
17
|
registryId: z.string(),
|
|
17
18
|
id: BlockPackId,
|
|
18
19
|
meta: BlockPackMetaEmbeddedBytes,
|
|
19
20
|
spec: BlockPackSpec,
|
|
20
21
|
otherVersions: z.array(SemVer),
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
22
|
+
})
|
|
23
|
+
.passthrough();
|
|
24
|
+
const AnyChannel = "any";
|
|
25
|
+
const StableChannel = "stable";
|
|
26
|
+
const VersionWithChannels = z
|
|
27
|
+
.object({
|
|
25
28
|
version: SemVer,
|
|
26
29
|
channels: z.array(z.string()),
|
|
27
|
-
})
|
|
30
|
+
})
|
|
31
|
+
.passthrough();
|
|
28
32
|
/**
|
|
29
33
|
* Information about specific block pack version.
|
|
30
34
|
* */
|
|
31
|
-
const SingleBlockPackOverview = z
|
|
35
|
+
const SingleBlockPackOverview = z
|
|
36
|
+
.object({
|
|
32
37
|
id: BlockPackId,
|
|
33
38
|
meta: BlockPackMetaEmbeddedBytes,
|
|
34
39
|
featureFlags: FeatureFlags.optional(),
|
|
35
40
|
spec: BlockPackSpec,
|
|
36
|
-
})
|
|
41
|
+
})
|
|
42
|
+
.passthrough();
|
|
37
43
|
/**
|
|
38
44
|
* Latest information about specific block pack. Contain information about latest version of the package.
|
|
39
45
|
* */
|
|
@@ -44,9 +50,11 @@ const BlockPackOverviewRaw = z.object({
|
|
|
44
50
|
registryId: z.string(),
|
|
45
51
|
});
|
|
46
52
|
const BlockPackOverview = BlockPackOverviewRaw.passthrough();
|
|
47
|
-
const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({
|
|
53
|
+
const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({
|
|
54
|
+
registryId: true,
|
|
55
|
+
}).passthrough();
|
|
48
56
|
const RegistryStatus = RegistryEntry.extend({
|
|
49
|
-
status: z.union([z.literal(
|
|
57
|
+
status: z.union([z.literal("online"), z.literal("offline")]),
|
|
50
58
|
});
|
|
51
59
|
const BlockPackListing = z.object({
|
|
52
60
|
registries: z.array(RegistryStatus),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview.js","sources":["../../src/block_registry/overview.ts"],"sourcesContent":["import { z } from
|
|
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"],"names":[],"mappings":";;;;;;;;;;;AAYA;;AAEK;AACE,MAAM,uBAAuB,GAAG;AACpC,KAAA,MAAM,CAAC;AACN,IAAA,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;AACtB,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,IAAI,EAAE,0BAA0B;AAChC,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;CAC/B;AACA,KAAA,WAAW;AAGP,MAAM,UAAU,GAAG;AACnB,MAAM,aAAa,GAAG;AAEtB,MAAM,mBAAmB,GAAG;AAChC,KAAA,MAAM,CAAC;AACN,IAAA,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC9B;AACA,KAAA,WAAW;AAEd;;AAEK;AACE,MAAM,uBAAuB,GAAG;AACpC,KAAA,MAAM,CAAC;AACN,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,IAAI,EAAE,0BAA0B;AAChC,IAAA,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE;AACrC,IAAA,IAAI,EAAE,aAAa;CACpB;AACA,KAAA,WAAW;AAGd;;AAEK;AACE,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,EAAE,EAAE,oBAAoB;IACxB,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,uBAAuB,CAAC;AAC9D,IAAA,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC;AAC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
|
|
|
3
3
|
var zod = require('zod');
|
|
4
4
|
|
|
5
5
|
const LocalDevFolder = zod.z.object({
|
|
6
|
-
type: zod.z.literal(
|
|
6
|
+
type: zod.z.literal("local-dev"),
|
|
7
7
|
path: zod.z.string(),
|
|
8
8
|
});
|
|
9
9
|
/** @deprecated don't use */
|
|
10
10
|
const RemoteRegistryV1Spec = zod.z.object({
|
|
11
|
-
type: zod.z.literal(
|
|
11
|
+
type: zod.z.literal("remote-v1"),
|
|
12
12
|
url: zod.z.string().url(),
|
|
13
13
|
});
|
|
14
14
|
const RemoteRegistryV2Spec = zod.z.object({
|
|
15
|
-
type: zod.z.literal(
|
|
15
|
+
type: zod.z.literal("remote-v2"),
|
|
16
16
|
url: zod.z.string().url(),
|
|
17
17
|
});
|
|
18
|
-
const RegistrySpec = zod.z.discriminatedUnion(
|
|
18
|
+
const RegistrySpec = zod.z.discriminatedUnion("type", [
|
|
19
19
|
RemoteRegistryV1Spec,
|
|
20
20
|
RemoteRegistryV2Spec,
|
|
21
21
|
LocalDevFolder,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry_spec.cjs","sources":["../../src/block_registry/registry_spec.ts"],"sourcesContent":["import { z } from
|
|
1
|
+
{"version":3,"file":"registry_spec.cjs","sources":["../../src/block_registry/registry_spec.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const LocalDevFolder = z.object({\n type: z.literal(\"local-dev\"),\n path: z.string(),\n});\nexport type LocalDevFolder = z.infer<typeof LocalDevFolder>;\n\n/** @deprecated don't use */\nexport const RemoteRegistryV1Spec = z.object({\n type: z.literal(\"remote-v1\"),\n url: z.string().url(),\n});\n/** @deprecated don't use */\nexport type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;\n\nexport const RemoteRegistryV2Spec = z.object({\n type: z.literal(\"remote-v2\"),\n url: z.string().url(),\n});\nexport type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;\n\nexport const RegistrySpec = z.discriminatedUnion(\"type\", [\n RemoteRegistryV1Spec,\n RemoteRegistryV2Spec,\n LocalDevFolder,\n]);\nexport type RegistrySpec = z.infer<typeof RegistrySpec>;\n\nexport const RegistryEntry = z.object({\n id: z.string(),\n title: z.string().optional(),\n spec: RegistrySpec,\n});\nexport type RegistryEntry = z.infer<typeof RegistryEntry>;\n\nexport const RegistryList = z.array(RegistryEntry);\nexport type RegistryList = z.infer<typeof RegistryList>;\n"],"names":["z"],"mappings":";;;;AAEO,MAAM,cAAc,GAAGA,KAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,IAAI,EAAEA,KAAC,CAAC,MAAM,EAAE;AACjB,CAAA;AAGD;AACO,MAAM,oBAAoB,GAAGA,KAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,GAAG,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,CAAA;AAIM,MAAM,oBAAoB,GAAGA,KAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,GAAG,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,CAAA;MAGY,YAAY,GAAGA,KAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACvD,oBAAoB;IACpB,oBAAoB;IACpB,cAAc;AACf,CAAA;AAGM,MAAM,aAAa,GAAGA,KAAC,CAAC,MAAM,CAAC;AACpC,IAAA,EAAE,EAAEA,KAAC,CAAC,MAAM,EAAE;AACd,IAAA,KAAK,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC5B,IAAA,IAAI,EAAE,YAAY;AACnB,CAAA;AAGM,MAAM,YAAY,GAAGA,KAAC,CAAC,KAAK,CAAC,aAAa;;;;;;;;;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
const LocalDevFolder = z.object({
|
|
4
|
-
type: z.literal(
|
|
4
|
+
type: z.literal("local-dev"),
|
|
5
5
|
path: z.string(),
|
|
6
6
|
});
|
|
7
7
|
/** @deprecated don't use */
|
|
8
8
|
const RemoteRegistryV1Spec = z.object({
|
|
9
|
-
type: z.literal(
|
|
9
|
+
type: z.literal("remote-v1"),
|
|
10
10
|
url: z.string().url(),
|
|
11
11
|
});
|
|
12
12
|
const RemoteRegistryV2Spec = z.object({
|
|
13
|
-
type: z.literal(
|
|
13
|
+
type: z.literal("remote-v2"),
|
|
14
14
|
url: z.string().url(),
|
|
15
15
|
});
|
|
16
|
-
const RegistrySpec = z.discriminatedUnion(
|
|
16
|
+
const RegistrySpec = z.discriminatedUnion("type", [
|
|
17
17
|
RemoteRegistryV1Spec,
|
|
18
18
|
RemoteRegistryV2Spec,
|
|
19
19
|
LocalDevFolder,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry_spec.js","sources":["../../src/block_registry/registry_spec.ts"],"sourcesContent":["import { z } from
|
|
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"],"names":[],"mappings":";;AAEO,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;AACjB,CAAA;AAGD;AACO,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,CAAA;AAIM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,CAAA;MAGY,YAAY,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACvD,oBAAoB;IACpB,oBAAoB;IACpB,cAAc;AACf,CAAA;AAGM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;AACpC,IAAA,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;AACd,IAAA,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC5B,IAAA,IAAI,EAAE,YAAY;AACnB,CAAA;AAGM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa;;;;"}
|
|
@@ -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 =
|
|
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"],"names":[],"mappings":";;AA0BO,MAAM,oBAAoB,GAAkB;;;;"}
|
package/dist/block_settings.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_settings.js","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 =
|
|
1
|
+
{"version":3,"file":"block_settings.js","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"],"names":[],"mappings":"AA0BO,MAAM,oBAAoB,GAAkB;;;;"}
|
package/dist/block_state.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AuthorMarker, BlockOutputsBase, BlockState, NavigationState, StringifiedJson } from
|
|
2
|
-
import type { StorageDebugView } from
|
|
3
|
-
import type { Optional } from
|
|
4
|
-
export type BlockStateInternal<Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`> = Optional<Readonly<BlockState<Args, Outputs, UiState, Href>>,
|
|
1
|
+
import type { AuthorMarker, BlockOutputsBase, BlockState, NavigationState, StringifiedJson } from "@milaboratories/pl-model-common";
|
|
2
|
+
import type { StorageDebugView } from "@platforma-sdk/model";
|
|
3
|
+
import type { Optional } from "utility-types";
|
|
4
|
+
export type BlockStateInternal<Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`> = Optional<Readonly<BlockState<Args, Outputs, UiState, Href>>, "outputs">;
|
|
5
5
|
export type BlockStateInternalV3<Outputs extends BlockOutputsBase = BlockOutputsBase, Href extends `/${string}` = `/${string}`> = {
|
|
6
6
|
/** Raw block storage - UI derives data using sdk/model */
|
|
7
7
|
readonly blockStorage: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_state.d.ts","sourceRoot":"","sources":["../src/block_state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"block_state.d.ts","sourceRoot":"","sources":["../src/block_state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,eAAe,EAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,MAAM,kBAAkB,CAC5B,IAAI,GAAG,OAAO,EACd,OAAO,SAAS,gBAAgB,GAAG,gBAAgB,EACnD,OAAO,GAAG,OAAO,EACjB,IAAI,SAAS,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,IACtC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AAG5E,MAAM,MAAM,oBAAoB,CAC9B,OAAO,SAAS,gBAAgB,GAAG,gBAAgB,EACnD,IAAI,SAAS,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,IACtC;IACF,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAE/B,8DAA8D;IAC9D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAE9D,yCAAyC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,+BAA+B;IAC/B,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAEhD,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAC;CAC3C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
1
|
+
export * from "./author_marker";
|
|
2
|
+
export * from "./block_settings";
|
|
3
|
+
export * from "./block_state";
|
|
4
|
+
export * from "./project";
|
|
5
|
+
export * from "./project_list";
|
|
6
|
+
export * from "./project_overview";
|
|
7
|
+
export * from "./update_info";
|
|
8
|
+
export * from "./block_meta";
|
|
9
|
+
export * from "./block_registry";
|
|
10
|
+
export * from "./pframe";
|
|
11
|
+
export * from "./json";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/json.cjs
CHANGED
|
@@ -5,16 +5,16 @@ var node_crypto = require('node:crypto');
|
|
|
5
5
|
var fs = require('node:fs');
|
|
6
6
|
|
|
7
7
|
function hashJson(value) {
|
|
8
|
-
const hash = node_crypto.createHash(
|
|
8
|
+
const hash = node_crypto.createHash("sha256");
|
|
9
9
|
hash.update(plModelCommon.canonicalizeJson(value));
|
|
10
|
-
return hash.digest().toString(
|
|
10
|
+
return hash.digest().toString("hex");
|
|
11
11
|
}
|
|
12
12
|
async function readJson(filePath, signal) {
|
|
13
|
-
const content = await fs.promises.readFile(filePath, { encoding:
|
|
13
|
+
const content = await fs.promises.readFile(filePath, { encoding: "utf8", signal });
|
|
14
14
|
return plModelCommon.parseJson(content);
|
|
15
15
|
}
|
|
16
16
|
function readJsonSync(filePath) {
|
|
17
|
-
const content = fs.readFileSync(filePath, { encoding:
|
|
17
|
+
const content = fs.readFileSync(filePath, { encoding: "utf8" });
|
|
18
18
|
return plModelCommon.parseJson(content);
|
|
19
19
|
}
|
|
20
20
|
|
package/dist/json.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.cjs","sources":["../src/json.ts"],"sourcesContent":["import {\n canonicalizeJson,\n parseJson,\n type JsonCompatible,\n type JsonSerializable,\n type StringifiedJson,\n} from
|
|
1
|
+
{"version":3,"file":"json.cjs","sources":["../src/json.ts"],"sourcesContent":["import {\n canonicalizeJson,\n parseJson,\n type JsonCompatible,\n type JsonSerializable,\n type StringifiedJson,\n} from \"@milaboratories/pl-model-common\";\nimport { createHash } from \"node:crypto\";\nimport fs from \"node:fs\";\n\nexport type HashedJson<T = unknown> =\n JsonCompatible<T> extends never\n ? never\n : string & {\n __json_hashed: T;\n };\n\nexport function hashJson<T>(value: JsonCompatible<T>): HashedJson<T>;\nexport function hashJson<T extends JsonSerializable>(value: T): string;\nexport function hashJson(value: unknown): string {\n const hash = createHash(\"sha256\");\n hash.update(canonicalizeJson(value));\n return hash.digest().toString(\"hex\");\n}\n\nexport async function readJson<T extends JsonSerializable>(\n filePath: string,\n signal?: AbortSignal,\n): Promise<T> {\n const content = await fs.promises.readFile(filePath, { encoding: \"utf8\", signal });\n return parseJson(content as StringifiedJson<T>);\n}\n\nexport function readJsonSync<T extends JsonSerializable>(filePath: string): T {\n const content = fs.readFileSync(filePath, { encoding: \"utf8\" });\n return parseJson(content as StringifiedJson<T>);\n}\n"],"names":["createHash","canonicalizeJson","parseJson"],"mappings":";;;;;;AAmBM,SAAU,QAAQ,CAAC,KAAc,EAAA;AACrC,IAAA,MAAM,IAAI,GAAGA,sBAAU,CAAC,QAAQ,CAAC;IACjC,IAAI,CAAC,MAAM,CAACC,8BAAgB,CAAC,KAAK,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;AACtC;AAEO,eAAe,QAAQ,CAC5B,QAAgB,EAChB,MAAoB,EAAA;AAEpB,IAAA,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAClF,IAAA,OAAOC,uBAAS,CAAC,OAA6B,CAAC;AACjD;AAEM,SAAU,YAAY,CAA6B,QAAgB,EAAA;AACvE,IAAA,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC/D,IAAA,OAAOA,uBAAS,CAAC,OAA6B,CAAC;AACjD;;;;;;"}
|
package/dist/json.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type JsonCompatible, type JsonSerializable } from
|
|
1
|
+
import { type JsonCompatible, type JsonSerializable } from "@milaboratories/pl-model-common";
|
|
2
2
|
export type HashedJson<T = unknown> = JsonCompatible<T> extends never ? never : string & {
|
|
3
3
|
__json_hashed: T;
|
|
4
4
|
};
|
package/dist/json.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAEtB,MAAM,iCAAiC,CAAC;AAIzC,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAEtB,MAAM,iCAAiC,CAAC;AAIzC,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,OAAO,IAChC,cAAc,CAAC,CAAC,CAAC,SAAS,KAAK,GAC3B,KAAK,GACL,MAAM,GAAG;IACP,aAAa,EAAE,CAAC,CAAC;CAClB,CAAC;AAER,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AACrE,wBAAgB,QAAQ,CAAC,CAAC,SAAS,gBAAgB,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC;AAOvE,wBAAsB,QAAQ,CAAC,CAAC,SAAS,gBAAgB,EACvD,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,CAAC,CAAC,CAGZ;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,gBAAgB,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,CAG5E"}
|
package/dist/json.js
CHANGED
|
@@ -3,16 +3,16 @@ import { createHash } from 'node:crypto';
|
|
|
3
3
|
import fs from 'node:fs';
|
|
4
4
|
|
|
5
5
|
function hashJson(value) {
|
|
6
|
-
const hash = createHash(
|
|
6
|
+
const hash = createHash("sha256");
|
|
7
7
|
hash.update(canonicalizeJson(value));
|
|
8
|
-
return hash.digest().toString(
|
|
8
|
+
return hash.digest().toString("hex");
|
|
9
9
|
}
|
|
10
10
|
async function readJson(filePath, signal) {
|
|
11
|
-
const content = await fs.promises.readFile(filePath, { encoding:
|
|
11
|
+
const content = await fs.promises.readFile(filePath, { encoding: "utf8", signal });
|
|
12
12
|
return parseJson(content);
|
|
13
13
|
}
|
|
14
14
|
function readJsonSync(filePath) {
|
|
15
|
-
const content = fs.readFileSync(filePath, { encoding:
|
|
15
|
+
const content = fs.readFileSync(filePath, { encoding: "utf8" });
|
|
16
16
|
return parseJson(content);
|
|
17
17
|
}
|
|
18
18
|
|