@qodalis/cli-server-jobs 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.
@@ -2223,65 +2223,6 @@ var jobs = (() => {
2223
2223
  const query = entries.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`).join("&");
2224
2224
  return `${url}${url.includes("?") ? "&" : "?"}${query}`;
2225
2225
  }
2226
- function writeColumns(context, rows, formatLeft, formatRight) {
2227
- const width = Math.max(...rows.map(([left]) => left.length)) + 2;
2228
- for (const [left, right] of rows) {
2229
- context.writer.writeln(
2230
- ` ${formatLeft(left.padEnd(width))}${formatRight(right)}`
2231
- );
2232
- }
2233
- }
2234
- function writeUsage(context, rows) {
2235
- const { writer, translator } = context;
2236
- writer.writeln(`\u{1F4CB} ${translator.t("cli.common.usage", "Usage:")}`);
2237
- writeColumns(
2238
- context,
2239
- rows,
2240
- (cmd) => writer.wrapInColor(
2241
- cmd,
2242
- "\x1B[36m"
2243
- /* Cyan */
2244
- ),
2245
- (text) => text
2246
- );
2247
- }
2248
- function writeExamples(context, rows) {
2249
- const { writer, translator } = context;
2250
- writer.writeln(`\u{1F4DD} ${translator.t("cli.common.examples", "Examples:")}`);
2251
- writeColumns(
2252
- context,
2253
- rows,
2254
- (cmd) => cmd,
2255
- (comment) => writer.wrapInColor(
2256
- `# ${comment}`,
2257
- "\x1B[32m"
2258
- /* Green */
2259
- )
2260
- );
2261
- }
2262
- function writeWrapped(context, text, indent = 0) {
2263
- const cols = context.terminal?.cols ?? 80;
2264
- const width = Math.max(20, Math.min(cols - 1, 100) - indent);
2265
- const pad = " ".repeat(indent);
2266
- let line = "";
2267
- for (const word of text.split(/\s+/).filter(Boolean)) {
2268
- if (line && visibleLength2(line) + 1 + visibleLength2(word) > width) {
2269
- context.writer.writeln(pad + line);
2270
- line = word;
2271
- } else {
2272
- line = line ? `${line} ${word}` : word;
2273
- }
2274
- }
2275
- if (line) context.writer.writeln(pad + line);
2276
- }
2277
- function visibleLength2(text) {
2278
- return text.replace(/\x1b\[[0-9;]*m/g, "").length;
2279
- }
2280
- var bootCliModule = async (module2) => {
2281
- if (typeof window !== "undefined" && window.__cliModuleRegistry) {
2282
- await window.__cliModuleRegistry.register(module2);
2283
- }
2284
- };
2285
2226
  var DefaultThemes = {
2286
2227
  default: {
2287
2228
  background: "#070b14",
@@ -2306,6 +2247,31 @@ var jobs = (() => {
2306
2247
  brightCyan: "#a5f3fc",
2307
2248
  brightWhite: "#f1f5f9"
2308
2249
  },
2250
+ // Soft grey paper and slate text; every color reads at 4.5:1 or more on the background
2251
+ light: {
2252
+ background: "#f7f8fa",
2253
+ foreground: "#334155",
2254
+ cursor: "#4f46e5",
2255
+ cursorAccent: "#f7f8fa",
2256
+ selectionBackground: "#d9def7",
2257
+ selectionForeground: "#1e293b",
2258
+ black: "#334155",
2259
+ red: "#c93c37",
2260
+ green: "#2c7a4b",
2261
+ yellow: "#946200",
2262
+ blue: "#3d5bd9",
2263
+ magenta: "#8b3fc7",
2264
+ cyan: "#0e7586",
2265
+ white: "#5b6577",
2266
+ brightBlack: "#667085",
2267
+ brightRed: "#b42a25",
2268
+ brightGreen: "#1f6a3d",
2269
+ brightYellow: "#7a5100",
2270
+ brightBlue: "#2f47bd",
2271
+ brightMagenta: "#7431ad",
2272
+ brightCyan: "#0a6170",
2273
+ brightWhite: "#1e293b"
2274
+ },
2309
2275
  classic: {
2310
2276
  background: "#0c0c0c",
2311
2277
  foreground: "#cccccc",
@@ -2917,6 +2883,96 @@ var jobs = (() => {
2917
2883
  }
2918
2884
  };
2919
2885
  DefaultThemes.yellow = DefaultThemes.highContrastLight;
2886
+ var CliPanelPalettes = Object.freeze({
2887
+ dark: Object.freeze({
2888
+ background: "#070b14",
2889
+ headerBackground: "#0f1623",
2890
+ border: "#1e293b",
2891
+ text: "#e2e8f0",
2892
+ textSecondary: "#94a3b8",
2893
+ accent: "#818cf8",
2894
+ hoverBackground: "rgba(129, 140, 248, 0.12)",
2895
+ activeBackground: "rgba(129, 140, 248, 0.22)",
2896
+ danger: "#f87171",
2897
+ shadow: "rgba(0, 0, 0, 0.45)"
2898
+ }),
2899
+ // Soft grey paper instead of pure white, slate text rather than black: easier on the eyes
2900
+ light: Object.freeze({
2901
+ background: "#f7f8fa",
2902
+ headerBackground: "#eceff3",
2903
+ border: "#d9dee6",
2904
+ text: "#1e293b",
2905
+ textSecondary: "#5b6577",
2906
+ accent: "#4f46e5",
2907
+ hoverBackground: "rgba(30, 41, 59, 0.06)",
2908
+ activeBackground: "rgba(79, 70, 229, 0.12)",
2909
+ danger: "#c93c37",
2910
+ shadow: "rgba(15, 23, 42, 0.12)"
2911
+ })
2912
+ });
2913
+ var PALETTE_TERMINALS = {
2914
+ dark: DefaultThemes.default,
2915
+ light: DefaultThemes.light
2916
+ };
2917
+ function writeColumns(context, rows, formatLeft, formatRight) {
2918
+ const width = Math.max(...rows.map(([left]) => left.length)) + 2;
2919
+ for (const [left, right] of rows) {
2920
+ context.writer.writeln(
2921
+ ` ${formatLeft(left.padEnd(width))}${formatRight(right)}`
2922
+ );
2923
+ }
2924
+ }
2925
+ function writeUsage(context, rows) {
2926
+ const { writer, translator } = context;
2927
+ writer.writeln(`\u{1F4CB} ${translator.t("cli.common.usage", "Usage:")}`);
2928
+ writeColumns(
2929
+ context,
2930
+ rows,
2931
+ (cmd) => writer.wrapInColor(
2932
+ cmd,
2933
+ "\x1B[36m"
2934
+ /* Cyan */
2935
+ ),
2936
+ (text) => text
2937
+ );
2938
+ }
2939
+ function writeExamples(context, rows) {
2940
+ const { writer, translator } = context;
2941
+ writer.writeln(`\u{1F4DD} ${translator.t("cli.common.examples", "Examples:")}`);
2942
+ writeColumns(
2943
+ context,
2944
+ rows,
2945
+ (cmd) => cmd,
2946
+ (comment) => writer.wrapInColor(
2947
+ `# ${comment}`,
2948
+ "\x1B[32m"
2949
+ /* Green */
2950
+ )
2951
+ );
2952
+ }
2953
+ function writeWrapped(context, text, indent = 0) {
2954
+ const cols = context.terminal?.cols ?? 80;
2955
+ const width = Math.max(20, Math.min(cols - 1, 100) - indent);
2956
+ const pad = " ".repeat(indent);
2957
+ let line = "";
2958
+ for (const word of text.split(/\s+/).filter(Boolean)) {
2959
+ if (line && visibleLength2(line) + 1 + visibleLength2(word) > width) {
2960
+ context.writer.writeln(pad + line);
2961
+ line = word;
2962
+ } else {
2963
+ line = line ? `${line} ${word}` : word;
2964
+ }
2965
+ }
2966
+ if (line) context.writer.writeln(pad + line);
2967
+ }
2968
+ function visibleLength2(text) {
2969
+ return text.replace(/\x1b\[[0-9;]*m/g, "").length;
2970
+ }
2971
+ var bootCliModule = async (module2) => {
2972
+ if (typeof window !== "undefined" && window.__cliModuleRegistry) {
2973
+ await window.__cliModuleRegistry.register(module2);
2974
+ }
2975
+ };
2920
2976
  var DefaultThemeInfos = {
2921
2977
  default: {
2922
2978
  theme: DefaultThemes.default,
@@ -2924,6 +2980,12 @@ var jobs = (() => {
2924
2980
  tags: ["built-in"],
2925
2981
  description: "Dark indigo theme with soft pastels"
2926
2982
  },
2983
+ light: {
2984
+ theme: DefaultThemes.light,
2985
+ category: "light",
2986
+ tags: ["built-in"],
2987
+ description: "Light counterpart of the default theme"
2988
+ },
2927
2989
  classic: {
2928
2990
  theme: DefaultThemes.classic,
2929
2991
  category: "dark",