@vercube/core 0.0.41 → 0.0.43
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 +52 -61
- package/dist/index.mjs +1 -29
- package/package.json +5 -5
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.
|
|
24
|
+
//#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.3/node_modules/rolldown/dist/shared/logging-CE90D8JR.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.
|
|
74
|
+
//#region ../../node_modules/.pnpm/@oxc-project+types@0.112.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 {
|
|
@@ -1370,7 +1370,7 @@ interface Span {
|
|
|
1370
1370
|
type ModuleKind = "script" | "module" | "commonjs";
|
|
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.
|
|
1373
|
+
//#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.3/node_modules/rolldown/dist/shared/binding-D-XMzSaG.d.mts
|
|
1374
1374
|
interface CodegenOptions {
|
|
1375
1375
|
/**
|
|
1376
1376
|
* Remove whitespace.
|
|
@@ -1491,11 +1491,6 @@ interface MangleOptionsKeepNames {
|
|
|
1491
1491
|
*/
|
|
1492
1492
|
class: boolean;
|
|
1493
1493
|
}
|
|
1494
|
-
/**
|
|
1495
|
-
* Minify asynchronously.
|
|
1496
|
-
*
|
|
1497
|
-
* Note: This function can be slower than `minifySync` due to the overhead of spawning a thread.
|
|
1498
|
-
*/
|
|
1499
1494
|
interface MinifyOptions$1 {
|
|
1500
1495
|
/** Use when minifying an ES module. */
|
|
1501
1496
|
module?: boolean;
|
|
@@ -1701,7 +1696,7 @@ interface IsolatedDeclarationsOptions {
|
|
|
1701
1696
|
/**
|
|
1702
1697
|
* Configure how TSX and JSX are transformed.
|
|
1703
1698
|
*
|
|
1704
|
-
* @see {@link https://
|
|
1699
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
|
|
1705
1700
|
*/
|
|
1706
1701
|
interface JsxOptions {
|
|
1707
1702
|
/**
|
|
@@ -1717,8 +1712,6 @@ interface JsxOptions {
|
|
|
1717
1712
|
* Emit development-specific information, such as `__source` and `__self`.
|
|
1718
1713
|
*
|
|
1719
1714
|
* @default false
|
|
1720
|
-
*
|
|
1721
|
-
* @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx-development}
|
|
1722
1715
|
*/
|
|
1723
1716
|
development?: boolean;
|
|
1724
1717
|
/**
|
|
@@ -1732,11 +1725,7 @@ interface JsxOptions {
|
|
|
1732
1725
|
*/
|
|
1733
1726
|
throwIfNamespace?: boolean;
|
|
1734
1727
|
/**
|
|
1735
|
-
*
|
|
1736
|
-
*
|
|
1737
|
-
* It will mark JSX elements and top-level React method calls as pure for tree shaking.
|
|
1738
|
-
*
|
|
1739
|
-
* @see {@link https://babeljs.io/docs/en/babel-plugin-transform-react-pure-annotations}
|
|
1728
|
+
* Mark JSX elements and top-level React method calls as pure for tree shaking.
|
|
1740
1729
|
*
|
|
1741
1730
|
* @default true
|
|
1742
1731
|
*/
|
|
@@ -1812,7 +1801,7 @@ interface ReactRefreshOptions {
|
|
|
1812
1801
|
/**
|
|
1813
1802
|
* Configure how styled-components are transformed.
|
|
1814
1803
|
*
|
|
1815
|
-
* @see {@link https://
|
|
1804
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins#styled-components}
|
|
1816
1805
|
*/
|
|
1817
1806
|
interface StyledComponentsOptions {
|
|
1818
1807
|
/**
|
|
@@ -1928,9 +1917,15 @@ interface TransformOptions$1 {
|
|
|
1928
1917
|
sourcemap?: boolean;
|
|
1929
1918
|
/** Set assumptions in order to produce smaller output. */
|
|
1930
1919
|
assumptions?: CompilerAssumptions;
|
|
1931
|
-
/**
|
|
1920
|
+
/**
|
|
1921
|
+
* Configure how TypeScript is transformed.
|
|
1922
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/typescript}
|
|
1923
|
+
*/
|
|
1932
1924
|
typescript?: TypeScriptOptions;
|
|
1933
|
-
/**
|
|
1925
|
+
/**
|
|
1926
|
+
* Configure how TSX and JSX are transformed.
|
|
1927
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
|
|
1928
|
+
*/
|
|
1934
1929
|
jsx?: 'preserve' | JsxOptions;
|
|
1935
1930
|
/**
|
|
1936
1931
|
* Sets the target environment for the generated JavaScript.
|
|
@@ -1944,18 +1939,27 @@ interface TransformOptions$1 {
|
|
|
1944
1939
|
*
|
|
1945
1940
|
* @default `esnext` (No transformation)
|
|
1946
1941
|
*
|
|
1947
|
-
* @see
|
|
1942
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/lowering#target}
|
|
1948
1943
|
*/
|
|
1949
1944
|
target?: string | Array<string>;
|
|
1950
1945
|
/** Behaviour for runtime helpers. */
|
|
1951
1946
|
helpers?: Helpers;
|
|
1952
|
-
/**
|
|
1947
|
+
/**
|
|
1948
|
+
* Define Plugin
|
|
1949
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define}
|
|
1950
|
+
*/
|
|
1953
1951
|
define?: Record<string, string>;
|
|
1954
|
-
/**
|
|
1952
|
+
/**
|
|
1953
|
+
* Inject Plugin
|
|
1954
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#inject}
|
|
1955
|
+
*/
|
|
1955
1956
|
inject?: Record<string, string | [string, string]>;
|
|
1956
1957
|
/** Decorator plugin */
|
|
1957
1958
|
decorator?: DecoratorOptions;
|
|
1958
|
-
/**
|
|
1959
|
+
/**
|
|
1960
|
+
* Third-party plugins to use.
|
|
1961
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins}
|
|
1962
|
+
*/
|
|
1959
1963
|
plugins?: PluginsOptions;
|
|
1960
1964
|
}
|
|
1961
1965
|
interface TypeScriptOptions {
|
|
@@ -2235,7 +2239,7 @@ interface ViteImportGlobMeta {
|
|
|
2235
2239
|
isSubImportsPattern?: boolean;
|
|
2236
2240
|
} //#endregion
|
|
2237
2241
|
//#endregion
|
|
2238
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-rc.
|
|
2242
|
+
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-rc.3/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts
|
|
2239
2243
|
type StringOrRegExp$1 = string | RegExp;
|
|
2240
2244
|
type PluginModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
|
|
2241
2245
|
type FilterExpression = And | Or | Not | Id | ImporterId | ModuleType$1 | Code | Query;
|
|
@@ -2297,7 +2301,7 @@ declare class Exclude$1 {
|
|
|
2297
2301
|
constructor(expr: FilterExpression);
|
|
2298
2302
|
}
|
|
2299
2303
|
//#endregion
|
|
2300
|
-
//#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.
|
|
2304
|
+
//#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.3/node_modules/rolldown/dist/shared/define-config-U4pj0ZDn.d.mts
|
|
2301
2305
|
//#region src/types/misc.d.ts
|
|
2302
2306
|
/** @inline */
|
|
2303
2307
|
type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
|
|
@@ -2722,7 +2726,7 @@ interface OutputOptions {
|
|
|
2722
2726
|
*/
|
|
2723
2727
|
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
2724
2728
|
/**
|
|
2725
|
-
* A string to prepend to the bundle before
|
|
2729
|
+
* A string to prepend to the bundle before {@linkcode Plugin.renderChunk | renderChunk} hook.
|
|
2726
2730
|
*
|
|
2727
2731
|
* See {@linkcode intro | output.intro}, {@linkcode postBanner | output.postBanner} as well.
|
|
2728
2732
|
*
|
|
@@ -2730,7 +2734,7 @@ interface OutputOptions {
|
|
|
2730
2734
|
*/
|
|
2731
2735
|
banner?: string | AddonFunction;
|
|
2732
2736
|
/**
|
|
2733
|
-
* A string to append to the bundle before
|
|
2737
|
+
* A string to append to the bundle before {@linkcode Plugin.renderChunk | renderChunk} hook.
|
|
2734
2738
|
*
|
|
2735
2739
|
* See {@linkcode outro | output.outro}, {@linkcode postFooter | output.postFooter} as well.
|
|
2736
2740
|
*
|
|
@@ -2738,7 +2742,7 @@ interface OutputOptions {
|
|
|
2738
2742
|
*/
|
|
2739
2743
|
footer?: string | AddonFunction;
|
|
2740
2744
|
/**
|
|
2741
|
-
* A string to prepend to the bundle after
|
|
2745
|
+
* A string to prepend to the bundle after {@linkcode Plugin.renderChunk | renderChunk} hook and minification.
|
|
2742
2746
|
*
|
|
2743
2747
|
* See {@linkcode banner | output.banner}, {@linkcode intro | output.intro} as well.
|
|
2744
2748
|
*
|
|
@@ -2746,7 +2750,7 @@ interface OutputOptions {
|
|
|
2746
2750
|
*/
|
|
2747
2751
|
postBanner?: string | AddonFunction;
|
|
2748
2752
|
/**
|
|
2749
|
-
* A string to append to the bundle after
|
|
2753
|
+
* A string to append to the bundle after {@linkcode Plugin.renderChunk | renderChunk} hook and minification.
|
|
2750
2754
|
*
|
|
2751
2755
|
* See {@linkcode footer | output.footer}, {@linkcode outro | output.outro} as well.
|
|
2752
2756
|
*
|
|
@@ -2754,7 +2758,7 @@ interface OutputOptions {
|
|
|
2754
2758
|
*/
|
|
2755
2759
|
postFooter?: string | AddonFunction;
|
|
2756
2760
|
/**
|
|
2757
|
-
* A string to prepend inside any format-specific wrapper.
|
|
2761
|
+
* A string to prepend inside any {@link OutputOptions.format | format}-specific wrapper.
|
|
2758
2762
|
*
|
|
2759
2763
|
* See {@linkcode banner | output.banner}, {@linkcode postBanner | output.postBanner} as well.
|
|
2760
2764
|
*
|
|
@@ -2762,7 +2766,7 @@ interface OutputOptions {
|
|
|
2762
2766
|
*/
|
|
2763
2767
|
intro?: string | AddonFunction;
|
|
2764
2768
|
/**
|
|
2765
|
-
* A string to append inside any format-specific wrapper.
|
|
2769
|
+
* A string to append inside any {@link OutputOptions.format | format}-specific wrapper.
|
|
2766
2770
|
*
|
|
2767
2771
|
* See {@linkcode footer | output.footer}, {@linkcode postFooter | output.postFooter} as well.
|
|
2768
2772
|
*
|
|
@@ -2770,7 +2774,7 @@ interface OutputOptions {
|
|
|
2770
2774
|
*/
|
|
2771
2775
|
outro?: string | AddonFunction;
|
|
2772
2776
|
/**
|
|
2773
|
-
* Whether to extend the global variable defined by the {@linkcode OutputOptions.name | name} option in `umd` or `iife` formats.
|
|
2777
|
+
* Whether to extend the global variable defined by the {@linkcode OutputOptions.name | name} option in `umd` or `iife` {@link OutputOptions.format | formats}.
|
|
2774
2778
|
*
|
|
2775
2779
|
* When `true`, the global variable will be defined as `global.name = global.name || {}`.
|
|
2776
2780
|
* When `false`, the global defined by name will be overwritten like `global.name = {}`.
|
|
@@ -2779,12 +2783,12 @@ interface OutputOptions {
|
|
|
2779
2783
|
*/
|
|
2780
2784
|
extend?: boolean;
|
|
2781
2785
|
/**
|
|
2782
|
-
* Whether to add a `__esModule: true` property when generating exports for non-ES formats.
|
|
2786
|
+
* Whether to add a `__esModule: true` property when generating exports for non-ES {@link OutputOptions.format | formats}.
|
|
2783
2787
|
*
|
|
2784
2788
|
* This property signifies that the exported value is the namespace of an ES module and that the default export of this module corresponds to the `.default` property of the exported object.
|
|
2785
2789
|
*
|
|
2786
|
-
* - `true`: Always add the property when using named exports mode, which is similar to what other tools do.
|
|
2787
|
-
* - `"if-default-prop"`: Only add the property when using named exports mode and there also is a default export. The subtle difference is that if there is no default export, consumers of the CommonJS version of your library will get all named exports as default export instead of an error or `undefined`.
|
|
2790
|
+
* - `true`: Always add the property when using {@link OutputOptions.exports | named exports mode}, which is similar to what other tools do.
|
|
2791
|
+
* - `"if-default-prop"`: Only add the property when using {@link OutputOptions.exports | named exports mode} and there also is a default export. The subtle difference is that if there is no default export, consumers of the CommonJS version of your library will get all named exports as default export instead of an error or `undefined`.
|
|
2788
2792
|
* - `false`: Never add the property even if the default export would become a property `.default`.
|
|
2789
2793
|
*
|
|
2790
2794
|
* @default 'if-default-prop'
|
|
@@ -2872,7 +2876,7 @@ interface OutputOptions {
|
|
|
2872
2876
|
*/
|
|
2873
2877
|
minify?: boolean | "dce-only" | MinifyOptions;
|
|
2874
2878
|
/**
|
|
2875
|
-
* Specifies the global variable name that contains the exports of `umd` / `iife`
|
|
2879
|
+
* Specifies the global variable name that contains the exports of `umd` / `iife` {@link OutputOptions.format | formats}.
|
|
2876
2880
|
*
|
|
2877
2881
|
* @example
|
|
2878
2882
|
* ```js
|
|
@@ -2894,7 +2898,7 @@ interface OutputOptions {
|
|
|
2894
2898
|
*/
|
|
2895
2899
|
name?: string;
|
|
2896
2900
|
/**
|
|
2897
|
-
* Specifies `id: variableName` pairs necessary for external imports in `umd` / `iife`
|
|
2901
|
+
* Specifies `id: variableName` pairs necessary for {@link InputOptions.external | external} imports in `umd` / `iife` {@link OutputOptions.format | formats}.
|
|
2898
2902
|
*
|
|
2899
2903
|
* @example
|
|
2900
2904
|
* ```js
|
|
@@ -2922,7 +2926,7 @@ interface OutputOptions {
|
|
|
2922
2926
|
*/
|
|
2923
2927
|
globals?: Record<string, string> | GlobalsFunction;
|
|
2924
2928
|
/**
|
|
2925
|
-
* Maps external module IDs to paths.
|
|
2929
|
+
* Maps {@link InputOptions.external | external} module IDs to paths.
|
|
2926
2930
|
*
|
|
2927
2931
|
* Allows customizing the path used when importing external dependencies.
|
|
2928
2932
|
* This is particularly useful for loading dependencies from CDNs or custom locations.
|
|
@@ -2959,7 +2963,7 @@ interface OutputOptions {
|
|
|
2959
2963
|
*/
|
|
2960
2964
|
generatedCode?: Partial<GeneratedCodeOptions>;
|
|
2961
2965
|
/**
|
|
2962
|
-
* Whether to generate code to support live bindings for external imports.
|
|
2966
|
+
* Whether to generate code to support live bindings for {@link InputOptions.external | external} imports.
|
|
2963
2967
|
*
|
|
2964
2968
|
* With the default value of `true`, Rolldown will generate code to support live bindings for external imports.
|
|
2965
2969
|
*
|
|
@@ -3119,13 +3123,13 @@ interface OutputOptions {
|
|
|
3119
3123
|
*/
|
|
3120
3124
|
preserveModules?: boolean;
|
|
3121
3125
|
/**
|
|
3122
|
-
* Specifies the directory name for "virtual" files that might be emitted by plugins when using preserve modules mode.
|
|
3126
|
+
* Specifies the directory name for "virtual" files that might be emitted by plugins when using {@link OutputOptions.preserveModules | preserve modules mode}.
|
|
3123
3127
|
*
|
|
3124
3128
|
* @default '_virtual'
|
|
3125
3129
|
*/
|
|
3126
3130
|
virtualDirname?: string;
|
|
3127
3131
|
/**
|
|
3128
|
-
* A directory path to input modules that should be stripped away from {@linkcode dir | output.dir} when using preserve modules mode.
|
|
3132
|
+
* A directory path to input modules that should be stripped away from {@linkcode dir | output.dir} when using {@link OutputOptions.preserveModules | preserve modules mode}.
|
|
3129
3133
|
*
|
|
3130
3134
|
*
|
|
3131
3135
|
*/
|
|
@@ -3503,6 +3507,11 @@ interface ChecksOptions {
|
|
|
3503
3507
|
* @default true
|
|
3504
3508
|
* */
|
|
3505
3509
|
duplicateShebang?: boolean;
|
|
3510
|
+
/**
|
|
3511
|
+
* Whether to emit warnings when a tsconfig option or combination of options is not supported.
|
|
3512
|
+
* @default true
|
|
3513
|
+
* */
|
|
3514
|
+
unsupportedTsconfigOption?: boolean;
|
|
3506
3515
|
} //#endregion
|
|
3507
3516
|
//#region src/options/transform-options.d.ts
|
|
3508
3517
|
interface TransformOptions extends Omit<TransformOptions$1, "sourceType" | "lang" | "cwd" | "sourcemap" | "define" | "inject" | "jsx"> {
|
|
@@ -4379,7 +4388,7 @@ interface ExistingRawSourceMap {
|
|
|
4379
4388
|
}
|
|
4380
4389
|
/** @inline @category Plugin APIs */
|
|
4381
4390
|
type SourceMapInput = ExistingRawSourceMap | string | null; //#endregion
|
|
4382
|
-
//#region src/version.d.ts
|
|
4391
|
+
//#region src/constants/version.d.ts
|
|
4383
4392
|
/**
|
|
4384
4393
|
* The version of Rolldown.
|
|
4385
4394
|
* @example `'1.0.0'`
|
|
@@ -5592,25 +5601,7 @@ declare namespace ConfigTypes {
|
|
|
5592
5601
|
/**
|
|
5593
5602
|
* Runtime configuration interface that can be modified during application execution.
|
|
5594
5603
|
*/
|
|
5595
|
-
interface RuntimeConfig {
|
|
5596
|
-
/**
|
|
5597
|
-
* Session configuration options.
|
|
5598
|
-
*/
|
|
5599
|
-
session?: {
|
|
5600
|
-
/**
|
|
5601
|
-
* The secret used to sign the session ID cookie.
|
|
5602
|
-
*/
|
|
5603
|
-
secret?: string;
|
|
5604
|
-
/**
|
|
5605
|
-
* The name of the session ID cookie.
|
|
5606
|
-
*/
|
|
5607
|
-
name?: string;
|
|
5608
|
-
/**
|
|
5609
|
-
* The duration of time for the session to be active.
|
|
5610
|
-
*/
|
|
5611
|
-
duration?: number;
|
|
5612
|
-
};
|
|
5613
|
-
}
|
|
5604
|
+
interface RuntimeConfig {}
|
|
5614
5605
|
/**
|
|
5615
5606
|
* Helper type to create a fully typed runtime configuration.
|
|
5616
5607
|
* This allows users to define their own runtime configuration structure
|
package/dist/index.mjs
CHANGED
|
@@ -1540,33 +1540,9 @@ function createContainer(config) {
|
|
|
1540
1540
|
return container;
|
|
1541
1541
|
}
|
|
1542
1542
|
|
|
1543
|
-
//#endregion
|
|
1544
|
-
//#region src/Utils/InternalUtils.ts
|
|
1545
|
-
/**
|
|
1546
|
-
* Generate random hash
|
|
1547
|
-
* @returns string
|
|
1548
|
-
*/
|
|
1549
|
-
function generateRandomHash() {
|
|
1550
|
-
const hashByPerformance = Math.floor(Date.now() * 1e3).toString(16);
|
|
1551
|
-
const hashByMath = () => (Math.floor(Math.random() * 16777215) | 1048576).toString(16);
|
|
1552
|
-
return `${hashByPerformance}-${hashByMath()}-${hashByMath()}-${hashByMath()}`;
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
1543
|
//#endregion
|
|
1556
1544
|
//#region src/Config/DefaultConfig.ts
|
|
1557
1545
|
/**
|
|
1558
|
-
* Gets the session secret from environment or generates one for development.
|
|
1559
|
-
* In production, requires the SECRET environment variable to be set.
|
|
1560
|
-
* @throws {Error} If in production and SECRET environment variable is not set
|
|
1561
|
-
* @returns {string} The session secret
|
|
1562
|
-
*/
|
|
1563
|
-
function getSessionSecret() {
|
|
1564
|
-
const isProduction = process.env.NODE_ENV === "production";
|
|
1565
|
-
const envSecret = process.env.SECRET;
|
|
1566
|
-
if (isProduction && !envSecret) throw new Error("SESSION SECRET ERROR: In production mode, you must set a strong SECRET environment variable. Using a dynamically generated secret is insecure and will cause session data to be lost on server restart. Please set the SECRET environment variable to a strong, randomly generated string (at least 32 characters). Example: SECRET=your-strong-random-secret-here-at-least-32-chars");
|
|
1567
|
-
return envSecret ?? generateRandomHash();
|
|
1568
|
-
}
|
|
1569
|
-
/**
|
|
1570
1546
|
* Default configuration for the Vercube application.
|
|
1571
1547
|
* This configuration serves as the base settings and can be overridden by user configuration.
|
|
1572
1548
|
*/
|
|
@@ -1591,11 +1567,7 @@ const defaultConfig = {
|
|
|
1591
1567
|
static: { dirs: ["public"] }
|
|
1592
1568
|
},
|
|
1593
1569
|
experimental: {},
|
|
1594
|
-
runtime: {
|
|
1595
|
-
secret: getSessionSecret(),
|
|
1596
|
-
name: "vercube_session",
|
|
1597
|
-
duration: 3600 * 24 * 7
|
|
1598
|
-
} }
|
|
1570
|
+
runtime: {}
|
|
1599
1571
|
};
|
|
1600
1572
|
|
|
1601
1573
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"description": "Core module for Vercube framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"defu": "6.1.4",
|
|
28
28
|
"pathe": "2.0.3",
|
|
29
29
|
"rou3": "0.7.12",
|
|
30
|
-
"srvx": "
|
|
31
|
-
"@vercube/di": "0.0.
|
|
32
|
-
"@vercube/logger": "0.0.
|
|
30
|
+
"srvx": "0.11.0",
|
|
31
|
+
"@vercube/di": "0.0.43",
|
|
32
|
+
"@vercube/logger": "0.0.43"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"rolldown": "1.0.0-rc.
|
|
35
|
+
"rolldown": "1.0.0-rc.3",
|
|
36
36
|
"zod": "4.3.6"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|