@eggjs/mock 6.1.0-beta.3 → 6.1.0-beta.5

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.
Files changed (104) hide show
  1. package/dist/_virtual/rolldown_runtime.js +24 -1
  2. package/dist/bootstrap.d.ts +1 -1
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/index.js +0 -1
  5. package/dist/inject_mocha.d.ts +1 -0
  6. package/dist/inject_mocha.js +35 -0
  7. package/dist/node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js +142 -0
  8. package/dist/node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js +157 -0
  9. package/dist/node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js +97 -0
  10. package/dist/node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js +40 -0
  11. package/dist/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js +812 -0
  12. package/dist/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js +50 -0
  13. package/dist/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js +68 -0
  14. package/dist/node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js +752 -0
  15. package/dist/node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js +203 -0
  16. package/dist/node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js +209 -0
  17. package/dist/node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js +18 -0
  18. package/dist/node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js +215 -0
  19. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/convert/dmp.js +24 -0
  20. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/convert/xml.js +33 -0
  21. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/array.js +29 -0
  22. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/base.js +185 -0
  23. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/character.js +23 -0
  24. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/css.js +26 -0
  25. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/json.js +83 -0
  26. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/line.js +51 -0
  27. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/sentence.js +26 -0
  28. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/diff/word.js +151 -0
  29. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/index.js +178 -0
  30. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/apply.js +168 -0
  31. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/create.js +301 -0
  32. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/line-endings.js +137 -0
  33. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/merge.js +367 -0
  34. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/parse.js +91 -0
  35. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/patch/reverse.js +99 -0
  36. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/array.js +23 -0
  37. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/distance-iterator.js +30 -0
  38. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/params.js +22 -0
  39. package/dist/node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/util/string.js +97 -0
  40. package/dist/node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js +14 -0
  41. package/dist/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js +16 -0
  42. package/dist/node_modules/.pnpm/he@1.2.0/node_modules/he/he.js +4093 -0
  43. package/dist/node_modules/.pnpm/is-unicode-supported@0.1.0/node_modules/is-unicode-supported/index.js +14 -0
  44. package/dist/node_modules/.pnpm/log-symbols@4.1.0/node_modules/log-symbols/index.js +27 -0
  45. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/index.js +12 -0
  46. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/context.js +83 -0
  47. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/error-constants.js +35 -0
  48. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/errors.js +392 -0
  49. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/hook.js +86 -0
  50. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/bdd.js +104 -0
  51. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/common.js +99 -0
  52. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/exports.js +65 -0
  53. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/index.js +18 -0
  54. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/qunit.js +95 -0
  55. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/interfaces/tdd.js +105 -0
  56. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/mocha.js +1037 -0
  57. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/mocharc.js +24 -0
  58. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/nodejs/buffered-worker-pool.js +152 -0
  59. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/nodejs/esm-utils.js +74 -0
  60. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/nodejs/file-unloader.js +22 -0
  61. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/nodejs/parallel-buffered-runner.js +329 -0
  62. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/nodejs/serializer.js +314 -0
  63. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/pending.js +22 -0
  64. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/base.js +417 -0
  65. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/doc.js +79 -0
  66. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/dot.js +75 -0
  67. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/html.js +283 -0
  68. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/index.js +40 -0
  69. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/json-stream.js +90 -0
  70. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/json.js +145 -0
  71. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/landing.js +107 -0
  72. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/list.js +77 -0
  73. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/markdown.js +106 -0
  74. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/min.js +57 -0
  75. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/nyan.js +233 -0
  76. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/progress.js +92 -0
  77. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/spec.js +91 -0
  78. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/tap.js +261 -0
  79. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/reporters/xunit.js +166 -0
  80. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/runnable.js +346 -0
  81. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/runner.js +922 -0
  82. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/stats-collector.js +72 -0
  83. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/suite.js +517 -0
  84. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/test.js +105 -0
  85. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/lib/utils.js +505 -0
  86. package/dist/node_modules/.pnpm/mocha@11.7.2/node_modules/mocha/package.js +225 -0
  87. package/dist/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +124 -0
  88. package/dist/node_modules/.pnpm/randombytes@2.1.0/node_modules/randombytes/index.js +11 -0
  89. package/dist/node_modules/.pnpm/serialize-javascript@6.0.2/node_modules/serialize-javascript/index.js +114 -0
  90. package/dist/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js +76 -0
  91. package/dist/node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js +89 -0
  92. package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/Pool.js +366 -0
  93. package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/Promise.js +248 -0
  94. package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/WorkerHandler.js +419 -0
  95. package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/debug-port-allocator.js +27 -0
  96. package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/environment.js +18 -0
  97. package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/generated/embeddedWorker.js +16 -0
  98. package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/index.js +63 -0
  99. package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/transfer.js +21 -0
  100. package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/validateOptions.js +9 -0
  101. package/dist/node_modules/.pnpm/workerpool@9.3.4/node_modules/workerpool/src/worker.js +277 -0
  102. package/dist/register.d.ts +0 -2
  103. package/dist/register.js +1 -26
  104. package/package.json +10 -8
@@ -0,0 +1,203 @@
1
+ import { __commonJS } from "../../../../../../_virtual/rolldown_runtime.js";
2
+ import { require_common } from "./common.js";
3
+
4
+ //#region ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js
5
+ var require_browser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js": ((exports, module) => {
6
+ /**
7
+ * This is the web browser implementation of `debug()`.
8
+ */
9
+ exports.formatArgs = formatArgs;
10
+ exports.save = save;
11
+ exports.load = load;
12
+ exports.useColors = useColors;
13
+ exports.storage = localstorage();
14
+ exports.destroy = (() => {
15
+ let warned = false;
16
+ return () => {
17
+ if (!warned) {
18
+ warned = true;
19
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
20
+ }
21
+ };
22
+ })();
23
+ /**
24
+ * Colors.
25
+ */
26
+ exports.colors = [
27
+ "#0000CC",
28
+ "#0000FF",
29
+ "#0033CC",
30
+ "#0033FF",
31
+ "#0066CC",
32
+ "#0066FF",
33
+ "#0099CC",
34
+ "#0099FF",
35
+ "#00CC00",
36
+ "#00CC33",
37
+ "#00CC66",
38
+ "#00CC99",
39
+ "#00CCCC",
40
+ "#00CCFF",
41
+ "#3300CC",
42
+ "#3300FF",
43
+ "#3333CC",
44
+ "#3333FF",
45
+ "#3366CC",
46
+ "#3366FF",
47
+ "#3399CC",
48
+ "#3399FF",
49
+ "#33CC00",
50
+ "#33CC33",
51
+ "#33CC66",
52
+ "#33CC99",
53
+ "#33CCCC",
54
+ "#33CCFF",
55
+ "#6600CC",
56
+ "#6600FF",
57
+ "#6633CC",
58
+ "#6633FF",
59
+ "#66CC00",
60
+ "#66CC33",
61
+ "#9900CC",
62
+ "#9900FF",
63
+ "#9933CC",
64
+ "#9933FF",
65
+ "#99CC00",
66
+ "#99CC33",
67
+ "#CC0000",
68
+ "#CC0033",
69
+ "#CC0066",
70
+ "#CC0099",
71
+ "#CC00CC",
72
+ "#CC00FF",
73
+ "#CC3300",
74
+ "#CC3333",
75
+ "#CC3366",
76
+ "#CC3399",
77
+ "#CC33CC",
78
+ "#CC33FF",
79
+ "#CC6600",
80
+ "#CC6633",
81
+ "#CC9900",
82
+ "#CC9933",
83
+ "#CCCC00",
84
+ "#CCCC33",
85
+ "#FF0000",
86
+ "#FF0033",
87
+ "#FF0066",
88
+ "#FF0099",
89
+ "#FF00CC",
90
+ "#FF00FF",
91
+ "#FF3300",
92
+ "#FF3333",
93
+ "#FF3366",
94
+ "#FF3399",
95
+ "#FF33CC",
96
+ "#FF33FF",
97
+ "#FF6600",
98
+ "#FF6633",
99
+ "#FF9900",
100
+ "#FF9933",
101
+ "#FFCC00",
102
+ "#FFCC33"
103
+ ];
104
+ /**
105
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
106
+ * and the Firebug extension (any Firefox version) are known
107
+ * to support "%c" CSS customizations.
108
+ *
109
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
110
+ */
111
+ function useColors() {
112
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return true;
113
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false;
114
+ let m;
115
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
116
+ }
117
+ /**
118
+ * Colorize log arguments if enabled.
119
+ *
120
+ * @api public
121
+ */
122
+ function formatArgs(args) {
123
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
124
+ if (!this.useColors) return;
125
+ const c = "color: " + this.color;
126
+ args.splice(1, 0, c, "color: inherit");
127
+ let index = 0;
128
+ let lastC = 0;
129
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
130
+ if (match === "%%") return;
131
+ index++;
132
+ if (match === "%c") lastC = index;
133
+ });
134
+ args.splice(lastC, 0, c);
135
+ }
136
+ /**
137
+ * Invokes `console.debug()` when available.
138
+ * No-op when `console.debug` is not a "function".
139
+ * If `console.debug` is not available, falls back
140
+ * to `console.log`.
141
+ *
142
+ * @api public
143
+ */
144
+ exports.log = console.debug || console.log || (() => {});
145
+ /**
146
+ * Save `namespaces`.
147
+ *
148
+ * @param {String} namespaces
149
+ * @api private
150
+ */
151
+ function save(namespaces) {
152
+ try {
153
+ if (namespaces) exports.storage.setItem("debug", namespaces);
154
+ else exports.storage.removeItem("debug");
155
+ } catch (error) {}
156
+ }
157
+ /**
158
+ * Load `namespaces`.
159
+ *
160
+ * @return {String} returns the previously persisted debug modes
161
+ * @api private
162
+ */
163
+ function load() {
164
+ let r;
165
+ try {
166
+ r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
167
+ } catch (error) {}
168
+ if (!r && typeof process !== "undefined" && "env" in process) r = process.env.DEBUG;
169
+ return r;
170
+ }
171
+ /**
172
+ * Localstorage attempts to return the localstorage.
173
+ *
174
+ * This is necessary because safari throws
175
+ * when a user disables cookies/localstorage
176
+ * and you attempt to access it.
177
+ *
178
+ * @return {LocalStorage}
179
+ * @api private
180
+ */
181
+ function localstorage() {
182
+ try {
183
+ return localStorage;
184
+ } catch (error) {}
185
+ }
186
+ module.exports = require_common()(exports);
187
+ const { formatters } = module.exports;
188
+ /**
189
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
190
+ */
191
+ formatters.j = function(v) {
192
+ try {
193
+ return JSON.stringify(v);
194
+ } catch (error) {
195
+ return "[UnexpectedJSONParseError]: " + error.message;
196
+ }
197
+ };
198
+ }) });
199
+
200
+ //#endregion
201
+ export default require_browser();
202
+
203
+ export { require_browser };
@@ -0,0 +1,209 @@
1
+ import { __commonJS } from "../../../../../../_virtual/rolldown_runtime.js";
2
+ import { require_ms } from "../../../../ms@2.1.3/node_modules/ms/index.js";
3
+
4
+ //#region ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js
5
+ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js": ((exports, module) => {
6
+ /**
7
+ * This is the common logic for both the Node.js and web browser
8
+ * implementations of `debug()`.
9
+ */
10
+ function setup(env) {
11
+ createDebug.debug = createDebug;
12
+ createDebug.default = createDebug;
13
+ createDebug.coerce = coerce;
14
+ createDebug.disable = disable;
15
+ createDebug.enable = enable;
16
+ createDebug.enabled = enabled;
17
+ createDebug.humanize = require_ms();
18
+ createDebug.destroy = destroy;
19
+ Object.keys(env).forEach((key) => {
20
+ createDebug[key] = env[key];
21
+ });
22
+ /**
23
+ * The currently active debug mode names, and names to skip.
24
+ */
25
+ createDebug.names = [];
26
+ createDebug.skips = [];
27
+ /**
28
+ * Map of special "%n" handling functions, for the debug "format" argument.
29
+ *
30
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
31
+ */
32
+ createDebug.formatters = {};
33
+ /**
34
+ * Selects a color for a debug namespace
35
+ * @param {String} namespace The namespace string for the debug instance to be colored
36
+ * @return {Number|String} An ANSI color code for the given namespace
37
+ * @api private
38
+ */
39
+ function selectColor(namespace) {
40
+ let hash = 0;
41
+ for (let i = 0; i < namespace.length; i++) {
42
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
43
+ hash |= 0;
44
+ }
45
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
46
+ }
47
+ createDebug.selectColor = selectColor;
48
+ /**
49
+ * Create a debugger with the given `namespace`.
50
+ *
51
+ * @param {String} namespace
52
+ * @return {Function}
53
+ * @api public
54
+ */
55
+ function createDebug(namespace) {
56
+ let prevTime;
57
+ let enableOverride = null;
58
+ let namespacesCache;
59
+ let enabledCache;
60
+ function debug(...args) {
61
+ if (!debug.enabled) return;
62
+ const self = debug;
63
+ const curr = Number(/* @__PURE__ */ new Date());
64
+ self.diff = curr - (prevTime || curr);
65
+ self.prev = prevTime;
66
+ self.curr = curr;
67
+ prevTime = curr;
68
+ args[0] = createDebug.coerce(args[0]);
69
+ if (typeof args[0] !== "string") args.unshift("%O");
70
+ let index = 0;
71
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
72
+ if (match === "%%") return "%";
73
+ index++;
74
+ const formatter = createDebug.formatters[format];
75
+ if (typeof formatter === "function") {
76
+ const val = args[index];
77
+ match = formatter.call(self, val);
78
+ args.splice(index, 1);
79
+ index--;
80
+ }
81
+ return match;
82
+ });
83
+ createDebug.formatArgs.call(self, args);
84
+ (self.log || createDebug.log).apply(self, args);
85
+ }
86
+ debug.namespace = namespace;
87
+ debug.useColors = createDebug.useColors();
88
+ debug.color = createDebug.selectColor(namespace);
89
+ debug.extend = extend;
90
+ debug.destroy = createDebug.destroy;
91
+ Object.defineProperty(debug, "enabled", {
92
+ enumerable: true,
93
+ configurable: false,
94
+ get: () => {
95
+ if (enableOverride !== null) return enableOverride;
96
+ if (namespacesCache !== createDebug.namespaces) {
97
+ namespacesCache = createDebug.namespaces;
98
+ enabledCache = createDebug.enabled(namespace);
99
+ }
100
+ return enabledCache;
101
+ },
102
+ set: (v) => {
103
+ enableOverride = v;
104
+ }
105
+ });
106
+ if (typeof createDebug.init === "function") createDebug.init(debug);
107
+ return debug;
108
+ }
109
+ function extend(namespace, delimiter) {
110
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
111
+ newDebug.log = this.log;
112
+ return newDebug;
113
+ }
114
+ /**
115
+ * Enables a debug mode by namespaces. This can include modes
116
+ * separated by a colon and wildcards.
117
+ *
118
+ * @param {String} namespaces
119
+ * @api public
120
+ */
121
+ function enable(namespaces) {
122
+ createDebug.save(namespaces);
123
+ createDebug.namespaces = namespaces;
124
+ createDebug.names = [];
125
+ createDebug.skips = [];
126
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
127
+ for (const ns of split) if (ns[0] === "-") createDebug.skips.push(ns.slice(1));
128
+ else createDebug.names.push(ns);
129
+ }
130
+ /**
131
+ * Checks if the given string matches a namespace template, honoring
132
+ * asterisks as wildcards.
133
+ *
134
+ * @param {String} search
135
+ * @param {String} template
136
+ * @return {Boolean}
137
+ */
138
+ function matchesTemplate(search, template) {
139
+ let searchIndex = 0;
140
+ let templateIndex = 0;
141
+ let starIndex = -1;
142
+ let matchIndex = 0;
143
+ while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
144
+ starIndex = templateIndex;
145
+ matchIndex = searchIndex;
146
+ templateIndex++;
147
+ } else {
148
+ searchIndex++;
149
+ templateIndex++;
150
+ }
151
+ else if (starIndex !== -1) {
152
+ templateIndex = starIndex + 1;
153
+ matchIndex++;
154
+ searchIndex = matchIndex;
155
+ } else return false;
156
+ while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
157
+ return templateIndex === template.length;
158
+ }
159
+ /**
160
+ * Disable debug output.
161
+ *
162
+ * @return {String} namespaces
163
+ * @api public
164
+ */
165
+ function disable() {
166
+ const namespaces = [...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace)].join(",");
167
+ createDebug.enable("");
168
+ return namespaces;
169
+ }
170
+ /**
171
+ * Returns true if the given mode name is enabled, false otherwise.
172
+ *
173
+ * @param {String} name
174
+ * @return {Boolean}
175
+ * @api public
176
+ */
177
+ function enabled(name) {
178
+ for (const skip of createDebug.skips) if (matchesTemplate(name, skip)) return false;
179
+ for (const ns of createDebug.names) if (matchesTemplate(name, ns)) return true;
180
+ return false;
181
+ }
182
+ /**
183
+ * Coerce `val`.
184
+ *
185
+ * @param {Mixed} val
186
+ * @return {Mixed}
187
+ * @api private
188
+ */
189
+ function coerce(val) {
190
+ if (val instanceof Error) return val.stack || val.message;
191
+ return val;
192
+ }
193
+ /**
194
+ * XXX DO NOT USE. This is a temporary stub function.
195
+ * XXX It WILL be removed in the next major release.
196
+ */
197
+ function destroy() {
198
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
199
+ }
200
+ createDebug.enable(createDebug.load());
201
+ return createDebug;
202
+ }
203
+ module.exports = setup;
204
+ }) });
205
+
206
+ //#endregion
207
+ export default require_common();
208
+
209
+ export { require_common };
@@ -0,0 +1,18 @@
1
+ import { __commonJS } from "../../../../../../_virtual/rolldown_runtime.js";
2
+ import { require_browser } from "./browser.js";
3
+ import { require_node } from "./node.js";
4
+
5
+ //#region ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js
6
+ var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js": ((exports, module) => {
7
+ /**
8
+ * Detect Electron renderer / nwjs process, which is node, but we should
9
+ * treat as a browser.
10
+ */
11
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) module.exports = require_browser();
12
+ else module.exports = require_node();
13
+ }) });
14
+
15
+ //#endregion
16
+ export default require_src();
17
+
18
+ export { require_src };
@@ -0,0 +1,215 @@
1
+ import { __commonJS, __require } from "../../../../../../_virtual/rolldown_runtime.js";
2
+ import { require_supports_color } from "../../../../supports-color@8.1.1/node_modules/supports-color/index.js";
3
+ import { require_common } from "./common.js";
4
+
5
+ //#region ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js
6
+ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js": ((exports, module) => {
7
+ /**
8
+ * Module dependencies.
9
+ */
10
+ const tty = __require("tty");
11
+ const util = __require("util");
12
+ /**
13
+ * This is the Node.js implementation of `debug()`.
14
+ */
15
+ exports.init = init;
16
+ exports.log = log;
17
+ exports.formatArgs = formatArgs;
18
+ exports.save = save;
19
+ exports.load = load;
20
+ exports.useColors = useColors;
21
+ exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
22
+ /**
23
+ * Colors.
24
+ */
25
+ exports.colors = [
26
+ 6,
27
+ 2,
28
+ 3,
29
+ 4,
30
+ 5,
31
+ 1
32
+ ];
33
+ try {
34
+ const supportsColor = require_supports_color();
35
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [
36
+ 20,
37
+ 21,
38
+ 26,
39
+ 27,
40
+ 32,
41
+ 33,
42
+ 38,
43
+ 39,
44
+ 40,
45
+ 41,
46
+ 42,
47
+ 43,
48
+ 44,
49
+ 45,
50
+ 56,
51
+ 57,
52
+ 62,
53
+ 63,
54
+ 68,
55
+ 69,
56
+ 74,
57
+ 75,
58
+ 76,
59
+ 77,
60
+ 78,
61
+ 79,
62
+ 80,
63
+ 81,
64
+ 92,
65
+ 93,
66
+ 98,
67
+ 99,
68
+ 112,
69
+ 113,
70
+ 128,
71
+ 129,
72
+ 134,
73
+ 135,
74
+ 148,
75
+ 149,
76
+ 160,
77
+ 161,
78
+ 162,
79
+ 163,
80
+ 164,
81
+ 165,
82
+ 166,
83
+ 167,
84
+ 168,
85
+ 169,
86
+ 170,
87
+ 171,
88
+ 172,
89
+ 173,
90
+ 178,
91
+ 179,
92
+ 184,
93
+ 185,
94
+ 196,
95
+ 197,
96
+ 198,
97
+ 199,
98
+ 200,
99
+ 201,
100
+ 202,
101
+ 203,
102
+ 204,
103
+ 205,
104
+ 206,
105
+ 207,
106
+ 208,
107
+ 209,
108
+ 214,
109
+ 215,
110
+ 220,
111
+ 221
112
+ ];
113
+ } catch (error) {}
114
+ /**
115
+ * Build up the default `inspectOpts` object from the environment variables.
116
+ *
117
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
118
+ */
119
+ exports.inspectOpts = Object.keys(process.env).filter((key) => {
120
+ return /^debug_/i.test(key);
121
+ }).reduce((obj, key) => {
122
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
123
+ return k.toUpperCase();
124
+ });
125
+ let val = process.env[key];
126
+ if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
127
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
128
+ else if (val === "null") val = null;
129
+ else val = Number(val);
130
+ obj[prop] = val;
131
+ return obj;
132
+ }, {});
133
+ /**
134
+ * Is stdout a TTY? Colored output is enabled when `true`.
135
+ */
136
+ function useColors() {
137
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
138
+ }
139
+ /**
140
+ * Adds ANSI color escape codes if enabled.
141
+ *
142
+ * @api public
143
+ */
144
+ function formatArgs(args) {
145
+ const { namespace: name, useColors: useColors$1 } = this;
146
+ if (useColors$1) {
147
+ const c = this.color;
148
+ const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
149
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
150
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
151
+ args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
152
+ } else args[0] = getDate() + name + " " + args[0];
153
+ }
154
+ function getDate() {
155
+ if (exports.inspectOpts.hideDate) return "";
156
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
157
+ }
158
+ /**
159
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
160
+ */
161
+ function log(...args) {
162
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n");
163
+ }
164
+ /**
165
+ * Save `namespaces`.
166
+ *
167
+ * @param {String} namespaces
168
+ * @api private
169
+ */
170
+ function save(namespaces) {
171
+ if (namespaces) process.env.DEBUG = namespaces;
172
+ else delete process.env.DEBUG;
173
+ }
174
+ /**
175
+ * Load `namespaces`.
176
+ *
177
+ * @return {String} returns the previously persisted debug modes
178
+ * @api private
179
+ */
180
+ function load() {
181
+ return process.env.DEBUG;
182
+ }
183
+ /**
184
+ * Init logic for `debug` instances.
185
+ *
186
+ * Create a new `inspectOpts` object in case `useColors` is set
187
+ * differently for a particular `debug` instance.
188
+ */
189
+ function init(debug) {
190
+ debug.inspectOpts = {};
191
+ const keys = Object.keys(exports.inspectOpts);
192
+ for (let i = 0; i < keys.length; i++) debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
193
+ }
194
+ module.exports = require_common()(exports);
195
+ const { formatters } = module.exports;
196
+ /**
197
+ * Map %o to `util.inspect()`, all on a single line.
198
+ */
199
+ formatters.o = function(v) {
200
+ this.inspectOpts.colors = this.useColors;
201
+ return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
202
+ };
203
+ /**
204
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
205
+ */
206
+ formatters.O = function(v) {
207
+ this.inspectOpts.colors = this.useColors;
208
+ return util.inspect(v, this.inspectOpts);
209
+ };
210
+ }) });
211
+
212
+ //#endregion
213
+ export default require_node();
214
+
215
+ export { require_node };
@@ -0,0 +1,24 @@
1
+ import { __commonJS } from "../../../../../../../_virtual/rolldown_runtime.js";
2
+
3
+ //#region ../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/convert/dmp.js
4
+ var require_dmp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/convert/dmp.js": ((exports) => {
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.convertChangesToDMP = convertChangesToDMP;
7
+ /*istanbul ignore end*/
8
+ function convertChangesToDMP(changes) {
9
+ var ret = [], change, operation;
10
+ for (var i = 0; i < changes.length; i++) {
11
+ change = changes[i];
12
+ if (change.added) operation = 1;
13
+ else if (change.removed) operation = -1;
14
+ else operation = 0;
15
+ ret.push([operation, change.value]);
16
+ }
17
+ return ret;
18
+ }
19
+ }) });
20
+
21
+ //#endregion
22
+ export default require_dmp();
23
+
24
+ export { require_dmp };
@@ -0,0 +1,33 @@
1
+ import { __commonJS } from "../../../../../../../_virtual/rolldown_runtime.js";
2
+
3
+ //#region ../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/convert/xml.js
4
+ var require_xml = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/diff@7.0.0/node_modules/diff/lib/convert/xml.js": ((exports) => {
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.convertChangesToXML = convertChangesToXML;
7
+ /*istanbul ignore end*/
8
+ function convertChangesToXML(changes) {
9
+ var ret = [];
10
+ for (var i = 0; i < changes.length; i++) {
11
+ var change = changes[i];
12
+ if (change.added) ret.push("<ins>");
13
+ else if (change.removed) ret.push("<del>");
14
+ ret.push(escapeHTML(change.value));
15
+ if (change.added) ret.push("</ins>");
16
+ else if (change.removed) ret.push("</del>");
17
+ }
18
+ return ret.join("");
19
+ }
20
+ function escapeHTML(s) {
21
+ var n = s;
22
+ n = n.replace(/&/g, "&amp;");
23
+ n = n.replace(/</g, "&lt;");
24
+ n = n.replace(/>/g, "&gt;");
25
+ n = n.replace(/"/g, "&quot;");
26
+ return n;
27
+ }
28
+ }) });
29
+
30
+ //#endregion
31
+ export default require_xml();
32
+
33
+ export { require_xml };