@moneko/core 3.54.0-beta.3 → 3.54.0-beta.5
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/lib/bin/build-app.mjs +1 -0
- package/lib/bin/build.mjs +1 -0
- package/lib/bin/changelog.mjs +4 -0
- package/lib/bin/eslint.mjs +2 -0
- package/lib/bin/git-hooks.mjs +2 -0
- package/lib/bin/help.mjs +13 -0
- package/lib/bin/lessc.mjs +1 -0
- package/lib/bin/server.mjs +1 -0
- package/lib/bin/start.mjs +1 -0
- package/lib/bin/stylelint.mjs +2 -0
- package/lib/bin/tsc.mjs +1 -0
- package/lib/bin/utils/bundle-app.mjs +1 -0
- package/lib/bin/utils/config.mjs +1 -0
- package/lib/bin/utils/get-commit-files.mjs +1 -0
- package/lib/build.mjs +2 -2
- package/lib/commom/check-npm.mjs +1 -0
- package/lib/commom/corepack.mjs +1 -0
- package/lib/commom/diff-object.mjs +1 -0
- package/lib/commom/host.mjs +19 -0
- package/lib/commom/module-resolve.mjs +1 -0
- package/lib/commom/net.mjs +1 -0
- package/lib/commom/open.mjs +1 -0
- package/lib/commom/paths.mjs +1 -0
- package/lib/commom/reactive-object.mjs +1 -0
- package/lib/commom/rule.mjs +1 -0
- package/lib/commom/setup-env.mjs +1 -0
- package/lib/commom/sigint-exit.mjs +1 -0
- package/lib/commom/transform-solid-js.mjs +1 -0
- package/lib/dev/config.mjs +2 -0
- package/lib/dev/get-cert.mjs +1 -0
- package/lib/dev/mock.mjs +1 -0
- package/lib/dev/server.mjs +1 -0
- package/lib/loader/css-in-js-minify.cjs +1 -0
- package/lib/loader/lightning-css/codegen.cjs +20 -0
- package/lib/loader/lightning-css/loader.cjs +1 -0
- package/lib/loader/lightning-css/utils.cjs +1 -0
- package/lib/loader/mdx.cjs +1 -0
- package/lib/loader/react-compiler.cjs +1 -0
- package/lib/loader/solid.cjs +1 -0
- package/lib/loader/ts-doc.cjs +1 -0
- package/lib/options/md-to-html.mjs +1 -0
- package/lib/options/reslove.mjs +1 -0
- package/lib/options/swcrc.mjs +1 -0
- package/lib/plugin/compression.mjs +1 -0
- package/lib/plugin/copy.mjs +1 -0
- package/lib/plugin/done.mjs +1 -0
- package/lib/plugin/exposes-declararion.mjs +1 -0
- package/lib/plugin/external-remotes.mjs +1 -0
- package/lib/plugin/html-plugin.mjs +1 -0
- package/lib/plugin/lightningcss-plugin.mjs +1 -0
- package/lib/plugin/manifest.mjs +1 -0
- package/lib/plugin/override-resolve.mjs +1 -0
- package/lib/plugin/swc-minify-plugin.mjs +1 -0
- package/lib/plugin/virtual-module.mjs +1 -0
- package/lib/polyfills/polyfills.mjs +1 -0
- package/lib/polyfills/targets.mjs +1 -0
- package/lib/utils/fetch-module-federation-dts.mjs +1 -0
- package/lib/utils/index.mjs +1 -0
- package/lib/utils/run.mjs +1 -0
- package/lib/utils/seo.mjs +4 -0
- package/lib/vm/coverage.mjs +1 -0
- package/lib/vm/example.mjs +1 -0
- package/lib/vm/generate-doc.mjs +1 -0
- package/lib/vm/routes.mjs +1 -0
- package/lib/vm/utils.mjs +1 -0
- package/package.json +2 -2
- package/typings/global.d.ts +1 -1
- package/lib/bin/commit-lint.d.mts +0 -2
- package/lib/bin/file.d.mts +0 -2
- package/lib/bin/index.d.mts +0 -2
- package/lib/bin/pin.d.mts +0 -5
- package/lib/bin/pure-lint.d.mts +0 -2
- package/lib/bin/setup.d.mts +0 -2
- package/lib/bin/utils/convert-solid.d.mts +0 -28
- package/lib/bin/utils/convert-solid.mjs +0 -1
- package/lib/bin/utils/setup-swcrc.d.mts +0 -2
- package/lib/build/common.d.mts +0 -3
- package/lib/build/server.d.mts +0 -3
- package/lib/build.d.mts +0 -1
- package/lib/commom/ca.d.mts +0 -7
- package/lib/commom/esm.d.mts +0 -2
- package/lib/commom/has-pkg.d.mts +0 -2
- package/lib/commom/is-ci-environment.d.mts +0 -5
- package/lib/commom/log.d.mts +0 -2
- package/lib/commom/match-path.d.mts +0 -21
- package/lib/commom/mime.d.mts +0 -2
- package/lib/commom/parse-args.d.mts +0 -2
- package/lib/commom/parse-module-meta.d.mts +0 -9
- package/lib/commom/print-log.d.mts +0 -15
- package/lib/commom/require.d.mts +0 -2
- package/lib/commom/timer.d.mts +0 -11
- package/lib/common.d.mts +0 -3
- package/lib/config.d.mts +0 -4
- package/lib/dev/generate-progress-html.d.mts +0 -6
- package/lib/dev/json-schema.d.mts +0 -72
- package/lib/dev/proxy.d.mts +0 -15
- package/lib/dev.d.mts +0 -1
- package/lib/file-system.d.mts +0 -2
- package/lib/index.d.mts +0 -24
- package/lib/lint/eslint/base.d.mts +0 -2
- package/lib/lint/eslint/index.d.mts +0 -2
- package/lib/lint/eslint/react.d.mts +0 -2
- package/lib/lint/eslint/solid.d.mts +0 -2
- package/lib/lint/eslint/vue.d.mts +0 -2
- package/lib/lint/stylelint/config.d.mts +0 -2
- package/lib/lint/stylelint/index.d.mts +0 -1
- package/lib/loader/lightning-css/runtime/api.d.cts +0 -5
- package/lib/loader/lightning-css/runtime/get-url.d.cts +0 -1
- package/lib/module.config.d.mts +0 -3
- package/lib/options/css-extract.d.mts +0 -4
- package/lib/options/jsx-dom-expressions.d.mts +0 -10
- package/lib/options/modify-vars.d.mts +0 -2
- package/lib/options/split-chunk.d.mts +0 -4
- package/lib/plugin/eslint.d.mts +0 -14
- package/lib/plugin/module-federation.d.mts +0 -3
- package/lib/plugin/stylelint.d.mts +0 -13
- package/lib/plugins.config.d.mts +0 -3
- package/lib/polyfills/replace-children.d.mts +0 -1
- package/lib/process-env.d.mts +0 -22
- package/lib/utils/compile-dts.d.mts +0 -22
- package/lib/utils/create-types.d.mts +0 -2
- package/lib/utils/dts.d.mts +0 -12
- package/lib/utils/svg-to-data-uri.d.mts +0 -2
- package/lib/utils/vts.d.mts +0 -18
- package/lib/vm/docs.d.mts +0 -7
- package/lib/vm/info.d.mts +0 -2
- package/lib/vm/locales.d.mts +0 -5
- package/lib/vm/modules.d.mts +0 -2
- package/lib/vm/render-app.d.mts +0 -2
- package/lib/worker/dts.d.mts +0 -1
- package/lib/worker/eslint.d.mts +0 -1
- package/lib/worker/react-compiler.d.mts +0 -35
- package/lib/worker/stylelint.d.mts +0 -1
- package/lib/worker/swc-minify.d.mts +0 -1
package/lib/build/server.d.mts
DELETED
package/lib/build.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/lib/commom/ca.d.mts
DELETED
|
@@ -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>;
|
package/lib/commom/esm.d.mts
DELETED
package/lib/commom/has-pkg.d.mts
DELETED
package/lib/commom/log.d.mts
DELETED
|
@@ -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;
|
package/lib/commom/mime.d.mts
DELETED
|
@@ -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;
|
package/lib/commom/require.d.mts
DELETED
package/lib/commom/timer.d.mts
DELETED
package/lib/common.d.mts
DELETED
package/lib/config.d.mts
DELETED
|
@@ -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 { };
|
package/lib/dev/proxy.d.mts
DELETED
|
@@ -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 { };
|
package/lib/file-system.d.mts
DELETED
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 +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 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-param-reassign */ export { };
|
package/lib/module.config.d.mts
DELETED
|
@@ -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;
|
package/lib/plugin/eslint.d.mts
DELETED
|
@@ -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,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
|
-
}
|
package/lib/plugins.config.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/lib/process-env.d.mts
DELETED
|
@@ -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 { };
|
package/lib/utils/dts.d.mts
DELETED
|
@@ -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[];
|
package/lib/utils/vts.d.mts
DELETED
|
@@ -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
package/lib/vm/locales.d.mts
DELETED
package/lib/vm/modules.d.mts
DELETED
package/lib/vm/render-app.d.mts
DELETED
package/lib/worker/dts.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/lib/worker/eslint.d.mts
DELETED
|
@@ -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 { };
|