@vercube/core 0.0.45 → 0.0.47

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/index.d.mts CHANGED
@@ -21,7 +21,7 @@ declare class BasePlugin<T = unknown> {
21
21
  use(app: App, options?: T): void | Promise<void>;
22
22
  }
23
23
  //#endregion
24
- //#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.9/node_modules/rolldown/dist/shared/logging-C6h4g8dA.d.mts
24
+ //#region ../../node_modules/.pnpm/rolldown@1.0.2/node_modules/rolldown/dist/shared/logging-BSNejiLS.d.mts
25
25
  //#region src/log/logging.d.ts
26
26
  /** @inline */
27
27
  type LogLevel = "info" | "debug" | "warn";
@@ -71,7 +71,7 @@ interface RolldownError extends RolldownLog {
71
71
  }
72
72
  type LogOrStringHandler = (level: LogLevelWithError, log: RolldownLogWithString) => void; //#endregion
73
73
  //#endregion
74
- //#region ../../node_modules/.pnpm/@oxc-project+types@0.115.0/node_modules/@oxc-project/types/types.d.ts
74
+ //#region ../../node_modules/.pnpm/@oxc-project+types@0.132.0/node_modules/@oxc-project/types/types.d.ts
75
75
  // Auto-generated code, DO NOT EDIT DIRECTLY!
76
76
  // To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`.
77
77
  interface Program extends Span {
@@ -1357,20 +1357,20 @@ interface JSDocUnknownType extends Span {
1357
1357
  type: "TSJSDocUnknownType";
1358
1358
  parent?: Node;
1359
1359
  }
1360
- type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
1361
- type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+" | "-" | "*" | "/" | "%" | "**" | "<<" | ">>" | ">>>" | "|" | "^" | "&" | "in" | "instanceof";
1362
- type LogicalOperator = "||" | "&&" | "??";
1363
- type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
1364
- type UpdateOperator = "++" | "--";
1360
+ type ModuleKind = "script" | "module" | "commonjs";
1365
1361
  interface Span {
1366
1362
  start: number;
1367
1363
  end: number;
1368
1364
  range?: [number, number];
1369
1365
  }
1370
- type ModuleKind = "script" | "module" | "commonjs";
1366
+ type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
1367
+ type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+" | "-" | "*" | "/" | "%" | "**" | "<<" | ">>" | ">>>" | "|" | "^" | "&" | "in" | "instanceof";
1368
+ type LogicalOperator = "||" | "&&" | "??";
1369
+ type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
1370
+ type UpdateOperator = "++" | "--";
1371
1371
  type Node = Program | IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | ThisExpression | ArrayExpression | ObjectExpression | ObjectProperty | TemplateLiteral | TaggedTemplateExpression | TemplateElement | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | CallExpression | NewExpression | MetaProperty | SpreadElement | UpdateExpression | UnaryExpression | BinaryExpression | PrivateInExpression | LogicalExpression | ConditionalExpression | AssignmentExpression | ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetRest | AssignmentTargetWithDefault | AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty | SequenceExpression | Super | AwaitExpression | ChainExpression | ParenthesizedExpression | Directive | Hashbang | BlockStatement | VariableDeclaration | VariableDeclarator | EmptyStatement | ExpressionStatement | IfStatement | DoWhileStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | ContinueStatement | BreakStatement | ReturnStatement | WithStatement | SwitchStatement | SwitchCase | LabeledStatement | ThrowStatement | TryStatement | CatchClause | DebuggerStatement | AssignmentPattern | ObjectPattern | BindingProperty | ArrayPattern | BindingRestElement | Function$1 | FunctionBody | ArrowFunctionExpression | YieldExpression | Class | ClassBody | MethodDefinition | PropertyDefinition | PrivateIdentifier | StaticBlock | AccessorProperty | ImportExpression | ImportDeclaration | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportAttribute | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExportSpecifier | V8IntrinsicExpression | BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXOpeningFragment | JSXClosingFragment | JSXNamespacedName | JSXMemberExpression | JSXExpressionContainer | JSXEmptyExpression | JSXAttribute | JSXSpreadAttribute | JSXIdentifier | JSXSpreadChild | JSXText | TSThisParameter | TSEnumDeclaration | TSEnumBody | TSEnumMember | TSTypeAnnotation | TSLiteralType | TSConditionalType | TSUnionType | TSIntersectionType | TSParenthesizedType | TSTypeOperator | TSArrayType | TSIndexedAccessType | TSTupleType | TSNamedTupleMember | TSOptionalType | TSRestType | TSAnyKeyword | TSStringKeyword | TSBooleanKeyword | TSNumberKeyword | TSNeverKeyword | TSIntrinsicKeyword | TSUnknownKeyword | TSNullKeyword | TSUndefinedKeyword | TSVoidKeyword | TSSymbolKeyword | TSThisType | TSObjectKeyword | TSBigIntKeyword | TSTypeReference | TSQualifiedName | TSTypeParameterInstantiation | TSTypeParameter | TSTypeParameterDeclaration | TSTypeAliasDeclaration | TSClassImplements | TSInterfaceDeclaration | TSInterfaceBody | TSPropertySignature | TSIndexSignature | TSCallSignatureDeclaration | TSMethodSignature | TSConstructSignatureDeclaration | TSIndexSignatureName | TSInterfaceHeritage | TSTypePredicate | TSModuleDeclaration | TSGlobalDeclaration | TSModuleBlock | TSTypeLiteral | TSInferType | TSTypeQuery | TSImportType | TSImportTypeQualifiedName | TSFunctionType | TSConstructorType | TSMappedType | TSTemplateLiteralType | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | Decorator | TSExportAssignment | TSNamespaceExportDeclaration | TSInstantiationExpression | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType | ParamPattern;
1372
1372
  //#endregion
1373
- //#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.9/node_modules/rolldown/dist/shared/binding-BohGL_65.d.mts
1373
+ //#region ../../node_modules/.pnpm/rolldown@1.0.2/node_modules/rolldown/dist/shared/binding-DktDDYoY.d.mts
1374
1374
  interface CodegenOptions {
1375
1375
  /**
1376
1376
  * Remove whitespace.
@@ -1522,6 +1522,15 @@ interface TreeShakeOptions {
1522
1522
  * @default 'always'
1523
1523
  */
1524
1524
  propertyReadSideEffects?: boolean | 'always';
1525
+ /**
1526
+ * Whether property write accesses (assignments to member expressions) have side effects.
1527
+ *
1528
+ * When false, assignments like `obj.prop = value` are considered side-effect-free
1529
+ * (assuming the object and value expressions themselves are side-effect-free).
1530
+ *
1531
+ * @default true
1532
+ */
1533
+ propertyWriteSideEffects?: boolean;
1525
1534
  /**
1526
1535
  * Whether accessing a global variable has side effects.
1527
1536
  *
@@ -1997,6 +2006,24 @@ interface TypeScriptOptions {
1997
2006
  * Defaults to `false`.
1998
2007
  */
1999
2008
  removeClassFieldsWithoutInitializer?: boolean;
2009
+ /**
2010
+ * When true, optimize const enums by inlining their values at usage sites
2011
+ * and removing the enum declaration.
2012
+ *
2013
+ * @default false
2014
+ */
2015
+ optimizeConstEnums?: boolean;
2016
+ /**
2017
+ * When true, optimize regular (non-const) enums by inlining their member
2018
+ * accesses at usage sites when the member value is statically known.
2019
+ *
2020
+ * Non-exported enum declarations are also removed when all members are
2021
+ * evaluable and no references to the enum as a runtime value exist
2022
+ * (e.g., `console.log(Foo)`, `typeof Foo`, or passing the enum as an argument).
2023
+ *
2024
+ * @default false
2025
+ */
2026
+ optimizeEnums?: boolean;
2000
2027
  /**
2001
2028
  * Also generate a `.d.ts` declaration file for TypeScript files.
2002
2029
  *
@@ -2036,28 +2063,38 @@ declare class BindingDecodedMap {
2036
2063
  * Each line is an array of segments, where each segment is [generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex?].
2037
2064
  */
2038
2065
  get mappings(): Array<Array<Array<number>>>;
2066
+ /** The list of source indices that should be excluded from debugging. */
2067
+ get x_google_ignoreList(): Array<number> | null;
2039
2068
  }
2040
- declare class BindingMagicString$1 {
2069
+ declare class BindingMagicString {
2041
2070
  constructor(source: string, options?: BindingMagicStringOptions | undefined | null);
2042
2071
  get original(): string;
2043
2072
  get filename(): string | null;
2073
+ get indentExclusionRanges(): Array<Array<number>> | Array<number> | null;
2074
+ get ignoreList(): boolean;
2044
2075
  get offset(): number;
2045
2076
  set offset(offset: number);
2046
2077
  replace(from: string, to: string): this;
2047
2078
  replaceAll(from: string, to: string): this;
2079
+ /**
2080
+ * Returns the UTF-16 offset past the last match, or -1 if no match was found.
2081
+ * The JS wrapper uses this to update `lastIndex` on the caller's RegExp.
2082
+ * Global/sticky behavior is derived from the regex's own flags.
2083
+ */
2084
+ replaceRegex(from: RegExp, to: string): number;
2048
2085
  prepend(content: string): this;
2049
2086
  append(content: string): this;
2050
2087
  prependLeft(index: number, content: string): this;
2051
2088
  prependRight(index: number, content: string): this;
2052
2089
  appendLeft(index: number, content: string): this;
2053
2090
  appendRight(index: number, content: string): this;
2054
- overwrite(start: number, end: number, content: string): this;
2091
+ overwrite(start: number, end: number, content: string, options?: BindingOverwriteOptions | undefined | null): this;
2055
2092
  toString(): string;
2056
2093
  hasChanged(): boolean;
2057
2094
  length(): number;
2058
2095
  isEmpty(): boolean;
2059
2096
  remove(start: number, end: number): this;
2060
- update(start: number, end: number, content: string): this;
2097
+ update(start: number, end: number, content: string, options?: BindingUpdateOptions | undefined | null): this;
2061
2098
  relocate(start: number, end: number, to: number): this;
2062
2099
  /**
2063
2100
  * Alias for `relocate` to match the original magic-string API.
@@ -2065,7 +2102,7 @@ declare class BindingMagicString$1 {
2065
2102
  * Returns `this` for method chaining.
2066
2103
  */
2067
2104
  move(start: number, end: number, index: number): this;
2068
- indent(indentor?: string | undefined | null): this;
2105
+ indent(indentor?: string | undefined | null, options?: BindingIndentOptions | undefined | null): this;
2069
2106
  /** Trims whitespace or specified characters from the start and end. */
2070
2107
  trim(charType?: string | undefined | null): this;
2071
2108
  /** Trims whitespace or specified characters from the start. */
@@ -2080,13 +2117,15 @@ declare class BindingMagicString$1 {
2080
2117
  */
2081
2118
  insert(index: number, content: string): void;
2082
2119
  /** Returns a clone of the MagicString instance. */
2083
- clone(): BindingMagicString$1;
2120
+ clone(): BindingMagicString;
2084
2121
  /** Returns the last character of the generated string, or an empty string if empty. */
2085
2122
  lastChar(): string;
2086
2123
  /** Returns the content after the last newline in the generated string. */
2087
2124
  lastLine(): string;
2125
+ /** Returns the guessed indentation string, or `\t` if none is found. */
2126
+ getIndentString(): string;
2088
2127
  /** Returns a clone with content outside the specified range removed. */
2089
- snip(start: number, end: number): BindingMagicString$1;
2128
+ snip(start: number, end: number): BindingMagicString;
2090
2129
  /**
2091
2130
  * Resets the portion of the string from `start` to `end` to its original content.
2092
2131
  * This undoes any modifications made to that range.
@@ -2094,8 +2133,12 @@ declare class BindingMagicString$1 {
2094
2133
  */
2095
2134
  reset(start: number, end: number): this;
2096
2135
  /**
2097
- * Returns the content between the specified original character positions.
2136
+ * Returns the content between the specified UTF-16 code unit positions (JS string indices).
2098
2137
  * Supports negative indices (counting from the end).
2138
+ *
2139
+ * When an index falls in the middle of a surrogate pair, the lone surrogate is
2140
+ * included in the result (matching the original magic-string / JS behavior).
2141
+ * This is done by returning a UTF-16 encoded JS string via `napi_create_string_utf16`.
2099
2142
  */
2100
2143
  slice(start?: number | undefined | null, end?: number | undefined | null): string;
2101
2144
  /**
@@ -2139,6 +2182,8 @@ declare class BindingSourceMap {
2139
2182
  get names(): Array<string>;
2140
2183
  /** The VLQ-encoded mappings string. */
2141
2184
  get mappings(): string;
2185
+ /** The list of source indices that should be excluded from debugging. */
2186
+ get x_google_ignoreList(): Array<number> | null;
2142
2187
  /** Returns the source map as a JSON string. */
2143
2188
  toString(): string;
2144
2189
  /** Returns the source map as a base64-encoded data URL. */
@@ -2148,7 +2193,7 @@ declare class BindingSourceMap {
2148
2193
  * Minimal wrapper around a `BundleHandle` for watcher events.
2149
2194
  * This is returned from watcher event data to allow calling `result.close()`.
2150
2195
  */
2151
- type BindingBuiltinPluginName = 'builtin:bundle-analyzer' | 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-wasm-fallback' | 'builtin:vite-web-worker-post';
2196
+ type BindingBuiltinPluginName = 'builtin:bundle-analyzer' | 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-wasm-fallback' | 'builtin:vite-web-worker-post' | 'builtin:oxc-runtime';
2152
2197
  interface BindingHookResolveIdExtraArgs {
2153
2198
  custom?: number;
2154
2199
  isEntry: boolean;
@@ -2163,14 +2208,22 @@ interface BindingHookResolveIdExtraArgs {
2163
2208
  */
2164
2209
  kind: 'import-statement' | 'dynamic-import' | 'require-call' | 'import-rule' | 'url-token' | 'new-url' | 'hot-accept';
2165
2210
  }
2211
+ interface BindingIndentOptions {
2212
+ exclude?: Array<Array<number>> | Array<number>;
2213
+ }
2166
2214
  interface BindingMagicStringOptions {
2167
2215
  filename?: string;
2168
2216
  offset?: number;
2217
+ indentExclusionRanges?: Array<Array<number>> | Array<number>;
2218
+ ignoreList?: boolean;
2169
2219
  }
2170
2220
  interface BindingModules {
2171
2221
  values: Array<BindingRenderedModule>;
2172
2222
  keys: Array<string>;
2173
2223
  }
2224
+ interface BindingOverwriteOptions {
2225
+ contentOnly?: boolean;
2226
+ }
2174
2227
  interface BindingPluginContextResolveOptions {
2175
2228
  /**
2176
2229
  * - `import-statement`: `import { foo } from './lib.js';`
@@ -2204,6 +2257,9 @@ interface BindingSourceMapOptions {
2204
2257
  interface BindingTransformHookExtraArgs {
2205
2258
  moduleType: string;
2206
2259
  }
2260
+ interface BindingUpdateOptions {
2261
+ overwrite?: boolean;
2262
+ }
2207
2263
  interface BindingVitePluginCustom {
2208
2264
  'vite:import-glob'?: ViteImportGlobMeta;
2209
2265
  }
@@ -2226,12 +2282,11 @@ interface PreRenderedChunk {
2226
2282
  /** Exported variable names from this chunk. */
2227
2283
  exports: Array<string>;
2228
2284
  }
2229
- /** @hidden This is only expected to be used by Vite */
2230
2285
  interface ViteImportGlobMeta {
2231
2286
  isSubImportsPattern?: boolean;
2232
2287
  } //#endregion
2233
2288
  //#endregion
2234
- //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-rc.9/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts
2289
+ //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts
2235
2290
  type StringOrRegExp$1 = string | RegExp;
2236
2291
  type PluginModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
2237
2292
  type FilterExpression = And | Or | Not | Id | ImporterId | ModuleType$1 | Code | Query;
@@ -2293,7 +2348,7 @@ declare class Exclude$1 {
2293
2348
  constructor(expr: FilterExpression);
2294
2349
  }
2295
2350
  //#endregion
2296
- //#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.9/node_modules/rolldown/dist/shared/define-config-cG45vHwf.d.mts
2351
+ //#region ../../node_modules/.pnpm/rolldown@1.0.2/node_modules/rolldown/dist/shared/define-config-Bo24xyUK.d.mts
2297
2352
  //#region src/types/misc.d.ts
2298
2353
  /** @inline */
2299
2354
  type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
@@ -2439,8 +2494,21 @@ interface SourceMap {
2439
2494
  }
2440
2495
  /** @category Plugin APIs */
2441
2496
  interface RenderedModule {
2497
+ /**
2498
+ * The rendered code of this module.
2499
+ *
2500
+ * The unused variables and functions are removed.
2501
+ */
2442
2502
  readonly code: string | null;
2503
+ /**
2504
+ * The length of the rendered code of this module.
2505
+ */
2443
2506
  renderedLength: number;
2507
+ /**
2508
+ * The list of exported names from this module.
2509
+ *
2510
+ * The names that are not used are not included.
2511
+ */
2444
2512
  renderedExports: string[];
2445
2513
  }
2446
2514
  /**
@@ -2742,6 +2810,16 @@ interface OutputOptions {
2742
2810
  */
2743
2811
  sourcemapPathTransform?: SourcemapPathTransformOption;
2744
2812
  /**
2813
+ * Whether to exclude the original source code from sourcemaps.
2814
+ *
2815
+ * When `true`, the `sourcesContent` field is omitted from the generated sourcemap,
2816
+ * reducing the sourcemap file size. The sourcemap will still contain source file paths
2817
+ * and mappings, so debugging works if the original files are available.
2818
+ *
2819
+ * @default false
2820
+ */
2821
+ sourcemapExcludeSources?: boolean;
2822
+ /**
2745
2823
  * A string to prepend to the bundle before {@linkcode Plugin.renderChunk | renderChunk} hook.
2746
2824
  *
2747
2825
  * See {@linkcode intro | output.intro}, {@linkcode postBanner | output.postBanner} as well.
@@ -3115,8 +3193,6 @@ interface OutputOptions {
3115
3193
  *
3116
3194
  * When both `legalComments` and `comments.legal` are set, `comments.legal` takes priority.
3117
3195
  *
3118
- *
3119
- *
3120
3196
  * @default true
3121
3197
  */
3122
3198
  comments?: boolean | CommentsOptions;
@@ -3160,9 +3236,18 @@ interface OutputOptions {
3160
3236
  */
3161
3237
  preserveModulesRoot?: string;
3162
3238
  /**
3163
- * Whether to use `var` declarations at the top level scope instead of function / class / let / const expressions.
3239
+ * Whether to convert top-level `let` and `const` declarations into `var` declarations.
3240
+ *
3241
+ * Enabling this option can improve runtime performance of the generated code in
3242
+ * certain environments by avoiding Temporal Dead Zone (TDZ) checks. Only declarations
3243
+ * in the module's top-level scope are rewritten — declarations inside nested scopes
3244
+ * (functions, blocks, etc.) are left as-is.
3164
3245
  *
3165
- * Enabling this option can improve runtime performance of the generated code in certain environments.
3246
+ * Note:
3247
+ * - Top-level `class X {}` declarations are always emitted as `var X = class {}` so
3248
+ * rolldown can hoist them alongside other top-level bindings; this transform is
3249
+ * independent of `topLevelVar`.
3250
+ * - Top-level `function` declarations are never rewritten.
3166
3251
  *
3167
3252
  * @default false
3168
3253
  *
@@ -3221,6 +3306,12 @@ interface OutputOptions {
3221
3306
  */
3222
3307
  strict?: boolean | "auto";
3223
3308
  }
3309
+ /**
3310
+ * Built-in module tag names computed by rolldown.
3311
+ *
3312
+ * - `'$initial'` — the module is statically imported by at least one user-defined entry point, or is part of its static dependency chain.
3313
+ */
3314
+ type BuiltinModuleTag = "$initial";
3224
3315
  type CodeSplittingGroup = {
3225
3316
  /**
3226
3317
  * Name of the group. It will be also used as the name of the chunk and replace the `[name]` placeholder in the {@linkcode OutputOptions.chunkFileNames | output.chunkFileNames} option.
@@ -3384,6 +3475,21 @@ type CodeSplittingGroup = {
3384
3475
  * @default 0
3385
3476
  */
3386
3477
  entriesAwareMergeThreshold?: number;
3478
+ /**
3479
+ * Filter modules by tags. Only modules that have **all** specified tags
3480
+ * are captured by this group. Combines with `test` and other filters —
3481
+ * a module must match all criteria.
3482
+ *
3483
+ * Built-in tags: `'$initial'` (module is statically imported by a user-defined entry or part of its dependency chain).
3484
+ *
3485
+ * @see {@link https://rolldown.rs/in-depth/manual-code-splitting | Manual Code Splitting}
3486
+ *
3487
+ * @example
3488
+ * ```js
3489
+ * { name: 'initial-deps', tags: ['$initial'], maxSize: 1048576 }
3490
+ * ```
3491
+ */
3492
+ tags?: BuiltinModuleTag[];
3387
3493
  };
3388
3494
  /**
3389
3495
  * Alias for {@linkcode CodeSplittingGroup}. Use this type for the `codeSplitting.groups` option.
@@ -3438,14 +3544,23 @@ type CodeSplittingOptions = {
3438
3544
  */
3439
3545
  //#endregion
3440
3546
  //#region src/binding-magic-string.d.ts
3441
- interface BindingMagicString extends BindingMagicString$1 {
3547
+ interface RolldownMagicString extends BindingMagicString {
3442
3548
  readonly isRolldownMagicString: true;
3443
- }
3444
- type BindingMagicStringConstructor = Omit<typeof BindingMagicString$1, "prototype"> & {
3445
- new (...args: ConstructorParameters<typeof BindingMagicString$1>): BindingMagicString;
3446
- prototype: BindingMagicString;
3549
+ /** Accepts a string or RegExp pattern. RegExp supports `$&`, `$$`, and `$N` substitutions. */
3550
+ replace(from: string | RegExp, to: string): this;
3551
+ /** Accepts a string or RegExp pattern. RegExp must have the global (`g`) flag. */
3552
+ replaceAll(from: string | RegExp, to: string): this;
3553
+ }
3554
+ type RolldownMagicStringConstructor = Omit<typeof BindingMagicString, "prototype"> & {
3555
+ new (...args: ConstructorParameters<typeof BindingMagicString>): RolldownMagicString;
3556
+ prototype: RolldownMagicString;
3447
3557
  };
3448
- declare const BindingMagicString: BindingMagicStringConstructor; //#endregion
3558
+ /**
3559
+ * A native MagicString implementation powered by Rust.
3560
+ *
3561
+ * @experimental
3562
+ */
3563
+ declare const RolldownMagicString: RolldownMagicStringConstructor; //#endregion
3449
3564
  //#region src/log/log-handler.d.ts
3450
3565
  type LoggingFunction = (log: RolldownLog | string | (() => RolldownLog | string)) => void;
3451
3566
  type LoggingFunctionWithPosition = (log: RolldownLog | string | (() => RolldownLog | string), pos?: number | {
@@ -3486,6 +3601,15 @@ interface ChecksOptions {
3486
3601
  * */
3487
3602
  missingNameOptionForIifeExport?: boolean;
3488
3603
  /**
3604
+ * Whether to emit warnings when a `#__PURE__` / `@__PURE__` annotation has no effect due to its position.
3605
+ *
3606
+ * Annotations placed where they cannot annotate a call expression (e.g. before a non-call expression,
3607
+ * before a statement declaration, or between an identifier and `=` in a variable declarator) are
3608
+ * ignored by the parser. Matches Rollup's `INVALID_ANNOTATION` log code.
3609
+ * @default true
3610
+ * */
3611
+ invalidAnnotation?: boolean;
3612
+ /**
3489
3613
  * Whether to emit warnings when the way to export values is ambiguous.
3490
3614
  *
3491
3615
  * See [`output.exports`](https://rolldown.rs/reference/OutputOptions.exports).
@@ -3593,6 +3717,15 @@ interface ChecksOptions {
3593
3717
  * @default true
3594
3718
  * */
3595
3719
  ineffectiveDynamicImport?: boolean;
3720
+ /**
3721
+ * Whether to emit info logs when a barrel module has a very large number of re-exports (more than 5000).
3722
+ *
3723
+ * Such modules can significantly slow down module resolution. Consider using
3724
+ * [`@rolldown/plugin-transform-imports`](https://github.com/rolldown/plugins/tree/main/packages/transform-imports)
3725
+ * to rewrite barrel imports at the source level so the barrel file is never loaded.
3726
+ * @default true
3727
+ * */
3728
+ largeBarrelModules?: boolean;
3596
3729
  } //#endregion
3597
3730
  //#region src/options/transform-options.d.ts
3598
3731
  interface TransformOptions extends Omit<TransformOptions$1, "sourceType" | "lang" | "cwd" | "sourcemap" | "define" | "inject" | "jsx"> {
@@ -3783,6 +3916,8 @@ interface NormalizedOutputOptions {
3783
3916
  hashCharacters: "base64" | "base36" | "hex";
3784
3917
  /** @see {@linkcode OutputOptions.sourcemapDebugIds | sourcemapDebugIds} */
3785
3918
  sourcemapDebugIds: boolean;
3919
+ /** @see {@linkcode OutputOptions.sourcemapExcludeSources | sourcemapExcludeSources} */
3920
+ sourcemapExcludeSources: boolean;
3786
3921
  /** @see {@linkcode OutputOptions.sourcemapIgnoreList | sourcemapIgnoreList} */
3787
3922
  sourcemapIgnoreList: boolean | SourcemapIgnoreListOption | StringOrRegExp | undefined;
3788
3923
  /** @see {@linkcode OutputOptions.sourcemapPathTransform | sourcemapPathTransform} */
@@ -3964,8 +4099,6 @@ interface PluginContextMeta {
3964
4099
  }
3965
4100
  /** @category Plugin APIs */
3966
4101
  interface MinimalPluginContext {
3967
- /** @hidden */
3968
- readonly pluginName: string;
3969
4102
  /**
3970
4103
  * Similar to {@linkcode warn | this.warn}, except that it will also abort
3971
4104
  * the bundling process with an error.
@@ -4465,7 +4598,7 @@ interface ExistingRawSourceMap {
4465
4598
  mappings: string;
4466
4599
  names?: string[];
4467
4600
  sources?: (string | null)[];
4468
- sourcesContent?: (string | null)[];
4601
+ sourcesContent?: (string | null | undefined)[];
4469
4602
  sourceRoot?: string;
4470
4603
  version?: number;
4471
4604
  x_google_ignoreList?: number[];
@@ -4617,7 +4750,7 @@ type ResolveIdResult = string | NullValue | false | PartialResolvedId;
4617
4750
  type LoadResult = NullValue | string | SourceDescription;
4618
4751
  /** @inline @category Plugin APIs */
4619
4752
  type TransformResult = NullValue | string | (Omit<SourceDescription, "code"> & {
4620
- code?: string | BindingMagicString;
4753
+ code?: string | RolldownMagicString;
4621
4754
  });
4622
4755
  type RenderedChunkMeta = {
4623
4756
  /**
@@ -4630,7 +4763,7 @@ type RenderedChunkMeta = {
4630
4763
  * Use this to perform string transformations with automatic source map support.
4631
4764
  * This is only available when `experimental.nativeMagicString` is enabled.
4632
4765
  */
4633
- magicString?: BindingMagicString;
4766
+ magicString?: RolldownMagicString;
4634
4767
  };
4635
4768
  /** @category Plugin APIs */
4636
4769
  interface FunctionPluginHooks {
@@ -4737,7 +4870,7 @@ interface FunctionPluginHooks {
4737
4870
  */
4738
4871
  [DEFINED_HOOK_NAMES.transform]: (this: TransformPluginContext, code: string, id: string, meta: BindingTransformHookExtraArgs & {
4739
4872
  moduleType: ModuleType;
4740
- magicString?: BindingMagicString;
4873
+ magicString?: RolldownMagicString;
4741
4874
  ast?: Program;
4742
4875
  }) => TransformResult;
4743
4876
  /**
@@ -4790,8 +4923,8 @@ interface FunctionPluginHooks {
4790
4923
  *
4791
4924
  * @group Output Generation Hooks
4792
4925
  */
4793
- [DEFINED_HOOK_NAMES.renderChunk]: (this: PluginContext, code: string, chunk: RenderedChunk, outputOptions: NormalizedOutputOptions, meta: RenderedChunkMeta) => NullValue | string | BindingMagicString | {
4794
- code: string | BindingMagicString;
4926
+ [DEFINED_HOOK_NAMES.renderChunk]: (this: PluginContext, code: string, chunk: RenderedChunk, outputOptions: NormalizedOutputOptions, meta: RenderedChunkMeta) => NullValue | string | RolldownMagicString | {
4927
+ code: string | RolldownMagicString;
4795
4928
  map?: SourceMapInput;
4796
4929
  };
4797
4930
  /**
@@ -4993,6 +5126,28 @@ type InputOption = string | string[] | Record<string, string>;
4993
5126
  type ExternalOptionFunction = (id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>;
4994
5127
  /** @inline */
4995
5128
  type ExternalOption = StringOrRegExp | StringOrRegExp[] | ExternalOptionFunction;
5129
+ interface ChunkOptimizationOptions {
5130
+ /**
5131
+ * Merge common chunks into existing entry chunks when it is safe.
5132
+ *
5133
+ * This can reduce the number of emitted chunks by moving shared/common modules
5134
+ * into an entry chunk that already depends on them. Rolldown only applies the
5135
+ * merge when it does not create a circular chunk dependency or change strict
5136
+ * entry export signatures. This pass also covers safe empty-facade cleanup.
5137
+ *
5138
+ * @default true
5139
+ */
5140
+ mergeCommonChunks?: boolean;
5141
+ /**
5142
+ * Avoid emitting redundant chunk loads for dynamic entries.
5143
+ *
5144
+ * This pass can reduce dynamic-entry dependent chunks when the shared modules
5145
+ * are guaranteed to be loaded by every importer of that dynamic entry.
5146
+ *
5147
+ * @default true
5148
+ */
5149
+ avoidRedundantChunkLoads?: boolean;
5150
+ }
4996
5151
  type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset" | "copy">;
4997
5152
  interface WatcherFileWatcherOptions {
4998
5153
  /**
@@ -5596,18 +5751,18 @@ interface InputOptions {
5596
5751
  */
5597
5752
  nativeMagicString?: boolean;
5598
5753
  /**
5599
- * Control whether to optimize chunks by allowing entry chunks to have different exports than the underlying entry module.
5600
- * This optimization can reduce the number of generated chunks.
5754
+ * Control chunk optimizations.
5601
5755
  *
5602
- * When enabled, rolldown will try to insert common modules directly into existing chunks rather than creating
5603
- * separate chunks for them, which can result in fewer output files and better performance.
5756
+ * `true` enables both common-chunk merging and redundant dynamic chunk-load avoidance.
5757
+ * `false` disables all chunk optimizations. Use the object form to control
5758
+ * `mergeCommonChunks` and `avoidRedundantChunkLoads` separately.
5604
5759
  *
5605
- * This optimization is automatically disabled when any module uses top-level await (TLA) or contains TLA dependencies,
5606
- * as it could affect execution order guarantees.
5760
+ * These optimizations are automatically disabled when any module uses top-level await (TLA) or contains TLA dependencies,
5761
+ * as they could affect execution order guarantees.
5607
5762
  *
5608
5763
  * @default true
5609
5764
  */
5610
- chunkOptimization?: boolean;
5765
+ chunkOptimization?: boolean | ChunkOptimizationOptions;
5611
5766
  /**
5612
5767
  * Control whether to enable lazy barrel optimization.
5613
5768
  *
@@ -5643,6 +5798,8 @@ interface InputOptions {
5643
5798
  *
5644
5799
  * These options only take effect when running with the [`--watch`](/apis/cli#w-watch) flag, or using {@linkcode watch | watch()} API.
5645
5800
  *
5801
+ *
5802
+ *
5646
5803
  * @experimental
5647
5804
  */
5648
5805
  watch?: WatcherOptions | false;
@@ -5660,6 +5817,11 @@ interface InputOptions {
5660
5817
  makeAbsoluteExternalsRelative?: MakeAbsoluteExternalsRelative;
5661
5818
  /**
5662
5819
  * Devtools integration options.
5820
+ *
5821
+ * When enabled, Rolldown writes JSON-lines devtools output under
5822
+ * `node_modules/.rolldown/{session_id}/`. Consumers can parse the output with
5823
+ * `@rolldown/debug` after `await bundle.close()` resolves.
5824
+ *
5663
5825
  * @experimental
5664
5826
  */
5665
5827
  devtools?: {
package/dist/index.mjs CHANGED
@@ -523,7 +523,7 @@ var RequestContext = class {
523
523
  }
524
524
  };
525
525
  //#endregion
526
- //#region \0@oxc-project+runtime@0.115.0/helpers/decorate.js
526
+ //#region \0@oxc-project+runtime@0.130.0/helpers/decorate.js
527
527
  function __decorate(decorators, target, key, desc) {
528
528
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
529
529
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -957,6 +957,7 @@ var HooksService = class {
957
957
  const index = handlersOfType.findIndex((handler) => handler.id === eventId.__id);
958
958
  if (index === -1) throw new Error("Trying to unbind event that was not bound.");
959
959
  handlersOfType.splice(index, 1);
960
+ if (handlersOfType.length === 0) this.fHandlers.delete(type);
960
961
  }
961
962
  /**
962
963
  * Triggers event, calling all listener callbacks. Will return Promise of number,
@@ -1515,26 +1516,80 @@ function createContainer(config) {
1515
1516
  * This configuration serves as the base settings and can be overridden by user configuration.
1516
1517
  */
1517
1518
  const defaultConfig = {
1519
+ /**
1520
+ * Default logging level set to 'debug' for detailed logging output
1521
+ */
1518
1522
  logLevel: "debug",
1523
+ /**
1524
+ * Production mode disabled by default
1525
+ */
1519
1526
  production: process.env.NODE_ENV === "production",
1527
+ /**
1528
+ * Development mode disabled by default
1529
+ */
1520
1530
  dev: process.env.NODE_ENV !== "production",
1531
+ /**
1532
+ * Build configuration settings
1533
+ */
1521
1534
  build: {
1535
+ /**
1536
+ * Default root directory for the application
1537
+ */
1522
1538
  root: process.cwd(),
1539
+ /**
1540
+ * Default entry point for the application
1541
+ */
1523
1542
  entry: "src/index.ts",
1543
+ /**
1544
+ * Default output settings
1545
+ */
1524
1546
  output: {
1547
+ /**
1548
+ * Main output directory for build artifacts
1549
+ */
1525
1550
  dir: "dist",
1551
+ /**
1552
+ * Directory for public assets
1553
+ */
1526
1554
  publicDir: "public"
1527
1555
  },
1556
+ /**
1557
+ * Default bundler set to 'rolldown'
1558
+ */
1528
1559
  bundler: "rolldown"
1529
1560
  },
1561
+ /**
1562
+ * Server configuration settings
1563
+ */
1530
1564
  server: {
1565
+ /**
1566
+ * Default runtime environment set to 'node'
1567
+ */
1531
1568
  runtime: "node",
1569
+ /**
1570
+ * Default host for local development
1571
+ */
1532
1572
  host: "localhost",
1573
+ /**
1574
+ * Default port for the development server
1575
+ */
1533
1576
  port: 3e3,
1577
+ /**
1578
+ * HTTPS disabled by default
1579
+ */
1534
1580
  https: false,
1581
+ /**
1582
+ * Default static server config
1583
+ */
1535
1584
  static: { dirs: ["public"] }
1536
1585
  },
1586
+ /**
1587
+ * Empty experimental features configuration
1588
+ */
1537
1589
  experimental: {},
1590
+ /**
1591
+ * Empty runtime configuration
1592
+ */
1538
1593
  runtime: {}
1539
1594
  };
1540
1595
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercube/core",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
4
4
  "description": "Core module for Vercube framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,17 +23,17 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "@standard-schema/spec": "1.1.0",
26
- "c12": "4.0.0-beta.4",
27
- "defu": "6.1.4",
26
+ "c12": "4.0.0-beta.5",
27
+ "defu": "6.1.7",
28
28
  "pathe": "2.0.3",
29
29
  "rou3": "0.8.1",
30
- "srvx": "0.11.12",
31
- "@vercube/di": "0.0.45",
32
- "@vercube/logger": "0.0.45"
30
+ "srvx": "0.11.16",
31
+ "@vercube/di": "0.0.47",
32
+ "@vercube/logger": "0.0.47"
33
33
  },
34
34
  "devDependencies": {
35
- "rolldown": "1.0.0-rc.9",
36
- "zod": "4.3.6"
35
+ "rolldown": "1.0.2",
36
+ "zod": "4.4.3"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"