@module-federation/cli 0.0.0-chore-bump-node-22-20260710161714
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/LICENSE +21 -0
- package/README.md +15 -0
- package/bin/mf.js +4 -0
- package/dist/LICENSE +21 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +125 -0
- package/dist/commands/dts.d.ts +2 -0
- package/dist/commands/dts.js +132 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +60 -0
- package/dist/types.d.ts +20 -0
- package/dist/types.js +29 -0
- package/dist/utils/apply-common-options.d.ts +2 -0
- package/dist/utils/apply-common-options.js +72 -0
- package/dist/utils/logger.d.ts +4 -0
- package/dist/utils/logger.js +71 -0
- package/dist/utils/prepare.d.ts +2 -0
- package/dist/utils/prepare.js +85 -0
- package/dist/utils/readConfig.d.ts +3 -0
- package/dist/utils/readConfig.js +93 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-present hanric(2heal1)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://module-federation.io/" target="blank"><img src="https://module-federation.io/module-federation.svg" alt="Module Federation 2.0" /></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# @module-federation/cli
|
|
6
|
+
|
|
7
|
+
Module Federation CLI
|
|
8
|
+
|
|
9
|
+
<p>
|
|
10
|
+
<a href="https://npmjs.com/package/@module-federation/cli">
|
|
11
|
+
<img src="https://img.shields.io/npm/v/@module-federation/cli?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
|
|
12
|
+
</a>
|
|
13
|
+
<img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
|
|
14
|
+
<a href="https://npmcharts.com/compare/@module-federation/cli?minimal=true"><img src="https://img.shields.io/npm/dm/@module-federation/cli.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
|
|
15
|
+
</p>
|
package/bin/mf.js
ADDED
package/dist/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-present hanric(2heal1)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/compat_get_default_export
|
|
13
|
+
(() => {
|
|
14
|
+
// getDefaultExport function for compatibility with non-ESM modules
|
|
15
|
+
__webpack_require__.n = (module) => {
|
|
16
|
+
var getter = module && module.__esModule ?
|
|
17
|
+
() => (module['default']) :
|
|
18
|
+
() => (module);
|
|
19
|
+
__webpack_require__.d(getter, { a: getter });
|
|
20
|
+
return getter;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
})();
|
|
24
|
+
// webpack/runtime/define_property_getters
|
|
25
|
+
(() => {
|
|
26
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
27
|
+
var define = (defs, kind) => {
|
|
28
|
+
for(var key in defs) {
|
|
29
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
30
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
// webpack/runtime/has_own_property
|
|
39
|
+
(() => {
|
|
40
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
41
|
+
})();
|
|
42
|
+
// webpack/runtime/make_namespace_object
|
|
43
|
+
(() => {
|
|
44
|
+
// define __esModule on exports
|
|
45
|
+
__webpack_require__.r = (exports) => {
|
|
46
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
}
|
|
49
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
};
|
|
51
|
+
})();
|
|
52
|
+
var __webpack_exports__ = {};
|
|
53
|
+
// ESM COMPAT FLAG
|
|
54
|
+
__webpack_require__.r(__webpack_exports__);
|
|
55
|
+
|
|
56
|
+
// EXPORTS
|
|
57
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
58
|
+
runCli: () => (/* binding */ runCli)
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
;// CONCATENATED MODULE: external "commander"
|
|
62
|
+
const external_commander_namespaceObject = require("commander");
|
|
63
|
+
;// CONCATENATED MODULE: external "./utils/apply-common-options.js"
|
|
64
|
+
const apply_common_options_js_namespaceObject = require("./utils/apply-common-options.js");
|
|
65
|
+
;// CONCATENATED MODULE: external "./commands/dts.js"
|
|
66
|
+
const dts_js_namespaceObject = require("./commands/dts.js");
|
|
67
|
+
;// CONCATENATED MODULE: external "./utils/prepare.js"
|
|
68
|
+
const prepare_js_namespaceObject = require("./utils/prepare.js");
|
|
69
|
+
;// CONCATENATED MODULE: external "./utils/logger.js"
|
|
70
|
+
const logger_js_namespaceObject = require("./utils/logger.js");
|
|
71
|
+
var logger_js_default = /*#__PURE__*/__webpack_require__.n(logger_js_namespaceObject);
|
|
72
|
+
;// CONCATENATED MODULE: external "./utils/readConfig.js"
|
|
73
|
+
const readConfig_js_namespaceObject = require("./utils/readConfig.js");
|
|
74
|
+
;// CONCATENATED MODULE: ./src/cli.ts
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
function cli(cliOptions) {
|
|
82
|
+
const { name, version, applyCommands } = cliOptions;
|
|
83
|
+
external_commander_namespaceObject.program.name(name).usage('<command> [options]').version(version);
|
|
84
|
+
const dtsCommand = external_commander_namespaceObject.program.command('dts');
|
|
85
|
+
dtsCommand.option('--root <root>', 'specify the project root directory').option('--output <output>', 'specify the generated dts output directory').option('--fetch <boolean>', 'fetch types from remote, default is true', (value)=>value === 'true', true).option('--generate <boolean>', 'generate types, default is true', (value)=>value === 'true', true);
|
|
86
|
+
(0,apply_common_options_js_namespaceObject.applyCommonOptions)(dtsCommand);
|
|
87
|
+
dtsCommand.description('generate or fetch the mf types').action(async (options)=>{
|
|
88
|
+
try {
|
|
89
|
+
await (0,dts_js_namespaceObject.dts)(options, cliOptions);
|
|
90
|
+
} catch (err) {
|
|
91
|
+
console.error(err);
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
if (typeof applyCommands === 'function') {
|
|
96
|
+
applyCommands(external_commander_namespaceObject.program, apply_common_options_js_namespaceObject.applyCommonOptions);
|
|
97
|
+
}
|
|
98
|
+
external_commander_namespaceObject.program.parse();
|
|
99
|
+
}
|
|
100
|
+
function runCli(options) {
|
|
101
|
+
const normalizedOptions = {
|
|
102
|
+
loggerPrefix: logger_js_namespaceObject.PREFIX,
|
|
103
|
+
welcomeMsg: `${`Module Federation v${"0.0.0-chore-bump-node-22-20260710161714"}`}\n`,
|
|
104
|
+
name: 'mf',
|
|
105
|
+
readConfig: readConfig_js_namespaceObject.readConfig,
|
|
106
|
+
version: "0.0.0-chore-bump-node-22-20260710161714",
|
|
107
|
+
applyCommands: ()=>{},
|
|
108
|
+
...options
|
|
109
|
+
};
|
|
110
|
+
logger_js_default().setPrefix(normalizedOptions.loggerPrefix);
|
|
111
|
+
(0,prepare_js_namespaceObject.prepareCli)(normalizedOptions);
|
|
112
|
+
try {
|
|
113
|
+
cli(normalizedOptions);
|
|
114
|
+
} catch (err) {
|
|
115
|
+
console.error(err);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
exports.runCli = __webpack_exports__.runCli;
|
|
120
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
121
|
+
if(["runCli"].indexOf(__rspack_i) === -1) {
|
|
122
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/compat_get_default_export
|
|
13
|
+
(() => {
|
|
14
|
+
// getDefaultExport function for compatibility with non-ESM modules
|
|
15
|
+
__webpack_require__.n = (module) => {
|
|
16
|
+
var getter = module && module.__esModule ?
|
|
17
|
+
() => (module['default']) :
|
|
18
|
+
() => (module);
|
|
19
|
+
__webpack_require__.d(getter, { a: getter });
|
|
20
|
+
return getter;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
})();
|
|
24
|
+
// webpack/runtime/define_property_getters
|
|
25
|
+
(() => {
|
|
26
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
27
|
+
var define = (defs, kind) => {
|
|
28
|
+
for(var key in defs) {
|
|
29
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
30
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
// webpack/runtime/has_own_property
|
|
39
|
+
(() => {
|
|
40
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
41
|
+
})();
|
|
42
|
+
// webpack/runtime/make_namespace_object
|
|
43
|
+
(() => {
|
|
44
|
+
// define __esModule on exports
|
|
45
|
+
__webpack_require__.r = (exports) => {
|
|
46
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
}
|
|
49
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
};
|
|
51
|
+
})();
|
|
52
|
+
var __webpack_exports__ = {};
|
|
53
|
+
// ESM COMPAT FLAG
|
|
54
|
+
__webpack_require__.r(__webpack_exports__);
|
|
55
|
+
|
|
56
|
+
// EXPORTS
|
|
57
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
58
|
+
dts: () => (/* binding */ dts)
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
;// CONCATENATED MODULE: external "@module-federation/dts-plugin"
|
|
62
|
+
const dts_plugin_namespaceObject = require("@module-federation/dts-plugin");
|
|
63
|
+
;// CONCATENATED MODULE: external "../utils/logger.js"
|
|
64
|
+
const logger_js_namespaceObject = require("../utils/logger.js");
|
|
65
|
+
var logger_js_default = /*#__PURE__*/__webpack_require__.n(logger_js_namespaceObject);
|
|
66
|
+
;// CONCATENATED MODULE: ./src/commands/dts.ts
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
async function dts(options, { readConfig }) {
|
|
70
|
+
const { fetch = true, generate = true, root = process.cwd(), output, config } = options;
|
|
71
|
+
const mfConfig = await readConfig(config);
|
|
72
|
+
if (!(0,dts_plugin_namespaceObject.isTSProject)(mfConfig.dts, root)) {
|
|
73
|
+
logger_js_default().error('dts is only supported for TypeScript projects');
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const normalizedDtsOptions = (0,dts_plugin_namespaceObject.normalizeDtsOptions)(mfConfig, root, {
|
|
77
|
+
defaultGenerateOptions: {
|
|
78
|
+
generateAPITypes: true,
|
|
79
|
+
compileInChildProcess: false,
|
|
80
|
+
abortOnError: true,
|
|
81
|
+
extractThirdParty: false,
|
|
82
|
+
extractRemoteTypes: false
|
|
83
|
+
},
|
|
84
|
+
defaultConsumeOptions: {
|
|
85
|
+
abortOnError: true,
|
|
86
|
+
consumeAPITypes: true
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
if (!normalizedDtsOptions) {
|
|
90
|
+
logger_js_default().error('dts is not enabled in module-federation.config.ts');
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (fetch) {
|
|
94
|
+
const dtsManagerOptions = (0,dts_plugin_namespaceObject.normalizeConsumeTypesOptions)({
|
|
95
|
+
context: root,
|
|
96
|
+
dtsOptions: normalizedDtsOptions,
|
|
97
|
+
pluginOptions: mfConfig
|
|
98
|
+
});
|
|
99
|
+
if (!dtsManagerOptions) {
|
|
100
|
+
logger_js_default().warn('dts.consumeTypes is not enabled in module-federation.config.ts, skip fetching remote types');
|
|
101
|
+
} else {
|
|
102
|
+
logger_js_default().debug('start fetching remote types...');
|
|
103
|
+
await (0,dts_plugin_namespaceObject.consumeTypesAPI)(dtsManagerOptions);
|
|
104
|
+
logger_js_default().debug('fetch remote types success!');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (generate) {
|
|
108
|
+
const dtsManagerOptions = (0,dts_plugin_namespaceObject.normalizeGenerateTypesOptions)({
|
|
109
|
+
context: root,
|
|
110
|
+
outputDir: output,
|
|
111
|
+
dtsOptions: normalizedDtsOptions,
|
|
112
|
+
pluginOptions: mfConfig
|
|
113
|
+
});
|
|
114
|
+
if (!dtsManagerOptions) {
|
|
115
|
+
logger_js_default().warn('dts.generateTypes is not enabled in module-federation.config.ts, skip generating types');
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
logger_js_default().debug('start generating types...');
|
|
119
|
+
await (0,dts_plugin_namespaceObject.generateTypesAPI)({
|
|
120
|
+
dtsManagerOptions
|
|
121
|
+
});
|
|
122
|
+
logger_js_default().debug('generate types success!');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
exports.dts = __webpack_exports__.dts;
|
|
127
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
128
|
+
if(["dts"].indexOf(__rspack_i) === -1) {
|
|
129
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { runCli } from './cli';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/define_property_getters
|
|
13
|
+
(() => {
|
|
14
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
15
|
+
var define = (defs, kind) => {
|
|
16
|
+
for(var key in defs) {
|
|
17
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
18
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
define(getters, "get");
|
|
23
|
+
define(values, "value");
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
// webpack/runtime/has_own_property
|
|
27
|
+
(() => {
|
|
28
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
29
|
+
})();
|
|
30
|
+
// webpack/runtime/make_namespace_object
|
|
31
|
+
(() => {
|
|
32
|
+
// define __esModule on exports
|
|
33
|
+
__webpack_require__.r = (exports) => {
|
|
34
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
35
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
var __webpack_exports__ = {};
|
|
41
|
+
// ESM COMPAT FLAG
|
|
42
|
+
__webpack_require__.r(__webpack_exports__);
|
|
43
|
+
|
|
44
|
+
// EXPORTS
|
|
45
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
46
|
+
runCli: () => (/* reexport */ external_cli_js_namespaceObject.runCli)
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
;// CONCATENATED MODULE: external "./cli.js"
|
|
50
|
+
const external_cli_js_namespaceObject = require("./cli.js");
|
|
51
|
+
;// CONCATENATED MODULE: ./src/index.ts
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
exports.runCli = __webpack_exports__.runCli;
|
|
55
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
56
|
+
if(["runCli"].indexOf(__rspack_i) === -1) {
|
|
57
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { moduleFederationPlugin } from '@module-federation/sdk';
|
|
3
|
+
export type CommonOptions = {
|
|
4
|
+
config?: string;
|
|
5
|
+
mode?: string;
|
|
6
|
+
};
|
|
7
|
+
export type DtsOptions = {
|
|
8
|
+
fetch?: boolean;
|
|
9
|
+
generate?: boolean;
|
|
10
|
+
root?: string;
|
|
11
|
+
output?: string;
|
|
12
|
+
} & CommonOptions;
|
|
13
|
+
export type CliOptions = {
|
|
14
|
+
welcomeMsg?: string;
|
|
15
|
+
loggerPrefix?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
version?: string;
|
|
18
|
+
readConfig?: (userConfigPath?: string) => Promise<moduleFederationPlugin.ModuleFederationPluginOptions>;
|
|
19
|
+
applyCommands?: (command: Command, applyCommonOptions: (command: Command) => void) => void;
|
|
20
|
+
};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/make_namespace_object
|
|
13
|
+
(() => {
|
|
14
|
+
// define __esModule on exports
|
|
15
|
+
__webpack_require__.r = (exports) => {
|
|
16
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
17
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
20
|
+
};
|
|
21
|
+
})();
|
|
22
|
+
var __webpack_exports__ = {};
|
|
23
|
+
__webpack_require__.r(__webpack_exports__);
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
27
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
28
|
+
}
|
|
29
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/define_property_getters
|
|
13
|
+
(() => {
|
|
14
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
15
|
+
var define = (defs, kind) => {
|
|
16
|
+
for(var key in defs) {
|
|
17
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
18
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
define(getters, "get");
|
|
23
|
+
define(values, "value");
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
// webpack/runtime/has_own_property
|
|
27
|
+
(() => {
|
|
28
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
29
|
+
})();
|
|
30
|
+
// webpack/runtime/make_namespace_object
|
|
31
|
+
(() => {
|
|
32
|
+
// define __esModule on exports
|
|
33
|
+
__webpack_require__.r = (exports) => {
|
|
34
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
35
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
var __webpack_exports__ = {};
|
|
41
|
+
__webpack_require__.r(__webpack_exports__);
|
|
42
|
+
const applyCommonOptions = (command)=>{
|
|
43
|
+
command.option('-c --config <config>', 'specify the configuration file, can be a relative or absolute path');
|
|
44
|
+
command.option('-m --mode <mode>', 'Specify the runtime environment. You can choose "dev" or "prod". The default value is "dev". After setting, the process.env.NODE_ENV environment variable will be automatically injected with "development" or "production" according to the value.', (value)=>{
|
|
45
|
+
const validChoices = {
|
|
46
|
+
dev: 'development',
|
|
47
|
+
prod: 'production'
|
|
48
|
+
};
|
|
49
|
+
if (!Object.keys(validChoices).includes(value)) {
|
|
50
|
+
throw new Error(`Invalid mode: ${value}. Valid choices are: ${Object.keys(validChoices).join(', ')}`);
|
|
51
|
+
}
|
|
52
|
+
const targetEnv = validChoices[value];
|
|
53
|
+
if (process.env.NODE_ENV !== targetEnv) {
|
|
54
|
+
console.log(`process.env.NODE_ENV is set to ${targetEnv}`);
|
|
55
|
+
}
|
|
56
|
+
process.env.NODE_ENV = targetEnv;
|
|
57
|
+
return value;
|
|
58
|
+
}, 'dev');
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
62
|
+
}, {
|
|
63
|
+
applyCommonOptions: applyCommonOptions
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
exports.applyCommonOptions = __webpack_exports__.applyCommonOptions;
|
|
67
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
68
|
+
if(["applyCommonOptions"].indexOf(__rspack_i) === -1) {
|
|
69
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/define_property_getters
|
|
13
|
+
(() => {
|
|
14
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
15
|
+
var define = (defs, kind) => {
|
|
16
|
+
for(var key in defs) {
|
|
17
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
18
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
define(getters, "get");
|
|
23
|
+
define(values, "value");
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
// webpack/runtime/has_own_property
|
|
27
|
+
(() => {
|
|
28
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
29
|
+
})();
|
|
30
|
+
// webpack/runtime/make_namespace_object
|
|
31
|
+
(() => {
|
|
32
|
+
// define __esModule on exports
|
|
33
|
+
__webpack_require__.r = (exports) => {
|
|
34
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
35
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
var __webpack_exports__ = {};
|
|
41
|
+
// ESM COMPAT FLAG
|
|
42
|
+
__webpack_require__.r(__webpack_exports__);
|
|
43
|
+
|
|
44
|
+
// EXPORTS
|
|
45
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
46
|
+
PREFIX: () => (/* binding */ PREFIX),
|
|
47
|
+
"default": () => (/* binding */ utils_logger)
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
;// CONCATENATED MODULE: external "node:util"
|
|
51
|
+
const external_node_util_namespaceObject = require("node:util");
|
|
52
|
+
;// CONCATENATED MODULE: external "@module-federation/sdk"
|
|
53
|
+
const sdk_namespaceObject = require("@module-federation/sdk");
|
|
54
|
+
;// CONCATENATED MODULE: ./src/utils/logger.ts
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
const PREFIX = '[ Module Federation CLI ]';
|
|
58
|
+
const logger = (0,sdk_namespaceObject.createLogger)((0,external_node_util_namespaceObject.styleText)([
|
|
59
|
+
'bold',
|
|
60
|
+
'cyan'
|
|
61
|
+
], PREFIX));
|
|
62
|
+
/* export default */ const utils_logger = (logger);
|
|
63
|
+
|
|
64
|
+
exports.PREFIX = __webpack_exports__.PREFIX;
|
|
65
|
+
exports["default"] = __webpack_exports__["default"];
|
|
66
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
67
|
+
if(["PREFIX","default"].indexOf(__rspack_i) === -1) {
|
|
68
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/compat_get_default_export
|
|
13
|
+
(() => {
|
|
14
|
+
// getDefaultExport function for compatibility with non-ESM modules
|
|
15
|
+
__webpack_require__.n = (module) => {
|
|
16
|
+
var getter = module && module.__esModule ?
|
|
17
|
+
() => (module['default']) :
|
|
18
|
+
() => (module);
|
|
19
|
+
__webpack_require__.d(getter, { a: getter });
|
|
20
|
+
return getter;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
})();
|
|
24
|
+
// webpack/runtime/define_property_getters
|
|
25
|
+
(() => {
|
|
26
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
27
|
+
var define = (defs, kind) => {
|
|
28
|
+
for(var key in defs) {
|
|
29
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
30
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
// webpack/runtime/has_own_property
|
|
39
|
+
(() => {
|
|
40
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
41
|
+
})();
|
|
42
|
+
// webpack/runtime/make_namespace_object
|
|
43
|
+
(() => {
|
|
44
|
+
// define __esModule on exports
|
|
45
|
+
__webpack_require__.r = (exports) => {
|
|
46
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
}
|
|
49
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
};
|
|
51
|
+
})();
|
|
52
|
+
var __webpack_exports__ = {};
|
|
53
|
+
// ESM COMPAT FLAG
|
|
54
|
+
__webpack_require__.r(__webpack_exports__);
|
|
55
|
+
|
|
56
|
+
// EXPORTS
|
|
57
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
58
|
+
prepareCli: () => (/* binding */ prepareCli)
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
;// CONCATENATED MODULE: external "./logger.js"
|
|
62
|
+
const external_logger_js_namespaceObject = require("./logger.js");
|
|
63
|
+
var external_logger_js_default = /*#__PURE__*/__webpack_require__.n(external_logger_js_namespaceObject);
|
|
64
|
+
;// CONCATENATED MODULE: ./src/utils/prepare.ts
|
|
65
|
+
|
|
66
|
+
function prepareCli({ welcomeMsg }) {
|
|
67
|
+
if (!process.env.NODE_ENV) {
|
|
68
|
+
process.env.NODE_ENV = 'development';
|
|
69
|
+
}
|
|
70
|
+
// Print a blank line to keep the greet log nice.
|
|
71
|
+
// Some package managers automatically output a blank line, some do not.
|
|
72
|
+
const { npm_execpath } = process.env;
|
|
73
|
+
if (!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) {
|
|
74
|
+
console.log();
|
|
75
|
+
}
|
|
76
|
+
external_logger_js_default().info(welcomeMsg);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
exports.prepareCli = __webpack_exports__.prepareCli;
|
|
80
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
81
|
+
if(["prepareCli"].indexOf(__rspack_i) === -1) {
|
|
82
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/compat_get_default_export
|
|
13
|
+
(() => {
|
|
14
|
+
// getDefaultExport function for compatibility with non-ESM modules
|
|
15
|
+
__webpack_require__.n = (module) => {
|
|
16
|
+
var getter = module && module.__esModule ?
|
|
17
|
+
() => (module['default']) :
|
|
18
|
+
() => (module);
|
|
19
|
+
__webpack_require__.d(getter, { a: getter });
|
|
20
|
+
return getter;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
})();
|
|
24
|
+
// webpack/runtime/define_property_getters
|
|
25
|
+
(() => {
|
|
26
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
27
|
+
var define = (defs, kind) => {
|
|
28
|
+
for(var key in defs) {
|
|
29
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
30
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
define(getters, "get");
|
|
35
|
+
define(values, "value");
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
// webpack/runtime/has_own_property
|
|
39
|
+
(() => {
|
|
40
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
41
|
+
})();
|
|
42
|
+
// webpack/runtime/make_namespace_object
|
|
43
|
+
(() => {
|
|
44
|
+
// define __esModule on exports
|
|
45
|
+
__webpack_require__.r = (exports) => {
|
|
46
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
}
|
|
49
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
};
|
|
51
|
+
})();
|
|
52
|
+
var __webpack_exports__ = {};
|
|
53
|
+
// ESM COMPAT FLAG
|
|
54
|
+
__webpack_require__.r(__webpack_exports__);
|
|
55
|
+
|
|
56
|
+
// EXPORTS
|
|
57
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
58
|
+
getConfigPath: () => (/* binding */ getConfigPath),
|
|
59
|
+
readConfig: () => (/* binding */ readConfig)
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
;// CONCATENATED MODULE: external "path"
|
|
63
|
+
const external_path_namespaceObject = require("path");
|
|
64
|
+
var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_namespaceObject);
|
|
65
|
+
;// CONCATENATED MODULE: external "jiti"
|
|
66
|
+
const external_jiti_namespaceObject = require("jiti");
|
|
67
|
+
;// CONCATENATED MODULE: ./src/utils/readConfig.ts
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
const DEFAULT_CONFIG_PATH = 'module-federation.config.ts';
|
|
71
|
+
const getConfigPath = (userConfigPath)=>{
|
|
72
|
+
const defaultPath = external_path_default().resolve(process.cwd(), DEFAULT_CONFIG_PATH);
|
|
73
|
+
const filepath = userConfigPath ?? defaultPath;
|
|
74
|
+
return external_path_default().isAbsolute(filepath) ? filepath : external_path_default().resolve(process.cwd(), filepath);
|
|
75
|
+
};
|
|
76
|
+
async function readConfig(userConfigPath) {
|
|
77
|
+
const configPath = getConfigPath(userConfigPath);
|
|
78
|
+
const jit = (0,external_jiti_namespaceObject.createJiti)(__filename, {
|
|
79
|
+
interopDefault: true
|
|
80
|
+
});
|
|
81
|
+
const configModule = await jit(configPath);
|
|
82
|
+
const resolvedConfig = configModule && typeof configModule === 'object' && 'default' in configModule ? configModule.default : configModule;
|
|
83
|
+
return resolvedConfig;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
exports.getConfigPath = __webpack_exports__.getConfigPath;
|
|
87
|
+
exports.readConfig = __webpack_exports__.readConfig;
|
|
88
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
89
|
+
if(["getConfigPath","readConfig"].indexOf(__rspack_i) === -1) {
|
|
90
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@module-federation/cli",
|
|
3
|
+
"version": "0.0.0-chore-bump-node-22-20260710161714",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"description": "Module Federation CLI",
|
|
6
|
+
"homepage": "https://module-federation.io",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/module-federation/core/issues"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/module-federation/core.git",
|
|
13
|
+
"directory": "packages/cli"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"mf": "./bin/mf.js"
|
|
17
|
+
},
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"bin"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"commander": "11.1.0",
|
|
27
|
+
"jiti": "2.4.2",
|
|
28
|
+
"@module-federation/sdk": "0.0.0-chore-bump-node-22-20260710161714",
|
|
29
|
+
"@module-federation/dts-plugin": "0.0.0-chore-bump-node-22-20260710161714"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/node": "^20.19.5",
|
|
33
|
+
"typescript": "6.0.3"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=16.0.0"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public",
|
|
40
|
+
"registry": "https://registry.npmjs.org/"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "rslib build",
|
|
44
|
+
"lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.ts\" \"package.json\"",
|
|
45
|
+
"test": "rstest",
|
|
46
|
+
"pre-release": "pnpm run test && pnpm run build"
|
|
47
|
+
}
|
|
48
|
+
}
|