@automattic/vip 4.1.5 → 4.1.6

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 (1545) hide show
  1. package/assets/dev-env.lando.template.yml.ejs +6 -2
  2. package/config/config.local.json +6 -0
  3. package/dist/bin/vip-config-software-get.js +9 -0
  4. package/dist/bin/vip-wp.js +128 -39
  5. package/dist/lib/client-file-uploader.js +34 -5
  6. package/dist/lib/config/software.js +42 -2
  7. package/dist/lib/dev-environment/dev-environment-core.js +1 -1
  8. package/helpers/generate-docs.js +9 -3
  9. package/node_modules/@apollo/client/CHANGELOG.md +32 -0
  10. package/node_modules/@apollo/client/__cjs/cache/core/cache.cjs +1 -1
  11. package/node_modules/@apollo/client/__cjs/cache/core/cache.cjs.map +1 -1
  12. package/node_modules/@apollo/client/__cjs/cache/core/cache.d.cts +4 -1
  13. package/node_modules/@apollo/client/__cjs/cache/core/types/Cache.d.cts +5 -0
  14. package/node_modules/@apollo/client/__cjs/cache/inmemory/entityStore.cjs +4 -4
  15. package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.cjs +15 -5
  16. package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
  17. package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.d.cts +3 -1
  18. package/node_modules/@apollo/client/__cjs/cache/inmemory/key-extractor.cjs +1 -1
  19. package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.cjs +5 -5
  20. package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.cjs +28 -10
  21. package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
  22. package/node_modules/@apollo/client/__cjs/cache/inmemory/types.d.cts +7 -2
  23. package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.cjs +29 -14
  24. package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
  25. package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.d.cts +5 -2
  26. package/node_modules/@apollo/client/__cjs/core/ApolloClient.cjs +14 -14
  27. package/node_modules/@apollo/client/__cjs/core/ObservableQuery.cjs +8 -8
  28. package/node_modules/@apollo/client/__cjs/core/QueryInfo.cjs +13 -32
  29. package/node_modules/@apollo/client/__cjs/core/QueryInfo.cjs.map +1 -1
  30. package/node_modules/@apollo/client/__cjs/core/QueryManager.cjs +12 -12
  31. package/node_modules/@apollo/client/__cjs/core/RefetchEventManager.cjs +3 -3
  32. package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.cjs +15 -2
  33. package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.cjs.map +1 -1
  34. package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.d.cts +5 -1
  35. package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs +58 -14
  36. package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs.map +1 -1
  37. package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.d.cts +23 -12
  38. package/node_modules/@apollo/client/__cjs/incremental/handlers/notImplemented.cjs +1 -1
  39. package/node_modules/@apollo/client/__cjs/incremental/types.d.cts +19 -1
  40. package/node_modules/@apollo/client/__cjs/invariantErrorCodes.cjs +64 -58
  41. package/node_modules/@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
  42. package/node_modules/@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs.map +1 -1
  43. package/node_modules/@apollo/client/__cjs/utilities/internal/index.cjs.map +1 -1
  44. package/node_modules/@apollo/client/__cjs/utilities/internal/index.d.cts +0 -1
  45. package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.cjs +24 -26
  46. package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.cjs.map +1 -1
  47. package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.d.cts +1 -1
  48. package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.cjs +24 -20
  49. package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.cjs.map +1 -1
  50. package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.d.cts +1 -1
  51. package/node_modules/@apollo/client/__cjs/version.cjs +1 -1
  52. package/node_modules/@apollo/client/cache/core/cache.d.ts +4 -1
  53. package/node_modules/@apollo/client/cache/core/cache.js +1 -1
  54. package/node_modules/@apollo/client/cache/core/cache.js.map +1 -1
  55. package/node_modules/@apollo/client/cache/core/types/Cache.d.ts +5 -0
  56. package/node_modules/@apollo/client/cache/core/types/Cache.js.map +1 -1
  57. package/node_modules/@apollo/client/cache/inmemory/entityStore.js +4 -4
  58. package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.d.ts +3 -1
  59. package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js +15 -5
  60. package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js.map +1 -1
  61. package/node_modules/@apollo/client/cache/inmemory/key-extractor.js +1 -1
  62. package/node_modules/@apollo/client/cache/inmemory/policies.js +5 -5
  63. package/node_modules/@apollo/client/cache/inmemory/readFromStore.js +28 -10
  64. package/node_modules/@apollo/client/cache/inmemory/readFromStore.js.map +1 -1
  65. package/node_modules/@apollo/client/cache/inmemory/types.d.ts +7 -2
  66. package/node_modules/@apollo/client/cache/inmemory/types.js.map +1 -1
  67. package/node_modules/@apollo/client/cache/inmemory/writeToStore.d.ts +5 -2
  68. package/node_modules/@apollo/client/cache/inmemory/writeToStore.js +30 -15
  69. package/node_modules/@apollo/client/cache/inmemory/writeToStore.js.map +1 -1
  70. package/node_modules/@apollo/client/core/ApolloClient.js +14 -14
  71. package/node_modules/@apollo/client/core/ObservableQuery.js +8 -8
  72. package/node_modules/@apollo/client/core/QueryInfo.js +14 -33
  73. package/node_modules/@apollo/client/core/QueryInfo.js.map +1 -1
  74. package/node_modules/@apollo/client/core/QueryManager.js +12 -12
  75. package/node_modules/@apollo/client/core/RefetchEventManager.js +3 -3
  76. package/node_modules/@apollo/client/incremental/handlers/defer20220824.d.ts +5 -1
  77. package/node_modules/@apollo/client/incremental/handlers/defer20220824.js +15 -2
  78. package/node_modules/@apollo/client/incremental/handlers/defer20220824.js.map +1 -1
  79. package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.d.ts +23 -12
  80. package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.js +58 -14
  81. package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.js.map +1 -1
  82. package/node_modules/@apollo/client/incremental/handlers/notImplemented.js +1 -1
  83. package/node_modules/@apollo/client/incremental/types.d.ts +19 -1
  84. package/node_modules/@apollo/client/incremental/types.js.map +1 -1
  85. package/node_modules/@apollo/client/invariantErrorCodes.js +64 -58
  86. package/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js +1 -1
  87. package/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js.map +1 -1
  88. package/node_modules/@apollo/client/package.json +1 -1
  89. package/node_modules/@apollo/client/utilities/internal/index.d.ts +0 -1
  90. package/node_modules/@apollo/client/utilities/internal/index.js.map +1 -1
  91. package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.d.ts +1 -1
  92. package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.js +23 -25
  93. package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.js.map +1 -1
  94. package/node_modules/@apollo/client/utilities/internal/isStreamField.d.ts +1 -1
  95. package/node_modules/@apollo/client/utilities/internal/isStreamField.js +23 -19
  96. package/node_modules/@apollo/client/utilities/internal/isStreamField.js.map +1 -1
  97. package/node_modules/@apollo/client/version.js +1 -1
  98. package/node_modules/@types/node/README.md +1 -1
  99. package/node_modules/@types/node/crypto.d.ts +2 -2
  100. package/node_modules/@types/node/dgram.d.ts +1 -1
  101. package/node_modules/@types/node/package.json +2 -2
  102. package/node_modules/@types/node/util.d.ts +6 -3
  103. package/node_modules/@types/node/zlib.d.ts +6 -0
  104. package/node_modules/axios/CHANGELOG.md +62 -0
  105. package/node_modules/axios/README.md +297 -5
  106. package/node_modules/axios/dist/axios.js +728 -170
  107. package/node_modules/axios/dist/axios.min.js +3 -3
  108. package/node_modules/axios/dist/axios.min.js.map +1 -1
  109. package/node_modules/axios/dist/browser/axios.cjs +871 -188
  110. package/node_modules/axios/dist/esm/axios.js +871 -188
  111. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  112. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  113. package/node_modules/axios/dist/node/axios.cjs +1037 -225
  114. package/node_modules/axios/index.d.cts +102 -74
  115. package/node_modules/axios/index.d.ts +100 -68
  116. package/node_modules/axios/lib/adapters/fetch.js +64 -11
  117. package/node_modules/axios/lib/adapters/http.js +140 -67
  118. package/node_modules/axios/lib/adapters/xhr.js +52 -3
  119. package/node_modules/axios/lib/core/Axios.js +43 -20
  120. package/node_modules/axios/lib/core/AxiosError.js +33 -2
  121. package/node_modules/axios/lib/core/AxiosHeaders.js +124 -1
  122. package/node_modules/axios/lib/core/InterceptorManager.js +107 -8
  123. package/node_modules/axios/lib/core/buildFullPath.js +41 -15
  124. package/node_modules/axios/lib/core/dispatchRequest.js +8 -2
  125. package/node_modules/axios/lib/core/mergeConfig.js +19 -4
  126. package/node_modules/axios/lib/core/methodList.js +17 -0
  127. package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  128. package/node_modules/axios/lib/defaults/index.js +2 -1
  129. package/node_modules/axios/lib/env/data.js +1 -1
  130. package/node_modules/axios/lib/helpers/Http2Sessions.js +2 -0
  131. package/node_modules/axios/lib/helpers/HttpStatusCode.js +12 -1
  132. package/node_modules/axios/lib/helpers/combineURLs.js +11 -3
  133. package/node_modules/axios/lib/helpers/composeSignals.js +12 -1
  134. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +115 -54
  135. package/node_modules/axios/lib/helpers/formDataToJSON.js +11 -5
  136. package/node_modules/axios/lib/helpers/fromDataURI.js +5 -4
  137. package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  138. package/node_modules/axios/lib/helpers/parseHeaders.js +5 -3
  139. package/node_modules/axios/lib/helpers/progressEventReducer.js +4 -4
  140. package/node_modules/axios/lib/helpers/resolveConfig.js +5 -17
  141. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +300 -5
  142. package/node_modules/axios/lib/helpers/throttle.js +3 -2
  143. package/node_modules/axios/lib/helpers/toFormData.js +17 -23
  144. package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  145. package/node_modules/axios/lib/utils.js +151 -18
  146. package/node_modules/axios/package.json +21 -19
  147. package/node_modules/chalk/package.json +1 -1
  148. package/node_modules/chalk/source/index.js +2 -1
  149. package/node_modules/cpu-features/build/config.gypi +2 -2
  150. package/node_modules/ejs/README.md +64 -28
  151. package/node_modules/ejs/bin/cli.js +220 -158
  152. package/node_modules/ejs/ejs.js +64 -94
  153. package/node_modules/ejs/ejs.min.js +1 -1
  154. package/node_modules/ejs/jakefile.js +44 -0
  155. package/node_modules/ejs/lib/cjs/ejs.js +64 -63
  156. package/node_modules/ejs/lib/cjs/parseargs.js +129 -77
  157. package/node_modules/ejs/lib/cjs/utils.js +0 -31
  158. package/node_modules/ejs/lib/esm/ejs.js +66 -65
  159. package/node_modules/ejs/lib/esm/parseargs.js +136 -82
  160. package/node_modules/ejs/lib/esm/utils.js +0 -32
  161. package/node_modules/ejs/package.json +3 -2
  162. package/node_modules/ejs/usage.txt +9 -9
  163. package/node_modules/follow-redirects/index.js +10 -1
  164. package/node_modules/follow-redirects/package.json +1 -1
  165. package/node_modules/graphql-ws/dist/client.cjs +28 -13
  166. package/node_modules/graphql-ws/dist/client.js +28 -13
  167. package/node_modules/graphql-ws/dist/index.cjs +1 -1
  168. package/node_modules/graphql-ws/dist/index.d.cts +1 -1
  169. package/node_modules/graphql-ws/dist/index.d.ts +1 -1
  170. package/node_modules/graphql-ws/dist/index.js +1 -1
  171. package/node_modules/graphql-ws/dist/{server-B8ZBs9OC.d.ts → server-BzBeHlSW.d.ts} +26 -1
  172. package/node_modules/graphql-ws/dist/{server-DN5-9C2B.cjs → server-Ce-Z86Ys.cjs} +10 -4
  173. package/node_modules/graphql-ws/dist/{server-ChpuX357.d.cts → server-u6zrlwzL.d.cts} +26 -1
  174. package/node_modules/graphql-ws/dist/{server-DHPI7HHW.js → server-zBhvXJ_Z.js} +10 -4
  175. package/node_modules/graphql-ws/dist/use/@fastify/websocket.cjs +2 -2
  176. package/node_modules/graphql-ws/dist/use/@fastify/websocket.d.cts +8 -2
  177. package/node_modules/graphql-ws/dist/use/@fastify/websocket.d.ts +8 -2
  178. package/node_modules/graphql-ws/dist/use/@fastify/websocket.js +2 -2
  179. package/node_modules/graphql-ws/dist/use/bun.cjs +1 -1
  180. package/node_modules/graphql-ws/dist/use/bun.d.cts +2 -2
  181. package/node_modules/graphql-ws/dist/use/bun.d.ts +2 -2
  182. package/node_modules/graphql-ws/dist/use/bun.js +2 -2
  183. package/node_modules/graphql-ws/dist/use/crossws.cjs +16 -4
  184. package/node_modules/graphql-ws/dist/use/crossws.d.cts +6 -1
  185. package/node_modules/graphql-ws/dist/use/crossws.d.ts +6 -1
  186. package/node_modules/graphql-ws/dist/use/crossws.js +16 -4
  187. package/node_modules/graphql-ws/dist/use/deno.d.ts +1 -1
  188. package/node_modules/graphql-ws/dist/use/deno.js +1 -1
  189. package/node_modules/graphql-ws/dist/use/uWebSockets.cjs +2 -2
  190. package/node_modules/graphql-ws/dist/use/uWebSockets.d.cts +8 -2
  191. package/node_modules/graphql-ws/dist/use/uWebSockets.d.ts +8 -2
  192. package/node_modules/graphql-ws/dist/use/uWebSockets.js +2 -2
  193. package/node_modules/graphql-ws/dist/use/ws.cjs +2 -2
  194. package/node_modules/graphql-ws/dist/use/ws.d.cts +8 -2
  195. package/node_modules/graphql-ws/dist/use/ws.d.ts +8 -2
  196. package/node_modules/graphql-ws/dist/use/ws.js +2 -2
  197. package/node_modules/graphql-ws/package.json +3 -3
  198. package/node_modules/graphql-ws/umd/graphql-ws.js +28 -13
  199. package/node_modules/graphql-ws/umd/graphql-ws.min.js +1 -1
  200. package/node_modules/graphql-ws/umd/graphql-ws.min.js.gz +0 -0
  201. package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +522 -495
  202. package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
  203. package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +24 -24
  204. package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
  205. package/node_modules/js-yaml/dist/js-yaml.cjs.js +135 -78
  206. package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
  207. package/node_modules/js-yaml/dist/js-yaml.mjs +129 -72
  208. package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
  209. package/node_modules/js-yaml/node_modules/argparse/LICENSE +47 -0
  210. package/node_modules/js-yaml/node_modules/argparse/README.md +89 -0
  211. package/node_modules/js-yaml/node_modules/argparse/lib/_colorize.js +72 -0
  212. package/node_modules/js-yaml/node_modules/argparse/lib/argparse.d.ts +292 -0
  213. package/node_modules/{argparse → js-yaml/node_modules/argparse/lib}/argparse.js +1142 -1029
  214. package/node_modules/js-yaml/node_modules/argparse/lib/difflib.js +190 -0
  215. package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/sub.js +4 -4
  216. package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/textwrap.js +28 -28
  217. package/node_modules/js-yaml/node_modules/argparse/package.json +38 -0
  218. package/node_modules/js-yaml/package.json +12 -12
  219. package/node_modules/lando/.github/dependabot.yml +4 -0
  220. package/node_modules/lando/.github/workflows/build-util-images.yml +1 -1
  221. package/node_modules/lando/.github/workflows/pr-core-tests.yml +4 -2
  222. package/node_modules/lando/.github/workflows/pr-db-tools-tests.yml +4 -2
  223. package/node_modules/lando/.github/workflows/pr-django-tests.yml +4 -2
  224. package/node_modules/lando/.github/workflows/pr-linter.yml +2 -2
  225. package/node_modules/lando/.github/workflows/pr-unit-tests.yml +2 -2
  226. package/node_modules/lando/.node-version +1 -1
  227. package/node_modules/lando/bin/lando.js +3 -83
  228. package/node_modules/lando/config.yml +0 -1
  229. package/node_modules/lando/eslint.config.mjs +4 -0
  230. package/node_modules/lando/examples/django/.lando.yml +1 -1
  231. package/node_modules/lando/examples/django/README.md +1 -1
  232. package/node_modules/lando/examples/django/requirements.txt +1 -1
  233. package/node_modules/lando/examples/sql-export/README.md +5 -0
  234. package/node_modules/lando/lib/app.js +78 -84
  235. package/node_modules/lando/lib/art.js +86 -30
  236. package/node_modules/lando/lib/bootstrap.js +148 -45
  237. package/node_modules/lando/lib/cache.js +14 -15
  238. package/node_modules/lando/lib/cli.js +67 -63
  239. package/node_modules/lando/lib/compose.js +76 -45
  240. package/node_modules/lando/lib/config.js +51 -33
  241. package/node_modules/lando/lib/daemon.js +27 -10
  242. package/node_modules/lando/lib/docker.js +46 -19
  243. package/node_modules/lando/lib/engine.js +131 -144
  244. package/node_modules/lando/lib/env.js +25 -46
  245. package/node_modules/lando/lib/error.js +15 -6
  246. package/node_modules/lando/lib/esm/package.json +3 -0
  247. package/node_modules/lando/lib/esm/string-argv.js +2 -0
  248. package/node_modules/lando/lib/esm/yargs.js +2 -0
  249. package/node_modules/lando/lib/events.js +15 -15
  250. package/node_modules/lando/lib/factory.js +43 -14
  251. package/node_modules/lando/lib/formatters.js +19 -31
  252. package/node_modules/lando/lib/lando.js +59 -48
  253. package/node_modules/lando/lib/logger.js +12 -24
  254. package/node_modules/lando/lib/plugins.js +27 -15
  255. package/node_modules/lando/lib/promise.js +17 -17
  256. package/node_modules/lando/lib/router.js +75 -21
  257. package/node_modules/lando/lib/scan.js +29 -12
  258. package/node_modules/lando/lib/shell.js +44 -20
  259. package/node_modules/lando/lib/user.js +14 -20
  260. package/node_modules/lando/lib/utils.js +87 -44
  261. package/node_modules/lando/lib/yaml.js +11 -9
  262. package/node_modules/lando/node_modules/ansi-regex/index.d.ts +33 -0
  263. package/node_modules/lando/node_modules/ansi-regex/index.js +15 -0
  264. package/node_modules/lando/node_modules/ansi-regex/package.json +61 -0
  265. package/node_modules/lando/node_modules/ansi-regex/readme.md +66 -0
  266. package/node_modules/lando/node_modules/cliui/README.md +26 -6
  267. package/node_modules/lando/node_modules/cliui/build/lib/index.js +2 -2
  268. package/node_modules/lando/node_modules/cliui/build/tsconfig.tsbuildinfo +1 -0
  269. package/node_modules/lando/node_modules/cliui/index.mjs +7 -5
  270. package/node_modules/lando/node_modules/cliui/node_modules/string-width/index.d.ts +39 -0
  271. package/node_modules/lando/node_modules/cliui/node_modules/string-width/index.js +82 -0
  272. package/node_modules/lando/node_modules/cliui/node_modules/string-width/license +9 -0
  273. package/node_modules/lando/node_modules/cliui/node_modules/string-width/package.json +64 -0
  274. package/node_modules/lando/node_modules/cliui/node_modules/string-width/readme.md +66 -0
  275. package/node_modules/lando/node_modules/cliui/package.json +21 -32
  276. package/node_modules/lando/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  277. package/node_modules/lando/node_modules/emoji-regex/README.md +107 -0
  278. package/node_modules/lando/node_modules/emoji-regex/index.d.ts +3 -0
  279. package/node_modules/lando/node_modules/emoji-regex/index.js +4 -0
  280. package/node_modules/lando/node_modules/emoji-regex/index.mjs +4 -0
  281. package/node_modules/lando/node_modules/emoji-regex/package.json +45 -0
  282. package/node_modules/lando/node_modules/string-width/index.d.ts +39 -0
  283. package/node_modules/lando/node_modules/string-width/index.js +203 -0
  284. package/node_modules/lando/node_modules/string-width/license +9 -0
  285. package/node_modules/lando/node_modules/string-width/package.json +65 -0
  286. package/node_modules/lando/node_modules/string-width/readme.md +66 -0
  287. package/node_modules/lando/node_modules/strip-ansi/index.d.ts +15 -0
  288. package/node_modules/lando/node_modules/strip-ansi/index.js +19 -0
  289. package/node_modules/lando/node_modules/strip-ansi/license +9 -0
  290. package/node_modules/lando/node_modules/strip-ansi/package.json +59 -0
  291. package/node_modules/lando/node_modules/strip-ansi/readme.md +37 -0
  292. package/node_modules/lando/node_modules/yargs/README.md +16 -36
  293. package/node_modules/lando/node_modules/yargs/browser.d.ts +5 -0
  294. package/node_modules/lando/node_modules/yargs/browser.mjs +2 -2
  295. package/node_modules/lando/node_modules/yargs/build/lib/command.js +308 -211
  296. package/node_modules/lando/node_modules/yargs/build/lib/completion-templates.js +28 -9
  297. package/node_modules/lando/node_modules/yargs/build/lib/completion.js +233 -91
  298. package/node_modules/lando/node_modules/yargs/build/lib/middleware.js +51 -16
  299. package/node_modules/lando/node_modules/yargs/build/lib/usage.js +88 -52
  300. package/node_modules/lando/node_modules/yargs/build/lib/utils/apply-extends.js +4 -2
  301. package/node_modules/lando/node_modules/yargs/build/lib/utils/levenshtein.js +9 -1
  302. package/node_modules/lando/node_modules/yargs/build/lib/utils/maybe-async-result.js +17 -0
  303. package/node_modules/lando/node_modules/yargs/build/lib/validation.js +51 -54
  304. package/node_modules/lando/node_modules/yargs/build/lib/yargs-factory.js +1261 -887
  305. package/node_modules/lando/node_modules/yargs/build/lib/yerror.js +3 -1
  306. package/node_modules/lando/node_modules/yargs/index.mjs +4 -2
  307. package/node_modules/lando/node_modules/yargs/lib/platform-shims/browser.mjs +9 -2
  308. package/node_modules/lando/node_modules/yargs/lib/platform-shims/esm.mjs +22 -22
  309. package/node_modules/lando/node_modules/yargs/locales/cs.json +51 -0
  310. package/node_modules/lando/node_modules/yargs/locales/de.json +1 -1
  311. package/node_modules/lando/node_modules/yargs/locales/en.json +4 -0
  312. package/node_modules/lando/node_modules/yargs/locales/fi.json +1 -1
  313. package/node_modules/lando/node_modules/yargs/locales/he.json +55 -0
  314. package/node_modules/lando/node_modules/yargs/locales/ka.json +55 -0
  315. package/node_modules/lando/node_modules/yargs/locales/ko.json +25 -25
  316. package/node_modules/lando/node_modules/yargs/locales/ru.json +6 -1
  317. package/node_modules/lando/node_modules/yargs/locales/uk_UA.json +51 -0
  318. package/node_modules/lando/node_modules/yargs/locales/uz.json +52 -0
  319. package/node_modules/lando/node_modules/yargs/locales/zh_TW.json +50 -46
  320. package/node_modules/lando/node_modules/yargs/package.json +41 -60
  321. package/node_modules/lando/node_modules/yargs-parser/build/lib/index.js +13 -8
  322. package/node_modules/lando/node_modules/yargs-parser/build/lib/yargs-parser.js +21 -12
  323. package/node_modules/lando/node_modules/yargs-parser/package.json +31 -40
  324. package/node_modules/lando/package.json +59 -22
  325. package/node_modules/lando/plugins/lando-compose/index.js +4 -0
  326. package/node_modules/lando/plugins/lando-compose/lib/utils.js +16 -7
  327. package/node_modules/lando/plugins/lando-core/index.js +1 -2
  328. package/node_modules/lando/plugins/lando-core/lib/utils.js +35 -15
  329. package/node_modules/lando/plugins/lando-core/lib/warnings.js +27 -0
  330. package/node_modules/lando/plugins/lando-core/tasks/destroy.js +1 -1
  331. package/node_modules/lando/plugins/lando-core/tasks/rebuild.js +1 -1
  332. package/node_modules/lando/plugins/lando-events/index.js +4 -0
  333. package/node_modules/lando/plugins/lando-events/lib/utils.js +27 -6
  334. package/node_modules/lando/plugins/lando-networking/app.js +2 -2
  335. package/node_modules/lando/plugins/lando-networking/index.js +9 -2
  336. package/node_modules/lando/plugins/lando-networking/test/app.spec.js +87 -0
  337. package/node_modules/lando/plugins/lando-proxy/index.js +6 -1
  338. package/node_modules/lando/plugins/lando-proxy/lib/utils.js +63 -28
  339. package/node_modules/lando/plugins/lando-proxy/lib/warnings.js +10 -0
  340. package/node_modules/lando/plugins/lando-recipes/index.js +4 -0
  341. package/node_modules/lando/plugins/lando-recipes/lib/build.js +22 -4
  342. package/node_modules/lando/plugins/lando-recipes/lib/options.js +42 -66
  343. package/node_modules/lando/plugins/lando-recipes/lib/utils.js +30 -13
  344. package/node_modules/lando/plugins/lando-recipes/lib/warnings.js +5 -0
  345. package/node_modules/lando/plugins/lando-recipes/sources/remote.js +0 -26
  346. package/node_modules/lando/plugins/lando-recipes/tasks/init.js +1 -1
  347. package/node_modules/lando/plugins/lando-services/index.js +4 -0
  348. package/node_modules/lando/plugins/lando-services/lib/utils.js +38 -15
  349. package/node_modules/lando/plugins/lando-sharing/index.js +4 -0
  350. package/node_modules/lando/plugins/lando-sharing/lib/utils.js +28 -5
  351. package/node_modules/lando/plugins/lando-tooling/index.js +5 -0
  352. package/node_modules/lando/plugins/lando-tooling/lib/build.js +5 -2
  353. package/node_modules/lando/plugins/lando-tooling/lib/utils.js +83 -47
  354. package/node_modules/lando/test/cli.spec.js +59 -21
  355. package/node_modules/lando/test/docker.spec.js +24 -28
  356. package/node_modules/lando/test/env.spec.js +8 -0
  357. package/node_modules/lando/test/error.spec.js +1 -1
  358. package/node_modules/lando/test/events.spec.js +6 -7
  359. package/node_modules/lando/test/lando.spec.js +1 -1
  360. package/node_modules/lando/test/plugins.spec.js +2 -3
  361. package/node_modules/lando/test/promise.spec.js +1 -1
  362. package/node_modules/lando/test/scan.spec.js +1 -1
  363. package/node_modules/lando/test/shell.spec.js +19 -2
  364. package/node_modules/lando/test/utils.spec.js +52 -0
  365. package/node_modules/open/index.js +3 -5
  366. package/node_modules/open/package.json +1 -1
  367. package/node_modules/string-argv/CHANGELOG.md +38 -0
  368. package/node_modules/string-argv/README.md +96 -50
  369. package/node_modules/string-argv/index.d.ts +2 -0
  370. package/node_modules/string-argv/index.js +55 -35
  371. package/node_modules/string-argv/package.json +50 -40
  372. package/node_modules/undici/README.md +25 -3
  373. package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
  374. package/node_modules/undici/docs/docs/api/Client.md +11 -6
  375. package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
  376. package/node_modules/undici/docs/docs/api/Errors.md +76 -1
  377. package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
  378. package/node_modules/undici/docs/docs/api/Interceptors.md +13 -6
  379. package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
  380. package/node_modules/undici/docs/docs/index.md +12 -12
  381. package/node_modules/undici/docs/docs/type-map.json +66 -66
  382. package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
  383. package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
  384. package/node_modules/undici/lib/core/connect.js +10 -4
  385. package/node_modules/undici/lib/core/constants.js +12 -1
  386. package/node_modules/undici/lib/core/errors.js +38 -1
  387. package/node_modules/undici/lib/core/request.js +16 -1
  388. package/node_modules/undici/lib/core/symbols.js +2 -0
  389. package/node_modules/undici/lib/core/util.js +26 -1
  390. package/node_modules/undici/lib/dispatcher/agent.js +6 -2
  391. package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
  392. package/node_modules/undici/lib/dispatcher/client-h2.js +46 -14
  393. package/node_modules/undici/lib/dispatcher/client.js +4 -1
  394. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
  395. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
  396. package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
  397. package/node_modules/undici/lib/dispatcher/pool-base.js +65 -28
  398. package/node_modules/undici/lib/dispatcher/pool.js +11 -8
  399. package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
  400. package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
  401. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
  402. package/node_modules/undici/lib/handler/cache-handler.js +153 -15
  403. package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
  404. package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
  405. package/node_modules/undici/lib/handler/retry-handler.js +44 -11
  406. package/node_modules/undici/lib/interceptor/cache.js +11 -3
  407. package/node_modules/undici/lib/interceptor/decompress.js +22 -9
  408. package/node_modules/undici/lib/interceptor/dns.js +11 -0
  409. package/node_modules/undici/lib/interceptor/response-error.js +72 -28
  410. package/node_modules/undici/lib/milo/LICENSE.md +7 -0
  411. package/node_modules/undici/lib/milo/no-simd.js +1002 -0
  412. package/node_modules/undici/lib/milo/simd.js +1002 -0
  413. package/node_modules/undici/lib/mock/mock-agent.js +11 -0
  414. package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
  415. package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
  416. package/node_modules/undici/lib/util/cache.js +11 -5
  417. package/node_modules/undici/lib/web/cookies/util.js +19 -2
  418. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
  419. package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
  420. package/node_modules/undici/lib/web/fetch/body.js +47 -38
  421. package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
  422. package/node_modules/undici/lib/web/fetch/headers.js +2 -2
  423. package/node_modules/undici/lib/web/fetch/index.js +8 -4
  424. package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  425. package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
  426. package/node_modules/undici/package.json +7 -5
  427. package/node_modules/undici/types/cache-interceptor.d.ts +10 -0
  428. package/node_modules/undici/types/client.d.ts +10 -4
  429. package/node_modules/undici/types/errors.d.ts +16 -1
  430. package/node_modules/undici/types/h2c-client.d.ts +1 -1
  431. package/node_modules/undici/types/interceptors.d.ts +6 -1
  432. package/node_modules/{lando/node_modules/js-yaml → unicode-segmenter}/LICENSE +6 -6
  433. package/node_modules/unicode-segmenter/README.md +324 -0
  434. package/node_modules/unicode-segmenter/_emoji_data.cjs +24 -0
  435. package/node_modules/unicode-segmenter/_emoji_data.d.cts +1 -0
  436. package/node_modules/unicode-segmenter/_emoji_data.d.ts +12 -0
  437. package/node_modules/unicode-segmenter/_emoji_data.js +26 -0
  438. package/node_modules/unicode-segmenter/_general_data.cjs +30 -0
  439. package/node_modules/unicode-segmenter/_general_data.d.cts +1 -0
  440. package/node_modules/unicode-segmenter/_general_data.d.ts +16 -0
  441. package/node_modules/unicode-segmenter/_general_data.js +34 -0
  442. package/node_modules/unicode-segmenter/_grapheme_data.cjs +125 -0
  443. package/node_modules/unicode-segmenter/_grapheme_data.d.cts +1 -0
  444. package/node_modules/unicode-segmenter/_grapheme_data.d.ts +112 -0
  445. package/node_modules/unicode-segmenter/_grapheme_data.js +123 -0
  446. package/node_modules/unicode-segmenter/core.cjs +135 -0
  447. package/node_modules/unicode-segmenter/core.d.cts +1 -0
  448. package/node_modules/unicode-segmenter/core.d.ts +118 -0
  449. package/node_modules/unicode-segmenter/core.js +129 -0
  450. package/node_modules/unicode-segmenter/emoji.cjs +43 -0
  451. package/node_modules/unicode-segmenter/emoji.d.cts +1 -0
  452. package/node_modules/unicode-segmenter/emoji.d.ts +23 -0
  453. package/node_modules/unicode-segmenter/emoji.js +42 -0
  454. package/node_modules/unicode-segmenter/general.cjs +51 -0
  455. package/node_modules/unicode-segmenter/general.d.cts +1 -0
  456. package/node_modules/unicode-segmenter/general.d.ts +26 -0
  457. package/node_modules/unicode-segmenter/general.js +50 -0
  458. package/node_modules/unicode-segmenter/grapheme.cjs +405 -0
  459. package/node_modules/unicode-segmenter/grapheme.d.cts +1 -0
  460. package/node_modules/unicode-segmenter/grapheme.d.ts +64 -0
  461. package/node_modules/unicode-segmenter/grapheme.js +438 -0
  462. package/node_modules/unicode-segmenter/index.cjs +26 -0
  463. package/node_modules/unicode-segmenter/index.d.cts +1 -0
  464. package/node_modules/unicode-segmenter/index.d.ts +4 -0
  465. package/node_modules/unicode-segmenter/index.js +6 -0
  466. package/node_modules/unicode-segmenter/intl-adapter.cjs +124 -0
  467. package/node_modules/unicode-segmenter/intl-adapter.d.cts +1 -0
  468. package/node_modules/unicode-segmenter/intl-adapter.d.ts +62 -0
  469. package/node_modules/unicode-segmenter/intl-adapter.js +113 -0
  470. package/node_modules/unicode-segmenter/intl-polyfill.cjs +17 -0
  471. package/node_modules/unicode-segmenter/intl-polyfill.d.cts +1 -0
  472. package/node_modules/unicode-segmenter/intl-polyfill.d.ts +1 -0
  473. package/node_modules/unicode-segmenter/intl-polyfill.js +16 -0
  474. package/node_modules/unicode-segmenter/package.json +165 -0
  475. package/node_modules/unicode-segmenter/utils.cjs +99 -0
  476. package/node_modules/unicode-segmenter/utils.d.cts +1 -0
  477. package/node_modules/unicode-segmenter/utils.d.ts +64 -0
  478. package/node_modules/unicode-segmenter/utils.js +89 -0
  479. package/package.json +6 -6
  480. package/.buildkite/build-linux.sh +0 -68
  481. package/.buildkite/build-macos-installer.sh +0 -34
  482. package/.buildkite/build-macos.sh +0 -67
  483. package/.buildkite/build-windows-installer.ps1 +0 -65
  484. package/.buildkite/build-windows.ps1 +0 -59
  485. package/.buildkite/fetch-search-replace.sh +0 -65
  486. package/.buildkite/pack-release.sh +0 -26
  487. package/.buildkite/pipeline.yml +0 -81
  488. package/.buildkite/shared-pipeline-vars +0 -16
  489. package/.buildkite/sign-windows.ps1 +0 -21
  490. package/.buildkite/test-windows-installer-download.ps1 +0 -54
  491. package/.buildkite/test_pipeline.py +0 -69
  492. package/.bundle/config +0 -4
  493. package/.editorconfig +0 -11
  494. package/.prettierignore +0 -13
  495. package/.ruby-version +0 -1
  496. package/.sonarcloud.properties +0 -2
  497. package/.xcode-version +0 -1
  498. package/AGENTS.md +0 -101
  499. package/CLAUDE.md +0 -4
  500. package/Gemfile +0 -8
  501. package/Gemfile.lock +0 -377
  502. package/Makefile +0 -293
  503. package/cmd/installer-payload/main.go +0 -19
  504. package/cmd/installer-version/main.go +0 -22
  505. package/cmd/stamp-version/main.go +0 -25
  506. package/cmd/vip-next/auth_bootstrap.go +0 -139
  507. package/cmd/vip-next/auth_bootstrap_test.go +0 -379
  508. package/cmd/vip-next/auth_bypass_wiring_test.go +0 -162
  509. package/cmd/vip-next/cli_error_hook_test.go +0 -91
  510. package/cmd/vip-next/commands/app.go +0 -23
  511. package/cmd/vip-next/commands/app_debug_test.go +0 -89
  512. package/cmd/vip-next/commands/app_deploy.go +0 -217
  513. package/cmd/vip-next/commands/app_deploy_test.go +0 -297
  514. package/cmd/vip-next/commands/app_deploy_validate.go +0 -58
  515. package/cmd/vip-next/commands/app_get.go +0 -293
  516. package/cmd/vip-next/commands/app_get_test.go +0 -226
  517. package/cmd/vip-next/commands/app_list.go +0 -93
  518. package/cmd/vip-next/commands/app_list_test.go +0 -95
  519. package/cmd/vip-next/commands/backup.go +0 -16
  520. package/cmd/vip-next/commands/backup_db.go +0 -137
  521. package/cmd/vip-next/commands/backup_db_test.go +0 -187
  522. package/cmd/vip-next/commands/cache.go +0 -16
  523. package/cmd/vip-next/commands/cache_purge_url.go +0 -90
  524. package/cmd/vip-next/commands/cache_purge_url_test.go +0 -154
  525. package/cmd/vip-next/commands/config.go +0 -17
  526. package/cmd/vip-next/commands/config_debug_test.go +0 -137
  527. package/cmd/vip-next/commands/config_envvar.go +0 -16
  528. package/cmd/vip-next/commands/config_envvar_delete.go +0 -135
  529. package/cmd/vip-next/commands/config_envvar_delete_test.go +0 -140
  530. package/cmd/vip-next/commands/config_envvar_get.go +0 -72
  531. package/cmd/vip-next/commands/config_envvar_get_all.go +0 -58
  532. package/cmd/vip-next/commands/config_envvar_get_all_test.go +0 -83
  533. package/cmd/vip-next/commands/config_envvar_get_test.go +0 -79
  534. package/cmd/vip-next/commands/config_envvar_list.go +0 -70
  535. package/cmd/vip-next/commands/config_envvar_list_test.go +0 -134
  536. package/cmd/vip-next/commands/config_envvar_set.go +0 -162
  537. package/cmd/vip-next/commands/config_envvar_set_test.go +0 -251
  538. package/cmd/vip-next/commands/config_software.go +0 -229
  539. package/cmd/vip-next/commands/config_software_test.go +0 -161
  540. package/cmd/vip-next/commands/config_software_update.go +0 -270
  541. package/cmd/vip-next/commands/config_software_update_test.go +0 -334
  542. package/cmd/vip-next/commands/db.go +0 -16
  543. package/cmd/vip-next/commands/db_phpmyadmin.go +0 -122
  544. package/cmd/vip-next/commands/db_phpmyadmin_test.go +0 -277
  545. package/cmd/vip-next/commands/defensive_mode.go +0 -106
  546. package/cmd/vip-next/commands/defensive_mode_configure.go +0 -150
  547. package/cmd/vip-next/commands/defensive_mode_disable.go +0 -62
  548. package/cmd/vip-next/commands/defensive_mode_enable.go +0 -62
  549. package/cmd/vip-next/commands/defensive_mode_test.go +0 -389
  550. package/cmd/vip-next/commands/devenv.go +0 -49
  551. package/cmd/vip-next/commands/devenv_create_appinfo.go +0 -158
  552. package/cmd/vip-next/commands/devenv_create_appinfo_test.go +0 -29
  553. package/cmd/vip-next/commands/devenv_create_test.go +0 -269
  554. package/cmd/vip-next/commands/devenv_data.go +0 -86
  555. package/cmd/vip-next/commands/devenv_data_confirm_test.go +0 -49
  556. package/cmd/vip-next/commands/devenv_debug_test.go +0 -34
  557. package/cmd/vip-next/commands/devenv_e2e_gate_test.go +0 -17
  558. package/cmd/vip-next/commands/devenv_e2e_test.go +0 -34
  559. package/cmd/vip-next/commands/devenv_envvar.go +0 -186
  560. package/cmd/vip-next/commands/devenv_envvar_test.go +0 -183
  561. package/cmd/vip-next/commands/devenv_exec.go +0 -75
  562. package/cmd/vip-next/commands/devenv_exec_test.go +0 -39
  563. package/cmd/vip-next/commands/devenv_flag_grammar_test.go +0 -241
  564. package/cmd/vip-next/commands/devenv_lifecycle.go +0 -785
  565. package/cmd/vip-next/commands/devenv_logs.go +0 -29
  566. package/cmd/vip-next/commands/devenv_resolve.go +0 -118
  567. package/cmd/vip-next/commands/devenv_resolve_test.go +0 -221
  568. package/cmd/vip-next/commands/devenv_sync.go +0 -256
  569. package/cmd/vip-next/commands/devenv_sync_sites.go +0 -116
  570. package/cmd/vip-next/commands/devenv_sync_sites_test.go +0 -151
  571. package/cmd/vip-next/commands/devenv_sync_test.go +0 -63
  572. package/cmd/vip-next/commands/devenv_telemetry.go +0 -265
  573. package/cmd/vip-next/commands/devenv_telemetry_test.go +0 -322
  574. package/cmd/vip-next/commands/devenv_test.go +0 -60
  575. package/cmd/vip-next/commands/devenv_update.go +0 -207
  576. package/cmd/vip-next/commands/devenv_update_test.go +0 -109
  577. package/cmd/vip-next/commands/devenv_versions_proxy_test.go +0 -133
  578. package/cmd/vip-next/commands/edge_workers.go +0 -197
  579. package/cmd/vip-next/commands/edge_workers_flags.go +0 -56
  580. package/cmd/vip-next/commands/edge_workers_local.go +0 -127
  581. package/cmd/vip-next/commands/edge_workers_mutation.go +0 -130
  582. package/cmd/vip-next/commands/edge_workers_read.go +0 -103
  583. package/cmd/vip-next/commands/edge_workers_test.go +0 -272
  584. package/cmd/vip-next/commands/export.go +0 -16
  585. package/cmd/vip-next/commands/export_sql.go +0 -333
  586. package/cmd/vip-next/commands/export_sql_test.go +0 -321
  587. package/cmd/vip-next/commands/format_env.go +0 -17
  588. package/cmd/vip-next/commands/import.go +0 -19
  589. package/cmd/vip-next/commands/import_debug_test.go +0 -110
  590. package/cmd/vip-next/commands/import_media.go +0 -433
  591. package/cmd/vip-next/commands/import_media_abort.go +0 -76
  592. package/cmd/vip-next/commands/import_media_confirm.go +0 -83
  593. package/cmd/vip-next/commands/import_media_confirm_test.go +0 -249
  594. package/cmd/vip-next/commands/import_media_fetch_test.go +0 -98
  595. package/cmd/vip-next/commands/import_media_status.go +0 -58
  596. package/cmd/vip-next/commands/import_media_test.go +0 -370
  597. package/cmd/vip-next/commands/import_sql.go +0 -1161
  598. package/cmd/vip-next/commands/import_sql_status.go +0 -67
  599. package/cmd/vip-next/commands/import_sql_test.go +0 -746
  600. package/cmd/vip-next/commands/import_validate_files.go +0 -157
  601. package/cmd/vip-next/commands/import_validate_files_test.go +0 -157
  602. package/cmd/vip-next/commands/import_validate_sql.go +0 -207
  603. package/cmd/vip-next/commands/import_validate_sql_test.go +0 -293
  604. package/cmd/vip-next/commands/login.go +0 -53
  605. package/cmd/vip-next/commands/login_test.go +0 -25
  606. package/cmd/vip-next/commands/logout.go +0 -43
  607. package/cmd/vip-next/commands/logout_test.go +0 -158
  608. package/cmd/vip-next/commands/logs.go +0 -169
  609. package/cmd/vip-next/commands/logs_test.go +0 -174
  610. package/cmd/vip-next/commands/nodeflag_aliases.go +0 -59
  611. package/cmd/vip-next/commands/progress_renderer.go +0 -118
  612. package/cmd/vip-next/commands/progress_renderer_test.go +0 -28
  613. package/cmd/vip-next/commands/searchreplace.go +0 -75
  614. package/cmd/vip-next/commands/searchreplace_debug_test.go +0 -82
  615. package/cmd/vip-next/commands/searchreplace_test.go +0 -155
  616. package/cmd/vip-next/commands/slowlogs.go +0 -167
  617. package/cmd/vip-next/commands/slowlogs_test.go +0 -159
  618. package/cmd/vip-next/commands/sqlreport.go +0 -183
  619. package/cmd/vip-next/commands/sqlreport_test.go +0 -66
  620. package/cmd/vip-next/commands/sync.go +0 -189
  621. package/cmd/vip-next/commands/sync_confirm.go +0 -121
  622. package/cmd/vip-next/commands/sync_confirm_test.go +0 -202
  623. package/cmd/vip-next/commands/sync_render.go +0 -207
  624. package/cmd/vip-next/commands/sync_render_test.go +0 -101
  625. package/cmd/vip-next/commands/sync_test.go +0 -148
  626. package/cmd/vip-next/commands/update.go +0 -85
  627. package/cmd/vip-next/commands/update_test.go +0 -49
  628. package/cmd/vip-next/commands/whoami.go +0 -161
  629. package/cmd/vip-next/commands/whoami_debug_test.go +0 -79
  630. package/cmd/vip-next/commands/whoami_test.go +0 -85
  631. package/cmd/vip-next/commands/wp.go +0 -376
  632. package/cmd/vip-next/commands/wp_debug_test.go +0 -32
  633. package/cmd/vip-next/commands/wp_test.go +0 -276
  634. package/cmd/vip-next/debug_args.go +0 -63
  635. package/cmd/vip-next/debug_test.go +0 -122
  636. package/cmd/vip-next/edge_workers_test.go +0 -108
  637. package/cmd/vip-next/flags_node_parity_test.go +0 -434
  638. package/cmd/vip-next/main.go +0 -391
  639. package/cmd/vip-next/main_test.go +0 -202
  640. package/cmd/vip-next/pendo_wiring_test.go +0 -148
  641. package/cmd/vip-next/root.go +0 -211
  642. package/cmd/vip-next/update_bootstrap.go +0 -94
  643. package/cmd/vip-next/update_bootstrap_test.go +0 -85
  644. package/cmd/vip-next/update_integration_test.go +0 -137
  645. package/cmd/vip-next-prerelease/main.go +0 -108
  646. package/cmd/vip-next-prerelease/main_test.go +0 -46
  647. package/docs/ARCHITECTURE.md +0 -95
  648. package/docs/BUILD-SIGNING.md +0 -501
  649. package/docs/CHANGELOG.md +0 -1844
  650. package/docs/COMMANDER-MIGRATION.md +0 -45
  651. package/docs/CONTRIBUTING.md +0 -29
  652. package/docs/CUTOVER-BREAKING-CHANGES.md +0 -261
  653. package/docs/DEBUGGING.md +0 -94
  654. package/docs/EDGE-WORKERS.md +0 -256
  655. package/docs/GO-UPDATES.md +0 -97
  656. package/docs/NPM-RELEASE-RECOVERY.md +0 -47
  657. package/docs/RELEASING.md +0 -211
  658. package/docs/SECURITY.md +0 -9
  659. package/docs/SETUP.md +0 -154
  660. package/docs/TESTING.md +0 -67
  661. package/docs/decisions/0001-operation-scoped-elevated-token-reuse.md +0 -87
  662. package/docs/dev-env-windows-wsl-testing.md +0 -191
  663. package/docs/vip-next-vip-command-reference.md +0 -257
  664. package/docs/vip-wp-line-parse-dfa.dot +0 -31
  665. package/eslint.config.js +0 -35
  666. package/fastlane/Fastfile +0 -204
  667. package/fastlane/example.env +0 -8
  668. package/fastlane/test_signing.rb +0 -83
  669. package/go.mod +0 -39
  670. package/go.sum +0 -127
  671. package/internal/appctx/app_resolver.go +0 -202
  672. package/internal/appctx/app_resolver_test.go +0 -187
  673. package/internal/appctx/confirm.go +0 -180
  674. package/internal/appctx/confirm_payload_test.go +0 -201
  675. package/internal/appctx/confirm_test.go +0 -120
  676. package/internal/appctx/context.go +0 -94
  677. package/internal/appctx/context_test.go +0 -56
  678. package/internal/appctx/env_resolver.go +0 -110
  679. package/internal/appctx/env_resolver_test.go +0 -215
  680. package/internal/appctx/format.go +0 -72
  681. package/internal/appctx/format_test.go +0 -75
  682. package/internal/appctx/interactive.go +0 -50
  683. package/internal/appctx/interactive_test.go +0 -134
  684. package/internal/appctx/middleware.go +0 -56
  685. package/internal/appctx/middleware_test.go +0 -88
  686. package/internal/appctx/prompts.go +0 -70
  687. package/internal/appctx/prompts_test.go +0 -97
  688. package/internal/appctx/required_args.go +0 -24
  689. package/internal/appctx/required_args_test.go +0 -38
  690. package/internal/appctx/telemetry.go +0 -22
  691. package/internal/appctx/telemetry_test.go +0 -42
  692. package/internal/appctx/wildcard.go +0 -29
  693. package/internal/appctx/wildcard_test.go +0 -53
  694. package/internal/auth/bypass.go +0 -84
  695. package/internal/auth/bypass_test.go +0 -97
  696. package/internal/auth/login.go +0 -156
  697. package/internal/auth/login_test.go +0 -184
  698. package/internal/auth/logout.go +0 -44
  699. package/internal/auth/logout_test.go +0 -78
  700. package/internal/auth/store.go +0 -130
  701. package/internal/auth/store_test.go +0 -339
  702. package/internal/auth/token.go +0 -117
  703. package/internal/auth/token_test.go +0 -90
  704. package/internal/backup/backup.go +0 -194
  705. package/internal/backup/backup_test.go +0 -228
  706. package/internal/cachepurge/cachepurge.go +0 -38
  707. package/internal/cachepurge/cachepurge_test.go +0 -92
  708. package/internal/customdeploy/archive.go +0 -205
  709. package/internal/customdeploy/archive_test.go +0 -174
  710. package/internal/customdeploy/customdeploy.go +0 -91
  711. package/internal/customdeploy/customdeploy_test.go +0 -82
  712. package/internal/debuglog/debuglog.go +0 -85
  713. package/internal/debuglog/debuglog_test.go +0 -44
  714. package/internal/defensivemode/api.go +0 -89
  715. package/internal/defensivemode/api_test.go +0 -122
  716. package/internal/devenv/adapters.go +0 -168
  717. package/internal/devenv/adapters_test.go +0 -44
  718. package/internal/devenv/adopt.go +0 -20
  719. package/internal/devenv/adopt_setup_test.go +0 -30
  720. package/internal/devenv/compose/labels.go +0 -90
  721. package/internal/devenv/compose/labels_test.go +0 -136
  722. package/internal/devenv/compose/project.go +0 -88
  723. package/internal/devenv/compose/project_test.go +0 -148
  724. package/internal/devenv/compose/render.go +0 -54
  725. package/internal/devenv/compose/render_test.go +0 -90
  726. package/internal/devenv/compose/services.go +0 -337
  727. package/internal/devenv/compose/services_test.go +0 -258
  728. package/internal/devenv/compose/testdata/full.golden.yml +0 -265
  729. package/internal/devenv/compose/types.go +0 -97
  730. package/internal/devenv/compose/types_test.go +0 -61
  731. package/internal/devenv/compose/view.go +0 -205
  732. package/internal/devenv/compose/view_test.go +0 -120
  733. package/internal/devenv/configfile.go +0 -300
  734. package/internal/devenv/configfile_test.go +0 -246
  735. package/internal/devenv/create.go +0 -130
  736. package/internal/devenv/create_test.go +0 -98
  737. package/internal/devenv/debug.go +0 -4
  738. package/internal/devenv/debug_test.go +0 -103
  739. package/internal/devenv/devenv.go +0 -434
  740. package/internal/devenv/devenv_test.go +0 -77
  741. package/internal/devenv/devexec.go +0 -140
  742. package/internal/devenv/devexec_test.go +0 -91
  743. package/internal/devenv/devlog/devlog.go +0 -219
  744. package/internal/devenv/devlog/devlog_test.go +0 -112
  745. package/internal/devenv/devterm/devterm.go +0 -65
  746. package/internal/devenv/devterm/devterm_pty.go +0 -58
  747. package/internal/devenv/devterm/devterm_stub.go +0 -20
  748. package/internal/devenv/devterm/devterm_test.go +0 -78
  749. package/internal/devenv/dockercli/capture.go +0 -84
  750. package/internal/devenv/dockercli/capture_test.go +0 -33
  751. package/internal/devenv/dockercli/compose.go +0 -30
  752. package/internal/devenv/dockercli/compose_test.go +0 -35
  753. package/internal/devenv/dockercli/runner.go +0 -214
  754. package/internal/devenv/dockercli/runner_test.go +0 -157
  755. package/internal/devenv/dockercli/socket.go +0 -56
  756. package/internal/devenv/dockercli/socket_test.go +0 -52
  757. package/internal/devenv/e2e_gate_test.go +0 -17
  758. package/internal/devenv/e2e_test.go +0 -499
  759. package/internal/devenv/e2esafety/gate_wiring_test.go +0 -90
  760. package/internal/devenv/e2esafety/safety.go +0 -52
  761. package/internal/devenv/e2esafety/safety_test.go +0 -71
  762. package/internal/devenv/eachenv_test.go +0 -132
  763. package/internal/devenv/editor.go +0 -82
  764. package/internal/devenv/editor_test.go +0 -60
  765. package/internal/devenv/envfile.go +0 -287
  766. package/internal/devenv/envvar.go +0 -165
  767. package/internal/devenv/envvar_test.go +0 -178
  768. package/internal/devenv/hostops/context.go +0 -38
  769. package/internal/devenv/hostops/context_test.go +0 -24
  770. package/internal/devenv/hostops/e2e_gate_test.go +0 -17
  771. package/internal/devenv/hostops/e2e_test.go +0 -429
  772. package/internal/devenv/hostops/elevate.go +0 -248
  773. package/internal/devenv/hostops/elevate_message_test.go +0 -35
  774. package/internal/devenv/hostops/elevate_test.go +0 -111
  775. package/internal/devenv/hostops/hosts.go +0 -255
  776. package/internal/devenv/hostops/hosts_test.go +0 -178
  777. package/internal/devenv/hostops/thumbprint_test.go +0 -57
  778. package/internal/devenv/hostops/trust.go +0 -115
  779. package/internal/devenv/hostops/trust_test.go +0 -90
  780. package/internal/devenv/hostrefresh.go +0 -127
  781. package/internal/devenv/hostrefresh_test.go +0 -123
  782. package/internal/devenv/importdata.go +0 -491
  783. package/internal/devenv/importdata_test.go +0 -142
  784. package/internal/devenv/importdecompress_test.go +0 -90
  785. package/internal/devenv/importgate_test.go +0 -166
  786. package/internal/devenv/importvalidate.go +0 -437
  787. package/internal/devenv/importvalidate_test.go +0 -293
  788. package/internal/devenv/info_table.go +0 -165
  789. package/internal/devenv/info_table_test.go +0 -111
  790. package/internal/devenv/instancedata/instancedata.go +0 -239
  791. package/internal/devenv/instancedata/instancedata_test.go +0 -281
  792. package/internal/devenv/instancedata/testdata/legacy_keys.json +0 -16
  793. package/internal/devenv/instancedata/testdata/unknown_keys.json +0 -19
  794. package/internal/devenv/lifecycle/adopt.go +0 -24
  795. package/internal/devenv/lifecycle/adopt_test.go +0 -43
  796. package/internal/devenv/lifecycle/health.go +0 -28
  797. package/internal/devenv/lifecycle/health_test.go +0 -34
  798. package/internal/devenv/lifecycle/hosts.go +0 -42
  799. package/internal/devenv/lifecycle/hosts_test.go +0 -41
  800. package/internal/devenv/lifecycle/migrate.go +0 -44
  801. package/internal/devenv/lifecycle/migrate_test.go +0 -78
  802. package/internal/devenv/lifecycle/pull.go +0 -19
  803. package/internal/devenv/lifecycle/pull_test.go +0 -29
  804. package/internal/devenv/lifecycle/setup.go +0 -35
  805. package/internal/devenv/lifecycle/setup_test.go +0 -46
  806. package/internal/devenv/lifecycle/start.go +0 -132
  807. package/internal/devenv/lifecycle/start_test.go +0 -350
  808. package/internal/devenv/lifecycle/teardown.go +0 -32
  809. package/internal/devenv/lifecycle/teardown_test.go +0 -83
  810. package/internal/devenv/lifecycle/types.go +0 -86
  811. package/internal/devenv/lifecycle/waiter.go +0 -49
  812. package/internal/devenv/lifecycle/waiter_test.go +0 -98
  813. package/internal/devenv/list.go +0 -49
  814. package/internal/devenv/list_test.go +0 -24
  815. package/internal/devenv/logs.go +0 -43
  816. package/internal/devenv/logs_test.go +0 -28
  817. package/internal/devenv/materialize.go +0 -44
  818. package/internal/devenv/materialize_test.go +0 -112
  819. package/internal/devenv/paths/paths.go +0 -42
  820. package/internal/devenv/paths/paths_test.go +0 -39
  821. package/internal/devenv/postimport.go +0 -134
  822. package/internal/devenv/postimport_test.go +0 -389
  823. package/internal/devenv/proxy/ca.go +0 -110
  824. package/internal/devenv/proxy/ca_test.go +0 -111
  825. package/internal/devenv/proxy/network.go +0 -28
  826. package/internal/devenv/proxy/network_test.go +0 -68
  827. package/internal/devenv/proxy/ports.go +0 -104
  828. package/internal/devenv/proxy/ports_test.go +0 -76
  829. package/internal/devenv/proxy/proxy.go +0 -143
  830. package/internal/devenv/proxy/proxy_test.go +0 -149
  831. package/internal/devenv/proxy/scripts/gen-certs.sh +0 -73
  832. package/internal/devenv/proxy/spec.go +0 -60
  833. package/internal/devenv/proxy/spec_test.go +0 -44
  834. package/internal/devenv/proxy/testhelpers_test.go +0 -7
  835. package/internal/devenv/proxy_policy_test.go +0 -155
  836. package/internal/devenv/syncplan.go +0 -573
  837. package/internal/devenv/syncplan_test.go +0 -256
  838. package/internal/devenv/syncsql.go +0 -247
  839. package/internal/devenv/syncsql_repair.go +0 -169
  840. package/internal/devenv/syncsql_repair_test.go +0 -150
  841. package/internal/devenv/syncsql_test.go +0 -220
  842. package/internal/devenv/update.go +0 -87
  843. package/internal/devenv/update_test.go +0 -47
  844. package/internal/edgeworkers/api.go +0 -173
  845. package/internal/edgeworkers/api_test.go +0 -256
  846. package/internal/edgeworkers/build.go +0 -188
  847. package/internal/edgeworkers/build_test.go +0 -175
  848. package/internal/edgeworkers/confirmation.go +0 -72
  849. package/internal/edgeworkers/deployment.go +0 -156
  850. package/internal/edgeworkers/deployment_test.go +0 -165
  851. package/internal/edgeworkers/output.go +0 -131
  852. package/internal/edgeworkers/output_test.go +0 -98
  853. package/internal/edgeworkers/project.go +0 -264
  854. package/internal/edgeworkers/project_test.go +0 -167
  855. package/internal/edgeworkers/scaffold.go +0 -88
  856. package/internal/edgeworkers/templates/README.md +0 -25
  857. package/internal/edgeworkers/templates/edge-workers.json +0 -4
  858. package/internal/edgeworkers/templates/gitignore +0 -2
  859. package/internal/edgeworkers/templates/package.json +0 -16
  860. package/internal/edgeworkers/templates/tsconfig.json +0 -6
  861. package/internal/edgeworkers/templates/worker.ts +0 -19
  862. package/internal/edgeworkers/types.go +0 -37
  863. package/internal/edgeworkers/validation.go +0 -177
  864. package/internal/envalias/envalias.go +0 -50
  865. package/internal/envalias/envalias_test.go +0 -147
  866. package/internal/envvar/envvar.go +0 -253
  867. package/internal/envvar/envvar_test.go +0 -274
  868. package/internal/envvar/reload_manifest.go +0 -99
  869. package/internal/envvar/reload_manifest_test.go +0 -44
  870. package/internal/envvar/value_confirm.go +0 -26
  871. package/internal/envvar/value_confirm_test.go +0 -22
  872. package/internal/exit/exit.go +0 -94
  873. package/internal/exit/exit_test.go +0 -119
  874. package/internal/gql/SCHEMA.md +0 -21
  875. package/internal/gql/client.go +0 -54
  876. package/internal/gql/client_test.go +0 -71
  877. package/internal/gql/debug_test.go +0 -79
  878. package/internal/gql/decoder_compat_helpers_test.go +0 -35
  879. package/internal/gql/decoder_compat_test.go +0 -78
  880. package/internal/gql/doc.go +0 -13
  881. package/internal/gql/edgeworkerinput/input.go +0 -58
  882. package/internal/gql/edgeworkerinput/input_test.go +0 -52
  883. package/internal/gql/error.go +0 -163
  884. package/internal/gql/error_test.go +0 -203
  885. package/internal/gql/generated.go +0 -10425
  886. package/internal/gql/genqlient.yaml +0 -26
  887. package/internal/gql/import_sql_marshal_test.go +0 -69
  888. package/internal/gql/operation.go +0 -67
  889. package/internal/gql/operation_test.go +0 -60
  890. package/internal/gql/operations/app_get.graphql +0 -43
  891. package/internal/gql/operations/app_list.graphql +0 -9
  892. package/internal/gql/operations/app_resolve.graphql +0 -37
  893. package/internal/gql/operations/backup_export_deploy.graphql +0 -123
  894. package/internal/gql/operations/cachepurge.graphql +0 -6
  895. package/internal/gql/operations/defensive_mode.graphql +0 -13
  896. package/internal/gql/operations/dev_env_create.graphql +0 -38
  897. package/internal/gql/operations/dev_env_sync.graphql +0 -15
  898. package/internal/gql/operations/edge_workers.graphql +0 -53
  899. package/internal/gql/operations/envvar.graphql +0 -52
  900. package/internal/gql/operations/fragments.graphql +0 -5
  901. package/internal/gql/operations/import_media.graphql +0 -61
  902. package/internal/gql/operations/import_sql.graphql +0 -135
  903. package/internal/gql/operations/logs.graphql +0 -22
  904. package/internal/gql/operations/me.graphql +0 -13
  905. package/internal/gql/operations/phpmyadmin.graphql +0 -21
  906. package/internal/gql/operations/slowlogs.graphql +0 -25
  907. package/internal/gql/operations/software.graphql +0 -53
  908. package/internal/gql/operations/sync.graphql +0 -51
  909. package/internal/gql/operations/wp.graphql +0 -37
  910. package/internal/gql/proxy_test.go +0 -62
  911. package/internal/gql/rechallenge.go +0 -218
  912. package/internal/gql/rechallenge_test.go +0 -471
  913. package/internal/gql/retry.go +0 -130
  914. package/internal/gql/retry_test.go +0 -230
  915. package/internal/gql/schema.gql +0 -9337
  916. package/internal/gql/transport.go +0 -65
  917. package/internal/gql/transport_helper.go +0 -24
  918. package/internal/httpproxy/callers_test.go +0 -211
  919. package/internal/httpproxy/debug_test.go +0 -32
  920. package/internal/httpproxy/httpproxy.go +0 -315
  921. package/internal/httpproxy/httpproxy_test.go +0 -435
  922. package/internal/installer/version.go +0 -41
  923. package/internal/installer/version_test.go +0 -33
  924. package/internal/keychain/fallback.go +0 -93
  925. package/internal/keychain/keychain.go +0 -197
  926. package/internal/keychain/keychain_select_test.go +0 -34
  927. package/internal/keychain/keychain_test.go +0 -112
  928. package/internal/logsapi/logsapi.go +0 -165
  929. package/internal/logsapi/logsapi_test.go +0 -82
  930. package/internal/mediaimport/mediaimport.go +0 -26
  931. package/internal/mediaimport/mediaimport_test.go +0 -46
  932. package/internal/mediaimport/status.go +0 -162
  933. package/internal/mediaimport/status_test.go +0 -159
  934. package/internal/mediaimport/tracker.go +0 -116
  935. package/internal/mediaimport/tracker_test.go +0 -62
  936. package/internal/nodeflags/nodeflags.go +0 -130
  937. package/internal/nodeflags/nodeflags_test.go +0 -138
  938. package/internal/nodeflags/optionalvalue.go +0 -123
  939. package/internal/nodeflags/optionalvalue_test.go +0 -158
  940. package/internal/output/csv.go +0 -178
  941. package/internal/output/fields.go +0 -22
  942. package/internal/output/fields_test.go +0 -21
  943. package/internal/output/ids.go +0 -26
  944. package/internal/output/ids_test.go +0 -32
  945. package/internal/output/json.go +0 -113
  946. package/internal/output/keyvalue.go +0 -35
  947. package/internal/output/keyvalue_block.go +0 -77
  948. package/internal/output/keyvalue_block_test.go +0 -95
  949. package/internal/output/keyvalue_test.go +0 -35
  950. package/internal/output/ordered.go +0 -44
  951. package/internal/output/ordered_test.go +0 -42
  952. package/internal/output/output.go +0 -62
  953. package/internal/output/output_test.go +0 -400
  954. package/internal/output/table.go +0 -231
  955. package/internal/output/table_layout.go +0 -472
  956. package/internal/output/table_layout_test.go +0 -107
  957. package/internal/output/table_layout_tty_test.go +0 -63
  958. package/internal/output/text.go +0 -24
  959. package/internal/output/text_test.go +0 -31
  960. package/internal/output/typename.go +0 -35
  961. package/internal/output/typename_test.go +0 -48
  962. package/internal/parity/backup_export_deploy_scenario_test.go +0 -285
  963. package/internal/parity/cache_scenario_test.go +0 -173
  964. package/internal/parity/command_surface_scenario_test.go +0 -530
  965. package/internal/parity/defensive_mode_scenario_test.go +0 -133
  966. package/internal/parity/diff.go +0 -128
  967. package/internal/parity/diff_test.go +0 -155
  968. package/internal/parity/differential_test.go +0 -166
  969. package/internal/parity/edge_workers_build_smoke_test.go +0 -69
  970. package/internal/parity/edge_workers_cases_test.go +0 -77
  971. package/internal/parity/edge_workers_debug_test.go +0 -87
  972. package/internal/parity/edge_workers_differential_test.go +0 -483
  973. package/internal/parity/edge_workers_prompt_test.go +0 -151
  974. package/internal/parity/env.go +0 -176
  975. package/internal/parity/env_test.go +0 -211
  976. package/internal/parity/envvar_mutation_scenario_test.go +0 -188
  977. package/internal/parity/harness.go +0 -28
  978. package/internal/parity/harness_test.go +0 -62
  979. package/internal/parity/import_media_scenario_test.go +0 -207
  980. package/internal/parity/import_sql_scenario_test.go +0 -198
  981. package/internal/parity/import_validate_sql_scenario_test.go +0 -68
  982. package/internal/parity/keychain.go +0 -538
  983. package/internal/parity/keychain_test.go +0 -201
  984. package/internal/parity/m5_differential_test.go +0 -185
  985. package/internal/parity/m5_scenarios_test.go +0 -225
  986. package/internal/parity/nodebin.go +0 -120
  987. package/internal/parity/nodebin_test.go +0 -148
  988. package/internal/parity/parker.go +0 -491
  989. package/internal/parity/parker_discovery.go +0 -373
  990. package/internal/parity/parker_discovery_test.go +0 -267
  991. package/internal/parity/parker_live_test.go +0 -164
  992. package/internal/parity/parker_test.go +0 -480
  993. package/internal/parity/pendo_test.go +0 -122
  994. package/internal/parity/phpmyadmin_scenario_test.go +0 -214
  995. package/internal/parity/runner.go +0 -56
  996. package/internal/parity/runner_test.go +0 -67
  997. package/internal/parity/scenario.go +0 -82
  998. package/internal/parity/scenario_test.go +0 -52
  999. package/internal/parity/surface_differential_test.go +0 -494
  1000. package/internal/parity/sync_scenario_test.go +0 -172
  1001. package/internal/parity/vendored_src_test.go +0 -84
  1002. package/internal/parity/whoami_scenario_test.go +0 -69
  1003. package/internal/parity/wp_scenario_test.go +0 -428
  1004. package/internal/phpmyadmin/client.go +0 -221
  1005. package/internal/phpmyadmin/client_test.go +0 -418
  1006. package/internal/poll/poll.go +0 -85
  1007. package/internal/poll/poll_test.go +0 -136
  1008. package/internal/polling/polling.go +0 -97
  1009. package/internal/polling/polling_test.go +0 -59
  1010. package/internal/rechallenge/browser.go +0 -16
  1011. package/internal/rechallenge/client.go +0 -198
  1012. package/internal/rechallenge/client_test.go +0 -169
  1013. package/internal/rechallenge/errors.go +0 -137
  1014. package/internal/rechallenge/errors_test.go +0 -81
  1015. package/internal/rechallenge/flow.go +0 -232
  1016. package/internal/rechallenge/flow_noninteractive_test.go +0 -285
  1017. package/internal/rechallenge/flow_test.go +0 -217
  1018. package/internal/rechallenge/interactive.go +0 -90
  1019. package/internal/rechallenge/interactive_test.go +0 -106
  1020. package/internal/rechallenge/redact.go +0 -36
  1021. package/internal/rechallenge/redact_test.go +0 -142
  1022. package/internal/rechallenge/tokencache.go +0 -148
  1023. package/internal/rechallenge/tokencache_test.go +0 -139
  1024. package/internal/rechallenge/types.go +0 -100
  1025. package/internal/rechallenge/types_test.go +0 -56
  1026. package/internal/redact/redact.go +0 -99
  1027. package/internal/redact/redact_test.go +0 -80
  1028. package/internal/releasepromotion/buildkite.go +0 -233
  1029. package/internal/releasepromotion/buildkite_test.go +0 -284
  1030. package/internal/releasepromotion/contract.go +0 -165
  1031. package/internal/releasepromotion/contract_test.go +0 -211
  1032. package/internal/releasepromotion/github.go +0 -378
  1033. package/internal/releasepromotion/github_test.go +0 -399
  1034. package/internal/releasepromotion/optional_installers_test.go +0 -87
  1035. package/internal/releasepromotion/promoter.go +0 -134
  1036. package/internal/releasepromotion/promoter_test.go +0 -147
  1037. package/internal/releasepromotion/verify.go +0 -239
  1038. package/internal/releasepromotion/verify_test.go +0 -296
  1039. package/internal/searchreplace/debug_test.go +0 -71
  1040. package/internal/searchreplace/dumpdetails.go +0 -104
  1041. package/internal/searchreplace/dumpdetails_test.go +0 -86
  1042. package/internal/searchreplace/searchreplace.go +0 -261
  1043. package/internal/searchreplace/searchreplace_test.go +0 -250
  1044. package/internal/siteimport/debug_test.go +0 -34
  1045. package/internal/siteimport/siteimport.go +0 -18
  1046. package/internal/siteimport/siteimport_test.go +0 -19
  1047. package/internal/siteimport/sitetype.go +0 -74
  1048. package/internal/siteimport/sitetype_test.go +0 -62
  1049. package/internal/siteimport/status.go +0 -282
  1050. package/internal/siteimport/status_test.go +0 -234
  1051. package/internal/slowlogsapi/slowlogsapi.go +0 -176
  1052. package/internal/slowlogsapi/slowlogsapi_test.go +0 -93
  1053. package/internal/softwaresettings/format.go +0 -192
  1054. package/internal/softwaresettings/format_test.go +0 -123
  1055. package/internal/sqlexport/diskspace.go +0 -36
  1056. package/internal/sqlexport/diskspace_unix.go +0 -24
  1057. package/internal/sqlexport/diskspace_windows.go +0 -26
  1058. package/internal/sqlexport/download.go +0 -75
  1059. package/internal/sqlexport/download_test.go +0 -103
  1060. package/internal/sqlexport/export.go +0 -321
  1061. package/internal/sqlexport/export_test.go +0 -313
  1062. package/internal/sqlexport/format.go +0 -44
  1063. package/internal/sqlexport/livecopy.go +0 -150
  1064. package/internal/sqlexport/livecopy_test.go +0 -273
  1065. package/internal/sqlvalidation/devenv_checks_test.go +0 -134
  1066. package/internal/sqlvalidation/filename.go +0 -30
  1067. package/internal/sqlvalidation/line_by_line.go +0 -91
  1068. package/internal/sqlvalidation/line_by_line_test.go +0 -165
  1069. package/internal/sqlvalidation/multisite.go +0 -31
  1070. package/internal/sqlvalidation/multisite_test.go +0 -34
  1071. package/internal/sqlvalidation/sql.go +0 -510
  1072. package/internal/sqlvalidation/sql_test.go +0 -206
  1073. package/internal/sync/sync.go +0 -246
  1074. package/internal/sync/sync_test.go +0 -253
  1075. package/internal/telemetry/config.go +0 -34
  1076. package/internal/telemetry/default.go +0 -67
  1077. package/internal/telemetry/default_endpoint_test.go +0 -111
  1078. package/internal/telemetry/pendo.go +0 -185
  1079. package/internal/telemetry/pendo_auth_test.go +0 -92
  1080. package/internal/telemetry/pendo_test.go +0 -252
  1081. package/internal/telemetry/scrub.go +0 -90
  1082. package/internal/telemetry/scrub_test.go +0 -131
  1083. package/internal/telemetry/tracker.go +0 -102
  1084. package/internal/telemetry/tracker_test.go +0 -76
  1085. package/internal/telemetry/tracks.go +0 -82
  1086. package/internal/telemetry/tracks_test.go +0 -129
  1087. package/internal/telemetry/uuid.go +0 -50
  1088. package/internal/telemetry/uuid_test.go +0 -90
  1089. package/internal/tui/progress.go +0 -153
  1090. package/internal/tui/progress_test.go +0 -89
  1091. package/internal/tui/progress_tracker.go +0 -299
  1092. package/internal/tui/progress_tracker_test.go +0 -155
  1093. package/internal/update/archive.go +0 -134
  1094. package/internal/update/archive_test.go +0 -132
  1095. package/internal/update/download.go +0 -138
  1096. package/internal/update/download_test.go +0 -32
  1097. package/internal/update/github.go +0 -121
  1098. package/internal/update/install.go +0 -265
  1099. package/internal/update/install_test.go +0 -151
  1100. package/internal/update/lock_unix.go +0 -23
  1101. package/internal/update/lock_windows.go +0 -22
  1102. package/internal/update/native_test.go +0 -70
  1103. package/internal/update/notify.go +0 -91
  1104. package/internal/update/ownership.go +0 -117
  1105. package/internal/update/ownership_test.go +0 -102
  1106. package/internal/update/release.go +0 -120
  1107. package/internal/update/release_test.go +0 -168
  1108. package/internal/update/service.go +0 -197
  1109. package/internal/update/service_test.go +0 -118
  1110. package/internal/update/state.go +0 -116
  1111. package/internal/update/state_test.go +0 -132
  1112. package/internal/upload/debug_test.go +0 -76
  1113. package/internal/upload/filemeta.go +0 -112
  1114. package/internal/upload/filemeta_test.go +0 -94
  1115. package/internal/upload/multipart.go +0 -215
  1116. package/internal/upload/multipart_test.go +0 -210
  1117. package/internal/upload/orchestrate.go +0 -81
  1118. package/internal/upload/parts.go +0 -39
  1119. package/internal/upload/parts_test.go +0 -39
  1120. package/internal/upload/presign.go +0 -103
  1121. package/internal/upload/presign_test.go +0 -128
  1122. package/internal/upload/proxy_test.go +0 -55
  1123. package/internal/upload/putobject.go +0 -92
  1124. package/internal/upload/putobject_test.go +0 -79
  1125. package/internal/upload/retry.go +0 -45
  1126. package/internal/upload/upload.go +0 -22
  1127. package/internal/upload/xmlerror.go +0 -28
  1128. package/internal/validatefiles/files.go +0 -105
  1129. package/internal/validatefiles/files_test.go +0 -143
  1130. package/internal/validatefiles/report.go +0 -172
  1131. package/internal/validatefiles/validatefiles.go +0 -271
  1132. package/internal/validatefiles/validatefiles_test.go +0 -127
  1133. package/internal/version/stamp.go +0 -15
  1134. package/internal/version/stamp_test.go +0 -25
  1135. package/internal/version/version.go +0 -14
  1136. package/internal/version/version_test.go +0 -25
  1137. package/internal/wpshell/parser.go +0 -68
  1138. package/internal/wpshell/parser_test.go +0 -58
  1139. package/internal/wpshell/repl.go +0 -81
  1140. package/internal/wpshell/repl_test.go +0 -71
  1141. package/internal/wpshell/requote.go +0 -13
  1142. package/internal/wpshell/requote_test.go +0 -15
  1143. package/internal/wpssh/debug_test.go +0 -67
  1144. package/internal/wpssh/wpssh.go +0 -124
  1145. package/internal/wpssh/wpssh_test.go +0 -203
  1146. package/internal/wpstream/debug_test.go +0 -116
  1147. package/internal/wpstream/e2e_test.go +0 -178
  1148. package/internal/wpstream/engineio.go +0 -291
  1149. package/internal/wpstream/engineio_test.go +0 -82
  1150. package/internal/wpstream/iostream.go +0 -391
  1151. package/internal/wpstream/iostream_test.go +0 -138
  1152. package/internal/wpstream/run.go +0 -364
  1153. package/internal/wpstream/run_test.go +0 -184
  1154. package/internal/wpstream/socketio.go +0 -435
  1155. package/internal/wpstream/socketio_test.go +0 -402
  1156. package/internal/wpstream/testdata/fixture-server.js +0 -54
  1157. package/make.ps1 +0 -155
  1158. package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.cjs +0 -3
  1159. package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.cjs.map +0 -1
  1160. package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.d.cts +0 -10
  1161. package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.d.ts +0 -10
  1162. package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.js +0 -2
  1163. package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.js.map +0 -1
  1164. package/node_modules/argparse/LICENSE +0 -254
  1165. package/node_modules/argparse/README.md +0 -84
  1166. package/node_modules/argparse/package.json +0 -31
  1167. package/node_modules/lando/node_modules/cliui/build/index.cjs +0 -302
  1168. package/node_modules/lando/node_modules/cliui/build/lib/string-utils.js +0 -27
  1169. package/node_modules/lando/node_modules/js-yaml/README.md +0 -233
  1170. package/node_modules/lando/node_modules/js-yaml/bin/js-yaml.js +0 -117
  1171. package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.js +0 -3022
  1172. package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.js.map +0 -1
  1173. package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.min.js +0 -2
  1174. package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.min.js.map +0 -1
  1175. package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.mjs +0 -3082
  1176. package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.mjs.map +0 -1
  1177. package/node_modules/lando/node_modules/js-yaml/index.js +0 -44
  1178. package/node_modules/lando/node_modules/js-yaml/lib/common.js +0 -50
  1179. package/node_modules/lando/node_modules/js-yaml/lib/dumper.js +0 -937
  1180. package/node_modules/lando/node_modules/js-yaml/lib/exception.js +0 -51
  1181. package/node_modules/lando/node_modules/js-yaml/lib/index_vite_proxy.tmp.mjs +0 -37
  1182. package/node_modules/lando/node_modules/js-yaml/lib/loader.js +0 -1803
  1183. package/node_modules/lando/node_modules/js-yaml/lib/schema/core.js +0 -9
  1184. package/node_modules/lando/node_modules/js-yaml/lib/schema/default.js +0 -20
  1185. package/node_modules/lando/node_modules/js-yaml/lib/schema/failsafe.js +0 -14
  1186. package/node_modules/lando/node_modules/js-yaml/lib/schema/json.js +0 -17
  1187. package/node_modules/lando/node_modules/js-yaml/lib/schema.js +0 -109
  1188. package/node_modules/lando/node_modules/js-yaml/lib/snippet.js +0 -96
  1189. package/node_modules/lando/node_modules/js-yaml/lib/type/binary.js +0 -122
  1190. package/node_modules/lando/node_modules/js-yaml/lib/type/bool.js +0 -35
  1191. package/node_modules/lando/node_modules/js-yaml/lib/type/float.js +0 -99
  1192. package/node_modules/lando/node_modules/js-yaml/lib/type/int.js +0 -142
  1193. package/node_modules/lando/node_modules/js-yaml/lib/type/map.js +0 -8
  1194. package/node_modules/lando/node_modules/js-yaml/lib/type/merge.js +0 -12
  1195. package/node_modules/lando/node_modules/js-yaml/lib/type/null.js +0 -35
  1196. package/node_modules/lando/node_modules/js-yaml/lib/type/omap.js +0 -45
  1197. package/node_modules/lando/node_modules/js-yaml/lib/type/pairs.js +0 -50
  1198. package/node_modules/lando/node_modules/js-yaml/lib/type/seq.js +0 -8
  1199. package/node_modules/lando/node_modules/js-yaml/lib/type/set.js +0 -29
  1200. package/node_modules/lando/node_modules/js-yaml/lib/type/str.js +0 -8
  1201. package/node_modules/lando/node_modules/js-yaml/lib/type/timestamp.js +0 -88
  1202. package/node_modules/lando/node_modules/js-yaml/lib/type.js +0 -66
  1203. package/node_modules/lando/node_modules/js-yaml/package.json +0 -83
  1204. package/node_modules/lando/node_modules/wrap-ansi/index.js +0 -216
  1205. package/node_modules/lando/node_modules/wrap-ansi/package.json +0 -62
  1206. package/node_modules/lando/node_modules/wrap-ansi/readme.md +0 -91
  1207. package/node_modules/lando/node_modules/yargs/build/index.cjs +0 -2920
  1208. package/node_modules/lando/node_modules/yargs/helpers/index.js +0 -14
  1209. package/node_modules/lando/node_modules/yargs/index.cjs +0 -39
  1210. package/node_modules/lando/node_modules/yargs/yargs +0 -9
  1211. package/node_modules/lando/node_modules/yargs-parser/build/index.cjs +0 -1042
  1212. package/node_modules/lando/plugins/lando-test/index.js +0 -3
  1213. package/node_modules/lando/plugins/lando-test/plugin.yml +0 -2
  1214. package/packaging/macos/build-pkg.sh +0 -53
  1215. package/packaging/macos/preinstall +0 -33
  1216. package/packaging/macos/test-install.sh +0 -51
  1217. package/packaging/macos/test_package.py +0 -74
  1218. package/packaging/macos/uninstall.sh +0 -24
  1219. package/packaging/macos/verify-pkg.py +0 -61
  1220. package/packaging/windows/build-msi.ps1 +0 -153
  1221. package/packaging/windows/test-msi.ps1 +0 -225
  1222. package/packaging/windows/verify-msi.ps1 +0 -74
  1223. package/packaging/windows/vip-next.wxs +0 -79
  1224. package/scripts/catalog_script_test.go +0 -123
  1225. package/scripts/vip-next-command-catalog.sh +0 -506
  1226. package/test-utils/undici-mock.js +0 -25
  1227. package/testdata/installer-fixture/main.go +0 -40
  1228. package/testdata/parity/app-deploy-completed.yaml +0 -14
  1229. package/testdata/parity/app-deploy-missing-token.yaml +0 -21
  1230. package/testdata/parity/app-deploy-validate-clean.yaml +0 -11
  1231. package/testdata/parity/app-deploy-validate-missing-themes.yaml +0 -21
  1232. package/testdata/parity/app-get-baseline.yaml +0 -14
  1233. package/testdata/parity/app-get-custom-deploy.yaml +0 -14
  1234. package/testdata/parity/app-get-json.yaml +0 -14
  1235. package/testdata/parity/app-get-not-found.yaml +0 -13
  1236. package/testdata/parity/app-list-baseline.yaml +0 -14
  1237. package/testdata/parity/app-list-csv.yaml +0 -13
  1238. package/testdata/parity/app-list-empty.yaml +0 -13
  1239. package/testdata/parity/app-list-ids.yaml +0 -26
  1240. package/testdata/parity/app-list-json.yaml +0 -13
  1241. package/testdata/parity/app-list-unknown-format.yaml +0 -29
  1242. package/testdata/parity/backup-db-already-in-progress.yaml +0 -15
  1243. package/testdata/parity/backup-db-completed.yaml +0 -14
  1244. package/testdata/parity/backup-db-help.yaml +0 -10
  1245. package/testdata/parity/cache-purge-url-empty.yaml +0 -26
  1246. package/testdata/parity/cache-purge-url-from-file.yaml +0 -21
  1247. package/testdata/parity/cache-purge-url-multi.yaml +0 -19
  1248. package/testdata/parity/cache-purge-url-single.yaml +0 -18
  1249. package/testdata/parity/defensive-mode-enable-with-rechallenge.yaml +0 -20
  1250. package/testdata/parity/edge-workers-artifact-symlink.yaml +0 -8
  1251. package/testdata/parity/edge-workers-bare-location.yaml +0 -8
  1252. package/testdata/parity/edge-workers-bare-path.yaml +0 -8
  1253. package/testdata/parity/edge-workers-bare-type.yaml +0 -8
  1254. package/testdata/parity/edge-workers-build-all.yaml +0 -8
  1255. package/testdata/parity/edge-workers-build-compiler-error.yaml +0 -8
  1256. package/testdata/parity/edge-workers-build-empty.yaml +0 -8
  1257. package/testdata/parity/edge-workers-build-missing-compiler.yaml +0 -8
  1258. package/testdata/parity/edge-workers-build-name-all.yaml +0 -8
  1259. package/testdata/parity/edge-workers-build-one.yaml +0 -8
  1260. package/testdata/parity/edge-workers-delete-force.yaml +0 -8
  1261. package/testdata/parity/edge-workers-delete-rejected.yaml +0 -8
  1262. package/testdata/parity/edge-workers-deploy-active-update-enable.yaml +0 -8
  1263. package/testdata/parity/edge-workers-deploy-active-update.yaml +0 -8
  1264. package/testdata/parity/edge-workers-deploy-all-preparation-failure.yaml +0 -8
  1265. package/testdata/parity/edge-workers-deploy-create-enable.yaml +0 -8
  1266. package/testdata/parity/edge-workers-deploy-create.yaml +0 -8
  1267. package/testdata/parity/edge-workers-deploy-enable-failure.yaml +0 -8
  1268. package/testdata/parity/edge-workers-deploy-inactive-update-enable.yaml +0 -8
  1269. package/testdata/parity/edge-workers-deploy-inactive-update.yaml +0 -8
  1270. package/testdata/parity/edge-workers-deploy-location-clear.yaml +0 -8
  1271. package/testdata/parity/edge-workers-deploy-location-preserve.yaml +0 -8
  1272. package/testdata/parity/edge-workers-deploy-location-replace.yaml +0 -8
  1273. package/testdata/parity/edge-workers-deploy-name-all.yaml +0 -8
  1274. package/testdata/parity/edge-workers-deploy-production-refused.yaml +0 -8
  1275. package/testdata/parity/edge-workers-deploy-production-skip.yaml +0 -8
  1276. package/testdata/parity/edge-workers-deploy-skip-source-create.yaml +0 -8
  1277. package/testdata/parity/edge-workers-deploy-skip-source.yaml +0 -8
  1278. package/testdata/parity/edge-workers-deploy-skip-validate.yaml +0 -8
  1279. package/testdata/parity/edge-workers-deploy-source-empty.yaml +0 -8
  1280. package/testdata/parity/edge-workers-deploy-upload-failure.yaml +0 -8
  1281. package/testdata/parity/edge-workers-disable.yaml +0 -8
  1282. package/testdata/parity/edge-workers-double-dash.yaml +0 -8
  1283. package/testdata/parity/edge-workers-duplicate-names.yaml +0 -8
  1284. package/testdata/parity/edge-workers-enable-production-refused.yaml +0 -8
  1285. package/testdata/parity/edge-workers-enable.yaml +0 -8
  1286. package/testdata/parity/edge-workers-entry-escape.yaml +0 -8
  1287. package/testdata/parity/edge-workers-get-empty-source.yaml +0 -8
  1288. package/testdata/parity/edge-workers-get-missing.yaml +0 -8
  1289. package/testdata/parity/edge-workers-get-no-source.yaml +0 -8
  1290. package/testdata/parity/edge-workers-get-source.yaml +0 -8
  1291. package/testdata/parity/edge-workers-get.yaml +0 -8
  1292. package/testdata/parity/edge-workers-init-invalid-type.yaml +0 -8
  1293. package/testdata/parity/edge-workers-init-nonempty.yaml +0 -8
  1294. package/testdata/parity/edge-workers-init.yaml +0 -8
  1295. package/testdata/parity/edge-workers-json-control-name.yaml +0 -8
  1296. package/testdata/parity/edge-workers-list-csv.yaml +0 -8
  1297. package/testdata/parity/edge-workers-list-empty-json.yaml +0 -8
  1298. package/testdata/parity/edge-workers-list-empty.yaml +0 -8
  1299. package/testdata/parity/edge-workers-list-json.yaml +0 -8
  1300. package/testdata/parity/edge-workers-list-table.yaml +0 -8
  1301. package/testdata/parity/edge-workers-mutation-graphql-error.yaml +0 -8
  1302. package/testdata/parity/edge-workers-mutation-null.yaml +0 -8
  1303. package/testdata/parity/edge-workers-new-invalid-location.yaml +0 -8
  1304. package/testdata/parity/edge-workers-new-invalid-name.yaml +0 -8
  1305. package/testdata/parity/edge-workers-new-location.yaml +0 -8
  1306. package/testdata/parity/edge-workers-new.yaml +0 -8
  1307. package/testdata/parity/edge-workers-read-null.yaml +0 -8
  1308. package/testdata/parity/edge-workers-repeated-path.yaml +0 -8
  1309. package/testdata/parity/edge-workers-repeated-type.yaml +0 -8
  1310. package/testdata/parity/edge-workers-short-equals.yaml +0 -8
  1311. package/testdata/parity/edge-workers-table-control-name.yaml +0 -8
  1312. package/testdata/parity/edge-workers-unicode-order.yaml +0 -8
  1313. package/testdata/parity/edge-workers-validate-all.yaml +0 -8
  1314. package/testdata/parity/edge-workers-validate-invalid.yaml +0 -8
  1315. package/testdata/parity/edge-workers-validate-name-all.yaml +0 -8
  1316. package/testdata/parity/edge-workers-validate-no-artifact.yaml +0 -8
  1317. package/testdata/parity/edge-workers-validate-no-name.yaml +0 -8
  1318. package/testdata/parity/edge-workers-validate-null.yaml +0 -8
  1319. package/testdata/parity/edge-workers-validate.yaml +0 -8
  1320. package/testdata/parity/envvar-delete-baseline.yaml +0 -19
  1321. package/testdata/parity/envvar-delete-prod-cancel.yaml +0 -41
  1322. package/testdata/parity/envvar-delete-typed-mismatch.yaml +0 -44
  1323. package/testdata/parity/envvar-get-baseline.yaml +0 -14
  1324. package/testdata/parity/envvar-get-lowercase-input.yaml +0 -14
  1325. package/testdata/parity/envvar-get-named-help.yaml +0 -24
  1326. package/testdata/parity/envvar-get-not-found.yaml +0 -17
  1327. package/testdata/parity/envvar-getall-baseline.yaml +0 -14
  1328. package/testdata/parity/envvar-getall-empty.yaml +0 -15
  1329. package/testdata/parity/envvar-getall-keyvalue.yaml +0 -22
  1330. package/testdata/parity/envvar-list-baseline.yaml +0 -15
  1331. package/testdata/parity/envvar-list-empty.yaml +0 -15
  1332. package/testdata/parity/envvar-list-ids.yaml +0 -14
  1333. package/testdata/parity/envvar-list-json.yaml +0 -14
  1334. package/testdata/parity/envvar-list-keyvalue.yaml +0 -22
  1335. package/testdata/parity/envvar-set-baseline.yaml +0 -21
  1336. package/testdata/parity/envvar-set-invalid-name.yaml +0 -20
  1337. package/testdata/parity/envvar-set-newrelic-blocked.yaml +0 -21
  1338. package/testdata/parity/envvar-set-prod-cancel.yaml +0 -42
  1339. package/testdata/parity/envvar-set-prod-confirm-skipped.yaml +0 -20
  1340. package/testdata/parity/export-sql-completed.yaml +0 -14
  1341. package/testdata/parity/export-sql-config-conflict.yaml +0 -21
  1342. package/testdata/parity/export-sql-help.yaml +0 -11
  1343. package/testdata/parity/import-media-abort-noninteractive.yaml +0 -19
  1344. package/testdata/parity/import-media-help.yaml +0 -12
  1345. package/testdata/parity/import-media-invalid-archive.yaml +0 -18
  1346. package/testdata/parity/import-media-status-completed.yaml +0 -19
  1347. package/testdata/parity/import-media-status-failed.yaml +0 -18
  1348. package/testdata/parity/import-media-url-completed.yaml +0 -18
  1349. package/testdata/parity/import-sql-bad-extension.yaml +0 -26
  1350. package/testdata/parity/import-sql-help.yaml +0 -12
  1351. package/testdata/parity/import-sql-in-progress.yaml +0 -26
  1352. package/testdata/parity/import-sql-invalid-md5.yaml +0 -27
  1353. package/testdata/parity/import-sql-noninteractive-abort.yaml +0 -20
  1354. package/testdata/parity/import-sql-status-completed.yaml +0 -17
  1355. package/testdata/parity/import-sql-status-no-job.yaml +0 -17
  1356. package/testdata/parity/import-sql-validation-failure.yaml +0 -18
  1357. package/testdata/parity/import-validate-files-clean.yaml +0 -18
  1358. package/testdata/parity/import-validate-files-not-dir.yaml +0 -16
  1359. package/testdata/parity/import-validate-sql-clean.yaml +0 -23
  1360. package/testdata/parity/import-validate-sql-dangerous-stmt.yaml +0 -27
  1361. package/testdata/parity/import-validate-sql-multisite-warn.yaml +0 -23
  1362. package/testdata/parity/logs-baseline.yaml +0 -24
  1363. package/testdata/parity/logs-batch.yaml +0 -24
  1364. package/testdata/parity/logs-empty.yaml +0 -15
  1365. package/testdata/parity/logs-format-json.yaml +0 -15
  1366. package/testdata/parity/logs-limit-100.yaml +0 -24
  1367. package/testdata/parity/phpmyadmin-error.yaml +0 -24
  1368. package/testdata/parity/phpmyadmin-print.yaml +0 -22
  1369. package/testdata/parity/phpmyadmin-silent.yaml +0 -16
  1370. package/testdata/parity/recordings/app-get-baseline/app.json +0 -11
  1371. package/testdata/parity/recordings/app-get-custom-deploy/app.json +0 -8
  1372. package/testdata/parity/recordings/app-get-json/app.json +0 -11
  1373. package/testdata/parity/recordings/app-get-not-found/app.json +0 -1
  1374. package/testdata/parity/recordings/app-list-baseline/apps.json +0 -1
  1375. package/testdata/parity/recordings/app-list-csv/apps.json +0 -1
  1376. package/testdata/parity/recordings/app-list-empty/apps.json +0 -1
  1377. package/testdata/parity/recordings/app-list-json/apps.json +0 -1
  1378. package/testdata/parity/recordings/backup-db-already-in-progress/backup-status-1.json +0 -1
  1379. package/testdata/parity/recordings/backup-db-already-in-progress/backup-status-2.json +0 -1
  1380. package/testdata/parity/recordings/backup-db-completed/backup-status-1.json +0 -1
  1381. package/testdata/parity/recordings/backup-db-completed/backup-status-2.json +0 -1
  1382. package/testdata/parity/recordings/backup-db-completed/backup-status-3.json +0 -1
  1383. package/testdata/parity/recordings/cache-purge-url-empty/resolve-app.json +0 -1
  1384. package/testdata/parity/recordings/cache-purge-url-from-file/purge.json +0 -1
  1385. package/testdata/parity/recordings/cache-purge-url-from-file/resolve-app.json +0 -1
  1386. package/testdata/parity/recordings/cache-purge-url-from-file/urls.txt +0 -2
  1387. package/testdata/parity/recordings/cache-purge-url-multi/purge.json +0 -1
  1388. package/testdata/parity/recordings/cache-purge-url-multi/resolve-app.json +0 -1
  1389. package/testdata/parity/recordings/cache-purge-url-single/purge.json +0 -1
  1390. package/testdata/parity/recordings/cache-purge-url-single/resolve-app.json +0 -1
  1391. package/testdata/parity/recordings/config-software-get/resolve-app.json +0 -1
  1392. package/testdata/parity/recordings/config-software-update/resolve-app.json +0 -1
  1393. package/testdata/parity/recordings/defensive-mode-enable-rechallenge/mutation-elevated.json +0 -1
  1394. package/testdata/parity/recordings/defensive-mode-enable-rechallenge/mutation-success.json +0 -1
  1395. package/testdata/parity/recordings/defensive-mode-enable-rechallenge/parker-create-session.json +0 -1
  1396. package/testdata/parity/recordings/defensive-mode-enable-rechallenge/parker-exchange.json +0 -1
  1397. package/testdata/parity/recordings/defensive-mode-enable-rechallenge/parker-status-verified.json +0 -1
  1398. package/testdata/parity/recordings/envvar-delete-baseline/delete.json +0 -1
  1399. package/testdata/parity/recordings/envvar-delete-baseline/resolve-app.json +0 -1
  1400. package/testdata/parity/recordings/envvar-delete-prod-cancel/resolve-app.json +0 -1
  1401. package/testdata/parity/recordings/envvar-delete-typed-mismatch/resolve-app.json +0 -1
  1402. package/testdata/parity/recordings/envvar-get-baseline/envvars.json +0 -1
  1403. package/testdata/parity/recordings/envvar-get-baseline/resolve-app.json +0 -1
  1404. package/testdata/parity/recordings/envvar-get-lowercase-input/envvars.json +0 -1
  1405. package/testdata/parity/recordings/envvar-get-lowercase-input/resolve-app.json +0 -1
  1406. package/testdata/parity/recordings/envvar-get-named-help/envvars.json +0 -1
  1407. package/testdata/parity/recordings/envvar-get-named-help/resolve-app.json +0 -1
  1408. package/testdata/parity/recordings/envvar-get-not-found/envvars.json +0 -1
  1409. package/testdata/parity/recordings/envvar-get-not-found/resolve-app.json +0 -1
  1410. package/testdata/parity/recordings/envvar-getall-baseline/envvars.json +0 -1
  1411. package/testdata/parity/recordings/envvar-getall-baseline/resolve-app.json +0 -1
  1412. package/testdata/parity/recordings/envvar-getall-empty/envvars.json +0 -1
  1413. package/testdata/parity/recordings/envvar-getall-empty/resolve-app.json +0 -1
  1414. package/testdata/parity/recordings/envvar-getall-keyvalue/envvars.json +0 -1
  1415. package/testdata/parity/recordings/envvar-getall-keyvalue/resolve-app.json +0 -1
  1416. package/testdata/parity/recordings/envvar-list-baseline/envvars.json +0 -1
  1417. package/testdata/parity/recordings/envvar-list-baseline/resolve-app.json +0 -1
  1418. package/testdata/parity/recordings/envvar-list-empty/envvars.json +0 -1
  1419. package/testdata/parity/recordings/envvar-list-empty/resolve-app.json +0 -1
  1420. package/testdata/parity/recordings/envvar-list-ids/envvars.json +0 -1
  1421. package/testdata/parity/recordings/envvar-list-ids/resolve-app.json +0 -1
  1422. package/testdata/parity/recordings/envvar-list-json/envvars.json +0 -1
  1423. package/testdata/parity/recordings/envvar-list-json/resolve-app.json +0 -1
  1424. package/testdata/parity/recordings/envvar-list-keyvalue/envvars.json +0 -1
  1425. package/testdata/parity/recordings/envvar-list-keyvalue/resolve-app.json +0 -1
  1426. package/testdata/parity/recordings/envvar-set-baseline/add.json +0 -1
  1427. package/testdata/parity/recordings/envvar-set-baseline/resolve-app.json +0 -1
  1428. package/testdata/parity/recordings/envvar-set-baseline/value.txt +0 -1
  1429. package/testdata/parity/recordings/envvar-set-invalid-name/resolve-app.json +0 -1
  1430. package/testdata/parity/recordings/envvar-set-invalid-name/value.txt +0 -1
  1431. package/testdata/parity/recordings/envvar-set-newrelic-blocked/resolve-app.json +0 -1
  1432. package/testdata/parity/recordings/envvar-set-newrelic-blocked/value.txt +0 -1
  1433. package/testdata/parity/recordings/envvar-set-prod-cancel/resolve-app.json +0 -1
  1434. package/testdata/parity/recordings/envvar-set-prod-cancel/value.txt +0 -1
  1435. package/testdata/parity/recordings/envvar-set-prod-confirm-skipped/add.json +0 -1
  1436. package/testdata/parity/recordings/envvar-set-prod-confirm-skipped/resolve-app.json +0 -1
  1437. package/testdata/parity/recordings/envvar-set-prod-confirm-skipped/value.txt +0 -1
  1438. package/testdata/parity/recordings/export-sql-completed/export-status-1.json +0 -1
  1439. package/testdata/parity/recordings/export-sql-completed/export-status-2.json +0 -1
  1440. package/testdata/parity/recordings/import-media-invalid-archive/file.sql +0 -1
  1441. package/testdata/parity/recordings/import-media-shared/abort-media-import.json +0 -1
  1442. package/testdata/parity/recordings/import-media-shared/env-info.json +0 -1
  1443. package/testdata/parity/recordings/import-media-shared/resolve-app.json +0 -1
  1444. package/testdata/parity/recordings/import-media-shared/start-media-import.json +0 -1
  1445. package/testdata/parity/recordings/import-media-status-completed/progress.json +0 -1
  1446. package/testdata/parity/recordings/import-media-status-failed/progress.json +0 -1
  1447. package/testdata/parity/recordings/import-media-url-completed/progress.json +0 -1
  1448. package/testdata/parity/recordings/import-sql-bad-extension/file.txt +0 -1
  1449. package/testdata/parity/recordings/import-sql-in-progress/env-info.json +0 -1
  1450. package/testdata/parity/recordings/import-sql-in-progress/resolve-app.json +0 -1
  1451. package/testdata/parity/recordings/import-sql-noninteractive-abort/clean.sql +0 -5
  1452. package/testdata/parity/recordings/import-sql-shared/env-info.json +0 -1
  1453. package/testdata/parity/recordings/import-sql-shared/multisite.json +0 -1
  1454. package/testdata/parity/recordings/import-sql-shared/resolve-app.json +0 -1
  1455. package/testdata/parity/recordings/import-sql-status-completed/progress.json +0 -1
  1456. package/testdata/parity/recordings/import-sql-status-no-job/progress.json +0 -1
  1457. package/testdata/parity/recordings/import-sql-validation-failure/dirty.sql +0 -6
  1458. package/testdata/parity/recordings/import-validate-files-clean/config.json +0 -1
  1459. package/testdata/parity/recordings/import-validate-files-clean/uploads/2020/06/a.jpg +0 -1
  1460. package/testdata/parity/recordings/import-validate-files-clean/uploads/2020/06/b.png +0 -1
  1461. package/testdata/parity/recordings/import-validate-sql-clean/clean.sql +0 -17
  1462. package/testdata/parity/recordings/import-validate-sql-dangerous-stmt/dangerous.sql +0 -11
  1463. package/testdata/parity/recordings/import-validate-sql-multisite-warn/multisite.sql +0 -12
  1464. package/testdata/parity/recordings/logs-baseline/logs.json +0 -1
  1465. package/testdata/parity/recordings/logs-baseline/resolve-app.json +0 -1
  1466. package/testdata/parity/recordings/logs-batch/logs.json +0 -1
  1467. package/testdata/parity/recordings/logs-batch/resolve-app.json +0 -1
  1468. package/testdata/parity/recordings/logs-empty/logs.json +0 -1
  1469. package/testdata/parity/recordings/logs-empty/resolve-app.json +0 -1
  1470. package/testdata/parity/recordings/logs-format-json/logs.json +0 -1
  1471. package/testdata/parity/recordings/logs-format-json/resolve-app.json +0 -1
  1472. package/testdata/parity/recordings/logs-limit-100/logs.json +0 -1
  1473. package/testdata/parity/recordings/logs-limit-100/resolve-app.json +0 -1
  1474. package/testdata/parity/recordings/m7c-shared/resolve-app.json +0 -1
  1475. package/testdata/parity/recordings/phpmyadmin-error/enable.json +0 -1
  1476. package/testdata/parity/recordings/phpmyadmin-error/resolve-app.json +0 -1
  1477. package/testdata/parity/recordings/phpmyadmin-print/enable.json +0 -1
  1478. package/testdata/parity/recordings/phpmyadmin-print/generate.json +0 -1
  1479. package/testdata/parity/recordings/phpmyadmin-print/resolve-app.json +0 -1
  1480. package/testdata/parity/recordings/phpmyadmin-print/status.json +0 -1
  1481. package/testdata/parity/recordings/phpmyadmin-silent/enable.json +0 -1
  1482. package/testdata/parity/recordings/phpmyadmin-silent/generate.json +0 -1
  1483. package/testdata/parity/recordings/phpmyadmin-silent/resolve-app.json +0 -1
  1484. package/testdata/parity/recordings/phpmyadmin-silent/status.json +0 -1
  1485. package/testdata/parity/recordings/slowlogs-baseline/resolve-app.json +0 -1
  1486. package/testdata/parity/recordings/slowlogs-baseline/slowlogs.json +0 -1
  1487. package/testdata/parity/recordings/slowlogs-csv/resolve-app.json +0 -1
  1488. package/testdata/parity/recordings/slowlogs-csv/slowlogs.json +0 -1
  1489. package/testdata/parity/recordings/slowlogs-empty/resolve-app.json +0 -1
  1490. package/testdata/parity/recordings/slowlogs-empty/slowlogs.json +0 -1
  1491. package/testdata/parity/recordings/slowlogs-limit-50/resolve-app.json +0 -1
  1492. package/testdata/parity/recordings/slowlogs-limit-50/slowlogs.json +0 -1
  1493. package/testdata/parity/recordings/sync-already-syncing/resolve-app.json +0 -1
  1494. package/testdata/parity/recordings/sync-already-syncing/sync-start.json +0 -1
  1495. package/testdata/parity/recordings/sync-already-syncing/sync-status-1.json +0 -1
  1496. package/testdata/parity/recordings/sync-already-syncing/sync-status-2.json +0 -1
  1497. package/testdata/parity/recordings/sync-baseline/resolve-app.json +0 -1
  1498. package/testdata/parity/recordings/sync-baseline/sync-start.json +0 -1
  1499. package/testdata/parity/recordings/sync-baseline/sync-status-1.json +0 -1
  1500. package/testdata/parity/recordings/sync-baseline/sync-status-2.json +0 -1
  1501. package/testdata/parity/recordings/whoami-baseline/me-response.json +0 -1
  1502. package/testdata/parity/recordings/wp-nodejs-rejected/resolve-app.json +0 -1
  1503. package/testdata/parity/recordings/wp-production-confirm-decline/resolve-app.json +0 -1
  1504. package/testdata/parity/recordings/wp-ssh-happy/resolve-app.json +0 -1
  1505. package/testdata/parity/recordings/wp-websocket-redirect/resolve-app.json +0 -1
  1506. package/testdata/parity/slowlogs-baseline.yaml +0 -18
  1507. package/testdata/parity/slowlogs-csv.yaml +0 -16
  1508. package/testdata/parity/slowlogs-empty.yaml +0 -17
  1509. package/testdata/parity/slowlogs-limit-50.yaml +0 -16
  1510. package/testdata/parity/sync-already-syncing.yaml +0 -20
  1511. package/testdata/parity/sync-baseline.yaml +0 -19
  1512. package/testdata/parity/version-smoke.yaml +0 -14
  1513. package/testdata/parity/whoami-baseline.yaml +0 -14
  1514. package/testdata/parity/wp-help.yaml +0 -12
  1515. package/testdata/parity/wp-nodejs-rejected.yaml +0 -13
  1516. package/testdata/parity/wp-production-confirm-decline.yaml +0 -14
  1517. package/testdata/parity/wp-ssh-happy.yaml +0 -15
  1518. package/testdata/parity/wp-websocket-redirect.yaml +0 -14
  1519. package/testdata/parity-local/app-get-csv.yaml +0 -8
  1520. package/testdata/parity-local/app-get-json.yaml +0 -8
  1521. package/testdata/parity-local/app-get-table.yaml +0 -8
  1522. package/testdata/parity-local/app-list-csv.yaml +0 -8
  1523. package/testdata/parity-local/app-list-json.yaml +0 -8
  1524. package/testdata/parity-local/app-list-table.yaml +0 -8
  1525. package/testdata/parity-local/edge-workers/basic/edge-workers.json +0 -1
  1526. package/testdata/parity-local/edge-workers/basic/workers/headers/assembly/index.ts +0 -1
  1527. package/testdata/parity-local/edge-workers/basic/workers/headers/worker.json +0 -1
  1528. package/testdata/parity-local/edge-workers/two-workers/edge-workers.json +0 -1
  1529. package/testdata/parity-local/edge-workers/two-workers/workers/a/assembly/index.ts +0 -1
  1530. package/testdata/parity-local/edge-workers/two-workers/workers/a/worker.json +0 -1
  1531. package/testdata/parity-local/edge-workers/two-workers/workers/b/assembly/index.ts +0 -1
  1532. package/testdata/parity-local/edge-workers/two-workers/workers/b/worker.json +0 -1
  1533. package/testdata/parity-local/envvar-list-csv.yaml +0 -8
  1534. package/testdata/parity-local/envvar-list-ids.yaml +0 -8
  1535. package/testdata/parity-local/envvar-list-json.yaml +0 -8
  1536. package/testdata/parity-local/envvar-list-keyvalue.yaml +0 -8
  1537. package/testdata/parity-local/envvar-list-table.yaml +0 -8
  1538. package/testdata/parity-local/software-get-csv.yaml +0 -8
  1539. package/testdata/parity-local/software-get-json.yaml +0 -8
  1540. package/testdata/parity-local/software-get-table.yaml +0 -8
  1541. package/testdata/parity-local/whoami.yaml +0 -8
  1542. package/testdata/update-fixture/main.go +0 -62
  1543. package/third_party/go-search-replace/MANIFEST +0 -33
  1544. package/tsconfig.json +0 -25
  1545. /package/node_modules/lando/node_modules/{wrap-ansi → ansi-regex}/license +0 -0
@@ -1,1161 +0,0 @@
1
- package commands
2
-
3
- import (
4
- "context"
5
- "errors"
6
- "fmt"
7
- "io"
8
- "net/url"
9
- "os"
10
- "regexp"
11
- "strconv"
12
- "strings"
13
- "time"
14
-
15
- "github.com/Khan/genqlient/graphql"
16
- "github.com/fatih/color"
17
- "github.com/spf13/cobra"
18
- "golang.org/x/term"
19
-
20
- "github.com/Automattic/vip/internal/appctx"
21
- "github.com/Automattic/vip/internal/debuglog"
22
- "github.com/Automattic/vip/internal/gql"
23
- "github.com/Automattic/vip/internal/searchreplace"
24
- "github.com/Automattic/vip/internal/siteimport"
25
- "github.com/Automattic/vip/internal/sqlvalidation"
26
- "github.com/Automattic/vip/internal/tui"
27
- "github.com/Automattic/vip/internal/upload"
28
- )
29
-
30
- // ImportSQLCmd returns `vip import sql <file|url>`.
31
- //
32
- // Node parity: src/bin/vip-import-sql.js (852 LOC). Flow: gates →
33
- // (local) SQL validation → playbook → type-the-domain confirm →
34
- // optional skip-backup double confirm → optional in-place confirm →
35
- // progress phase (search-replace, upload / URL passthrough,
36
- // StartImport mutation) → status polling (internal/siteimport).
37
- func ImportSQLCmd() *cobra.Command {
38
- cmd := &cobra.Command{
39
- Use: "sql <file|url>",
40
- Short: "Import a SQL database file into an environment",
41
- Long: "Import a local or remote SQL database file into a VIP Platform environment. " +
42
- "Local files are validated and uploaded; remote files are fetched by the platform. " +
43
- "The command polls the import status until completion.",
44
- Args: cobra.ExactArgs(1),
45
- }
46
-
47
- // Flags — Node .option() registrations, vip-import-sql.js:546-575.
48
- cmd.Flags().BoolP("skip-validate", "s", false, "Do not perform file validation prior to import. If the file contains unsupported entries, the import is likely to fail.")
49
- cmd.Flags().StringArray("search-replace", nil, "Search for a string in a local or remote SQL database file and replace it with a new string. Separate the values by a comma only; no spaces (e.g. --search-replace=\"from,to\"). Can be passed more than once.")
50
- cmd.Flags().BoolP("in-place", "i", false, "Overwrite a local SQL database file with the results of a search and replace operation prior to import.")
51
- cmd.Flags().StringP("output", "o", "", "Save the results of a --search-replace operation that is run against a local SQL database file to a copy of that file. Accepts a local file path. Ignored when used with the --in-place option.")
52
- cmd.Flags().Bool("skip-maintenance-mode", false, "Prevent an unlaunched environment from going into maintenance mode during the import of a local or remote SQL database file. Skipping maintenance mode can cause site instability during import.")
53
- cmd.Flags().StringP("md5", "m", "", "Verify the integrity of a remote SQL database file. Accepts an MD5 hash value.")
54
- cmd.Flags().StringArray("header", nil, "Pass a header name and value (Formatted as \"Name: Value\") in a request for a remote SQL database file. Can be passed more than once for multiple headers and values.")
55
- cmd.Flags().BoolP("skip-backup", "B", false, "Skip creating a backup before importing the SQL file. WARNING: This is extremely dangerous and can result in permanent data loss.")
56
-
57
- addAppEnvFlags(cmd)
58
- cfg := GetConfig()
59
- return appctx.Build(cmd,
60
- appctx.WithAppContext(cfg.AppCtxConfig),
61
- appctx.WithEnvContext(),
62
- ).WithRun(runImportSQL)
63
- }
64
-
65
- // Prompt indirection so command-level tests can stub the interactive
66
- // pieces without a TTY.
67
- var (
68
- importInputPrompt = appctx.Input
69
- importConfirmPrompt = appctx.Confirm
70
- )
71
-
72
- // importHeader mirrors the parsed {name, value} pairs Node builds in
73
- // parseHeaders (vip-import-sql.js:119).
74
- type importHeader struct {
75
- Name string
76
- Value string
77
- }
78
-
79
- // parseImportHeaders ports parseHeaders (vip-import-sql.js:119).
80
- func parseImportHeaders(headers []string) ([]importHeader, error) {
81
- parsed := make([]importHeader, 0, len(headers))
82
- for _, header := range headers {
83
- colonIndex := strings.Index(header, ":")
84
- if colonIndex == -1 {
85
- return nil, fmt.Errorf("Invalid header format: %q. Expected format: \"Name: Value\"", header)
86
- }
87
- name := strings.TrimSpace(header[:colonIndex])
88
- value := strings.TrimSpace(header[colonIndex+1:])
89
- if name == "" {
90
- return nil, fmt.Errorf("Invalid header format: %q. Header name cannot be empty.", header)
91
- }
92
- parsed = append(parsed, importHeader{Name: name, Value: value})
93
- }
94
- return parsed, nil
95
- }
96
-
97
- // driveLetterProtocolRE — Node isValidUrl rejects single-drive-letter
98
- // "protocols" so Windows paths like C:\x don't count as URLs
99
- // (vip-import-sql.js:99).
100
- var driveLetterProtocolRE = regexp.MustCompile(`(?i)^[a-z]:$`)
101
-
102
- // isValidImportURL ports isValidUrl (vip-import-sql.js:96).
103
- func isValidImportURL(s string) bool {
104
- u, err := url.Parse(s)
105
- if err != nil || u.Scheme == "" {
106
- return false
107
- }
108
- return !driveLetterProtocolRE.MatchString(u.Scheme + ":")
109
- }
110
-
111
- // isValidMd5 ports isValidMd5 (vip-import-sql.js:110).
112
- var md5RE = regexp.MustCompile(`(?i)^[a-f0-9]{32}$`)
113
-
114
- func isValidMd5(md5 string) bool { return md5RE.MatchString(md5) }
115
-
116
- // importEnvInfo flattens the ImportSQLEnvInfo response fields the
117
- // handler consumes (Node got these via appQuery — vip-import-sql.js:41).
118
- type importEnvInfo struct {
119
- Launched bool
120
- PrimaryDomainName string
121
- HasImportStatus bool
122
- ImportInProgress bool
123
- DbOperationInProgress bool
124
- WPSites []importWPSite
125
- // WPSitesKnown is false when the API returned no site catalog at all
126
- // (wpSitesSDS null, or wpSitesSDS.nodes null) — Node's `siteArray`
127
- // being undefined. It is true for a present list, INCLUDING an empty
128
- // one. The playbook treats the two cases differently.
129
- WPSitesKnown bool
130
- }
131
-
132
- type importWPSite struct {
133
- ID int64
134
- HomeURL string
135
- }
136
-
137
- func fetchImportEnvInfo(ctx context.Context, client graphql.Client, appID, envID int64) (*importEnvInfo, error) {
138
- resp, err := gql.ImportSQLEnvInfo(ctx, client, appID, envID)
139
- if err != nil {
140
- return nil, err
141
- }
142
- info := &importEnvInfo{}
143
- if resp == nil || resp.App == nil || len(resp.App.Environments) == 0 || resp.App.Environments[0] == nil {
144
- return info, nil
145
- }
146
- env := resp.App.Environments[0]
147
- if env.Launched != nil {
148
- info.Launched = *env.Launched
149
- }
150
- if env.PrimaryDomain != nil {
151
- info.PrimaryDomainName = env.PrimaryDomain.Name
152
- }
153
- if env.ImportStatus != nil {
154
- info.HasImportStatus = true
155
- if env.ImportStatus.ImportInProgress != nil {
156
- info.ImportInProgress = *env.ImportStatus.ImportInProgress
157
- }
158
- if env.ImportStatus.DbOperationInProgress != nil {
159
- info.DbOperationInProgress = *env.ImportStatus.DbOperationInProgress
160
- }
161
- }
162
- // Node reads `selectedEnvironmentObj?.wpSitesSDS?.nodes`, so BOTH a null
163
- // wpSitesSDS and a null nodes leave siteArray undefined. An empty array
164
- // is a real (fatal) answer; undefined is "don't know" (warn + proceed).
165
- if env.WpSitesSDS != nil && env.WpSitesSDS.Nodes != nil {
166
- info.WPSitesKnown = true
167
- for _, n := range env.WpSitesSDS.Nodes {
168
- if n == nil {
169
- continue
170
- }
171
- s := importWPSite{}
172
- if n.Id != nil {
173
- s.ID = *n.Id
174
- }
175
- if n.HomeUrl != nil {
176
- s.HomeURL = *n.HomeUrl
177
- }
178
- info.WPSites = append(info.WPSites, s)
179
- }
180
- }
181
- return info, nil
182
- }
183
-
184
- // isMultiSiteInSiteMeta ports is-multi-site.ts:11 (sans Node's WeakMap
185
- // memo — one call per process here).
186
- func isMultiSiteInSiteMeta(ctx context.Context, client graphql.Client, appID, envID int64) (bool, error) {
187
- resp, err := gql.AppMultiSiteCheck(ctx, client, &appID, &envID)
188
- if err != nil {
189
- // Node: exit.withError(`StartImport call failed: ${GraphQlError}`)
190
- // — is-multi-site.ts:56 (message is a Node copy/paste bug; kept).
191
- return false, fmt.Errorf("StartImport call failed: %s", err)
192
- }
193
- if resp == nil || resp.App == nil || len(resp.App.Environments) == 0 || resp.App.Environments[0] == nil {
194
- return false, nil
195
- }
196
- env := resp.App.Environments[0]
197
- if (env.IsMultisite != nil && *env.IsMultisite) ||
198
- (env.IsSubdirectoryMultisite != nil && *env.IsSubdirectoryMultisite) {
199
- return true, nil
200
- }
201
- return false, nil
202
- }
203
-
204
- // isMultisitePrimaryDomainMapped ports is-multisite-domain-mapped.ts:72.
205
- func isMultisitePrimaryDomainMapped(ctx context.Context, client graphql.Client, appID, envID int64, primaryDomain string) (bool, error) {
206
- resp, err := gql.AppMappedDomains(ctx, client, &appID, &envID)
207
- if err != nil {
208
- // Node: same copy/paste "StartImport call failed" message
209
- // (is-multisite-domain-mapped.ts:111).
210
- return false, fmt.Errorf("StartImport call failed: %s", err)
211
- }
212
- if resp == nil || resp.App == nil || len(resp.App.Environments) == 0 || resp.App.Environments[0] == nil {
213
- return false, nil
214
- }
215
- env := resp.App.Environments[0]
216
- if env.Domains == nil {
217
- return false, nil
218
- }
219
- for _, d := range env.Domains.Nodes {
220
- if d != nil && d.Name == primaryDomain {
221
- return true, nil
222
- }
223
- }
224
- return false, nil
225
- }
226
-
227
- // gateInput carries everything importSQLGates needs; limits are
228
- // injectable so tests don't need 10GB fixtures.
229
- type gateInput struct {
230
- FileNameOrURL string
231
- IsURL bool
232
- Md5 string
233
- Launched bool
234
- AppTypeID int64
235
- Info *importEnvInfo
236
- Out io.Writer
237
- SizeLimit int64
238
- SizeLimitLaunched int64
239
- }
240
-
241
- // importSQLGates ports gates (vip-import-sql.js:154). Every error string
242
- // is verbatim Node.
243
- func importSQLGates(g gateInput) error {
244
- if g.SizeLimit == 0 {
245
- g.SizeLimit = siteimport.SQLImportFileSizeLimit
246
- }
247
- if g.SizeLimitLaunched == 0 {
248
- g.SizeLimitLaunched = siteimport.SQLImportFileSizeLimitLaunched
249
- }
250
-
251
- if g.Md5 != "" && !isValidMd5(g.Md5) {
252
- trackEvent("import_sql_command_error", map[string]any{"error_type": "invalid-md5"})
253
- return errors.New("The provided MD5 hash is invalid. It should be a 32-character hexadecimal string.")
254
- }
255
- if !g.IsURL && g.Md5 != "" {
256
- fmt.Fprintln(g.Out, color.YellowString("The --md5 parameter is only valid for imports from a remote URL. This option will be ignored."))
257
- }
258
-
259
- if !g.IsURL {
260
- fileName := g.FileNameOrURL
261
- meta, metaErr := upload.GetFileMeta(fileName)
262
- if metaErr != nil {
263
- // Node's gates call getFileMeta first (js:175), so a missing
264
- // file errors before any filename validation. Node surfaces a
265
- // raw ENOENT; we use the gate's own unreadable wording since
266
- // the raw errno text is platform-specific anyway.
267
- trackEvent("import_sql_command_error", map[string]any{"error_type": "sqlfile-unreadable"})
268
- return fmt.Errorf("File '%s' does not exist or is not readable.", fileName)
269
- }
270
-
271
- if err := sqlvalidation.ValidateFilename(meta.BaseName); err != nil {
272
- trackEvent("import_sql_command_error", map[string]any{"error_type": "invalid-filename"})
273
- return err
274
- }
275
- if err := sqlvalidation.ValidateImportFileExtension(fileName); err != nil {
276
- trackEvent("import_sql_command_error", map[string]any{"error_type": "invalid-extension"})
277
- return err
278
- }
279
-
280
- fi, statErr := os.Stat(fileName)
281
- if statErr != nil {
282
- trackEvent("import_sql_command_error", map[string]any{"error_type": "sqlfile-unreadable"})
283
- return fmt.Errorf("File '%s' does not exist or is not readable.", fileName)
284
- }
285
- if fi.IsDir() {
286
- trackEvent("import_sql_command_error", map[string]any{"error_type": "sqlfile-notfile"})
287
- return fmt.Errorf("Path '%s' is not a file.", fileName)
288
- }
289
- if f, err := os.Open(fileName); err != nil { // #nosec G304 -- access check, Node checkFileAccess
290
- trackEvent("import_sql_command_error", map[string]any{"error_type": "sqlfile-unreadable"})
291
- return fmt.Errorf("File '%s' does not exist or is not readable.", fileName)
292
- } else {
293
- f.Close()
294
- }
295
- if fi.Size() == 0 {
296
- trackEvent("import_sql_command_error", map[string]any{"error_type": "sqlfile-empty"})
297
- return fmt.Errorf("File '%s' is empty.", fileName)
298
- }
299
-
300
- maxFileSize := g.SizeLimit
301
- if g.Launched {
302
- maxFileSize = g.SizeLimitLaunched
303
- }
304
- if fi.Size() > maxFileSize {
305
- trackEvent("import_sql_command_error", map[string]any{
306
- "error_type": "sqlfile-toobig", "file_size": fi.Size(), "launched": g.Launched,
307
- })
308
- launchedNote := ""
309
- if g.Launched {
310
- launchedNote = " Note: This limit is lower for launched environments to maintain site stability."
311
- }
312
- return fmt.Errorf("The sql import file size (%d bytes) exceeds the limit (%d bytes).%s\n\nPlease split it into multiple files or contact support for assistance.",
313
- fi.Size(), maxFileSize, launchedNote)
314
- }
315
- }
316
-
317
- // currentUserCanImportForApp is a stub in Node (db-file-import.ts:21,
318
- // always true) — no Go branch needed.
319
-
320
- if !siteimport.IsSupportedApp(g.AppTypeID) {
321
- trackEvent("import_sql_command_error", map[string]any{"error_type": "unsupported-app"})
322
- return errors.New("The type of application you specified does not currently support SQL imports.")
323
- }
324
-
325
- if g.Info == nil || !g.Info.HasImportStatus {
326
- trackEvent("import_sql_command_error", map[string]any{"error_type": "empty-import-status"})
327
- return errors.New("Could not determine the import status for this environment. Check the app/environment and if the problem persists, contact support for assistance.")
328
- }
329
- if g.Info.ImportInProgress {
330
- trackEvent("import_sql_command_error", map[string]any{"error_type": "existing-import"})
331
- return errors.New("There is already an import in progress.\n\nYou can view the status with command:\n vip import sql status")
332
- }
333
- if g.Info.DbOperationInProgress {
334
- trackEvent("import_sql_command_error", map[string]any{"error_type": "existing-dbop"})
335
- return errors.New("There is already a database operation in progress. Please try again later.")
336
- }
337
- return nil
338
- }
339
-
340
- // validateAndGetTableNames ports validateAndGetTableNames
341
- // (vip-import-sql.js:420): run the static SQL checks + the site-type
342
- // (multisite) checks, returning the captured table names. The "Reading
343
- // line N " ticker (sql.ts:533) prints every 500 lines.
344
- func validateAndGetTableNames(cmd *cobra.Command, client graphql.Client, appID, envID int64, fileName string, skipValidate bool, searchReplace []string, isMultiSite bool) ([]string, error) {
345
- out := cmd.OutOrStdout()
346
- if skipValidate {
347
- debuglog.Printf(cmd.Context(), "@automattic/vip:bin:vip-import-sql", "Validation was skipped. No playbook information will be displayed.")
348
- fmt.Fprintln(out, "Skipping SQL file validation.")
349
- return []string{}, nil
350
- }
351
-
352
- f, err := os.Open(fileName) // #nosec G304 -- user-supplied CLI path
353
- if err != nil {
354
- // line-by-line.ts:29 wording.
355
- return nil, errors.New("The file at the provided path is either missing or not readable. Please check the input and try again.")
356
- }
357
- defer f.Close()
358
-
359
- // Static checks + multisite capture share one streaming pass, like
360
- // Node's fileLineValidations dispatch loop (line-by-line.ts:51).
361
- wpSiteCapture := siteimport.NewMultilineCapture("INSERT INTO `wp_site`")
362
- var wpSiteStatements [][]string
363
- ticker := newImportLineTicker(out, isTerminalWriter(out))
364
- debuglog.Printf(cmd.Context(), "vip:validations:line-by-line", "Validations: static SQL checks and site type")
365
- res, scanErr := sqlvalidation.ValidateWithLineHook(f, func(line string, lineNum int) {
366
- if lineNum%500 == 0 {
367
- ticker.tick(lineNum) // sql.ts:533 trailing space
368
- }
369
- wpSiteStatements = wpSiteCapture.Feed(line)
370
- })
371
- ticker.done()
372
- if scanErr != nil {
373
- return nil, fmt.Errorf("Error validating input file: %s", scanErr)
374
- }
375
- isMultiSiteSqlDump := res.IsMultiSite
376
- debuglog.Printf(cmd.Context(), "vip:vip-import-sql", "Site type: target_multisite=%t dump_multisite=%t", isMultiSite, isMultiSiteSqlDump)
377
-
378
- // Static-validation report (import mode): problems throw with the
379
- // joined error output + --skip-validate advice (vip-import-sql.js:436).
380
- if msg, problems := buildImportValidationError(res); problems > 0 {
381
- fmt.Fprintln(out, "")
382
- return nil, fmt.Errorf("%s\n\nIf you are confident that the file does not contain unsupported statements, you can retry the command with the %s option.\n",
383
- msg, color.YellowString("--skip-validate"))
384
- }
385
-
386
- // siteTypeValidations.postLineExecutionProcessing (site-type.ts:29).
387
- if !isMultiSite && isMultiSiteSqlDump {
388
- trackEvent("import_sql_command_error", map[string]any{"error_type": "not-multisite-with-multisite-sql-dump"})
389
- return nil, errors.New("You have provided a multisite SQL dump file for import into a single site (non-multisite).")
390
- }
391
- if isMultiSite && !isMultiSiteSqlDump {
392
- trackEvent("import_sql_command_error", map[string]any{"error_type": "subsite-import-without-subsite-sql-dump"})
393
- return nil, errors.New("You have requested a subsite SQL import but have not provided a subsite compatible SQL dump.")
394
- }
395
-
396
- primaryDomain := siteimport.MaybeSearchReplacePrimaryDomain(
397
- siteimport.GetPrimaryDomainFromSQL(wpSiteStatements), searchReplace)
398
- if primaryDomain != "" {
399
- mapped, err := isMultisitePrimaryDomainMapped(cmd.Context(), client, appID, envID, primaryDomain)
400
- if err != nil {
401
- return nil, err
402
- }
403
- if isMultiSite && !mapped {
404
- trackEvent("import_sql_command_error", map[string]any{"error_type": "multisite-import-where-primary-domain-unmapped"})
405
- return nil, errors.New("This import would set the network's main site domain to " + primaryDomain +
406
- ", however this domain is not mapped to the target environment. Please replace this domain in your " +
407
- "import file, or map it to the environment.")
408
- }
409
- }
410
-
411
- return res.TableNames, nil
412
- }
413
-
414
- // isTerminalWriter reports whether w is backed by a terminal. Sensing the
415
- // WRITER (rather than os.Stdout unconditionally) keeps redirected output and
416
- // tests honest.
417
- func isTerminalWriter(w io.Writer) bool {
418
- f, ok := w.(interface{ Fd() uintptr })
419
- return ok && term.IsTerminal(int(f.Fd()))
420
- }
421
-
422
- // importLineTicker renders the "Reading line N" validation counter.
423
- //
424
- // Node's sql.ts imports `{ stdout as log } from '@wwa/single-line-log'` and
425
- // calls log(`Reading line ${lineNum} `) every 500 lines (sql.ts:531-534), so
426
- // the counter REWRITES itself in place. Printing a newline-terminated line
427
- // per tick instead means a 5M-line dump buries the validation findings under
428
- // ~10,000 lines of progress chrome.
429
- //
430
- // tui.MultiLineRenderer is the repo's in-place renderer (the same primitive
431
- // startImportProgressRenderer uses); a one-element frame is the single-line
432
- // case. On a non-TTY sink the ticker goes silent: Node still emits its
433
- // cursor-movement escapes there, but those carry no information once the
434
- // output is a pipe or a CI log — and emitting raw ANSI (or the old
435
- // 10,000 lines) is strictly worse than nothing. This matches the non-TTY
436
- // handling in startImportProgressRenderer (progress_renderer.go:36).
437
- type importLineTicker struct {
438
- r *tui.MultiLineRenderer
439
- }
440
-
441
- func newImportLineTicker(w io.Writer, tty bool) *importLineTicker {
442
- if !tty {
443
- return &importLineTicker{}
444
- }
445
- return &importLineTicker{r: tui.NewMultiLineRenderer(w, true)}
446
- }
447
-
448
- func (t *importLineTicker) tick(lineNum int) {
449
- if t.r == nil {
450
- return
451
- }
452
- // Trailing space is Node's (sql.ts:533).
453
- t.r.Render([]string{fmt.Sprintf("Reading line %d ", lineNum)})
454
- }
455
-
456
- // done releases the line so subsequent output starts fresh instead of
457
- // overwriting the last counter frame.
458
- func (t *importLineTicker) done() {
459
- if t.r == nil {
460
- return
461
- }
462
- t.r.Done()
463
- }
464
-
465
- // importSearchReplacePair is one parsed --search-replace value.
466
- // HasTo distinguishes "no replacement given at all" from "replace with the
467
- // empty string" — two different wire payloads with two different server
468
- // behaviors.
469
- type importSearchReplacePair struct {
470
- From string
471
- To string
472
- HasTo bool
473
- }
474
-
475
- // parseImportSearchReplacePair ports Node's
476
- // `pair.split( ',' ).map( str => str.trim() )` + `{from: arr[0], to: arr[1]}`
477
- // (vip-import-sql.js:821-827; the identical destructure lives in
478
- // formatSearchReplaceValues, format.ts:201).
479
- //
480
- // Two JS behaviors that a naive strings.SplitN(pair, ",", 2) gets wrong:
481
- //
482
- // - split(',') has no limit, so "a,b,c" → ["a","b","c"] and only the first
483
- // two entries are read. The tail is DISCARDED, not appended to `to`.
484
- // - with no comma, arr[1] is undefined, and JSON.stringify omits undefined
485
- // properties — so `to` never reaches the server.
486
- func parseImportSearchReplacePair(pair string) importSearchReplacePair {
487
- parts := strings.Split(pair, ",")
488
- out := importSearchReplacePair{From: strings.TrimSpace(parts[0])}
489
- if len(parts) > 1 {
490
- out.To = strings.TrimSpace(parts[1])
491
- out.HasTo = true
492
- }
493
- return out
494
- }
495
-
496
- // localSearchReplaceNeeded reports whether the local search-replace pass will
497
- // produce anything anyone can observe.
498
- //
499
- // DELIBERATE DIVERGENCE FROM NODE — cost only, no change to imported bytes.
500
- // Node runs the pass for every local file with pairs and then discards the
501
- // result: `outputFileName` is destructured at vip-import-sql.js:674,
502
- // type-checked at :681, and never referenced again, because `fileNameToUpload`
503
- // was pinned to the ORIGINAL at :577. Validation does not use it either (it
504
- // takes the original plus the raw pairs and simulates the replacement). The
505
- // server performs the real replacement from the StartImport payload.
506
- //
507
- // So on the default path Node reads the whole dump and writes a rewritten copy
508
- // to a temp file that nothing ever opens — on a 5 GB dump, 5 GB read and 5 GB
509
- // written for nothing. We run it only when the output is observable:
510
- // - --in-place, which rewrites the user's own file and is the only thing that
511
- // changes what gets uploaded, or
512
- // - an explicit --output, which the user asked for as an artifact.
513
- //
514
- // Note --output is NOT the file that gets imported, in either CLI; only
515
- // --in-place changes that. See TestImportSQLHappyPathUploadsOriginalFile.
516
- func localSearchReplaceNeeded(isURL, inPlace bool, output string, searchReplace []string) bool {
517
- if isURL || len(searchReplace) == 0 {
518
- return false // Node never runs a local pass for a URL
519
- }
520
- return inPlace || output != ""
521
- }
522
-
523
- // serverSideSearchReplaceNeeded reports whether --search-replace pairs must be
524
- // sent to the server, i.e. whether the bytes we uploaded still need replacing.
525
- //
526
- // DELIBERATE DIVERGENCE FROM NODE. Node applies the pairs twice on the
527
- // --in-place path, which silently corrupts non-idempotent replacements:
528
- //
529
- // - vip-import-sql.js:577 sets `fileNameToUpload = fileNameOrURL` BEFORE the
530
- // search-replace block at :671 and never reassigns it, so the rewritten
531
- // --output copy is discarded and the ORIGINAL is uploaded. The server pass
532
- // at :760 is then the only application. Correct.
533
- // - With --in-place the original file on disk IS the rewritten file, so the
534
- // upload already carries the replacements — and :760 is not gated on
535
- // isUrl, so the server applies them again.
536
- //
537
- // A domain swap is idempotent and hides this (the second pass matches
538
- // nothing), but a pair like `a,aa` turns "a" into "aaaa". We send the pairs
539
- // only when the upload has not already been rewritten.
540
- func serverSideSearchReplaceNeeded(isURL, inPlace bool, searchReplace []string) bool {
541
- if len(searchReplace) == 0 {
542
- return false
543
- }
544
- // A URL is never rewritten locally (runImportSQL forces inPlace=false for
545
- // URLs), so the server must always do the work.
546
- if isURL {
547
- return true
548
- }
549
- // Local file: only --in-place mutates what we upload.
550
- return !inPlace
551
- }
552
-
553
- // buildImportSearchReplaceInput maps the raw --search-replace values onto
554
- // the StartImport input shape. A pair with no comma leaves To nil so the
555
- // field is omitted from the JSON body, matching Node. Sending to:"" instead
556
- // would tell the server to replace every occurrence of `from` with nothing.
557
- func buildImportSearchReplaceInput(searchReplace []string) []*gql.AppEnvironmentImportSearchReplace {
558
- pairs := make([]*gql.AppEnvironmentImportSearchReplace, 0, len(searchReplace))
559
- for _, raw := range searchReplace {
560
- p := parseImportSearchReplacePair(raw)
561
- from := p.From
562
- entry := &gql.AppEnvironmentImportSearchReplace{From: &from}
563
- if p.HasTo {
564
- to := p.To
565
- entry.To = &to
566
- }
567
- pairs = append(pairs, entry)
568
- }
569
- return pairs
570
- }
571
-
572
- // displayPlaybook ports displayPlaybook (vip-import-sql.js:446).
573
- func displayPlaybook(out io.Writer, fileName, domain, formattedEnv string, app appctx.App, launched, isMultiSite bool, tableNames, searchReplace []string, wpSites []importWPSite, wpSitesKnown bool) error {
574
- fmt.Fprintln(out)
575
- fmt.Fprintf(out, " importing: %s\n", color.HiBlueString(fileName))
576
- fmt.Fprintf(out, " to: %s\n", color.CyanString(domain))
577
- fmt.Fprintf(out, " site: %s (%s)\n", app.Name, formattedEnv)
578
-
579
- // Node's formatSearchReplaceValues (format.ts:201) destructures the same
580
- // `split(',').map(trim)` as the wire payload, so the playbook must show
581
- // the same from/to the server will receive.
582
- for _, pair := range searchReplace {
583
- p := parseImportSearchReplacePair(pair)
584
- fmt.Fprintf(out, " s-r: %s -> %s\n", color.BlueString(p.From), color.BlueString(p.To))
585
- }
586
-
587
- if isMultiSite {
588
- fmt.Fprintf(out, " multisite: true\n")
589
- }
590
-
591
- if len(tableNames) == 0 {
592
- return nil // validation skipped — no playbook table info (js:481)
593
- }
594
- fmt.Fprintln(out)
595
- if !isMultiSite {
596
- fmt.Fprintln(out, "Tables that will be imported by this process:")
597
- fmt.Fprintln(out, strings.Join(tableNames, " "))
598
- return nil
599
- }
600
-
601
- // Node's three-way branch (js:489-499). `siteArray` is
602
- // `selectedEnvironmentObj?.wpSitesSDS?.nodes`:
603
- //
604
- // undefined (wpSitesSDS or nodes null) → yellow warning, then RETURN
605
- // (the import proceeds)
606
- // [] → throw
607
- // [...] → per-site table breakdown
608
- //
609
- // Proceeding on "unknown" is not unguarded: promptToContinueImport still
610
- // makes the user type the target domain immediately after the playbook.
611
- // Hard-failing here would make SQL import impossible on any multisite
612
- // whose site catalog the API declines to return.
613
- if !wpSitesKnown {
614
- fmt.Fprintln(out, color.YellowString(
615
- "Unable to determine the network sites affected by this import. Please proceed only if you are confident that the contents of the file are valid for import."))
616
- return nil
617
- }
618
- if len(wpSites) == 0 {
619
- return errors.New("There were no sites in your multisite installation.")
620
- }
621
-
622
- if launched {
623
- fmt.Fprintln(out, color.YellowString("You are updating tables in a launched multisite environment. The performance of sites on the network might be impacted by this operation."))
624
- }
625
- fmt.Fprintln(out, color.YellowString("The following sites will be affected by the import:"))
626
- for _, site := range wpSites {
627
- var siteRE *regexp.Regexp
628
- if site.ID == 1 {
629
- siteRE = regexp.MustCompile(`(?i)^wp_[a-z]+`)
630
- } else {
631
- siteRE = regexp.MustCompile(fmt.Sprintf(`(?i)^wp_%d_[a-z]+`, site.ID))
632
- }
633
- var group []string
634
- for _, name := range tableNames {
635
- if siteRE.MatchString(name) {
636
- group = append(group, name)
637
- }
638
- }
639
- fmt.Fprintln(out)
640
- fmt.Fprintln(out, color.HiBlueString(
641
- fmt.Sprintf("Blog with ID %d and URL %s will import the following tables:", site.ID, site.HomeURL)))
642
- fmt.Fprintln(out, strings.Join(group, " "))
643
- }
644
- return nil
645
- }
646
-
647
- // promptToContinueImport ports promptToContinue (vip-import-sql.js:326):
648
- // the user must type the (uppercased) domain to proceed.
649
- func promptToContinueImport(cmd *cobra.Command, out io.Writer, launched bool, formattedEnv, domain string, isMultiSite bool, tableNames []string) error {
650
- fmt.Fprintln(out)
651
- promptToMatch := strings.ToUpper(domain)
652
- source := "the above file"
653
- if !isMultiSite && len(tableNames) > 0 {
654
- source = "the above tables"
655
- }
656
- launchedLabel := "unlaunched"
657
- if launched {
658
- launchedLabel = "launched"
659
- }
660
- message := fmt.Sprintf("You are about to import %s into the %s %s environment %s.\nType '%s' (without the quotes) to continue:\n",
661
- source, launchedLabel, formattedEnv, color.YellowString(domain), color.YellowString(promptToMatch))
662
- answer, err := importInputPrompt(cmd, message, "")
663
- if err != nil || strings.ToUpper(answer) != promptToMatch {
664
- trackEvent("import_sql_unexpected_tables", nil)
665
- return errors.New("The input did not match the expected environment label. Import aborted.")
666
- }
667
- return nil
668
- }
669
-
670
- // confirmSkipBackup ports confirmSkipBackup (vip-import-sql.js:359): the
671
- // ⚠️ warning wall, a y/n confirm, then a typed "yes".
672
- func confirmSkipBackup(cmd *cobra.Command, out io.Writer) (bool, error) {
673
- fmt.Fprintln(out, color.New(color.FgRed, color.Bold).Sprint("⚠️ WARNING ⚠️"))
674
- fmt.Fprintln(out, color.RedString(color.New(color.FgRed, color.Bold).Sprint("YOU ARE ABOUT TO SKIP CREATING A BACKUP BEFORE IMPORTING SQL!\n")))
675
- fmt.Fprintln(out, color.New(color.FgYellow, color.Bold).Sprint("This action is EXTREMELY DANGEROUS and can result in:"))
676
- fmt.Fprintln(out, color.New(color.FgYellow, color.Bold).Sprint("• Permanent data loss"))
677
- fmt.Fprintln(out, color.New(color.FgYellow, color.Bold).Sprint("• Inability to automatically restore your database"))
678
- fmt.Fprintln(out, color.New(color.FgYellow, color.Bold).Sprint("• Complete site failure"))
679
- fmt.Fprintln(out, color.New(color.FgRed, color.Bold).Sprint("There is NO way to undo this action once the import begins!\n"))
680
-
681
- importAbortedMsg := color.RedString("✗ Import aborted.")
682
-
683
- first, err := importConfirmPrompt(cmd, "Are you absolutely certain you want to skip the backup?", false)
684
- if err != nil || !first {
685
- trackEvent("import_sql_skip_backup_cancelled", nil)
686
- fmt.Fprintln(out, importAbortedMsg)
687
- return false, nil
688
- }
689
-
690
- second, err := importInputPrompt(cmd,
691
- fmt.Sprintf("Type '%s' (without quotes) to proceed WITHOUT creating a backup (this cannot be undone):\n", color.YellowString("yes")), "")
692
- if err != nil || strings.ToLower(second) != "yes" {
693
- trackEvent("import_sql_skip_backup_cancelled", nil)
694
- fmt.Fprintln(cmd.ErrOrStderr(), "Failed to confirm!")
695
- fmt.Fprintln(out, importAbortedMsg)
696
- return false, nil
697
- }
698
-
699
- trackEvent("import_sql_skip_backup_confirmed", nil)
700
- fmt.Fprintln(out, color.RedString("⚠️ Backup will be skipped. Proceeding with import..."))
701
- return true, nil
702
- }
703
-
704
- func runImportSQL(cmd *cobra.Command, args []string) error {
705
- ae := appctx.FromContext(cmd.Context())
706
- if ae == nil {
707
- return errors.New("appctx not set; this is a wiring bug")
708
- }
709
- cfg := GetConfig()
710
- out := cmd.OutOrStdout()
711
- fileNameOrURL := args[0]
712
-
713
- skipValidate, _ := cmd.Flags().GetBool("skip-validate")
714
- searchReplace, _ := cmd.Flags().GetStringArray("search-replace")
715
- inPlace, _ := cmd.Flags().GetBool("in-place")
716
- output, _ := cmd.Flags().GetString("output")
717
- skipMaintenanceMode, _ := cmd.Flags().GetBool("skip-maintenance-mode")
718
- md5Flag, _ := cmd.Flags().GetString("md5")
719
- headerFlags, _ := cmd.Flags().GetStringArray("header")
720
- skipBackup, _ := cmd.Flags().GetBool("skip-backup")
721
-
722
- gqlCtx := gql.WithAllowGQLErrors(cmd.Context())
723
- info, err := fetchImportEnvInfo(gqlCtx, cfg.GQLClient, ae.App.ID, ae.Env.ID)
724
- if err != nil {
725
- return err
726
- }
727
- isMultiSite, err := isMultiSiteInSiteMeta(gqlCtx, cfg.GQLClient, ae.App.ID, ae.Env.ID)
728
- if err != nil {
729
- return err
730
- }
731
- isURL := isValidImportURL(fileNameOrURL)
732
-
733
- headers, err := parseImportHeaders(headerFlags)
734
- if err != nil {
735
- return err
736
- }
737
- if !isURL && len(headers) > 0 {
738
- fmt.Fprintln(out, color.YellowString("The --header option is only valid for imports from a remote URL. This option will be ignored."))
739
- }
740
- if isURL && inPlace {
741
- // Node's wording says "remote URL" here — known Node copy bug,
742
- // kept bug-for-bug (vip-import-sql.js:600).
743
- fmt.Fprintln(out, color.YellowString("The --in-place option is only valid for imports from a remote URL. This option will be ignored."))
744
- inPlace = false
745
- }
746
- if isURL && output != "" {
747
- fmt.Fprintln(out, color.YellowString("The --output option is only valid for imports of a local file. This option will be ignored."))
748
- output = ""
749
- }
750
-
751
- debuglog.Printf(cmd.Context(), "@automattic/vip:bin:vip-import-sql", "Options: remote=%t skip_validate=%t skip_backup=%t headers=%d replacements=%d", isURL, skipValidate, skipBackup, len(headers), len(searchReplace))
752
-
753
- trackEvent("import_sql_command_execute", map[string]any{"is_url": isURL})
754
-
755
- if err := importSQLGates(gateInput{
756
- FileNameOrURL: fileNameOrURL, IsURL: isURL, Md5: md5Flag,
757
- Launched: info.Launched, AppTypeID: ae.App.TypeId, Info: info, Out: out,
758
- }); err != nil {
759
- return err
760
- }
761
-
762
- domain := info.PrimaryDomainName
763
- if domain == "" {
764
- domain = fmt.Sprintf("#%d", ae.Env.ID) // js:626
765
- }
766
- formattedEnv := formatEnvironment(ae.Env.Type)
767
- launched := info.Launched
768
-
769
- // fileNameToUpload === fileNameOrURL in Node (js:630, never
770
- // reassigned): the --output copy of a search-replace run is NOT what
771
- // gets uploaded; only --in-place mutates the original. Bug-for-bug.
772
- fileNameToUpload := fileNameOrURL
773
-
774
- var tableNames []string
775
- if !isURL {
776
- tableNames, err = validateAndGetTableNames(cmd, cfg.GQLClient, ae.App.ID, ae.Env.ID,
777
- fileNameToUpload, skipValidate, searchReplace, isMultiSite)
778
- if err != nil {
779
- return err
780
- }
781
- }
782
-
783
- if err := displayPlaybook(out, fileNameOrURL, domain, formattedEnv, ae.App,
784
- launched, isMultiSite, tableNames, searchReplace, info.WPSites, info.WPSitesKnown); err != nil {
785
- return err
786
- }
787
-
788
- if err := promptToContinueImport(cmd, out, launched, formattedEnv, domain, isMultiSite, tableNames); err != nil {
789
- return err
790
- }
791
-
792
- if skipBackup {
793
- confirmed, err := confirmSkipBackup(cmd, out)
794
- if err != nil {
795
- return err
796
- }
797
- if !confirmed {
798
- return nil // Node: process.exit(0)
799
- }
800
- }
801
-
802
- if !isURL && inPlace {
803
- approved, err := importConfirmPrompt(cmd,
804
- "Are you sure you want to run search and replace on your input file? This operation is not reversible.", false)
805
- if err != nil || !approved {
806
- trackEvent("search_replace_in_place_cancelled", map[string]any{"is_import": true, "in_place": inPlace})
807
- return nil // Node: process.exit()
808
- }
809
- }
810
-
811
- // ===== progress phase: no stray prints below (js:690 WARNING) =====
812
- pt := tui.NewProgressTracker([]tui.ProgressStep{
813
- {ID: "replace", Name: "Performing search and replace"},
814
- {ID: "upload", Name: "Uploading file"},
815
- {ID: "queue_import", Name: "Queueing import"},
816
- })
817
- status := "running"
818
- setPrefixSuffix := func() {
819
- pt.SetPrefix("\n=============================================================\nProcessing the SQL import for your environment...\n")
820
- trailing := ""
821
- if status == "running" {
822
- trailing = "Loading remaining steps"
823
- }
824
- pt.SetSuffix("\n" + tui.GlyphForStatus(tui.StepState(status), tui.SpinnerGlyphs[0]) + " " + trailing)
825
- }
826
- setPrefixSuffix()
827
- renderer := startImportProgressRenderer(cmd, pt)
828
- defer renderer.stop(cmd, false)
829
-
830
- failWithError := func(failureErr error) error {
831
- status = "failed"
832
- setPrefixSuffix()
833
- renderer.stop(cmd, true)
834
- return failureErr
835
- }
836
-
837
- switch {
838
- case localSearchReplaceNeeded(isURL, inPlace, output, searchReplace):
839
- _ = pt.StepRunning("replace")
840
- res, srErr := searchreplace.RunContext(cmd.Context(), fileNameOrURL, searchReplace, searchreplace.Options{
841
- InPlace: inPlace, Output: output,
842
- })
843
- if srErr != nil {
844
- _ = pt.StepFailed("replace")
845
- return failWithError(srErr)
846
- }
847
- if res.OutputFileName == "" {
848
- _ = pt.StepFailed("replace")
849
- return failWithError(errors.New("Unable to determine location of the intermediate search and replace file."))
850
- }
851
- _ = pt.StepSuccess("replace")
852
- case !isURL && len(searchReplace) > 0:
853
- // Pairs were given, but the local pass would only write a temp file
854
- // nothing ever opens (see localSearchReplaceNeeded). The server applies
855
- // them from the StartImport payload instead. The step still reports
856
- // success because the replacement IS happening — just not here — so the
857
- // progress output matches Node's.
858
- _ = pt.StepRunning("replace")
859
- _ = pt.StepSuccess("replace")
860
- default:
861
- _ = pt.StepSkipped("replace")
862
- }
863
-
864
- appID := ae.App.ID
865
- envID := ae.Env.ID
866
- input := &gql.AppEnvironmentImportInput{
867
- Id: &appID,
868
- EnvironmentId: &envID,
869
- SkipMaintenanceMode: &skipMaintenanceMode,
870
- }
871
- if skipBackup {
872
- t := true
873
- input.SkipBackup = &t
874
- }
875
-
876
- if isURL {
877
- _ = pt.StepSkipped("upload")
878
- input.Url = &fileNameOrURL
879
- input.SearchReplace = []*gql.AppEnvironmentImportSearchReplace{}
880
- if md5Flag != "" {
881
- input.Md5 = &md5Flag
882
- }
883
- urlHeaders := make([]*gql.RequestHeader, 0, len(headers))
884
- for _, h := range headers {
885
- urlHeaders = append(urlHeaders, &gql.RequestHeader{Name: h.Name, Value: h.Value})
886
- }
887
- input.UrlHeaders = urlHeaders
888
- } else {
889
- _ = pt.StepRunning("upload")
890
- meta, metaErr := upload.GetFileMeta(fileNameToUpload)
891
- if metaErr != nil {
892
- _ = pt.StepFailed("upload")
893
- return failWithError(metaErr)
894
- }
895
- uc := &upload.Client{APIHost: cfg.APIHost, Token: cfg.Token}
896
- res, upErr := uc.UploadImportFile(cmd.Context(), appID, envID, meta, "md5",
897
- func(pct string) { pt.SetUploadPercentage(pct) })
898
- if upErr != nil {
899
- trackEvent("import_sql_command_error", map[string]any{
900
- "error_type": "upload_failed", "upload_error": upErr.Error(),
901
- })
902
- _ = pt.StepFailed("upload")
903
- return failWithError(upErr)
904
- }
905
- basename := res.Meta.BaseName
906
- checksum := res.Checksum
907
- input.Basename = &basename
908
- input.Md5 = &checksum
909
- input.SearchReplace = []*gql.AppEnvironmentImportSearchReplace{}
910
- _ = pt.StepSuccess("upload")
911
- debuglog.Printf(cmd.Context(), "@automattic/vip:bin:vip-import-sql", "Upload complete. Initiating the import.")
912
- trackEvent("import_sql_upload_complete", nil)
913
- }
914
-
915
- // searchReplace pairs → input.SearchReplace [{from,to}] (js:760-774),
916
- // but only when the uploaded bytes have not already been rewritten.
917
- // DELIBERATE DIVERGENCE — see serverSideSearchReplaceNeeded.
918
- if serverSideSearchReplaceNeeded(isURL, inPlace, searchReplace) {
919
- input.SearchReplace = buildImportSearchReplaceInput(searchReplace)
920
- }
921
-
922
- if _, err := gql.StartImport(gql.WithAllowGQLErrors(cmd.Context()), cfg.GQLClient, input); err != nil {
923
- trackEvent("import_sql_command_error", map[string]any{"error_type": "StartImport-failed"})
924
- _ = pt.StepFailed("queue_import")
925
- return failWithError(fmt.Errorf("StartImport call failed: %s", err))
926
- }
927
- debuglog.Printf(cmd.Context(), "@automattic/vip:bin:vip-import-sql", "Import queued")
928
- _ = pt.StepSuccess("queue_import")
929
-
930
- return importSQLCheckStatus(cmd, pt, renderer, ae, domain, false)
931
- }
932
-
933
- // importPollInterval — VIP_IMPORT_SQL_INTERVAL_MS overrides the 5s Node
934
- // default for tests (the VIP_SYNC_INTERVAL_MS precedent, sync.go:180).
935
- func importPollInterval() time.Duration {
936
- if v := os.Getenv("VIP_IMPORT_SQL_INTERVAL_MS"); v != "" {
937
- if n, err := strconv.Atoi(v); err == nil && n > 0 {
938
- return time.Duration(n) * time.Millisecond
939
- }
940
- }
941
- return siteimport.DefaultPollInterval
942
- }
943
-
944
- // importSQLCheckStatus wraps siteimport.CheckStatus: builds the
945
- // ProgressFetch closure over gql.ImportSQLProgress (including the
946
- // pseudo-job synthesis from importStatus.progress — status.ts:288-328),
947
- // renders the Status/Site suffix block, and maps the terminal outcome to
948
- // Node's output + exit semantics.
949
- func importSQLCheckStatus(cmd *cobra.Command, pt *tui.ProgressTracker, renderer *importProgressRenderer, ae *appctx.AppEnv, domain string, returnFast bool) error {
950
- cfg := GetConfig()
951
- pollCtx := gql.WithAllowGQLErrors(cmd.Context())
952
-
953
- fetch := func(ctx context.Context) (*siteimport.ProgressSnapshot, error) {
954
- appID := ae.App.ID
955
- envID := ae.Env.ID
956
- resp, err := gql.ImportSQLProgress(ctx, cfg.GQLClient, &appID, &envID)
957
- if err != nil {
958
- return nil, err
959
- }
960
- if resp == nil || resp.App == nil || len(resp.App.Environments) == 0 || resp.App.Environments[0] == nil {
961
- // status.ts:92 — "Unable to determine import status from environment"
962
- return nil, errors.New("Unable to determine import status from environment")
963
- }
964
- env := resp.App.Environments[0]
965
- snap := &siteimport.ProgressSnapshot{}
966
- if env.Launched != nil {
967
- snap.Launched = *env.Launched
968
- }
969
-
970
- var importStatus = env.ImportStatus
971
- var statusSteps []siteimport.JobStep
972
- var statusStartedAt int64
973
- var failedStep *siteimport.FailedStep
974
- if importStatus != nil && importStatus.Progress != nil {
975
- if importStatus.Progress.Started_at != nil {
976
- statusStartedAt = int64(*importStatus.Progress.Started_at)
977
- }
978
- for _, s := range importStatus.Progress.Steps {
979
- if s == nil {
980
- continue
981
- }
982
- name := ""
983
- if s.Name != nil {
984
- name = *s.Name
985
- }
986
- result := ""
987
- if s.Result != nil {
988
- result = *s.Result
989
- }
990
- statusSteps = append(statusSteps, siteimport.JobStep{
991
- ID: name,
992
- Name: siteimport.Capitalize(strings.ReplaceAll(name, "_", " ")),
993
- Status: tui.StepState(result),
994
- })
995
- if result == "failed" && failedStep == nil {
996
- fs := &siteimport.FailedStep{Name: name, Output: nil}
997
- if s.Started_at != nil {
998
- fs.StartedAt = int64(*s.Started_at)
999
- }
1000
- for _, o := range s.Output {
1001
- if o != nil {
1002
- fs.Output = append(fs.Output, *o)
1003
- }
1004
- }
1005
- failedStep = fs
1006
- }
1007
- }
1008
- }
1009
- snap.StatusProgressStartedAt = statusStartedAt
1010
- snap.FailedStep = failedStep
1011
-
1012
- if len(env.Jobs) > 0 && env.Jobs[0] != nil {
1013
- job := *env.Jobs[0]
1014
- ij := &siteimport.ImportJob{}
1015
- if c := job.GetCreatedAt(); c != nil {
1016
- ij.CreatedAt = *c
1017
- }
1018
- if c := job.GetCompletedAt(); c != nil {
1019
- ij.CompletedAt = *c
1020
- }
1021
- if p := job.GetProgress(); p != nil {
1022
- if p.Status != nil {
1023
- ij.Status = *p.Status
1024
- }
1025
- for _, s := range p.Steps {
1026
- if s == nil {
1027
- continue
1028
- }
1029
- step := siteimport.JobStep{}
1030
- if s.Id != nil {
1031
- step.ID = *s.Id
1032
- }
1033
- if s.Name != nil {
1034
- step.Name = *s.Name
1035
- }
1036
- if s.Status != nil {
1037
- step.Status = tui.StepState(*s.Status)
1038
- }
1039
- ij.Steps = append(ij.Steps, step)
1040
- }
1041
- }
1042
- snap.Job = ij
1043
- return snap, nil
1044
- }
1045
-
1046
- // No k8s job: synthesize from importStatus.progress
1047
- // (status.ts:288-328). No steps yet → Job stays nil (wait).
1048
- if len(statusSteps) == 0 {
1049
- return snap, nil
1050
- }
1051
- ij := &siteimport.ImportJob{Steps: statusSteps}
1052
- anyFailed := false
1053
- allSuccess := true
1054
- restoreDBPending := false
1055
- var maxFinished int64
1056
- for _, s := range importStatus.Progress.Steps {
1057
- if s == nil {
1058
- continue
1059
- }
1060
- result := ""
1061
- if s.Result != nil {
1062
- result = *s.Result
1063
- }
1064
- name := ""
1065
- if s.Name != nil {
1066
- name = *s.Name
1067
- }
1068
- if result == "failed" {
1069
- anyFailed = true
1070
- }
1071
- if result != "success" {
1072
- allSuccess = false
1073
- }
1074
- if name == "restore_db" && result == "" {
1075
- restoreDBPending = true
1076
- }
1077
- if s.Finished_at != nil && int64(*s.Finished_at) > maxFinished {
1078
- maxFinished = int64(*s.Finished_at)
1079
- }
1080
- }
1081
- if anyFailed && !restoreDBPending {
1082
- ij.Status = "error"
1083
- } else if allSuccess {
1084
- ij.Status = "success"
1085
- ij.CompletedAt = time.Unix(maxFinished, 0).UTC().Format(time.RFC1123)
1086
- }
1087
- if statusStartedAt > 0 {
1088
- ij.CreatedAt = time.Unix(statusStartedAt, 0).UTC().Format(time.RFC1123)
1089
- }
1090
- snap.Job = ij
1091
- return snap, nil
1092
- }
1093
-
1094
- overall := "Checking..." // status.ts:213
1095
- setSuffix := func(createdAt, completedAt string) {
1096
- sprite := tui.GlyphForStatus(tui.StepState(overall), tui.SpinnerGlyphs[0])
1097
- formattedCreated := "TBD"
1098
- if createdAt != "" {
1099
- formattedCreated = createdAt
1100
- }
1101
- formattedCompleted := "TBD"
1102
- if createdAt != "" && completedAt != "" {
1103
- formattedCompleted = completedAt
1104
- }
1105
- exitPrompt := "(Press ^C to hide progress. The import will continue in the background.)"
1106
-
1107
- var statusMessage string
1108
- switch overall {
1109
- case "success":
1110
- statusMessage = fmt.Sprintf("Success %s imported data should be visible on your site %s.", sprite, domain)
1111
- case "running":
1112
- if pt.AllStepsSucceeded() {
1113
- statusMessage = fmt.Sprintf("Finishing up... %s ", sprite)
1114
- } else {
1115
- statusMessage = fmt.Sprintf("%s %s", siteimport.Capitalize(overall), sprite)
1116
- }
1117
- default:
1118
- statusMessage = fmt.Sprintf("%s %s", siteimport.Capitalize(overall), sprite)
1119
- }
1120
-
1121
- maybeExitPrompt := ""
1122
- if overall == "running" {
1123
- maybeExitPrompt = exitPrompt
1124
- }
1125
- maybeTimestamps := ""
1126
- if overall == "running" || overall == "success" || overall == "failed" {
1127
- maybeTimestamps = fmt.Sprintf("\nSQL Import Started: %s\nSQL Import Completed: %s", formattedCreated, formattedCompleted)
1128
- }
1129
- pt.SetSuffix(fmt.Sprintf("\n=============================================================\nStatus: %s\nSite: %s (%s)%s\n=============================================================\n%s\n",
1130
- statusMessage, ae.App.Name, formatEnvironment(ae.Env.Type), maybeTimestamps, maybeExitPrompt))
1131
- }
1132
-
1133
- res, err := siteimport.CheckStatus(pollCtx, siteimport.CheckStatusOpts{
1134
- Fetch: fetch,
1135
- Tracker: pt,
1136
- Interval: importPollInterval(),
1137
- ReturnMissingJobImmediately: returnFast,
1138
- OnPoll: func(createdAt, completedAt, _ string) {
1139
- setSuffix(createdAt, completedAt)
1140
- },
1141
- })
1142
- if err != nil {
1143
- var fe *siteimport.ImportFailedError
1144
- if errors.As(err, &fe) {
1145
- overall = "failed"
1146
- renderer.stop(cmd, true)
1147
- return errors.New(siteimport.GetErrorMessage(fe))
1148
- }
1149
- renderer.stop(cmd, true)
1150
- return err
1151
- }
1152
-
1153
- if res.Message != "" {
1154
- overall = res.Message // e.g. "No import job found" (status.ts:421)
1155
- } else {
1156
- overall = res.Status
1157
- }
1158
- setSuffix(res.CreatedAt, res.CompletedAt)
1159
- renderer.stop(cmd, true)
1160
- return nil
1161
- }