@junobuild/config 2.2.0 → 2.3.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.
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +2 -2
- package/dist/types/cli/run.context.d.ts +1 -1
- package/dist/types/cli/run.d.ts +2 -2
- package/dist/types/cli/run.env.d.ts +1 -1
- package/dist/types/console/console.config.d.ts +5 -5
- package/dist/types/pkg/juno.package.d.ts +1 -1
- package/dist/types/satellite/configs/assertions.config.d.ts +1 -1
- package/dist/types/satellite/configs/authentication.config.d.ts +1 -1
- package/dist/types/satellite/configs/collections.d.ts +1 -1
- package/dist/types/satellite/configs/datastore.config.d.ts +1 -1
- package/dist/types/satellite/configs/emulator.config.d.ts +1 -1
- package/dist/types/satellite/configs/module.settings.d.ts +1 -1
- package/dist/types/satellite/configs/orbiter.config.d.ts +1 -1
- package/dist/types/satellite/configs/rules.d.ts +1 -1
- package/dist/types/satellite/configs/satellite.config.d.ts +1 -1
- package/dist/types/satellite/juno.config.d.ts +1 -1
- package/dist/types/shared/feature.config.d.ts +1 -1
- package/dist/types/shared/storage.config.d.ts +1 -1
- package/dist/types/types/cli.config.d.ts +4 -4
- package/dist/types/types/encoding.d.ts +1 -1
- package/dist/types/types/juno.env.d.ts +1 -1
- package/dist/types/utils/identity.utils.d.ts +1 -1
- package/dist/types/utils/principal.utils.d.ts +1 -1
- package/dist/types/utils/zod.utils.d.ts +23 -2
- package/package.json +3 -3
package/dist/types/cli/run.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
import { type OnRun } from './run.context';
|
|
3
3
|
import type { OnRunEnv } from './run.env';
|
|
4
|
-
export declare const RunFnSchema: z.
|
|
4
|
+
export declare const RunFnSchema: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
5
5
|
satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
|
|
6
6
|
identity: z.ZodUnknown;
|
|
7
7
|
container: z.ZodOptional<z.ZodString>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PrincipalText } from '@dfinity/zod-schemas';
|
|
2
|
-
import * as z from 'zod
|
|
2
|
+
import * as z from 'zod';
|
|
3
3
|
import { type StorageConfig } from '../shared/storage.config';
|
|
4
4
|
import { type CliConfig } from '../types/cli.config';
|
|
5
5
|
import { type JunoConfigMode } from '../types/juno.env';
|
|
@@ -75,8 +75,8 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
75
75
|
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
76
76
|
pattern: z.ZodOptional<z.ZodString>;
|
|
77
77
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
78
|
-
both: "both";
|
|
79
78
|
replace: "replace";
|
|
79
|
+
both: "both";
|
|
80
80
|
}>>;
|
|
81
81
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
82
82
|
gzip: "gzip";
|
|
@@ -85,8 +85,8 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
85
85
|
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
86
86
|
pattern: z.ZodOptional<z.ZodString>;
|
|
87
87
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
88
|
-
both: "both";
|
|
89
88
|
replace: "replace";
|
|
89
|
+
both: "both";
|
|
90
90
|
}>>;
|
|
91
91
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
92
92
|
gzip: "gzip";
|
|
@@ -135,8 +135,8 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
135
135
|
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
136
136
|
pattern: z.ZodOptional<z.ZodString>;
|
|
137
137
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
138
|
-
both: "both";
|
|
139
138
|
replace: "replace";
|
|
139
|
+
both: "both";
|
|
140
140
|
}>>;
|
|
141
141
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
142
142
|
gzip: "gzip";
|
|
@@ -145,8 +145,8 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
145
145
|
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
146
146
|
pattern: z.ZodOptional<z.ZodString>;
|
|
147
147
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
148
|
-
both: "both";
|
|
149
148
|
replace: "replace";
|
|
149
|
+
both: "both";
|
|
150
150
|
}>>;
|
|
151
151
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
152
152
|
gzip: "gzip";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PrincipalText } from '@dfinity/zod-schemas';
|
|
2
|
-
import * as z from 'zod
|
|
2
|
+
import * as z from 'zod';
|
|
3
3
|
import { type StorageConfig } from '../../shared/storage.config';
|
|
4
4
|
import type { CliConfig } from '../../types/cli.config';
|
|
5
5
|
import { type JunoConfigMode } from '../../types/juno.env';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
import { type EncodingType } from './encoding';
|
|
3
3
|
/**
|
|
4
4
|
* @see Precompress
|
|
@@ -6,8 +6,8 @@ import { type EncodingType } from './encoding';
|
|
|
6
6
|
export declare const PrecompressSchema: z.ZodObject<{
|
|
7
7
|
pattern: z.ZodOptional<z.ZodString>;
|
|
8
8
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
9
|
-
both: "both";
|
|
10
9
|
replace: "replace";
|
|
10
|
+
both: "both";
|
|
11
11
|
}>>;
|
|
12
12
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
13
13
|
gzip: "gzip";
|
|
@@ -23,8 +23,8 @@ export declare const CliConfigSchema: z.ZodObject<{
|
|
|
23
23
|
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
24
24
|
pattern: z.ZodOptional<z.ZodString>;
|
|
25
25
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
26
|
-
both: "both";
|
|
27
26
|
replace: "replace";
|
|
27
|
+
both: "both";
|
|
28
28
|
}>>;
|
|
29
29
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
30
30
|
gzip: "gzip";
|
|
@@ -33,8 +33,8 @@ export declare const CliConfigSchema: z.ZodObject<{
|
|
|
33
33
|
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
34
34
|
pattern: z.ZodOptional<z.ZodString>;
|
|
35
35
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
36
|
-
both: "both";
|
|
37
36
|
replace: "replace";
|
|
37
|
+
both: "both";
|
|
38
38
|
}>>;
|
|
39
39
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
40
40
|
gzip: "gzip";
|
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
2
|
-
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Wraps a Zod function schema so that parsing returns the **original function**
|
|
4
|
+
* instead of Zod's wrapped validator.
|
|
5
|
+
*
|
|
6
|
+
* Why?
|
|
7
|
+
* ----
|
|
8
|
+
* In Zod v4, `z.function({...})` normally returns a wrapper that validates
|
|
9
|
+
* both arguments and the return value **every time the function is called**.
|
|
10
|
+
* If your function's return type is `void | Promise<void>`, Zod tries to
|
|
11
|
+
* validate it synchronously, which can throw
|
|
12
|
+
* "Encountered Promise during synchronous parse"
|
|
13
|
+
* when the implementation is async.
|
|
14
|
+
*
|
|
15
|
+
* By using `.implement`, we tell Zod: “this is the function that satisfies
|
|
16
|
+
* the schema.” That way the schema still validates the function shape at
|
|
17
|
+
* parse time, but the returned value is the **original function** you passed
|
|
18
|
+
* in — no runtime wrapper, no sync/async mismatch.
|
|
19
|
+
*
|
|
20
|
+
* Reference:
|
|
21
|
+
* https://github.com/colinhacks/zod/issues/4143#issuecomment-2845134912*
|
|
22
|
+
*/
|
|
23
|
+
export declare const createFunctionSchema: <T extends z.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.
|
|
3
|
+
"version": "2.3.0",
|
|
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": "^2",
|
|
45
|
+
"zod": "^4"
|
|
46
46
|
}
|
|
47
47
|
}
|