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

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.3/node_modules/workerpool/src/Pool.js +366 -0
  93. package/dist/node_modules/.pnpm/workerpool@9.3.3/node_modules/workerpool/src/Promise.js +248 -0
  94. package/dist/node_modules/.pnpm/workerpool@9.3.3/node_modules/workerpool/src/WorkerHandler.js +419 -0
  95. package/dist/node_modules/.pnpm/workerpool@9.3.3/node_modules/workerpool/src/debug-port-allocator.js +27 -0
  96. package/dist/node_modules/.pnpm/workerpool@9.3.3/node_modules/workerpool/src/environment.js +18 -0
  97. package/dist/node_modules/.pnpm/workerpool@9.3.3/node_modules/workerpool/src/generated/embeddedWorker.js +16 -0
  98. package/dist/node_modules/.pnpm/workerpool@9.3.3/node_modules/workerpool/src/index.js +63 -0
  99. package/dist/node_modules/.pnpm/workerpool@9.3.3/node_modules/workerpool/src/transfer.js +21 -0
  100. package/dist/node_modules/.pnpm/workerpool@9.3.3/node_modules/workerpool/src/validateOptions.js +9 -0
  101. package/dist/node_modules/.pnpm/workerpool@9.3.3/node_modules/workerpool/src/worker.js +281 -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,50 @@
1
+ import { __commonJS } from "../../../../../_virtual/rolldown_runtime.js";
2
+ import { require_conversions } from "./conversions.js";
3
+ import { require_route } from "./route.js";
4
+
5
+ //#region ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js
6
+ var require_color_convert = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js": ((exports, module) => {
7
+ const conversions = require_conversions();
8
+ const route = require_route();
9
+ const convert = {};
10
+ const models = Object.keys(conversions);
11
+ function wrapRaw(fn) {
12
+ const wrappedFn = function(...args) {
13
+ const arg0 = args[0];
14
+ if (arg0 === void 0 || arg0 === null) return arg0;
15
+ if (arg0.length > 1) args = arg0;
16
+ return fn(args);
17
+ };
18
+ if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
19
+ return wrappedFn;
20
+ }
21
+ function wrapRounded(fn) {
22
+ const wrappedFn = function(...args) {
23
+ const arg0 = args[0];
24
+ if (arg0 === void 0 || arg0 === null) return arg0;
25
+ if (arg0.length > 1) args = arg0;
26
+ const result = fn(args);
27
+ if (typeof result === "object") for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
28
+ return result;
29
+ };
30
+ if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
31
+ return wrappedFn;
32
+ }
33
+ models.forEach((fromModel) => {
34
+ convert[fromModel] = {};
35
+ Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
36
+ Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
37
+ const routes = route(fromModel);
38
+ Object.keys(routes).forEach((toModel) => {
39
+ const fn = routes[toModel];
40
+ convert[fromModel][toModel] = wrapRounded(fn);
41
+ convert[fromModel][toModel].raw = wrapRaw(fn);
42
+ });
43
+ });
44
+ module.exports = convert;
45
+ }) });
46
+
47
+ //#endregion
48
+ export default require_color_convert();
49
+
50
+ export { require_color_convert };
@@ -0,0 +1,68 @@
1
+ import { __commonJS } from "../../../../../_virtual/rolldown_runtime.js";
2
+ import { require_conversions } from "./conversions.js";
3
+
4
+ //#region ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
5
+ var require_route = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js": ((exports, module) => {
6
+ const conversions = require_conversions();
7
+ function buildGraph() {
8
+ const graph = {};
9
+ const models = Object.keys(conversions);
10
+ for (let len = models.length, i = 0; i < len; i++) graph[models[i]] = {
11
+ distance: -1,
12
+ parent: null
13
+ };
14
+ return graph;
15
+ }
16
+ function deriveBFS(fromModel) {
17
+ const graph = buildGraph();
18
+ const queue = [fromModel];
19
+ graph[fromModel].distance = 0;
20
+ while (queue.length) {
21
+ const current = queue.pop();
22
+ const adjacents = Object.keys(conversions[current]);
23
+ for (let len = adjacents.length, i = 0; i < len; i++) {
24
+ const adjacent = adjacents[i];
25
+ const node = graph[adjacent];
26
+ if (node.distance === -1) {
27
+ node.distance = graph[current].distance + 1;
28
+ node.parent = current;
29
+ queue.unshift(adjacent);
30
+ }
31
+ }
32
+ }
33
+ return graph;
34
+ }
35
+ function link(from, to) {
36
+ return function(args) {
37
+ return to(from(args));
38
+ };
39
+ }
40
+ function wrapConversion(toModel, graph) {
41
+ const path = [graph[toModel].parent, toModel];
42
+ let fn = conversions[graph[toModel].parent][toModel];
43
+ let cur = graph[toModel].parent;
44
+ while (graph[cur].parent) {
45
+ path.unshift(graph[cur].parent);
46
+ fn = link(conversions[graph[cur].parent][cur], fn);
47
+ cur = graph[cur].parent;
48
+ }
49
+ fn.conversion = path;
50
+ return fn;
51
+ }
52
+ module.exports = function(fromModel) {
53
+ const graph = deriveBFS(fromModel);
54
+ const conversion = {};
55
+ const models = Object.keys(graph);
56
+ for (let len = models.length, i = 0; i < len; i++) {
57
+ const toModel = models[i];
58
+ if (graph[toModel].parent === null) continue;
59
+ conversion[toModel] = wrapConversion(toModel, graph);
60
+ }
61
+ return conversion;
62
+ };
63
+ }) });
64
+
65
+ //#endregion
66
+ export default require_route();
67
+
68
+ export { require_route };