@milaboratories/pl-model-middle-layer 1.16.2 → 1.16.4
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 +12 -22
- package/dist/_virtual/_rolldown/runtime.js +6 -11
- package/dist/block_meta/block_components.cjs +4 -5
- package/dist/block_meta/block_components.cjs.map +1 -1
- package/dist/block_meta/block_components.d.ts +30 -158
- package/dist/block_meta/block_components.d.ts.map +1 -0
- package/dist/block_meta/block_components.js +1 -2
- package/dist/block_meta/block_components.js.map +1 -1
- package/dist/block_meta/block_description.cjs +5 -6
- package/dist/block_meta/block_description.cjs.map +1 -1
- package/dist/block_meta/block_description.d.ts +10 -10
- package/dist/block_meta/block_description.d.ts.map +1 -0
- package/dist/block_meta/block_description.js +1 -2
- package/dist/block_meta/block_description.js.map +1 -1
- package/dist/block_meta/block_id.cjs +3 -4
- package/dist/block_meta/block_id.cjs.map +1 -1
- package/dist/block_meta/block_id.d.ts.map +1 -0
- package/dist/block_meta/block_id.js +1 -2
- package/dist/block_meta/block_id.js.map +1 -1
- package/dist/block_meta/block_manifest.cjs +6 -7
- package/dist/block_meta/block_manifest.cjs.map +1 -1
- package/dist/block_meta/block_manifest.d.ts +39 -39
- package/dist/block_meta/block_manifest.d.ts.map +1 -0
- package/dist/block_meta/block_manifest.js +1 -2
- package/dist/block_meta/block_manifest.js.map +1 -1
- package/dist/block_meta/block_meta.cjs +3 -4
- package/dist/block_meta/block_meta.cjs.map +1 -1
- package/dist/block_meta/block_meta.d.ts +9 -91
- package/dist/block_meta/block_meta.d.ts.map +1 -0
- package/dist/block_meta/block_meta.js +1 -2
- package/dist/block_meta/block_meta.js.map +1 -1
- package/dist/block_meta/common.d.ts.map +1 -0
- package/dist/block_meta/content_conversion.cjs +1 -2
- package/dist/block_meta/content_conversion.cjs.map +1 -1
- package/dist/block_meta/content_conversion.d.ts.map +1 -0
- package/dist/block_meta/content_conversion.js +1 -1
- package/dist/block_meta/content_types.cjs +2 -3
- package/dist/block_meta/content_types.cjs.map +1 -1
- package/dist/block_meta/content_types.d.ts.map +1 -0
- package/dist/block_meta/content_types.js +1 -2
- package/dist/block_meta/content_types.js.map +1 -1
- package/dist/block_meta/index.cjs +8 -8
- package/dist/block_meta/index.js +8 -8
- package/dist/block_meta/semver.cjs +3 -5
- package/dist/block_meta/semver.cjs.map +1 -1
- package/dist/block_meta/semver.d.ts.map +1 -0
- package/dist/block_meta/semver.js +1 -2
- package/dist/block_meta/semver.js.map +1 -1
- package/dist/block_registry/block_pack_spec.cjs +4 -5
- package/dist/block_registry/block_pack_spec.cjs.map +1 -1
- package/dist/block_registry/block_pack_spec.d.ts.map +1 -0
- package/dist/block_registry/block_pack_spec.js +1 -2
- package/dist/block_registry/block_pack_spec.js.map +1 -1
- package/dist/block_registry/index.cjs +3 -3
- package/dist/block_registry/index.js +3 -3
- package/dist/block_registry/overview.cjs +10 -11
- package/dist/block_registry/overview.cjs.map +1 -1
- package/dist/block_registry/overview.d.ts +154 -154
- package/dist/block_registry/overview.d.ts.map +1 -0
- package/dist/block_registry/overview.js +2 -3
- package/dist/block_registry/overview.js.map +1 -1
- package/dist/block_registry/registry_spec.cjs +2 -3
- package/dist/block_registry/registry_spec.cjs.map +1 -1
- package/dist/block_registry/registry_spec.d.ts +12 -12
- package/dist/block_registry/registry_spec.d.ts.map +1 -0
- package/dist/block_registry/registry_spec.js +1 -2
- package/dist/block_registry/registry_spec.js.map +1 -1
- package/dist/block_settings.cjs +1 -2
- package/dist/block_settings.cjs.map +1 -1
- package/dist/block_settings.d.ts.map +1 -0
- package/dist/block_settings.js +1 -1
- package/dist/block_state.d.ts.map +1 -0
- package/dist/index.cjs +23 -24
- package/dist/index.d.ts +0 -3
- package/dist/index.js +1 -2
- package/dist/json.cjs +2 -3
- package/dist/json.cjs.map +1 -1
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +1 -2
- package/dist/json.js.map +1 -1
- package/dist/pframe/internal_api/api_factory.cjs +1 -2
- package/dist/pframe/internal_api/api_factory.cjs.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts.map +1 -0
- package/dist/pframe/internal_api/api_factory.js +1 -1
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -0
- package/dist/pframe/internal_api/api_wasm.d.ts.map +1 -0
- package/dist/pframe/internal_api/common.d.ts.map +1 -0
- package/dist/pframe/internal_api/create_table.d.ts.map +1 -0
- package/dist/pframe/internal_api/delete_column.d.ts.map +1 -0
- package/dist/pframe/internal_api/discover_columns.d.ts.map +1 -0
- package/dist/pframe/internal_api/find_columns.d.ts.map +1 -0
- package/dist/pframe/internal_api/http_helpers.cjs +1 -2
- package/dist/pframe/internal_api/http_helpers.cjs.map +1 -1
- package/dist/pframe/internal_api/http_helpers.d.ts.map +1 -0
- package/dist/pframe/internal_api/http_helpers.js +1 -1
- package/dist/pframe/internal_api/http_helpers.js.map +1 -1
- package/dist/pframe/internal_api/index.cjs +9 -10
- package/dist/pframe/internal_api/index.d.ts.map +1 -0
- package/dist/pframe/internal_api/index.js +1 -2
- package/dist/pframe/internal_api/pframe.d.ts.map +1 -0
- package/dist/pframe/internal_api/table.d.ts.map +1 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project_list.d.ts.map +1 -0
- package/dist/project_overview.d.ts.map +1 -0
- package/dist/storage_debug_view.d.ts.map +1 -0
- package/dist/update_info.d.ts +0 -2
- package/dist/update_info.d.ts.map +1 -0
- package/package.json +7 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overview.d.ts","names":[],"sources":["../../src/block_registry/overview.ts"],"mappings":";;;;;;;cAea,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIjB,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,gBAAA;AAAA,iBAE9B,yBAAA,CAA0B,GAAA,EAAK,iBAAA,GAAoB,uBAAA"}
|
|
@@ -6,7 +6,6 @@ import "../block_meta/index.js";
|
|
|
6
6
|
import { BlockPackSpec } from "./block_pack_spec.js";
|
|
7
7
|
import { RegistryEntry } from "./registry_spec.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
|
-
|
|
10
9
|
//#region src/block_registry/overview.ts
|
|
11
10
|
/**
|
|
12
11
|
* Latest information about specific block pack. Contain information about latest version of the package.
|
|
@@ -50,7 +49,7 @@ const BlockPackListing = z.object({
|
|
|
50
49
|
blockPacks: z.array(BlockPackOverview)
|
|
51
50
|
});
|
|
52
51
|
function blockPackOverviewToLegacy(bpo) {
|
|
53
|
-
const mainChannel = bpo.latestByChannel[
|
|
52
|
+
const mainChannel = bpo.latestByChannel["stable"] !== void 0 ? StableChannel : "any";
|
|
54
53
|
const latestOverview = bpo.latestByChannel[mainChannel];
|
|
55
54
|
return {
|
|
56
55
|
id: latestOverview.id,
|
|
@@ -63,7 +62,7 @@ function blockPackOverviewToLegacy(bpo) {
|
|
|
63
62
|
registryId: bpo.registryId
|
|
64
63
|
};
|
|
65
64
|
}
|
|
66
|
-
|
|
67
65
|
//#endregion
|
|
68
66
|
export { AnyChannel, BlockPackListing, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, RegistryStatus, SingleBlockPackOverview, StableChannel, VersionWithChannels, blockPackOverviewToLegacy };
|
|
67
|
+
|
|
69
68
|
//# sourceMappingURL=overview.js.map
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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,O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rolldown/runtime.cjs");
|
|
2
2
|
let zod = require("zod");
|
|
3
|
-
|
|
4
3
|
//#region src/block_registry/registry_spec.ts
|
|
5
4
|
const LocalDevFolder = zod.z.object({
|
|
6
5
|
type: zod.z.literal("local-dev"),
|
|
@@ -26,7 +25,6 @@ const RegistryEntry = zod.z.object({
|
|
|
26
25
|
spec: RegistrySpec
|
|
27
26
|
});
|
|
28
27
|
const RegistryList = zod.z.array(RegistryEntry);
|
|
29
|
-
|
|
30
28
|
//#endregion
|
|
31
29
|
exports.LocalDevFolder = LocalDevFolder;
|
|
32
30
|
exports.RegistryEntry = RegistryEntry;
|
|
@@ -34,4 +32,5 @@ exports.RegistryList = RegistryList;
|
|
|
34
32
|
exports.RegistrySpec = RegistrySpec;
|
|
35
33
|
exports.RemoteRegistryV1Spec = RemoteRegistryV1Spec;
|
|
36
34
|
exports.RemoteRegistryV2Spec = RemoteRegistryV2Spec;
|
|
35
|
+
|
|
37
36
|
//# sourceMappingURL=registry_spec.cjs.map
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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,IAAAA,EAAE,OAAO;CACrC,MAAMA,IAAAA,EAAE,QAAQ,YAAY;CAC5B,MAAMA,IAAAA,EAAE,QAAQ;CACjB,CAAC;;AAIF,MAAa,uBAAuBA,IAAAA,EAAE,OAAO;CAC3C,MAAMA,IAAAA,EAAE,QAAQ,YAAY;CAC5B,KAAKA,IAAAA,EAAE,QAAQ,CAAC,KAAK;CACtB,CAAC;AAIF,MAAa,uBAAuBA,IAAAA,EAAE,OAAO;CAC3C,MAAMA,IAAAA,EAAE,QAAQ,YAAY;CAC5B,KAAKA,IAAAA,EAAE,QAAQ,CAAC,KAAK;CACtB,CAAC;AAGF,MAAa,eAAeA,IAAAA,EAAE,mBAAmB,QAAQ;CACvD;CACA;CACA;CACD,CAAC;AAGF,MAAa,gBAAgBA,IAAAA,EAAE,OAAO;CACpC,IAAIA,IAAAA,EAAE,QAAQ;CACd,OAAOA,IAAAA,EAAE,QAAQ,CAAC,UAAU;CAC5B,MAAM;CACP,CAAC;AAGF,MAAa,eAAeA,IAAAA,EAAE,MAAM,cAAc"}
|
|
@@ -99,27 +99,27 @@ declare const RegistryEntry: z.ZodObject<{
|
|
|
99
99
|
}, "strip", z.ZodTypeAny, {
|
|
100
100
|
id: string;
|
|
101
101
|
spec: {
|
|
102
|
+
type: "local-dev";
|
|
103
|
+
path: string;
|
|
104
|
+
} | {
|
|
102
105
|
type: "remote-v1";
|
|
103
106
|
url: string;
|
|
104
107
|
} | {
|
|
105
108
|
type: "remote-v2";
|
|
106
109
|
url: string;
|
|
107
|
-
} | {
|
|
108
|
-
type: "local-dev";
|
|
109
|
-
path: string;
|
|
110
110
|
};
|
|
111
111
|
title?: string | undefined;
|
|
112
112
|
}, {
|
|
113
113
|
id: string;
|
|
114
114
|
spec: {
|
|
115
|
+
type: "local-dev";
|
|
116
|
+
path: string;
|
|
117
|
+
} | {
|
|
115
118
|
type: "remote-v1";
|
|
116
119
|
url: string;
|
|
117
120
|
} | {
|
|
118
121
|
type: "remote-v2";
|
|
119
122
|
url: string;
|
|
120
|
-
} | {
|
|
121
|
-
type: "local-dev";
|
|
122
|
-
path: string;
|
|
123
123
|
};
|
|
124
124
|
title?: string | undefined;
|
|
125
125
|
}>;
|
|
@@ -158,27 +158,27 @@ declare const RegistryList: z.ZodArray<z.ZodObject<{
|
|
|
158
158
|
}, "strip", z.ZodTypeAny, {
|
|
159
159
|
id: string;
|
|
160
160
|
spec: {
|
|
161
|
+
type: "local-dev";
|
|
162
|
+
path: string;
|
|
163
|
+
} | {
|
|
161
164
|
type: "remote-v1";
|
|
162
165
|
url: string;
|
|
163
166
|
} | {
|
|
164
167
|
type: "remote-v2";
|
|
165
168
|
url: string;
|
|
166
|
-
} | {
|
|
167
|
-
type: "local-dev";
|
|
168
|
-
path: string;
|
|
169
169
|
};
|
|
170
170
|
title?: string | undefined;
|
|
171
171
|
}, {
|
|
172
172
|
id: string;
|
|
173
173
|
spec: {
|
|
174
|
+
type: "local-dev";
|
|
175
|
+
path: string;
|
|
176
|
+
} | {
|
|
174
177
|
type: "remote-v1";
|
|
175
178
|
url: string;
|
|
176
179
|
} | {
|
|
177
180
|
type: "remote-v2";
|
|
178
181
|
url: string;
|
|
179
|
-
} | {
|
|
180
|
-
type: "local-dev";
|
|
181
|
-
path: string;
|
|
182
182
|
};
|
|
183
183
|
title?: string | undefined;
|
|
184
184
|
}>, "many">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry_spec.d.ts","names":[],"sources":["../../src/block_registry/registry_spec.ts"],"mappings":";;;cAEa,cAAA,EAAc,CAAA,CAAA,SAAA;;;;;;;;;;KAIf,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,cAAA;;cAG/B,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;;;KAKrB,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,oBAAA;AAAA,cAErC,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;;KAIrB,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,oBAAA;AAAA,cAErC,YAAA,EAAY,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKb,YAAA,GAAe,CAAA,CAAE,KAAA,QAAa,YAAA;AAAA,cAE7B,aAAA,EAAa,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKd,aAAA,GAAgB,CAAA,CAAE,KAAA,QAAa,aAAA;AAAA,cAE9B,YAAA,EAAY,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KACb,YAAA,GAAe,CAAA,CAAE,KAAA,QAAa,YAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
2
|
//#region src/block_registry/registry_spec.ts
|
|
4
3
|
const LocalDevFolder = z.object({
|
|
5
4
|
type: z.literal("local-dev"),
|
|
@@ -25,7 +24,7 @@ const RegistryEntry = z.object({
|
|
|
25
24
|
spec: RegistrySpec
|
|
26
25
|
});
|
|
27
26
|
const RegistryList = z.array(RegistryEntry);
|
|
28
|
-
|
|
29
27
|
//#endregion
|
|
30
28
|
export { LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RemoteRegistryV1Spec, RemoteRegistryV2Spec };
|
|
29
|
+
|
|
31
30
|
//# sourceMappingURL=registry_spec.js.map
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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","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":"
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block_settings.d.ts","names":[],"sources":["../src/block_settings.ts"],"mappings":";;AAQA;;;;;AAQA;;KARY,WAAA;;;;;;;KAQA,aAAA;EAUyC,qFARnD,WAAA;EAQiC;;;;EAHjC,WAAA,GAAc,WAAA;AAAA;AAAA,cAGH,oBAAA,EAAsB,aAAA"}
|
package/dist/block_settings.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block_state.d.ts","names":[],"sources":["../src/block_state.ts"],"mappings":";;;;;KAWY,kBAAA,iCAEM,gBAAA,GAAmB,gBAAA,iEAGjC,QAAA,CAAS,QAAA,CAAS,UAAA,CAAW,IAAA,EAAM,OAAA,EAAS,OAAA,EAAS,IAAA;AAAA,KAG7C,oBAAA,iBACM,gBAAA,GAAmB,gBAAA;EATzB,mEAaD,YAAA,WAbmB;EAAA,SAgBnB,gBAAA,GAAmB,eAAA,CAAgB,gBAAA,GAdT;EAiBnC,OAAA,GAAU,OAAA,EAd2B;EAAA,SAiB5B,eAAA,EAAiB,eAAA,CAAgB,IAAA;EAAA,SAEjC,MAAA,EAAQ,YAAA;AAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
const require_block_settings = require(
|
|
3
|
-
const require_content_types = require(
|
|
4
|
-
const require_semver = require(
|
|
5
|
-
const require_content_conversion = require(
|
|
6
|
-
const require_block_id = require(
|
|
7
|
-
const require_block_components = require(
|
|
8
|
-
const require_block_meta = require(
|
|
9
|
-
const require_block_description = require(
|
|
10
|
-
const require_block_manifest = require(
|
|
11
|
-
require(
|
|
12
|
-
const require_block_pack_spec = require(
|
|
13
|
-
const require_registry_spec = require(
|
|
14
|
-
const require_overview = require(
|
|
15
|
-
require(
|
|
16
|
-
const require_index$2 = require(
|
|
17
|
-
const require_json = require(
|
|
18
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_block_settings = require("./block_settings.cjs");
|
|
3
|
+
const require_content_types = require("./block_meta/content_types.cjs");
|
|
4
|
+
const require_semver = require("./block_meta/semver.cjs");
|
|
5
|
+
const require_content_conversion = require("./block_meta/content_conversion.cjs");
|
|
6
|
+
const require_block_id = require("./block_meta/block_id.cjs");
|
|
7
|
+
const require_block_components = require("./block_meta/block_components.cjs");
|
|
8
|
+
const require_block_meta = require("./block_meta/block_meta.cjs");
|
|
9
|
+
const require_block_description = require("./block_meta/block_description.cjs");
|
|
10
|
+
const require_block_manifest = require("./block_meta/block_manifest.cjs");
|
|
11
|
+
require("./block_meta/index.cjs");
|
|
12
|
+
const require_block_pack_spec = require("./block_registry/block_pack_spec.cjs");
|
|
13
|
+
const require_registry_spec = require("./block_registry/registry_spec.cjs");
|
|
14
|
+
const require_overview = require("./block_registry/overview.cjs");
|
|
15
|
+
require("./block_registry/index.cjs");
|
|
16
|
+
const require_index$2 = require("./pframe/internal_api/index.cjs");
|
|
17
|
+
const require_json = require("./json.cjs");
|
|
19
18
|
exports.AnyChannel = require_overview.AnyChannel;
|
|
20
19
|
exports.BlockComponents = require_block_components.BlockComponents;
|
|
21
20
|
exports.BlockComponentsAbsoluteUrl = require_block_components.BlockComponentsAbsoluteUrl;
|
|
@@ -70,11 +69,11 @@ exports.FeatureFlags = require_block_description.FeatureFlags;
|
|
|
70
69
|
exports.InitialBlockSettings = require_block_settings.InitialBlockSettings;
|
|
71
70
|
exports.LocalDevFolder = require_registry_spec.LocalDevFolder;
|
|
72
71
|
exports.ManifestFileInfo = require_block_manifest.ManifestFileInfo;
|
|
73
|
-
Object.defineProperty(exports,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
Object.defineProperty(exports, "PFrameInternal", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function() {
|
|
75
|
+
return require_index$2.internal_api_exports;
|
|
76
|
+
}
|
|
78
77
|
});
|
|
79
78
|
exports.RegistryEntry = require_registry_spec.RegistryEntry;
|
|
80
79
|
exports.RegistryList = require_registry_spec.RegistryList;
|
|
@@ -100,4 +99,4 @@ exports.mapRemoteToAbsolute = require_content_conversion.mapRemoteToAbsolute;
|
|
|
100
99
|
exports.overrideDescriptionVersion = require_block_description.overrideDescriptionVersion;
|
|
101
100
|
exports.overrideManifestVersion = require_block_manifest.overrideManifestVersion;
|
|
102
101
|
exports.readJson = require_json.readJson;
|
|
103
|
-
exports.readJsonSync = require_json.readJsonSync;
|
|
102
|
+
exports.readJsonSync = require_json.readJsonSync;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { ProjectListEntry } from "./project_list.js";
|
|
|
7
7
|
import { BlockPackDevV1, BlockPackDevV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackSpec } from "./block_registry/block_pack_spec.js";
|
|
8
8
|
import { AnyChannel, BlockPackListing, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, RegistryStatus, SingleBlockPackOverview, StableChannel, VersionWithChannels, blockPackOverviewToLegacy } from "./block_registry/overview.js";
|
|
9
9
|
import { LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RemoteRegistryV1Spec, RemoteRegistryV2Spec } from "./block_registry/registry_spec.js";
|
|
10
|
-
import "./block_registry/index.js";
|
|
11
10
|
import { UpdateSuggestion, UpdateSuggestions } from "./update_info.js";
|
|
12
11
|
import { BlockCalculationStatus, BlockStateOverview, ProjectOverview } from "./project_overview.js";
|
|
13
12
|
import { ContentType, ContextType } from "./block_meta/common.js";
|
|
@@ -19,8 +18,6 @@ import { BlockComponents, BlockComponentsAbsolute, BlockComponentsAbsoluteUrl, B
|
|
|
19
18
|
import { BlockPackMeta, BlockPackMetaDescriptionRaw, BlockPackMetaEmbeddedBase64, BlockPackMetaEmbeddedBytes, BlockPlatform } from "./block_meta/block_meta.js";
|
|
20
19
|
import { BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionRaw, CreateBlockPackDescriptionSchema, FeatureFlags, overrideDescriptionVersion } from "./block_meta/block_description.js";
|
|
21
20
|
import { BlockComponentsManifest, BlockPackDescriptionManifest, BlockPackManifest, BlockPackManifestFile, BlockPackMetaManifest, ManifestFileInfo, Sha256Schema, overrideManifestVersion } from "./block_meta/block_manifest.js";
|
|
22
|
-
import "./block_meta/index.js";
|
|
23
21
|
import { index_d_exports } from "./pframe/internal_api/index.js";
|
|
24
|
-
import "./pframe/index.js";
|
|
25
22
|
import { HashedJson, hashJson, readJson, readJsonSync } from "./json.js";
|
|
26
23
|
export { AnyChannel, AuthorMarker, BlockCalculationStatus, BlockComponents, BlockComponentsAbsolute, BlockComponentsAbsoluteUrl, BlockComponentsDescriptionRaw, BlockComponentsManifest, BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionManifest, BlockPackDescriptionRaw, BlockPackDevV1, BlockPackDevV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackId, BlockPackIdNoVersion, BlockPackListing, BlockPackManifest, BlockPackManifestFile, BlockPackMeta, BlockPackMetaDescriptionRaw, BlockPackMetaEmbeddedBase64, BlockPackMetaEmbeddedBytes, BlockPackMetaManifest, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, BlockPackSpec, BlockPlatform, BlockSettings, BlockStateInternal, BlockStateInternalV3, BlockStateOverview, ContentAbsoluteBinaryLocal, ContentAbsoluteBinaryRemote, ContentAbsoluteFile, ContentAbsoluteFolder, ContentAbsoluteTextLocal, ContentAbsoluteTextRemote, ContentAbsoluteUrl, ContentAny, ContentAnyBinaryLocal, ContentAnyLocal, ContentAnyRemote, ContentAnyTextLocal, ContentExplicitBase64, ContentExplicitBytes, ContentExplicitOrRelative, ContentExplicitString, ContentRelative, ContentRelativeBinary, ContentRelativeText, ContentType, ContextType, CreateBlockPackDescriptionSchema, DescriptionContentBinary, DescriptionContentText, FeatureFlags, HashedJson, InitialBlockSettings, LocalDevFolder, ManifestFileInfo, index_d_exports as PFrameInternal, ProjectListEntry, ProjectMeta, ProjectOverview, RegistryEntry, RegistryList, RegistrySpec, RegistryStatus, RemoteRegistryV1Spec, RemoteRegistryV2Spec, SemVer, Sha256Schema, SingleBlockPackOverview, StableChannel, StorageDebugView, UpdateSuggestion, UpdateSuggestions, VersionLock, VersionWithChannels, Workflow, WorkflowV1, addPrefixToRelative, blockPackIdEquals, blockPackIdNoVersionEquals, blockPackIdNoVersionToString, blockPackIdToString, blockPackOverviewToLegacy, hashJson, mapRemoteToAbsolute, overrideDescriptionVersion, overrideManifestVersion, readJson, readJsonSync };
|
package/dist/index.js
CHANGED
|
@@ -14,5 +14,4 @@ import { AnyChannel, BlockPackListing, BlockPackOverview, BlockPackOverviewLegac
|
|
|
14
14
|
import "./block_registry/index.js";
|
|
15
15
|
import { internal_api_exports } from "./pframe/internal_api/index.js";
|
|
16
16
|
import { hashJson, readJson, readJsonSync } from "./json.js";
|
|
17
|
-
|
|
18
|
-
export { AnyChannel, BlockComponents, BlockComponentsAbsoluteUrl, BlockComponentsDescriptionRaw, BlockComponentsManifest, BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionManifest, BlockPackDescriptionRaw, BlockPackDevV1, BlockPackDevV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackId, BlockPackIdNoVersion, BlockPackListing, BlockPackManifest, BlockPackManifestFile, BlockPackMeta, BlockPackMetaDescriptionRaw, BlockPackMetaEmbeddedBase64, BlockPackMetaEmbeddedBytes, BlockPackMetaManifest, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, BlockPackSpec, BlockPlatform, ContentAbsoluteBinaryLocal, ContentAbsoluteBinaryRemote, ContentAbsoluteFile, ContentAbsoluteFolder, ContentAbsoluteTextLocal, ContentAbsoluteTextRemote, ContentAbsoluteUrl, ContentAny, ContentAnyBinaryLocal, ContentAnyLocal, ContentAnyRemote, ContentAnyTextLocal, ContentExplicitBase64, ContentExplicitBytes, ContentExplicitOrRelative, ContentExplicitString, ContentRelative, ContentRelativeBinary, ContentRelativeText, CreateBlockPackDescriptionSchema, DescriptionContentBinary, DescriptionContentText, FeatureFlags, InitialBlockSettings, LocalDevFolder, ManifestFileInfo, internal_api_exports as PFrameInternal, RegistryEntry, RegistryList, RegistrySpec, RegistryStatus, RemoteRegistryV1Spec, RemoteRegistryV2Spec, SemVer, Sha256Schema, SingleBlockPackOverview, StableChannel, VersionWithChannels, Workflow, WorkflowV1, addPrefixToRelative, blockPackIdEquals, blockPackIdNoVersionEquals, blockPackIdNoVersionToString, blockPackIdToString, blockPackOverviewToLegacy, hashJson, mapRemoteToAbsolute, overrideDescriptionVersion, overrideManifestVersion, readJson, readJsonSync };
|
|
17
|
+
export { AnyChannel, BlockComponents, BlockComponentsAbsoluteUrl, BlockComponentsDescriptionRaw, BlockComponentsManifest, BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionManifest, BlockPackDescriptionRaw, BlockPackDevV1, BlockPackDevV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackId, BlockPackIdNoVersion, BlockPackListing, BlockPackManifest, BlockPackManifestFile, BlockPackMeta, BlockPackMetaDescriptionRaw, BlockPackMetaEmbeddedBase64, BlockPackMetaEmbeddedBytes, BlockPackMetaManifest, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, BlockPackSpec, BlockPlatform, ContentAbsoluteBinaryLocal, ContentAbsoluteBinaryRemote, ContentAbsoluteFile, ContentAbsoluteFolder, ContentAbsoluteTextLocal, ContentAbsoluteTextRemote, ContentAbsoluteUrl, ContentAny, ContentAnyBinaryLocal, ContentAnyLocal, ContentAnyRemote, ContentAnyTextLocal, ContentExplicitBase64, ContentExplicitBytes, ContentExplicitOrRelative, ContentExplicitString, ContentRelative, ContentRelativeBinary, ContentRelativeText, CreateBlockPackDescriptionSchema, DescriptionContentBinary, DescriptionContentText, FeatureFlags, InitialBlockSettings, LocalDevFolder, ManifestFileInfo, internal_api_exports as PFrameInternal, RegistryEntry, RegistryList, RegistrySpec, RegistryStatus, RemoteRegistryV1Spec, RemoteRegistryV2Spec, SemVer, Sha256Schema, SingleBlockPackOverview, StableChannel, VersionWithChannels, Workflow, WorkflowV1, addPrefixToRelative, blockPackIdEquals, blockPackIdNoVersionEquals, blockPackIdNoVersionToString, blockPackIdToString, blockPackOverviewToLegacy, hashJson, mapRemoteToAbsolute, overrideDescriptionVersion, overrideManifestVersion, readJson, readJsonSync };
|
package/dist/json.cjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
const require_runtime = require(
|
|
1
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
let _milaboratories_pl_model_common = require("@milaboratories/pl-model-common");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
node_fs = require_runtime.__toESM(node_fs);
|
|
6
|
-
|
|
7
6
|
//#region src/json.ts
|
|
8
7
|
function hashJson(value) {
|
|
9
8
|
const hash = (0, node_crypto.createHash)("sha256");
|
|
@@ -19,9 +18,9 @@ async function readJson(filePath, signal) {
|
|
|
19
18
|
function readJsonSync(filePath) {
|
|
20
19
|
return (0, _milaboratories_pl_model_common.parseJson)(node_fs.default.readFileSync(filePath, { encoding: "utf8" }));
|
|
21
20
|
}
|
|
22
|
-
|
|
23
21
|
//#endregion
|
|
24
22
|
exports.hashJson = hashJson;
|
|
25
23
|
exports.readJson = readJson;
|
|
26
24
|
exports.readJsonSync = readJsonSync;
|
|
25
|
+
|
|
27
26
|
//# sourceMappingURL=json.cjs.map
|
package/dist/json.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.cjs","names":["fs"],"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"],"mappings":"
|
|
1
|
+
{"version":3,"file":"json.cjs","names":["fs"],"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"],"mappings":";;;;;;AAmBA,SAAgB,SAAS,OAAwB;CAC/C,MAAM,QAAA,GAAA,YAAA,YAAkB,SAAS;AACjC,MAAK,QAAA,GAAA,gCAAA,kBAAwB,MAAM,CAAC;AACpC,QAAO,KAAK,QAAQ,CAAC,SAAS,MAAM;;AAGtC,eAAsB,SACpB,UACA,QACY;AAEZ,SAAA,GAAA,gCAAA,WADgB,MAAMA,QAAAA,QAAG,SAAS,SAAS,UAAU;EAAE,UAAU;EAAQ;EAAQ,CAAC,CACnC;;AAGjD,SAAgB,aAAyC,UAAqB;AAE5E,SAAA,GAAA,gCAAA,WADgBA,QAAAA,QAAG,aAAa,UAAU,EAAE,UAAU,QAAQ,CAAC,CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.ts","names":[],"sources":["../src/json.ts"],"mappings":";;;KAUY,UAAA,gBACV,cAAA,CAAe,CAAA;EAGT,aAAA,EAAe,CAAA;AAAA;AAAA,iBAGP,QAAA,GAAA,CAAY,KAAA,EAAO,cAAA,CAAe,CAAA,IAAK,UAAA,CAAW,CAAA;AAAA,iBAClD,QAAA,WAAmB,gBAAA,CAAA,CAAkB,KAAA,EAAO,CAAA;AAAA,iBAOtC,QAAA,WAAmB,gBAAA,CAAA,CACvC,QAAA,UACA,MAAA,GAAS,WAAA,GACR,OAAA,CAAQ,CAAA;AAAA,iBAKK,YAAA,WAAuB,gBAAA,CAAA,CAAkB,QAAA,WAAmB,CAAA"}
|
package/dist/json.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { canonicalizeJson, parseJson } from "@milaboratories/pl-model-common";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import fs from "node:fs";
|
|
4
|
-
|
|
5
4
|
//#region src/json.ts
|
|
6
5
|
function hashJson(value) {
|
|
7
6
|
const hash = createHash("sha256");
|
|
@@ -17,7 +16,7 @@ async function readJson(filePath, signal) {
|
|
|
17
16
|
function readJsonSync(filePath) {
|
|
18
17
|
return parseJson(fs.readFileSync(filePath, { encoding: "utf8" }));
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
//#endregion
|
|
22
20
|
export { hashJson, readJson, readJsonSync };
|
|
21
|
+
|
|
23
22
|
//# sourceMappingURL=json.js.map
|
package/dist/json.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","names":[],"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"],"mappings":"
|
|
1
|
+
{"version":3,"file":"json.js","names":[],"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"],"mappings":";;;;AAmBA,SAAgB,SAAS,OAAwB;CAC/C,MAAM,OAAO,WAAW,SAAS;AACjC,MAAK,OAAO,iBAAiB,MAAM,CAAC;AACpC,QAAO,KAAK,QAAQ,CAAC,SAAS,MAAM;;AAGtC,eAAsB,SACpB,UACA,QACY;AAEZ,QAAO,UADS,MAAM,GAAG,SAAS,SAAS,UAAU;EAAE,UAAU;EAAQ;EAAQ,CAAC,CACnC;;AAGjD,SAAgB,aAAyC,UAAqB;AAE5E,QAAO,UADS,GAAG,aAAa,UAAU,EAAE,UAAU,QAAQ,CAAC,CAChB"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
1
|
//#region src/pframe/internal_api/api_factory.ts
|
|
3
2
|
/** PColumn spec file extension */
|
|
4
3
|
const SpecExtension = ".spec";
|
|
5
4
|
/** PColumn data info file extension */
|
|
6
5
|
const DataInfoExtension = ".datainfo";
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
7
|
exports.DataInfoExtension = DataInfoExtension;
|
|
10
8
|
exports.SpecExtension = SpecExtension;
|
|
9
|
+
|
|
11
10
|
//# sourceMappingURL=api_factory.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_factory.cjs","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n BinaryPartitionedDataInfo,\n Branded,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PColumnSpec,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/** API exposed by PFrames library allowing to create and provide data for\n * PFrame objects */\nexport interface PFrameFactoryAPIV4 extends Disposable {\n /** Associates data source with this PFrame */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /** Adds PColumn without data info */\n addColumnSpec(columnId: PObjectId, columnSpec: PColumnSpec): void;\n\n /**\n * Assign data info to the specified PColumn.\n * For parquet data info, schema resolution via network is performed during this call.\n */\n setColumnData(\n columnId: PObjectId,\n dataInfo: DataInfo<PFrameBlobId>,\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"api_factory.cjs","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n BinaryPartitionedDataInfo,\n Branded,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PColumnSpec,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> =\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>;\n\n/** API exposed by PFrames library allowing to create and provide data for\n * PFrame objects */\nexport interface PFrameFactoryAPIV4 extends Disposable {\n /** Associates data source with this PFrame */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /** Adds PColumn without data info */\n addColumnSpec(columnId: PObjectId, columnSpec: PColumnSpec): void;\n\n /**\n * Assign data info to the specified PColumn.\n * For parquet data info, schema resolution via network is performed during this call.\n */\n setColumnData(\n columnId: PObjectId,\n dataInfo: DataInfo<PFrameBlobId>,\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":";;AAaA,MAAa,gBAAgB;;AAG7B,MAAa,oBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api_factory.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"mappings":";;;;;cAaa,aAAA;AAAb;AAAA,cAGa,iBAAA;;KAGD,YAAA,GAAe,OAAA;;AAH3B;KAOY,QAAA;;UAGK,kBAAA;EAVoC;AAGrD;;;;EAaE,WAAA,CAAY,OAAA,EAAS,YAAA,KAAiB,OAAA;EAT5B;EAYV,kBAAA,CAAmB,MAAA,EAAQ,YAAA,GAAe,OAAA,CAAQ,UAAA;;;;AATpD;EAeE,aAAA,GAAgB,cAAA;AAAA;;;;;;;KASN,QAAA,SACR,YAAA,GACA,uBAAA,CAAwB,IAAA,IACxB,yBAAA,CAA0B,IAAA,IAC1B,0BAAA,CAA2B,YAAA,CAAa,IAAA;;;UAI3B,kBAAA,SAA2B,UAAA;EA1B9B;EA4BZ,aAAA,CAAc,UAAA,EAAY,kBAAA;EAzB1B;EA4BA,aAAA,CAAc,QAAA,EAAU,SAAA,EAAW,UAAA,EAAY,WAAA;EA5B5B;;;;EAkCnB,aAAA,CACE,QAAA,EAAU,SAAA,EACV,QAAA,EAAU,QAAA,CAAS,YAAA,GACnB,OAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;EAzBO;;EA6BV,OAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api_read.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_read.ts"],"mappings":";;;;;;;;;UAmBiB,gBAAA;EAAA;;;;;;;;EASf,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,OAAA,CAAQ,mBAAA;EAS1B;;;;EAHxB,YAAA,CAAa,OAAA,EAAS,8BAAA,GAAiC,OAAA,CAAQ,+BAAA;EAS1C;EANrB,aAAA,CAAc,QAAA,EAAU,SAAA,GAAY,OAAA,CAAQ,WAAA;EAMmB;EAH/D,WAAA,IAAe,OAAA,CAAQ,WAAA;EASR;EANf,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,OAAA,EAAS,oBAAA,GAAuB,QAAA;EAS5D;EANH,aAAA,CACE,OAAA,EAAS,QAAA,EACT,OAAA;IACE,SAAA,EAAW,gBAAA;IACX,SAAA,EAAW,SAAA;EAAA,IAEZ,QAAA;EAQO;EALV,eAAA,CACE,OAAA,EAAS,mBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api_wasm.d.ts","names":[],"sources":["../../../src/pframe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A;EACN,aAAA,EAAe,MAAA;AAAA;AAAA,UAGA,4BAAA;EACf,QAAA,EAAU,QAAA;EACV,cAAA,EAAgB,iBAAA;AAAA;AAAA,KAGN,kBAAA;EACV,IAAA;EACA,SAAA;EACA,QAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_table.d.ts","names":[],"sources":["../../../src/pframe/internal_api/create_table.ts"],"mappings":";;;;UAQiB,eAAA;EACf,IAAA;EACA,QAAA,EAAU,SAAA;AAAA;AAAA,UAGK,qBAAA;EAAA,SACN,IAAA;EAAA,SACA,QAAA,EAAU,SAAA;EAAA,SACV,KAAA,EAAO,SAAA;EAAA,SACP,WAAA,EAAa,kBAAA;AAAA;AAAA,UAGP,yBAAA;EAAA,SACN,IAAA;EAAA,SACA,QAAA,EAAU,SAAA;EAAA,SACV,KAAA,EAAO,SAAA;EAAA,SACP,WAAA;AAAA;AAAA,UAGM,qBAAA;EAAA,SACN,IAAA;EAAA,SACA,KAAA,EAAO,SAAA;EAAA,SACP,IAAA,EAAM,WAAA;EAAA,SACN,QAAA,EAAU,YAAA;AAAA;AAAA,UAGJ,WAAA;EACf,IAAA;EACA,OAAA,EAAS,WAAA;AAAA;AAAA,UAGM,UAAA;EACf,IAAA;EACA,OAAA,EAAS,WAAA;AAAA;AAAA,UAGM,WAAA;EACf,IAAA;EACA,OAAA,EAAS,WAAA;EACT,SAAA,EAAW,WAAA;AAAA;AAAA,KAGD,WAAA,GACR,eAAA,GACA,qBAAA,GACA,yBAAA,GACA,qBAAA,GACA,WAAA,GACA,UAAA,GACA,WAAA;AAAA,UAEa,oBAAA;EACf,GAAA,EAAK,WAAA;EACL,OAAA,EAAS,kBAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete_column.d.ts","names":[],"sources":["../../../src/pframe/internal_api/delete_column.ts"],"mappings":";;;UAEiB,8BAAA;EACf,OAAA,EAAS,4BAAA;EADM;EAIf,MAAA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B;EAsBvC,GAAA,EAAK,gBAAA;EA9BL;EAgCA,eAAA,EAAiB,6BAAA;EA9BjB;EAgCA,IAAA,EAAM,uBAAA;AAAA;;UAIS,uBAAA;EA9Bf;EAgCA,IAAA,EAAM,0BAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find_columns.d.ts","names":[],"sources":["../../../src/pframe/internal_api/find_columns.ts"],"mappings":";;;;UAGiB,kBAAA;EACf,YAAA,EAAc,YAAA;EACd,cAAA,EAAgB,4BAAA;EAChB,kBAAA;AAAA;AAAA,UAGe,gCAAA;EACf,UAAA,EAAY,iBAAA;EACZ,MAAA,EAAQ,iBAAA;AAAA;AAAA,UAGO,yBAAA;EACf,cAAA,EAAgB,gCAAA;EAChB,yBAAA,EAA2B,gCAAA;AAAA;AAAA,UAGZ,sBAAA;EACf,GAAA,EAAK,gBAAA;EACL,eAAA,EAAiB,yBAAA;AAAA;AAAA,UAGF,mBAAA;EACf,IAAA,EAAM,sBAAA;AAAA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
//#region src/pframe/internal_api/http_helpers.ts
|
|
3
2
|
/** Parquet file extension */
|
|
4
3
|
const ParquetExtension = ".parquet";
|
|
@@ -36,8 +35,8 @@ var BaseObjectStore = class {
|
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
};
|
|
39
|
-
|
|
40
38
|
//#endregion
|
|
41
39
|
exports.BaseObjectStore = BaseObjectStore;
|
|
42
40
|
exports.ParquetExtension = ParquetExtension;
|
|
41
|
+
|
|
43
42
|
//# sourceMappingURL=http_helpers.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http_helpers.cjs","names":[],"sources":["../../../src/pframe/internal_api/http_helpers.ts"],"sourcesContent":["import type { Readable } from \"node:stream\";\nimport type { RequestListener } from \"node:http\";\nimport type { Branded, Base64Encoded } from \"@milaboratories/pl-model-common\";\nimport type { Logger } from \"./common\";\n\n/** Parquet file extension */\nexport const ParquetExtension = \".parquet\" as const;\n\n/** Parquet file name */\nexport type ParquetFileName = Branded<`${string}.parquet`, \"PFrameInternal.ParquetFileName\">;\n\nexport type FileRange = {\n /** Start byte position (inclusive) */\n start: number;\n /** End byte position (inclusive) */\n end: number;\n};\n\n/** HTTP range as of RFC 9110 <https://datatracker.ietf.org/doc/html/rfc9110#name-range> */\nexport type HttpRange =\n | {\n /**\n * Get file content in the specified byte range\n *\n * @example\n * ```\n * GET /file.parquet HTTP/1.1\n * Range: bytes=0-1023\n * ```\n */\n type: \"bounded\";\n /** Start byte position (inclusive) */\n start: number;\n /** End byte position (inclusive) */\n end: number;\n }\n | {\n /**\n * Get byte range starting from the specified offset\n *\n * @example\n * ```\n * GET /file.parquet HTTP/1.1\n * Range: bytes=1024-\n * ```\n */\n type: \"offset\";\n /** Start byte position (inclusive) */\n offset: number;\n }\n | {\n /**\n * Get byte range starting from the specified suffix\n *\n * @example\n * ```\n * GET /file.parquet HTTP/1.1\n * Range: bytes=-1024\n * ```\n */\n type: \"suffix\";\n /** End byte position (inclusive) */\n suffix: number;\n };\n\n/** HTTP method passed to object store */\nexport type HttpMethod = \"GET\" | \"HEAD\";\n\n/** HTTP response from object store */\nexport type ObjectStoreResponse =\n | {\n /**\n * Will be translated to 500 Internal Server Error by the handler\n * or 408 Request Timeout if the request was aborted\n */\n type: \"InternalError\";\n }\n | {\n /** Will be translated to 404 Not Found by the handler */\n type: \"NotFound\";\n }\n | {\n /** Will be translated to 416 Range Not Satisfiable by the handler */\n type: \"RangeNotSatisfiable\";\n /** Total file size in bytes */\n size: number;\n }\n | {\n /** Will be translated to 200 OK or 206 Partial Content by the handler */\n type: \"Ok\";\n /** Total file size in bytes */\n size: number;\n /** File range translated from HTTP range */\n range: FileRange;\n /** Stream of file content, undefined for HEAD requests */\n data?: Readable;\n };\n\n/** Common options for object store creation */\nexport interface ObjectStoreOptions {\n /** Logger instance, no logging is performed when not provided */\n logger?: Logger;\n}\n\n/** Options for file system object store creation */\nexport interface FsStoreOptions extends ObjectStoreOptions {\n /** Local directory to serve files from */\n rootDir: string;\n}\n\nexport interface ObjectStore {\n /**\n * Proxy HTTP(S) request for parquet file to object store.\n * Callback promise resolves when stream is closed by handler @see HttpHelpers.createRequestHandler\n * Callback API is used so that ObjectStore can limit the number of concurrent requests.\n */\n request(\n filename: ParquetFileName,\n params: {\n method: HttpMethod;\n range?: HttpRange;\n signal: AbortSignal;\n callback: (response: ObjectStoreResponse) => Promise<void>;\n },\n ): void;\n}\n\n/** File system abstraction for request handler factory, @see HttpHelpers.createRequestHandler */\nexport abstract class BaseObjectStore implements ObjectStore {\n protected readonly logger: Logger;\n\n constructor(options: ObjectStoreOptions) {\n this.logger = options.logger ?? (() => {});\n }\n\n /** Translate HTTP range to file range, @returns null if the range is not satisfiable */\n protected translate(fileSize: number, range?: HttpRange): FileRange | null {\n if (!range) return { start: 0, end: fileSize - 1 };\n switch (range.type) {\n case \"bounded\":\n if (range.end >= fileSize) return null;\n return { start: range.start, end: range.end };\n case \"offset\":\n if (range.offset >= fileSize) return null;\n return { start: range.offset, end: fileSize - 1 };\n case \"suffix\":\n if (range.suffix > fileSize) return null;\n return { start: fileSize - range.suffix, end: fileSize - 1 };\n }\n }\n\n /**\n * Proxy HTTP(S) request for parquet file to object store.\n * Callback promise resolves when stream is closed by handler @see HttpHelpers.createRequestHandler\n * Callback API is used so that ObjectStore can limit the number of concurrent requests.\n */\n abstract request(\n filename: ParquetFileName,\n params: {\n method: HttpMethod;\n range?: HttpRange;\n signal: AbortSignal;\n callback: (response: ObjectStoreResponse) => Promise<void>;\n },\n ): Promise<void>;\n}\n\n/** Object store base URL in format accepted by Apache DataFusion and DuckDB */\nexport type ObjectStoreUrl = Branded<string, \"PFrameInternal.ObjectStoreUrl\">;\n\n/** HTTP(S) request handler creation options */\nexport type RequestHandlerOptions = {\n /** Object store to serve files from, @see HttpHelpers.createFsStore */\n store: ObjectStore;\n /** Here will go caching options... */\n};\n\n/** Server configuration options */\nexport type HttpServerOptions = {\n /** HTTP(S) request handler function, @see HttpHelpers.createRequestHandler */\n handler: RequestListener;\n /** Port to bind to, @default 0 for auto-assignment */\n port?: number;\n /** Do not apply authorization middleware to @param handler */\n noAuth?: true;\n /** Downgrade default HTTPS server to plain HTTP, @warning use only for testing */\n noHttps?: true;\n};\n\n/**\n * Long unique opaque string for use in Bearer authorization header\n *\n * @example\n * ```ts\n * request.setHeader('Authorization', `Bearer ${authToken}`);\n * ```\n */\nexport type HttpAuthorizationToken = Branded<string, \"PFrameInternal.HttpAuthorizationToken\">;\n\n/**\n * TLS certificate in PEM format\n *\n * @example\n * ```txt\n * -----BEGIN CERTIFICATE-----\n * MIIC2zCCAcOgAwIBAgIJaVW7...\n * ...\n * ...Yf9CRK8fgnukKM7TJ\n * -----END CERTIFICATE-----\n * ```\n */\nexport type PemCertificate = Branded<string, \"PFrameInternal.PemCertificate\">;\n\n/** HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer} */\nexport type HttpServerInfo = {\n /** URL of the HTTP(S) server formatted as `http{s}://<host>:<port>/` */\n url: ObjectStoreUrl;\n /** Authorization token for Bearer scheme, undefined when @see HttpServerOptions.noAuth flag is set */\n authToken?: HttpAuthorizationToken;\n /** Encoded CA certificate of HTTPS server, undefined when @see HttpServerOptions.noHttps flag is set */\n encodedCaCert?: Base64Encoded<PemCertificate>;\n};\n\n/** HTTP(S) server information and controls, @see HttpHelpers.createHttpServer */\nexport interface HttpServer {\n /** Server configuration information for initiating connections from clients */\n get info(): HttpServerInfo;\n /** Promise that resolves when the server is stopped */\n get stopped(): Promise<void>;\n /** Request server stop, returns the same promise as @see HttpServer.stopped */\n stop(): Promise<void>;\n}\n\n/** List of HTTP(S) related helper functions exposed by PFrame module */\nexport interface HttpHelpers {\n /**\n * Create an object store for serving files from a local directory.\n * Rejects if the provided path does not exist or is not a directory.\n */\n createFsStore(options: FsStoreOptions): Promise<ObjectStore>;\n\n /**\n * Create an HTTP request handler for serving files from an object store.\n * Accepts only paths of the form `/<filename>.parquet`, returns 410 otherwise.\n * Assumes that files are immutable (and sets cache headers accordingly).\n */\n createRequestHandler(options: RequestHandlerOptions): RequestListener;\n\n /**\n * Serve HTTP(S) requests using the provided handler on localhost port.\n * @returns promise that resolves when the server has stopped.\n *\n * @example\n * ```ts\n * const rootDir = '/path/to/directory/with/parquet/files';\n *\n * let store = await HttpHelpers.createFsStore({ rootDir }).catch((err: unknown) => {\n * throw new Error(`Failed to create file store for ${rootDir} - ${ensureError(err)}`);\n * });\n *\n * const server = await HttpHelpers.createHttpServer({\n * handler: HttpHelpers.createRequestHandler({ store }),\n * }).catch((err: unknown) => {\n * throw new Error(`Failed to start HTTPS server - ${ensureError(err)}`);\n * });\n *\n * const { url, authToken, encodedCaCert } = server.info;\n *\n * await server.stop();\n * ```\n */\n createHttpServer(options: HttpServerOptions): Promise<HttpServer>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"http_helpers.cjs","names":[],"sources":["../../../src/pframe/internal_api/http_helpers.ts"],"sourcesContent":["import type { Readable } from \"node:stream\";\nimport type { RequestListener } from \"node:http\";\nimport type { Branded, Base64Encoded } from \"@milaboratories/pl-model-common\";\nimport type { Logger } from \"./common\";\n\n/** Parquet file extension */\nexport const ParquetExtension = \".parquet\" as const;\n\n/** Parquet file name */\nexport type ParquetFileName = Branded<`${string}.parquet`, \"PFrameInternal.ParquetFileName\">;\n\nexport type FileRange = {\n /** Start byte position (inclusive) */\n start: number;\n /** End byte position (inclusive) */\n end: number;\n};\n\n/** HTTP range as of RFC 9110 <https://datatracker.ietf.org/doc/html/rfc9110#name-range> */\nexport type HttpRange =\n | {\n /**\n * Get file content in the specified byte range\n *\n * @example\n * ```\n * GET /file.parquet HTTP/1.1\n * Range: bytes=0-1023\n * ```\n */\n type: \"bounded\";\n /** Start byte position (inclusive) */\n start: number;\n /** End byte position (inclusive) */\n end: number;\n }\n | {\n /**\n * Get byte range starting from the specified offset\n *\n * @example\n * ```\n * GET /file.parquet HTTP/1.1\n * Range: bytes=1024-\n * ```\n */\n type: \"offset\";\n /** Start byte position (inclusive) */\n offset: number;\n }\n | {\n /**\n * Get byte range starting from the specified suffix\n *\n * @example\n * ```\n * GET /file.parquet HTTP/1.1\n * Range: bytes=-1024\n * ```\n */\n type: \"suffix\";\n /** End byte position (inclusive) */\n suffix: number;\n };\n\n/** HTTP method passed to object store */\nexport type HttpMethod = \"GET\" | \"HEAD\";\n\n/** HTTP response from object store */\nexport type ObjectStoreResponse =\n | {\n /**\n * Will be translated to 500 Internal Server Error by the handler\n * or 408 Request Timeout if the request was aborted\n */\n type: \"InternalError\";\n }\n | {\n /** Will be translated to 404 Not Found by the handler */\n type: \"NotFound\";\n }\n | {\n /** Will be translated to 416 Range Not Satisfiable by the handler */\n type: \"RangeNotSatisfiable\";\n /** Total file size in bytes */\n size: number;\n }\n | {\n /** Will be translated to 200 OK or 206 Partial Content by the handler */\n type: \"Ok\";\n /** Total file size in bytes */\n size: number;\n /** File range translated from HTTP range */\n range: FileRange;\n /** Stream of file content, undefined for HEAD requests */\n data?: Readable;\n };\n\n/** Common options for object store creation */\nexport interface ObjectStoreOptions {\n /** Logger instance, no logging is performed when not provided */\n logger?: Logger;\n}\n\n/** Options for file system object store creation */\nexport interface FsStoreOptions extends ObjectStoreOptions {\n /** Local directory to serve files from */\n rootDir: string;\n}\n\nexport interface ObjectStore {\n /**\n * Proxy HTTP(S) request for parquet file to object store.\n * Callback promise resolves when stream is closed by handler @see HttpHelpers.createRequestHandler\n * Callback API is used so that ObjectStore can limit the number of concurrent requests.\n */\n request(\n filename: ParquetFileName,\n params: {\n method: HttpMethod;\n range?: HttpRange;\n signal: AbortSignal;\n callback: (response: ObjectStoreResponse) => Promise<void>;\n },\n ): void;\n}\n\n/** File system abstraction for request handler factory, @see HttpHelpers.createRequestHandler */\nexport abstract class BaseObjectStore implements ObjectStore {\n protected readonly logger: Logger;\n\n constructor(options: ObjectStoreOptions) {\n this.logger = options.logger ?? (() => {});\n }\n\n /** Translate HTTP range to file range, @returns null if the range is not satisfiable */\n protected translate(fileSize: number, range?: HttpRange): FileRange | null {\n if (!range) return { start: 0, end: fileSize - 1 };\n switch (range.type) {\n case \"bounded\":\n if (range.end >= fileSize) return null;\n return { start: range.start, end: range.end };\n case \"offset\":\n if (range.offset >= fileSize) return null;\n return { start: range.offset, end: fileSize - 1 };\n case \"suffix\":\n if (range.suffix > fileSize) return null;\n return { start: fileSize - range.suffix, end: fileSize - 1 };\n }\n }\n\n /**\n * Proxy HTTP(S) request for parquet file to object store.\n * Callback promise resolves when stream is closed by handler @see HttpHelpers.createRequestHandler\n * Callback API is used so that ObjectStore can limit the number of concurrent requests.\n */\n abstract request(\n filename: ParquetFileName,\n params: {\n method: HttpMethod;\n range?: HttpRange;\n signal: AbortSignal;\n callback: (response: ObjectStoreResponse) => Promise<void>;\n },\n ): Promise<void>;\n}\n\n/** Object store base URL in format accepted by Apache DataFusion and DuckDB */\nexport type ObjectStoreUrl = Branded<string, \"PFrameInternal.ObjectStoreUrl\">;\n\n/** HTTP(S) request handler creation options */\nexport type RequestHandlerOptions = {\n /** Object store to serve files from, @see HttpHelpers.createFsStore */\n store: ObjectStore;\n /** Here will go caching options... */\n};\n\n/** Server configuration options */\nexport type HttpServerOptions = {\n /** HTTP(S) request handler function, @see HttpHelpers.createRequestHandler */\n handler: RequestListener;\n /** Port to bind to, @default 0 for auto-assignment */\n port?: number;\n /** Do not apply authorization middleware to @param handler */\n noAuth?: true;\n /** Downgrade default HTTPS server to plain HTTP, @warning use only for testing */\n noHttps?: true;\n};\n\n/**\n * Long unique opaque string for use in Bearer authorization header\n *\n * @example\n * ```ts\n * request.setHeader('Authorization', `Bearer ${authToken}`);\n * ```\n */\nexport type HttpAuthorizationToken = Branded<string, \"PFrameInternal.HttpAuthorizationToken\">;\n\n/**\n * TLS certificate in PEM format\n *\n * @example\n * ```txt\n * -----BEGIN CERTIFICATE-----\n * MIIC2zCCAcOgAwIBAgIJaVW7...\n * ...\n * ...Yf9CRK8fgnukKM7TJ\n * -----END CERTIFICATE-----\n * ```\n */\nexport type PemCertificate = Branded<string, \"PFrameInternal.PemCertificate\">;\n\n/** HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer} */\nexport type HttpServerInfo = {\n /** URL of the HTTP(S) server formatted as `http{s}://<host>:<port>/` */\n url: ObjectStoreUrl;\n /** Authorization token for Bearer scheme, undefined when @see HttpServerOptions.noAuth flag is set */\n authToken?: HttpAuthorizationToken;\n /** Encoded CA certificate of HTTPS server, undefined when @see HttpServerOptions.noHttps flag is set */\n encodedCaCert?: Base64Encoded<PemCertificate>;\n};\n\n/** HTTP(S) server information and controls, @see HttpHelpers.createHttpServer */\nexport interface HttpServer {\n /** Server configuration information for initiating connections from clients */\n get info(): HttpServerInfo;\n /** Promise that resolves when the server is stopped */\n get stopped(): Promise<void>;\n /** Request server stop, returns the same promise as @see HttpServer.stopped */\n stop(): Promise<void>;\n}\n\n/** List of HTTP(S) related helper functions exposed by PFrame module */\nexport interface HttpHelpers {\n /**\n * Create an object store for serving files from a local directory.\n * Rejects if the provided path does not exist or is not a directory.\n */\n createFsStore(options: FsStoreOptions): Promise<ObjectStore>;\n\n /**\n * Create an HTTP request handler for serving files from an object store.\n * Accepts only paths of the form `/<filename>.parquet`, returns 410 otherwise.\n * Assumes that files are immutable (and sets cache headers accordingly).\n */\n createRequestHandler(options: RequestHandlerOptions): RequestListener;\n\n /**\n * Serve HTTP(S) requests using the provided handler on localhost port.\n * @returns promise that resolves when the server has stopped.\n *\n * @example\n * ```ts\n * const rootDir = '/path/to/directory/with/parquet/files';\n *\n * let store = await HttpHelpers.createFsStore({ rootDir }).catch((err: unknown) => {\n * throw new Error(`Failed to create file store for ${rootDir} - ${ensureError(err)}`);\n * });\n *\n * const server = await HttpHelpers.createHttpServer({\n * handler: HttpHelpers.createRequestHandler({ store }),\n * }).catch((err: unknown) => {\n * throw new Error(`Failed to start HTTPS server - ${ensureError(err)}`);\n * });\n *\n * const { url, authToken, encodedCaCert } = server.info;\n *\n * await server.stop();\n * ```\n */\n createHttpServer(options: HttpServerOptions): Promise<HttpServer>;\n}\n"],"mappings":";;AAMA,MAAa,mBAAmB;;AA0HhC,IAAsB,kBAAtB,MAA6D;CAC3D;CAEA,YAAY,SAA6B;AACvC,OAAK,SAAS,QAAQ,iBAAiB;;;CAIzC,UAAoB,UAAkB,OAAqC;AACzE,MAAI,CAAC,MAAO,QAAO;GAAE,OAAO;GAAG,KAAK,WAAW;GAAG;AAClD,UAAQ,MAAM,MAAd;GACE,KAAK;AACH,QAAI,MAAM,OAAO,SAAU,QAAO;AAClC,WAAO;KAAE,OAAO,MAAM;KAAO,KAAK,MAAM;KAAK;GAC/C,KAAK;AACH,QAAI,MAAM,UAAU,SAAU,QAAO;AACrC,WAAO;KAAE,OAAO,MAAM;KAAQ,KAAK,WAAW;KAAG;GACnD,KAAK;AACH,QAAI,MAAM,SAAS,SAAU,QAAO;AACpC,WAAO;KAAE,OAAO,WAAW,MAAM;KAAQ,KAAK,WAAW;KAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http_helpers.d.ts","names":[],"sources":["../../../src/pframe/internal_api/http_helpers.ts"],"mappings":";;;;;;;cAMa,gBAAA;AAAb;AAAA,KAGY,eAAA,GAAkB,OAAA;AAAA,KAElB,SAAA;EALuC,sCAOjD,KAAA,UAJU;EAMV,GAAA;AAAA;;KAIU,SAAA;EARA;;;;;AAQZ;;;;EAWM,IAAA,aAEA;EAAA,KAAA,UAcA;EAZA,GAAA;AAAA;EA4BA;;;AAIN;;;;;AAGA;EAvBM,IAAA;EAEA,MAAA;AAAA;EA+BA;;;;;;;;;EAnBA,IAAA,YAmCe;EAjCf,MAAA;AAAA;;KAIM,UAAA;;KAGA,mBAAA;EAoCoB;;;;EA9B1B,IAAA;AAAA;2DAIA,IAAA;AAAA;EAyCQ,qEArCR,IAAA,yBAuCqB;EArCrB,IAAA;AAAA;EAqCoD,yEAjCpD,IAA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