@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,16 +0,0 @@
|
|
|
1
|
-
import { ink, println } from '@moneko/utils';
|
|
2
|
-
export declare const METHOD_COLOR: Record<string, {
|
|
3
|
-
fg: string;
|
|
4
|
-
bg: string;
|
|
5
|
-
}>;
|
|
6
|
-
interface PrintLogOption {
|
|
7
|
-
note?: string;
|
|
8
|
-
timestamp?: boolean;
|
|
9
|
-
labelAlign?: 'left' | 'right' | 'center';
|
|
10
|
-
labelLen?: number;
|
|
11
|
-
labelForegroundColor?: string;
|
|
12
|
-
labelBackgroundColor?: string;
|
|
13
|
-
noteForegroundColor?: string;
|
|
14
|
-
}
|
|
15
|
-
declare function printLog(label: string, url: string, option?: PrintLogOption): void;
|
|
16
|
-
export default printLog;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import EventEmitter from 'node:events';
|
|
2
|
-
declare class ReactiveObject<T extends object = Record<string, string | undefined>> extends EventEmitter {
|
|
3
|
-
readonly data: T;
|
|
4
|
-
constructor(props = {} as T);
|
|
5
|
-
setData(key: keyof T, value: T[keyof T]);
|
|
6
|
-
getData(key: keyof T);
|
|
7
|
-
removeData(key: keyof T);
|
|
8
|
-
[Symbol.iterator](): Iterator<[keyof T, T[keyof T]]>;
|
|
9
|
-
}
|
|
10
|
-
export default ReactiveObject;
|
package/lib/commom/require.d.mts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
|
-
import { type Options, transformFileSync } from '@swc/core';
|
|
3
|
-
declare const require: NodeJS.Require;
|
|
4
|
-
declare const transformOptions: Options;
|
|
5
|
-
declare function requireEsm(module: NodeJS.Module & {
|
|
6
|
-
_compile?: (code: string, filename: string) => void;
|
|
7
|
-
}, filename: string);
|
|
8
|
-
export default require;
|
package/lib/commom/rule.d.mts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare const Rule: {
|
|
2
|
-
readonly js: RegExp;
|
|
3
|
-
readonly css: RegExp;
|
|
4
|
-
readonly less: RegExp;
|
|
5
|
-
readonly scss: RegExp;
|
|
6
|
-
readonly wasm: RegExp;
|
|
7
|
-
readonly txt: RegExp;
|
|
8
|
-
readonly image: RegExp;
|
|
9
|
-
readonly video: RegExp;
|
|
10
|
-
readonly font: RegExp;
|
|
11
|
-
readonly markdown: RegExp;
|
|
12
|
-
readonly tsdoc: RegExp;
|
|
13
|
-
readonly css_module: RegExp;
|
|
14
|
-
readonly node_modules_css_module: RegExp;
|
|
15
|
-
readonly node_modules: RegExp;
|
|
16
|
-
readonly __tests__: RegExp;
|
|
17
|
-
readonly dev_watch_ignored: RegExp;
|
|
18
|
-
readonly extract_func: RegExp;
|
|
19
|
-
};
|
|
20
|
-
export default Rule;
|
package/lib/commom/timer.d.mts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { hrtime } from 'node:process';
|
|
2
|
-
import { ink, println } from '@moneko/utils';
|
|
3
|
-
interface Timer {
|
|
4
|
-
start(label: string): void;
|
|
5
|
-
end(label: string): {
|
|
6
|
-
nanoseconds: bigint;
|
|
7
|
-
milliseconds: number;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
declare const timers: Map<string, bigint>;
|
|
11
|
-
declare const timer: Timer;
|
|
12
|
-
export default timer;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { type PluginItem, transformAsync, type TransformOptions } from '@moneko/eslint/babel-core';
|
|
2
|
-
import BabelPresetEnv from '@moneko/eslint/babel-preset-env';
|
|
3
|
-
import BabelPresetTypescript from '@moneko/eslint/babel-typescript';
|
|
4
|
-
import jsxDomTransform from 'babel-plugin-jsx-dom-expressions';
|
|
5
|
-
import BabelPluginSolidRefresh from 'solid-refresh/babel';
|
|
6
|
-
import { JsxDomExpressions } from '../index.mjs';
|
|
7
|
-
export interface TransformSolidJsOption extends TransformOptions {
|
|
8
|
-
refresh?: boolean;
|
|
9
|
-
jsxOptions?: JsxDomExpressions;
|
|
10
|
-
typescriptOption?: TypescriptOption;
|
|
11
|
-
presetEnvOption?: PresetEnvOption;
|
|
12
|
-
}
|
|
13
|
-
export interface TypescriptOption {
|
|
14
|
-
ignoreExtensions?: boolean;
|
|
15
|
-
allowNamespaces?: boolean;
|
|
16
|
-
disallowAmbiguousJSXLike?: boolean;
|
|
17
|
-
jsxPragma?: string;
|
|
18
|
-
jsxPragmaFrag?: string;
|
|
19
|
-
onlyRemoveTypeImports?: boolean;
|
|
20
|
-
optimizeConstEnums?: boolean;
|
|
21
|
-
rewriteImportExtensions?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export interface PresetEnvOption {
|
|
24
|
-
configPath?: string;
|
|
25
|
-
corejs?: string | {
|
|
26
|
-
version: string;
|
|
27
|
-
proposals: boolean;
|
|
28
|
-
};
|
|
29
|
-
debug?: boolean;
|
|
30
|
-
exclude?: Array<string | RegExp>;
|
|
31
|
-
forceAllTransforms?: boolean;
|
|
32
|
-
ignoreBrowserslistConfig?: boolean;
|
|
33
|
-
include?: Array<string | RegExp>;
|
|
34
|
-
modules?: 'amd' | 'umd' | 'systemjs' | 'commonjs' | 'cjs' | 'auto' | false;
|
|
35
|
-
shippedProposals?: boolean;
|
|
36
|
-
targets?: string | Array<string> | Record<string, string>;
|
|
37
|
-
useBuiltIns?: 'usage' | 'entry' | false;
|
|
38
|
-
browserslistEnv?: string;
|
|
39
|
-
}
|
|
40
|
-
declare const normalPresetEnvOption: PresetEnvOption;
|
|
41
|
-
export declare async function transformSolidJs(sourceCode: string, { refresh, filename, jsxOptions, typescriptOption = {}, presetEnvOption = {}, ...options }: TransformSolidJsOption);
|
package/lib/common.d.mts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { extname, join, resolve } from 'node:path';
|
|
2
|
-
import type { Configuration, FileCacheOptions } from 'webpack';
|
|
3
|
-
import paths, { config_files, CUSTOMCONFIG, TMP_DIR } from './commom/paths.mjs';
|
|
4
|
-
import { type OverrideResolverOption, OverrideResolverPlugin } from './plugin/override-resolve.mjs';
|
|
5
|
-
import { isObject, node_modules, resolveProgram } from './utils/index.mjs';
|
|
6
|
-
import { exampleModuleName } from './vm/example.mjs';
|
|
7
|
-
import app from './vm/info.mjs';
|
|
8
|
-
import { CONFIG } from './config.mjs';
|
|
9
|
-
import plugins from './plugins.config.mjs';
|
|
10
|
-
import { isCI, isDev, isLibrary, NODE_ENV, packageJson } from './process-env.mjs';
|
|
11
|
-
export declare const outputConfig: Configuration['output'];
|
|
12
|
-
declare let entryMap: {
|
|
13
|
-
readonly main: string[];
|
|
14
|
-
};
|
|
15
|
-
declare let cacheConfig: FileCacheOptions | false;
|
|
16
|
-
export declare const commonConfig: Configuration;
|
package/lib/config.d.mts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { join, relative } from 'node:path';
|
|
2
|
-
import process from 'node:process';
|
|
3
|
-
import { fileExists } from '@moneko/utils';
|
|
4
|
-
import { merge } from 'webpack-merge';
|
|
5
|
-
import paths from './commom/paths.mjs';
|
|
6
|
-
import require from './commom/require.mjs';
|
|
7
|
-
import setupEnv from './commom/setup-env.mjs';
|
|
8
|
-
import jsxDomExpressions from './options/jsx-dom-expressions.mjs';
|
|
9
|
-
import splitChunk from './options/split-chunk.mjs';
|
|
10
|
-
import { isFunction, node_modules, resolveProgram } from './utils/index.mjs';
|
|
11
|
-
import type { ConfigType } from './index.mjs';
|
|
12
|
-
import { APPTYPE, FRAMEWORK, frameworkVersion, isCI, isDev, isLibrary, isMobile, isReact, jsxImportSource, mainDirectory, NODE_ENV, PACKAGENAME } from './process-env.mjs';
|
|
13
|
-
declare const includeModule: readonly [string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string];
|
|
14
|
-
export declare function getConfig(path: string): Promise<ConfigType>;
|
|
15
|
-
type EnvType = {
|
|
16
|
-
NODE_ENV: string;
|
|
17
|
-
APPTYPE: string;
|
|
18
|
-
FRAMEWORK: string;
|
|
19
|
-
PROJECTNAME?: string;
|
|
20
|
-
};
|
|
21
|
-
declare const resp: [EnvType, ConfigType, ConfigType];
|
|
22
|
-
declare const env: EnvType;
|
|
23
|
-
declare const normalConf: ConfigType;
|
|
24
|
-
declare const envConf: ConfigType;
|
|
25
|
-
declare const defaultConfig: ConfigType;
|
|
26
|
-
declare let customConf: ConfigType;
|
|
27
|
-
export declare const CONFIG: ConfigType;
|
|
28
|
-
export declare const PUBLICPATH: string;
|
package/lib/dev/config.d.mts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ink, println, termClear } from '@moneko/utils';
|
|
2
|
-
import webpack from 'webpack';
|
|
3
|
-
import { hostHelp } from '../commom/host.mjs';
|
|
4
|
-
import { getIPv4, getPort } from '../commom/net.mjs';
|
|
5
|
-
import printUrlLog from '../commom/print-log.mjs';
|
|
6
|
-
import { CONFIG } from '../config.mjs';
|
|
7
|
-
declare const oldPord: number;
|
|
8
|
-
export declare const PORT: number;
|
|
9
|
-
declare const initRouteBase: boolean;
|
|
10
|
-
declare const routeBase: string;
|
|
11
|
-
declare const skipPortMsg: string | false;
|
|
12
|
-
export declare function getServerAddress(type: 'local' | 'net');
|
|
13
|
-
declare const welcomeMsg: string;
|
|
14
|
-
export declare function devLog(err?: Error | null, stats?: webpack.Stats);
|
package/lib/dev/get-cert.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ink, loadFile, println } from '@moneko/utils';
|
|
2
|
-
import { setupCert } from '../commom/ca.mjs';
|
|
3
|
-
export type CertOption = {
|
|
4
|
-
key: string;
|
|
5
|
-
cert: string;
|
|
6
|
-
} | {
|
|
7
|
-
install: boolean;
|
|
8
|
-
};
|
|
9
|
-
declare async function getCert(domain: string, option: CertOption);
|
|
10
|
-
export default getCert;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
type Any = any;
|
|
2
|
-
type NonArraySchemaObjectType = 'boolean' | 'object' | 'number' | 'string' | 'integer';
|
|
3
|
-
type ArraySchemaObjectType = 'array';
|
|
4
|
-
type SchemaObject = ArraySchemaObject | NonArraySchemaObject;
|
|
5
|
-
interface ExternalDocumentationObject {
|
|
6
|
-
description?: string;
|
|
7
|
-
url: string;
|
|
8
|
-
}
|
|
9
|
-
interface ArraySchemaObject extends BaseSchemaObject {
|
|
10
|
-
type: ArraySchemaObjectType;
|
|
11
|
-
items: ReferenceObject | SchemaObject;
|
|
12
|
-
}
|
|
13
|
-
interface NonArraySchemaObject extends BaseSchemaObject {
|
|
14
|
-
type?: NonArraySchemaObjectType;
|
|
15
|
-
}
|
|
16
|
-
interface BaseSchemaObject {
|
|
17
|
-
title?: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
format?: string;
|
|
20
|
-
default?: Any;
|
|
21
|
-
multipleOf?: number;
|
|
22
|
-
maximum?: number;
|
|
23
|
-
exclusiveMaximum?: boolean;
|
|
24
|
-
minimum?: number;
|
|
25
|
-
exclusiveMinimum?: boolean;
|
|
26
|
-
maxLength?: number;
|
|
27
|
-
minLength?: number;
|
|
28
|
-
pattern?: string;
|
|
29
|
-
additionalProperties?: boolean | ReferenceObject | SchemaObject;
|
|
30
|
-
maxItems?: number;
|
|
31
|
-
minItems?: number;
|
|
32
|
-
uniqueItems?: boolean;
|
|
33
|
-
maxProperties?: number;
|
|
34
|
-
minProperties?: number;
|
|
35
|
-
required?: string[];
|
|
36
|
-
enum?: Any[];
|
|
37
|
-
properties?: {
|
|
38
|
-
[name: string]: ReferenceObject | SchemaObject;
|
|
39
|
-
};
|
|
40
|
-
allOf?: (ReferenceObject | SchemaObject)[];
|
|
41
|
-
oneOf?: (ReferenceObject | SchemaObject)[];
|
|
42
|
-
anyOf?: (ReferenceObject | SchemaObject)[];
|
|
43
|
-
not?: ReferenceObject | SchemaObject;
|
|
44
|
-
nullable?: boolean;
|
|
45
|
-
discriminator?: DiscriminatorObject;
|
|
46
|
-
readOnly?: boolean;
|
|
47
|
-
writeOnly?: boolean;
|
|
48
|
-
xml?: XMLObject;
|
|
49
|
-
externalDocs?: ExternalDocumentationObject;
|
|
50
|
-
example?: Any;
|
|
51
|
-
deprecated?: boolean;
|
|
52
|
-
}
|
|
53
|
-
interface DiscriminatorObject {
|
|
54
|
-
propertyName: string;
|
|
55
|
-
mapping?: {
|
|
56
|
-
[value: string]: string;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
interface XMLObject {
|
|
60
|
-
name?: string;
|
|
61
|
-
namespace?: string;
|
|
62
|
-
prefix?: string;
|
|
63
|
-
attribute?: boolean;
|
|
64
|
-
wrapped?: boolean;
|
|
65
|
-
}
|
|
66
|
-
interface ReferenceObject {
|
|
67
|
-
$ref: string;
|
|
68
|
-
}
|
|
69
|
-
declare function resolveAllOf(schema: SchemaObject): SchemaObject;
|
|
70
|
-
declare function clamp(value: number, min: number, max: number): number;
|
|
71
|
-
declare function take<T>(array: T[], n?: number): T[];
|
|
72
|
-
export declare function jsonSchema<T>(schema: SchemaObject): any;
|
package/lib/dev/mock.d.mts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import http, { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import { StringDecoder } from 'node:string_decoder';
|
|
3
|
-
import { URL } from 'node:url';
|
|
4
|
-
import { directoryExists, ink, print } from '@moneko/utils';
|
|
5
|
-
import { watch } from 'chokidar';
|
|
6
|
-
import { merge } from 'webpack-merge';
|
|
7
|
-
import log from '../commom/log.mjs';
|
|
8
|
-
import matchPath from '../commom/match-path.mjs';
|
|
9
|
-
import printLog, { METHOD_COLOR } from '../commom/print-log.mjs';
|
|
10
|
-
import require from '../commom/require.mjs';
|
|
11
|
-
import { jsonSchema } from './json-schema.mjs';
|
|
12
|
-
declare function shouldHaveBody(req: IncomingMessage);
|
|
13
|
-
export declare function cacheBody(req: RequestFormData & {
|
|
14
|
-
_bodyCached?: boolean;
|
|
15
|
-
_dataChunks?: Uint8Array[];
|
|
16
|
-
});
|
|
17
|
-
declare function parseBody(chunks: Uint8Array[], contentType: string);
|
|
18
|
-
declare async function getRequestBody(req: IncomingMessage & {
|
|
19
|
-
_dataChunks?: Uint8Array[];
|
|
20
|
-
});
|
|
21
|
-
export interface RequestFormData extends IncomingMessage {
|
|
22
|
-
files?: {
|
|
23
|
-
fieldname: string;
|
|
24
|
-
originalname: string;
|
|
25
|
-
encoding: string;
|
|
26
|
-
mimetype: string;
|
|
27
|
-
buffer: Buffer;
|
|
28
|
-
size: number;
|
|
29
|
-
}[];
|
|
30
|
-
params?: Record<string, string>;
|
|
31
|
-
query?: Record<string, string>;
|
|
32
|
-
body?: Promise<BodyInit | null>;
|
|
33
|
-
}
|
|
34
|
-
export interface MockServerResponse extends ServerResponse<IncomingMessage> {
|
|
35
|
-
req: IncomingMessage;
|
|
36
|
-
send<T>(chunk: T): ReturnType<ServerResponse<IncomingMessage>['end']>;
|
|
37
|
-
}
|
|
38
|
-
export type ProxyFuncType = (req: RequestFormData, res: MockServerResponse) => void | Promise<void>;
|
|
39
|
-
export type MockConfiguration = Record<string, ProxyFuncType | Record<string, any> | null>;
|
|
40
|
-
declare function clearProxy(iproxy: MockConfiguration, path: string, old: MockConfiguration);
|
|
41
|
-
export type YApiOptionBySchema = {
|
|
42
|
-
host: string;
|
|
43
|
-
id: string;
|
|
44
|
-
token: string;
|
|
45
|
-
};
|
|
46
|
-
type Any = any;
|
|
47
|
-
export declare const yApiSchemaMock: <T extends Any>(option: YApiOptionBySchema, data?: T) => Promise<T>;
|
|
48
|
-
export type YApiOption = {
|
|
49
|
-
host: string;
|
|
50
|
-
projectId: number;
|
|
51
|
-
pathRewrite: string;
|
|
52
|
-
};
|
|
53
|
-
export declare const yApiMock: (req: RequestFormData, yapi: YApiOption) => Promise<Any>;
|
|
54
|
-
export interface MockPluginOptions {
|
|
55
|
-
directory: string;
|
|
56
|
-
}
|
|
57
|
-
export declare const oldMock: MockConfiguration;
|
|
58
|
-
export declare let nextMock: MockConfiguration;
|
|
59
|
-
export declare function containMockUrl(url: string): string | undefined;
|
|
60
|
-
declare const setupMock: (options: MockPluginOptions) => any;
|
|
61
|
-
export default setupMock;
|
package/lib/dev/proxy.d.mts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IncomingMessage, request as httpRequest, ServerResponse } from 'node:http';
|
|
2
|
-
import { request as httpsRequest } from 'node:https';
|
|
3
|
-
import { URL } from 'node:url';
|
|
4
|
-
import log from '../commom/log.mjs';
|
|
5
|
-
import { containMockUrl } from './mock.mjs';
|
|
6
|
-
type ProxyItem = {
|
|
7
|
-
target: string;
|
|
8
|
-
changeOrigin?: boolean;
|
|
9
|
-
secure?: boolean;
|
|
10
|
-
ws?: boolean;
|
|
11
|
-
pathRewrite?: Record<string, string>;
|
|
12
|
-
headers?: Record<string, string>;
|
|
13
|
-
};
|
|
14
|
-
export type ProxyConfig = Record<string, string | ProxyItem>;
|
|
15
|
-
type IServerResponse = ServerResponse<IncomingMessage> & {
|
|
16
|
-
req: IncomingMessage;
|
|
17
|
-
};
|
|
18
|
-
declare function getNormalConfig(target: string): ProxyItem;
|
|
19
|
-
export declare async function setupProxy(req: IncomingMessage, res: IServerResponse, proxyConfig: ProxyConfig): Promise<IServerResponse | false>;
|
package/lib/dev/server.d.mts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { createReadStream, existsSync } from 'node:fs';
|
|
2
|
-
import { createServer, type IncomingMessage, type Server as HttpServer, type ServerResponse } from 'node:http';
|
|
3
|
-
import { createServer as createHttpsServer, type Server as HttpsServer } from 'node:https';
|
|
4
|
-
import { extname, join } from 'node:path';
|
|
5
|
-
import type { OutputFileSystem } from 'webpack';
|
|
6
|
-
import mime from '../commom/mime.mjs';
|
|
7
|
-
import open from '../commom/open.mjs';
|
|
8
|
-
import paths from '../commom/paths.mjs';
|
|
9
|
-
import { CONFIG } from '../config.mjs';
|
|
10
|
-
import getCert, { type CertOption } from '../dev/get-cert.mjs';
|
|
11
|
-
import { setupProxy } from '../dev/proxy.mjs';
|
|
12
|
-
import setupMock, { cacheBody } from './mock.mjs';
|
|
13
|
-
export type FileSystem = OutputFileSystem & {
|
|
14
|
-
existsSync: typeof existsSync;
|
|
15
|
-
createReadStream: typeof createReadStream;
|
|
16
|
-
};
|
|
17
|
-
declare const normalHeaders: Record<string, string>;
|
|
18
|
-
type HttpServerResponse = ServerResponse<IncomingMessage> & {
|
|
19
|
-
req: IncomingMessage;
|
|
20
|
-
};
|
|
21
|
-
interface ServerOption {
|
|
22
|
-
port: number;
|
|
23
|
-
root_dir: string;
|
|
24
|
-
fileSystem: FileSystem;
|
|
25
|
-
onRequest?(req: IncomingMessage, res: HttpServerResponse): boolean | void;
|
|
26
|
-
headers?: Record<string, string>;
|
|
27
|
-
basename?: string;
|
|
28
|
-
https?: CertOption | boolean;
|
|
29
|
-
host: string;
|
|
30
|
-
open?: boolean;
|
|
31
|
-
}
|
|
32
|
-
export type Server = HttpServer | HttpsServer;
|
|
33
|
-
declare async function server(option: ServerOption);
|
|
34
|
-
export default server;
|
package/lib/dev.d.mts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { exec, spawn } from 'node:child_process';
|
|
2
|
-
import { watchFile } from 'node:fs';
|
|
3
|
-
import { join, relative } from 'node:path';
|
|
4
|
-
import process from 'node:process';
|
|
5
|
-
import { URL } from 'node:url';
|
|
6
|
-
import { ink, print, println, progressBar } from '@moneko/utils';
|
|
7
|
-
import webpack, { type Compiler, type OutputFileSystem, type Watching, type WebpackPluginInstance } from 'webpack';
|
|
8
|
-
import hotMiddleware, { type ClientOptions } from 'webpack-hot-middleware';
|
|
9
|
-
import { merge } from 'webpack-merge';
|
|
10
|
-
import { diffObject } from './commom/diff-object.mjs';
|
|
11
|
-
import paths, { config_files } from './commom/paths.mjs';
|
|
12
|
-
import sigintExit from './commom/sigint-exit.mjs';
|
|
13
|
-
import { devLog, getServerAddress, PORT } from './dev/config.mjs';
|
|
14
|
-
import generateProgressHtml, { type CompliationProcess } from './dev/generate-progress-html.mjs';
|
|
15
|
-
import server, { type FileSystem, type Server } from './dev/server.mjs';
|
|
16
|
-
import reslove from './options/reslove.mjs';
|
|
17
|
-
import { ESLintPlugin } from './plugin/eslint.mjs';
|
|
18
|
-
import { generateManifest } from './plugin/manifest.mjs';
|
|
19
|
-
import { StylelintPlugin } from './plugin/stylelint.mjs';
|
|
20
|
-
import { empty } from './utils/index.mjs';
|
|
21
|
-
import { commonConfig } from './common.mjs';
|
|
22
|
-
import { CONFIG, getConfig } from './config.mjs';
|
|
23
|
-
import { outputFileSystem } from './file-system.mjs';
|
|
24
|
-
import type { ConfigType } from './index.mjs';
|
|
25
|
-
import moduleConfig from './module.config.mjs';
|
|
26
|
-
import { isLibrary, isReact, refresh } from './process-env.mjs';
|
|
27
|
-
type WebpackPlugin = new(opt?: object) => WebpackPluginInstance;
|
|
28
|
-
declare let isInitialBuildDone: boolean;
|
|
29
|
-
declare const progressApi: string;
|
|
30
|
-
declare const compilationProgress: CompliationProcess;
|
|
31
|
-
declare const hmrPath: string;
|
|
32
|
-
declare const clientParams: ClientOptions;
|
|
33
|
-
declare const hotParams: string;
|
|
34
|
-
declare const clientOption: webpack.Configuration;
|
|
35
|
-
declare function getLintFiles(exts: string[]);
|
|
36
|
-
declare const compiler: Compiler | null;
|
|
37
|
-
declare const watching: Watching;
|
|
38
|
-
declare const hotUrl: string;
|
|
39
|
-
declare const hot: ReturnType<typeof hotMiddleware>;
|
|
40
|
-
declare const manifestUrl: string | false;
|
|
41
|
-
declare const app: Server;
|
|
42
|
-
declare function exit();
|
|
43
|
-
declare const _prev: ConfigType[];
|
|
44
|
-
declare let prev: ConfigType;
|
|
45
|
-
declare function watchConfig(filepath: string);
|
|
46
|
-
declare function restart();
|
|
47
|
-
declare const isWindow: boolean;
|
|
48
|
-
declare function killPort(port: number);
|
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,22 +0,0 @@
|
|
|
1
|
-
import { type Expression, type ModuleItem, parse, print, type TaggedTemplateExpression, type TemplateElement, type TemplateLiteral } from '@swc/core';
|
|
2
|
-
import { compile, type Element } from 'stylis';
|
|
3
|
-
import type { LoaderContext } from 'webpack';
|
|
4
|
-
import log from '../commom/log.mjs';
|
|
5
|
-
export interface CssInJsMinifyOption {
|
|
6
|
-
moduleName: string;
|
|
7
|
-
allowFuncs: string[];
|
|
8
|
-
}
|
|
9
|
-
declare function haveSameLocation(element1: Element, element2: Element);
|
|
10
|
-
declare function isAutoInsertedRule(element: Element);
|
|
11
|
-
declare function toInputTree(elements: Element[], tree: Element[]);
|
|
12
|
-
declare function stringifyTree(elements: Element[]);
|
|
13
|
-
declare function getDynamicMatches(str: string);
|
|
14
|
-
declare function interleave(strings: (ITemplateElement | Expression)[], interpolations: Expression[]);
|
|
15
|
-
declare function createRawStringFromTemplateLiteral(template: TemplateLiteral);
|
|
16
|
-
interface ITemplateElement extends Omit<TemplateElement, 'type'> {
|
|
17
|
-
type: 'iTemplateElement';
|
|
18
|
-
}
|
|
19
|
-
declare function createTemplateElement(raw: string): ITemplateElement;
|
|
20
|
-
declare function replacePlaceholdersWithExpressions(str: string, expressions: Expression[]);
|
|
21
|
-
declare function transform(expression: TaggedTemplateExpression, names: string[]);
|
|
22
|
-
export default async function cssInJsMinifyLoader(this: LoaderContext<CssInJsMinifyOption>, sourceCode: string);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { LoaderContext } from 'webpack';
|
|
2
|
-
import type { LightningCssLoaderOption } from './loader.cjs';
|
|
3
|
-
import { camelCase, dashesCamelCase, normalizeSourceMapForRuntime } from './utils.cjs';
|
|
4
|
-
export interface CssImport {
|
|
5
|
-
icss?: boolean;
|
|
6
|
-
importName: string;
|
|
7
|
-
url: string;
|
|
8
|
-
type?: 'url' | string;
|
|
9
|
-
index?: number;
|
|
10
|
-
}
|
|
11
|
-
export interface CssExport {
|
|
12
|
-
name: string;
|
|
13
|
-
value: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ApiParam {
|
|
16
|
-
url?: string;
|
|
17
|
-
importName?: string;
|
|
18
|
-
layer?: string;
|
|
19
|
-
supports?: string;
|
|
20
|
-
media?: string;
|
|
21
|
-
dedupe?: boolean;
|
|
22
|
-
index?: number;
|
|
23
|
-
}
|
|
24
|
-
export interface ApiReplacement {
|
|
25
|
-
replacementName: string;
|
|
26
|
-
localName?: string;
|
|
27
|
-
importName: string;
|
|
28
|
-
needQuotes?: boolean;
|
|
29
|
-
hash?: string;
|
|
30
|
-
}
|
|
31
|
-
export declare function getImportCode(imports: CssImport[], options: LightningCssLoaderOption);
|
|
32
|
-
export declare function getModuleCode(result: {
|
|
33
|
-
map: void | Uint8Array;
|
|
34
|
-
css: string;
|
|
35
|
-
}, api: ApiParam[], replacements: ApiReplacement[], options: LightningCssLoaderOption, loaderContext: LoaderContext<LightningCssLoaderOption>);
|
|
36
|
-
export declare function getExportCode(exports: CssExport[], replacements: ApiReplacement[], options: LightningCssLoaderOption);
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type CustomAtRules, transform as _transform, type TransformOptions, type Url, type Visitor } from 'lightningcss';
|
|
2
|
-
import type { LoaderContext } from 'webpack';
|
|
3
|
-
import log from '../../commom/log.mjs';
|
|
4
|
-
import { IS_WINDOW } from '../../process-env.mjs';
|
|
5
|
-
import { type ApiParam, type ApiReplacement, type CssExport, type CssImport, getExportCode, getImportCode, getModuleCode } from './codegen.cjs';
|
|
6
|
-
import { getFilter, getPreRequester, isDataUrl, isUrlRequestable, requestify, resolveRequests } from './utils.cjs';
|
|
7
|
-
declare function stringifyRequest(loaderContext: LoaderContext<unknown>, request: string);
|
|
8
|
-
declare const encoder: TextEncoder;
|
|
9
|
-
declare function createUrlAndImportVisitor(visitorOptions: {
|
|
10
|
-
urlHandler(url: string): string;
|
|
11
|
-
urlFilter(...args: (string | undefined)[]): unknown;
|
|
12
|
-
importFilter(...args: unknown[]): unknown;
|
|
13
|
-
context: string;
|
|
14
|
-
}, apis: ApiParam[], imports: CssImport[], replacements: ApiReplacement[], replacedUrls: Map<number, string>, replacedImportUrls: Map<number, string>): Visitor<CustomAtRules>;
|
|
15
|
-
declare function createIcssVisitor({ apis, imports, replacements, replacedUrls, urlHandler }: {
|
|
16
|
-
apis: ApiParam[];
|
|
17
|
-
imports: CssImport[];
|
|
18
|
-
replacements: ApiReplacement[];
|
|
19
|
-
replacedUrls: Map<number, string>;
|
|
20
|
-
urlHandler: (url: string) => string;
|
|
21
|
-
}): Visitor<CustomAtRules>;
|
|
22
|
-
type ExportLocalsConvention = 'asIs' | 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly' | ((name: string) => string);
|
|
23
|
-
type Mode = 'local' | 'global' | 'pure' | 'icss' | ((resourcePath: string, resourceQuery: string, resourceFragment: string) => 'local' | 'global' | 'pure' | 'icss');
|
|
24
|
-
export interface LightningCssLoaderOption extends Omit<TransformOptions<CustomAtRules>, 'filename' | 'code' | 'inputSourceMap'> {
|
|
25
|
-
rem?: boolean;
|
|
26
|
-
implementation?: typeof import('lightningcss');
|
|
27
|
-
esModule?: boolean;
|
|
28
|
-
modules?: {
|
|
29
|
-
auto?(path: string): boolean;
|
|
30
|
-
localIdentName?: string;
|
|
31
|
-
exportOnlyLocals?: boolean;
|
|
32
|
-
getJSON?(params: {
|
|
33
|
-
resourcePath: string;
|
|
34
|
-
exports: {
|
|
35
|
-
name: string;
|
|
36
|
-
value: string;
|
|
37
|
-
}[];
|
|
38
|
-
}): void;
|
|
39
|
-
namedExport?: boolean;
|
|
40
|
-
exportLocalsConvention?: ExportLocalsConvention;
|
|
41
|
-
mode?: Mode;
|
|
42
|
-
};
|
|
43
|
-
importLoaders?: number;
|
|
44
|
-
url?: string;
|
|
45
|
-
import?(...args: unknown[]): boolean;
|
|
46
|
-
}
|
|
47
|
-
declare const normalVisitor: Visitor<CustomAtRules>;
|
|
48
|
-
declare const LOADER_NAME: string;
|
|
49
|
-
export default async function LightningCssLoader(this: LoaderContext<LightningCssLoaderOption>, source: string, prevMap?: string);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type Url = {
|
|
2
|
-
__esModule?: boolean;
|
|
3
|
-
default: string;
|
|
4
|
-
type?: string;
|
|
5
|
-
data?: number[];
|
|
6
|
-
};
|
|
7
|
-
declare function uint8ArrayToBase64(numberArray: number[]);
|
|
8
|
-
declare function numberArrayToHex(buffer: number[], start?: number);
|
|
9
|
-
declare function getMimeType(buffer: number[]);
|