@oclif/plugin-test-esbuild 0.4.23 → 0.5.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/dist/index.js CHANGED
@@ -1,538 +1,690 @@
1
1
  import {
2
2
  ESBuild
3
- } from "./chunk-3RGGSNDJ.js";
3
+ } from "./chunk-KLOXFQZH.js";
4
4
  import {
5
5
  Hello
6
- } from "./chunk-BIYL2HN3.js";
6
+ } from "./chunk-MUI5XH7H.js";
7
7
  import {
8
8
  World
9
- } from "./chunk-L44NO6VG.js";
9
+ } from "./chunk-F5MC7XJI.js";
10
10
  import {
11
11
  init_default
12
- } from "./chunk-EB5PZLA5.js";
12
+ } from "./chunk-T7MF7QOS.js";
13
13
  import {
14
+ require_ansis,
14
15
  require_lib,
15
- require_src
16
- } from "./chunk-PAHNEEAY.js";
16
+ require_supports_color
17
+ } from "./chunk-B2CGVY4C.js";
18
+ import "./chunk-A4WCMQ5V.js";
17
19
  import {
18
20
  require_lib as require_lib2,
19
21
  require_semver
20
22
  } from "./chunk-ZQOI2LXL.js";
21
23
  import {
24
+ __commonJS,
25
+ __require,
22
26
  __toESM,
23
27
  init_cjs_shims
24
28
  } from "./chunk-RRP6KXWN.js";
25
29
 
26
- // src/index.ts
27
- init_cjs_shims();
28
- var import_core13 = __toESM(require_lib(), 1);
29
-
30
- // node_modules/@oclif/plugin-plugins/lib/index.js
31
- init_cjs_shims();
32
-
33
- // node_modules/@oclif/plugin-plugins/lib/commands/plugins/index.js
34
- init_cjs_shims();
35
- var import_core5 = __toESM(require_lib(), 1);
36
-
37
- // node_modules/@oclif/plugin-plugins/node_modules/chalk/source/index.js
38
- init_cjs_shims();
39
-
40
- // node_modules/@oclif/plugin-plugins/node_modules/chalk/source/vendor/ansi-styles/index.js
41
- init_cjs_shims();
42
- var ANSI_BACKGROUND_OFFSET = 10;
43
- var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
44
- var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
45
- var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
46
- var styles = {
47
- modifier: {
48
- reset: [0, 0],
49
- // 21 isn't widely supported and 22 does the same thing
50
- bold: [1, 22],
51
- dim: [2, 22],
52
- italic: [3, 23],
53
- underline: [4, 24],
54
- overline: [53, 55],
55
- inverse: [7, 27],
56
- hidden: [8, 28],
57
- strikethrough: [9, 29]
58
- },
59
- color: {
60
- black: [30, 39],
61
- red: [31, 39],
62
- green: [32, 39],
63
- yellow: [33, 39],
64
- blue: [34, 39],
65
- magenta: [35, 39],
66
- cyan: [36, 39],
67
- white: [37, 39],
68
- // Bright color
69
- blackBright: [90, 39],
70
- gray: [90, 39],
71
- // Alias of `blackBright`
72
- grey: [90, 39],
73
- // Alias of `blackBright`
74
- redBright: [91, 39],
75
- greenBright: [92, 39],
76
- yellowBright: [93, 39],
77
- blueBright: [94, 39],
78
- magentaBright: [95, 39],
79
- cyanBright: [96, 39],
80
- whiteBright: [97, 39]
81
- },
82
- bgColor: {
83
- bgBlack: [40, 49],
84
- bgRed: [41, 49],
85
- bgGreen: [42, 49],
86
- bgYellow: [43, 49],
87
- bgBlue: [44, 49],
88
- bgMagenta: [45, 49],
89
- bgCyan: [46, 49],
90
- bgWhite: [47, 49],
91
- // Bright color
92
- bgBlackBright: [100, 49],
93
- bgGray: [100, 49],
94
- // Alias of `bgBlackBright`
95
- bgGrey: [100, 49],
96
- // Alias of `bgBlackBright`
97
- bgRedBright: [101, 49],
98
- bgGreenBright: [102, 49],
99
- bgYellowBright: [103, 49],
100
- bgBlueBright: [104, 49],
101
- bgMagentaBright: [105, 49],
102
- bgCyanBright: [106, 49],
103
- bgWhiteBright: [107, 49]
104
- }
105
- };
106
- var modifierNames = Object.keys(styles.modifier);
107
- var foregroundColorNames = Object.keys(styles.color);
108
- var backgroundColorNames = Object.keys(styles.bgColor);
109
- var colorNames = [...foregroundColorNames, ...backgroundColorNames];
110
- function assembleStyles() {
111
- const codes = /* @__PURE__ */ new Map();
112
- for (const [groupName, group] of Object.entries(styles)) {
113
- for (const [styleName, style] of Object.entries(group)) {
114
- styles[styleName] = {
115
- open: `\x1B[${style[0]}m`,
116
- close: `\x1B[${style[1]}m`
117
- };
118
- group[styleName] = styles[styleName];
119
- codes.set(style[0], style[1]);
30
+ // node_modules/debug/node_modules/ms/index.js
31
+ var require_ms = __commonJS({
32
+ "node_modules/debug/node_modules/ms/index.js"(exports, module) {
33
+ init_cjs_shims();
34
+ var s = 1e3;
35
+ var m = s * 60;
36
+ var h = m * 60;
37
+ var d = h * 24;
38
+ var w = d * 7;
39
+ var y = d * 365.25;
40
+ module.exports = function(val, options) {
41
+ options = options || {};
42
+ var type = typeof val;
43
+ if (type === "string" && val.length > 0) {
44
+ return parse(val);
45
+ } else if (type === "number" && isFinite(val)) {
46
+ return options.long ? fmtLong(val) : fmtShort(val);
47
+ }
48
+ throw new Error(
49
+ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
50
+ );
51
+ };
52
+ function parse(str) {
53
+ str = String(str);
54
+ if (str.length > 100) {
55
+ return;
56
+ }
57
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
58
+ str
59
+ );
60
+ if (!match) {
61
+ return;
62
+ }
63
+ var n = parseFloat(match[1]);
64
+ var type = (match[2] || "ms").toLowerCase();
65
+ switch (type) {
66
+ case "years":
67
+ case "year":
68
+ case "yrs":
69
+ case "yr":
70
+ case "y":
71
+ return n * y;
72
+ case "weeks":
73
+ case "week":
74
+ case "w":
75
+ return n * w;
76
+ case "days":
77
+ case "day":
78
+ case "d":
79
+ return n * d;
80
+ case "hours":
81
+ case "hour":
82
+ case "hrs":
83
+ case "hr":
84
+ case "h":
85
+ return n * h;
86
+ case "minutes":
87
+ case "minute":
88
+ case "mins":
89
+ case "min":
90
+ case "m":
91
+ return n * m;
92
+ case "seconds":
93
+ case "second":
94
+ case "secs":
95
+ case "sec":
96
+ case "s":
97
+ return n * s;
98
+ case "milliseconds":
99
+ case "millisecond":
100
+ case "msecs":
101
+ case "msec":
102
+ case "ms":
103
+ return n;
104
+ default:
105
+ return void 0;
106
+ }
107
+ }
108
+ function fmtShort(ms) {
109
+ var msAbs = Math.abs(ms);
110
+ if (msAbs >= d) {
111
+ return Math.round(ms / d) + "d";
112
+ }
113
+ if (msAbs >= h) {
114
+ return Math.round(ms / h) + "h";
115
+ }
116
+ if (msAbs >= m) {
117
+ return Math.round(ms / m) + "m";
118
+ }
119
+ if (msAbs >= s) {
120
+ return Math.round(ms / s) + "s";
121
+ }
122
+ return ms + "ms";
123
+ }
124
+ function fmtLong(ms) {
125
+ var msAbs = Math.abs(ms);
126
+ if (msAbs >= d) {
127
+ return plural(ms, msAbs, d, "day");
128
+ }
129
+ if (msAbs >= h) {
130
+ return plural(ms, msAbs, h, "hour");
131
+ }
132
+ if (msAbs >= m) {
133
+ return plural(ms, msAbs, m, "minute");
134
+ }
135
+ if (msAbs >= s) {
136
+ return plural(ms, msAbs, s, "second");
137
+ }
138
+ return ms + " ms";
139
+ }
140
+ function plural(ms, msAbs, n, name) {
141
+ var isPlural = msAbs >= n * 1.5;
142
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
120
143
  }
121
- Object.defineProperty(styles, groupName, {
122
- value: group,
123
- enumerable: false
124
- });
125
144
  }
126
- Object.defineProperty(styles, "codes", {
127
- value: codes,
128
- enumerable: false
129
- });
130
- styles.color.close = "\x1B[39m";
131
- styles.bgColor.close = "\x1B[49m";
132
- styles.color.ansi = wrapAnsi16();
133
- styles.color.ansi256 = wrapAnsi256();
134
- styles.color.ansi16m = wrapAnsi16m();
135
- styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
136
- styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
137
- styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
138
- Object.defineProperties(styles, {
139
- rgbToAnsi256: {
140
- value(red, green, blue) {
141
- if (red === green && green === blue) {
142
- if (red < 8) {
143
- return 16;
145
+ });
146
+
147
+ // node_modules/debug/src/common.js
148
+ var require_common = __commonJS({
149
+ "node_modules/debug/src/common.js"(exports, module) {
150
+ init_cjs_shims();
151
+ function setup(env) {
152
+ createDebug.debug = createDebug;
153
+ createDebug.default = createDebug;
154
+ createDebug.coerce = coerce;
155
+ createDebug.disable = disable;
156
+ createDebug.enable = enable;
157
+ createDebug.enabled = enabled;
158
+ createDebug.humanize = require_ms();
159
+ createDebug.destroy = destroy;
160
+ Object.keys(env).forEach((key) => {
161
+ createDebug[key] = env[key];
162
+ });
163
+ createDebug.names = [];
164
+ createDebug.skips = [];
165
+ createDebug.formatters = {};
166
+ function selectColor(namespace) {
167
+ let hash = 0;
168
+ for (let i = 0; i < namespace.length; i++) {
169
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
170
+ hash |= 0;
171
+ }
172
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
173
+ }
174
+ createDebug.selectColor = selectColor;
175
+ function createDebug(namespace) {
176
+ let prevTime;
177
+ let enableOverride = null;
178
+ let namespacesCache;
179
+ let enabledCache;
180
+ function debug4(...args) {
181
+ if (!debug4.enabled) {
182
+ return;
144
183
  }
145
- if (red > 248) {
146
- return 231;
184
+ const self = debug4;
185
+ const curr = Number(/* @__PURE__ */ new Date());
186
+ const ms = curr - (prevTime || curr);
187
+ self.diff = ms;
188
+ self.prev = prevTime;
189
+ self.curr = curr;
190
+ prevTime = curr;
191
+ args[0] = createDebug.coerce(args[0]);
192
+ if (typeof args[0] !== "string") {
193
+ args.unshift("%O");
147
194
  }
148
- return Math.round((red - 8) / 247 * 24) + 232;
149
- }
150
- return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
151
- },
152
- enumerable: false
153
- },
154
- hexToRgb: {
155
- value(hex) {
156
- const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
157
- if (!matches) {
158
- return [0, 0, 0];
195
+ let index = 0;
196
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
197
+ if (match === "%%") {
198
+ return "%";
199
+ }
200
+ index++;
201
+ const formatter = createDebug.formatters[format];
202
+ if (typeof formatter === "function") {
203
+ const val = args[index];
204
+ match = formatter.call(self, val);
205
+ args.splice(index, 1);
206
+ index--;
207
+ }
208
+ return match;
209
+ });
210
+ createDebug.formatArgs.call(self, args);
211
+ const logFn = self.log || createDebug.log;
212
+ logFn.apply(self, args);
159
213
  }
160
- let [colorString] = matches;
161
- if (colorString.length === 3) {
162
- colorString = [...colorString].map((character) => character + character).join("");
214
+ debug4.namespace = namespace;
215
+ debug4.useColors = createDebug.useColors();
216
+ debug4.color = createDebug.selectColor(namespace);
217
+ debug4.extend = extend;
218
+ debug4.destroy = createDebug.destroy;
219
+ Object.defineProperty(debug4, "enabled", {
220
+ enumerable: true,
221
+ configurable: false,
222
+ get: () => {
223
+ if (enableOverride !== null) {
224
+ return enableOverride;
225
+ }
226
+ if (namespacesCache !== createDebug.namespaces) {
227
+ namespacesCache = createDebug.namespaces;
228
+ enabledCache = createDebug.enabled(namespace);
229
+ }
230
+ return enabledCache;
231
+ },
232
+ set: (v) => {
233
+ enableOverride = v;
234
+ }
235
+ });
236
+ if (typeof createDebug.init === "function") {
237
+ createDebug.init(debug4);
163
238
  }
164
- const integer = Number.parseInt(colorString, 16);
165
- return [
166
- /* eslint-disable no-bitwise */
167
- integer >> 16 & 255,
168
- integer >> 8 & 255,
169
- integer & 255
170
- /* eslint-enable no-bitwise */
171
- ];
172
- },
173
- enumerable: false
174
- },
175
- hexToAnsi256: {
176
- value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
177
- enumerable: false
178
- },
179
- ansi256ToAnsi: {
180
- value(code) {
181
- if (code < 8) {
182
- return 30 + code;
239
+ return debug4;
240
+ }
241
+ function extend(namespace, delimiter) {
242
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
243
+ newDebug.log = this.log;
244
+ return newDebug;
245
+ }
246
+ function enable(namespaces) {
247
+ createDebug.save(namespaces);
248
+ createDebug.namespaces = namespaces;
249
+ createDebug.names = [];
250
+ createDebug.skips = [];
251
+ let i;
252
+ const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
253
+ const len = split.length;
254
+ for (i = 0; i < len; i++) {
255
+ if (!split[i]) {
256
+ continue;
257
+ }
258
+ namespaces = split[i].replace(/\*/g, ".*?");
259
+ if (namespaces[0] === "-") {
260
+ createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
261
+ } else {
262
+ createDebug.names.push(new RegExp("^" + namespaces + "$"));
263
+ }
183
264
  }
184
- if (code < 16) {
185
- return 90 + (code - 8);
265
+ }
266
+ function disable() {
267
+ const namespaces = [
268
+ ...createDebug.names.map(toNamespace),
269
+ ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
270
+ ].join(",");
271
+ createDebug.enable("");
272
+ return namespaces;
273
+ }
274
+ function enabled(name) {
275
+ if (name[name.length - 1] === "*") {
276
+ return true;
186
277
  }
187
- let red;
188
- let green;
189
- let blue;
190
- if (code >= 232) {
191
- red = ((code - 232) * 10 + 8) / 255;
192
- green = red;
193
- blue = red;
194
- } else {
195
- code -= 16;
196
- const remainder = code % 36;
197
- red = Math.floor(code / 36) / 5;
198
- green = Math.floor(remainder / 6) / 5;
199
- blue = remainder % 6 / 5;
278
+ let i;
279
+ let len;
280
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
281
+ if (createDebug.skips[i].test(name)) {
282
+ return false;
283
+ }
200
284
  }
201
- const value = Math.max(red, green, blue) * 2;
202
- if (value === 0) {
203
- return 30;
285
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
286
+ if (createDebug.names[i].test(name)) {
287
+ return true;
288
+ }
204
289
  }
205
- let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
206
- if (value === 2) {
207
- result += 60;
290
+ return false;
291
+ }
292
+ function toNamespace(regexp) {
293
+ return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
294
+ }
295
+ function coerce(val) {
296
+ if (val instanceof Error) {
297
+ return val.stack || val.message;
208
298
  }
209
- return result;
210
- },
211
- enumerable: false
212
- },
213
- rgbToAnsi: {
214
- value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
215
- enumerable: false
216
- },
217
- hexToAnsi: {
218
- value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
219
- enumerable: false
220
- }
221
- });
222
- return styles;
223
- }
224
- var ansiStyles = assembleStyles();
225
- var ansi_styles_default = ansiStyles;
226
-
227
- // node_modules/@oclif/plugin-plugins/node_modules/chalk/source/vendor/supports-color/index.js
228
- init_cjs_shims();
229
- import process2 from "node:process";
230
- import os from "node:os";
231
- import tty from "node:tty";
232
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
233
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
234
- const position = argv.indexOf(prefix + flag);
235
- const terminatorPosition = argv.indexOf("--");
236
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
237
- }
238
- var { env } = process2;
239
- var flagForceColor;
240
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
241
- flagForceColor = 0;
242
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
243
- flagForceColor = 1;
244
- }
245
- function envForceColor() {
246
- if ("FORCE_COLOR" in env) {
247
- if (env.FORCE_COLOR === "true") {
248
- return 1;
249
- }
250
- if (env.FORCE_COLOR === "false") {
251
- return 0;
299
+ return val;
300
+ }
301
+ function destroy() {
302
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
303
+ }
304
+ createDebug.enable(createDebug.load());
305
+ return createDebug;
252
306
  }
253
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
254
- }
255
- }
256
- function translateLevel(level) {
257
- if (level === 0) {
258
- return false;
307
+ module.exports = setup;
259
308
  }
260
- return {
261
- level,
262
- hasBasic: true,
263
- has256: level >= 2,
264
- has16m: level >= 3
265
- };
266
- }
267
- function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
268
- const noFlagForceColor = envForceColor();
269
- if (noFlagForceColor !== void 0) {
270
- flagForceColor = noFlagForceColor;
271
- }
272
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
273
- if (forceColor === 0) {
274
- return 0;
275
- }
276
- if (sniffFlags) {
277
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
278
- return 3;
309
+ });
310
+
311
+ // node_modules/debug/src/browser.js
312
+ var require_browser = __commonJS({
313
+ "node_modules/debug/src/browser.js"(exports, module) {
314
+ init_cjs_shims();
315
+ exports.formatArgs = formatArgs;
316
+ exports.save = save;
317
+ exports.load = load;
318
+ exports.useColors = useColors;
319
+ exports.storage = localstorage();
320
+ exports.destroy = /* @__PURE__ */ (() => {
321
+ let warned = false;
322
+ return () => {
323
+ if (!warned) {
324
+ warned = true;
325
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
326
+ }
327
+ };
328
+ })();
329
+ exports.colors = [
330
+ "#0000CC",
331
+ "#0000FF",
332
+ "#0033CC",
333
+ "#0033FF",
334
+ "#0066CC",
335
+ "#0066FF",
336
+ "#0099CC",
337
+ "#0099FF",
338
+ "#00CC00",
339
+ "#00CC33",
340
+ "#00CC66",
341
+ "#00CC99",
342
+ "#00CCCC",
343
+ "#00CCFF",
344
+ "#3300CC",
345
+ "#3300FF",
346
+ "#3333CC",
347
+ "#3333FF",
348
+ "#3366CC",
349
+ "#3366FF",
350
+ "#3399CC",
351
+ "#3399FF",
352
+ "#33CC00",
353
+ "#33CC33",
354
+ "#33CC66",
355
+ "#33CC99",
356
+ "#33CCCC",
357
+ "#33CCFF",
358
+ "#6600CC",
359
+ "#6600FF",
360
+ "#6633CC",
361
+ "#6633FF",
362
+ "#66CC00",
363
+ "#66CC33",
364
+ "#9900CC",
365
+ "#9900FF",
366
+ "#9933CC",
367
+ "#9933FF",
368
+ "#99CC00",
369
+ "#99CC33",
370
+ "#CC0000",
371
+ "#CC0033",
372
+ "#CC0066",
373
+ "#CC0099",
374
+ "#CC00CC",
375
+ "#CC00FF",
376
+ "#CC3300",
377
+ "#CC3333",
378
+ "#CC3366",
379
+ "#CC3399",
380
+ "#CC33CC",
381
+ "#CC33FF",
382
+ "#CC6600",
383
+ "#CC6633",
384
+ "#CC9900",
385
+ "#CC9933",
386
+ "#CCCC00",
387
+ "#CCCC33",
388
+ "#FF0000",
389
+ "#FF0033",
390
+ "#FF0066",
391
+ "#FF0099",
392
+ "#FF00CC",
393
+ "#FF00FF",
394
+ "#FF3300",
395
+ "#FF3333",
396
+ "#FF3366",
397
+ "#FF3399",
398
+ "#FF33CC",
399
+ "#FF33FF",
400
+ "#FF6600",
401
+ "#FF6633",
402
+ "#FF9900",
403
+ "#FF9933",
404
+ "#FFCC00",
405
+ "#FFCC33"
406
+ ];
407
+ function useColors() {
408
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
409
+ return true;
410
+ }
411
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
412
+ return false;
413
+ }
414
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
415
+ typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
416
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
417
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
418
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
279
419
  }
280
- if (hasFlag("color=256")) {
281
- return 2;
420
+ function formatArgs(args) {
421
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
422
+ if (!this.useColors) {
423
+ return;
424
+ }
425
+ const c = "color: " + this.color;
426
+ args.splice(1, 0, c, "color: inherit");
427
+ let index = 0;
428
+ let lastC = 0;
429
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
430
+ if (match === "%%") {
431
+ return;
432
+ }
433
+ index++;
434
+ if (match === "%c") {
435
+ lastC = index;
436
+ }
437
+ });
438
+ args.splice(lastC, 0, c);
282
439
  }
283
- }
284
- if ("TF_BUILD" in env && "AGENT_NAME" in env) {
285
- return 1;
286
- }
287
- if (haveStream && !streamIsTTY && forceColor === void 0) {
288
- return 0;
289
- }
290
- const min = forceColor || 0;
291
- if (env.TERM === "dumb") {
292
- return min;
293
- }
294
- if (process2.platform === "win32") {
295
- const osRelease = os.release().split(".");
296
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
297
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
440
+ exports.log = console.debug || console.log || (() => {
441
+ });
442
+ function save(namespaces) {
443
+ try {
444
+ if (namespaces) {
445
+ exports.storage.setItem("debug", namespaces);
446
+ } else {
447
+ exports.storage.removeItem("debug");
448
+ }
449
+ } catch (error) {
450
+ }
298
451
  }
299
- return 1;
300
- }
301
- if ("CI" in env) {
302
- if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
303
- return 3;
452
+ function load() {
453
+ let r;
454
+ try {
455
+ r = exports.storage.getItem("debug");
456
+ } catch (error) {
457
+ }
458
+ if (!r && typeof process !== "undefined" && "env" in process) {
459
+ r = process.env.DEBUG;
460
+ }
461
+ return r;
304
462
  }
305
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
306
- return 1;
463
+ function localstorage() {
464
+ try {
465
+ return localStorage;
466
+ } catch (error) {
467
+ }
307
468
  }
308
- return min;
309
- }
310
- if ("TEAMCITY_VERSION" in env) {
311
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
312
- }
313
- if (env.COLORTERM === "truecolor") {
314
- return 3;
315
- }
316
- if (env.TERM === "xterm-kitty") {
317
- return 3;
469
+ module.exports = require_common()(exports);
470
+ var { formatters } = module.exports;
471
+ formatters.j = function(v) {
472
+ try {
473
+ return JSON.stringify(v);
474
+ } catch (error) {
475
+ return "[UnexpectedJSONParseError]: " + error.message;
476
+ }
477
+ };
318
478
  }
319
- if ("TERM_PROGRAM" in env) {
320
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
321
- switch (env.TERM_PROGRAM) {
322
- case "iTerm.app": {
323
- return version >= 3 ? 3 : 2;
479
+ });
480
+
481
+ // node_modules/debug/src/node.js
482
+ var require_node = __commonJS({
483
+ "node_modules/debug/src/node.js"(exports, module) {
484
+ init_cjs_shims();
485
+ var tty = __require("tty");
486
+ var util = __require("util");
487
+ exports.init = init;
488
+ exports.log = log;
489
+ exports.formatArgs = formatArgs;
490
+ exports.save = save;
491
+ exports.load = load;
492
+ exports.useColors = useColors;
493
+ exports.destroy = util.deprecate(
494
+ () => {
495
+ },
496
+ "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
497
+ );
498
+ exports.colors = [6, 2, 3, 4, 5, 1];
499
+ try {
500
+ const supportsColor = require_supports_color();
501
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
502
+ exports.colors = [
503
+ 20,
504
+ 21,
505
+ 26,
506
+ 27,
507
+ 32,
508
+ 33,
509
+ 38,
510
+ 39,
511
+ 40,
512
+ 41,
513
+ 42,
514
+ 43,
515
+ 44,
516
+ 45,
517
+ 56,
518
+ 57,
519
+ 62,
520
+ 63,
521
+ 68,
522
+ 69,
523
+ 74,
524
+ 75,
525
+ 76,
526
+ 77,
527
+ 78,
528
+ 79,
529
+ 80,
530
+ 81,
531
+ 92,
532
+ 93,
533
+ 98,
534
+ 99,
535
+ 112,
536
+ 113,
537
+ 128,
538
+ 129,
539
+ 134,
540
+ 135,
541
+ 148,
542
+ 149,
543
+ 160,
544
+ 161,
545
+ 162,
546
+ 163,
547
+ 164,
548
+ 165,
549
+ 166,
550
+ 167,
551
+ 168,
552
+ 169,
553
+ 170,
554
+ 171,
555
+ 172,
556
+ 173,
557
+ 178,
558
+ 179,
559
+ 184,
560
+ 185,
561
+ 196,
562
+ 197,
563
+ 198,
564
+ 199,
565
+ 200,
566
+ 201,
567
+ 202,
568
+ 203,
569
+ 204,
570
+ 205,
571
+ 206,
572
+ 207,
573
+ 208,
574
+ 209,
575
+ 214,
576
+ 215,
577
+ 220,
578
+ 221
579
+ ];
324
580
  }
325
- case "Apple_Terminal": {
326
- return 2;
581
+ } catch (error) {
582
+ }
583
+ exports.inspectOpts = Object.keys(process.env).filter((key) => {
584
+ return /^debug_/i.test(key);
585
+ }).reduce((obj, key) => {
586
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
587
+ return k.toUpperCase();
588
+ });
589
+ let val = process.env[key];
590
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
591
+ val = true;
592
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
593
+ val = false;
594
+ } else if (val === "null") {
595
+ val = null;
596
+ } else {
597
+ val = Number(val);
327
598
  }
599
+ obj[prop] = val;
600
+ return obj;
601
+ }, {});
602
+ function useColors() {
603
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
328
604
  }
329
- }
330
- if (/-256(color)?$/i.test(env.TERM)) {
331
- return 2;
332
- }
333
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
334
- return 1;
335
- }
336
- if ("COLORTERM" in env) {
337
- return 1;
338
- }
339
- return min;
340
- }
341
- function createSupportsColor(stream, options = {}) {
342
- const level = _supportsColor(stream, {
343
- streamIsTTY: stream && stream.isTTY,
344
- ...options
345
- });
346
- return translateLevel(level);
347
- }
348
- var supportsColor = {
349
- stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
350
- stderr: createSupportsColor({ isTTY: tty.isatty(2) })
351
- };
352
- var supports_color_default = supportsColor;
353
-
354
- // node_modules/@oclif/plugin-plugins/node_modules/chalk/source/utilities.js
355
- init_cjs_shims();
356
- function stringReplaceAll(string, substring, replacer) {
357
- let index = string.indexOf(substring);
358
- if (index === -1) {
359
- return string;
360
- }
361
- const substringLength = substring.length;
362
- let endIndex = 0;
363
- let returnValue = "";
364
- do {
365
- returnValue += string.slice(endIndex, index) + substring + replacer;
366
- endIndex = index + substringLength;
367
- index = string.indexOf(substring, endIndex);
368
- } while (index !== -1);
369
- returnValue += string.slice(endIndex);
370
- return returnValue;
371
- }
372
- function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
373
- let endIndex = 0;
374
- let returnValue = "";
375
- do {
376
- const gotCR = string[index - 1] === "\r";
377
- returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
378
- endIndex = index + 1;
379
- index = string.indexOf("\n", endIndex);
380
- } while (index !== -1);
381
- returnValue += string.slice(endIndex);
382
- return returnValue;
383
- }
384
-
385
- // node_modules/@oclif/plugin-plugins/node_modules/chalk/source/index.js
386
- var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
387
- var GENERATOR = Symbol("GENERATOR");
388
- var STYLER = Symbol("STYLER");
389
- var IS_EMPTY = Symbol("IS_EMPTY");
390
- var levelMapping = [
391
- "ansi",
392
- "ansi",
393
- "ansi256",
394
- "ansi16m"
395
- ];
396
- var styles2 = /* @__PURE__ */ Object.create(null);
397
- var applyOptions = (object, options = {}) => {
398
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
399
- throw new Error("The `level` option should be an integer from 0 to 3");
400
- }
401
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
402
- object.level = options.level === void 0 ? colorLevel : options.level;
403
- };
404
- var chalkFactory = (options) => {
405
- const chalk2 = (...strings) => strings.join(" ");
406
- applyOptions(chalk2, options);
407
- Object.setPrototypeOf(chalk2, createChalk.prototype);
408
- return chalk2;
409
- };
410
- function createChalk(options) {
411
- return chalkFactory(options);
412
- }
413
- Object.setPrototypeOf(createChalk.prototype, Function.prototype);
414
- for (const [styleName, style] of Object.entries(ansi_styles_default)) {
415
- styles2[styleName] = {
416
- get() {
417
- const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
418
- Object.defineProperty(this, styleName, { value: builder });
419
- return builder;
605
+ function formatArgs(args) {
606
+ const { namespace: name, useColors: useColors2 } = this;
607
+ if (useColors2) {
608
+ const c = this.color;
609
+ const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
610
+ const prefix = ` ${colorCode};1m${name} \x1B[0m`;
611
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
612
+ args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
613
+ } else {
614
+ args[0] = getDate() + name + " " + args[0];
615
+ }
420
616
  }
421
- };
422
- }
423
- styles2.visible = {
424
- get() {
425
- const builder = createBuilder(this, this[STYLER], true);
426
- Object.defineProperty(this, "visible", { value: builder });
427
- return builder;
428
- }
429
- };
430
- var getModelAnsi = (model, level, type, ...arguments_) => {
431
- if (model === "rgb") {
432
- if (level === "ansi16m") {
433
- return ansi_styles_default[type].ansi16m(...arguments_);
617
+ function getDate() {
618
+ if (exports.inspectOpts.hideDate) {
619
+ return "";
620
+ }
621
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
434
622
  }
435
- if (level === "ansi256") {
436
- return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
623
+ function log(...args) {
624
+ return process.stderr.write(util.format(...args) + "\n");
437
625
  }
438
- return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
439
- }
440
- if (model === "hex") {
441
- return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
442
- }
443
- return ansi_styles_default[type][model](...arguments_);
444
- };
445
- var usedModels = ["rgb", "hex", "ansi256"];
446
- for (const model of usedModels) {
447
- styles2[model] = {
448
- get() {
449
- const { level } = this;
450
- return function(...arguments_) {
451
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
452
- return createBuilder(this, styler, this[IS_EMPTY]);
453
- };
626
+ function save(namespaces) {
627
+ if (namespaces) {
628
+ process.env.DEBUG = namespaces;
629
+ } else {
630
+ delete process.env.DEBUG;
631
+ }
454
632
  }
455
- };
456
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
457
- styles2[bgModel] = {
458
- get() {
459
- const { level } = this;
460
- return function(...arguments_) {
461
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
462
- return createBuilder(this, styler, this[IS_EMPTY]);
463
- };
633
+ function load() {
634
+ return process.env.DEBUG;
464
635
  }
465
- };
466
- }
467
- var proto = Object.defineProperties(() => {
468
- }, {
469
- ...styles2,
470
- level: {
471
- enumerable: true,
472
- get() {
473
- return this[GENERATOR].level;
474
- },
475
- set(level) {
476
- this[GENERATOR].level = level;
636
+ function init(debug4) {
637
+ debug4.inspectOpts = {};
638
+ const keys = Object.keys(exports.inspectOpts);
639
+ for (let i = 0; i < keys.length; i++) {
640
+ debug4.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
641
+ }
477
642
  }
643
+ module.exports = require_common()(exports);
644
+ var { formatters } = module.exports;
645
+ formatters.o = function(v) {
646
+ this.inspectOpts.colors = this.useColors;
647
+ return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
648
+ };
649
+ formatters.O = function(v) {
650
+ this.inspectOpts.colors = this.useColors;
651
+ return util.inspect(v, this.inspectOpts);
652
+ };
478
653
  }
479
654
  });
480
- var createStyler = (open, close, parent) => {
481
- let openAll;
482
- let closeAll;
483
- if (parent === void 0) {
484
- openAll = open;
485
- closeAll = close;
486
- } else {
487
- openAll = parent.openAll + open;
488
- closeAll = close + parent.closeAll;
489
- }
490
- return {
491
- open,
492
- close,
493
- openAll,
494
- closeAll,
495
- parent
496
- };
497
- };
498
- var createBuilder = (self, _styler, _isEmpty) => {
499
- const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
500
- Object.setPrototypeOf(builder, proto);
501
- builder[GENERATOR] = self;
502
- builder[STYLER] = _styler;
503
- builder[IS_EMPTY] = _isEmpty;
504
- return builder;
505
- };
506
- var applyStyle = (self, string) => {
507
- if (self.level <= 0 || !string) {
508
- return self[IS_EMPTY] ? "" : string;
509
- }
510
- let styler = self[STYLER];
511
- if (styler === void 0) {
512
- return string;
513
- }
514
- const { openAll, closeAll } = styler;
515
- if (string.includes("\x1B")) {
516
- while (styler !== void 0) {
517
- string = stringReplaceAll(string, styler.close, styler.open);
518
- styler = styler.parent;
655
+
656
+ // node_modules/debug/src/index.js
657
+ var require_src = __commonJS({
658
+ "node_modules/debug/src/index.js"(exports, module) {
659
+ init_cjs_shims();
660
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
661
+ module.exports = require_browser();
662
+ } else {
663
+ module.exports = require_node();
519
664
  }
520
665
  }
521
- const lfIndex = string.indexOf("\n");
522
- if (lfIndex !== -1) {
523
- string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
524
- }
525
- return openAll + string + closeAll;
526
- };
527
- Object.defineProperties(createChalk.prototype, styles2);
528
- var chalk = createChalk();
529
- var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
530
- var source_default = chalk;
666
+ });
667
+
668
+ // src/index.ts
669
+ init_cjs_shims();
670
+ var import_core13 = __toESM(require_lib(), 1);
531
671
 
532
- // node_modules/@oclif/plugin-plugins/node_modules/object-treeify/lib/index.js
672
+ // node_modules/@oclif/plugin-plugins/lib/index.js
673
+ init_cjs_shims();
674
+
675
+ // node_modules/@oclif/plugin-plugins/lib/commands/plugins/index.js
676
+ init_cjs_shims();
677
+ var import_core5 = __toESM(require_lib(), 1);
678
+
679
+ // node_modules/ansis/index.mjs
680
+ init_cjs_shims();
681
+ var import_index = __toESM(require_ansis(), 1);
682
+ var { ansi256, fg, bgAnsi256, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bold, dim, italic, underline, strikethrough, strike, black, red, green, yellow, blue, magenta, cyan, white, grey, gray, blackBright, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGrey, bgGray, bgBlackBright, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = import_index.default;
683
+
684
+ // node_modules/object-treeify/lib/index.js
533
685
  init_cjs_shims();
534
686
 
535
- // node_modules/@oclif/plugin-plugins/node_modules/object-treeify/lib/assert.js
687
+ // node_modules/object-treeify/lib/assert.js
536
688
  init_cjs_shims();
537
689
  var assert_default = (condition, message) => {
538
690
  if (!condition) {
@@ -540,7 +692,7 @@ var assert_default = (condition, message) => {
540
692
  }
541
693
  };
542
694
 
543
- // node_modules/@oclif/plugin-plugins/node_modules/object-treeify/lib/index.js
695
+ // node_modules/object-treeify/lib/index.js
544
696
  var buildCtx = (opts) => {
545
697
  const ctx = {
546
698
  joined: true,
@@ -627,7 +779,7 @@ import { spawn as cpSpawn } from "node:child_process";
627
779
 
628
780
  // node_modules/npm-run-path/index.js
629
781
  init_cjs_shims();
630
- import process3 from "node:process";
782
+ import process2 from "node:process";
631
783
  import path from "node:path";
632
784
  import { fileURLToPath } from "node:url";
633
785
 
@@ -635,21 +787,21 @@ import { fileURLToPath } from "node:url";
635
787
  init_cjs_shims();
636
788
  function pathKey(options = {}) {
637
789
  const {
638
- env: env2 = process.env,
790
+ env = process.env,
639
791
  platform = process.platform
640
792
  } = options;
641
793
  if (platform !== "win32") {
642
794
  return "PATH";
643
795
  }
644
- return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
796
+ return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
645
797
  }
646
798
 
647
799
  // node_modules/npm-run-path/index.js
648
800
  var npmRunPath = ({
649
- cwd = process3.cwd(),
650
- path: pathOption = process3.env[pathKey()],
801
+ cwd = process2.cwd(),
802
+ path: pathOption = process2.env[pathKey()],
651
803
  preferLocal = true,
652
- execPath = process3.execPath,
804
+ execPath = process2.execPath,
653
805
  addExecPath = true
654
806
  } = {}) => {
655
807
  const cwdString = cwd instanceof URL ? fileURLToPath(cwd) : cwd;
@@ -675,12 +827,12 @@ var applyExecPath = (result, execPath, cwdPath) => {
675
827
  const execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;
676
828
  result.push(path.resolve(cwdPath, execPathString, ".."));
677
829
  };
678
- var npmRunPathEnv = ({ env: env2 = process3.env, ...options } = {}) => {
679
- env2 = { ...env2 };
680
- const pathName = pathKey({ env: env2 });
681
- options.path = env2[pathName];
682
- env2[pathName] = npmRunPath(options);
683
- return env2;
830
+ var npmRunPathEnv = ({ env = process2.env, ...options } = {}) => {
831
+ env = { ...env };
832
+ const pathName = pathKey({ env });
833
+ options.path = env[pathName];
834
+ env[pathName] = npmRunPath(options);
835
+ return env;
684
836
  };
685
837
 
686
838
  // node_modules/@oclif/plugin-plugins/lib/spawn.js
@@ -724,7 +876,7 @@ async function spawn(modulePath, args = [], { cwd, logLevel }) {
724
876
  stderr.push(output);
725
877
  if (shouldPrint(output)) {
726
878
  loggedStderr.push(output);
727
- import_core.ux.log(output);
879
+ import_core.ux.stdout(output);
728
880
  } else
729
881
  debug(output);
730
882
  });
@@ -734,7 +886,7 @@ async function spawn(modulePath, args = [], { cwd, logLevel }) {
734
886
  stdout.push(output);
735
887
  if (shouldPrint(output)) {
736
888
  loggedStdout.push(output);
737
- import_core.ux.log(output);
889
+ import_core.ux.stdout(output);
738
890
  } else
739
891
  debug(output);
740
892
  });
@@ -768,7 +920,7 @@ var NPM = class {
768
920
  if (this.config.npmRegistry)
769
921
  args.push(`--registry=${this.config.npmRegistry}`);
770
922
  if (options.logLevel !== "notice" && options.logLevel !== "silent") {
771
- import_core2.ux.logToStderr(`${options.cwd}: ${bin} ${args.join(" ")}`);
923
+ import_core2.ux.stderr(`${options.cwd}: ${bin} ${args.join(" ")}`);
772
924
  }
773
925
  debug2(`${options.cwd}: ${bin} ${args.join(" ")}`);
774
926
  try {
@@ -869,7 +1021,7 @@ var Yarn = class {
869
1021
  if (this.config.npmRegistry)
870
1022
  args.push(`--registry=${this.config.npmRegistry}`);
871
1023
  if (options.logLevel !== "notice" && options.logLevel !== "silent") {
872
- import_core3.ux.logToStderr(`${options.cwd}: ${bin} ${args.join(" ")}`);
1024
+ import_core3.ux.stderr(`${options.cwd}: ${bin} ${args.join(" ")}`);
873
1025
  }
874
1026
  debug3(`${options.cwd}: ${bin} ${args.join(" ")}`);
875
1027
  try {
@@ -915,11 +1067,7 @@ async function fileExists(filePath) {
915
1067
  }
916
1068
  }
917
1069
  function dedupePlugins(plugins) {
918
- return uniqWith(
919
- plugins,
920
- // @ts-expect-error because typescript doesn't think it's possible for a plugin to have the `link` type here
921
- (a, b) => a.name === b.name || a.type === "link" && b.type === "link" && a.root === b.root
922
- );
1070
+ return uniqWith(plugins, (a, b) => a.name === b.name || a.type === "link" && b.type === "link" && a.root === b.root);
923
1071
  }
924
1072
  function extractIssuesLocation(bugs, repository) {
925
1073
  if (bugs) {
@@ -932,10 +1080,10 @@ function extractIssuesLocation(bugs, repository) {
932
1080
  function notifyUser(plugin, output) {
933
1081
  const containsWarnings = [...output.stdout, ...output.stderr].some((l) => l.includes("npm WARN"));
934
1082
  if (containsWarnings) {
935
- import_core4.ux.logToStderr(source_default.bold.yellow(`
1083
+ import_core4.ux.stderr(bold.yellow(`
936
1084
  These warnings can only be addressed by the owner(s) of ${plugin.name}.`));
937
1085
  if (plugin.pjson.bugs || plugin.pjson.repository) {
938
- import_core4.ux.logToStderr(`We suggest that you create an issue at ${extractIssuesLocation(plugin.pjson.bugs, plugin.pjson.repository)} and ask the plugin owners to address them.
1086
+ import_core4.ux.stderr(`We suggest that you create an issue at ${extractIssuesLocation(plugin.pjson.bugs, plugin.pjson.repository)} and ask the plugin owners to address them.
939
1087
  `);
940
1088
  }
941
1089
  }
@@ -1252,16 +1400,18 @@ Does your current user own the directory ${this.config.dataDir}?`
1252
1400
  }
1253
1401
  }
1254
1402
  async savePJSON(pjson) {
1255
- this.debug(`saving pjson at ${this.pjsonPath}`, JSON.stringify(pjson, null, 2));
1256
1403
  await mkdir(dirname(this.pjsonPath), { recursive: true });
1257
1404
  await writeFile(this.pjsonPath, JSON.stringify({ name: this.config.name, ...pjson }, null, 2));
1258
1405
  }
1259
1406
  };
1260
- var normalizePlugins = (input) => dedupePlugins((input ?? []).map((p) => typeof p === "string" ? {
1261
- name: p,
1262
- tag: "latest",
1263
- type: "user"
1264
- } : p));
1407
+ var normalizePlugins = (input) => {
1408
+ const normalized = (input ?? []).map((p) => typeof p === "string" ? {
1409
+ name: p,
1410
+ tag: "latest",
1411
+ type: "user"
1412
+ } : p);
1413
+ return dedupePlugins(normalized);
1414
+ };
1265
1415
 
1266
1416
  // node_modules/@oclif/plugin-plugins/lib/commands/plugins/index.js
1267
1417
  var PluginsIndex = class _PluginsIndex extends import_core5.Command {
@@ -1320,19 +1470,19 @@ var PluginsIndex = class _PluginsIndex extends import_core5.Command {
1320
1470
  displayJitPlugins(jitPlugins) {
1321
1471
  if (jitPlugins.length === 0)
1322
1472
  return;
1323
- this.log(source_default.dim("\nUninstalled JIT Plugins:"));
1473
+ this.log(dim("\nUninstalled JIT Plugins:"));
1324
1474
  for (const { name, version } of jitPlugins) {
1325
- this.log(`${this.plugins.friendlyName(name)} ${source_default.dim(version)}`);
1475
+ this.log(`${this.plugins.friendlyName(name)} ${dim(version)}`);
1326
1476
  }
1327
1477
  }
1328
1478
  formatPlugin(plugin) {
1329
- let output = `${this.plugins.friendlyName(plugin.name)} ${source_default.dim(plugin.version)}`;
1479
+ let output = `${this.plugins.friendlyName(plugin.name)} ${dim(plugin.version)}`;
1330
1480
  if (plugin.type !== "user")
1331
- output += source_default.dim(` (${plugin.type})`);
1481
+ output += dim(` (${plugin.type})`);
1332
1482
  if (plugin.type === "link")
1333
1483
  output += ` ${plugin.root}`;
1334
1484
  else if (plugin.tag && plugin.tag !== "latest")
1335
- output += source_default.dim(` (${String(plugin.tag)})`);
1485
+ output += dim(` (${String(plugin.tag)})`);
1336
1486
  return output;
1337
1487
  }
1338
1488
  };
@@ -1421,13 +1571,13 @@ var PluginsInspect = class _PluginsInspect extends import_core6.Command {
1421
1571
  if (!version)
1422
1572
  continue;
1423
1573
  const from = plugin.pjson.dependencies?.[dep];
1424
- const versionMsg = source_default.dim(from ? `${from} => ${version}` : version);
1574
+ const versionMsg = dim(from ? `${from} => ${version}` : version);
1425
1575
  const msg = verbose ? `${dep} ${versionMsg} ${pkgPath}` : `${dep} ${versionMsg}`;
1426
1576
  dependencies[msg] = null;
1427
1577
  depsJson[dep] = { from, version };
1428
1578
  }
1429
1579
  const tree = {
1430
- [source_default.bold.cyan(plugin.name)]: {
1580
+ [bold.cyan(plugin.name)]: {
1431
1581
  [`version ${plugin.version}`]: null,
1432
1582
  ...plugin.tag ? { [`tag ${plugin.tag}`]: null } : {},
1433
1583
  ...plugin.pjson.homepage ? { [`homepage ${plugin.pjson.homepage}`]: null } : {},
@@ -1460,7 +1610,7 @@ var PluginsInspect = class _PluginsInspect extends import_core6.Command {
1460
1610
  try {
1461
1611
  plugins.push(await this.inspect(pluginName, flags.verbose));
1462
1612
  } catch (error) {
1463
- this.log(source_default.bold.red("failed"));
1613
+ this.log(bold.red("failed"));
1464
1614
  throw error;
1465
1615
  }
1466
1616
  }
@@ -1595,17 +1745,17 @@ Use the <%= config.scopedEnvVarKey('NPM_REGISTRY') %> environment variable to se
1595
1745
  });
1596
1746
  try {
1597
1747
  if (p.type === "npm") {
1598
- import_core7.ux.action.start(`${this.config.name}: Installing plugin ${source_default.cyan(plugins.friendlyName(p.name) + "@" + p.tag)}`);
1748
+ import_core7.ux.action.start(`${this.config.name}: Installing plugin ${cyan(plugins.friendlyName(p.name) + "@" + p.tag)}`);
1599
1749
  plugin = await plugins.install(p.name, {
1600
1750
  force: flags.force,
1601
1751
  tag: p.tag
1602
1752
  });
1603
1753
  } else {
1604
- import_core7.ux.action.start(`${this.config.name}: Installing plugin ${source_default.cyan(p.url)}`);
1754
+ import_core7.ux.action.start(`${this.config.name}: Installing plugin ${cyan(p.url)}`);
1605
1755
  plugin = await plugins.install(p.url, { force: flags.force });
1606
1756
  }
1607
1757
  } catch (error) {
1608
- import_core7.ux.action.stop(source_default.bold.red("failed"));
1758
+ import_core7.ux.action.stop(bold.red("failed"));
1609
1759
  throw error;
1610
1760
  }
1611
1761
  import_core7.ux.action.stop(`installed v${plugin.version}`);
@@ -1646,7 +1796,7 @@ e.g. If you have a user-installed or core plugin that has a 'hello' command, ins
1646
1796
  config: this.config,
1647
1797
  logLevel: determineLogLevel(this.config, flags, "silent")
1648
1798
  });
1649
- import_core8.ux.action.start(`${this.config.name}: Linking plugin ${source_default.cyan(args.path)}`);
1799
+ import_core8.ux.action.start(`${this.config.name}: Linking plugin ${cyan(args.path)}`);
1650
1800
  await plugins.link(args.path, { install: flags.install });
1651
1801
  import_core8.ux.action.stop();
1652
1802
  }
@@ -1675,7 +1825,7 @@ var Reset = class _Reset extends import_core9.Command {
1675
1825
  const userPlugins = await plugins.list();
1676
1826
  this.log(`Found ${userPlugins.length} plugin${userPlugins.length === 0 ? "" : "s"}:`);
1677
1827
  for (const plugin of userPlugins) {
1678
- this.log(`- ${plugin.name} ${source_default.dim(this.config.plugins.get(plugin.name)?.version)} ${source_default.dim(`(${plugin.type})`)}`);
1828
+ this.log(`- ${plugin.name} ${dim(this.config.plugins.get(plugin.name)?.version ?? "")} ${dim(`(${plugin.type})`)}`);
1679
1829
  }
1680
1830
  if (flags.hard) {
1681
1831
  const filesToDelete = [
@@ -1708,7 +1858,7 @@ var Reset = class _Reset extends import_core9.Command {
1708
1858
  if (plugin.type === "link") {
1709
1859
  try {
1710
1860
  const newPlugin = await plugins.link(plugin.root, { install: false });
1711
- const newVersion = source_default.dim(`-> ${newPlugin.version}`);
1861
+ const newVersion = dim(`-> ${newPlugin.version}`);
1712
1862
  this.log(`\u2705 Relinked ${plugin.name} ${newVersion}`);
1713
1863
  } catch {
1714
1864
  this.warn(`Failed to relink ${plugin.name}`);
@@ -1717,7 +1867,7 @@ var Reset = class _Reset extends import_core9.Command {
1717
1867
  if (plugin.type === "user") {
1718
1868
  try {
1719
1869
  const newPlugin = plugin.url ? await plugins.install(plugin.url) : await plugins.install(plugin.name, { tag: plugin.tag });
1720
- const newVersion = source_default.dim(`-> ${newPlugin.version}`);
1870
+ const newVersion = dim(`-> ${newPlugin.version}`);
1721
1871
  const tag = plugin.tag ? `@${plugin.tag}` : plugin.url ? ` (${plugin.url})` : "";
1722
1872
  this.log(`\u2705 Reinstalled ${plugin.name}${tag} ${newVersion}`);
1723
1873
  } catch {
@@ -1780,7 +1930,7 @@ var PluginsUninstall = class _PluginsUninstall extends import_core10.Command {
1780
1930
  import_core10.ux.action.start(`${this.config.name}: Uninstalling ${displayName}`);
1781
1931
  await plugins.uninstall(name);
1782
1932
  } catch (error) {
1783
- import_core10.ux.action.stop(source_default.bold.red("failed"));
1933
+ import_core10.ux.action.stop(bold.red("failed"));
1784
1934
  throw error;
1785
1935
  }
1786
1936
  import_core10.ux.action.stop();