@qodalis/cli-files 2.1.1 → 2.3.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.
- package/package.json +2 -2
- package/public-api.js +1 -1
- package/public-api.js.map +1 -1
- package/public-api.mjs +1 -1
- package/public-api.mjs.map +1 -1
- package/umd/index.global.js +122 -60
package/umd/index.global.js
CHANGED
|
@@ -2033,65 +2033,6 @@ var files = (() => {
|
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
2035
2035
|
};
|
|
2036
|
-
function writeColumns(context, rows, formatLeft, formatRight) {
|
|
2037
|
-
const width = Math.max(...rows.map(([left]) => left.length)) + 2;
|
|
2038
|
-
for (const [left, right] of rows) {
|
|
2039
|
-
context.writer.writeln(
|
|
2040
|
-
` ${formatLeft(left.padEnd(width))}${formatRight(right)}`
|
|
2041
|
-
);
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
function writeUsage(context, rows) {
|
|
2045
|
-
const { writer, translator } = context;
|
|
2046
|
-
writer.writeln(`\u{1F4CB} ${translator.t("cli.common.usage", "Usage:")}`);
|
|
2047
|
-
writeColumns(
|
|
2048
|
-
context,
|
|
2049
|
-
rows,
|
|
2050
|
-
(cmd) => writer.wrapInColor(
|
|
2051
|
-
cmd,
|
|
2052
|
-
"\x1B[36m"
|
|
2053
|
-
/* Cyan */
|
|
2054
|
-
),
|
|
2055
|
-
(text) => text
|
|
2056
|
-
);
|
|
2057
|
-
}
|
|
2058
|
-
function writeExamples(context, rows) {
|
|
2059
|
-
const { writer, translator } = context;
|
|
2060
|
-
writer.writeln(`\u{1F4DD} ${translator.t("cli.common.examples", "Examples:")}`);
|
|
2061
|
-
writeColumns(
|
|
2062
|
-
context,
|
|
2063
|
-
rows,
|
|
2064
|
-
(cmd) => cmd,
|
|
2065
|
-
(comment) => writer.wrapInColor(
|
|
2066
|
-
`# ${comment}`,
|
|
2067
|
-
"\x1B[32m"
|
|
2068
|
-
/* Green */
|
|
2069
|
-
)
|
|
2070
|
-
);
|
|
2071
|
-
}
|
|
2072
|
-
function writeWrapped(context, text, indent = 0) {
|
|
2073
|
-
const cols = context.terminal?.cols ?? 80;
|
|
2074
|
-
const width = Math.max(20, Math.min(cols - 1, 100) - indent);
|
|
2075
|
-
const pad = " ".repeat(indent);
|
|
2076
|
-
let line = "";
|
|
2077
|
-
for (const word of text.split(/\s+/).filter(Boolean)) {
|
|
2078
|
-
if (line && visibleLength2(line) + 1 + visibleLength2(word) > width) {
|
|
2079
|
-
context.writer.writeln(pad + line);
|
|
2080
|
-
line = word;
|
|
2081
|
-
} else {
|
|
2082
|
-
line = line ? `${line} ${word}` : word;
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
if (line) context.writer.writeln(pad + line);
|
|
2086
|
-
}
|
|
2087
|
-
function visibleLength2(text) {
|
|
2088
|
-
return text.replace(/\x1b\[[0-9;]*m/g, "").length;
|
|
2089
|
-
}
|
|
2090
|
-
var bootCliModule = async (module2) => {
|
|
2091
|
-
if (typeof window !== "undefined" && window.__cliModuleRegistry) {
|
|
2092
|
-
await window.__cliModuleRegistry.register(module2);
|
|
2093
|
-
}
|
|
2094
|
-
};
|
|
2095
2036
|
var DefaultThemes = {
|
|
2096
2037
|
default: {
|
|
2097
2038
|
background: "#070b14",
|
|
@@ -2116,6 +2057,31 @@ var files = (() => {
|
|
|
2116
2057
|
brightCyan: "#a5f3fc",
|
|
2117
2058
|
brightWhite: "#f1f5f9"
|
|
2118
2059
|
},
|
|
2060
|
+
// Soft grey paper and slate text; every color reads at 4.5:1 or more on the background
|
|
2061
|
+
light: {
|
|
2062
|
+
background: "#f7f8fa",
|
|
2063
|
+
foreground: "#334155",
|
|
2064
|
+
cursor: "#4f46e5",
|
|
2065
|
+
cursorAccent: "#f7f8fa",
|
|
2066
|
+
selectionBackground: "#d9def7",
|
|
2067
|
+
selectionForeground: "#1e293b",
|
|
2068
|
+
black: "#334155",
|
|
2069
|
+
red: "#c93c37",
|
|
2070
|
+
green: "#2c7a4b",
|
|
2071
|
+
yellow: "#946200",
|
|
2072
|
+
blue: "#3d5bd9",
|
|
2073
|
+
magenta: "#8b3fc7",
|
|
2074
|
+
cyan: "#0e7586",
|
|
2075
|
+
white: "#5b6577",
|
|
2076
|
+
brightBlack: "#667085",
|
|
2077
|
+
brightRed: "#b42a25",
|
|
2078
|
+
brightGreen: "#1f6a3d",
|
|
2079
|
+
brightYellow: "#7a5100",
|
|
2080
|
+
brightBlue: "#2f47bd",
|
|
2081
|
+
brightMagenta: "#7431ad",
|
|
2082
|
+
brightCyan: "#0a6170",
|
|
2083
|
+
brightWhite: "#1e293b"
|
|
2084
|
+
},
|
|
2119
2085
|
classic: {
|
|
2120
2086
|
background: "#0c0c0c",
|
|
2121
2087
|
foreground: "#cccccc",
|
|
@@ -2727,6 +2693,96 @@ var files = (() => {
|
|
|
2727
2693
|
}
|
|
2728
2694
|
};
|
|
2729
2695
|
DefaultThemes.yellow = DefaultThemes.highContrastLight;
|
|
2696
|
+
var CliPanelPalettes = Object.freeze({
|
|
2697
|
+
dark: Object.freeze({
|
|
2698
|
+
background: "#070b14",
|
|
2699
|
+
headerBackground: "#0f1623",
|
|
2700
|
+
border: "#1e293b",
|
|
2701
|
+
text: "#e2e8f0",
|
|
2702
|
+
textSecondary: "#94a3b8",
|
|
2703
|
+
accent: "#818cf8",
|
|
2704
|
+
hoverBackground: "rgba(129, 140, 248, 0.12)",
|
|
2705
|
+
activeBackground: "rgba(129, 140, 248, 0.22)",
|
|
2706
|
+
danger: "#f87171",
|
|
2707
|
+
shadow: "rgba(0, 0, 0, 0.45)"
|
|
2708
|
+
}),
|
|
2709
|
+
// Soft grey paper instead of pure white, slate text rather than black: easier on the eyes
|
|
2710
|
+
light: Object.freeze({
|
|
2711
|
+
background: "#f7f8fa",
|
|
2712
|
+
headerBackground: "#eceff3",
|
|
2713
|
+
border: "#d9dee6",
|
|
2714
|
+
text: "#1e293b",
|
|
2715
|
+
textSecondary: "#5b6577",
|
|
2716
|
+
accent: "#4f46e5",
|
|
2717
|
+
hoverBackground: "rgba(30, 41, 59, 0.06)",
|
|
2718
|
+
activeBackground: "rgba(79, 70, 229, 0.12)",
|
|
2719
|
+
danger: "#c93c37",
|
|
2720
|
+
shadow: "rgba(15, 23, 42, 0.12)"
|
|
2721
|
+
})
|
|
2722
|
+
});
|
|
2723
|
+
var PALETTE_TERMINALS = {
|
|
2724
|
+
dark: DefaultThemes.default,
|
|
2725
|
+
light: DefaultThemes.light
|
|
2726
|
+
};
|
|
2727
|
+
function writeColumns(context, rows, formatLeft, formatRight) {
|
|
2728
|
+
const width = Math.max(...rows.map(([left]) => left.length)) + 2;
|
|
2729
|
+
for (const [left, right] of rows) {
|
|
2730
|
+
context.writer.writeln(
|
|
2731
|
+
` ${formatLeft(left.padEnd(width))}${formatRight(right)}`
|
|
2732
|
+
);
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
function writeUsage(context, rows) {
|
|
2736
|
+
const { writer, translator } = context;
|
|
2737
|
+
writer.writeln(`\u{1F4CB} ${translator.t("cli.common.usage", "Usage:")}`);
|
|
2738
|
+
writeColumns(
|
|
2739
|
+
context,
|
|
2740
|
+
rows,
|
|
2741
|
+
(cmd) => writer.wrapInColor(
|
|
2742
|
+
cmd,
|
|
2743
|
+
"\x1B[36m"
|
|
2744
|
+
/* Cyan */
|
|
2745
|
+
),
|
|
2746
|
+
(text) => text
|
|
2747
|
+
);
|
|
2748
|
+
}
|
|
2749
|
+
function writeExamples(context, rows) {
|
|
2750
|
+
const { writer, translator } = context;
|
|
2751
|
+
writer.writeln(`\u{1F4DD} ${translator.t("cli.common.examples", "Examples:")}`);
|
|
2752
|
+
writeColumns(
|
|
2753
|
+
context,
|
|
2754
|
+
rows,
|
|
2755
|
+
(cmd) => cmd,
|
|
2756
|
+
(comment) => writer.wrapInColor(
|
|
2757
|
+
`# ${comment}`,
|
|
2758
|
+
"\x1B[32m"
|
|
2759
|
+
/* Green */
|
|
2760
|
+
)
|
|
2761
|
+
);
|
|
2762
|
+
}
|
|
2763
|
+
function writeWrapped(context, text, indent = 0) {
|
|
2764
|
+
const cols = context.terminal?.cols ?? 80;
|
|
2765
|
+
const width = Math.max(20, Math.min(cols - 1, 100) - indent);
|
|
2766
|
+
const pad = " ".repeat(indent);
|
|
2767
|
+
let line = "";
|
|
2768
|
+
for (const word of text.split(/\s+/).filter(Boolean)) {
|
|
2769
|
+
if (line && visibleLength2(line) + 1 + visibleLength2(word) > width) {
|
|
2770
|
+
context.writer.writeln(pad + line);
|
|
2771
|
+
line = word;
|
|
2772
|
+
} else {
|
|
2773
|
+
line = line ? `${line} ${word}` : word;
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
if (line) context.writer.writeln(pad + line);
|
|
2777
|
+
}
|
|
2778
|
+
function visibleLength2(text) {
|
|
2779
|
+
return text.replace(/\x1b\[[0-9;]*m/g, "").length;
|
|
2780
|
+
}
|
|
2781
|
+
var bootCliModule = async (module2) => {
|
|
2782
|
+
if (typeof window !== "undefined" && window.__cliModuleRegistry) {
|
|
2783
|
+
await window.__cliModuleRegistry.register(module2);
|
|
2784
|
+
}
|
|
2785
|
+
};
|
|
2730
2786
|
var DefaultThemeInfos = {
|
|
2731
2787
|
default: {
|
|
2732
2788
|
theme: DefaultThemes.default,
|
|
@@ -2734,6 +2790,12 @@ var files = (() => {
|
|
|
2734
2790
|
tags: ["built-in"],
|
|
2735
2791
|
description: "Dark indigo theme with soft pastels"
|
|
2736
2792
|
},
|
|
2793
|
+
light: {
|
|
2794
|
+
theme: DefaultThemes.light,
|
|
2795
|
+
category: "light",
|
|
2796
|
+
tags: ["built-in"],
|
|
2797
|
+
description: "Light counterpart of the default theme"
|
|
2798
|
+
},
|
|
2737
2799
|
classic: {
|
|
2738
2800
|
theme: DefaultThemes.classic,
|
|
2739
2801
|
category: "dark",
|
|
@@ -2905,7 +2967,7 @@ var files = (() => {
|
|
|
2905
2967
|
};
|
|
2906
2968
|
|
|
2907
2969
|
// src/lib/version.ts
|
|
2908
|
-
var LIBRARY_VERSION = "2.
|
|
2970
|
+
var LIBRARY_VERSION = "2.3.0";
|
|
2909
2971
|
var API_VERSION2 = 2;
|
|
2910
2972
|
|
|
2911
2973
|
// src/lib/interfaces/i-file-system-service.ts
|