@4399ywkf/core 4.0.84 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/cli/index.js +2180 -0
  2. package/dist/cli/index.js.map +1 -0
  3. package/dist/config/index.d.ts +37 -0
  4. package/dist/config/index.js +143 -0
  5. package/dist/config/index.js.map +1 -0
  6. package/dist/index.d.ts +496 -6
  7. package/dist/index.js +3671 -49
  8. package/dist/index.js.map +1 -0
  9. package/dist/plugin/index.d.ts +110 -0
  10. package/dist/plugin/index.js +277 -0
  11. package/dist/plugin/index.js.map +1 -0
  12. package/dist/router/index.d.ts +126 -0
  13. package/dist/router/index.js +390 -0
  14. package/dist/router/index.js.map +1 -0
  15. package/dist/rspack/index.d.ts +29 -0
  16. package/dist/rspack/index.js +1574 -0
  17. package/dist/rspack/index.js.map +1 -0
  18. package/dist/runtime/index.d.ts +120 -0
  19. package/dist/runtime/index.js +406 -0
  20. package/dist/runtime/index.js.map +1 -0
  21. package/dist/schema-BuqmN_ra.d.ts +390 -0
  22. package/dist/types-BZV_2QtD.d.ts +97 -0
  23. package/package.json +88 -37
  24. package/README.md +0 -3
  25. package/compiled/dotenv/LICENSE +0 -23
  26. package/compiled/dotenv/index.js +0 -1
  27. package/compiled/dotenv/lib/main.d.ts +0 -73
  28. package/compiled/dotenv/package.json +0 -1
  29. package/compiled/dotenv/types/index.d.ts +0 -59
  30. package/compiled/dotenv-expand/LICENSE +0 -24
  31. package/compiled/dotenv-expand/index.js +0 -1
  32. package/compiled/dotenv-expand/lib/main.d.ts +0 -29
  33. package/compiled/dotenv-expand/package.json +0 -1
  34. package/compiled/just-diff/LICENSE +0 -21
  35. package/compiled/just-diff/index.d.ts +0 -20
  36. package/compiled/just-diff/index.js +0 -1
  37. package/compiled/just-diff/package.json +0 -1
  38. package/dist/config/config.d.ts +0 -62
  39. package/dist/config/config.js +0 -240
  40. package/dist/config/utils.d.ts +0 -8
  41. package/dist/config/utils.js +0 -40
  42. package/dist/constants.d.ts +0 -9
  43. package/dist/constants.js +0 -45
  44. package/dist/route/defineRoutes.d.ts +0 -1
  45. package/dist/route/defineRoutes.js +0 -61
  46. package/dist/route/route.d.ts +0 -3
  47. package/dist/route/route.js +0 -27
  48. package/dist/route/routeUtils.d.ts +0 -8
  49. package/dist/route/routeUtils.js +0 -46
  50. package/dist/route/routesConfig.d.ts +0 -6
  51. package/dist/route/routesConfig.js +0 -125
  52. package/dist/route/routesConvention.d.ts +0 -5
  53. package/dist/route/routesConvention.js +0 -88
  54. package/dist/route/utils.d.ts +0 -8
  55. package/dist/route/utils.js +0 -59
  56. package/dist/service/command.d.ts +0 -30
  57. package/dist/service/command.js +0 -39
  58. package/dist/service/env.d.ts +0 -4
  59. package/dist/service/env.js +0 -47
  60. package/dist/service/generatePlugin.d.ts +0 -4
  61. package/dist/service/generatePlugin.js +0 -102
  62. package/dist/service/generator.d.ts +0 -71
  63. package/dist/service/generator.js +0 -40
  64. package/dist/service/hook.d.ts +0 -16
  65. package/dist/service/hook.js +0 -52
  66. package/dist/service/path.d.ts +0 -15
  67. package/dist/service/path.js +0 -55
  68. package/dist/service/plugin.d.ts +0 -61
  69. package/dist/service/plugin.js +0 -174
  70. package/dist/service/pluginAPI.d.ts +0 -49
  71. package/dist/service/pluginAPI.js +0 -233
  72. package/dist/service/service.d.ts +0 -147
  73. package/dist/service/service.js +0 -544
  74. package/dist/service/servicePlugin.d.ts +0 -3
  75. package/dist/service/servicePlugin.js +0 -37
  76. package/dist/service/telemetry.d.ts +0 -32
  77. package/dist/service/telemetry.js +0 -127
  78. package/dist/service/utils.d.ts +0 -2
  79. package/dist/service/utils.js +0 -36
  80. package/dist/types.d.ts +0 -116
  81. package/dist/types.js +0 -77
@@ -1,71 +0,0 @@
1
- import { generateFile } from '@4399ywkf/utils';
2
- import { Plugin } from './plugin';
3
- export declare enum GeneratorType {
4
- generate = "generate",
5
- enable = "enable"
6
- }
7
- type IGeneratorOptsWithoutEnableCheck = {
8
- key: string;
9
- name: string;
10
- description: string;
11
- type: GeneratorType.generate;
12
- fn: {
13
- (opts: {
14
- args: any;
15
- generateFile: typeof generateFile;
16
- updatePackageJSON: {
17
- (opts: {
18
- opts: object;
19
- cwd?: string;
20
- }): void;
21
- };
22
- installDeps: {
23
- (opts: {
24
- opts: {
25
- devDependencies?: string[];
26
- dependencies?: string[];
27
- };
28
- cwd?: string;
29
- }): void;
30
- };
31
- }): void;
32
- };
33
- plugin: Plugin;
34
- };
35
- type IGeneratorOptsWithEnableCheck = {
36
- key: string;
37
- name: string;
38
- description: string;
39
- type: GeneratorType.enable;
40
- checkEnable: {
41
- (opts: {
42
- args: any;
43
- }): boolean;
44
- };
45
- disabledDescription: string | (() => string);
46
- fn: {
47
- (opts: {
48
- args: any;
49
- generateFile: typeof generateFile;
50
- updatePackageJSON: {
51
- (opts: {
52
- opts: object;
53
- cwd?: string;
54
- }): void;
55
- };
56
- installDeps: {
57
- (opts: {
58
- opts: {
59
- devDependencies?: string[];
60
- dependencies?: string[];
61
- };
62
- cwd?: string;
63
- }): void;
64
- };
65
- }): void;
66
- };
67
- plugin: Plugin;
68
- };
69
- export type Generator = IGeneratorOptsWithEnableCheck | IGeneratorOptsWithoutEnableCheck;
70
- export declare function makeGenerator<T>(opts: T): T;
71
- export {};
@@ -1,40 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/service/generator.ts
20
- var generator_exports = {};
21
- __export(generator_exports, {
22
- GeneratorType: () => GeneratorType,
23
- makeGenerator: () => makeGenerator
24
- });
25
- module.exports = __toCommonJS(generator_exports);
26
- var GeneratorType = /* @__PURE__ */ ((GeneratorType2) => {
27
- GeneratorType2["generate"] = "generate";
28
- GeneratorType2["enable"] = "enable";
29
- return GeneratorType2;
30
- })(GeneratorType || {});
31
- function makeGenerator(opts) {
32
- return {
33
- ...opts
34
- };
35
- }
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
38
- GeneratorType,
39
- makeGenerator
40
- });
@@ -1,16 +0,0 @@
1
- import { Plugin } from './plugin';
2
- export interface IOpts {
3
- plugin: Plugin;
4
- key: string;
5
- fn: Function;
6
- before?: string;
7
- stage?: number;
8
- }
9
- export declare class Hook {
10
- plugin: Plugin;
11
- key: string;
12
- fn: Function;
13
- before?: string;
14
- stage?: number;
15
- constructor(opts: IOpts);
16
- }
@@ -1,52 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/service/hook.ts
30
- var hook_exports = {};
31
- __export(hook_exports, {
32
- Hook: () => Hook
33
- });
34
- module.exports = __toCommonJS(hook_exports);
35
- var import_assert = __toESM(require("assert"));
36
- var Hook = class {
37
- constructor(opts) {
38
- (0, import_assert.default)(
39
- opts.key && opts.fn,
40
- `Invalid hook ${opts}, key and fn must supplied.`
41
- );
42
- this.plugin = opts.plugin;
43
- this.key = opts.key;
44
- this.fn = opts.fn;
45
- this.before = opts.before;
46
- this.stage = opts.stage || 0;
47
- }
48
- };
49
- // Annotate the CommonJS export names for ESM import in node:
50
- 0 && (module.exports = {
51
- Hook
52
- });
@@ -1,15 +0,0 @@
1
- import { Env } from '../types';
2
- export declare function getPaths(opts: {
3
- cwd: string;
4
- prefix: string;
5
- env: Env;
6
- }): {
7
- cwd: string;
8
- absSrcPath: string;
9
- absPagesPath: string;
10
- absApiRoutesPath: string;
11
- absTmpPath: string;
12
- absNodeModulesPath: string;
13
- absOutputPath: string;
14
- };
15
- export type Paths = ReturnType<typeof getPaths>;
@@ -1,55 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/service/path.ts
20
- var path_exports = {};
21
- __export(path_exports, {
22
- getPaths: () => getPaths
23
- });
24
- module.exports = __toCommonJS(path_exports);
25
- var import_utils = require("@4399ywkf/utils");
26
- var import_fs = require("fs");
27
- var import_path = require("path");
28
- var import_types = require("../types");
29
- function winJoin(...args) {
30
- return (0, import_utils.winPath)((0, import_path.join)(...args));
31
- }
32
- function getPaths(opts) {
33
- const cwd = opts.cwd;
34
- const src = winJoin(cwd, "src");
35
- const absSrcPath = (0, import_fs.existsSync)(src) && (0, import_fs.statSync)(src).isDirectory() ? src : cwd;
36
- const absPagesPath = winJoin(absSrcPath, "pages");
37
- const absApiRoutesPath = winJoin(absSrcPath, "api");
38
- const tmp = opts.env === import_types.Env.development ? `.${opts.prefix}` : `.${opts.prefix}-${opts.env}`;
39
- const absTmpPath = winJoin(absSrcPath, tmp);
40
- const absNodeModulesPath = winJoin(cwd, "node_modules");
41
- const absOutputPath = winJoin(cwd, "dist");
42
- return {
43
- cwd,
44
- absSrcPath,
45
- absPagesPath,
46
- absApiRoutesPath,
47
- absTmpPath,
48
- absNodeModulesPath,
49
- absOutputPath
50
- };
51
- }
52
- // Annotate the CommonJS export names for ESM import in node:
53
- 0 && (module.exports = {
54
- getPaths
55
- });
@@ -1,61 +0,0 @@
1
- import { EnableBy, Env, IPluginConfig } from '../types';
2
- type PluginType = 'plugin' | 'preset';
3
- interface IOpts {
4
- path: string;
5
- cwd: string;
6
- type: PluginType;
7
- }
8
- export interface IPluginObject {
9
- id: string;
10
- key: string;
11
- apply?: Function;
12
- config?: IPluginConfig;
13
- enableBy?: EnableBy | (() => boolean);
14
- }
15
- export declare class Plugin {
16
- private cwd;
17
- type: PluginType;
18
- path: string;
19
- id: string;
20
- key: string;
21
- apply: Function;
22
- config: IPluginConfig;
23
- time: {
24
- register?: number;
25
- hooks: Record<string, number[]>;
26
- };
27
- enableBy: EnableBy | ((opts: {
28
- userConfig: any;
29
- config: any;
30
- env: Env;
31
- }) => boolean);
32
- constructor(opts: IOpts);
33
- merge(opts: {
34
- key?: string;
35
- config?: IPluginConfig;
36
- enableBy?: any;
37
- }): void;
38
- getId(opts: {
39
- pkg: any;
40
- isPkgEntry: boolean;
41
- pkgJSONPath: string | null;
42
- }): any;
43
- getKey(opts: {
44
- pkg: any;
45
- isPkgEntry: boolean;
46
- }): string;
47
- static isPluginOrPreset(type: 'plugin' | 'preset', name: string): boolean;
48
- static stripNoneUmiScope(name: string): string;
49
- static getPluginsAndPresets(opts: {
50
- cwd: string;
51
- pkg: any;
52
- userConfig: any;
53
- plugins?: string[];
54
- presets?: string[];
55
- prefix: string;
56
- }): {
57
- presets: Plugin[];
58
- plugins: Plugin[];
59
- };
60
- }
61
- export {};
@@ -1,174 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/service/plugin.ts
30
- var plugin_exports = {};
31
- __export(plugin_exports, {
32
- Plugin: () => Plugin
33
- });
34
- module.exports = __toCommonJS(plugin_exports);
35
- var import_esbuild = __toESM(require("@4399ywkf/bundler-utils/compiled/esbuild"));
36
- var import_utils = require("@4399ywkf/utils");
37
- var import_assert = __toESM(require("assert"));
38
- var import_fs = require("fs");
39
- var import_path = require("path");
40
- var import_types = require("../types");
41
- var RE = {
42
- plugin: /^(@umijs\/|umi-)plugin-/,
43
- preset: /^(@umijs\/|umi-)preset-/
44
- };
45
- var Plugin = class {
46
- constructor(opts) {
47
- this.config = {};
48
- this.time = { hooks: {} };
49
- this.enableBy = import_types.EnableBy.register;
50
- this.type = opts.type;
51
- this.path = (0, import_utils.winPath)(opts.path);
52
- this.cwd = opts.cwd;
53
- (0, import_assert.default)(
54
- (0, import_fs.existsSync)(this.path),
55
- `Invalid ${this.type} ${this.path}, it's not exists.`
56
- );
57
- let pkg = null;
58
- let isPkgEntry = false;
59
- const pkgJSONPath = import_utils.pkgUp.pkgUpSync({ cwd: this.path });
60
- if (pkgJSONPath) {
61
- pkg = require(pkgJSONPath);
62
- isPkgEntry = (0, import_utils.winPath)((0, import_path.join)((0, import_path.dirname)(pkgJSONPath), pkg.main || "index.js")) === (0, import_utils.winPath)(this.path);
63
- }
64
- this.id = this.getId({ pkg, isPkgEntry, pkgJSONPath });
65
- this.key = this.getKey({ pkg, isPkgEntry });
66
- this.apply = () => {
67
- import_utils.register.register({
68
- implementor: import_esbuild.default,
69
- exts: [".ts", ".mjs"]
70
- });
71
- import_utils.register.clearFiles();
72
- let ret;
73
- try {
74
- ret = require(this.path);
75
- } catch (e) {
76
- throw new Error(
77
- `Register ${this.type} ${this.path} failed, since ${e.message}`,
78
- { cause: e }
79
- );
80
- } finally {
81
- import_utils.register.restore();
82
- }
83
- return ret.__esModule ? ret.default : ret;
84
- };
85
- }
86
- merge(opts) {
87
- if (opts.key)
88
- this.key = opts.key;
89
- if (opts.config)
90
- this.config = opts.config;
91
- if (opts.enableBy)
92
- this.enableBy = opts.enableBy;
93
- }
94
- getId(opts) {
95
- let id;
96
- if (opts.isPkgEntry) {
97
- id = opts.pkg.name;
98
- } else if ((0, import_utils.winPath)(this.path).startsWith((0, import_utils.winPath)(this.cwd))) {
99
- id = `./${(0, import_utils.winPath)((0, import_path.relative)(this.cwd, this.path))}`;
100
- } else if (opts.pkgJSONPath) {
101
- id = (0, import_utils.winPath)(
102
- (0, import_path.join)(opts.pkg.name, (0, import_path.relative)((0, import_path.dirname)(opts.pkgJSONPath), this.path))
103
- );
104
- } else {
105
- id = (0, import_utils.winPath)(this.path);
106
- }
107
- id = id.replace("@4399ywkf/preset-umi/lib/plugins", "@@");
108
- id = id.replace(/\.js$/, "");
109
- return id;
110
- }
111
- getKey(opts) {
112
- function nameToKey(name) {
113
- return name.split(".").map((part) => import_utils.lodash.camelCase(part)).join(".");
114
- }
115
- return nameToKey(
116
- opts.isPkgEntry ? Plugin.stripNoneUmiScope(opts.pkg.name).replace(RE[this.type], "") : (0, import_path.basename)(this.path, (0, import_path.extname)(this.path))
117
- );
118
- }
119
- static isPluginOrPreset(type, name) {
120
- return RE[type].test(Plugin.stripNoneUmiScope(name));
121
- }
122
- static stripNoneUmiScope(name) {
123
- if (name.charAt(0) === "@" && !name.startsWith("@4399ywkf/")) {
124
- name = name.split("/")[1];
125
- }
126
- return name;
127
- }
128
- static getPluginsAndPresets(opts) {
129
- function get(type) {
130
- const types = `${type}s`;
131
- return [
132
- // opts
133
- ...opts[types] || [],
134
- // env
135
- ...(process.env[`${opts.prefix}_${types}`.toUpperCase()] || "").split(",").filter(Boolean),
136
- // dependencies
137
- // ...Object.keys(opts.pkg.devDependencies || {})
138
- // .concat(Object.keys(opts.pkg.dependencies || {}))
139
- // .filter(Plugin.isPluginOrPreset.bind(null, type)),
140
- // user config
141
- ...opts.userConfig[types] || []
142
- ].map((path) => {
143
- (0, import_assert.default)(
144
- typeof path === "string",
145
- `Invalid plugin ${path}, it must be string.`
146
- );
147
- let resolved;
148
- try {
149
- resolved = import_utils.resolve.sync(path, {
150
- basedir: opts.cwd,
151
- extensions: [".tsx", ".ts", ".mjs", ".jsx", ".js"]
152
- });
153
- } catch (_e) {
154
- throw new Error(`Invalid plugin ${path}, can not be resolved.`, {
155
- cause: _e
156
- });
157
- }
158
- return new Plugin({
159
- path: resolved,
160
- type,
161
- cwd: opts.cwd
162
- });
163
- });
164
- }
165
- return {
166
- presets: get("preset"),
167
- plugins: get("plugin")
168
- };
169
- }
170
- };
171
- // Annotate the CommonJS export names for ESM import in node:
172
- 0 && (module.exports = {
173
- Plugin
174
- });
@@ -1,49 +0,0 @@
1
- import { logger } from '@4399ywkf/utils';
2
- import { EnableBy, Env, IPluginConfig } from '../types';
3
- import { IOpts as ICommandOpts } from './command';
4
- import { Generator } from './generator';
5
- import { IOpts as IHookOpts } from './hook';
6
- import { Plugin } from './plugin';
7
- import { Service } from './service';
8
- import type { IMetry } from './telemetry';
9
- type Logger = typeof logger;
10
- declare const resolveConfigModes: readonly ["strict", "loose"];
11
- export type ResolveConfigMode = (typeof resolveConfigModes)[number];
12
- type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
13
- export declare class PluginAPI {
14
- service: Service;
15
- plugin: Plugin;
16
- logger: Logger;
17
- telemetry: IMetry;
18
- constructor(opts: {
19
- service: Service;
20
- plugin: Plugin;
21
- });
22
- describe(opts: {
23
- key?: string;
24
- config?: IPluginConfig;
25
- enableBy?: EnableBy | ((enableByOpts: {
26
- userConfig: any;
27
- env: Env;
28
- }) => boolean);
29
- }): void;
30
- registerCommand(opts: Omit<ICommandOpts, 'plugin'> & {
31
- alias?: string | string[];
32
- }): void;
33
- registerGenerator(opts: DistributiveOmit<Generator, 'plugin'>): void;
34
- register(opts: Omit<IHookOpts, 'plugin'>): void;
35
- registerMethod(opts: {
36
- name: string;
37
- fn?: Function;
38
- }): void;
39
- registerPresets(source: Plugin[], presets: any[]): void;
40
- registerPlugins(source: Plugin[], plugins: any[]): void;
41
- skipPlugins(keys: string[]): void;
42
- static proxyPluginAPI(opts: {
43
- pluginAPI: PluginAPI;
44
- service: Service;
45
- serviceProps: string[];
46
- staticProps: Record<string, any>;
47
- }): PluginAPI;
48
- }
49
- export {};