@utoo/pack-shared 1.4.0-alpha.0 → 1.4.0-alpha.10

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/cjs/config.d.ts CHANGED
@@ -234,6 +234,7 @@ export interface ConfigComplete {
234
234
  react?: {
235
235
  runtime?: "automatic" | "classic";
236
236
  importSource?: string;
237
+ absoluteSourceFilename?: boolean;
237
238
  };
238
239
  stats?: boolean;
239
240
  swcPlugins?: [string, any][];
@@ -242,6 +243,8 @@ export interface ConfigComplete {
242
243
  nodePolyfill?: boolean;
243
244
  devServer?: DevServerConfig;
244
245
  server?: {
246
+ /** Entry point for the server runtime (e.g. "src/server.ts") */
247
+ entry?: string;
245
248
  output?: {
246
249
  /** Output path for server chunks, relative to project root. */
247
250
  path?: string;
@@ -250,9 +253,11 @@ export interface ConfigComplete {
250
253
  /** Non-entry chunk filename template. Supports [name] and [contenthash:N]. */
251
254
  chunkFilename?: string;
252
255
  };
253
- functions?: {
254
- /** Module that exports `callServer(actionId, args)` for client-side transport. */
255
- callServerModule: string;
256
+ function?: {
257
+ /** Module that exports `createServerReference(actionId, name)` for client-side proxy generation. */
258
+ clientProxy?: string;
259
+ /** Module that exports `registerServerReference(action, actionId, name)` for the server bundle. */
260
+ serverRegister?: string;
256
261
  };
257
262
  };
258
263
  }
@@ -316,6 +321,11 @@ export interface BundleOptions {
316
321
  * The build id.
317
322
  */
318
323
  buildId?: string;
324
+ /**
325
+ * Whether to enable default utoopack tracing logs.
326
+ * Defaults to true.
327
+ */
328
+ tracing?: boolean;
319
329
  /**
320
330
  * Absolute path for `@utoo/pack`.
321
331
  */
@@ -326,7 +336,7 @@ export interface BundleOptions {
326
336
  * Bundler options (entry, output, define, ...) at top level,
327
337
  * plus optional CLI/runtime options (processEnv, watch, dev, ...).
328
338
  */
329
- export type UserConfig = ConfigComplete & Partial<Pick<BundleOptions, "processEnv" | "watch" | "dev" | "buildId" | "packPath">> & {
339
+ export type UserConfig = ConfigComplete & Partial<Pick<BundleOptions, "processEnv" | "watch" | "dev" | "buildId" | "tracing" | "packPath">> & {
330
340
  rootPath?: string;
331
341
  projectPath?: string;
332
342
  };
package/esm/config.d.ts CHANGED
@@ -234,6 +234,7 @@ export interface ConfigComplete {
234
234
  react?: {
235
235
  runtime?: "automatic" | "classic";
236
236
  importSource?: string;
237
+ absoluteSourceFilename?: boolean;
237
238
  };
238
239
  stats?: boolean;
239
240
  swcPlugins?: [string, any][];
@@ -242,6 +243,8 @@ export interface ConfigComplete {
242
243
  nodePolyfill?: boolean;
243
244
  devServer?: DevServerConfig;
244
245
  server?: {
246
+ /** Entry point for the server runtime (e.g. "src/server.ts") */
247
+ entry?: string;
245
248
  output?: {
246
249
  /** Output path for server chunks, relative to project root. */
247
250
  path?: string;
@@ -250,9 +253,11 @@ export interface ConfigComplete {
250
253
  /** Non-entry chunk filename template. Supports [name] and [contenthash:N]. */
251
254
  chunkFilename?: string;
252
255
  };
253
- functions?: {
254
- /** Module that exports `callServer(actionId, args)` for client-side transport. */
255
- callServerModule: string;
256
+ function?: {
257
+ /** Module that exports `createServerReference(actionId, name)` for client-side proxy generation. */
258
+ clientProxy?: string;
259
+ /** Module that exports `registerServerReference(action, actionId, name)` for the server bundle. */
260
+ serverRegister?: string;
256
261
  };
257
262
  };
258
263
  }
@@ -316,6 +321,11 @@ export interface BundleOptions {
316
321
  * The build id.
317
322
  */
318
323
  buildId?: string;
324
+ /**
325
+ * Whether to enable default utoopack tracing logs.
326
+ * Defaults to true.
327
+ */
328
+ tracing?: boolean;
319
329
  /**
320
330
  * Absolute path for `@utoo/pack`.
321
331
  */
@@ -326,7 +336,7 @@ export interface BundleOptions {
326
336
  * Bundler options (entry, output, define, ...) at top level,
327
337
  * plus optional CLI/runtime options (processEnv, watch, dev, ...).
328
338
  */
329
- export type UserConfig = ConfigComplete & Partial<Pick<BundleOptions, "processEnv" | "watch" | "dev" | "buildId" | "packPath">> & {
339
+ export type UserConfig = ConfigComplete & Partial<Pick<BundleOptions, "processEnv" | "watch" | "dev" | "buildId" | "tracing" | "packPath">> & {
330
340
  rootPath?: string;
331
341
  projectPath?: string;
332
342
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utoo/pack-shared",
3
- "version": "1.4.0-alpha.0",
3
+ "version": "1.4.0-alpha.10",
4
4
  "main": "cjs/index.js",
5
5
  "module": "esm/index.js",
6
6
  "types": "esm/index.d.ts",