@diagonal-hq/cli 0.4.1 → 0.4.2
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/README.md +20 -2
- package/dist/cli.mjs +16369 -16107
- package/dist/index.d.ts +16 -0
- package/dist/index.js +6 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,22 @@ import type { DataApiEndpoint, FieldDefinition, FieldType } from './fields.gener
|
|
|
6
6
|
// reads these calls as static data. index.js implements each define* function
|
|
7
7
|
// as an identity function and each field builder as `{ $field, ...options }`.
|
|
8
8
|
|
|
9
|
+
/** An immutable version in the application's asset library. */
|
|
10
|
+
export type AssetVersionReference<R extends string = string> = {
|
|
11
|
+
readonly $asset: 'version';
|
|
12
|
+
readonly reference: R;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** Selects an uploaded version by its lower-case UUID. */
|
|
16
|
+
export declare const asset: {
|
|
17
|
+
version<const R extends string>(reference: R): AssetVersionReference<R>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** Declares the asset keys available to this build. */
|
|
21
|
+
export declare function defineAssets<const T extends Record<string, AssetVersionReference>>(
|
|
22
|
+
assets: T
|
|
23
|
+
): T;
|
|
24
|
+
|
|
9
25
|
export type StaticValue =
|
|
10
26
|
| string
|
|
11
27
|
| number
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
// scripts/lib/runtime-build/app-modules.mjs copies their source into the
|
|
10
10
|
// workspace modules that a page or a workflow imports.
|
|
11
11
|
|
|
12
|
+
export const defineAssets = (assets) => assets;
|
|
13
|
+
|
|
14
|
+
export const asset = {
|
|
15
|
+
version: (reference) => ({ $asset: 'version', reference })
|
|
16
|
+
};
|
|
17
|
+
|
|
12
18
|
export const defineConfig = (config) => config;
|
|
13
19
|
|
|
14
20
|
export const defineResource = (resource) => resource;
|