@qodalis/cli-files 2.1.1 → 2.2.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 +119 -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,29 @@ var files = (() => {
|
|
|
2116
2057
|
brightCyan: "#a5f3fc",
|
|
2117
2058
|
brightWhite: "#f1f5f9"
|
|
2118
2059
|
},
|
|
2060
|
+
light: {
|
|
2061
|
+
background: "#ffffff",
|
|
2062
|
+
foreground: "#1f2937",
|
|
2063
|
+
cursor: "#4f46e5",
|
|
2064
|
+
selectionBackground: "#c7d2fe",
|
|
2065
|
+
selectionForeground: "#111827",
|
|
2066
|
+
black: "#1f2937",
|
|
2067
|
+
red: "#dc2626",
|
|
2068
|
+
green: "#15803d",
|
|
2069
|
+
yellow: "#a16207",
|
|
2070
|
+
blue: "#4f46e5",
|
|
2071
|
+
magenta: "#9333ea",
|
|
2072
|
+
cyan: "#0e7490",
|
|
2073
|
+
white: "#6b7280",
|
|
2074
|
+
brightBlack: "#6b7280",
|
|
2075
|
+
brightRed: "#b91c1c",
|
|
2076
|
+
brightGreen: "#166534",
|
|
2077
|
+
brightYellow: "#854d0e",
|
|
2078
|
+
brightBlue: "#4338ca",
|
|
2079
|
+
brightMagenta: "#7e22ce",
|
|
2080
|
+
brightCyan: "#155e75",
|
|
2081
|
+
brightWhite: "#374151"
|
|
2082
|
+
},
|
|
2119
2083
|
classic: {
|
|
2120
2084
|
background: "#0c0c0c",
|
|
2121
2085
|
foreground: "#cccccc",
|
|
@@ -2727,6 +2691,95 @@ var files = (() => {
|
|
|
2727
2691
|
}
|
|
2728
2692
|
};
|
|
2729
2693
|
DefaultThemes.yellow = DefaultThemes.highContrastLight;
|
|
2694
|
+
var CliPanelPalettes = Object.freeze({
|
|
2695
|
+
dark: Object.freeze({
|
|
2696
|
+
background: "#070b14",
|
|
2697
|
+
headerBackground: "#0f1623",
|
|
2698
|
+
border: "#1e293b",
|
|
2699
|
+
text: "#e2e8f0",
|
|
2700
|
+
textSecondary: "#94a3b8",
|
|
2701
|
+
accent: "#818cf8",
|
|
2702
|
+
hoverBackground: "rgba(129, 140, 248, 0.12)",
|
|
2703
|
+
activeBackground: "rgba(129, 140, 248, 0.22)",
|
|
2704
|
+
danger: "#f87171",
|
|
2705
|
+
shadow: "rgba(0, 0, 0, 0.45)"
|
|
2706
|
+
}),
|
|
2707
|
+
light: Object.freeze({
|
|
2708
|
+
background: "#ffffff",
|
|
2709
|
+
headerBackground: "#f8fafc",
|
|
2710
|
+
border: "#e2e8f0",
|
|
2711
|
+
text: "#0f172a",
|
|
2712
|
+
textSecondary: "#64748b",
|
|
2713
|
+
accent: "#4f46e5",
|
|
2714
|
+
hoverBackground: "rgba(79, 70, 229, 0.08)",
|
|
2715
|
+
activeBackground: "rgba(79, 70, 229, 0.14)",
|
|
2716
|
+
danger: "#dc2626",
|
|
2717
|
+
shadow: "rgba(15, 23, 42, 0.14)"
|
|
2718
|
+
})
|
|
2719
|
+
});
|
|
2720
|
+
var PALETTE_TERMINALS = {
|
|
2721
|
+
dark: DefaultThemes.default,
|
|
2722
|
+
light: DefaultThemes.light
|
|
2723
|
+
};
|
|
2724
|
+
function writeColumns(context, rows, formatLeft, formatRight) {
|
|
2725
|
+
const width = Math.max(...rows.map(([left]) => left.length)) + 2;
|
|
2726
|
+
for (const [left, right] of rows) {
|
|
2727
|
+
context.writer.writeln(
|
|
2728
|
+
` ${formatLeft(left.padEnd(width))}${formatRight(right)}`
|
|
2729
|
+
);
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
function writeUsage(context, rows) {
|
|
2733
|
+
const { writer, translator } = context;
|
|
2734
|
+
writer.writeln(`\u{1F4CB} ${translator.t("cli.common.usage", "Usage:")}`);
|
|
2735
|
+
writeColumns(
|
|
2736
|
+
context,
|
|
2737
|
+
rows,
|
|
2738
|
+
(cmd) => writer.wrapInColor(
|
|
2739
|
+
cmd,
|
|
2740
|
+
"\x1B[36m"
|
|
2741
|
+
/* Cyan */
|
|
2742
|
+
),
|
|
2743
|
+
(text) => text
|
|
2744
|
+
);
|
|
2745
|
+
}
|
|
2746
|
+
function writeExamples(context, rows) {
|
|
2747
|
+
const { writer, translator } = context;
|
|
2748
|
+
writer.writeln(`\u{1F4DD} ${translator.t("cli.common.examples", "Examples:")}`);
|
|
2749
|
+
writeColumns(
|
|
2750
|
+
context,
|
|
2751
|
+
rows,
|
|
2752
|
+
(cmd) => cmd,
|
|
2753
|
+
(comment) => writer.wrapInColor(
|
|
2754
|
+
`# ${comment}`,
|
|
2755
|
+
"\x1B[32m"
|
|
2756
|
+
/* Green */
|
|
2757
|
+
)
|
|
2758
|
+
);
|
|
2759
|
+
}
|
|
2760
|
+
function writeWrapped(context, text, indent = 0) {
|
|
2761
|
+
const cols = context.terminal?.cols ?? 80;
|
|
2762
|
+
const width = Math.max(20, Math.min(cols - 1, 100) - indent);
|
|
2763
|
+
const pad = " ".repeat(indent);
|
|
2764
|
+
let line = "";
|
|
2765
|
+
for (const word of text.split(/\s+/).filter(Boolean)) {
|
|
2766
|
+
if (line && visibleLength2(line) + 1 + visibleLength2(word) > width) {
|
|
2767
|
+
context.writer.writeln(pad + line);
|
|
2768
|
+
line = word;
|
|
2769
|
+
} else {
|
|
2770
|
+
line = line ? `${line} ${word}` : word;
|
|
2771
|
+
}
|
|
2772
|
+
}
|
|
2773
|
+
if (line) context.writer.writeln(pad + line);
|
|
2774
|
+
}
|
|
2775
|
+
function visibleLength2(text) {
|
|
2776
|
+
return text.replace(/\x1b\[[0-9;]*m/g, "").length;
|
|
2777
|
+
}
|
|
2778
|
+
var bootCliModule = async (module2) => {
|
|
2779
|
+
if (typeof window !== "undefined" && window.__cliModuleRegistry) {
|
|
2780
|
+
await window.__cliModuleRegistry.register(module2);
|
|
2781
|
+
}
|
|
2782
|
+
};
|
|
2730
2783
|
var DefaultThemeInfos = {
|
|
2731
2784
|
default: {
|
|
2732
2785
|
theme: DefaultThemes.default,
|
|
@@ -2734,6 +2787,12 @@ var files = (() => {
|
|
|
2734
2787
|
tags: ["built-in"],
|
|
2735
2788
|
description: "Dark indigo theme with soft pastels"
|
|
2736
2789
|
},
|
|
2790
|
+
light: {
|
|
2791
|
+
theme: DefaultThemes.light,
|
|
2792
|
+
category: "light",
|
|
2793
|
+
tags: ["built-in"],
|
|
2794
|
+
description: "Light counterpart of the default theme"
|
|
2795
|
+
},
|
|
2737
2796
|
classic: {
|
|
2738
2797
|
theme: DefaultThemes.classic,
|
|
2739
2798
|
category: "dark",
|
|
@@ -2905,7 +2964,7 @@ var files = (() => {
|
|
|
2905
2964
|
};
|
|
2906
2965
|
|
|
2907
2966
|
// src/lib/version.ts
|
|
2908
|
-
var LIBRARY_VERSION = "2.
|
|
2967
|
+
var LIBRARY_VERSION = "2.2.0";
|
|
2909
2968
|
var API_VERSION2 = 2;
|
|
2910
2969
|
|
|
2911
2970
|
// src/lib/interfaces/i-file-system-service.ts
|