@rsdoctor/core 2.0.0-alpha.1 → 2.0.0-alpha.2
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/dist/26.js +26163 -0
- package/dist/630.js +1269 -0
- package/dist/630.js.LICENSE.txt +7 -0
- package/dist/build-utils/build/chunks/assetsModules.d.ts +7 -1
- package/dist/build-utils/build/loader/probeLoader.d.ts +7 -2
- package/dist/build-utils/build/utils/parseBundle.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1725 -7
- package/dist/inner-plugins/constants.d.ts +1 -1
- package/dist/inner-plugins/plugins/base.d.ts +2 -2
- package/dist/logger.d.ts +2 -2
- package/dist/probe-loader.js +2 -0
- package/dist/proxy-loader.d.ts +1 -0
- package/dist/proxy-loader.js +48 -0
- package/dist/rslib-runtime.js +28 -0
- package/dist/rspack-plugin/constants.d.ts +1 -1
- package/dist/rules/rules/ecma-version-check/htmlParserStub.d.ts +3 -0
- package/dist/rules/rules/ecma-version-check/types.d.ts +13 -2
- package/dist/sdk/server/apis/base.d.ts +1 -1
- package/dist/sdk/server/socket/api.d.ts +1 -1
- package/dist/sdk/utils/date.d.ts +1 -0
- package/dist/types/loader.d.ts +1 -1
- package/package.json +20 -113
- package/dist/build-utils/build/chunks/assetsModules.js +0 -9
- package/dist/build-utils/build/chunks/index.js +0 -3
- package/dist/build-utils/build/chunks/rspack/transform.js +0 -44
- package/dist/build-utils/build/envinfo.js +0 -60
- package/dist/build-utils/build/file/cache.js +0 -24
- package/dist/build-utils/build/file/index.js +0 -5
- package/dist/build-utils/build/file/sharding.js +0 -38
- package/dist/build-utils/build/index.js +0 -12
- package/dist/build-utils/build/json.js +0 -67
- package/dist/build-utils/build/loader/index.js +0 -3
- package/dist/build-utils/build/loader/probeLoader.js +0 -44
- package/dist/build-utils/build/loader/probeLoaderPlugin.js +0 -32
- package/dist/build-utils/build/module-graph/index.js +0 -2
- package/dist/build-utils/build/module-graph/parser.js +0 -13
- package/dist/build-utils/build/module-graph/rspack/transform.js +0 -111
- package/dist/build-utils/build/module-graph/utils.js +0 -60
- package/dist/build-utils/build/process.js +0 -18
- package/dist/build-utils/build/server.js +0 -107
- package/dist/build-utils/build/utils/index.js +0 -4
- package/dist/build-utils/build/utils/loader.js +0 -267
- package/dist/build-utils/build/utils/parseBundle.js +0 -238
- package/dist/build-utils/build/utils/plugin.js +0 -21
- package/dist/build-utils/index.js +0 -13
- package/dist/collection.d.ts +0 -1
- package/dist/collection.js +0 -2
- package/dist/common/file.js +0 -8
- package/dist/common/global-config.js +0 -33
- package/dist/common/index.d.ts +0 -4
- package/dist/common/index.js +0 -6
- package/dist/common-browser.d.ts +0 -1
- package/dist/common-browser.js +0 -2
- package/dist/error/error.js +0 -143
- package/dist/error/index.js +0 -3
- package/dist/error/transform.js +0 -138
- package/dist/error/utils.js +0 -23
- package/dist/graph/index.d.ts +0 -1
- package/dist/graph/index.js +0 -2
- package/dist/inner-plugins/constants.js +0 -19
- package/dist/inner-plugins/index.js +0 -3
- package/dist/inner-plugins/loaders/proxy.js +0 -65
- package/dist/inner-plugins/plugins/base.js +0 -20
- package/dist/inner-plugins/plugins/bundle.js +0 -63
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.js +0 -74
- package/dist/inner-plugins/plugins/errors.js +0 -65
- package/dist/inner-plugins/plugins/index.js +0 -11
- package/dist/inner-plugins/plugins/loader.js +0 -108
- package/dist/inner-plugins/plugins/plugins.js +0 -40
- package/dist/inner-plugins/plugins/progress.js +0 -35
- package/dist/inner-plugins/plugins/resolver.js +0 -57
- package/dist/inner-plugins/plugins/rspack.js +0 -99
- package/dist/inner-plugins/plugins/rules.js +0 -64
- package/dist/inner-plugins/plugins/sourcemapTool.js +0 -230
- package/dist/inner-plugins/plugins/summary.js +0 -92
- package/dist/inner-plugins/utils/circleDetect.js +0 -16
- package/dist/inner-plugins/utils/config.js +0 -141
- package/dist/inner-plugins/utils/index.js +0 -8
- package/dist/inner-plugins/utils/loader.js +0 -134
- package/dist/inner-plugins/utils/normalize-config.js +0 -77
- package/dist/inner-plugins/utils/openBrowser.js +0 -55
- package/dist/inner-plugins/utils/plugin-common.js +0 -94
- package/dist/inner-plugins/utils/plugin.js +0 -70
- package/dist/inner-plugins/utils/sdk.js +0 -19
- package/dist/logger.js +0 -51
- package/dist/rspack-plugin/constants.js +0 -23
- package/dist/rspack-plugin/index.js +0 -3
- package/dist/rspack-plugin/multiple.js +0 -39
- package/dist/rspack-plugin/plugin.js +0 -133
- package/dist/rule-utils/document/document.js +0 -46
- package/dist/rule-utils/document/index.js +0 -4
- package/dist/rule-utils/document/server.js +0 -13
- package/dist/rule-utils/document/types.js +0 -1
- package/dist/rule-utils/index.js +0 -3
- package/dist/rule-utils/parser/asserts.js +0 -105
- package/dist/rule-utils/parser/index.js +0 -5
- package/dist/rule-utils/parser/parser.js +0 -24
- package/dist/rule-utils/parser/types.js +0 -8
- package/dist/rule-utils/parser/utils.js +0 -106
- package/dist/rules/index.js +0 -4
- package/dist/rules/linter.js +0 -36
- package/dist/rules/rule.js +0 -101
- package/dist/rules/rules/cjs-require/index.js +0 -50
- package/dist/rules/rules/cjs-require/types.js +0 -1
- package/dist/rules/rules/cross-chunks-package/index.js +0 -41
- package/dist/rules/rules/cross-chunks-package/types.js +0 -1
- package/dist/rules/rules/cross-chunks-package/utils.js +0 -7
- package/dist/rules/rules/default-import-check/index.js +0 -83
- package/dist/rules/rules/default-import-check/types.js +0 -1
- package/dist/rules/rules/default-import-check/utils.js +0 -52
- package/dist/rules/rules/duplicate-package/index.js +0 -39
- package/dist/rules/rules/duplicate-package/types.js +0 -24
- package/dist/rules/rules/duplicate-package/utils.js +0 -38
- package/dist/rules/rules/ecma-version-check/index.js +0 -53
- package/dist/rules/rules/ecma-version-check/types.js +0 -1
- package/dist/rules/rules/ecma-version-check/utils.js +0 -6
- package/dist/rules/rules/esm-resolved-to-cjs/index.js +0 -193
- package/dist/rules/rules/esm-resolved-to-cjs/types.js +0 -1
- package/dist/rules/rules/index.js +0 -22
- package/dist/rules/rules/loader-performance-optimization/index.js +0 -86
- package/dist/rules/rules/loader-performance-optimization/types.js +0 -1
- package/dist/rules/rules/loader-performance-optimization/utils.js +0 -10
- package/dist/rules/rules/module-mixed-chunks/index.js +0 -52
- package/dist/rules/rules/module-mixed-chunks/types.js +0 -1
- package/dist/rules/rules/side-effects-only-imports/index.js +0 -81
- package/dist/rules/rules/side-effects-only-imports/types.js +0 -1
- package/dist/rules/utils.js +0 -10
- package/dist/sdk/index.js +0 -3
- package/dist/sdk/multiple/controller.js +0 -42
- package/dist/sdk/multiple/index.js +0 -3
- package/dist/sdk/multiple/primary.js +0 -64
- package/dist/sdk/multiple/server.js +0 -14
- package/dist/sdk/sdk/core.js +0 -163
- package/dist/sdk/sdk/index.js +0 -435
- package/dist/sdk/sdk/types.js +0 -1
- package/dist/sdk/server/apis/alerts.js +0 -30
- package/dist/sdk/server/apis/base.js +0 -22
- package/dist/sdk/server/apis/bundle-diff.js +0 -51
- package/dist/sdk/server/apis/data.js +0 -44
- package/dist/sdk/server/apis/fs.js +0 -28
- package/dist/sdk/server/apis/graph.js +0 -116
- package/dist/sdk/server/apis/index.js +0 -11
- package/dist/sdk/server/apis/loader.js +0 -120
- package/dist/sdk/server/apis/plugin.js +0 -39
- package/dist/sdk/server/apis/project.js +0 -59
- package/dist/sdk/server/apis/renderer.js +0 -33
- package/dist/sdk/server/apis/resolver.js +0 -38
- package/dist/sdk/server/client.js +0 -8
- package/dist/sdk/server/fakeServer.js +0 -12
- package/dist/sdk/server/index.js +0 -292
- package/dist/sdk/server/json-body.js +0 -150
- package/dist/sdk/server/router.js +0 -83
- package/dist/sdk/server/security.js +0 -47
- package/dist/sdk/server/socket/api.js +0 -22
- package/dist/sdk/server/socket/index.js +0 -166
- package/dist/sdk/server/utils.js +0 -19
- package/dist/sdk/utils/base.js +0 -22
- package/dist/sdk/utils/constant.js +0 -4
- package/dist/sdk/utils/index.js +0 -4
- package/dist/sdk/utils/openBrowser.js +0 -53
- package/dist/sdk/utils/upload.js +0 -6
- package/dist/sdk.js +0 -2
- package/dist/types/index.js +0 -4
- package/dist/types/loader.js +0 -1
- package/dist/types/plugin.js +0 -1
- package/dist/types/rules.js +0 -1
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import "node:module";
|
|
2
|
-
import { SDK } from "@rsdoctor/shared/types";
|
|
3
|
-
import ws, { WebSocketServer } from "ws";
|
|
4
|
-
import { SocketAPILoader } from "./api.js";
|
|
5
|
-
import { isAllowedRequestHost } from "../security.js";
|
|
6
|
-
function isAllowedSocketToken(url, token) {
|
|
7
|
-
if (!url) return false;
|
|
8
|
-
return new URL(url, 'http://localhost').searchParams.get('token') === token;
|
|
9
|
-
}
|
|
10
|
-
class Socket {
|
|
11
|
-
bootstrap() {
|
|
12
|
-
this.server = new WebSocketServer({
|
|
13
|
-
server: this.options.server,
|
|
14
|
-
verifyClient: ({ req })=>{
|
|
15
|
-
const host = req.headers.host || req.headers[':authority'];
|
|
16
|
-
return isAllowedRequestHost(host) && isAllowedSocketToken(req.url, this.options.token);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
this.server.on('connection', (client)=>{
|
|
20
|
-
this.attachClient(client);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
attachClient(client) {
|
|
24
|
-
this.clients.add(client);
|
|
25
|
-
if ('function' == typeof client.on) {
|
|
26
|
-
client.on('message', (message)=>{
|
|
27
|
-
this.handleClientMessage(message.toString(), client);
|
|
28
|
-
});
|
|
29
|
-
client.on('close', ()=>{
|
|
30
|
-
this.clients.delete(client);
|
|
31
|
-
this.removeClientSubscriptions(client);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
async handleClientMessage(raw, client) {
|
|
36
|
-
let message;
|
|
37
|
-
try {
|
|
38
|
-
message = JSON.parse(raw);
|
|
39
|
-
} catch {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
if (!message.api || !Object.values(SDK.ServerAPI.API).includes(message.api)) return;
|
|
43
|
-
if ('request' === message.type) return void await this.handleAPIRequestMessage(message, client);
|
|
44
|
-
if ('subscribe' === message.type) return void this.saveRequestToMap(message.api, message.body ?? null, client);
|
|
45
|
-
if ('unsubscribe' === message.type) this.removeRequestFromMap(message.api, message.body ?? null, client);
|
|
46
|
-
}
|
|
47
|
-
async handleAPIRequestMessage(message, client) {
|
|
48
|
-
if (!message.id || !client || client.readyState !== ws.OPEN) return;
|
|
49
|
-
try {
|
|
50
|
-
const response = await this.getAPIResponse(message.api, message.body);
|
|
51
|
-
client.send(JSON.stringify({
|
|
52
|
-
type: 'response',
|
|
53
|
-
id: message.id,
|
|
54
|
-
payload: response.res
|
|
55
|
-
}));
|
|
56
|
-
} catch (err) {
|
|
57
|
-
client.send(JSON.stringify({
|
|
58
|
-
type: 'response',
|
|
59
|
-
id: message.id,
|
|
60
|
-
error: err instanceof Error ? err.message : String(err)
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
getSubscriptions() {
|
|
65
|
-
return [
|
|
66
|
-
...this.map.values()
|
|
67
|
-
].map(({ api, body })=>({
|
|
68
|
-
api,
|
|
69
|
-
body
|
|
70
|
-
}));
|
|
71
|
-
}
|
|
72
|
-
saveRequestToMap(api, body = null, client) {
|
|
73
|
-
const key = this.getSubscriptionKey(api, body);
|
|
74
|
-
if (client) {
|
|
75
|
-
if (!this.clientSubscriptions.has(client)) this.clientSubscriptions.set(client, new Set());
|
|
76
|
-
const subscriptions = this.clientSubscriptions.get(client);
|
|
77
|
-
if (subscriptions.has(key)) return;
|
|
78
|
-
subscriptions.add(key);
|
|
79
|
-
}
|
|
80
|
-
const record = this.map.get(key);
|
|
81
|
-
if (record) {
|
|
82
|
-
record.count += 1;
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
this.map.set(key, {
|
|
86
|
-
api,
|
|
87
|
-
body,
|
|
88
|
-
count: 1
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
removeRequestFromMap(api, body = null, client) {
|
|
92
|
-
const key = this.getSubscriptionKey(api, body);
|
|
93
|
-
if (client) {
|
|
94
|
-
const subscriptions = this.clientSubscriptions.get(client);
|
|
95
|
-
if (!subscriptions?.has(key)) return;
|
|
96
|
-
subscriptions.delete(key);
|
|
97
|
-
if (0 === subscriptions.size) this.clientSubscriptions.delete(client);
|
|
98
|
-
}
|
|
99
|
-
this.removeSubscriptionKey(key);
|
|
100
|
-
}
|
|
101
|
-
removeClientSubscriptions(client) {
|
|
102
|
-
const subscriptions = this.clientSubscriptions.get(client);
|
|
103
|
-
if (!subscriptions) return;
|
|
104
|
-
subscriptions.forEach((key)=>this.removeSubscriptionKey(key));
|
|
105
|
-
this.clientSubscriptions.delete(client);
|
|
106
|
-
}
|
|
107
|
-
removeSubscriptionKey(key) {
|
|
108
|
-
const record = this.map.get(key);
|
|
109
|
-
if (!record) return;
|
|
110
|
-
record.count -= 1;
|
|
111
|
-
if (record.count <= 0) this.map.delete(key);
|
|
112
|
-
}
|
|
113
|
-
getSubscriptionKey(api, body) {
|
|
114
|
-
return `${api}:${JSON.stringify(body ?? null)}`;
|
|
115
|
-
}
|
|
116
|
-
async getAPIResponse(api, body) {
|
|
117
|
-
const data = await this.loader.loadAPIData(api, body);
|
|
118
|
-
const response = {
|
|
119
|
-
req: {
|
|
120
|
-
api,
|
|
121
|
-
body
|
|
122
|
-
},
|
|
123
|
-
res: data
|
|
124
|
-
};
|
|
125
|
-
return response;
|
|
126
|
-
}
|
|
127
|
-
async broadcast() {
|
|
128
|
-
clearImmediate(this.timer);
|
|
129
|
-
this.timer = setImmediate(async ()=>{
|
|
130
|
-
const promises = [];
|
|
131
|
-
this.map.forEach(({ api, body })=>{
|
|
132
|
-
promises.push((async ()=>{
|
|
133
|
-
const res = await this.getAPIResponse(api, body);
|
|
134
|
-
this.sendAPIData(api, res);
|
|
135
|
-
})());
|
|
136
|
-
});
|
|
137
|
-
await Promise.all(promises);
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
sendAPIData(api, payload) {
|
|
141
|
-
const message = JSON.stringify({
|
|
142
|
-
api,
|
|
143
|
-
payload
|
|
144
|
-
});
|
|
145
|
-
this.clients.forEach((client)=>{
|
|
146
|
-
if (client.readyState === ws.OPEN) client.send(message);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
dispose() {
|
|
150
|
-
this.clients.forEach((client)=>{
|
|
151
|
-
client.close();
|
|
152
|
-
});
|
|
153
|
-
this.clients.clear();
|
|
154
|
-
this.server?.close();
|
|
155
|
-
}
|
|
156
|
-
constructor(options){
|
|
157
|
-
this.options = options;
|
|
158
|
-
this.clients = new Set();
|
|
159
|
-
this.map = new Map();
|
|
160
|
-
this.clientSubscriptions = new Map();
|
|
161
|
-
this.loader = new SocketAPILoader({
|
|
162
|
-
sdk: options.sdk
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
export { Socket };
|
package/dist/sdk/server/utils.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import "node:module";
|
|
2
|
-
import os from "os";
|
|
3
|
-
function getDataByPagination(data, pagination) {
|
|
4
|
-
const { page = 1, pageSize = 1000 } = pagination;
|
|
5
|
-
return {
|
|
6
|
-
data: data.slice((page - 1) * pageSize, page * pageSize),
|
|
7
|
-
pagination: {
|
|
8
|
-
page,
|
|
9
|
-
pageSize,
|
|
10
|
-
hasNextPage: page <= 0 ? false : page * pageSize < data.length
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
function getLocalIpAddress() {
|
|
15
|
-
const interfaces = os.networkInterfaces();
|
|
16
|
-
for (const iface of Object.values(interfaces))for (const alias of iface)if ('IPv4' === alias.family && !alias.internal) return alias.address;
|
|
17
|
-
return '127.0.0.1';
|
|
18
|
-
}
|
|
19
|
-
export { getDataByPagination, getLocalIpAddress };
|
package/dist/sdk/utils/base.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import "node:module";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import fs from "fs";
|
|
4
|
-
function findRoot(startDir = process.cwd()) {
|
|
5
|
-
let dir = startDir;
|
|
6
|
-
let firstPkgDir = null;
|
|
7
|
-
while(dir !== path.parse(dir).root){
|
|
8
|
-
if (fs.existsSync(path.join(dir, 'pnpm-workspace.yaml'))) return dir;
|
|
9
|
-
if (fs.existsSync(path.join(dir, 'yarn.lock'))) return dir;
|
|
10
|
-
if (fs.existsSync(path.join(dir, 'lerna.json'))) return dir;
|
|
11
|
-
const pkgPath = path.join(dir, 'package.json');
|
|
12
|
-
if (fs.existsSync(pkgPath)) {
|
|
13
|
-
if (!firstPkgDir) firstPkgDir = dir;
|
|
14
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
15
|
-
if (pkg.workspaces) return dir;
|
|
16
|
-
}
|
|
17
|
-
dir = path.dirname(dir);
|
|
18
|
-
}
|
|
19
|
-
if (firstPkgDir) return firstPkgDir;
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
export { findRoot };
|
package/dist/sdk/utils/index.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import "node:module";
|
|
2
|
-
import { exec } from "node:child_process";
|
|
3
|
-
import { promisify } from "node:util";
|
|
4
|
-
import { logger } from "../../logger.js";
|
|
5
|
-
import { join } from "node:path";
|
|
6
|
-
const execAsync = promisify(exec);
|
|
7
|
-
const supportedChromiumBrowsers = [
|
|
8
|
-
'Google Chrome Canary',
|
|
9
|
-
'Google Chrome Dev',
|
|
10
|
-
'Google Chrome Beta',
|
|
11
|
-
'Google Chrome',
|
|
12
|
-
'Microsoft Edge',
|
|
13
|
-
'Brave Browser',
|
|
14
|
-
'Vivaldi',
|
|
15
|
-
'Chromium'
|
|
16
|
-
];
|
|
17
|
-
const getTargetBrowser = async ()=>{
|
|
18
|
-
let targetBrowser = process.env.BROWSER;
|
|
19
|
-
if (!targetBrowser || !supportedChromiumBrowsers.includes(targetBrowser)) {
|
|
20
|
-
const { stdout: ps } = await execAsync('ps cax');
|
|
21
|
-
targetBrowser = supportedChromiumBrowsers.find((b)=>ps.includes(b));
|
|
22
|
-
}
|
|
23
|
-
return targetBrowser;
|
|
24
|
-
};
|
|
25
|
-
const openWithDefaultBrowser = async (url)=>{
|
|
26
|
-
try {
|
|
27
|
-
const { default: open } = await import("open");
|
|
28
|
-
await open(url);
|
|
29
|
-
return true;
|
|
30
|
-
} catch (err) {
|
|
31
|
-
logger.error('Failed to open Rsdoctor URL.');
|
|
32
|
-
logger.error(err);
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
async function openBrowser(url, needEncodeURI = true) {
|
|
37
|
-
const shouldTryOpenChromeWithAppleScript = 'darwin' === process.platform;
|
|
38
|
-
if (shouldTryOpenChromeWithAppleScript) try {
|
|
39
|
-
const targetBrowser = await getTargetBrowser();
|
|
40
|
-
if (targetBrowser) {
|
|
41
|
-
await execAsync(`osascript openChrome.applescript "${needEncodeURI ? encodeURI(url) : url}" "${targetBrowser}"`, {
|
|
42
|
-
cwd: join(__dirname, '../static')
|
|
43
|
-
});
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
logger.debug('Failed to find the target browser.');
|
|
47
|
-
} catch (err) {
|
|
48
|
-
logger.debug("Failed to open Rsdoctor URL with apple script.");
|
|
49
|
-
logger.debug(err);
|
|
50
|
-
}
|
|
51
|
-
return openWithDefaultBrowser(url);
|
|
52
|
-
}
|
|
53
|
-
export { openBrowser };
|
package/dist/sdk/utils/upload.js
DELETED
package/dist/sdk.js
DELETED
package/dist/types/index.js
DELETED
package/dist/types/loader.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "node:module";
|
package/dist/types/plugin.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "node:module";
|
package/dist/types/rules.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "node:module";
|