@junobuild/config 2.1.1 → 2.2.0

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.
@@ -0,0 +1,62 @@
1
+ import * as z from 'zod/v4';
2
+ import { type OnRun } from './run.context';
3
+ import type { OnRunEnv } from './run.env';
4
+ export declare const RunFnSchema: z.core.$ZodFunction<z.ZodTuple<[z.ZodObject<{
5
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
6
+ identity: z.ZodUnknown;
7
+ container: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strict>], null>, z.ZodObject<{
9
+ run: z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
10
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
11
+ identity: z.ZodUnknown;
12
+ container: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
14
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
15
+ identity: z.ZodUnknown;
16
+ container: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
18
+ }, z.core.$strict>>;
19
+ export type RunFn = (context: OnRunEnv) => OnRun;
20
+ export declare const RunFnOrObjectSchema: z.ZodUnion<readonly [z.ZodObject<{
21
+ run: z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
22
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
23
+ identity: z.ZodUnknown;
24
+ container: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
26
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
27
+ identity: z.ZodUnknown;
28
+ container: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
30
+ }, z.core.$strict>, z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
31
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
32
+ identity: z.ZodUnknown;
33
+ container: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strict>], null>, z.ZodObject<{
35
+ run: z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
36
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
37
+ identity: z.ZodUnknown;
38
+ container: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
40
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
41
+ identity: z.ZodUnknown;
42
+ container: z.ZodOptional<z.ZodString>;
43
+ }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
44
+ }, z.core.$strict>>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
45
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
46
+ identity: z.ZodUnknown;
47
+ container: z.ZodOptional<z.ZodString>;
48
+ }, z.core.$strict>], null>, z.ZodObject<{
49
+ run: z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
50
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
51
+ identity: z.ZodUnknown;
52
+ container: z.ZodOptional<z.ZodString>;
53
+ }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodObject<{
54
+ satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
55
+ identity: z.ZodUnknown;
56
+ container: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
58
+ }, z.core.$strict>>>]>;
59
+ export type RunFnOrObject = OnRun | RunFn;
60
+ export declare function defineRun(run: OnRun): OnRun;
61
+ export declare function defineRun(run: RunFn): RunFn;
62
+ export declare function defineRun(run: RunFnOrObject): RunFnOrObject;
@@ -0,0 +1,18 @@
1
+ import * as z from 'zod/v4';
2
+ import { type JunoConfigEnv } from '../types/juno.env';
3
+ /**
4
+ * @see OnRunEnv
5
+ */
6
+ export declare const OnRunEnvSchema: 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 executing `juno run`.
12
+ */
13
+ export type OnRunEnv = JunoConfigEnv & {
14
+ /**
15
+ * Optional profile (e.g. `personal`, `team`) used for execution.
16
+ */
17
+ profile?: string;
18
+ };
@@ -1,3 +1,6 @@
1
+ export * from './cli/run';
2
+ export * from './cli/run.context';
3
+ export * from './cli/run.env';
1
4
  export * from './console/config';
2
5
  export * from './console/console.config';
3
6
  export * from './pkg/juno.package';
@@ -0,0 +1,5 @@
1
+ import * as z from 'zod/v4';
2
+ /**
3
+ * Ensures an unknown object is an identity.
4
+ */
5
+ export declare const StrictIdentitySchema: z.ZodUnknown;
@@ -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>>;
@@ -0,0 +1,2 @@
1
+ import * as z from 'zod/v4';
2
+ export declare const createFunctionSchema: <T extends z.core.$ZodFunction>(schema: T) => z.ZodCustom<Parameters<T["implement"]>[0], Parameters<T["implement"]>[0]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/config",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Configuration options for Juno CLI",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",