@moneko/core 3.54.0-beta.3 → 3.54.0-beta.4

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.
Files changed (134) hide show
  1. package/lib/bin/build-app.mjs +1 -0
  2. package/lib/bin/build.mjs +1 -0
  3. package/lib/bin/changelog.mjs +4 -0
  4. package/lib/bin/eslint.mjs +2 -0
  5. package/lib/bin/git-hooks.mjs +2 -0
  6. package/lib/bin/help.mjs +13 -0
  7. package/lib/bin/lessc.mjs +1 -0
  8. package/lib/bin/server.mjs +1 -0
  9. package/lib/bin/start.mjs +1 -0
  10. package/lib/bin/stylelint.mjs +2 -0
  11. package/lib/bin/tsc.mjs +1 -0
  12. package/lib/bin/utils/bundle-app.mjs +1 -0
  13. package/lib/bin/utils/config.mjs +1 -0
  14. package/lib/bin/utils/get-commit-files.mjs +1 -0
  15. package/lib/build.mjs +2 -2
  16. package/lib/commom/check-npm.mjs +1 -0
  17. package/lib/commom/corepack.mjs +1 -0
  18. package/lib/commom/diff-object.mjs +1 -0
  19. package/lib/commom/host.mjs +19 -0
  20. package/lib/commom/module-resolve.mjs +1 -0
  21. package/lib/commom/net.mjs +1 -0
  22. package/lib/commom/open.mjs +1 -0
  23. package/lib/commom/paths.mjs +1 -0
  24. package/lib/commom/reactive-object.mjs +1 -0
  25. package/lib/commom/rule.mjs +1 -0
  26. package/lib/commom/setup-env.mjs +1 -0
  27. package/lib/commom/sigint-exit.mjs +1 -0
  28. package/lib/commom/transform-solid-js.mjs +1 -0
  29. package/lib/dev/config.mjs +2 -0
  30. package/lib/dev/get-cert.mjs +1 -0
  31. package/lib/dev/mock.mjs +1 -0
  32. package/lib/dev/server.mjs +1 -0
  33. package/lib/loader/css-in-js-minify.cjs +1 -0
  34. package/lib/loader/lightning-css/codegen.cjs +20 -0
  35. package/lib/loader/lightning-css/loader.cjs +1 -0
  36. package/lib/loader/lightning-css/utils.cjs +1 -0
  37. package/lib/loader/mdx.cjs +1 -0
  38. package/lib/loader/react-compiler.cjs +1 -0
  39. package/lib/loader/solid.cjs +1 -0
  40. package/lib/loader/ts-doc.cjs +1 -0
  41. package/lib/options/md-to-html.mjs +1 -0
  42. package/lib/options/reslove.mjs +1 -0
  43. package/lib/options/swcrc.mjs +1 -0
  44. package/lib/plugin/compression.mjs +1 -0
  45. package/lib/plugin/copy.mjs +1 -0
  46. package/lib/plugin/done.mjs +1 -0
  47. package/lib/plugin/exposes-declararion.mjs +1 -0
  48. package/lib/plugin/external-remotes.mjs +1 -0
  49. package/lib/plugin/html-plugin.mjs +1 -0
  50. package/lib/plugin/lightningcss-plugin.mjs +1 -0
  51. package/lib/plugin/manifest.mjs +1 -0
  52. package/lib/plugin/override-resolve.mjs +1 -0
  53. package/lib/plugin/swc-minify-plugin.mjs +1 -0
  54. package/lib/plugin/virtual-module.mjs +1 -0
  55. package/lib/polyfills/polyfills.mjs +1 -0
  56. package/lib/polyfills/targets.mjs +1 -0
  57. package/lib/utils/fetch-module-federation-dts.mjs +1 -0
  58. package/lib/utils/index.mjs +1 -0
  59. package/lib/utils/run.mjs +1 -0
  60. package/lib/utils/seo.mjs +4 -0
  61. package/lib/vm/coverage.mjs +1 -0
  62. package/lib/vm/example.mjs +1 -0
  63. package/lib/vm/generate-doc.mjs +1 -0
  64. package/lib/vm/routes.mjs +1 -0
  65. package/lib/vm/utils.mjs +1 -0
  66. package/package.json +2 -2
  67. package/typings/global.d.ts +1 -1
  68. package/lib/bin/commit-lint.d.mts +0 -2
  69. package/lib/bin/file.d.mts +0 -2
  70. package/lib/bin/index.d.mts +0 -2
  71. package/lib/bin/pin.d.mts +0 -5
  72. package/lib/bin/pure-lint.d.mts +0 -2
  73. package/lib/bin/setup.d.mts +0 -2
  74. package/lib/bin/utils/convert-solid.d.mts +0 -28
  75. package/lib/bin/utils/convert-solid.mjs +0 -1
  76. package/lib/bin/utils/setup-swcrc.d.mts +0 -2
  77. package/lib/build/common.d.mts +0 -3
  78. package/lib/build/server.d.mts +0 -3
  79. package/lib/build.d.mts +0 -1
  80. package/lib/commom/ca.d.mts +0 -7
  81. package/lib/commom/esm.d.mts +0 -2
  82. package/lib/commom/has-pkg.d.mts +0 -2
  83. package/lib/commom/is-ci-environment.d.mts +0 -5
  84. package/lib/commom/log.d.mts +0 -2
  85. package/lib/commom/match-path.d.mts +0 -21
  86. package/lib/commom/mime.d.mts +0 -2
  87. package/lib/commom/parse-args.d.mts +0 -2
  88. package/lib/commom/parse-module-meta.d.mts +0 -9
  89. package/lib/commom/print-log.d.mts +0 -15
  90. package/lib/commom/require.d.mts +0 -2
  91. package/lib/commom/timer.d.mts +0 -11
  92. package/lib/common.d.mts +0 -3
  93. package/lib/config.d.mts +0 -4
  94. package/lib/dev/generate-progress-html.d.mts +0 -6
  95. package/lib/dev/json-schema.d.mts +0 -72
  96. package/lib/dev/proxy.d.mts +0 -15
  97. package/lib/dev.d.mts +0 -1
  98. package/lib/file-system.d.mts +0 -2
  99. package/lib/index.d.mts +0 -24
  100. package/lib/lint/eslint/base.d.mts +0 -2
  101. package/lib/lint/eslint/index.d.mts +0 -2
  102. package/lib/lint/eslint/react.d.mts +0 -2
  103. package/lib/lint/eslint/solid.d.mts +0 -2
  104. package/lib/lint/eslint/vue.d.mts +0 -2
  105. package/lib/lint/stylelint/config.d.mts +0 -2
  106. package/lib/lint/stylelint/index.d.mts +0 -1
  107. package/lib/loader/lightning-css/runtime/api.d.cts +0 -5
  108. package/lib/loader/lightning-css/runtime/get-url.d.cts +0 -1
  109. package/lib/module.config.d.mts +0 -3
  110. package/lib/options/css-extract.d.mts +0 -4
  111. package/lib/options/jsx-dom-expressions.d.mts +0 -10
  112. package/lib/options/modify-vars.d.mts +0 -2
  113. package/lib/options/split-chunk.d.mts +0 -4
  114. package/lib/plugin/eslint.d.mts +0 -14
  115. package/lib/plugin/module-federation.d.mts +0 -3
  116. package/lib/plugin/stylelint.d.mts +0 -13
  117. package/lib/plugins.config.d.mts +0 -3
  118. package/lib/polyfills/replace-children.d.mts +0 -1
  119. package/lib/process-env.d.mts +0 -22
  120. package/lib/utils/compile-dts.d.mts +0 -22
  121. package/lib/utils/create-types.d.mts +0 -2
  122. package/lib/utils/dts.d.mts +0 -12
  123. package/lib/utils/svg-to-data-uri.d.mts +0 -2
  124. package/lib/utils/vts.d.mts +0 -18
  125. package/lib/vm/docs.d.mts +0 -7
  126. package/lib/vm/info.d.mts +0 -2
  127. package/lib/vm/locales.d.mts +0 -5
  128. package/lib/vm/modules.d.mts +0 -2
  129. package/lib/vm/render-app.d.mts +0 -2
  130. package/lib/worker/dts.d.mts +0 -1
  131. package/lib/worker/eslint.d.mts +0 -1
  132. package/lib/worker/react-compiler.d.mts +0 -35
  133. package/lib/worker/stylelint.d.mts +0 -1
  134. package/lib/worker/swc-minify.d.mts +0 -1
@@ -1,3 +0,0 @@
1
- import { type Configuration } from 'webpack';
2
- declare const serverOption: Configuration;
3
- export default serverOption;
package/lib/build.d.mts DELETED
@@ -1 +0,0 @@
1
- export { };
@@ -1,7 +0,0 @@
1
- import { type ChildProcess } from 'node:child_process';
2
- import { type CertificateResult } from '@moneko/utils';
3
- /**
4
- * 安装本地根 CA 到用户证书存储区(开发时信任 HTTPS 证书)
5
- * @param certPath 本地 CA 证书路径
6
- */ export declare function installCA(certPath: string): ChildProcess | void;
7
- export declare function setupCert(domain?: string, install?: boolean): Promise<CertificateResult>;
@@ -1,2 +0,0 @@
1
- declare function esm(templateStrings: TemplateStringsArray, ...substitutions: unknown[]): string;
2
- export default esm;
@@ -1,2 +0,0 @@
1
- declare function hasPkg(name: string): string | false;
2
- export default hasPkg;
@@ -1,5 +0,0 @@
1
- /**
2
- * 检测当前是否运行在 CI 环境中
3
- * @returns {boolean} 如果是 CI 环境返回 true,否则返回 false
4
- */ declare function isCIEnvironment(): boolean;
5
- export default isCIEnvironment;
@@ -1,2 +0,0 @@
1
- declare function log(message: Error | string | unknown): Promise<void>;
2
- export default log;
@@ -1,21 +0,0 @@
1
- type MatchPath = {
2
- path: string;
3
- params: Record<string, unknown>;
4
- };
5
- /**
6
- * RESTful 风格api
7
- * @param {String} pattern pattern
8
- * @param {String} path paths
9
- * @example
10
- * const pattern = '/users/:id';
11
- * const pathToMatch = '/users/123';
12
- * const result = matchPath(pattern, pathToMatch);
13
- * if (result) {
14
- * console.log('Match found:', result);
15
- * console.log('Params:', result.params);
16
- * } else {
17
- * console.log('No match found.');
18
- * }
19
- * @returns {MatchPath|null} MatchPath
20
- */ declare function matchPath(pattern: string, path: string): MatchPath | null;
21
- export default matchPath;
@@ -1,2 +0,0 @@
1
- declare const mime: Record<string, string>;
2
- export default mime;
@@ -1,2 +0,0 @@
1
- declare function parseArgs<T>(args: string[]): T;
2
- export default parseArgs;
@@ -1,9 +0,0 @@
1
- export type ModuleMeta = {
2
- name: string;
3
- main: string;
4
- pkg: string;
5
- file: string;
6
- meta: string;
7
- };
8
- declare function parseModuleMeta(path: string, version?: number): ModuleMeta;
9
- export default parseModuleMeta;
@@ -1,15 +0,0 @@
1
- export declare const METHOD_COLOR: Record<string, {
2
- fg: string;
3
- bg: string;
4
- }>;
5
- interface PrintLogOption {
6
- note?: string;
7
- timestamp?: boolean;
8
- labelAlign?: 'left' | 'right' | 'center';
9
- labelLen?: number;
10
- labelForegroundColor?: string;
11
- labelBackgroundColor?: string;
12
- noteForegroundColor?: string;
13
- }
14
- declare function printLog(label: string, url: string, option?: PrintLogOption): void;
15
- export default printLog;
@@ -1,2 +0,0 @@
1
- declare const require: NodeJS.Require;
2
- export default require;
@@ -1,11 +0,0 @@
1
- interface Timer {
2
- start(label: string): void;
3
- end(label: string): {
4
- nanoseconds: bigint;
5
- milliseconds: number;
6
- };
7
- }
8
- /**
9
- * 最高精度的计时方法,返回纳秒级精度的bigint
10
- */ declare const timer: Timer;
11
- export default timer;
package/lib/common.d.mts DELETED
@@ -1,3 +0,0 @@
1
- import type { Configuration } from 'webpack';
2
- export declare const outputConfig: Configuration['output'];
3
- export declare const commonConfig: Configuration;
package/lib/config.d.mts DELETED
@@ -1,4 +0,0 @@
1
- import type { ConfigType } from './index.mjs';
2
- export declare function getConfig(path: string): Promise<ConfigType>;
3
- export declare const CONFIG: ConfigType;
4
- export declare const PUBLICPATH: string;
@@ -1,6 +0,0 @@
1
- export type CompliationProcess = {
2
- percentage: number;
3
- info: string;
4
- };
5
- declare function generateProgressHtml(progressApi: string, progress: CompliationProcess): string;
6
- export default generateProgressHtml;
@@ -1,72 +0,0 @@
1
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2
- type Any = any;
3
- type NonArraySchemaObjectType = 'boolean' | 'object' | 'number' | 'string' | 'integer';
4
- type ArraySchemaObjectType = 'array';
5
- type SchemaObject = ArraySchemaObject | NonArraySchemaObject;
6
- interface ExternalDocumentationObject {
7
- description?: string;
8
- url: string;
9
- }
10
- interface ArraySchemaObject extends BaseSchemaObject {
11
- type: ArraySchemaObjectType;
12
- items: ReferenceObject | SchemaObject;
13
- }
14
- interface NonArraySchemaObject extends BaseSchemaObject {
15
- type?: NonArraySchemaObjectType;
16
- }
17
- interface BaseSchemaObject {
18
- title?: string;
19
- description?: string;
20
- format?: string;
21
- default?: Any;
22
- multipleOf?: number;
23
- maximum?: number;
24
- exclusiveMaximum?: boolean;
25
- minimum?: number;
26
- exclusiveMinimum?: boolean;
27
- maxLength?: number;
28
- minLength?: number;
29
- pattern?: string;
30
- additionalProperties?: boolean | ReferenceObject | SchemaObject;
31
- maxItems?: number;
32
- minItems?: number;
33
- uniqueItems?: boolean;
34
- maxProperties?: number;
35
- minProperties?: number;
36
- required?: string[];
37
- enum?: Any[];
38
- properties?: {
39
- [name: string]: ReferenceObject | SchemaObject;
40
- };
41
- allOf?: (ReferenceObject | SchemaObject)[];
42
- oneOf?: (ReferenceObject | SchemaObject)[];
43
- anyOf?: (ReferenceObject | SchemaObject)[];
44
- not?: ReferenceObject | SchemaObject;
45
- nullable?: boolean;
46
- discriminator?: DiscriminatorObject;
47
- readOnly?: boolean;
48
- writeOnly?: boolean;
49
- xml?: XMLObject;
50
- externalDocs?: ExternalDocumentationObject;
51
- example?: Any;
52
- deprecated?: boolean;
53
- }
54
- interface DiscriminatorObject {
55
- propertyName: string;
56
- mapping?: {
57
- [value: string]: string;
58
- };
59
- }
60
- interface XMLObject {
61
- name?: string;
62
- namespace?: string;
63
- prefix?: string;
64
- attribute?: boolean;
65
- wrapped?: boolean;
66
- }
67
- interface ReferenceObject {
68
- $ref: string;
69
- }
70
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
71
- export declare function jsonSchema<T>(schema: SchemaObject): any;
72
- export { };
@@ -1,15 +0,0 @@
1
- import { IncomingMessage, ServerResponse } from 'node:http';
2
- type ProxyItem = {
3
- target: string;
4
- changeOrigin?: boolean;
5
- secure?: boolean;
6
- ws?: boolean;
7
- pathRewrite?: Record<string, string>;
8
- headers?: Record<string, string>;
9
- };
10
- export type ProxyConfig = Record<string, string | ProxyItem>;
11
- type IServerResponse = ServerResponse<IncomingMessage> & {
12
- req: IncomingMessage;
13
- };
14
- export declare function setupProxy(req: IncomingMessage, res: IServerResponse, proxyConfig: ProxyConfig): Promise<IServerResponse | false>;
15
- export { };
package/lib/dev.d.mts DELETED
@@ -1 +0,0 @@
1
- export { };
@@ -1,2 +0,0 @@
1
- import { type IFs } from 'memfs';
2
- export declare const outputFileSystem: IFs;
package/lib/index.d.mts DELETED
@@ -1,24 +0,0 @@
1
- export type * from '../typings/global.js';
2
- export { default as hasPkg } from './commom/has-pkg.mjs';
3
- export { getIPv4, getPort } from './commom/net.mjs';
4
- export { default as open } from './commom/open.mjs';
5
- export { default as parseArgs } from './commom/parse-args.mjs';
6
- export { CUSTOMCONFIG, default as paths, routeDir, yarnArgv } from './commom/paths.mjs';
7
- export { default as printLog } from './commom/print-log.mjs';
8
- export { default as require } from './commom/require.mjs';
9
- export { default as Rule } from './commom/rule.mjs';
10
- export { default as timer } from './commom/timer.mjs';
11
- export { type MockConfiguration, type ProxyFuncType, type RequestFormData, yApiMock, type YApiOption, type YApiOptionBySchema, yApiSchemaMock } from './dev/mock.mjs';
12
- export type { ProxyConfig } from './dev/proxy.mjs';
13
- export type { CssInJsMinifyOption } from './loader/css-in-js-minify.cjs';
14
- export type { ReactCompilerOption } from './loader/react-compiler.cjs';
15
- export { type JsxDomExpressions, default as jsxDomExpressions } from './options/jsx-dom-expressions.mjs';
16
- export { type OptimizationSplitChunksOptions, default as splitChunk } from './options/split-chunk.mjs';
17
- export type { CompressionPluginOptions } from './plugin/compression.mjs';
18
- export type { HtmlMeta, HtmlPluginOption } from './plugin/html-plugin.mjs';
19
- export type { OverrideResolverOption } from './plugin/override-resolve.mjs';
20
- export type { VirtualModulePluginOption } from './plugin/virtual-module.mjs';
21
- export { APPTYPE, coreName, FRAMEWORK, isCI, isDev, isLibrary, isMicro, mainDirectory, packageJson, PACKAGENAME } from './process-env.mjs';
22
- export { resolveProgram, toCamelCase } from './utils/index.mjs';
23
- export type { MdxOptions } from '@moneko/mdx';
24
- export * from '@moneko/utils';
@@ -1,2 +0,0 @@
1
- import base from '@moneko/eslint/base';
2
- export default base;
@@ -1,2 +0,0 @@
1
- export type { AST, Linter, Rule, RuleTester, Scope, SourceCode } from '@moneko/eslint';
2
- export { ESLint, loadESLint } from '@moneko/eslint';
@@ -1,2 +0,0 @@
1
- import react from '@moneko/eslint/react';
2
- export default react;
@@ -1,2 +0,0 @@
1
- import solid from '@moneko/eslint/solid';
2
- export default solid;
@@ -1,2 +0,0 @@
1
- import vue from '@moneko/eslint/vue';
2
- export default vue;
@@ -1,2 +0,0 @@
1
- import config from '@moneko/stylelint/config';
2
- export default config;
@@ -1 +0,0 @@
1
- export { type Config, type ConfigRuleSettings, type CoreRules, type CosmiconfigResult, type CssSyntaxError, type CustomSyntax, type DisabledRange, type DisabledRangeObject, type DisabledWarning, type DisableOptions, type DisableOptionsReport, type DisablePropertyName, type DisableReportRange, type EditInfo, type FixCallback, type FixMode, type FixObject, type Formatter, type FormatterType, type GetLintSourceOptions, type GetPostcssOptions, type InternalApi, type LinterOptions, type LinterResult, type LintResult, type LonghandSubPropertiesOfShorthandProperties, type Plugin, type PostcssPluginOptions, type PostcssResult, type Problem, type Processor, type PublicApi, type Range, type Rule, type RuleBase, type RuleContext, type RuleMessage, type RuleMessages, type RuleMeta, type RuleOptions, type RuleOptionsPossible, type Severity, type ShorthandProperties, stylelint, type StylelintPostcssResult, type Utils, type Warning, type WarningOptions } from '@moneko/stylelint';
@@ -1,5 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable no-param-reassign */ /*
2
- MIT License http://www.opensource.org/licenses/mit-license.php
3
- Author Tobias Koppers @sokra
4
- */ // css base code, injected by the css-loader
5
- export { };
@@ -1 +0,0 @@
1
- /* eslint-disable no-param-reassign */ export { };
@@ -1,3 +0,0 @@
1
- import type { ModuleOptions } from 'webpack';
2
- declare const _default_1: (ssr: boolean) => ModuleOptions;
3
- export default _default_1;
@@ -1,4 +0,0 @@
1
- import type { RuleSetUseItem } from 'webpack';
2
- import { type MiniCssExtractPluginOptions } from '../index.mjs';
3
- declare let cssExtract: RuleSetUseItem;
4
- export default cssExtract;
@@ -1,10 +0,0 @@
1
- export interface JsxDomExpressions {
2
- moduleName?: string;
3
- builtIns?: string[];
4
- contextToCustomElements?: boolean;
5
- wrapConditionals?: boolean;
6
- generate?: 'ssr' | 'dom';
7
- hydratable?: boolean;
8
- }
9
- declare const jsxDomExpressions: JsxDomExpressions;
10
- export default jsxDomExpressions;
@@ -1,2 +0,0 @@
1
- declare const modifyVars: Record<string, string | false | undefined>;
2
- export default modifyVars;
@@ -1,4 +0,0 @@
1
- import webpack from 'webpack';
2
- export type OptimizationSplitChunksOptions = ConstructorParameters<typeof webpack.optimize.SplitChunksPlugin>[0];
3
- declare const splitChunk: OptimizationSplitChunksOptions;
4
- export default splitChunk;
@@ -1,14 +0,0 @@
1
- import { ESLint } from '@moneko/eslint';
2
- import { type Compiler } from 'webpack';
3
- export interface ESLintOption extends ESLint.Options {
4
- files: string[];
5
- lintDirtyModulesOnly?: boolean;
6
- }
7
- export declare class ESLintPlugin {
8
- private name;
9
- private worker;
10
- private options;
11
- constructor(options?: ESLintOption);
12
- apply(compiler: Compiler): void;
13
- private report;
14
- }
@@ -1,3 +0,0 @@
1
- import { type WebpackPluginInstance } from 'webpack';
2
- declare const moduleFederation: WebpackPluginInstance[];
3
- export default moduleFederation;
@@ -1,13 +0,0 @@
1
- import type { LinterOptions } from '@moneko/stylelint';
2
- import { type Compiler } from 'webpack';
3
- export interface StylelintOption extends LinterOptions {
4
- files: string[];
5
- }
6
- export declare class StylelintPlugin {
7
- private name;
8
- private worker;
9
- private options;
10
- constructor(options?: StylelintOption);
11
- apply(compiler: Compiler): void;
12
- private report;
13
- }
@@ -1,3 +0,0 @@
1
- import { type WebpackPluginInstance } from 'webpack';
2
- declare const plugins: WebpackPluginInstance[];
3
- export default plugins;
@@ -1 +0,0 @@
1
- export { };
@@ -1,22 +0,0 @@
1
- import type { AppType, Framework } from './index.mjs';
2
- export declare const IS_WINDOW: boolean;
3
- export declare const APPTYPE: AppType;
4
- export declare const FRAMEWORK: Framework;
5
- export declare const NODE_ENV: string;
6
- export declare const isLibrary: boolean;
7
- export declare const isMicro: boolean;
8
- export declare const isMobile: boolean;
9
- export declare const isReact: boolean;
10
- export declare const isSolid: boolean;
11
- export declare const SSR: boolean;
12
- /** 项目主要文件夹 */ export declare const mainDirectory: 'site' | 'src';
13
- export declare const jsxImportSource: string;
14
- export declare const framework: 'react' | 'solid-js';
15
- export declare const frameworkVersionStr: string;
16
- export declare const frameworkVersion: number;
17
- export declare const packageJson: typeof import('package.json');
18
- /** 应用名称 */ export declare const PACKAGENAME: string;
19
- /** core 包名 */ export declare const coreName: string;
20
- /** 是否为本地开发环境 */ export declare const isDev: boolean;
21
- export declare const refresh: boolean;
22
- export declare const isCI: boolean;
@@ -1,22 +0,0 @@
1
- import ts from 'typescript';
2
- interface CompilerDtsOption {
3
- extends?: string;
4
- compilerOptions?: ts.CompilerOptions;
5
- include?: string[];
6
- }
7
- /**
8
- * 编译 TypeScript 文件
9
- * @param {CompilerDtsOption} config - 编译配置
10
- * @returns {string} 编译结果
11
- * @example
12
- * ```ts
13
- * const result = compileDts({
14
- * extends: './tsconfig.json',
15
- * compilerOptions: {
16
- * outFile: './module-federation.d.ts',
17
- * },
18
- * include: ['src/components/graph-editor']
19
- * });
20
- * ```
21
- */ export declare function compileDts(config: CompilerDtsOption): string;
22
- export { };
@@ -1,2 +0,0 @@
1
- declare function createTypes(moduleName: string, dts: string): string;
2
- export default createTypes;
@@ -1,12 +0,0 @@
1
- /**
2
- * 根据ts内容生成声明类型
3
- * @param {String} source 源码内容
4
- * @param {String} filename 文件名
5
- * @returns {String} declaration
6
- */ export declare function generateDeclaration(source: string, filename: string): string;
7
- /**
8
- * 获取ts内容导出的key (优化版本)
9
- * @param {String} source 源码内容
10
- * @param {String} filename 文件名
11
- * @returns {Array<String>} tokens
12
- */ export declare function getExportKeys(source: string, filename: string): string[];
@@ -1,2 +0,0 @@
1
- declare function svgToDataUri(svgString: string): string;
2
- export default svgToDataUri;
@@ -1,18 +0,0 @@
1
- interface VfsOptions {
2
- namedExport?: boolean;
3
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
- modules: Record<string, any>;
5
- }
6
- /**
7
- * 运行 ts 代码
8
- * @param {String} filepath 文件名
9
- * @returns {String} declaration
10
- * @example
11
- * // a.ts
12
- * export default { user: 'admin' } as { user: 'admin' };
13
- * // b.js
14
- * const a = vts('fullpath/a.ts');
15
- *
16
- * console.log(a); // { user: 'admin' }
17
- */ export declare function vts<T>(filepath: string, options?: VfsOptions): T;
18
- export { };
package/lib/vm/docs.d.mts DELETED
@@ -1,7 +0,0 @@
1
- import ReactiveObject from '../commom/reactive-object.mjs';
2
- export declare const docsModuleName: string;
3
- export declare const docsModulePkgJson: string;
4
- export declare const docsModuleMeta: string;
5
- export declare const docs: ReactiveObject<Record<string, string>>;
6
- export declare const comment: ReactiveObject<Record<string, string>>;
7
- export declare const getCommentPath: (file: string) => string;
package/lib/vm/info.d.mts DELETED
@@ -1,2 +0,0 @@
1
- declare const app: Record<string, unknown>;
2
- export default app;
@@ -1,5 +0,0 @@
1
- import ReactiveObject from '../commom/reactive-object.mjs';
2
- export declare const localesModuleName: string;
3
- export declare const locales: ReactiveObject<{
4
- [x: string]: string;
5
- }>;
@@ -1,2 +0,0 @@
1
- declare const normalModules: Record<string, string | object>;
2
- export default normalModules;
@@ -1,2 +0,0 @@
1
- declare const renderApp: string;
2
- export default renderApp;
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export type ESLintWorkerMessage = [warnings: string, errors: string];
@@ -1,35 +0,0 @@
1
- export interface ReactCompilerOption {
2
- /**
3
- * 指定 React 的主要版本
4
- * @description
5
- * ReactCompiler 与 React 19+ 配合使用效果最佳;
6
- *
7
- * 将 ReactCompiler 与 React 17、18 一起使用需要安装额外的 `react-compiler-runtime` 依赖项;
8
- */ target?: '17' | '18' | '19';
9
- /** 指定启用 React Compiler 的范围 */ sources?(filename: string): boolean;
10
- /** 编译模式
11
- * @description annotation 注释模式: 通过 "use memo"、"use no memo" 手动指定启用优化
12
- * @example
13
- * export default function Home() {
14
- * 'use memo';
15
- * // ...
16
- * }
17
- * export default function About() {
18
- * 'use no memo';
19
- * // ...
20
- * }
21
- */ compilationMode?: 'annotation' | 'infer' | 'syntax' | 'all';
22
- /**
23
- * 定义日志输出
24
- */ logger?: {
25
- logEvent?: (fileName: string, event: MessageEvent) => void;
26
- };
27
- noEmit?: boolean;
28
- flowSuppressions?: boolean;
29
- ignoreUseNoForget?: boolean;
30
- enableReanimatedCheck?: boolean;
31
- panicThreshold?: string;
32
- environment?: unknown;
33
- gating?: null;
34
- eslintSuppressionRules?: Record<string, string | boolean | number>;
35
- }
@@ -1 +0,0 @@
1
- export type StylelintWorkerMessage = [warnings: string, errors: string];
@@ -1 +0,0 @@
1
- export { };