@junobuild/config 2.1.0 → 2.1.1-next-2025-09-23
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/browser/index.js +6 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/node/index.mjs +6 -1
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/cli/task.context.d.ts +64 -0
- package/dist/types/cli/task.d.ts +53 -0
- package/dist/types/cli/task.env.d.ts +18 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/utils/identity.utils.d.ts +5 -0
- package/dist/types/utils/principal.utils.d.ts +5 -0
- package/dist/types/utils/zod.utils.d.ts +2 -0
- package/package.json +4 -4
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { type OnTask } from './task.context';
|
|
3
|
+
import type { OnTaskEnv } from './task.env';
|
|
4
|
+
export declare const TaskFnSchema: z.core.$ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
5
|
+
satellite: z.ZodObject<{
|
|
6
|
+
satelliteId: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>]>;
|
|
7
|
+
identity: z.ZodUnknown;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
}, z.core.$strict>], null>, z.ZodObject<{
|
|
10
|
+
run: z.core.$ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
11
|
+
satellite: z.ZodObject<{
|
|
12
|
+
satelliteId: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>]>;
|
|
13
|
+
identity: z.ZodUnknown;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
}, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>;
|
|
16
|
+
}, z.core.$strict>>;
|
|
17
|
+
export type TaskFn = (context: OnTaskEnv) => OnTask;
|
|
18
|
+
export declare const TaskFnOrObjectSchema: () => z.ZodUnion<readonly [z.ZodObject<{
|
|
19
|
+
run: z.core.$ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
20
|
+
satellite: z.ZodObject<{
|
|
21
|
+
satelliteId: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>]>;
|
|
22
|
+
identity: z.ZodUnknown;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
}, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>;
|
|
25
|
+
}, z.core.$strict>, z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
|
|
26
|
+
satellite: z.ZodObject<{
|
|
27
|
+
satelliteId: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>]>;
|
|
28
|
+
identity: z.ZodUnknown;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
}, z.core.$strict>], null>, z.ZodObject<{
|
|
31
|
+
run: z.core.$ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
32
|
+
satellite: z.ZodObject<{
|
|
33
|
+
satelliteId: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>]>;
|
|
34
|
+
identity: z.ZodUnknown;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
}, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>;
|
|
37
|
+
}, z.core.$strict>>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
|
|
38
|
+
satellite: z.ZodObject<{
|
|
39
|
+
satelliteId: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>]>;
|
|
40
|
+
identity: z.ZodUnknown;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
}, z.core.$strict>], null>, z.ZodObject<{
|
|
43
|
+
run: z.core.$ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
44
|
+
satellite: z.ZodObject<{
|
|
45
|
+
satelliteId: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>]>;
|
|
46
|
+
identity: z.ZodUnknown;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
}, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>;
|
|
49
|
+
}, z.core.$strict>>>]>;
|
|
50
|
+
export type TaskFnOrObject = OnTask | TaskFn;
|
|
51
|
+
export declare function defineTask(task: OnTask): OnTask;
|
|
52
|
+
export declare function defineTask(task: TaskFn): TaskFn;
|
|
53
|
+
export declare function defineTask(task: TaskFnOrObject): TaskFnOrObject;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { type JunoConfigEnv } from '../types/juno.env';
|
|
3
|
+
/**
|
|
4
|
+
* @see OnTaskEnv
|
|
5
|
+
*/
|
|
6
|
+
export declare const OnTaskEnvSchema: z.ZodObject<{
|
|
7
|
+
mode: z.ZodUnion<readonly [z.ZodLiteral<"production">, z.ZodString]>;
|
|
8
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
/**
|
|
11
|
+
* The environment available when running a task with `juno run`.
|
|
12
|
+
*/
|
|
13
|
+
export type OnTaskEnv = JunoConfigEnv & {
|
|
14
|
+
/**
|
|
15
|
+
* Optional profile (e.g. `personal`, `team`) used for execution.
|
|
16
|
+
*/
|
|
17
|
+
profile?: string;
|
|
18
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { Principal } from '@dfinity/principal';
|
|
1
2
|
import * as z from 'zod/v4';
|
|
2
3
|
/**
|
|
3
4
|
* Ensures reliable validation of PrincipalTextSchema inside z.record.
|
|
4
5
|
*/
|
|
5
6
|
export declare const StrictPrincipalTextSchema: z.ZodString;
|
|
7
|
+
/**
|
|
8
|
+
* Ensures an unknown type is a Principal.
|
|
9
|
+
*/
|
|
10
|
+
export declare const StrictPrincipalSchema: z.ZodPipe<z.ZodUnknown, z.ZodTransform<Principal, unknown>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junobuild/config",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1-next-2025-09-23",
|
|
4
4
|
"description": "Configuration options for Juno CLI",
|
|
5
5
|
"author": "David Dal Busco (https://daviddalbusco.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://juno.build",
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@dfinity/zod-schemas": "
|
|
45
|
-
"zod": "
|
|
44
|
+
"@dfinity/zod-schemas": "*",
|
|
45
|
+
"zod": "*"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|