@platforma-sdk/block-tools 2.8.4 → 2.9.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/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +28 -28
- package/dist/cli.mjs.map +1 -1
- package/dist/{config-CzNlwcwn.mjs → config-DpfTzcgG.mjs} +570 -506
- package/dist/config-DpfTzcgG.mjs.map +1 -0
- package/dist/config-xxVy3IQR.js +3 -0
- package/dist/config-xxVy3IQR.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +15 -15
- package/dist/v2/model/block_components.d.ts +25 -653
- package/dist/v2/model/block_description.d.ts +24 -16221
- package/dist/v2/model/block_meta.d.ts +28 -4351
- package/dist/v2/model/content_conversion.d.ts +6 -13
- package/dist/v2/registry/schema_public.d.ts +39028 -0
- package/package.json +8 -8
- package/src/cmd/build-meta.ts +3 -3
- package/src/v2/build_dist.ts +8 -5
- package/src/v2/model/block_components.ts +77 -28
- package/src/v2/model/block_description.ts +109 -50
- package/src/v2/model/block_meta.ts +109 -29
- package/src/v2/model/content_conversion.ts +26 -51
- package/src/v2/registry/registry.ts +11 -11
- package/src/v2/registry/registry_reader.ts +7 -5
- package/src/v2/registry/schema_public.ts +108 -111
- package/src/v2/source_package.ts +3 -7
- package/dist/config-C8wPuCgh.js +0 -3
- package/dist/config-C8wPuCgh.js.map +0 -1
- package/dist/config-CzNlwcwn.mjs.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import { ContentAbsoluteBinaryLocal, ContentAbsoluteFile, ContentAbsoluteFolder, ContentAbsoluteTextLocal, ContentAnyLocal, ContentExplicitBase64, ContentExplicitBytes, ContentExplicitString, ContentRelative, ContentRelativeBinary, ContentRelativeText } from '@milaboratories/pl-model-middle-layer';
|
|
3
2
|
type ContentCtxFs = {
|
|
4
3
|
type: "local";
|
|
@@ -12,19 +11,13 @@ type ContentCtxUrl = {
|
|
|
12
11
|
};
|
|
13
12
|
/** Describes a place relative to which any content references should be interpreted */
|
|
14
13
|
export type ContentCtx = ContentCtxFs | ContentCtxUrl;
|
|
15
|
-
/**
|
|
16
|
-
export declare function
|
|
17
|
-
type: "absolute-file";
|
|
18
|
-
file: string;
|
|
19
|
-
}, string>;
|
|
14
|
+
/** Resolves a node module request to an absolute file reference. */
|
|
15
|
+
export declare function resolveModuleFile(moduleRoot: string, request: string): ContentAbsoluteFile;
|
|
20
16
|
/**
|
|
21
|
-
*
|
|
22
|
-
* given a list of expected index
|
|
23
|
-
|
|
24
|
-
export declare function
|
|
25
|
-
type: "absolute-folder";
|
|
26
|
-
folder: string;
|
|
27
|
-
}, string>;
|
|
17
|
+
* Resolves a node module request for a folder to an absolute folder reference,
|
|
18
|
+
* given a list of expected index file names in that folder.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveModuleFolder(moduleRoot: string, request: string, indexFilesToLookFor: [string, ...string[]]): ContentAbsoluteFolder;
|
|
28
21
|
export declare function mapLocalToAbsolute(root: string): <T extends ContentAnyLocal>(value: T) => Exclude<T, ContentRelative> | ContentAbsoluteFile;
|
|
29
22
|
export declare function absoluteToString(): (value: ContentAbsoluteTextLocal) => Promise<string>;
|
|
30
23
|
export declare function absoluteToBase64(): (value: ContentAbsoluteBinaryLocal) => Promise<ContentExplicitBase64>;
|