9router-imagefix 0.5.134 → 0.5.136

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 (190) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +10 -10
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  30. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  31. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  32. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  33. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  34. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  36. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  37. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  38. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  39. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  40. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  41. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  42. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  43. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  44. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  45. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  46. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  47. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  48. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  49. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  50. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  51. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/callback.html +1 -1
  53. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  54. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  55. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  56. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  57. package/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  58. package/app/.next-cli-build/server/app/dashboard/automation.rsc +6 -6
  59. package/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +6 -6
  60. package/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +6 -6
  61. package/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  62. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  63. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  64. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +6 -6
  65. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  66. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  67. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  68. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  69. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -6
  70. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  71. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  72. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  73. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  74. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +6 -6
  75. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  76. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  77. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  78. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  79. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
  80. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  81. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  83. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  84. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +6 -6
  85. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  86. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  88. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  89. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
  90. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  91. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  93. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  94. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +6 -6
  95. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  96. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  98. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  99. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +6 -6
  100. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  101. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  103. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  104. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +6 -6
  105. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  106. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  108. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  109. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
  110. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  111. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  112. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  113. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  114. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
  115. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  116. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  117. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  118. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  119. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -7
  120. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  121. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  122. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  123. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  124. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  125. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  126. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  127. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
  128. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  129. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  130. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +6 -6
  131. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  132. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  133. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  134. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  135. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
  136. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  137. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  138. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  139. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  140. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +6 -6
  141. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  142. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  143. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  144. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  145. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
  146. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  147. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  148. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  149. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  150. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
  151. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  152. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  153. package/app/.next-cli-build/server/app/index.html +1 -1
  154. package/app/.next-cli-build/server/app/index.rsc +4 -4
  155. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  156. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  157. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  158. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  159. package/app/.next-cli-build/server/app/landing.html +1 -1
  160. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  161. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  162. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  163. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  164. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  165. package/app/.next-cli-build/server/app/login.html +1 -1
  166. package/app/.next-cli-build/server/app/login.rsc +5 -5
  167. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  168. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  169. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
  170. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  171. package/app/.next-cli-build/server/app-paths-manifest.json +10 -10
  172. package/app/.next-cli-build/server/chunks/4037.js +1 -1
  173. package/app/.next-cli-build/server/chunks/4663.js +1 -1
  174. package/app/.next-cli-build/server/chunks/5524.js +1 -1
  175. package/app/.next-cli-build/server/chunks/576.js +1 -1
  176. package/app/.next-cli-build/server/chunks/827.js +1 -1
  177. package/app/.next-cli-build/server/chunks/8283.js +1 -1
  178. package/app/.next-cli-build/server/chunks/869.js +1 -1
  179. package/app/.next-cli-build/server/chunks/8895.js +3 -3
  180. package/app/.next-cli-build/server/chunks/8908.js +1 -1
  181. package/app/.next-cli-build/server/chunks/929.js +1 -1
  182. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  183. package/app/.next-cli-build/server/pages/404.html +1 -1
  184. package/app/.next-cli-build/server/pages/500.html +1 -1
  185. package/app/.next-cli-build/static/chunks/{1321-59c60463ef4767d6.js → 1321-1c530e5975955126.js} +1 -1
  186. package/app/node_modules/next/dist/cli/next-test.js +171 -0
  187. package/app/package.json +1 -1
  188. package/package.json +1 -1
  189. /package/app/.next-cli-build/static/{HWd3hFBCG4QBoaL02wAGi → KShBS6I4_7-mtcIrc3qd2}/_buildManifest.js +0 -0
  190. /package/app/.next-cli-build/static/{HWd3hFBCG4QBoaL02wAGi → KShBS6I4_7-mtcIrc3qd2}/_ssgManifest.js +0 -0
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ SUPPORTED_TEST_RUNNERS_LIST: null,
7
+ nextTest: null
8
+ });
9
+ function _export(target, all) {
10
+ for(var name in all)Object.defineProperty(target, name, {
11
+ enumerable: true,
12
+ get: all[name]
13
+ });
14
+ }
15
+ _export(exports, {
16
+ SUPPORTED_TEST_RUNNERS_LIST: function() {
17
+ return SUPPORTED_TEST_RUNNERS_LIST;
18
+ },
19
+ nextTest: function() {
20
+ return nextTest;
21
+ }
22
+ });
23
+ const _fs = require("fs");
24
+ const _getprojectdir = require("../lib/get-project-dir");
25
+ const _utils = require("../server/lib/utils");
26
+ const _config = /*#__PURE__*/ _interop_require_default(require("../server/config"));
27
+ const _constants = require("../shared/lib/constants");
28
+ const _hasnecessarydependencies = require("../lib/has-necessary-dependencies");
29
+ const _installdependencies = require("../lib/install-dependencies");
30
+ const _findup = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/find-up"));
31
+ const _findpagesdir = require("../lib/find-pages-dir");
32
+ const _verifytypescriptsetup = require("../lib/verify-typescript-setup");
33
+ const _path = /*#__PURE__*/ _interop_require_default(require("path"));
34
+ const _crossspawn = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/cross-spawn"));
35
+ function _interop_require_default(obj) {
36
+ return obj && obj.__esModule ? obj : {
37
+ default: obj
38
+ };
39
+ }
40
+ const SUPPORTED_TEST_RUNNERS_LIST = [
41
+ 'playwright'
42
+ ];
43
+ const requiredPackagesByTestRunner = {
44
+ playwright: [
45
+ {
46
+ file: 'playwright',
47
+ pkg: '@playwright/test',
48
+ exportsRestrict: false
49
+ }
50
+ ]
51
+ };
52
+ async function nextTest(directory, testRunnerArgs = [], options = {}) {
53
+ // The following mess is in order to support an existing Next.js CLI pattern of optionally, passing a project `directory` as the first argument to execute the command on.
54
+ // This is problematic for `next test` because as a wrapper around a test runner's `test` command, it needs to pass through any additional arguments and options.
55
+ // Thus, `directory` could either be a valid Next.js project directory (that the user intends to run `next test` on), or it is the first argument for the test runner.
56
+ // Unfortunately, since many test runners support passing a path (to a test file or directory containing test files), we must check if `directory` is both a valid path and a valid Next.js project.
57
+ let baseDir, nextConfig;
58
+ try {
59
+ // if directory is `undefined` or a valid path this will succeed.
60
+ baseDir = (0, _getprojectdir.getProjectDir)(directory, false);
61
+ } catch (err) {
62
+ // if that failed, then `directory` is not a valid path, so it must have meant to be the first item for `testRunnerArgs`
63
+ // @ts-expect-error directory is a string here since `getProjectDir` will succeed if its undefined
64
+ testRunnerArgs.unshift(directory);
65
+ // intentionally set baseDir to the resolved '.' path
66
+ baseDir = (0, _getprojectdir.getProjectDir)();
67
+ }
68
+ try {
69
+ // but, `baseDir` might not be a Next.js project directory, it could be a path-like argument for the test runner (i.e. `playwright test test/foo.spec.js`)
70
+ // if this succeeds, it means that `baseDir` is a Next.js project directory
71
+ nextConfig = await (0, _config.default)(_constants.PHASE_PRODUCTION_BUILD, baseDir);
72
+ } catch (err) {
73
+ // if it doesn't, then most likely `baseDir` is not a Next.js project directory
74
+ // @ts-expect-error directory is a string here since `getProjectDir` will succeed if its undefined
75
+ testRunnerArgs.unshift(directory);
76
+ // intentionally set baseDir to the resolved '.' path
77
+ baseDir = (0, _getprojectdir.getProjectDir)();
78
+ nextConfig = await (0, _config.default)(_constants.PHASE_PRODUCTION_BUILD, baseDir) // let this error bubble up if the `basePath` is still not a valid Next.js project
79
+ ;
80
+ }
81
+ // set the test runner. priority is CLI option > next config > default 'playwright'
82
+ const configuredTestRunner = (options == null ? void 0 : options.testRunner) ?? // --test-runner='foo'
83
+ nextConfig.experimental.defaultTestRunner ?? // { experimental: { defaultTestRunner: 'foo' }}
84
+ 'playwright';
85
+ if (!nextConfig.experimental.testProxy) {
86
+ return (0, _utils.printAndExit)(`\`next experimental-test\` requires the \`experimental.testProxy: true\` configuration option.`);
87
+ }
88
+ // execute test runner specific function
89
+ switch(configuredTestRunner){
90
+ case 'playwright':
91
+ return runPlaywright(baseDir, nextConfig, testRunnerArgs);
92
+ default:
93
+ return (0, _utils.printAndExit)(`Test runner ${configuredTestRunner} is not supported.`);
94
+ }
95
+ }
96
+ async function checkRequiredDeps(baseDir, testRunner) {
97
+ const deps = (0, _hasnecessarydependencies.hasNecessaryDependencies)(baseDir, requiredPackagesByTestRunner[testRunner]);
98
+ if (deps.missing.length > 0) {
99
+ await (0, _installdependencies.installDependencies)(baseDir, deps.missing, true);
100
+ const playwright = (0, _crossspawn.default)(_path.default.join(baseDir, 'node_modules', '.bin', 'playwright'), [
101
+ 'install'
102
+ ], {
103
+ cwd: baseDir,
104
+ shell: false,
105
+ stdio: 'inherit',
106
+ env: {
107
+ ...process.env
108
+ }
109
+ });
110
+ return new Promise((resolve, reject)=>{
111
+ playwright.on('close', (c)=>resolve(c));
112
+ playwright.on('error', (err)=>reject(err));
113
+ });
114
+ }
115
+ }
116
+ async function runPlaywright(baseDir, nextConfig, testRunnerArgs) {
117
+ await checkRequiredDeps(baseDir, 'playwright');
118
+ const playwrightConfigFile = await (0, _findup.default)([
119
+ 'playwright.config.js',
120
+ 'playwright.config.ts'
121
+ ], {
122
+ cwd: baseDir
123
+ });
124
+ if (!playwrightConfigFile) {
125
+ const { pagesDir, appDir } = (0, _findpagesdir.findPagesDir)(baseDir);
126
+ const { version: typeScriptVersion } = await (0, _verifytypescriptsetup.verifyAndRunTypeScript)({
127
+ dir: baseDir,
128
+ distDir: nextConfig.distDir,
129
+ strictRouteTypes: Boolean(nextConfig.experimental.strictRouteTypes),
130
+ shouldRunTypeCheck: false,
131
+ tsconfigPath: nextConfig.typescript.tsconfigPath,
132
+ typedRoutes: Boolean(nextConfig.typedRoutes),
133
+ disableStaticImages: nextConfig.images.disableStaticImages,
134
+ hasAppDir: !!appDir,
135
+ hasPagesDir: !!pagesDir,
136
+ appDir: appDir || undefined,
137
+ pagesDir: pagesDir || undefined,
138
+ useTypeScriptCli: Boolean(nextConfig.experimental.useTypeScriptCli)
139
+ });
140
+ const isUsingTypeScript = !!typeScriptVersion;
141
+ const playwrightConfigFilename = isUsingTypeScript ? 'playwright.config.ts' : 'playwright.config.js';
142
+ (0, _fs.writeFileSync)(_path.default.join(baseDir, playwrightConfigFilename), defaultPlaywrightConfig(isUsingTypeScript));
143
+ return (0, _utils.printAndExit)(`Successfully generated ${playwrightConfigFilename}. Create your first test and then run \`next experimental-test\`.`, 0);
144
+ } else {
145
+ const playwright = (0, _crossspawn.default)(_path.default.join(baseDir, 'node_modules', '.bin', 'playwright'), [
146
+ 'test',
147
+ ...testRunnerArgs
148
+ ], {
149
+ cwd: baseDir,
150
+ shell: false,
151
+ stdio: 'inherit',
152
+ env: {
153
+ ...process.env
154
+ }
155
+ });
156
+ return new Promise((resolve, reject)=>{
157
+ playwright.on('close', (c)=>resolve(c));
158
+ playwright.on('error', (err)=>reject(err));
159
+ });
160
+ }
161
+ }
162
+ function defaultPlaywrightConfig(typescript) {
163
+ const comment = `/*
164
+ * Specify any additional Playwright config options here.
165
+ * They will be merged with Next.js' default Playwright config.
166
+ * You can access the default config by importing \`defaultPlaywrightConfig\` from \`'next/experimental/testmode/playwright'\`.
167
+ */`;
168
+ return typescript ? `import { defineConfig } from 'next/experimental/testmode/playwright';\n\n${comment}\nexport default defineConfig({});` : `const { defineConfig } = require('next/experimental/testmode/playwright');\n\n${comment}\nmodule.exports = defineConfig({});`;
169
+ }
170
+
171
+ //# sourceMappingURL=next-test.js.map
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "9router-app",
3
- "version": "0.5.134",
3
+ "version": "0.5.136",
4
4
  "description": "9Router web dashboard",
5
5
  "private": true,
6
6
  "scripts": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "9router-imagefix",
3
- "version": "0.5.134",
3
+ "version": "0.5.136",
4
4
  "description": "9Router CLI - Start and manage 9Router server (with image fix)",
5
5
  "bin": {
6
6
  "9router-imagefix": "./cli.js"