eddev 2.0.0-beta.126 → 2.0.0-beta.127
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/app/server/rpc.d.ts +7 -15
- package/dist/app/server/rpc.d.ts.map +1 -1
- package/dist/node/cli/version.d.ts +1 -1
- package/dist/node/cli/version.js +1 -1
- package/dist/node/compiler/get-vite-config.d.ts +4 -0
- package/dist/node/compiler/get-vite-config.d.ts.map +1 -1
- package/dist/node/compiler/get-vite-config.js +66 -25
- package/package.json +1 -1
package/dist/app/server/rpc.d.ts
CHANGED
|
@@ -9,20 +9,12 @@ export declare const rpcApi: {
|
|
|
9
9
|
}>;
|
|
10
10
|
procedure: import("@trpc/server/unstable-core-do-not-import").ProcedureBuilder<RPCContext, object, object, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, false>;
|
|
11
11
|
middleware: <$ContextOverrides>(fn: import("@trpc/server/unstable-core-do-not-import").MiddlewareFunction<RPCContext, object, object, $ContextOverrides, unknown>) => import("@trpc/server/unstable-core-do-not-import").MiddlewareBuilder<RPCContext, object, $ContextOverrides, unknown>;
|
|
12
|
-
router: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, TInput>;
|
|
19
|
-
<TInput extends import("@trpc/server/unstable-core-do-not-import").CreateRouterOptions>(input: TInput): import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
20
|
-
ctx: RPCContext;
|
|
21
|
-
meta: object;
|
|
22
|
-
errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
|
|
23
|
-
transformer: true;
|
|
24
|
-
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<TInput>>;
|
|
25
|
-
};
|
|
12
|
+
router: <TInput extends import("@trpc/server/unstable-core-do-not-import").CreateRouterOptions>(input: TInput) => import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
|
|
13
|
+
ctx: RPCContext;
|
|
14
|
+
meta: object;
|
|
15
|
+
errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
|
|
16
|
+
transformer: true;
|
|
17
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<TInput>>;
|
|
26
18
|
mergeRouters: typeof import("@trpc/server/unstable-core-do-not-import").mergeRouters;
|
|
27
19
|
createCallerFactory: <TRecord extends import("@trpc/server").RouterRecord>(router: Pick<import("@trpc/server/unstable-core-do-not-import").Router<{
|
|
28
20
|
ctx: RPCContext;
|
|
@@ -48,7 +40,7 @@ export declare function instantiateRouter<T extends RouterSchema>(routes: T): im
|
|
|
48
40
|
meta: object;
|
|
49
41
|
errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
|
|
50
42
|
transformer: true;
|
|
51
|
-
}, T
|
|
43
|
+
}, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<T>>;
|
|
52
44
|
export type InferRPCServerContext<TFunc extends null | ((opts: FetchCreateContextFnOptions) => any)> = {
|
|
53
45
|
req: Request;
|
|
54
46
|
resHeaders: Headers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../../src/app/server/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAY,MAAM,cAAc,CAAA;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAGzE,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../../src/app/server/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAY,MAAM,cAAc,CAAA;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAGzE,eAAO,MAAM,MAAM;;;;;;;;;mCA4B04D,0CAAU;;;;;;;iDAAqwB,cAAU;;;;;;;;;;;CA1BprF,CAAA;AAEF,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,YAAY,CAAC,CAAA;AAE/E,eAAO,MAAM,GAAG;;;WAGP,CAAC,SAAS,YAAY,UAAU,CAAC,GAAG,CAAC;CAG7C,CAAA;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,IAAI,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,CAAC,GAC7C,CAAC,IAAI,EAAE,2BAA2B,KAAK,CAAC,CAE1C;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,YAAY,EAAE,MAAM,EAAE,CAAC;;;;;sFAElE;AAED,MAAM,MAAM,qBAAqB,CAAC,KAAK,SAAS,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,2BAA2B,KAAK,GAAG,CAAC,IAAI;IACrG,GAAG,EAAE,OAAO,CAAA;IACZ,UAAU,EAAE,OAAO,CAAA;CACpB,GAAG,CAAC,KAAK,SAAS,CAAC,IAAI,EAAE,2BAA2B,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.0-beta.
|
|
1
|
+
export declare const VERSION = "2.0.0-beta.127";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/node/cli/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.0.0-beta.
|
|
1
|
+
export const VERSION = "2.0.0-beta.127";
|
|
@@ -21,6 +21,10 @@ export declare function reactPlugin(args?: ReactPluginArgs): PluginOption[];
|
|
|
21
21
|
export declare function ssrPlugin(): PluginOption;
|
|
22
22
|
export declare function corePlugins(args: Args): PluginOption[];
|
|
23
23
|
export declare function storybookVitePlugins(args: Args): PluginOption[];
|
|
24
|
+
export declare function ignoreRollupErrorsPlugin(): PluginOption;
|
|
25
|
+
export declare function loggerPlugin(args: {
|
|
26
|
+
console: StatefulLog<any>;
|
|
27
|
+
}): PluginOption;
|
|
24
28
|
export declare function getViteConfig(args: Args): InlineConfig;
|
|
25
29
|
export {};
|
|
26
30
|
//# sourceMappingURL=get-vite-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-vite-config.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/get-vite-config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAG/D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;IAClC,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,GAAG,KAAK,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CA6BlD;AAED,KAAK,eAAe,GAAG;IACrB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,wBAAgB,WAAW,CAAC,IAAI,GAAE,eAAoB,kBA4FrD;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,YAAY,CAoCxC;AAwBD,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"get-vite-config.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/get-vite-config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAG/D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;IAClC,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,GAAG,KAAK,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CA6BlD;AAED,KAAK,eAAe,GAAG;IACrB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,wBAAgB,WAAW,CAAC,IAAI,GAAE,eAAoB,kBA4FrD;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,YAAY,CAoCxC;AAwBD,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,EAAE,CAStD;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,EAAE,CAE/D;AAED,wBAAgB,wBAAwB,IAAI,YAAY,CA8BvD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;CAAE,GAAG,YAAY,CA4B9E;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CA8DtD"}
|
|
@@ -180,32 +180,82 @@ export function corePlugins(args) {
|
|
|
180
180
|
envPlugin(args),
|
|
181
181
|
tsconfigPaths(),
|
|
182
182
|
reactPlugin({ retainBlockMeta: args.target === "cms" }),
|
|
183
|
+
ignoreRollupErrorsPlugin(),
|
|
184
|
+
args.console && loggerPlugin({ console: args.console }),
|
|
183
185
|
].flat();
|
|
184
186
|
}
|
|
185
187
|
export function storybookVitePlugins(args) {
|
|
186
188
|
return [args.serverless && ssrPlugin(), envPlugin(args), tsconfigPaths()].flat();
|
|
187
189
|
}
|
|
188
|
-
export function
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
190
|
+
export function ignoreRollupErrorsPlugin() {
|
|
191
|
+
return {
|
|
192
|
+
name: "ignore-rollup-errors",
|
|
193
|
+
config(config) {
|
|
194
|
+
const onWarn = config.build?.rollupOptions?.onwarn;
|
|
195
|
+
return {
|
|
196
|
+
build: {
|
|
197
|
+
rollupOptions: {
|
|
198
|
+
onwarn(warning, warn) {
|
|
199
|
+
if (!cliMode.verbose &&
|
|
200
|
+
warning.code &&
|
|
201
|
+
["SOURCEMAP_ERROR", "UNUSED_EXTERNAL_IMPORT", "INVALID_ANNOTATION", "EVAL"].includes(warning.code)) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (warning.code) {
|
|
205
|
+
warning.message = warning.code + ": " + warning.message;
|
|
206
|
+
}
|
|
207
|
+
if (onWarn) {
|
|
208
|
+
onWarn(warning, warn);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
warn(warning);
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
},
|
|
196
218
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
219
|
+
}
|
|
220
|
+
export function loggerPlugin(args) {
|
|
221
|
+
return {
|
|
222
|
+
name: "eddev:logger",
|
|
223
|
+
config() {
|
|
224
|
+
const logger = createLogger();
|
|
225
|
+
logger.info = (msg) => {
|
|
226
|
+
// args.console.info(msg.replace(/\n/, ""))
|
|
227
|
+
};
|
|
228
|
+
logger.warn = (msg) => {
|
|
229
|
+
return;
|
|
230
|
+
if (typeof msg === "string" && msg.includes("auto-determine entry point"))
|
|
231
|
+
return;
|
|
232
|
+
if (typeof msg === "string" && msg.includes("Error when using sourcemap for reporting"))
|
|
233
|
+
return;
|
|
234
|
+
return args.console.warn(msg.replace(/\n/, ""));
|
|
235
|
+
};
|
|
236
|
+
logger.error = (msg) => {
|
|
237
|
+
// args.console.fail(msg.replace(/\n/, ""))
|
|
238
|
+
};
|
|
239
|
+
logger.warnOnce = (msg) => {
|
|
240
|
+
// args.console.warn(msg.replace(/\n/, ""))
|
|
241
|
+
};
|
|
242
|
+
logger.clearScreen = () => {
|
|
243
|
+
args.console.resetLog();
|
|
244
|
+
};
|
|
245
|
+
return {
|
|
246
|
+
customLogger: logger,
|
|
247
|
+
};
|
|
248
|
+
},
|
|
201
249
|
};
|
|
250
|
+
}
|
|
251
|
+
export function getViteConfig(args) {
|
|
252
|
+
const console = args.console;
|
|
202
253
|
const entryFile = `./.eddev/${args.mode === "production" ? "prod" : "dev"}-spa/entry.${args.target === "cms" ? "admin" : "client"}.tsx`;
|
|
203
254
|
/** Initial config */
|
|
204
255
|
const config = {
|
|
205
256
|
appType: "custom",
|
|
206
257
|
mode: args.mode,
|
|
207
258
|
root: args.rootDir,
|
|
208
|
-
customLogger: logger,
|
|
209
259
|
logLevel: cliMode.verbose ? "info" : "warn",
|
|
210
260
|
base: withoutTrailingSlash(args.publicUrl) + "/dist/" + args.target,
|
|
211
261
|
define: {
|
|
@@ -218,11 +268,13 @@ export function getViteConfig(args) {
|
|
|
218
268
|
retainBlockMeta: args.target === "cms",
|
|
219
269
|
}),
|
|
220
270
|
buildStatusPlugin(console),
|
|
271
|
+
ignoreRollupErrorsPlugin(),
|
|
272
|
+
loggerPlugin({ console }),
|
|
221
273
|
],
|
|
222
274
|
build: {
|
|
223
275
|
manifest: true,
|
|
224
276
|
sourcemap: true,
|
|
225
|
-
minify: args.mode === "production",
|
|
277
|
+
minify: args.target === "cms" ? false : args.mode === "production",
|
|
226
278
|
modulePreload: false,
|
|
227
279
|
outDir: args.outDir,
|
|
228
280
|
lib: args.target === "cms"
|
|
@@ -236,17 +288,6 @@ export function getViteConfig(args) {
|
|
|
236
288
|
rollupOptions: {
|
|
237
289
|
input: args.target === "frontend" ? entryFile : undefined,
|
|
238
290
|
external: args.target === "cms" ? ["react", "react-dom"] : [],
|
|
239
|
-
onwarn(warning, warn) {
|
|
240
|
-
if (!cliMode.verbose &&
|
|
241
|
-
warning.code &&
|
|
242
|
-
["SOURCEMAP_ERROR", "UNUSED_EXTERNAL_IMPORT", "INVALID_ANNOTATION", "EVAL"].includes(warning.code)) {
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
if (warning.code) {
|
|
246
|
-
warning.message = warning.code + ": " + warning.message;
|
|
247
|
-
}
|
|
248
|
-
warn(warning);
|
|
249
|
-
},
|
|
250
291
|
output: args.target === "cms"
|
|
251
292
|
? {
|
|
252
293
|
// entryFileNames: "main.admin.js",
|