sv 0.8.4 → 0.8.6
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/bin.js +615 -1429
- package/dist/index.js +2 -2
- package/dist/{install-CfRQUz9L.js → install-BTJ6iCTS.js} +75 -6
- package/dist/{package-manager-CZaGcCtM.js → package-manager-D3PRQ-L_.js} +1950 -2051
- package/dist/testing.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,10 +1,79 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __commonJS, __export, __toESM$1 as __toESM, be, detect, getUserAgent, log, parseJson$1, parseScript, parseScript$1, resolveCommand, serializeScript, stripAst, up, walk } from "./package-manager-D3PRQ-L_.js";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import process from "node:process";
|
|
4
|
+
import process$1 from "node:process";
|
|
5
5
|
|
|
6
|
+
//#region node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
7
|
+
var require_picocolors = __commonJS({ "node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
8
|
+
let p = process || {}, argv = p.argv || [], env$1 = p.env || {};
|
|
9
|
+
let isColorSupported = !(!!env$1.NO_COLOR || argv.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env$1.TERM !== "dumb" || !!env$1.CI);
|
|
10
|
+
let formatter = (open, close, replace = open) => (input) => {
|
|
11
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
12
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
13
|
+
};
|
|
14
|
+
let replaceClose = (string, close, replace, index) => {
|
|
15
|
+
let result = "", cursor = 0;
|
|
16
|
+
do {
|
|
17
|
+
result += string.substring(cursor, index) + replace;
|
|
18
|
+
cursor = index + close.length;
|
|
19
|
+
index = string.indexOf(close, cursor);
|
|
20
|
+
} while (~index);
|
|
21
|
+
return result + string.substring(cursor);
|
|
22
|
+
};
|
|
23
|
+
let createColors = (enabled = isColorSupported) => {
|
|
24
|
+
let f = enabled ? formatter : () => String;
|
|
25
|
+
return {
|
|
26
|
+
isColorSupported: enabled,
|
|
27
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
28
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
29
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
30
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
31
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
32
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
33
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
34
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
35
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
36
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
37
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
38
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
39
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
40
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
41
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
42
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
43
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
44
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
45
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
46
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
47
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
48
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
49
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
50
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
51
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
52
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
53
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
54
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
55
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
56
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
57
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
58
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
59
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
60
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
61
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
62
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
63
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
64
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
65
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
66
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
67
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
module.exports = createColors();
|
|
71
|
+
module.exports.createColors = createColors;
|
|
72
|
+
} });
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
6
75
|
//#region packages/cli/utils/env.ts
|
|
7
|
-
const TESTING = process.env.NODE_ENV?.toLowerCase() === "test";
|
|
76
|
+
const TESTING = process$1.env.NODE_ENV?.toLowerCase() === "test";
|
|
8
77
|
|
|
9
78
|
//#endregion
|
|
10
79
|
//#region packages/core/dist/dedent-CElkE_9E.js
|
|
@@ -90,7 +159,7 @@ else mindent = Math.min(mindent, indent);
|
|
|
90
159
|
}
|
|
91
160
|
|
|
92
161
|
//#endregion
|
|
93
|
-
//#region packages/core/dist/common-
|
|
162
|
+
//#region packages/core/dist/common-CeY_dUZD.js
|
|
94
163
|
function decircular(object) {
|
|
95
164
|
const seenObjects = new WeakMap();
|
|
96
165
|
function internalDecircular(value, path$1 = []) {
|
|
@@ -1009,7 +1078,7 @@ async function runAddon({ addon, multiple, workspace }) {
|
|
|
1009
1078
|
const { command, args } = resolveCommand(workspace.packageManager, "execute", commandArgs);
|
|
1010
1079
|
const addonPrefix = multiple ? `${addon.id}: ` : "";
|
|
1011
1080
|
const executedCommand = `${command} ${args.join(" ")}`;
|
|
1012
|
-
if (!TESTING)
|
|
1081
|
+
if (!TESTING) log.step(`${addonPrefix}Running external command ${import_picocolors.default.gray(`(${executedCommand})`)}`);
|
|
1013
1082
|
if (workspace.packageManager === "npm") args.unshift("--yes");
|
|
1014
1083
|
try {
|
|
1015
1084
|
await be(command, args, {
|
|
@@ -1060,4 +1129,4 @@ function orderAddons(addons, setupResults) {
|
|
|
1060
1129
|
}
|
|
1061
1130
|
|
|
1062
1131
|
//#endregion
|
|
1063
|
-
export { addFromString, applyAddons, array_exports, common_exports, createWorkspace, dedent_default, exports_exports, formatFiles, function_exports, getHighlighter, imports_exports, installAddon, kit_exports, object_exports, setupAddons, variables_exports };
|
|
1132
|
+
export { addFromString, applyAddons, array_exports, common_exports, createWorkspace, dedent_default, exports_exports, formatFiles, function_exports, getHighlighter, imports_exports, installAddon, kit_exports, object_exports, require_picocolors as require_picocolors$1, setupAddons, variables_exports };
|