@moneko/core 3.54.0-beta.2 → 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.
- package/lib/bin/build.mjs +1 -1
- package/lib/bin/changelog.mjs +2 -2
- package/lib/bin/commit-lint.mjs +1 -1
- package/lib/bin/pure-lint.mjs +1 -1
- package/lib/bin/start.mjs +1 -1
- package/lib/build.mjs +2 -2
- package/lib/commom/ca.mjs +1 -1
- package/lib/commom/diff-object.mjs +1 -1
- package/lib/commom/transform-solid-js.mjs +1 -1
- package/lib/dev/mock.mjs +1 -1
- package/lib/dev/server.mjs +1 -1
- package/lib/dev.mjs +2 -2
- package/lib/loader/css-in-js-minify.cjs +1 -1
- package/lib/loader/lightning-css/codegen.cjs +13 -13
- package/lib/loader/lightning-css/loader.cjs +1 -1
- package/lib/loader/lightning-css/runtime/get-url.cjs +1 -1
- package/lib/loader/lightning-css/utils.cjs +1 -1
- package/lib/loader/solid.cjs +1 -1
- package/lib/loader/ts-doc.cjs +1 -1
- package/lib/module.config.mjs +1 -1
- package/lib/options/md-to-html.mjs +1 -1
- package/lib/plugin/compression.mjs +1 -1
- package/lib/plugin/copy.mjs +1 -1
- package/lib/plugin/lightningcss-plugin.mjs +1 -1
- package/lib/plugin/swc-minify-plugin.mjs +1 -1
- package/lib/utils/create-types.mjs +1 -1
- package/lib/utils/fetch-module-federation-dts.mjs +1 -1
- package/lib/vm/docs.mjs +1 -1
- package/lib/vm/generate-doc.mjs +1 -1
- package/lib/worker/eslint.mjs +1 -1
- package/lib/worker/react-compiler.mjs +1 -1
- package/package.json +4 -4
- package/typings/global.d.ts +1 -1
- package/lib/bin/build-app.d.mts +0 -11
- package/lib/bin/build.d.mts +0 -13
- package/lib/bin/changelog.d.mts +0 -12
- package/lib/bin/commit-lint.d.mts +0 -43
- package/lib/bin/eslint.d.mts +0 -6
- package/lib/bin/file.d.mts +0 -4
- package/lib/bin/git-hooks.d.mts +0 -5
- package/lib/bin/help.d.mts +0 -85
- package/lib/bin/index.d.mts +0 -6
- package/lib/bin/lessc.d.mts +0 -10
- package/lib/bin/pin.d.mts +0 -39
- package/lib/bin/pure-lint.d.mts +0 -32
- package/lib/bin/server.d.mts +0 -14
- package/lib/bin/setup.d.mts +0 -5
- package/lib/bin/start.d.mts +0 -5
- package/lib/bin/stylelint.d.mts +0 -7
- package/lib/bin/tsc.d.mts +0 -6
- package/lib/bin/utils/bundle-app.d.mts +0 -7
- package/lib/bin/utils/config.d.mts +0 -13
- package/lib/bin/utils/convert-solid.d.mts +0 -31
- package/lib/bin/utils/convert-solid.mjs +0 -1
- package/lib/bin/utils/get-commit-files.d.mts +0 -3
- package/lib/bin/utils/setup-swcrc.d.mts +0 -4
- package/lib/build/common.d.mts +0 -12
- package/lib/build/server.d.mts +0 -8
- package/lib/build.d.mts +0 -16
- package/lib/commom/ca.d.mts +0 -17
- package/lib/commom/check-npm.d.mts +0 -4
- package/lib/commom/corepack.d.mts +0 -12
- package/lib/commom/diff-object.d.mts +0 -2
- package/lib/commom/esm.d.mts +0 -2
- package/lib/commom/has-pkg.d.mts +0 -3
- package/lib/commom/host.d.mts +0 -3
- package/lib/commom/is-ci-environment.d.mts +0 -3
- package/lib/commom/log.d.mts +0 -7
- package/lib/commom/match-path.d.mts +0 -6
- package/lib/commom/mime.d.mts +0 -2
- package/lib/commom/module-resolve.d.mts +0 -3
- package/lib/commom/net.d.mts +0 -4
- package/lib/commom/open.d.mts +0 -5
- package/lib/commom/parse-args.d.mts +0 -2
- package/lib/commom/parse-module-meta.d.mts +0 -11
- package/lib/commom/paths.d.mts +0 -36
- package/lib/commom/print-log.d.mts +0 -16
- package/lib/commom/reactive-object.d.mts +0 -10
- package/lib/commom/require.d.mts +0 -8
- package/lib/commom/rule.d.mts +0 -20
- package/lib/commom/setup-env.d.mts +0 -4
- package/lib/commom/sigint-exit.d.mts +0 -3
- package/lib/commom/timer.d.mts +0 -12
- package/lib/commom/transform-solid-js.d.mts +0 -41
- package/lib/common.d.mts +0 -16
- package/lib/config.d.mts +0 -28
- package/lib/dev/config.d.mts +0 -14
- package/lib/dev/generate-progress-html.d.mts +0 -6
- package/lib/dev/get-cert.d.mts +0 -10
- package/lib/dev/json-schema.d.mts +0 -72
- package/lib/dev/mock.d.mts +0 -61
- package/lib/dev/proxy.d.mts +0 -19
- package/lib/dev/server.d.mts +0 -34
- package/lib/dev.d.mts +0 -48
- 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/css-in-js-minify.d.cts +0 -22
- package/lib/loader/lightning-css/codegen.d.cts +0 -36
- package/lib/loader/lightning-css/loader.d.cts +0 -49
- package/lib/loader/lightning-css/runtime/api.d.cts +0 -3
- package/lib/loader/lightning-css/runtime/get-url.d.cts +0 -9
- package/lib/loader/lightning-css/utils.d.cts +0 -26
- package/lib/loader/mdx.d.cts +0 -4
- package/lib/loader/react-compiler.d.cts +0 -21
- package/lib/loader/solid.d.cts +0 -9
- package/lib/loader/ts-doc.d.cts +0 -11
- package/lib/module.config.d.mts +0 -49
- package/lib/options/css-extract.d.mts +0 -9
- package/lib/options/jsx-dom-expressions.d.mts +0 -10
- package/lib/options/md-to-html.d.mts +0 -5
- package/lib/options/modify-vars.d.mts +0 -11
- package/lib/options/reslove.d.mts +0 -11
- package/lib/options/split-chunk.d.mts +0 -6
- package/lib/options/swcrc.d.mts +0 -21
- package/lib/plugin/compression.d.mts +0 -17
- package/lib/plugin/copy.d.mts +0 -21
- package/lib/plugin/done.d.mts +0 -11
- package/lib/plugin/eslint.d.mts +0 -22
- package/lib/plugin/exposes-declararion.d.mts +0 -20
- package/lib/plugin/external-remotes.d.mts +0 -8
- package/lib/plugin/html-plugin.d.mts +0 -48
- package/lib/plugin/lightningcss-plugin.d.mts +0 -31
- package/lib/plugin/manifest.d.mts +0 -43
- package/lib/plugin/module-federation.d.mts +0 -21
- package/lib/plugin/override-resolve.d.mts +0 -14
- package/lib/plugin/stylelint.d.mts +0 -21
- package/lib/plugin/swc-minify-plugin.d.mts +0 -13
- package/lib/plugin/virtual-module.d.mts +0 -24
- package/lib/plugins.config.d.mts +0 -12
- package/lib/polyfills/polyfills.d.mts +0 -7
- package/lib/polyfills/replace-children.d.mts +0 -1
- package/lib/polyfills/targets.d.mts +0 -8
- package/lib/process-env.d.mts +0 -26
- package/lib/utils/compile-dts.d.mts +0 -9
- package/lib/utils/create-types.d.mts +0 -15
- package/lib/utils/dts.d.mts +0 -5
- package/lib/utils/fetch-module-federation-dts.d.mts +0 -6
- package/lib/utils/index.d.mts +0 -12
- package/lib/utils/run.d.mts +0 -3
- package/lib/utils/seo.d.mts +0 -10
- package/lib/utils/svg-to-data-uri.d.mts +0 -59
- package/lib/utils/vts.d.mts +0 -10
- package/lib/vm/coverage.d.mts +0 -39
- package/lib/vm/docs.d.mts +0 -18
- package/lib/vm/example.d.mts +0 -12
- package/lib/vm/generate-doc.d.mts +0 -35
- package/lib/vm/info.d.mts +0 -5
- package/lib/vm/locales.d.mts +0 -29
- package/lib/vm/modules.d.mts +0 -27
- package/lib/vm/render-app.d.mts +0 -11
- package/lib/vm/routes.d.mts +0 -17
- package/lib/vm/utils.d.mts +0 -5
- package/lib/worker/dts.d.mts +0 -2
- package/lib/worker/eslint.d.mts +0 -7
- package/lib/worker/react-compiler.d.mts +0 -20
- package/lib/worker/stylelint.d.mts +0 -5
- package/lib/worker/swc-minify.d.mts +0 -2
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { dirname, relative, resolve, sep } from 'node:path';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
3
|
-
import type { LoaderContext } from 'webpack';
|
|
4
|
-
declare const t: RegExp;
|
|
5
|
-
export declare function urlToRequest(e: string, i?: string | boolean);
|
|
6
|
-
export declare async function resolveRequests(resolve: (arg0: any, arg1: any) => Promise<any>, context: any, possibleRequests: any[]): Promise<any>;
|
|
7
|
-
export declare function requestify(url: string, rootContext: string);
|
|
8
|
-
export declare function isUrlRequestable(url: string);
|
|
9
|
-
export declare function isDataUrl(url: string);
|
|
10
|
-
export declare function getPreRequester({ loaders, loaderIndex }: {
|
|
11
|
-
loaders: {
|
|
12
|
-
request: unknown;
|
|
13
|
-
}[];
|
|
14
|
-
loaderIndex: number;
|
|
15
|
-
});
|
|
16
|
-
export declare function getFilter<T>(filter: T, resourcePath: string);
|
|
17
|
-
declare function normalizePath(file: string);
|
|
18
|
-
declare const IS_NATIVE_WIN32_PATH: RegExp;
|
|
19
|
-
declare const ABSOLUTE_SCHEME: RegExp;
|
|
20
|
-
declare function getURLType(source: string);
|
|
21
|
-
export declare function normalizeSourceMapForRuntime(map: any, loaderContext: LoaderContext<unknown>);
|
|
22
|
-
export declare function dashesCamelCase(str: string);
|
|
23
|
-
declare const preserveCamelCase: (string: string, locale: string) => any;
|
|
24
|
-
declare const preserveConsecutiveUppercase: (input: string) => any;
|
|
25
|
-
declare const postProcess: (input: string, options: any) => any;
|
|
26
|
-
export declare const camelCase: (input: string | string[], options?: Record<string, unknown>) => any;
|
package/lib/loader/mdx.d.cts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { transformAsync } from '@moneko/eslint/babel-core';
|
|
2
|
-
import { BabelPluginReactCompiler } from '@moneko/eslint/react-compiler';
|
|
3
|
-
import type { LoaderContext } from 'webpack';
|
|
4
|
-
import log from '../commom/log.mjs';
|
|
5
|
-
export interface ReactCompilerOption {
|
|
6
|
-
target?: '17' | '18' | '19';
|
|
7
|
-
sources?(filename: string): boolean;
|
|
8
|
-
compilationMode?: 'annotation' | 'infer' | 'syntax' | 'all';
|
|
9
|
-
logger?: {
|
|
10
|
-
logEvent?: (fileName: string, event: MessageEvent) => void;
|
|
11
|
-
};
|
|
12
|
-
noEmit?: boolean;
|
|
13
|
-
flowSuppressions?: boolean;
|
|
14
|
-
ignoreUseNoForget?: boolean;
|
|
15
|
-
enableReanimatedCheck?: boolean;
|
|
16
|
-
panicThreshold?: string;
|
|
17
|
-
environment?: unknown;
|
|
18
|
-
gating?: null;
|
|
19
|
-
eslintSuppressionRules?: Record<string, string | boolean | number>;
|
|
20
|
-
}
|
|
21
|
-
export default function reactCompilerLoader(this: LoaderContext<ReactCompilerOption>, sourceCode: string);
|
package/lib/loader/solid.d.cts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { TransformOptions } from '@moneko/eslint/babel-core';
|
|
2
|
-
import type { LoaderContext } from 'webpack';
|
|
3
|
-
import log from '../commom/log.mjs';
|
|
4
|
-
import { transformSolidJs, TransformSolidJsOption } from '../commom/transform-solid-js.mjs';
|
|
5
|
-
declare async function solidLoader(this: LoaderContext<TransformSolidJsOption>, sourceCode: string);
|
|
6
|
-
export declare function custom(this: LoaderContext<TransformOptions & {
|
|
7
|
-
refresh?: boolean;
|
|
8
|
-
}>, sourceCode: string);
|
|
9
|
-
export default solidLoader;
|
package/lib/loader/ts-doc.d.cts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { statSync } from 'fs';
|
|
2
|
-
import type { LoaderContext } from 'webpack';
|
|
3
|
-
import log from '../commom/log.mjs';
|
|
4
|
-
import parseModuleMeta from '../commom/parse-module-meta.mjs';
|
|
5
|
-
import type ReactiveObject from '../commom/reactive-object.mjs';
|
|
6
|
-
declare const metadata: Record<string, number>;
|
|
7
|
-
export default function(this: LoaderContext<{
|
|
8
|
-
comment: ReactiveObject<Record<string, string>>;
|
|
9
|
-
generateDoc(content: string, path: string): string;
|
|
10
|
-
getCommentPath(filepath: string): string;
|
|
11
|
-
}>, value: string);
|
package/lib/module.config.d.mts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { join, sep } from 'node:path';
|
|
2
|
-
import { saveFileSync } from '@moneko/utils';
|
|
3
|
-
import type { LibraryOptions, ModuleOptions, PathData, RuleSetRule } from 'webpack';
|
|
4
|
-
import paths, { CUSTOMCONFIG } from './commom/paths.mjs';
|
|
5
|
-
import ReactiveObject from './commom/reactive-object.mjs';
|
|
6
|
-
import require from './commom/require.mjs';
|
|
7
|
-
import Rule from './commom/rule.mjs';
|
|
8
|
-
import type { LightningCssLoaderOption } from './loader/lightning-css/loader.cjs';
|
|
9
|
-
import cssExtract from './options/css-extract.mjs';
|
|
10
|
-
import modifyVars from './options/modify-vars.mjs';
|
|
11
|
-
import reslove from './options/reslove.mjs';
|
|
12
|
-
import swcrc from './options/swcrc.mjs';
|
|
13
|
-
import { getLightningCssTargets } from './polyfills/targets.mjs';
|
|
14
|
-
import { node_modules, resolveProgram, toCamelCase } from './utils/index.mjs';
|
|
15
|
-
import svgToDataUri from './utils/svg-to-data-uri.mjs';
|
|
16
|
-
import { comment, getCommentPath } from './vm/docs.mjs';
|
|
17
|
-
import generateDoc from './vm/generate-doc.mjs';
|
|
18
|
-
import { outputConfig } from './common.mjs';
|
|
19
|
-
import { CONFIG } from './config.mjs';
|
|
20
|
-
import { type ConfigType, type RulesInclude } from './index.mjs';
|
|
21
|
-
import { FRAMEWORK, isDev, isLibrary } from './process-env.mjs';
|
|
22
|
-
declare const lightningCssLoader: RuleSetRule;
|
|
23
|
-
declare const lessLoader: RuleSetRule;
|
|
24
|
-
declare const pathCache: Map<string, string[] | null>;
|
|
25
|
-
declare function safePkgPath(name: string): string[];
|
|
26
|
-
declare const customCssModules: string[];
|
|
27
|
-
declare const entryResolveProgramPath: string[];
|
|
28
|
-
declare function include(type: keyof RulesInclude): Promise<string[]>;
|
|
29
|
-
declare const includeModules: string[][];
|
|
30
|
-
declare const includeCss: string[];
|
|
31
|
-
declare const includeJs: string[];
|
|
32
|
-
declare const includeMedia: string[];
|
|
33
|
-
declare const includeWasm: string[];
|
|
34
|
-
declare const includeFont: string[];
|
|
35
|
-
declare let sassLoader: RuleSetRule | void;
|
|
36
|
-
declare const docLoader: false | RuleSetRule;
|
|
37
|
-
declare const IS_UMD: boolean;
|
|
38
|
-
declare const commonOneOf: RuleSetRule[];
|
|
39
|
-
declare const prefixJsLoader: ConfigType['prefixJsLoader'];
|
|
40
|
-
declare const cssModuleType: ReactiveObject<Record<string, string>>;
|
|
41
|
-
declare function getJSON(params: {
|
|
42
|
-
resourcePath: string;
|
|
43
|
-
exports: {
|
|
44
|
-
name: string;
|
|
45
|
-
value: string;
|
|
46
|
-
}[];
|
|
47
|
-
});
|
|
48
|
-
declare const _dts_1: (ssr: boolean) => ModuleOptions;
|
|
49
|
-
export default _dts_1;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
2
|
-
import type { RuleSetUseItem } from 'webpack';
|
|
3
|
-
import { CONFIG, PUBLICPATH } from '../config.mjs';
|
|
4
|
-
import { type MiniCssExtractPluginOptions } from '../index.mjs';
|
|
5
|
-
import { isDev, isMicro } from '../process-env.mjs';
|
|
6
|
-
import reslove from './reslove.mjs';
|
|
7
|
-
declare const cssAssetsPublicPath: string;
|
|
8
|
-
declare let cssExtract: RuleSetUseItem;
|
|
9
|
-
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,11 +0,0 @@
|
|
|
1
|
-
import hasPkg from '../commom/has-pkg.mjs';
|
|
2
|
-
import require from '../commom/require.mjs';
|
|
3
|
-
import { CONFIG } from '../config.mjs';
|
|
4
|
-
import type { HtmlPluginOption } from '../plugin/html-plugin.mjs';
|
|
5
|
-
declare const prefixCls: string;
|
|
6
|
-
declare const favicon: string;
|
|
7
|
-
declare const modifyVars: Record<string, string | false | undefined>;
|
|
8
|
-
declare const antd4Vars: {
|
|
9
|
-
};
|
|
10
|
-
declare const antdVars: string | false;
|
|
11
|
-
export default modifyVars;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import hasPkg from '../commom/has-pkg.mjs';
|
|
2
|
-
import require from '../commom/require.mjs';
|
|
3
|
-
declare const reslove: {
|
|
4
|
-
readonly styleLoader;
|
|
5
|
-
readonly sassLoader;
|
|
6
|
-
readonly lessLoader;
|
|
7
|
-
readonly swcLoader;
|
|
8
|
-
readonly transformImports;
|
|
9
|
-
readonly hotMiddlewareClient;
|
|
10
|
-
};
|
|
11
|
-
export default reslove;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
export type OptimizationSplitChunksOptions = ConstructorParameters<typeof webpack.optimize.SplitChunksPlugin>[0];
|
|
3
|
-
declare function initGroup();
|
|
4
|
-
declare const group: ReturnType<typeof initGroup>;
|
|
5
|
-
declare const splitChunk: OptimizationSplitChunksOptions;
|
|
6
|
-
export default splitChunk;
|
package/lib/options/swcrc.d.mts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Config as SwcConfig, EnvConfig, JscConfig } from '@swc/core';
|
|
2
|
-
import { merge } from 'webpack-merge';
|
|
3
|
-
import paths from '../commom/paths.mjs';
|
|
4
|
-
import { CONFIG } from '../config.mjs';
|
|
5
|
-
import type { SwcImportOnDemandTransform } from '../index.mjs';
|
|
6
|
-
import polyfills, { coreJsVersion } from '../polyfills/polyfills.mjs';
|
|
7
|
-
import { isDev, isReact, jsxImportSource } from '../process-env.mjs';
|
|
8
|
-
import reslove from './reslove.mjs';
|
|
9
|
-
declare function transformConfigs(config: SwcImportOnDemandTransform);
|
|
10
|
-
declare const importOnDemand: SwcImportOnDemandTransform;
|
|
11
|
-
declare const env: EnvConfig;
|
|
12
|
-
export type SwcOption = SwcConfig & {
|
|
13
|
-
module?: {
|
|
14
|
-
resolveFully: boolean;
|
|
15
|
-
};
|
|
16
|
-
parseMap?: boolean;
|
|
17
|
-
sync?: boolean;
|
|
18
|
-
};
|
|
19
|
-
declare const _dts_1: (ssr: boolean, other: {
|
|
20
|
-
}) => any;
|
|
21
|
-
export default _dts_1;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { compression } from '@moneko/utils';
|
|
2
|
-
import { type AssetInfo, type Compilation, type Compiler, type sources, type WebpackError } from 'webpack';
|
|
3
|
-
type Source = sources.Source;
|
|
4
|
-
export interface CompressionPluginOptions {
|
|
5
|
-
test: RegExp;
|
|
6
|
-
algorithm: 'gzip' | 'brotli';
|
|
7
|
-
}
|
|
8
|
-
export declare class CompressionPlugin {
|
|
9
|
-
private name: string;
|
|
10
|
-
private options: CompressionPluginOptions & {
|
|
11
|
-
filename: string;
|
|
12
|
-
};
|
|
13
|
-
constructor(options: CompressionPluginOptions);
|
|
14
|
-
private runCompressionAlgorithm(input: Buffer): Buffer;
|
|
15
|
-
async compress(compiler: Compiler, compilation: Compilation, assets: Record<string, Source>);
|
|
16
|
-
apply(compiler: Compiler);
|
|
17
|
-
}
|
package/lib/plugin/copy.d.mts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { statSync } from 'node:fs';
|
|
2
|
-
import { resolve } from 'node:path';
|
|
3
|
-
import { loadFileRaw, scanFolderSync } from '@moneko/utils';
|
|
4
|
-
import webpack, { type Compiler, type sources } from 'webpack';
|
|
5
|
-
import log from '../commom/log.mjs';
|
|
6
|
-
export interface CopyPluginOption {
|
|
7
|
-
files?: string[];
|
|
8
|
-
dirs?: string[];
|
|
9
|
-
}
|
|
10
|
-
declare const PLUGIN_NAME: string;
|
|
11
|
-
declare const RawSource: typeof webpack.sources.RawSource;
|
|
12
|
-
export declare class CopyPlugin {
|
|
13
|
-
private readonly baseFiles: Set<string>;
|
|
14
|
-
private readonly dirs: Set<string>;
|
|
15
|
-
private cacheFiles: string[];
|
|
16
|
-
private fileTimestamps: Map<string, number>;
|
|
17
|
-
constructor(option: CopyPluginOption);
|
|
18
|
-
private getFiles();
|
|
19
|
-
private hasFileChanged(filePath: string): boolean;
|
|
20
|
-
apply(compiler: Compiler);
|
|
21
|
-
}
|
package/lib/plugin/done.d.mts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Compiler, Stats } from 'webpack';
|
|
2
|
-
export type DoneCallback = (stats: Stats) => void;
|
|
3
|
-
export declare class DonePlugin {
|
|
4
|
-
private name: string;
|
|
5
|
-
private options;
|
|
6
|
-
constructor(options: {
|
|
7
|
-
done: DoneCallback;
|
|
8
|
-
});
|
|
9
|
-
apply(compiler: Compiler);
|
|
10
|
-
}
|
|
11
|
-
export type DonePluginOption = ConstructorParameters<typeof DonePlugin>[0]['done'];
|
package/lib/plugin/eslint.d.mts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url';
|
|
2
|
-
import { ESLint } from '@moneko/eslint';
|
|
3
|
-
import webpack, { type Compilation, type Compiler } from 'webpack';
|
|
4
|
-
import { Worker } from 'worker_threads';
|
|
5
|
-
import type { ESLintWorkerMessage } from '../worker/eslint.mjs';
|
|
6
|
-
declare class ESLintError extends webpack.WebpackError {
|
|
7
|
-
constructor(message: string);
|
|
8
|
-
}
|
|
9
|
-
export interface ESLintOption extends ESLint.Options {
|
|
10
|
-
files: string[];
|
|
11
|
-
lintDirtyModulesOnly?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare class ESLintPlugin {
|
|
14
|
-
private name: string;
|
|
15
|
-
private worker: Worker;
|
|
16
|
-
private options: ESLintOption;
|
|
17
|
-
constructor(options: ESLintOption = {
|
|
18
|
-
files: []
|
|
19
|
-
});
|
|
20
|
-
apply(compiler: Compiler): void;
|
|
21
|
-
private report(compilation: Compilation, lints?: ESLintWorkerMessage);
|
|
22
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { join, parse, resolve } from 'node:path';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
3
|
-
import { loadFile } from '@moneko/utils';
|
|
4
|
-
import webpack, { type Compilation, type Compiler } from 'webpack';
|
|
5
|
-
import { Worker } from 'worker_threads';
|
|
6
|
-
import createTypes from '../utils/create-types.mjs';
|
|
7
|
-
interface ModuleFederationExposesDeclarationPluginOptions {
|
|
8
|
-
name: string;
|
|
9
|
-
exposes: Record<string, string>;
|
|
10
|
-
}
|
|
11
|
-
declare const PLUGIN_NAME: string;
|
|
12
|
-
export declare class ModuleFederationExposesDeclarationPlugin {
|
|
13
|
-
private name: string;
|
|
14
|
-
private assetName: string;
|
|
15
|
-
private dts: string;
|
|
16
|
-
private option: ModuleFederationExposesDeclarationPluginOptions;
|
|
17
|
-
private worker: Worker;
|
|
18
|
-
constructor(option: ModuleFederationExposesDeclarationPluginOptions);
|
|
19
|
-
apply(compiler: Compiler);
|
|
20
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import webpack, { type Compilation, type Compiler, type ExternalModule, type Module } from 'webpack';
|
|
2
|
-
declare const sources: typeof webpack.sources;
|
|
3
|
-
declare const PLUGIN_NAME: string;
|
|
4
|
-
declare function toExpression(templateUrl: string);
|
|
5
|
-
declare function extractUrlAndGlobal(urlAndGlobal: string);
|
|
6
|
-
export declare class ExternalRemotesPlugin {
|
|
7
|
-
apply(compiler: Compiler);
|
|
8
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { basename, resolve } from 'node:path';
|
|
3
|
-
import webpack, { type Compilation, type Compiler } from 'webpack';
|
|
4
|
-
export interface HtmlMeta {
|
|
5
|
-
[key: string]: string | undefined | HtmlMeta;
|
|
6
|
-
}
|
|
7
|
-
export interface HtmlPluginOption {
|
|
8
|
-
favicon?: string | false;
|
|
9
|
-
title?: string;
|
|
10
|
-
template?: string;
|
|
11
|
-
filename?: string | ((entryName: string) => string);
|
|
12
|
-
inject?: boolean | 'head' | 'body';
|
|
13
|
-
templateContent?: (options: HtmlPluginOption) => string;
|
|
14
|
-
tags?: {
|
|
15
|
-
textContent?: string;
|
|
16
|
-
tag?: string;
|
|
17
|
-
inject?: 'body' | 'head';
|
|
18
|
-
[key: string]: string | null | boolean | number | undefined;
|
|
19
|
-
}[];
|
|
20
|
-
meta?: HtmlMeta;
|
|
21
|
-
}
|
|
22
|
-
export declare class HtmlPlugin {
|
|
23
|
-
private options: HtmlPluginOption;
|
|
24
|
-
private AddEntry: RegExp;
|
|
25
|
-
private faviconPath: string;
|
|
26
|
-
private name: string;
|
|
27
|
-
private cachedMetaTags: string | null;
|
|
28
|
-
private cachedCustomTags: {
|
|
29
|
-
head: string;
|
|
30
|
-
body: string;
|
|
31
|
-
} | null;
|
|
32
|
-
constructor(options: HtmlPluginOption = {});
|
|
33
|
-
apply(compiler: Compiler);
|
|
34
|
-
private generateDefaultTemplate(): string;
|
|
35
|
-
private generateMetaTags(): string;
|
|
36
|
-
private generateCustomTags(): {
|
|
37
|
-
head: string;
|
|
38
|
-
body: string;
|
|
39
|
-
};
|
|
40
|
-
private getAssets(compilation: Compilation): {
|
|
41
|
-
js: string[];
|
|
42
|
-
css: string[];
|
|
43
|
-
};
|
|
44
|
-
private injectAssets(templateHtml: string, assets: {
|
|
45
|
-
js: string[];
|
|
46
|
-
css: string[];
|
|
47
|
-
}, inject: boolean | 'head' | 'body'): string;
|
|
48
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Buffer } from 'node:buffer';
|
|
2
|
-
import { type Targets, transform as _transform } from 'lightningcss';
|
|
3
|
-
import webpack, { type Compilation, type Compiler, type ModuleFilenameHelpers, type sources } from 'webpack';
|
|
4
|
-
declare const encoder: TextEncoder;
|
|
5
|
-
declare const RawSource: typeof sources.RawSource;
|
|
6
|
-
declare const SourceMapSource: typeof sources.SourceMapSource;
|
|
7
|
-
declare const matchObject: typeof ModuleFilenameHelpers.matchObject;
|
|
8
|
-
declare const PLUGIN_NAME: string;
|
|
9
|
-
declare const CSS_FILE_REG: RegExp;
|
|
10
|
-
type Filter = string | RegExp;
|
|
11
|
-
type Implementation = typeof import('lightningcss');
|
|
12
|
-
interface MinifyPluginOpts {
|
|
13
|
-
implementation?: Implementation;
|
|
14
|
-
sourceMap?: boolean;
|
|
15
|
-
test?: RegExp;
|
|
16
|
-
include?: Filter | Filter[];
|
|
17
|
-
exclude?: Filter | Filter[];
|
|
18
|
-
targets?: Targets;
|
|
19
|
-
}
|
|
20
|
-
interface CacheItem {
|
|
21
|
-
source: sources.Source;
|
|
22
|
-
map?: string | object | Buffer;
|
|
23
|
-
minimized: boolean;
|
|
24
|
-
}
|
|
25
|
-
export declare class LightningCssMinifyPlugin {
|
|
26
|
-
private readonly options: Omit<MinifyPluginOpts, 'implementation'>;
|
|
27
|
-
private readonly transform: Implementation['transform'];
|
|
28
|
-
constructor(opts: MinifyPluginOpts = {});
|
|
29
|
-
apply(compiler: Compiler);
|
|
30
|
-
private async transformAssets(compilation: Compilation): Promise<void>;
|
|
31
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { Compilation, Compiler } from 'webpack';
|
|
2
|
-
import { packageJson } from '../process-env.mjs';
|
|
3
|
-
interface Icon {
|
|
4
|
-
src: string;
|
|
5
|
-
type: string;
|
|
6
|
-
sizes: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ManifestPluginOption {
|
|
9
|
-
filename: string;
|
|
10
|
-
id?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
version?: string;
|
|
13
|
-
short_name?: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
start_url?: string;
|
|
16
|
-
display?: string;
|
|
17
|
-
background_color?: string;
|
|
18
|
-
theme_color?: string;
|
|
19
|
-
icons?: Icon[];
|
|
20
|
-
shortcuts?: {
|
|
21
|
-
name: string;
|
|
22
|
-
short_name: string;
|
|
23
|
-
description: string;
|
|
24
|
-
url: string;
|
|
25
|
-
icons: Icon[];
|
|
26
|
-
}[];
|
|
27
|
-
screenshots?: {
|
|
28
|
-
src: string;
|
|
29
|
-
type: string;
|
|
30
|
-
sizes: string;
|
|
31
|
-
form_factor: string;
|
|
32
|
-
}[];
|
|
33
|
-
content_assets?: string[];
|
|
34
|
-
[key: string]: unknown;
|
|
35
|
-
}
|
|
36
|
-
declare const base: ManifestPluginOption;
|
|
37
|
-
export declare function generateManifest(override: Partial<ManifestPluginOption>, hash?: string, content_assets?: string[]);
|
|
38
|
-
export declare class ManifestPlugin {
|
|
39
|
-
private name: string;
|
|
40
|
-
private options: ManifestPluginOption;
|
|
41
|
-
constructor(options?: Partial<ManifestPluginOption>);
|
|
42
|
-
apply(compiler: Compiler);
|
|
43
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import webpack, { container, type WebpackPluginInstance } from 'webpack';
|
|
2
|
-
import moduleResolve from '../commom/module-resolve.mjs';
|
|
3
|
-
import { CONFIG } from '../config.mjs';
|
|
4
|
-
import fetchModuleFederationDts from '../utils/fetch-module-federation-dts.mjs';
|
|
5
|
-
import { resolveProgram } from '../utils/index.mjs';
|
|
6
|
-
import { ModuleFederationExposesDeclarationPlugin } from './exposes-declararion.mjs';
|
|
7
|
-
import { ExternalRemotesPlugin } from './external-remotes.mjs';
|
|
8
|
-
type ModuleFederationPluginOption = ConstructorParameters<typeof ModuleFederationPlugin>[0];
|
|
9
|
-
type Remote = {
|
|
10
|
-
name: string;
|
|
11
|
-
filename?: string;
|
|
12
|
-
host: string;
|
|
13
|
-
alias?: string;
|
|
14
|
-
library?: string[];
|
|
15
|
-
};
|
|
16
|
-
declare const NormalModuleReplacementPlugin: typeof webpack.NormalModuleReplacementPlugin;
|
|
17
|
-
declare const ModuleFederationPlugin: typeof container.ModuleFederationPlugin;
|
|
18
|
-
declare const aliasLibrary: Record<string, string>;
|
|
19
|
-
declare const exposesDeclarationPlugins: WebpackPluginInstance[];
|
|
20
|
-
declare const moduleFederation: WebpackPluginInstance[];
|
|
21
|
-
export default moduleFederation;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { relative } from 'node:path';
|
|
2
|
-
import { fileExists } from '@moneko/utils';
|
|
3
|
-
import type { Resolver } from 'webpack';
|
|
4
|
-
import paths from '../commom/paths.mjs';
|
|
5
|
-
export interface OverrideResolverOption {
|
|
6
|
-
original?: string;
|
|
7
|
-
override?: string;
|
|
8
|
-
}
|
|
9
|
-
declare const PLUGIN_NAME: string;
|
|
10
|
-
export declare class OverrideResolverPlugin {
|
|
11
|
-
private readonly options: Required<OverrideResolverOption>;
|
|
12
|
-
constructor(options: Required<OverrideResolverOption>);
|
|
13
|
-
apply(resolver: Resolver);
|
|
14
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url';
|
|
2
|
-
import type { LinterOptions } from '@moneko/stylelint';
|
|
3
|
-
import webpack, { type Compilation, type Compiler } from 'webpack';
|
|
4
|
-
import { Worker } from 'worker_threads';
|
|
5
|
-
import type { StylelintWorkerMessage } from '../worker/stylelint.mjs';
|
|
6
|
-
declare class StylelintError extends webpack.WebpackError {
|
|
7
|
-
constructor(message: string);
|
|
8
|
-
}
|
|
9
|
-
export interface StylelintOption extends LinterOptions {
|
|
10
|
-
files: string[];
|
|
11
|
-
}
|
|
12
|
-
export declare class StylelintPlugin {
|
|
13
|
-
private name: string;
|
|
14
|
-
private worker: Worker;
|
|
15
|
-
private options: StylelintOption;
|
|
16
|
-
constructor(options: StylelintOption = {
|
|
17
|
-
files: []
|
|
18
|
-
});
|
|
19
|
-
apply(compiler: Compiler): void;
|
|
20
|
-
private report(lints?: StylelintWorkerMessage, compilation?: Compilation);
|
|
21
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type JsMinifyOptions, minify } from '@swc/core';
|
|
2
|
-
import webpack, { type Compilation, type Compiler, type sources, WebpackError } from 'webpack';
|
|
3
|
-
declare const SourceMapSource: typeof sources.SourceMapSource;
|
|
4
|
-
interface CacheItem {
|
|
5
|
-
source: sources.SourceMapSource;
|
|
6
|
-
minimized: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare class SwcMinifyPlugin {
|
|
9
|
-
private name: string;
|
|
10
|
-
private options: JsMinifyOptions;
|
|
11
|
-
constructor(options: JsMinifyOptions);
|
|
12
|
-
apply(compiler: Compiler);
|
|
13
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Compiler, WebpackPluginInstance } from 'webpack';
|
|
2
|
-
import VirtualModulesPlugin from 'webpack-virtual-modules';
|
|
3
|
-
import parseModuleMeta from '../commom/parse-module-meta.mjs';
|
|
4
|
-
import paths from '../commom/paths.mjs';
|
|
5
|
-
import { isLibrary } from '../process-env.mjs';
|
|
6
|
-
import { node_modules, transformModule } from '../utils/index.mjs';
|
|
7
|
-
import { comment, docs } from '../vm/docs.mjs';
|
|
8
|
-
import { examples } from '../vm/example.mjs';
|
|
9
|
-
import { locales } from '../vm/locales.mjs';
|
|
10
|
-
import modules from '../vm/modules.mjs';
|
|
11
|
-
import { route } from '../vm/routes.mjs';
|
|
12
|
-
declare const defaultModules: Record<string, string>;
|
|
13
|
-
export interface VirtualModulePluginOption {
|
|
14
|
-
[key: string]: string | object;
|
|
15
|
-
}
|
|
16
|
-
declare const PLUGIN_NAME: string;
|
|
17
|
-
export declare class VirtualModuleWebpackPlugin implements WebpackPluginInstance {
|
|
18
|
-
private virtualModules: VirtualModulesPlugin;
|
|
19
|
-
private options: Record<string, string>;
|
|
20
|
-
private init: boolean;
|
|
21
|
-
constructor(options: VirtualModulePluginOption = {});
|
|
22
|
-
private modify(compiler: Compiler, key: string, moduleContents?: string);
|
|
23
|
-
apply(compiler: Compiler);
|
|
24
|
-
}
|
package/lib/plugins.config.d.mts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import webpack, { type WebpackPluginInstance } from 'webpack';
|
|
2
|
-
import { CompressionPlugin, type CompressionPluginOptions } from './plugin/compression.mjs';
|
|
3
|
-
import { CopyPlugin } from './plugin/copy.mjs';
|
|
4
|
-
import { HtmlMeta, HtmlPlugin } from './plugin/html-plugin.mjs';
|
|
5
|
-
import { ManifestPlugin } from './plugin/manifest.mjs';
|
|
6
|
-
import moduleFederation from './plugin/module-federation.mjs';
|
|
7
|
-
import { VirtualModuleWebpackPlugin } from './plugin/virtual-module.mjs';
|
|
8
|
-
import { CONFIG } from './config.mjs';
|
|
9
|
-
import { packageJson } from './process-env.mjs';
|
|
10
|
-
declare const compression: Partial<CompressionPluginOptions>;
|
|
11
|
-
declare const plugins: WebpackPluginInstance[];
|
|
12
|
-
export default plugins;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import compat from 'core-js-compat';
|
|
2
|
-
import require from '../commom/require.mjs';
|
|
3
|
-
import { getBrowsersTargets } from './targets.mjs';
|
|
4
|
-
declare const _coreJsVersion: string;
|
|
5
|
-
export declare const coreJsVersion: string;
|
|
6
|
-
declare function polyfills();
|
|
7
|
-
export default polyfills;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare function replaceChildrenPolyfill(this: Node, ...nodes: (string | Node)[]);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { env } from 'node:process';
|
|
2
|
-
import browsersList from 'browserslist';
|
|
3
|
-
import { browserslistToTargets, type Targets } from 'lightningcss';
|
|
4
|
-
import paths from '../commom/paths.mjs';
|
|
5
|
-
declare let browserTargets: string[] | undefined;
|
|
6
|
-
export declare function getBrowsersTargets();
|
|
7
|
-
declare let lightningCssTargets: Targets | undefined;
|
|
8
|
-
export declare function getLightningCssTargets();
|
package/lib/process-env.d.mts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import process from 'node:process';
|
|
2
|
-
import hasPkg from './commom/has-pkg.mjs';
|
|
3
|
-
import isCIEnvironment from './commom/is-ci-environment.mjs';
|
|
4
|
-
import require from './commom/require.mjs';
|
|
5
|
-
import type { AppType, Framework } from './index.mjs';
|
|
6
|
-
export declare const IS_WINDOW: boolean;
|
|
7
|
-
export declare const APPTYPE: AppType;
|
|
8
|
-
export declare const FRAMEWORK: Framework;
|
|
9
|
-
export declare const NODE_ENV: string;
|
|
10
|
-
export declare const isLibrary: boolean;
|
|
11
|
-
export declare const isMicro: boolean;
|
|
12
|
-
export declare const isMobile: boolean;
|
|
13
|
-
export declare const isReact: boolean;
|
|
14
|
-
export declare const isSolid: boolean;
|
|
15
|
-
export declare const SSR: boolean;
|
|
16
|
-
export declare const mainDirectory: 'site' | 'src';
|
|
17
|
-
export declare const jsxImportSource: string;
|
|
18
|
-
export declare const framework: 'react' | 'solid-js';
|
|
19
|
-
export declare const frameworkVersionStr: string;
|
|
20
|
-
export declare const frameworkVersion: number;
|
|
21
|
-
export declare const packageJson: typeof import('package.json');
|
|
22
|
-
export declare const PACKAGENAME: string;
|
|
23
|
-
export declare const coreName: string;
|
|
24
|
-
export declare const isDev: boolean;
|
|
25
|
-
export declare const refresh: boolean;
|
|
26
|
-
export declare const isCI: boolean;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { cwd } from 'node:process';
|
|
2
|
-
import ts from 'typescript';
|
|
3
|
-
import log from '../commom/log.mjs';
|
|
4
|
-
interface CompilerDtsOption {
|
|
5
|
-
extends?: string;
|
|
6
|
-
compilerOptions?: ts.CompilerOptions;
|
|
7
|
-
include?: string[];
|
|
8
|
-
}
|
|
9
|
-
export declare function compileDts(config: CompilerDtsOption): string;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import ts, { type DeclarationStatement, type ModifierLike, type ModifierToken, type ModuleDeclaration, type Node, type NodeArray, type Printer, type SourceFile, type Statement, type SyntaxKind as SyntaxKinds, type TransformationContext, type TransformationResult } from 'typescript';
|
|
2
|
-
declare const SyntaxKind: typeof SyntaxKinds;
|
|
3
|
-
declare const declareModifier: ModifierToken<SyntaxKinds.DeclareKeyword>;
|
|
4
|
-
declare const printer: Printer;
|
|
5
|
-
declare function transformer(context: TransformationContext);
|
|
6
|
-
declare function hasDeclareModifier(node: {
|
|
7
|
-
modifiers?: readonly ModifierLike[];
|
|
8
|
-
}): boolean;
|
|
9
|
-
declare function removeDeclareModifier(modifiers: readonly ModifierLike[] | undefined): readonly ModifierLike[] | undefined;
|
|
10
|
-
declare function isTargetDeclaration(node: Node): node is DeclarationStatement & {
|
|
11
|
-
modifiers?: readonly ModifierLike[];
|
|
12
|
-
};
|
|
13
|
-
declare function updateDeclaration(node: Node, newModifiers: readonly ModifierLike[] | undefined): Node;
|
|
14
|
-
declare function createTypes(moduleName: string, dts: string): string;
|
|
15
|
-
export default createTypes;
|
package/lib/utils/dts.d.mts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import ts, { type CompilerOptions, type ModifierLike } from 'typescript';
|
|
2
|
-
import Rule from '../commom/rule.mjs';
|
|
3
|
-
declare const compilerOptions: CompilerOptions;
|
|
4
|
-
export declare function generateDeclaration(source: string, filename: string): string;
|
|
5
|
-
export declare function getExportKeys(source: string, filename: string): string[];
|