@lynx-js/rspeedy-canary 0.13.0-canary-20260105-409bd50f → 0.13.0-canary-20260106-4c60674c
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/CHANGELOG.md +11 -1
- package/bin/rspeedy.js +2 -8
- package/dist/1~node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs.js +2 -2
- package/dist/1~src_cli_build_ts.js +2 -3
- package/dist/1~src_cli_commands_ts.js +2 -2
- package/dist/1~src_cli_dev_ts.js +2 -3
- package/dist/1~src_cli_init_ts-src_create-rspeedy_ts.js +4 -4
- package/dist/1~src_cli_inspect_ts.js +1 -2
- package/dist/1~src_cli_preview_ts.js +2 -3
- package/dist/1~src_config_validate_ts.js +1 -1
- package/dist/1~src_plugins_api_plugin_ts.js +1 -1
- package/dist/1~src_plugins_dev_plugin_ts.js +2 -2
- package/dist/1~src_plugins_index_ts.js +1 -1
- package/dist/1~src_plugins_inspect_plugin_ts.js +2 -2
- package/dist/1~src_plugins_minify_plugin_ts.js +1 -1
- package/dist/1~src_plugins_rsdoctor_plugin_ts.js +1 -1
- package/dist/1~src_version_ts.js +1 -1
- package/dist/src_cli_main_ts.js +89 -3
- package/package.json +1 -1
- package/dist/cli/start.js +0 -57
- package/dist/node_url.js +0 -1
- package/dist/src_debug_ts.js +0 -93
- /package/dist/{node_fs.js → 1~node_fs.js} +0 -0
- /package/dist/{node_path.js → 1~node_path.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
-
## 0.13.0-canary-
|
|
3
|
+
## 0.13.0-canary-20260106061017-4c60674c8ef9917bcbf1e26ecb9a50c07f335ef1
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
7
|
- Bump Rsbuild v1.7.1 with Rspack v1.7.0. ([#2088](https://github.com/lynx-family/lynx-stack/pull/2088))
|
|
8
8
|
|
|
9
|
+
- **BREAKING CHANGE**: Remove the CLI version selector and the `--unmanaged` flag. ([#2093](https://github.com/lynx-family/lynx-stack/pull/2093))
|
|
10
|
+
|
|
11
|
+
Rspeedy will no longer automatically attempt to use the locally installed version when the CLI is invoked.
|
|
12
|
+
|
|
13
|
+
Please uninstall your globally installed version of Rspeedy:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm uninstall -g @lynx-js/rspeedy
|
|
17
|
+
```
|
|
18
|
+
|
|
9
19
|
## 0.12.5
|
|
10
20
|
|
|
11
21
|
### Patch Changes
|
package/bin/rspeedy.js
CHANGED
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
// @ts-check
|
|
7
7
|
import nodeModule from 'node:module'
|
|
8
8
|
|
|
9
|
-
import { tryStartLocalRspeedy } from '../dist/cli/start.js'
|
|
10
|
-
|
|
11
9
|
// See: https://nodejs.org/id/blog/release/v22.8.0
|
|
12
10
|
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
|
13
11
|
const { enableCompileCache } = nodeModule
|
|
@@ -25,9 +23,5 @@ try {
|
|
|
25
23
|
// ignore error
|
|
26
24
|
}
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const { main } = await import('../dist/cli/main.js')
|
|
31
|
-
|
|
32
|
-
await main(process.argv)
|
|
33
|
-
}
|
|
26
|
+
const { main } = await import('../dist/cli/main.js')
|
|
27
|
+
await main(process.argv)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as __rspack_external_node_child_process_27f17141 from "node:child_process";
|
|
2
2
|
import * as __rspack_external_node_events_0a6aefe7 from "node:events";
|
|
3
3
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
4
|
-
import "./node_path.js";
|
|
5
|
-
import "./node_fs.js";
|
|
4
|
+
import "./1~node_path.js";
|
|
5
|
+
import "./1~node_fs.js";
|
|
6
6
|
import "./src_cli_main_ts.js";
|
|
7
7
|
__webpack_require__.add({
|
|
8
8
|
"node:child_process" (module) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
|
-
import "./node_path.js";
|
|
3
|
-
import { logger } from "./
|
|
4
|
-
import { exit_exit } from "./src_cli_main_ts.js";
|
|
2
|
+
import "./1~node_path.js";
|
|
3
|
+
import { logger, exit_exit } from "./src_cli_main_ts.js";
|
|
5
4
|
import { createRspeedy, init } from "./1~src_cli_init_ts-src_create-rspeedy_ts.js";
|
|
6
5
|
import { isCI } from "./1~src_utils_is-ci_ts.js";
|
|
7
6
|
import { watchFiles, getWatchedFiles } from "./1~src_cli_watch_ts.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
|
-
import "./node_path.js";
|
|
2
|
+
import "./1~node_path.js";
|
|
3
3
|
import { version } from "./1~src_version_ts.js";
|
|
4
4
|
const external_node_path_ = __webpack_require__("node:path");
|
|
5
5
|
function applyCommonOptions(command) {
|
|
@@ -11,7 +11,7 @@ function resolveRoot(cwd, root) {
|
|
|
11
11
|
}
|
|
12
12
|
function apply(program) {
|
|
13
13
|
const cwd = process.cwd();
|
|
14
|
-
program.name('rspeedy').usage('<command> [options]').version(version).
|
|
14
|
+
program.name('rspeedy').usage('<command> [options]').version(version).showHelpAfterError(true).showSuggestionAfterError(true).exitOverride();
|
|
15
15
|
const buildCommand = program.command('build');
|
|
16
16
|
buildCommand.description('Build the project in production mode').option('--environment <name...>', 'specify the name of environment to build').option('--watch', 'Enable watch mode to automatically rebuild on file changes').action(async (buildOptions)=>{
|
|
17
17
|
const actualRoot = resolveRoot(cwd, buildOptions.root);
|
package/dist/1~src_cli_dev_ts.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
|
-
import "./node_path.js";
|
|
3
|
-
import { logger } from "./
|
|
2
|
+
import "./1~node_path.js";
|
|
3
|
+
import { logger, exit_exit } from "./src_cli_main_ts.js";
|
|
4
4
|
import { createRspeedy, init } from "./1~src_cli_init_ts-src_create-rspeedy_ts.js";
|
|
5
|
-
import { exit_exit } from "./src_cli_main_ts.js";
|
|
6
5
|
import { watchFiles, getWatchedFiles } from "./1~src_cli_watch_ts.js";
|
|
7
6
|
const external_node_path_ = __webpack_require__("node:path");
|
|
8
7
|
const picocolors = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
2
3
|
import { register } from "#register";
|
|
3
|
-
import "./node_path.js";
|
|
4
|
-
import "./node_fs.js";
|
|
5
|
-
import { debug, isDebug, createRsbuild, mergeRsbuildConfig, debugList } from "./
|
|
6
|
-
import { pathToFileURL } from "./node_url.js";
|
|
4
|
+
import "./1~node_path.js";
|
|
5
|
+
import "./1~node_fs.js";
|
|
6
|
+
import { debug, isDebug, createRsbuild, mergeRsbuildConfig, debugList } from "./src_cli_main_ts.js";
|
|
7
7
|
function applyDefaultRspeedyConfig(config) {
|
|
8
8
|
const enableChunkSplitting = config.performance?.chunkSplit?.strategy && config.performance?.chunkSplit?.strategy !== 'all-in-one';
|
|
9
9
|
return mergeRsbuildConfig({
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { logger } from "./
|
|
2
|
-
import { exit_exit } from "./src_cli_main_ts.js";
|
|
1
|
+
import { logger, exit_exit } from "./src_cli_main_ts.js";
|
|
3
2
|
import { createRspeedy, init } from "./1~src_cli_init_ts-src_create-rspeedy_ts.js";
|
|
4
3
|
async function inspect(cwd, inspectOptions) {
|
|
5
4
|
try {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
|
-
import "./node_fs.js";
|
|
3
|
-
import { logger } from "./
|
|
4
|
-
import { exit_exit } from "./src_cli_main_ts.js";
|
|
2
|
+
import "./1~node_fs.js";
|
|
3
|
+
import { logger, exit_exit } from "./src_cli_main_ts.js";
|
|
5
4
|
import { createRspeedy, init } from "./1~src_cli_init_ts-src_create-rspeedy_ts.js";
|
|
6
5
|
const external_node_fs_ = __webpack_require__("node:fs");
|
|
7
6
|
const picocolors = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
|
-
import "./
|
|
2
|
+
import "./src_cli_main_ts.js";
|
|
3
3
|
__webpack_require__.add({
|
|
4
4
|
"../../../node_modules/.pnpm/typia@10.1.0_typescript@5.9.3/node_modules/typia/lib/internal/_accessExpressionAsString.js" (__unused_rspack_module, exports) {
|
|
5
5
|
exports._accessExpressionAsString = void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
|
-
import "./node_path.js";
|
|
4
|
-
import { debug, logger } from "./
|
|
3
|
+
import "./1~node_path.js";
|
|
4
|
+
import { debug, logger } from "./src_cli_main_ts.js";
|
|
5
5
|
function isLynx(environment) {
|
|
6
6
|
const environmentName = 'string' == typeof environment ? environment : environment.name;
|
|
7
7
|
return 'lynx' === environmentName || environmentName.startsWith('lynx-');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { debug, isDebug } from "./
|
|
1
|
+
import { debug, isDebug } from "./src_cli_main_ts.js";
|
|
2
2
|
async function applyDebugPlugins(rsbuildInstance, config) {
|
|
3
3
|
const debugPlugins = Object.freeze([
|
|
4
4
|
import("./1~src_plugins_emitOnErrors_plugin_ts.js").then((mod)=>({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
2
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
|
-
import "./node_path.js";
|
|
4
|
-
import { debug, logger } from "./
|
|
3
|
+
import "./1~node_path.js";
|
|
4
|
+
import { debug, logger } from "./src_cli_main_ts.js";
|
|
5
5
|
import { DEFAULT_DIST_PATH_INTERMEDIATE } from "./1~src_config_output_dist-path_ts.js";
|
|
6
6
|
__webpack_require__.add({
|
|
7
7
|
"../../../node_modules/.pnpm/javascript-stringify@2.1.0/node_modules/javascript-stringify/dist/array.js" (__unused_rspack_module, exports) {
|
package/dist/1~src_version_ts.js
CHANGED
package/dist/src_cli_main_ts.js
CHANGED
|
@@ -1,7 +1,73 @@
|
|
|
1
1
|
import * as __rspack_external_node_process_786449bf from "node:process";
|
|
2
2
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
3
|
-
import {
|
|
3
|
+
import { createRsbuild, logger, mergeRsbuildConfig, rspack, version as core_version } from "@rsbuild/core";
|
|
4
4
|
__webpack_require__.add({
|
|
5
|
+
"../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js" (module) {
|
|
6
|
+
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
7
|
+
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || "win32" === p.platform || (p.stdout || {}).isTTY && "dumb" !== env.TERM || !!env.CI);
|
|
8
|
+
let formatter = (open, close, replace = open)=>(input)=>{
|
|
9
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
10
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
11
|
+
};
|
|
12
|
+
let replaceClose = (string, close, replace, index)=>{
|
|
13
|
+
let result = "", cursor = 0;
|
|
14
|
+
do {
|
|
15
|
+
result += string.substring(cursor, index) + replace;
|
|
16
|
+
cursor = index + close.length;
|
|
17
|
+
index = string.indexOf(close, cursor);
|
|
18
|
+
}while (~index);
|
|
19
|
+
return result + string.substring(cursor);
|
|
20
|
+
};
|
|
21
|
+
let createColors = (enabled = isColorSupported)=>{
|
|
22
|
+
let f = enabled ? formatter : ()=>String;
|
|
23
|
+
return {
|
|
24
|
+
isColorSupported: enabled,
|
|
25
|
+
reset: f("\x1b[0m", "\x1b[0m"),
|
|
26
|
+
bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
|
|
27
|
+
dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
|
|
28
|
+
italic: f("\x1b[3m", "\x1b[23m"),
|
|
29
|
+
underline: f("\x1b[4m", "\x1b[24m"),
|
|
30
|
+
inverse: f("\x1b[7m", "\x1b[27m"),
|
|
31
|
+
hidden: f("\x1b[8m", "\x1b[28m"),
|
|
32
|
+
strikethrough: f("\x1b[9m", "\x1b[29m"),
|
|
33
|
+
black: f("\x1b[30m", "\x1b[39m"),
|
|
34
|
+
red: f("\x1b[31m", "\x1b[39m"),
|
|
35
|
+
green: f("\x1b[32m", "\x1b[39m"),
|
|
36
|
+
yellow: f("\x1b[33m", "\x1b[39m"),
|
|
37
|
+
blue: f("\x1b[34m", "\x1b[39m"),
|
|
38
|
+
magenta: f("\x1b[35m", "\x1b[39m"),
|
|
39
|
+
cyan: f("\x1b[36m", "\x1b[39m"),
|
|
40
|
+
white: f("\x1b[37m", "\x1b[39m"),
|
|
41
|
+
gray: f("\x1b[90m", "\x1b[39m"),
|
|
42
|
+
bgBlack: f("\x1b[40m", "\x1b[49m"),
|
|
43
|
+
bgRed: f("\x1b[41m", "\x1b[49m"),
|
|
44
|
+
bgGreen: f("\x1b[42m", "\x1b[49m"),
|
|
45
|
+
bgYellow: f("\x1b[43m", "\x1b[49m"),
|
|
46
|
+
bgBlue: f("\x1b[44m", "\x1b[49m"),
|
|
47
|
+
bgMagenta: f("\x1b[45m", "\x1b[49m"),
|
|
48
|
+
bgCyan: f("\x1b[46m", "\x1b[49m"),
|
|
49
|
+
bgWhite: f("\x1b[47m", "\x1b[49m"),
|
|
50
|
+
blackBright: f("\x1b[90m", "\x1b[39m"),
|
|
51
|
+
redBright: f("\x1b[91m", "\x1b[39m"),
|
|
52
|
+
greenBright: f("\x1b[92m", "\x1b[39m"),
|
|
53
|
+
yellowBright: f("\x1b[93m", "\x1b[39m"),
|
|
54
|
+
blueBright: f("\x1b[94m", "\x1b[39m"),
|
|
55
|
+
magentaBright: f("\x1b[95m", "\x1b[39m"),
|
|
56
|
+
cyanBright: f("\x1b[96m", "\x1b[39m"),
|
|
57
|
+
whiteBright: f("\x1b[97m", "\x1b[39m"),
|
|
58
|
+
bgBlackBright: f("\x1b[100m", "\x1b[49m"),
|
|
59
|
+
bgRedBright: f("\x1b[101m", "\x1b[49m"),
|
|
60
|
+
bgGreenBright: f("\x1b[102m", "\x1b[49m"),
|
|
61
|
+
bgYellowBright: f("\x1b[103m", "\x1b[49m"),
|
|
62
|
+
bgBlueBright: f("\x1b[104m", "\x1b[49m"),
|
|
63
|
+
bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
|
|
64
|
+
bgCyanBright: f("\x1b[106m", "\x1b[49m"),
|
|
65
|
+
bgWhiteBright: f("\x1b[107m", "\x1b[49m")
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
module.exports = createColors();
|
|
69
|
+
module.exports.createColors = createColors;
|
|
70
|
+
},
|
|
5
71
|
"node:process" (module) {
|
|
6
72
|
module.exports = __rspack_external_node_process_786449bf;
|
|
7
73
|
}
|
|
@@ -71,6 +137,26 @@ function gracefulExit(signal = 0) {
|
|
|
71
137
|
}
|
|
72
138
|
const picocolors = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
73
139
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
140
|
+
const isDebug = ()=>{
|
|
141
|
+
if (!process.env['DEBUG']) return false;
|
|
142
|
+
const values = process.env['DEBUG'].toLocaleLowerCase().split(',');
|
|
143
|
+
return [
|
|
144
|
+
'rsbuild',
|
|
145
|
+
'rspeedy',
|
|
146
|
+
'*'
|
|
147
|
+
].some((key)=>values.includes(key));
|
|
148
|
+
};
|
|
149
|
+
const label = picocolors_default().bgCyan('lynx');
|
|
150
|
+
const debug = (message)=>{
|
|
151
|
+
if (isDebug()) {
|
|
152
|
+
const result = 'string' == typeof message ? message : message();
|
|
153
|
+
logger.level = 'verbose';
|
|
154
|
+
logger.debug(`${label} ${result}`);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
const debugList = (prefix, messages)=>debug(()=>`${prefix} ${[
|
|
158
|
+
''
|
|
159
|
+
].concat(messages).join('\n - ')}`);
|
|
74
160
|
const start = Date.now();
|
|
75
161
|
const exitPromises = [];
|
|
76
162
|
const unsubscribe = asyncExitHook(exit_onExit, {
|
|
@@ -118,7 +204,7 @@ async function main(argv) {
|
|
|
118
204
|
if (!npm_execpath || npm_execpath.includes('npm-cli.js') || npm_execpath.includes('npx-cli.js')) console.log();
|
|
119
205
|
const { version, rsbuildVersion, rspackVersion } = await import("./1~src_version_ts.js").then((mod)=>({
|
|
120
206
|
version: mod.version,
|
|
121
|
-
rsbuildVersion: mod.
|
|
207
|
+
rsbuildVersion: mod.core_version,
|
|
122
208
|
rspackVersion: mod.rspackVersion
|
|
123
209
|
}));
|
|
124
210
|
logger.greet(` Rspeedy v${version} (Rsbuild v${rsbuildVersion}, Rspack v${rspackVersion})\n`);
|
|
@@ -146,4 +232,4 @@ async function main(argv) {
|
|
|
146
232
|
return exit_exit(1);
|
|
147
233
|
}
|
|
148
234
|
}
|
|
149
|
-
export { exit_exit, main };
|
|
235
|
+
export { core_version, createRsbuild, debug, debugList, exit_exit, isDebug, logger, main, mergeRsbuildConfig, rspack };
|
package/package.json
CHANGED
package/dist/cli/start.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { __webpack_require__ } from "../rslib-runtime.js";
|
|
2
|
-
import "../node_fs.js";
|
|
3
|
-
import "../node_path.js";
|
|
4
|
-
import { pathToFileURL } from "../node_url.js";
|
|
5
|
-
import { debug, logger } from "../src_debug_ts.js";
|
|
6
|
-
const external_node_fs_ = __webpack_require__("node:fs");
|
|
7
|
-
const external_node_path_ = __webpack_require__("node:path");
|
|
8
|
-
function tryGetPackageFolderFor(resolvedFileOrFolderPath) {
|
|
9
|
-
if (external_node_fs_.existsSync(external_node_path_.join(resolvedFileOrFolderPath, 'package.json'))) return resolvedFileOrFolderPath;
|
|
10
|
-
const parentFolder = external_node_path_.dirname(resolvedFileOrFolderPath);
|
|
11
|
-
if (!parentFolder || parentFolder === resolvedFileOrFolderPath) return;
|
|
12
|
-
return tryGetPackageFolderFor(parentFolder);
|
|
13
|
-
}
|
|
14
|
-
function tryStartLocalRspeedy(root = process.cwd()) {
|
|
15
|
-
if (process.argv.includes("--unmanaged")) {
|
|
16
|
-
logger.info(`Bypassing the Rspeedy version selector because ${JSON.stringify("--unmanaged")} was specified.`);
|
|
17
|
-
logger.info();
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
debug(`Searching for a locally installed version of Rspeedy. Use the ${JSON.stringify("--unmanaged")} flag if you want to avoid this.`);
|
|
21
|
-
const projectFolder = tryGetPackageFolderFor(root);
|
|
22
|
-
if (projectFolder) {
|
|
23
|
-
debug(`found project at ${projectFolder}`);
|
|
24
|
-
let rspeedyEntryPoint;
|
|
25
|
-
let packageJson;
|
|
26
|
-
try {
|
|
27
|
-
const packageJsonPath = external_node_path_.join(projectFolder, 'package.json');
|
|
28
|
-
const packageJsonContent = external_node_fs_.readFileSync(packageJsonPath).toString();
|
|
29
|
-
try {
|
|
30
|
-
packageJson = JSON.parse(packageJsonContent);
|
|
31
|
-
} catch (error) {
|
|
32
|
-
throw new Error(`Error parsing ${packageJsonPath}:${error.message}`);
|
|
33
|
-
}
|
|
34
|
-
if (!packageJson.dependencies?.["@lynx-js/rspeedy"] && !packageJson.devDependencies?.["@lynx-js/rspeedy"]) {
|
|
35
|
-
debug('The project does not have a dependency on Rspeedy');
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
const rspeedyFolder = external_node_path_.join(projectFolder, 'node_modules', ..."@lynx-js/rspeedy".split('/'));
|
|
39
|
-
rspeedyEntryPoint = external_node_path_.join(rspeedyFolder, 'dist', 'cli', 'main.js');
|
|
40
|
-
if (!external_node_fs_.existsSync(rspeedyEntryPoint)) {
|
|
41
|
-
debug(`Unable to find rspeedy entry point: ${rspeedyEntryPoint}, trying the legacy location.`);
|
|
42
|
-
rspeedyEntryPoint = external_node_path_.join(rspeedyFolder, 'lib', 'cli', 'main.js');
|
|
43
|
-
if (!external_node_fs_.existsSync(rspeedyEntryPoint)) {
|
|
44
|
-
debug(`Unable to find rspeedy entry point: ${rspeedyEntryPoint}, using the unmanaged version.`);
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
} catch (error) {
|
|
49
|
-
throw new Error(`Error probing for local rspeedy version: ${error.message}`);
|
|
50
|
-
}
|
|
51
|
-
debug(`found rspeedy entry point at ${rspeedyEntryPoint}`);
|
|
52
|
-
return import(pathToFileURL(rspeedyEntryPoint).toString()).then(({ main })=>main(process.argv));
|
|
53
|
-
}
|
|
54
|
-
debug(`no project folder found from ${process.cwd()}`);
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
export { tryStartLocalRspeedy };
|
package/dist/node_url.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { pathToFileURL } from "node:url";
|
package/dist/src_debug_ts.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
|
-
import { createRsbuild, logger, mergeRsbuildConfig, rspack, version } from "@rsbuild/core";
|
|
3
|
-
__webpack_require__.add({
|
|
4
|
-
"../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js" (module) {
|
|
5
|
-
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
6
|
-
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || "win32" === p.platform || (p.stdout || {}).isTTY && "dumb" !== env.TERM || !!env.CI);
|
|
7
|
-
let formatter = (open, close, replace = open)=>(input)=>{
|
|
8
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
|
9
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
10
|
-
};
|
|
11
|
-
let replaceClose = (string, close, replace, index)=>{
|
|
12
|
-
let result = "", cursor = 0;
|
|
13
|
-
do {
|
|
14
|
-
result += string.substring(cursor, index) + replace;
|
|
15
|
-
cursor = index + close.length;
|
|
16
|
-
index = string.indexOf(close, cursor);
|
|
17
|
-
}while (~index);
|
|
18
|
-
return result + string.substring(cursor);
|
|
19
|
-
};
|
|
20
|
-
let createColors = (enabled = isColorSupported)=>{
|
|
21
|
-
let f = enabled ? formatter : ()=>String;
|
|
22
|
-
return {
|
|
23
|
-
isColorSupported: enabled,
|
|
24
|
-
reset: f("\x1b[0m", "\x1b[0m"),
|
|
25
|
-
bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
|
|
26
|
-
dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
|
|
27
|
-
italic: f("\x1b[3m", "\x1b[23m"),
|
|
28
|
-
underline: f("\x1b[4m", "\x1b[24m"),
|
|
29
|
-
inverse: f("\x1b[7m", "\x1b[27m"),
|
|
30
|
-
hidden: f("\x1b[8m", "\x1b[28m"),
|
|
31
|
-
strikethrough: f("\x1b[9m", "\x1b[29m"),
|
|
32
|
-
black: f("\x1b[30m", "\x1b[39m"),
|
|
33
|
-
red: f("\x1b[31m", "\x1b[39m"),
|
|
34
|
-
green: f("\x1b[32m", "\x1b[39m"),
|
|
35
|
-
yellow: f("\x1b[33m", "\x1b[39m"),
|
|
36
|
-
blue: f("\x1b[34m", "\x1b[39m"),
|
|
37
|
-
magenta: f("\x1b[35m", "\x1b[39m"),
|
|
38
|
-
cyan: f("\x1b[36m", "\x1b[39m"),
|
|
39
|
-
white: f("\x1b[37m", "\x1b[39m"),
|
|
40
|
-
gray: f("\x1b[90m", "\x1b[39m"),
|
|
41
|
-
bgBlack: f("\x1b[40m", "\x1b[49m"),
|
|
42
|
-
bgRed: f("\x1b[41m", "\x1b[49m"),
|
|
43
|
-
bgGreen: f("\x1b[42m", "\x1b[49m"),
|
|
44
|
-
bgYellow: f("\x1b[43m", "\x1b[49m"),
|
|
45
|
-
bgBlue: f("\x1b[44m", "\x1b[49m"),
|
|
46
|
-
bgMagenta: f("\x1b[45m", "\x1b[49m"),
|
|
47
|
-
bgCyan: f("\x1b[46m", "\x1b[49m"),
|
|
48
|
-
bgWhite: f("\x1b[47m", "\x1b[49m"),
|
|
49
|
-
blackBright: f("\x1b[90m", "\x1b[39m"),
|
|
50
|
-
redBright: f("\x1b[91m", "\x1b[39m"),
|
|
51
|
-
greenBright: f("\x1b[92m", "\x1b[39m"),
|
|
52
|
-
yellowBright: f("\x1b[93m", "\x1b[39m"),
|
|
53
|
-
blueBright: f("\x1b[94m", "\x1b[39m"),
|
|
54
|
-
magentaBright: f("\x1b[95m", "\x1b[39m"),
|
|
55
|
-
cyanBright: f("\x1b[96m", "\x1b[39m"),
|
|
56
|
-
whiteBright: f("\x1b[97m", "\x1b[39m"),
|
|
57
|
-
bgBlackBright: f("\x1b[100m", "\x1b[49m"),
|
|
58
|
-
bgRedBright: f("\x1b[101m", "\x1b[49m"),
|
|
59
|
-
bgGreenBright: f("\x1b[102m", "\x1b[49m"),
|
|
60
|
-
bgYellowBright: f("\x1b[103m", "\x1b[49m"),
|
|
61
|
-
bgBlueBright: f("\x1b[104m", "\x1b[49m"),
|
|
62
|
-
bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
|
|
63
|
-
bgCyanBright: f("\x1b[106m", "\x1b[49m"),
|
|
64
|
-
bgWhiteBright: f("\x1b[107m", "\x1b[49m")
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
module.exports = createColors();
|
|
68
|
-
module.exports.createColors = createColors;
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
const picocolors = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
72
|
-
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
73
|
-
const isDebug = ()=>{
|
|
74
|
-
if (!process.env['DEBUG']) return false;
|
|
75
|
-
const values = process.env['DEBUG'].toLocaleLowerCase().split(',');
|
|
76
|
-
return [
|
|
77
|
-
'rsbuild',
|
|
78
|
-
'rspeedy',
|
|
79
|
-
'*'
|
|
80
|
-
].some((key)=>values.includes(key));
|
|
81
|
-
};
|
|
82
|
-
const label = picocolors_default().bgCyan('lynx');
|
|
83
|
-
const debug = (message)=>{
|
|
84
|
-
if (isDebug()) {
|
|
85
|
-
const result = 'string' == typeof message ? message : message();
|
|
86
|
-
logger.level = 'verbose';
|
|
87
|
-
logger.debug(`${label} ${result}`);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
const debugList = (prefix, messages)=>debug(()=>`${prefix} ${[
|
|
91
|
-
''
|
|
92
|
-
].concat(messages).join('\n - ')}`);
|
|
93
|
-
export { createRsbuild, debug, debugList, isDebug, logger, mergeRsbuildConfig, rspack, version };
|
|
File without changes
|
|
File without changes
|