@granite-js/mpack 0.1.6 → 0.1.8
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/CHANGELOG.md +18 -0
- package/dist/bundler/Bundler.d.ts +1 -1
- package/dist/bundler/Bundler.js +7 -2
- package/dist/bundler/internal/presets.d.ts +19 -0
- package/dist/bundler/internal/presets.js +103 -0
- package/dist/bundler/plugins/buildStatusPlugin/buildStatusPlugin.d.ts +2 -2
- package/dist/bundler/plugins/buildStatusPlugin/buildStatusPlugin.js +4 -5
- package/dist/bundler/plugins/dependencyAliasPlugin/aliasResolver.d.ts +1 -1
- package/dist/bundler/plugins/dependencyAliasPlugin/protocolResolver.d.ts +1 -1
- package/dist/bundler/plugins/shared/swc.d.ts +1 -1
- package/dist/bundler/plugins/transformPlugin/steps/createTransformToHermesSyntaxStep.d.ts +1 -1
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.js +4 -4
- package/dist/index.d.ts +3 -8
- package/dist/index.js +9 -15
- package/dist/metro/build.d.ts +17 -0
- package/dist/metro/build.js +104 -0
- package/dist/metro/getMetroConfig.d.ts +2 -9
- package/dist/metro/getMetroConfig.js +4 -6
- package/dist/metro/index.d.ts +1 -2
- package/dist/metro/index.js +20 -3
- package/dist/operations/build.d.ts +15 -0
- package/dist/operations/{runBundle.js → build.js} +51 -51
- package/dist/operations/createDebuggerMiddleware.d.ts +1 -2
- package/dist/operations/createDebuggerMiddleware.js +4 -4
- package/dist/operations/experimental/serve.d.ts +11 -0
- package/dist/operations/experimental/{runServer.js → serve.js} +21 -25
- package/dist/operations/index.d.ts +3 -3
- package/dist/operations/index.js +23 -6
- package/dist/operations/openDebugger.d.ts +1 -1
- package/dist/operations/openDebugger.js +3 -2
- package/dist/operations/serve.d.ts +10 -0
- package/dist/operations/{runServer.js → serve.js} +15 -16
- package/dist/plugins/statusPlugin.js +1 -1
- package/dist/server/DevServer.d.ts +3 -0
- package/dist/server/DevServer.js +13 -14
- package/dist/server/helpers/createBundlerForDevServer.d.ts +3 -5
- package/dist/server/helpers/createBundlerForDevServer.js +10 -37
- package/dist/server/helpers/mergeBundles.d.ts +4 -4
- package/dist/server/helpers/mergeBundles.js +10 -10
- package/dist/server/plugins/serveBundlePlugin.d.ts +2 -2
- package/dist/server/plugins/symbolicatePlugin/symbolicatePlugin.d.ts +2 -2
- package/dist/server/types.d.ts +9 -14
- package/dist/types/BundlerConfig.d.ts +1 -34
- package/dist/types/Id.d.ts +3 -0
- package/dist/{bundler/types.js → types/Id.js} +2 -2
- package/dist/types/Plugin.d.ts +2 -2
- package/dist/types/index.d.ts +1 -7
- package/dist/types/index.js +2 -14
- package/dist/utils/getId.js +1 -8
- package/dist/utils/progressBar.d.ts +1 -1
- package/dist/utils/writeBundle.d.ts +1 -1
- package/dist/vendors/metro/src/lib/ReportableEvent.d.ts +152 -0
- package/dist/vendors/metro/src/lib/TerminalReporter.d.ts +2 -2
- package/dist/vendors/metro-transform-worker/src/index.js +0 -1
- package/package.json +5 -4
- package/dist/bundler/types.d.ts +0 -17
- package/dist/metro/runBuild.d.ts +0 -12
- package/dist/metro/runBuild.js +0 -66
- package/dist/metro/runtime.d.ts +0 -3
- package/dist/metro/runtime.js +0 -56
- package/dist/metro/types.d.ts +0 -88
- package/dist/metro/types.js +0 -16
- package/dist/operations/experimental/runServer.d.ts +0 -16
- package/dist/operations/runBundle.d.ts +0 -12
- package/dist/operations/runServer.d.ts +0 -15
- package/dist/types/BuildConfig.d.ts +0 -183
- package/dist/types/BuildConfig.js +0 -16
- package/dist/types/Config.d.ts +0 -12
- package/dist/types/Config.js +0 -16
- package/dist/types/DevServerConfig.d.ts +0 -9
- package/dist/types/DevServerConfig.js +0 -16
- package/dist/types/Preset.d.ts +0 -3
- package/dist/types/Preset.js +0 -16
- package/dist/types/PresetContext.d.ts +0 -2
- package/dist/types/PresetContext.js +0 -16
- package/dist/types/ServicesConfig.d.ts +0 -2
- package/dist/types/ServicesConfig.js +0 -16
- package/dist/types/TaskConfig.d.ts +0 -16
- package/dist/types/TaskConfig.js +0 -16
- package/dist/types/schemas/buildConfigSchema.d.ts +0 -235
- package/dist/types/schemas/buildConfigSchema.js +0 -79
- package/dist/types/schemas/bundlerConfigSchema.d.ts +0 -3
- package/dist/types/schemas/bundlerConfigSchema.js +0 -51
- package/dist/types/schemas/configSchema.d.ts +0 -3
- package/dist/types/schemas/configSchema.js +0 -50
- package/dist/types/schemas/devServerConfigSchema.d.ts +0 -3
- package/dist/types/schemas/devServerConfigSchema.js +0 -43
- package/dist/types/schemas/index.d.ts +0 -6
- package/dist/types/schemas/index.js +0 -32
- package/dist/types/schemas/servicesConfigSchema.d.ts +0 -3
- package/dist/types/schemas/servicesConfigSchema.js +0 -48
- package/dist/types/schemas/taskConfigSchema.d.ts +0 -3
- package/dist/types/schemas/taskConfigSchema.js +0 -45
- package/dist/utils/loadConfig.d.ts +0 -2
- package/dist/utils/loadConfig.js +0 -37
- package/dist/utils/loadPresets.d.ts +0 -2
- package/dist/utils/loadPresets.js +0 -40
- package/dist/utils/mergeBanners.d.ts +0 -6
- package/dist/utils/mergeBanners.js +0 -35
- package/dist/utils/mergeBuildConfigs.d.ts +0 -2
- package/dist/utils/mergeBuildConfigs.js +0 -59
- package/dist/utils/mergeInject.d.ts +0 -3
- package/dist/utils/mergeInject.js +0 -30
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import type * as esbuild from 'esbuild';
|
|
2
|
-
import z from 'zod';
|
|
3
|
-
export declare const esbuildConfigSchema: z.ZodType<esbuild.BuildOptions & {
|
|
4
|
-
/**
|
|
5
|
-
* Entry point 최상단에 주입할 스크립트 경로
|
|
6
|
-
*
|
|
7
|
-
* esbuild.inject 옵션에 추가한 스크립트의 경우 entry-point 모듈에만 주입되는 것이 아니라 모든 모듈에 주입되는 문제가 있음.
|
|
8
|
-
* entry-point 모듈의 최상단에만 코드를 주입하도록 별도 옵션을 구성합니다.
|
|
9
|
-
*
|
|
10
|
-
* - 의도한 것과 같이 entry-point 모듈 최상단에 1회만 주입(import)됩니다
|
|
11
|
-
* - 중복되는 inject 스크립트가 제거되어 번들 크기가 작아집니다
|
|
12
|
-
*
|
|
13
|
-
* @see issue {@link https://github.com/evanw/esbuild/issues/475}
|
|
14
|
-
*/
|
|
15
|
-
prelude?: string[];
|
|
16
|
-
}, z.ZodTypeDef, esbuild.BuildOptions & {
|
|
17
|
-
/**
|
|
18
|
-
* Entry point 최상단에 주입할 스크립트 경로
|
|
19
|
-
*
|
|
20
|
-
* esbuild.inject 옵션에 추가한 스크립트의 경우 entry-point 모듈에만 주입되는 것이 아니라 모든 모듈에 주입되는 문제가 있음.
|
|
21
|
-
* entry-point 모듈의 최상단에만 코드를 주입하도록 별도 옵션을 구성합니다.
|
|
22
|
-
*
|
|
23
|
-
* - 의도한 것과 같이 entry-point 모듈 최상단에 1회만 주입(import)됩니다
|
|
24
|
-
* - 중복되는 inject 스크립트가 제거되어 번들 크기가 작아집니다
|
|
25
|
-
*
|
|
26
|
-
* @see issue {@link https://github.com/evanw/esbuild/issues/475}
|
|
27
|
-
*/
|
|
28
|
-
prelude?: string[];
|
|
29
|
-
}>;
|
|
30
|
-
export declare const babelConfigSchema: z.ZodObject<{
|
|
31
|
-
configFile: z.ZodOptional<z.ZodString>;
|
|
32
|
-
presets: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
33
|
-
plugins: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
34
|
-
conditions: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodBoolean>, "many">>;
|
|
35
|
-
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
plugins?: any[] | undefined;
|
|
37
|
-
configFile?: string | undefined;
|
|
38
|
-
conditions?: ((...args: unknown[]) => boolean)[] | undefined;
|
|
39
|
-
presets?: any[] | undefined;
|
|
40
|
-
}, {
|
|
41
|
-
plugins?: any[] | undefined;
|
|
42
|
-
configFile?: string | undefined;
|
|
43
|
-
conditions?: ((...args: unknown[]) => boolean)[] | undefined;
|
|
44
|
-
presets?: any[] | undefined;
|
|
45
|
-
}>;
|
|
46
|
-
export declare const swcConfigSchema: z.ZodObject<{
|
|
47
|
-
plugins: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
plugins?: any[] | undefined;
|
|
50
|
-
}, {
|
|
51
|
-
plugins?: any[] | undefined;
|
|
52
|
-
}>;
|
|
53
|
-
export declare const buildConfigSchema: z.ZodObject<{
|
|
54
|
-
platform: z.ZodEnum<["ios", "android"]>;
|
|
55
|
-
entry: z.ZodString;
|
|
56
|
-
outfile: z.ZodString;
|
|
57
|
-
resolver: z.ZodOptional<z.ZodObject<{
|
|
58
|
-
alias: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
59
|
-
from: z.ZodString;
|
|
60
|
-
to: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodType<string, z.ZodTypeDef, string>, z.ZodPromise<z.ZodType<string, z.ZodTypeDef, string>>]>>]>;
|
|
61
|
-
exact: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
-
}, "strip", z.ZodTypeAny, {
|
|
63
|
-
from: string;
|
|
64
|
-
to: string | ((...args: unknown[]) => string | Promise<string>);
|
|
65
|
-
exact?: boolean | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
from: string;
|
|
68
|
-
to: string | ((...args: unknown[]) => string | Promise<string>);
|
|
69
|
-
exact?: boolean | undefined;
|
|
70
|
-
}>, "many">>;
|
|
71
|
-
protocols: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
72
|
-
resolve: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodPromise<z.ZodType<any, z.ZodTypeDef, any>>]>>>;
|
|
73
|
-
load: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodPromise<z.ZodType<any, z.ZodTypeDef, any>>]>>;
|
|
74
|
-
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
load: (...args: unknown[]) => any;
|
|
76
|
-
resolve?: ((...args: unknown[]) => any) | undefined;
|
|
77
|
-
}, {
|
|
78
|
-
load: (...args: unknown[]) => any;
|
|
79
|
-
resolve?: ((...args: unknown[]) => any) | undefined;
|
|
80
|
-
}>>>;
|
|
81
|
-
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
alias?: {
|
|
83
|
-
from: string;
|
|
84
|
-
to: string | ((...args: unknown[]) => string | Promise<string>);
|
|
85
|
-
exact?: boolean | undefined;
|
|
86
|
-
}[] | undefined;
|
|
87
|
-
protocols?: Record<string, {
|
|
88
|
-
load: (...args: unknown[]) => any;
|
|
89
|
-
resolve?: ((...args: unknown[]) => any) | undefined;
|
|
90
|
-
}> | undefined;
|
|
91
|
-
}, {
|
|
92
|
-
alias?: {
|
|
93
|
-
from: string;
|
|
94
|
-
to: string | ((...args: unknown[]) => string | Promise<string>);
|
|
95
|
-
exact?: boolean | undefined;
|
|
96
|
-
}[] | undefined;
|
|
97
|
-
protocols?: Record<string, {
|
|
98
|
-
load: (...args: unknown[]) => any;
|
|
99
|
-
resolve?: ((...args: unknown[]) => any) | undefined;
|
|
100
|
-
}> | undefined;
|
|
101
|
-
}>>;
|
|
102
|
-
esbuild: z.ZodOptional<z.ZodType<esbuild.BuildOptions & {
|
|
103
|
-
/**
|
|
104
|
-
* Entry point 최상단에 주입할 스크립트 경로
|
|
105
|
-
*
|
|
106
|
-
* esbuild.inject 옵션에 추가한 스크립트의 경우 entry-point 모듈에만 주입되는 것이 아니라 모든 모듈에 주입되는 문제가 있음.
|
|
107
|
-
* entry-point 모듈의 최상단에만 코드를 주입하도록 별도 옵션을 구성합니다.
|
|
108
|
-
*
|
|
109
|
-
* - 의도한 것과 같이 entry-point 모듈 최상단에 1회만 주입(import)됩니다
|
|
110
|
-
* - 중복되는 inject 스크립트가 제거되어 번들 크기가 작아집니다
|
|
111
|
-
*
|
|
112
|
-
* @see issue {@link https://github.com/evanw/esbuild/issues/475}
|
|
113
|
-
*/
|
|
114
|
-
prelude?: string[];
|
|
115
|
-
}, z.ZodTypeDef, esbuild.BuildOptions & {
|
|
116
|
-
/**
|
|
117
|
-
* Entry point 최상단에 주입할 스크립트 경로
|
|
118
|
-
*
|
|
119
|
-
* esbuild.inject 옵션에 추가한 스크립트의 경우 entry-point 모듈에만 주입되는 것이 아니라 모든 모듈에 주입되는 문제가 있음.
|
|
120
|
-
* entry-point 모듈의 최상단에만 코드를 주입하도록 별도 옵션을 구성합니다.
|
|
121
|
-
*
|
|
122
|
-
* - 의도한 것과 같이 entry-point 모듈 최상단에 1회만 주입(import)됩니다
|
|
123
|
-
* - 중복되는 inject 스크립트가 제거되어 번들 크기가 작아집니다
|
|
124
|
-
*
|
|
125
|
-
* @see issue {@link https://github.com/evanw/esbuild/issues/475}
|
|
126
|
-
*/
|
|
127
|
-
prelude?: string[];
|
|
128
|
-
}>>;
|
|
129
|
-
babel: z.ZodOptional<z.ZodObject<{
|
|
130
|
-
configFile: z.ZodOptional<z.ZodString>;
|
|
131
|
-
presets: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
132
|
-
plugins: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
133
|
-
conditions: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodBoolean>, "many">>;
|
|
134
|
-
}, "strip", z.ZodTypeAny, {
|
|
135
|
-
plugins?: any[] | undefined;
|
|
136
|
-
configFile?: string | undefined;
|
|
137
|
-
conditions?: ((...args: unknown[]) => boolean)[] | undefined;
|
|
138
|
-
presets?: any[] | undefined;
|
|
139
|
-
}, {
|
|
140
|
-
plugins?: any[] | undefined;
|
|
141
|
-
configFile?: string | undefined;
|
|
142
|
-
conditions?: ((...args: unknown[]) => boolean)[] | undefined;
|
|
143
|
-
presets?: any[] | undefined;
|
|
144
|
-
}>>;
|
|
145
|
-
swc: z.ZodOptional<z.ZodObject<{
|
|
146
|
-
plugins: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
147
|
-
}, "strip", z.ZodTypeAny, {
|
|
148
|
-
plugins?: any[] | undefined;
|
|
149
|
-
}, {
|
|
150
|
-
plugins?: any[] | undefined;
|
|
151
|
-
}>>;
|
|
152
|
-
extra: z.ZodOptional<z.ZodAny>;
|
|
153
|
-
}, "strip", z.ZodTypeAny, {
|
|
154
|
-
platform: "ios" | "android";
|
|
155
|
-
outfile: string;
|
|
156
|
-
entry: string;
|
|
157
|
-
resolver?: {
|
|
158
|
-
alias?: {
|
|
159
|
-
from: string;
|
|
160
|
-
to: string | ((...args: unknown[]) => string | Promise<string>);
|
|
161
|
-
exact?: boolean | undefined;
|
|
162
|
-
}[] | undefined;
|
|
163
|
-
protocols?: Record<string, {
|
|
164
|
-
load: (...args: unknown[]) => any;
|
|
165
|
-
resolve?: ((...args: unknown[]) => any) | undefined;
|
|
166
|
-
}> | undefined;
|
|
167
|
-
} | undefined;
|
|
168
|
-
esbuild?: (esbuild.BuildOptions & {
|
|
169
|
-
/**
|
|
170
|
-
* Entry point 최상단에 주입할 스크립트 경로
|
|
171
|
-
*
|
|
172
|
-
* esbuild.inject 옵션에 추가한 스크립트의 경우 entry-point 모듈에만 주입되는 것이 아니라 모든 모듈에 주입되는 문제가 있음.
|
|
173
|
-
* entry-point 모듈의 최상단에만 코드를 주입하도록 별도 옵션을 구성합니다.
|
|
174
|
-
*
|
|
175
|
-
* - 의도한 것과 같이 entry-point 모듈 최상단에 1회만 주입(import)됩니다
|
|
176
|
-
* - 중복되는 inject 스크립트가 제거되어 번들 크기가 작아집니다
|
|
177
|
-
*
|
|
178
|
-
* @see issue {@link https://github.com/evanw/esbuild/issues/475}
|
|
179
|
-
*/
|
|
180
|
-
prelude?: string[];
|
|
181
|
-
}) | undefined;
|
|
182
|
-
babel?: {
|
|
183
|
-
plugins?: any[] | undefined;
|
|
184
|
-
configFile?: string | undefined;
|
|
185
|
-
conditions?: ((...args: unknown[]) => boolean)[] | undefined;
|
|
186
|
-
presets?: any[] | undefined;
|
|
187
|
-
} | undefined;
|
|
188
|
-
swc?: {
|
|
189
|
-
plugins?: any[] | undefined;
|
|
190
|
-
} | undefined;
|
|
191
|
-
extra?: any;
|
|
192
|
-
}, {
|
|
193
|
-
platform: "ios" | "android";
|
|
194
|
-
outfile: string;
|
|
195
|
-
entry: string;
|
|
196
|
-
resolver?: {
|
|
197
|
-
alias?: {
|
|
198
|
-
from: string;
|
|
199
|
-
to: string | ((...args: unknown[]) => string | Promise<string>);
|
|
200
|
-
exact?: boolean | undefined;
|
|
201
|
-
}[] | undefined;
|
|
202
|
-
protocols?: Record<string, {
|
|
203
|
-
load: (...args: unknown[]) => any;
|
|
204
|
-
resolve?: ((...args: unknown[]) => any) | undefined;
|
|
205
|
-
}> | undefined;
|
|
206
|
-
} | undefined;
|
|
207
|
-
esbuild?: (esbuild.BuildOptions & {
|
|
208
|
-
/**
|
|
209
|
-
* Entry point 최상단에 주입할 스크립트 경로
|
|
210
|
-
*
|
|
211
|
-
* esbuild.inject 옵션에 추가한 스크립트의 경우 entry-point 모듈에만 주입되는 것이 아니라 모든 모듈에 주입되는 문제가 있음.
|
|
212
|
-
* entry-point 모듈의 최상단에만 코드를 주입하도록 별도 옵션을 구성합니다.
|
|
213
|
-
*
|
|
214
|
-
* - 의도한 것과 같이 entry-point 모듈 최상단에 1회만 주입(import)됩니다
|
|
215
|
-
* - 중복되는 inject 스크립트가 제거되어 번들 크기가 작아집니다
|
|
216
|
-
*
|
|
217
|
-
* @see issue {@link https://github.com/evanw/esbuild/issues/475}
|
|
218
|
-
*/
|
|
219
|
-
prelude?: string[];
|
|
220
|
-
}) | undefined;
|
|
221
|
-
babel?: {
|
|
222
|
-
plugins?: any[] | undefined;
|
|
223
|
-
configFile?: string | undefined;
|
|
224
|
-
conditions?: ((...args: unknown[]) => boolean)[] | undefined;
|
|
225
|
-
presets?: any[] | undefined;
|
|
226
|
-
} | undefined;
|
|
227
|
-
swc?: {
|
|
228
|
-
plugins?: any[] | undefined;
|
|
229
|
-
} | undefined;
|
|
230
|
-
extra?: any;
|
|
231
|
-
}>;
|
|
232
|
-
export type EsbuildConfig = z.infer<typeof esbuildConfigSchema>;
|
|
233
|
-
export type BabelConfig = z.infer<typeof babelConfigSchema>;
|
|
234
|
-
export type SwcConfig = z.infer<typeof swcConfigSchema>;
|
|
235
|
-
export type RawBuildConfig = z.infer<typeof buildConfigSchema>;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var buildConfigSchema_exports = {};
|
|
30
|
-
__export(buildConfigSchema_exports, {
|
|
31
|
-
babelConfigSchema: () => babelConfigSchema,
|
|
32
|
-
buildConfigSchema: () => buildConfigSchema,
|
|
33
|
-
esbuildConfigSchema: () => esbuildConfigSchema,
|
|
34
|
-
swcConfigSchema: () => swcConfigSchema
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(buildConfigSchema_exports);
|
|
37
|
-
var import_zod = __toESM(require("zod"));
|
|
38
|
-
const callableSchema = (returnType) => import_zod.default.function().returns(import_zod.default.union([returnType, import_zod.default.promise(returnType)]));
|
|
39
|
-
const esbuildConfigSchema = import_zod.default.custom();
|
|
40
|
-
const babelConfigSchema = import_zod.default.object({
|
|
41
|
-
configFile: import_zod.default.string().optional(),
|
|
42
|
-
presets: import_zod.default.array(import_zod.default.any()).optional(),
|
|
43
|
-
plugins: import_zod.default.array(import_zod.default.any()).optional(),
|
|
44
|
-
conditions: import_zod.default.array(import_zod.default.function().returns(import_zod.default.boolean())).optional()
|
|
45
|
-
});
|
|
46
|
-
const swcConfigSchema = import_zod.default.object({
|
|
47
|
-
plugins: import_zod.default.array(import_zod.default.any()).optional()
|
|
48
|
-
});
|
|
49
|
-
const buildConfigSchema = import_zod.default.object({
|
|
50
|
-
platform: import_zod.default.enum(["ios", "android"]),
|
|
51
|
-
entry: import_zod.default.string(),
|
|
52
|
-
outfile: import_zod.default.string(),
|
|
53
|
-
resolver: import_zod.default.object({
|
|
54
|
-
alias: import_zod.default.array(
|
|
55
|
-
import_zod.default.object({
|
|
56
|
-
from: import_zod.default.string(),
|
|
57
|
-
to: import_zod.default.union([import_zod.default.string(), callableSchema(import_zod.default.string())]),
|
|
58
|
-
exact: import_zod.default.boolean().optional()
|
|
59
|
-
})
|
|
60
|
-
).optional(),
|
|
61
|
-
protocols: import_zod.default.record(
|
|
62
|
-
import_zod.default.object({
|
|
63
|
-
resolve: callableSchema(import_zod.default.any()).optional(),
|
|
64
|
-
load: callableSchema(import_zod.default.any())
|
|
65
|
-
})
|
|
66
|
-
).optional()
|
|
67
|
-
}).optional(),
|
|
68
|
-
esbuild: esbuildConfigSchema.optional(),
|
|
69
|
-
babel: babelConfigSchema.optional(),
|
|
70
|
-
swc: swcConfigSchema.optional(),
|
|
71
|
-
extra: import_zod.default.any().optional()
|
|
72
|
-
});
|
|
73
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
74
|
-
0 && (module.exports = {
|
|
75
|
-
babelConfigSchema,
|
|
76
|
-
buildConfigSchema,
|
|
77
|
-
esbuildConfigSchema,
|
|
78
|
-
swcConfigSchema
|
|
79
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var bundlerConfigSchema_exports = {};
|
|
30
|
-
__export(bundlerConfigSchema_exports, {
|
|
31
|
-
bundlerConfigSchema: () => bundlerConfigSchema
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(bundlerConfigSchema_exports);
|
|
34
|
-
var import_zod = __toESM(require("zod"));
|
|
35
|
-
var import_buildConfigSchema = require("./buildConfigSchema");
|
|
36
|
-
const bundlerConfigSchema = import_zod.default.object({
|
|
37
|
-
tag: import_zod.default.string(),
|
|
38
|
-
rootDir: import_zod.default.string(),
|
|
39
|
-
appName: import_zod.default.string(),
|
|
40
|
-
scheme: import_zod.default.string(),
|
|
41
|
-
buildConfig: import_buildConfigSchema.buildConfigSchema,
|
|
42
|
-
env: import_zod.default.enum(["local", "alpha", "staging", "live"]),
|
|
43
|
-
dev: import_zod.default.boolean(),
|
|
44
|
-
cache: import_zod.default.boolean(),
|
|
45
|
-
metafile: import_zod.default.boolean(),
|
|
46
|
-
services: import_zod.default.any()
|
|
47
|
-
});
|
|
48
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
-
0 && (module.exports = {
|
|
50
|
-
bundlerConfigSchema
|
|
51
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var configSchema_exports = {};
|
|
30
|
-
__export(configSchema_exports, {
|
|
31
|
-
configSchema: () => configSchema
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(configSchema_exports);
|
|
34
|
-
var import_zod = __toESM(require("zod"));
|
|
35
|
-
var import_devServerConfigSchema = require("./devServerConfigSchema");
|
|
36
|
-
var import_servicesConfigSchema = require("./servicesConfigSchema");
|
|
37
|
-
var import_taskConfigSchema = require("./taskConfigSchema");
|
|
38
|
-
const configSchema = import_zod.default.object({
|
|
39
|
-
appName: import_zod.default.string(),
|
|
40
|
-
scheme: import_zod.default.string(),
|
|
41
|
-
commands: import_zod.default.array(import_zod.default.any()).optional(),
|
|
42
|
-
concurrency: import_zod.default.number().refine(Number.isInteger).default(4),
|
|
43
|
-
tasks: import_taskConfigSchema.taskConfigSchema.array(),
|
|
44
|
-
devServer: import_devServerConfigSchema.devServerConfigSchema.optional(),
|
|
45
|
-
services: import_servicesConfigSchema.servicesConfigSchema.optional()
|
|
46
|
-
});
|
|
47
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
configSchema
|
|
50
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var devServerConfigSchema_exports = {};
|
|
30
|
-
__export(devServerConfigSchema_exports, {
|
|
31
|
-
devServerConfigSchema: () => devServerConfigSchema
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(devServerConfigSchema_exports);
|
|
34
|
-
var import_zod = __toESM(require("zod"));
|
|
35
|
-
var import_buildConfigSchema = require("./buildConfigSchema");
|
|
36
|
-
const devServerConfigSchema = import_zod.default.object({
|
|
37
|
-
presets: import_zod.default.array(import_zod.default.any()).optional(),
|
|
38
|
-
build: import_buildConfigSchema.buildConfigSchema.omit({ platform: true, outfile: true })
|
|
39
|
-
});
|
|
40
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 && (module.exports = {
|
|
42
|
-
devServerConfigSchema
|
|
43
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
var schemas_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(schemas_exports);
|
|
18
|
-
__reExport(schemas_exports, require("./buildConfigSchema"), module.exports);
|
|
19
|
-
__reExport(schemas_exports, require("./bundlerConfigSchema"), module.exports);
|
|
20
|
-
__reExport(schemas_exports, require("./configSchema"), module.exports);
|
|
21
|
-
__reExport(schemas_exports, require("./devServerConfigSchema"), module.exports);
|
|
22
|
-
__reExport(schemas_exports, require("./servicesConfigSchema"), module.exports);
|
|
23
|
-
__reExport(schemas_exports, require("./taskConfigSchema"), module.exports);
|
|
24
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
25
|
-
0 && (module.exports = {
|
|
26
|
-
...require("./buildConfigSchema"),
|
|
27
|
-
...require("./bundlerConfigSchema"),
|
|
28
|
-
...require("./configSchema"),
|
|
29
|
-
...require("./devServerConfigSchema"),
|
|
30
|
-
...require("./servicesConfigSchema"),
|
|
31
|
-
...require("./taskConfigSchema")
|
|
32
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var servicesConfigSchema_exports = {};
|
|
30
|
-
__export(servicesConfigSchema_exports, {
|
|
31
|
-
servicesConfigSchema: () => servicesConfigSchema
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(servicesConfigSchema_exports);
|
|
34
|
-
var import_zod = __toESM(require("zod"));
|
|
35
|
-
const servicesConfigSchema = import_zod.default.object({
|
|
36
|
-
sentry: import_zod.default.object({
|
|
37
|
-
enabled: import_zod.default.boolean().optional().default(true),
|
|
38
|
-
authToken: import_zod.default.string().optional(),
|
|
39
|
-
org: import_zod.default.string().optional(),
|
|
40
|
-
project: import_zod.default.string().optional(),
|
|
41
|
-
release: import_zod.default.any().optional(),
|
|
42
|
-
sourcemap: import_zod.default.any().optional()
|
|
43
|
-
}).optional()
|
|
44
|
-
});
|
|
45
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
-
0 && (module.exports = {
|
|
47
|
-
servicesConfigSchema
|
|
48
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var taskConfigSchema_exports = {};
|
|
30
|
-
__export(taskConfigSchema_exports, {
|
|
31
|
-
taskConfigSchema: () => taskConfigSchema
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(taskConfigSchema_exports);
|
|
34
|
-
var import_zod = __toESM(require("zod"));
|
|
35
|
-
var import_buildConfigSchema = require("./buildConfigSchema");
|
|
36
|
-
const taskConfigSchema = import_zod.default.object({
|
|
37
|
-
tag: import_zod.default.string(),
|
|
38
|
-
presets: import_zod.default.array(import_zod.default.any()).optional(),
|
|
39
|
-
extra: import_zod.default.any().optional(),
|
|
40
|
-
build: import_buildConfigSchema.buildConfigSchema
|
|
41
|
-
});
|
|
42
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
-
0 && (module.exports = {
|
|
44
|
-
taskConfigSchema
|
|
45
|
-
});
|
package/dist/utils/loadConfig.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var loadConfig_exports = {};
|
|
20
|
-
__export(loadConfig_exports, {
|
|
21
|
-
loadConfig: () => loadConfig
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(loadConfig_exports);
|
|
24
|
-
var import_cosmiconfig = require("cosmiconfig");
|
|
25
|
-
var import_schemas = require("../types/schemas");
|
|
26
|
-
async function loadConfig({ rootDir }) {
|
|
27
|
-
const explorer = await (0, import_cosmiconfig.cosmiconfig)("mpack");
|
|
28
|
-
const result = await explorer.search(rootDir);
|
|
29
|
-
if (result == null) {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
return import_schemas.configSchema.parse(result.config);
|
|
33
|
-
}
|
|
34
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
-
0 && (module.exports = {
|
|
36
|
-
loadConfig
|
|
37
|
-
});
|