@milaboratories/pl-model-middle-layer 1.31.0 → 1.32.1
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.d.ts +8 -10
- package/dist/block_meta/block_components.d.ts.map +1 -1
- package/dist/block_meta/block_description.cjs +5 -1
- package/dist/block_meta/block_description.cjs.map +1 -1
- package/dist/block_meta/block_description.d.ts +91 -82
- package/dist/block_meta/block_description.d.ts.map +1 -1
- package/dist/block_meta/block_description.js +5 -2
- package/dist/block_meta/block_description.js.map +1 -1
- package/dist/block_meta/block_id.d.ts +10 -12
- package/dist/block_meta/block_id.d.ts.map +1 -1
- package/dist/block_meta/block_manifest.d.ts +25 -15
- package/dist/block_meta/block_manifest.d.ts.map +1 -1
- package/dist/block_meta/block_meta.d.ts +10 -12
- package/dist/block_meta/block_meta.d.ts.map +1 -1
- package/dist/block_meta/common.d.ts +2 -3
- package/dist/block_meta/common.d.ts.map +1 -1
- package/dist/block_meta/content_conversion.d.ts +2 -4
- package/dist/block_meta/content_conversion.d.ts.map +1 -1
- package/dist/block_meta/content_types.d.ts +29 -28
- package/dist/block_meta/content_types.d.ts.map +1 -1
- package/dist/block_meta/index.cjs +1 -0
- package/dist/block_meta/index.d.ts +2 -2
- package/dist/block_meta/index.js +2 -2
- package/dist/block_meta/semver.d.ts +1 -3
- package/dist/block_meta/semver.d.ts.map +1 -1
- package/dist/block_registry/block_pack_spec.d.ts +16 -18
- package/dist/block_registry/block_pack_spec.d.ts.map +1 -1
- package/dist/block_registry/overview.d.ts +137 -139
- package/dist/block_registry/overview.d.ts.map +1 -1
- package/dist/block_registry/registry_spec.d.ts +16 -18
- package/dist/block_registry/registry_spec.d.ts.map +1 -1
- package/dist/block_settings.d.ts +5 -5
- package/dist/block_settings.d.ts.map +1 -1
- package/dist/block_state.d.ts +9 -7
- package/dist/block_state.d.ts.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +2 -2
- package/dist/json.d.ts +5 -7
- package/dist/json.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts +10 -12
- package/dist/pframe/internal_api/api_factory.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_read.d.ts +2 -4
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
- package/dist/pframe/internal_api/common.d.ts +6 -8
- package/dist/pframe/internal_api/common.d.ts.map +1 -1
- package/dist/pframe/internal_api/create_table.d.ts +9 -11
- package/dist/pframe/internal_api/create_table.d.ts.map +1 -1
- package/dist/pframe/internal_api/delete_column.d.ts +2 -4
- package/dist/pframe/internal_api/delete_column.d.ts.map +1 -1
- package/dist/pframe/internal_api/discover_columns.d.ts +11 -12
- package/dist/pframe/internal_api/discover_columns.d.ts.map +1 -1
- package/dist/pframe/internal_api/find_columns.d.ts +5 -7
- package/dist/pframe/internal_api/find_columns.d.ts.map +1 -1
- package/dist/pframe/internal_api/http_helpers.d.ts +87 -53
- package/dist/pframe/internal_api/http_helpers.d.ts.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +0 -2
- package/dist/pframe/internal_api/pframe.d.ts +8 -7
- package/dist/pframe/internal_api/pframe.d.ts.map +1 -1
- package/dist/pframe/internal_api/table.d.ts +1 -3
- package/dist/pframe/internal_api/table.d.ts.map +1 -1
- package/dist/project.d.ts +1 -2
- package/dist/project.d.ts.map +1 -1
- package/dist/project_list.d.ts +1 -3
- package/dist/project_list.d.ts.map +1 -1
- package/dist/project_overview.d.ts +25 -15
- package/dist/project_overview.d.ts.map +1 -1
- package/dist/storage_debug_view.d.ts +1 -2
- package/dist/storage_debug_view.d.ts.map +1 -1
- package/dist/update_info.d.ts +3 -3
- package/dist/update_info.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/block_meta/block_description.ts +11 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
2
|
//#region src/block_meta/block_components.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Wrapped workflow component, schema version 1. Currently the only workflow
|
|
6
5
|
* schema; carries a single `main` entry pointing at the workflow source.
|
|
7
6
|
*/
|
|
8
|
-
type WorkflowV1<Content> = {
|
|
7
|
+
export type WorkflowV1<Content> = {
|
|
9
8
|
type: "workflow-v1";
|
|
10
9
|
main: Content;
|
|
11
10
|
};
|
|
@@ -13,7 +12,7 @@ type WorkflowV1<Content> = {
|
|
|
13
12
|
* Current workflow component shape. Alias to `WorkflowV1` while v1 is the
|
|
14
13
|
* only version — future versions widen this to a discriminated union.
|
|
15
14
|
*/
|
|
16
|
-
type Workflow<Content> = WorkflowV1<Content>;
|
|
15
|
+
export type Workflow<Content> = WorkflowV1<Content>;
|
|
17
16
|
/**
|
|
18
17
|
* Trio of artifacts every block ships: a workflow (Tengo source), a model
|
|
19
18
|
* (compiled JS), and a UI (front-end bundle). `WMContent` carries
|
|
@@ -25,7 +24,7 @@ type Workflow<Content> = WorkflowV1<Content>;
|
|
|
25
24
|
* absolute form (local file/folder paths), and the registry-reader output
|
|
26
25
|
* (URLs into registry storage, produced by `blockComponentsManifestToAbsoluteUrl`).
|
|
27
26
|
*/
|
|
28
|
-
type BlockComponents<WMContent, UIContent> = {
|
|
27
|
+
export type BlockComponents<WMContent, UIContent> = {
|
|
29
28
|
workflow: Workflow<WMContent>;
|
|
30
29
|
model: WMContent;
|
|
31
30
|
ui: UIContent;
|
|
@@ -36,18 +35,18 @@ type BlockComponents<WMContent, UIContent> = {
|
|
|
36
35
|
* (where `content` is `z.string()`) and the manifest schema (where `content`
|
|
37
36
|
* is `ContentRelative`).
|
|
38
37
|
*/
|
|
39
|
-
declare function WorkflowSchemaV1<C extends z.ZodTypeAny>(content: C): z.ZodObject<{
|
|
38
|
+
export declare function WorkflowSchemaV1<C extends z.ZodTypeAny>(content: C): z.ZodObject<{
|
|
40
39
|
type: z.ZodLiteral<"workflow-v1">;
|
|
41
40
|
main: C;
|
|
42
41
|
}, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
43
42
|
type: z.ZodLiteral<"workflow-v1">;
|
|
44
43
|
main: C;
|
|
45
|
-
}>, any> extends infer T ? { [k in keyof T]: T[k] } : never, z.baseObjectInputType<{
|
|
44
|
+
}>, any> extends (infer T) ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
|
|
46
45
|
type: z.ZodLiteral<"workflow-v1">;
|
|
47
46
|
main: C;
|
|
48
|
-
}> extends infer T_1 ? { [
|
|
49
|
-
type BlockComponentsDescriptionRaw = BlockComponents<string, string>;
|
|
50
|
-
declare const BlockComponentsDescriptionRaw: z.ZodObject<{
|
|
47
|
+
}> extends (infer T_1) ? { [k in keyof T_1]: T_1[k]; } : never>;
|
|
48
|
+
export type BlockComponentsDescriptionRaw = BlockComponents<string, string>;
|
|
49
|
+
export declare const BlockComponentsDescriptionRaw: z.ZodObject<{
|
|
51
50
|
workflow: z.ZodUnion<[z.ZodEffects<z.ZodString, WorkflowV1<string>, string>, z.ZodObject<{
|
|
52
51
|
type: z.ZodLiteral<"workflow-v1">;
|
|
53
52
|
main: z.ZodString;
|
|
@@ -76,5 +75,4 @@ declare const BlockComponentsDescriptionRaw: z.ZodObject<{
|
|
|
76
75
|
ui: string;
|
|
77
76
|
}>;
|
|
78
77
|
//#endregion
|
|
79
|
-
export { BlockComponents, BlockComponentsDescriptionRaw, Workflow, WorkflowSchemaV1, WorkflowV1 };
|
|
80
78
|
//# sourceMappingURL=block_components.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_components.d.ts","names":[],"sources":["../../src/block_meta/block_components.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"block_components.d.ts","names":[],"sources":["../../src/block_meta/block_components.ts"],"mappings":";;;;;;YAUY,WAAW;EACrB;EACA,MAAM;;;;;;YAOI,SAAS,WAAW,WAAW;;;;;;;;;;;;YAa/B,gBAAgB,WAAW;EACrC,UAAU,SAAS;EACnB,OAAO;EACP,IAAI;;;;;;;;wBASU,iBAAiB,UAAU,EAAE,YAAY,SAAS,IAAC,EAAA;;;;;;;;;;YAuBvD,gCAAgC;qBAE/B,+BAA6B,EAAA"}
|
|
@@ -14,12 +14,15 @@ const BlockPackDescriptionFromPackageJsonRaw = zod.z.object({
|
|
|
14
14
|
meta: require_block_meta.BlockPackMetaDescriptionRaw
|
|
15
15
|
});
|
|
16
16
|
const FeatureFlags = zod.z.record(zod.z.string(), zod.z.union([zod.z.boolean(), zod.z.number()])).transform((flags) => flags);
|
|
17
|
+
/** Block-kind reference schema — a plain `{name}@{version}` string at rest. */
|
|
18
|
+
const BlockKindRef = zod.z.string().transform((s) => s);
|
|
17
19
|
function CreateBlockPackDescriptionSchema(components, meta) {
|
|
18
20
|
return zod.z.object({
|
|
19
21
|
id: require_block_id.BlockPackId,
|
|
20
22
|
components,
|
|
21
23
|
meta,
|
|
22
|
-
featureFlags: FeatureFlags.optional()
|
|
24
|
+
featureFlags: FeatureFlags.optional(),
|
|
25
|
+
kind: BlockKindRef.optional()
|
|
23
26
|
}).passthrough();
|
|
24
27
|
}
|
|
25
28
|
const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(require_block_components.BlockComponentsDescriptionRaw, require_block_meta.BlockPackMetaDescriptionRaw);
|
|
@@ -27,6 +30,7 @@ function overrideDescriptionVersion(manifest, newVersion) {
|
|
|
27
30
|
return (0, es_toolkit.toMerged)(manifest, { id: { version: newVersion } });
|
|
28
31
|
}
|
|
29
32
|
//#endregion
|
|
33
|
+
exports.BlockKindRef = BlockKindRef;
|
|
30
34
|
exports.BlockPackDescriptionFromPackageJsonRaw = BlockPackDescriptionFromPackageJsonRaw;
|
|
31
35
|
exports.BlockPackDescriptionRaw = BlockPackDescriptionRaw;
|
|
32
36
|
exports.CreateBlockPackDescriptionSchema = CreateBlockPackDescriptionSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_description.cjs","names":["z","BlockComponentsDescriptionRaw","BlockPackMetaDescriptionRaw","BlockPackId"],"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 { toMerged } from \"es-toolkit\";\nimport type {
|
|
1
|
+
{"version":3,"file":"block_description.cjs","names":["z","BlockComponentsDescriptionRaw","BlockPackMetaDescriptionRaw","BlockPackId"],"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 { toMerged } from \"es-toolkit\";\nimport type {\n BlockCodeKnownFeatureFlags,\n BlockKindReference,\n} from \"@milaboratories/pl-model-common\";\n\n/**\n * Block-pack description: a `BlockPackId`, the typed `components` and `meta`\n * payloads, and optional `featureFlags`. The two type parameters let the same\n * shape carry every form a description travels in — `package.json` source,\n * relative-path manifest, absolute-path resolved.\n */\nexport type BlockPackDescription<Components, Meta> = {\n id: BlockPackId;\n components: Components;\n meta: Meta;\n featureFlags?: BlockCodeKnownFeatureFlags;\n /** Reference to the block kind this pack implements, in `{name}@{version}`\n * form. Lifted from the model's container-level `kind` by build_dist. */\n kind?: BlockKindReference;\n};\n\n/**\n * Description as it appears in the root block `package.json`. `file:`-prefixed\n * strings become `ContentRelative`; bare text strings become\n * `ContentExplicitString`. See `DescriptionContentText`/`DescriptionContentBinary`.\n */\nexport const BlockPackDescriptionFromPackageJsonRaw = z.object({\n components: BlockComponentsDescriptionRaw,\n meta: BlockPackMetaDescriptionRaw,\n});\n\nexport const FeatureFlags = z\n .record(z.string(), z.union([z.boolean(), z.number()]))\n .transform((flags) => flags as BlockCodeKnownFeatureFlags);\n\n/** Block-kind reference schema — a plain `{name}@{version}` string at rest. */\nexport const BlockKindRef = z.string().transform((s) => s as BlockKindReference);\n\nexport function CreateBlockPackDescriptionSchema<\n Components extends ZodTypeAny,\n Meta extends ZodTypeAny,\n>(components: Components, meta: Meta) {\n return z\n .object({\n id: BlockPackId,\n components,\n meta,\n featureFlags: FeatureFlags.optional(),\n kind: BlockKindRef.optional(),\n })\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 toMerged(manifest, { id: { version: newVersion } }) as T;\n}\n"],"mappings":";;;;;;;;;;;AAgCA,MAAa,yCAAyCA,IAAAA,EAAE,OAAO;CAC7D,YAAYC,yBAAAA;CACZ,MAAMC,mBAAAA;AACR,CAAC;AAED,MAAa,eAAeF,IAAAA,EACzB,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,QAAQ,GAAGA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CACtD,WAAW,UAAU,KAAmC;;AAG3D,MAAa,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,WAAW,MAAM,CAAuB;AAE/E,SAAgB,iCAGd,YAAwB,MAAY;CACpC,OAAOA,IAAAA,EACJ,OAAO;EACN,IAAIG,iBAAAA;EACJ;EACA;EACA,cAAc,aAAa,SAAS;EACpC,MAAM,aAAa,SAAS;CAC9B,CAAC,CAAC,CACD,YAAY;AACjB;AAEA,MAAa,0BAA0B,iCACrCF,yBAAAA,+BACAC,mBAAAA,2BACF;AAGA,SAAgB,2BACd,UACA,YACG;CACH,QAAA,GAAA,WAAA,SAAA,CAAgB,UAAU,EAAE,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;AAC3D"}
|
|
@@ -2,8 +2,7 @@ import { ContentRelativeBinary, ContentRelativeText } from "./content_types.js";
|
|
|
2
2
|
import { BlockPackId } from "./block_id.js";
|
|
3
3
|
import { WorkflowV1 } from "./block_components.js";
|
|
4
4
|
import { ZodTypeAny, z } from "zod";
|
|
5
|
-
import { BlockCodeKnownFeatureFlags } from "@milaboratories/pl-model-common";
|
|
6
|
-
|
|
5
|
+
import { BlockCodeKnownFeatureFlags, BlockKindReference } from "@milaboratories/pl-model-common";
|
|
7
6
|
//#region src/block_meta/block_description.d.ts
|
|
8
7
|
/**
|
|
9
8
|
* Block-pack description: a `BlockPackId`, the typed `components` and `meta`
|
|
@@ -11,18 +10,21 @@ import { BlockCodeKnownFeatureFlags } from "@milaboratories/pl-model-common";
|
|
|
11
10
|
* shape carry every form a description travels in — `package.json` source,
|
|
12
11
|
* relative-path manifest, absolute-path resolved.
|
|
13
12
|
*/
|
|
14
|
-
type BlockPackDescription<Components, Meta> = {
|
|
13
|
+
export type BlockPackDescription<Components, Meta> = {
|
|
15
14
|
id: BlockPackId;
|
|
16
15
|
components: Components;
|
|
17
16
|
meta: Meta;
|
|
18
17
|
featureFlags?: BlockCodeKnownFeatureFlags;
|
|
18
|
+
/** Reference to the block kind this pack implements, in `{name}@{version}`
|
|
19
|
+
* form. Lifted from the model's container-level `kind` by build_dist. */
|
|
20
|
+
kind?: BlockKindReference;
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
21
23
|
* Description as it appears in the root block `package.json`. `file:`-prefixed
|
|
22
24
|
* strings become `ContentRelative`; bare text strings become
|
|
23
25
|
* `ContentExplicitString`. See `DescriptionContentText`/`DescriptionContentBinary`.
|
|
24
26
|
*/
|
|
25
|
-
declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
27
|
+
export declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
26
28
|
components: z.ZodObject<{
|
|
27
29
|
workflow: z.ZodUnion<[z.ZodEffects<z.ZodString, WorkflowV1<string>, string>, z.ZodObject<{
|
|
28
30
|
type: z.ZodLiteral<"workflow-v1">;
|
|
@@ -659,152 +661,154 @@ declare const BlockPackDescriptionFromPackageJsonRaw: z.ZodObject<{
|
|
|
659
661
|
requiredCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
660
662
|
}, ZodTypeAny, "passthrough">>;
|
|
661
663
|
}, "strip", ZodTypeAny, {
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
logo?: {
|
|
667
|
-
type: "explicit-base64";
|
|
668
|
-
mimeType: string;
|
|
669
|
-
content: string;
|
|
670
|
-
} | {
|
|
671
|
-
type: "relative";
|
|
672
|
-
path: string;
|
|
673
|
-
} | ContentRelativeBinary | {
|
|
674
|
-
type: "absolute-file";
|
|
675
|
-
file: string;
|
|
676
|
-
} | undefined;
|
|
677
|
-
} & {
|
|
678
|
-
[k: string]: unknown;
|
|
664
|
+
components: {
|
|
665
|
+
workflow: WorkflowV1<string> | {
|
|
666
|
+
type: "workflow-v1";
|
|
667
|
+
main: string;
|
|
679
668
|
};
|
|
669
|
+
model: string;
|
|
670
|
+
ui: string;
|
|
671
|
+
};
|
|
672
|
+
meta: {
|
|
680
673
|
title: string;
|
|
681
674
|
description: string;
|
|
682
|
-
url?: string | undefined;
|
|
683
675
|
longDescription?: {
|
|
684
|
-
type: "relative";
|
|
685
|
-
path: string;
|
|
686
|
-
} | ContentRelativeText | {
|
|
687
676
|
type: "explicit-string";
|
|
688
677
|
content: string;
|
|
678
|
+
} | {
|
|
679
|
+
type: "relative";
|
|
680
|
+
path: string;
|
|
689
681
|
} | {
|
|
690
682
|
type: "absolute-file";
|
|
691
683
|
file: string;
|
|
692
|
-
} | undefined;
|
|
684
|
+
} | ContentRelativeText | undefined;
|
|
693
685
|
changelog?: {
|
|
694
|
-
type: "relative";
|
|
695
|
-
path: string;
|
|
696
|
-
} | ContentRelativeText | {
|
|
697
686
|
type: "explicit-string";
|
|
698
687
|
content: string;
|
|
688
|
+
} | {
|
|
689
|
+
type: "relative";
|
|
690
|
+
path: string;
|
|
699
691
|
} | {
|
|
700
692
|
type: "absolute-file";
|
|
701
693
|
file: string;
|
|
702
|
-
} | undefined;
|
|
694
|
+
} | ContentRelativeText | undefined;
|
|
703
695
|
logo?: {
|
|
704
|
-
type: "explicit-base64";
|
|
705
|
-
mimeType: string;
|
|
706
|
-
content: string;
|
|
707
|
-
} | {
|
|
708
696
|
type: "relative";
|
|
709
697
|
path: string;
|
|
710
|
-
} |
|
|
698
|
+
} | {
|
|
711
699
|
type: "absolute-file";
|
|
712
700
|
file: string;
|
|
713
|
-
} |
|
|
701
|
+
} | {
|
|
702
|
+
type: "explicit-base64";
|
|
703
|
+
mimeType: string;
|
|
704
|
+
content: string;
|
|
705
|
+
} | ContentRelativeBinary | undefined;
|
|
706
|
+
url?: string | undefined;
|
|
714
707
|
docs?: string | undefined;
|
|
715
708
|
support?: string | undefined;
|
|
716
709
|
tags?: string[] | undefined;
|
|
710
|
+
organization: {
|
|
711
|
+
name: string;
|
|
712
|
+
url: string;
|
|
713
|
+
logo?: {
|
|
714
|
+
type: "relative";
|
|
715
|
+
path: string;
|
|
716
|
+
} | {
|
|
717
|
+
type: "absolute-file";
|
|
718
|
+
file: string;
|
|
719
|
+
} | {
|
|
720
|
+
type: "explicit-base64";
|
|
721
|
+
mimeType: string;
|
|
722
|
+
content: string;
|
|
723
|
+
} | ContentRelativeBinary | undefined;
|
|
724
|
+
} & {
|
|
725
|
+
[k: string]: unknown;
|
|
726
|
+
};
|
|
717
727
|
marketplaceRanking?: number | undefined;
|
|
718
728
|
deprecated?: boolean | undefined;
|
|
719
729
|
termsOfServiceUrl?: string | undefined;
|
|
720
|
-
supportedPlatforms?: ("
|
|
730
|
+
supportedPlatforms?: ("linux-aarch64" | "linux-x64" | "macosx-aarch64" | "macosx-x64" | "windows-aarch64" | "windows-x64")[] | undefined;
|
|
721
731
|
requiredCapabilities?: string[] | undefined;
|
|
722
732
|
} & {
|
|
723
733
|
[k: string]: unknown;
|
|
724
734
|
};
|
|
735
|
+
}, {
|
|
725
736
|
components: {
|
|
726
|
-
workflow:
|
|
737
|
+
workflow: string | {
|
|
727
738
|
type: "workflow-v1";
|
|
728
739
|
main: string;
|
|
729
740
|
};
|
|
730
741
|
model: string;
|
|
731
742
|
ui: string;
|
|
732
743
|
};
|
|
733
|
-
}, {
|
|
734
744
|
meta: {
|
|
735
|
-
organization: {
|
|
736
|
-
name: string;
|
|
737
|
-
url: string;
|
|
738
|
-
logo?: string | {
|
|
739
|
-
type: "explicit-base64";
|
|
740
|
-
mimeType: string;
|
|
741
|
-
content: string;
|
|
742
|
-
} | {
|
|
743
|
-
type: "relative";
|
|
744
|
-
path: string;
|
|
745
|
-
} | {
|
|
746
|
-
type: "absolute-file";
|
|
747
|
-
file: string;
|
|
748
|
-
} | undefined;
|
|
749
|
-
} & {
|
|
750
|
-
[k: string]: unknown;
|
|
751
|
-
};
|
|
752
745
|
title: string;
|
|
753
746
|
description: string;
|
|
754
|
-
url?: string | undefined;
|
|
755
747
|
longDescription?: string | {
|
|
756
|
-
type: "relative";
|
|
757
|
-
path: string;
|
|
758
|
-
} | {
|
|
759
748
|
type: "explicit-string";
|
|
760
749
|
content: string;
|
|
750
|
+
} | {
|
|
751
|
+
type: "relative";
|
|
752
|
+
path: string;
|
|
761
753
|
} | {
|
|
762
754
|
type: "absolute-file";
|
|
763
755
|
file: string;
|
|
764
756
|
} | undefined;
|
|
765
757
|
changelog?: string | {
|
|
766
|
-
type: "relative";
|
|
767
|
-
path: string;
|
|
768
|
-
} | {
|
|
769
758
|
type: "explicit-string";
|
|
770
759
|
content: string;
|
|
760
|
+
} | {
|
|
761
|
+
type: "relative";
|
|
762
|
+
path: string;
|
|
771
763
|
} | {
|
|
772
764
|
type: "absolute-file";
|
|
773
765
|
file: string;
|
|
774
766
|
} | undefined;
|
|
775
767
|
logo?: string | {
|
|
776
|
-
type: "explicit-base64";
|
|
777
|
-
mimeType: string;
|
|
778
|
-
content: string;
|
|
779
|
-
} | {
|
|
780
768
|
type: "relative";
|
|
781
769
|
path: string;
|
|
782
770
|
} | {
|
|
783
771
|
type: "absolute-file";
|
|
784
772
|
file: string;
|
|
773
|
+
} | {
|
|
774
|
+
type: "explicit-base64";
|
|
775
|
+
mimeType: string;
|
|
776
|
+
content: string;
|
|
785
777
|
} | undefined;
|
|
778
|
+
url?: string | undefined;
|
|
786
779
|
docs?: string | undefined;
|
|
787
780
|
support?: string | undefined;
|
|
788
781
|
tags?: string[] | undefined;
|
|
782
|
+
organization: {
|
|
783
|
+
name: string;
|
|
784
|
+
url: string;
|
|
785
|
+
logo?: string | {
|
|
786
|
+
type: "relative";
|
|
787
|
+
path: string;
|
|
788
|
+
} | {
|
|
789
|
+
type: "absolute-file";
|
|
790
|
+
file: string;
|
|
791
|
+
} | {
|
|
792
|
+
type: "explicit-base64";
|
|
793
|
+
mimeType: string;
|
|
794
|
+
content: string;
|
|
795
|
+
} | undefined;
|
|
796
|
+
} & {
|
|
797
|
+
[k: string]: unknown;
|
|
798
|
+
};
|
|
789
799
|
marketplaceRanking?: number | undefined;
|
|
790
800
|
deprecated?: boolean | undefined;
|
|
791
801
|
termsOfServiceUrl?: string | undefined;
|
|
792
|
-
supportedPlatforms?: ("
|
|
802
|
+
supportedPlatforms?: ("linux-aarch64" | "linux-x64" | "macosx-aarch64" | "macosx-x64" | "windows-aarch64" | "windows-x64")[] | undefined;
|
|
793
803
|
requiredCapabilities?: string[] | undefined;
|
|
794
804
|
} & {
|
|
795
805
|
[k: string]: unknown;
|
|
796
806
|
};
|
|
797
|
-
components: {
|
|
798
|
-
workflow: string | {
|
|
799
|
-
type: "workflow-v1";
|
|
800
|
-
main: string;
|
|
801
|
-
};
|
|
802
|
-
model: string;
|
|
803
|
-
ui: string;
|
|
804
|
-
};
|
|
805
807
|
}>;
|
|
806
|
-
declare const FeatureFlags: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>;
|
|
807
|
-
|
|
808
|
+
export declare const FeatureFlags: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>;
|
|
809
|
+
/** Block-kind reference schema — a plain `{name}@{version}` string at rest. */
|
|
810
|
+
export declare const BlockKindRef: z.ZodEffects<z.ZodString, BlockKindReference, string>;
|
|
811
|
+
export declare function CreateBlockPackDescriptionSchema<Components extends ZodTypeAny, Meta extends ZodTypeAny>(components: Components, meta: Meta): z.ZodObject<{
|
|
808
812
|
id: z.ZodObject<{
|
|
809
813
|
organization: z.ZodString;
|
|
810
814
|
name: z.ZodString;
|
|
@@ -821,6 +825,7 @@ declare function CreateBlockPackDescriptionSchema<Components extends ZodTypeAny,
|
|
|
821
825
|
components: Components;
|
|
822
826
|
meta: Meta;
|
|
823
827
|
featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
|
|
828
|
+
kind: z.ZodOptional<z.ZodEffects<z.ZodString, BlockKindReference, string>>;
|
|
824
829
|
}, "passthrough", ZodTypeAny, z.objectOutputType<{
|
|
825
830
|
id: z.ZodObject<{
|
|
826
831
|
organization: z.ZodString;
|
|
@@ -838,6 +843,7 @@ declare function CreateBlockPackDescriptionSchema<Components extends ZodTypeAny,
|
|
|
838
843
|
components: Components;
|
|
839
844
|
meta: Meta;
|
|
840
845
|
featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
|
|
846
|
+
kind: z.ZodOptional<z.ZodEffects<z.ZodString, BlockKindReference, string>>;
|
|
841
847
|
}, ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
842
848
|
id: z.ZodObject<{
|
|
843
849
|
organization: z.ZodString;
|
|
@@ -855,8 +861,9 @@ declare function CreateBlockPackDescriptionSchema<Components extends ZodTypeAny,
|
|
|
855
861
|
components: Components;
|
|
856
862
|
meta: Meta;
|
|
857
863
|
featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
|
|
864
|
+
kind: z.ZodOptional<z.ZodEffects<z.ZodString, BlockKindReference, string>>;
|
|
858
865
|
}, ZodTypeAny, "passthrough">>;
|
|
859
|
-
declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
866
|
+
export declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
860
867
|
id: z.ZodObject<{
|
|
861
868
|
organization: z.ZodString;
|
|
862
869
|
name: z.ZodString;
|
|
@@ -1506,6 +1513,7 @@ declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
1506
1513
|
requiredCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1507
1514
|
}, ZodTypeAny, "passthrough">>;
|
|
1508
1515
|
featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
|
|
1516
|
+
kind: z.ZodOptional<z.ZodEffects<z.ZodString, BlockKindReference, string>>;
|
|
1509
1517
|
}, "passthrough", ZodTypeAny, z.objectOutputType<{
|
|
1510
1518
|
id: z.ZodObject<{
|
|
1511
1519
|
organization: z.ZodString;
|
|
@@ -2156,6 +2164,7 @@ declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
2156
2164
|
requiredCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2157
2165
|
}, ZodTypeAny, "passthrough">>;
|
|
2158
2166
|
featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
|
|
2167
|
+
kind: z.ZodOptional<z.ZodEffects<z.ZodString, BlockKindReference, string>>;
|
|
2159
2168
|
}, ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2160
2169
|
id: z.ZodObject<{
|
|
2161
2170
|
organization: z.ZodString;
|
|
@@ -2806,11 +2815,11 @@ declare const BlockPackDescriptionRaw: z.ZodObject<{
|
|
|
2806
2815
|
requiredCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2807
2816
|
}, ZodTypeAny, "passthrough">>;
|
|
2808
2817
|
featureFlags: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodNumber]>>, BlockCodeKnownFeatureFlags, Record<string, number | boolean>>>;
|
|
2818
|
+
kind: z.ZodOptional<z.ZodEffects<z.ZodString, BlockKindReference, string>>;
|
|
2809
2819
|
}, ZodTypeAny, "passthrough">>;
|
|
2810
|
-
type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;
|
|
2811
|
-
declare function overrideDescriptionVersion<T extends {
|
|
2820
|
+
export type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;
|
|
2821
|
+
export declare function overrideDescriptionVersion<T extends {
|
|
2812
2822
|
id: BlockPackId;
|
|
2813
2823
|
}>(manifest: T, newVersion: string): T;
|
|
2814
2824
|
//#endregion
|
|
2815
|
-
export { BlockPackDescription, BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionRaw, CreateBlockPackDescriptionSchema, FeatureFlags, overrideDescriptionVersion };
|
|
2816
2825
|
//# sourceMappingURL=block_description.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_description.d.ts","names":[],"sources":["../../src/block_meta/block_description.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"block_description.d.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAIxB,0BAA0B,EAAE,aAAa;wBAErC,2BAA2B;EAAY,IAAI;GACzD,UAAU,GACV,qBACC"}
|
|
@@ -14,12 +14,15 @@ const BlockPackDescriptionFromPackageJsonRaw = z.object({
|
|
|
14
14
|
meta: BlockPackMetaDescriptionRaw
|
|
15
15
|
});
|
|
16
16
|
const FeatureFlags = z.record(z.string(), z.union([z.boolean(), z.number()])).transform((flags) => flags);
|
|
17
|
+
/** Block-kind reference schema — a plain `{name}@{version}` string at rest. */
|
|
18
|
+
const BlockKindRef = z.string().transform((s) => s);
|
|
17
19
|
function CreateBlockPackDescriptionSchema(components, meta) {
|
|
18
20
|
return z.object({
|
|
19
21
|
id: BlockPackId,
|
|
20
22
|
components,
|
|
21
23
|
meta,
|
|
22
|
-
featureFlags: FeatureFlags.optional()
|
|
24
|
+
featureFlags: FeatureFlags.optional(),
|
|
25
|
+
kind: BlockKindRef.optional()
|
|
23
26
|
}).passthrough();
|
|
24
27
|
}
|
|
25
28
|
const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(BlockComponentsDescriptionRaw, BlockPackMetaDescriptionRaw);
|
|
@@ -27,6 +30,6 @@ function overrideDescriptionVersion(manifest, newVersion) {
|
|
|
27
30
|
return toMerged(manifest, { id: { version: newVersion } });
|
|
28
31
|
}
|
|
29
32
|
//#endregion
|
|
30
|
-
export { BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionRaw, CreateBlockPackDescriptionSchema, FeatureFlags, overrideDescriptionVersion };
|
|
33
|
+
export { BlockKindRef, BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionRaw, CreateBlockPackDescriptionSchema, FeatureFlags, overrideDescriptionVersion };
|
|
31
34
|
|
|
32
35
|
//# sourceMappingURL=block_description.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_description.js","names":[],"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 { toMerged } from \"es-toolkit\";\nimport type {
|
|
1
|
+
{"version":3,"file":"block_description.js","names":[],"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 { toMerged } from \"es-toolkit\";\nimport type {\n BlockCodeKnownFeatureFlags,\n BlockKindReference,\n} from \"@milaboratories/pl-model-common\";\n\n/**\n * Block-pack description: a `BlockPackId`, the typed `components` and `meta`\n * payloads, and optional `featureFlags`. The two type parameters let the same\n * shape carry every form a description travels in — `package.json` source,\n * relative-path manifest, absolute-path resolved.\n */\nexport type BlockPackDescription<Components, Meta> = {\n id: BlockPackId;\n components: Components;\n meta: Meta;\n featureFlags?: BlockCodeKnownFeatureFlags;\n /** Reference to the block kind this pack implements, in `{name}@{version}`\n * form. Lifted from the model's container-level `kind` by build_dist. */\n kind?: BlockKindReference;\n};\n\n/**\n * Description as it appears in the root block `package.json`. `file:`-prefixed\n * strings become `ContentRelative`; bare text strings become\n * `ContentExplicitString`. See `DescriptionContentText`/`DescriptionContentBinary`.\n */\nexport const BlockPackDescriptionFromPackageJsonRaw = z.object({\n components: BlockComponentsDescriptionRaw,\n meta: BlockPackMetaDescriptionRaw,\n});\n\nexport const FeatureFlags = z\n .record(z.string(), z.union([z.boolean(), z.number()]))\n .transform((flags) => flags as BlockCodeKnownFeatureFlags);\n\n/** Block-kind reference schema — a plain `{name}@{version}` string at rest. */\nexport const BlockKindRef = z.string().transform((s) => s as BlockKindReference);\n\nexport function CreateBlockPackDescriptionSchema<\n Components extends ZodTypeAny,\n Meta extends ZodTypeAny,\n>(components: Components, meta: Meta) {\n return z\n .object({\n id: BlockPackId,\n components,\n meta,\n featureFlags: FeatureFlags.optional(),\n kind: BlockKindRef.optional(),\n })\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 toMerged(manifest, { id: { version: newVersion } }) as T;\n}\n"],"mappings":";;;;;;;;;;;AAgCA,MAAa,yCAAyC,EAAE,OAAO;CAC7D,YAAY;CACZ,MAAM;AACR,CAAC;AAED,MAAa,eAAe,EACzB,OAAO,EAAE,OAAO,GAAG,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CACtD,WAAW,UAAU,KAAmC;;AAG3D,MAAa,eAAe,EAAE,OAAO,CAAC,CAAC,WAAW,MAAM,CAAuB;AAE/E,SAAgB,iCAGd,YAAwB,MAAY;CACpC,OAAO,EACJ,OAAO;EACN,IAAI;EACJ;EACA;EACA,cAAc,aAAa,SAAS;EACpC,MAAM,aAAa,SAAS;CAC9B,CAAC,CAAC,CACD,YAAY;AACjB;AAEA,MAAa,0BAA0B,iCACrC,+BACA,2BACF;AAGA,SAAgB,2BACd,UACA,YACG;CACH,OAAO,SAAS,UAAU,EAAE,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;AAC3D"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
2
|
//#region src/block_meta/block_id.d.ts
|
|
4
3
|
/** Global identifier of the block */
|
|
5
|
-
declare const BlockPackId: z.ZodObject<{
|
|
4
|
+
export declare const BlockPackId: z.ZodObject<{
|
|
6
5
|
organization: z.ZodString;
|
|
7
6
|
name: z.ZodString;
|
|
8
7
|
version: z.ZodString;
|
|
@@ -15,8 +14,8 @@ declare const BlockPackId: z.ZodObject<{
|
|
|
15
14
|
name: string;
|
|
16
15
|
version: string;
|
|
17
16
|
}>;
|
|
18
|
-
type BlockPackId = z.infer<typeof BlockPackId>;
|
|
19
|
-
declare const BlockPackIdNoVersion: z.ZodObject<Omit<{
|
|
17
|
+
export type BlockPackId = z.infer<typeof BlockPackId>;
|
|
18
|
+
export declare const BlockPackIdNoVersion: z.ZodObject<Omit<{
|
|
20
19
|
organization: z.ZodString;
|
|
21
20
|
name: z.ZodString;
|
|
22
21
|
version: z.ZodString;
|
|
@@ -27,13 +26,12 @@ declare const BlockPackIdNoVersion: z.ZodObject<Omit<{
|
|
|
27
26
|
organization: string;
|
|
28
27
|
name: string;
|
|
29
28
|
}>;
|
|
30
|
-
type BlockPackIdNoVersion = z.infer<typeof BlockPackIdNoVersion>;
|
|
31
|
-
declare function blockPackIdToString(bp: BlockPackId): string;
|
|
32
|
-
declare function blockPackIdToString(bp: BlockPackId | undefined): string | undefined;
|
|
33
|
-
declare function blockPackIdNoVersionToString(bp: BlockPackIdNoVersion): string;
|
|
34
|
-
declare function blockPackIdNoVersionToString(bp: BlockPackIdNoVersion | undefined): string | undefined;
|
|
35
|
-
declare function blockPackIdEquals(bp1: BlockPackId | undefined, bp2: BlockPackId | undefined): boolean;
|
|
36
|
-
declare function blockPackIdNoVersionEquals(bp1: BlockPackIdNoVersion | undefined, bp2: BlockPackIdNoVersion | undefined): boolean;
|
|
29
|
+
export type BlockPackIdNoVersion = z.infer<typeof BlockPackIdNoVersion>;
|
|
30
|
+
export declare function blockPackIdToString(bp: BlockPackId): string;
|
|
31
|
+
export declare function blockPackIdToString(bp: BlockPackId | undefined): string | undefined;
|
|
32
|
+
export declare function blockPackIdNoVersionToString(bp: BlockPackIdNoVersion): string;
|
|
33
|
+
export declare function blockPackIdNoVersionToString(bp: BlockPackIdNoVersion | undefined): string | undefined;
|
|
34
|
+
export declare function blockPackIdEquals(bp1: BlockPackId | undefined, bp2: BlockPackId | undefined): boolean;
|
|
35
|
+
export declare function blockPackIdNoVersionEquals(bp1: BlockPackIdNoVersion | undefined, bp2: BlockPackIdNoVersion | undefined): boolean;
|
|
37
36
|
//#endregion
|
|
38
|
-
export { BlockPackId, BlockPackIdNoVersion, blockPackIdEquals, blockPackIdNoVersionEquals, blockPackIdNoVersionToString, blockPackIdToString };
|
|
39
37
|
//# sourceMappingURL=block_id.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_id.d.ts","names":[],"sources":["../../src/block_meta/block_id.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"block_id.d.ts","names":[],"sources":["../../src/block_meta/block_id.ts"],"mappings":";;;qBAIa,aAAW,EAAA;;;;;;;;;;;;;YAOZ,cAAc,EAAE,aAAa;qBAE5B,sBAAoB,EAAA,UAAA;;;;;;;;;;;YACrB,uBAAuB,EAAE,aAAa;wBAElC,oBAAoB,IAAI;wBACxB,oBAAoB,IAAI;wBAMxB,6BAA6B,IAAI;wBACjC,6BACd,IAAI;wBASU,kBACd,KAAK,yBACL,KAAK;wBASS,2BACd,KAAK,kCACL,KAAK"}
|