netlify-cli 12.0.7 → 12.0.8

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 (277) hide show
  1. package/bin/run.mjs +31 -0
  2. package/npm-shrinkwrap.json +598 -227
  3. package/package.json +15 -16
  4. package/scripts/{postinstall.js → postinstall.cjs} +3 -3
  5. package/src/commands/addons/{addons-auth.js → addons-auth.cjs} +2 -2
  6. package/src/commands/addons/{addons-config.js → addons-config.cjs} +7 -7
  7. package/src/commands/addons/{addons-create.js → addons-create.cjs} +5 -5
  8. package/src/commands/addons/{addons-delete.js → addons-delete.cjs} +2 -2
  9. package/src/commands/addons/{addons-list.js → addons-list.cjs} +2 -2
  10. package/src/commands/addons/{addons.js → addons.cjs} +5 -5
  11. package/src/commands/addons/index.cjs +5 -0
  12. package/src/commands/api/{api.js → api.cjs} +1 -1
  13. package/src/commands/api/index.cjs +5 -0
  14. package/src/commands/{base-command.js → base-command.cjs} +7 -2
  15. package/src/commands/build/{build.js → build.cjs} +9 -2
  16. package/src/commands/build/index.cjs +5 -0
  17. package/src/commands/completion/{completion.js → completion.cjs} +2 -2
  18. package/src/commands/completion/index.cjs +5 -0
  19. package/src/commands/deploy/{deploy.js → deploy.cjs} +8 -8
  20. package/src/commands/deploy/index.cjs +5 -0
  21. package/src/commands/dev/{dev-exec.js → dev-exec.cjs} +1 -1
  22. package/src/commands/dev/{dev.js → dev.cjs} +7 -7
  23. package/src/commands/dev/index.cjs +5 -0
  24. package/src/commands/env/{env-clone.js → env-clone.cjs} +1 -1
  25. package/src/commands/env/{env-get.js → env-get.cjs} +9 -1
  26. package/src/commands/env/{env-import.js → env-import.cjs} +7 -1
  27. package/src/commands/env/{env-list.js → env-list.cjs} +1 -1
  28. package/src/commands/env/{env-set.js → env-set.cjs} +1 -1
  29. package/src/commands/env/{env-unset.js → env-unset.cjs} +1 -1
  30. package/src/commands/env/{env.js → env.cjs} +6 -6
  31. package/src/commands/env/index.cjs +5 -0
  32. package/src/commands/functions/{functions-build.js → functions-build.cjs} +1 -1
  33. package/src/commands/functions/{functions-create.js → functions-create.cjs} +6 -7
  34. package/src/commands/functions/{functions-invoke.js → functions-invoke.cjs} +9 -1
  35. package/src/commands/functions/{functions-list.js → functions-list.cjs} +1 -1
  36. package/src/commands/functions/{functions-serve.js → functions-serve.cjs} +2 -2
  37. package/src/commands/functions/{functions.js → functions.cjs} +6 -6
  38. package/src/commands/functions/index.cjs +5 -0
  39. package/src/commands/graph/{graph-config-write.js → graph-config-write.cjs} +2 -2
  40. package/src/commands/graph/{graph-edit.js → graph-edit.cjs} +8 -4
  41. package/src/commands/graph/{graph-handler.js → graph-handler.cjs} +2 -2
  42. package/src/commands/graph/{graph-init.js → graph-init.cjs} +11 -3
  43. package/src/commands/graph/{graph-library.js → graph-library.cjs} +3 -3
  44. package/src/commands/graph/{graph-operations.js → graph-operations.cjs} +2 -2
  45. package/src/commands/graph/{graph-pull.js → graph-pull.cjs} +7 -3
  46. package/src/commands/graph/{graph.js → graph.cjs} +7 -7
  47. package/src/commands/graph/index.cjs +5 -0
  48. package/src/commands/index.cjs +7 -0
  49. package/src/commands/init/index.cjs +6 -0
  50. package/src/commands/init/{init.js → init.cjs} +4 -4
  51. package/src/commands/link/index.cjs +6 -0
  52. package/src/commands/link/{link.js → link.cjs} +2 -2
  53. package/src/commands/lm/index.cjs +5 -0
  54. package/src/commands/lm/{lm-info.js → lm-info.cjs} +1 -1
  55. package/src/commands/lm/{lm-install.js → lm-install.cjs} +2 -2
  56. package/src/commands/lm/{lm-setup.js → lm-setup.cjs} +4 -4
  57. package/src/commands/lm/{lm-uninstall.js → lm-uninstall.cjs} +1 -1
  58. package/src/commands/lm/{lm.js → lm.cjs} +4 -4
  59. package/src/commands/login/index.cjs +6 -0
  60. package/src/commands/login/{login.js → login.cjs} +1 -1
  61. package/src/commands/logout/index.cjs +5 -0
  62. package/src/commands/logout/{logout.js → logout.cjs} +1 -1
  63. package/src/commands/{main.js → main.cjs} +24 -24
  64. package/src/commands/open/index.cjs +5 -0
  65. package/src/commands/open/{open-admin.js → open-admin.cjs} +1 -1
  66. package/src/commands/open/{open-site.js → open-site.cjs} +1 -1
  67. package/src/commands/open/{open.js → open.cjs} +3 -3
  68. package/src/commands/recipes/{common.js → common.cjs} +2 -2
  69. package/src/commands/recipes/index.cjs +8 -0
  70. package/src/commands/recipes/{recipes-list.js → recipes-list.cjs} +1 -1
  71. package/src/commands/recipes/{recipes.js → recipes.cjs} +2 -2
  72. package/src/commands/sites/index.cjs +7 -0
  73. package/src/commands/sites/{sites-create-template.js → sites-create-template.cjs} +19 -10
  74. package/src/commands/sites/{sites-create.js → sites-create.cjs} +8 -39
  75. package/src/commands/sites/{sites-delete.js → sites-delete.cjs} +1 -1
  76. package/src/commands/sites/{sites-list.js → sites-list.cjs} +3 -3
  77. package/src/commands/sites/{sites.js → sites.cjs} +4 -4
  78. package/src/commands/status/index.cjs +5 -0
  79. package/src/commands/status/{status-hooks.js → status-hooks.cjs} +1 -1
  80. package/src/commands/status/{status.js → status.cjs} +2 -2
  81. package/src/commands/switch/index.cjs +5 -0
  82. package/src/commands/switch/{switch.js → switch.cjs} +2 -2
  83. package/src/commands/unlink/index.cjs +5 -0
  84. package/src/commands/unlink/{unlink.js → unlink.cjs} +1 -1
  85. package/src/commands/watch/index.cjs +5 -0
  86. package/src/commands/watch/{watch.js → watch.cjs} +3 -3
  87. package/src/functions-templates/go/hello-world/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  88. package/src/functions-templates/javascript/apollo-graphql/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  89. package/src/functions-templates/javascript/apollo-graphql-rest/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  90. package/src/functions-templates/javascript/apollo-graphql-rest/{{name}}.js +1 -1
  91. package/src/functions-templates/javascript/auth-fetch/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  92. package/src/functions-templates/javascript/create-user/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  93. package/src/functions-templates/javascript/fauna-crud/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  94. package/src/functions-templates/javascript/fauna-crud/{{name}}.js +5 -5
  95. package/src/functions-templates/javascript/fauna-graphql/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  96. package/src/functions-templates/javascript/google-analytics/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  97. package/src/functions-templates/javascript/graphql-gateway/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  98. package/src/functions-templates/javascript/hasura-event-triggered/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  99. package/src/functions-templates/javascript/hasura-event-triggered/package.json +1 -1
  100. package/src/functions-templates/javascript/hello/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  101. package/src/functions-templates/javascript/hello-world/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  102. package/src/functions-templates/javascript/identity-signup/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  103. package/src/functions-templates/javascript/image-external/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  104. package/src/functions-templates/javascript/localized-content/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  105. package/src/functions-templates/javascript/node-fetch/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  106. package/src/functions-templates/javascript/oauth-passport/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  107. package/src/functions-templates/javascript/oauth-passport/utils/auth.js +1 -1
  108. package/src/functions-templates/javascript/oauth-passport/{{name}}.js +2 -2
  109. package/src/functions-templates/javascript/protected-function/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  110. package/src/functions-templates/javascript/sanity-create/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  111. package/src/functions-templates/javascript/sanity-groq/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  112. package/src/functions-templates/javascript/scheduled-function/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  113. package/src/functions-templates/javascript/send-email/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  114. package/src/functions-templates/javascript/send-email/{{name}}.js +1 -1
  115. package/src/functions-templates/javascript/serverless-ssr/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  116. package/src/functions-templates/javascript/serverless-ssr/serverless-http.js +1 -1
  117. package/src/functions-templates/javascript/serverless-ssr/{{name}}.js +1 -1
  118. package/src/functions-templates/javascript/set-cookie/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  119. package/src/functions-templates/javascript/set-cookies/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  120. package/src/functions-templates/javascript/set-req-header/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  121. package/src/functions-templates/javascript/set-res-header/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  122. package/src/functions-templates/javascript/slack-rate-limit/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  123. package/src/functions-templates/javascript/stripe-charge/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  124. package/src/functions-templates/javascript/stripe-charge/package-lock.json +14 -14
  125. package/src/functions-templates/javascript/stripe-subscription/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  126. package/src/functions-templates/javascript/stripe-subscription/package-lock.json +14 -14
  127. package/src/functions-templates/javascript/submission-created/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  128. package/src/functions-templates/javascript/token-hider/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  129. package/src/functions-templates/javascript/token-hider/package-lock.json +23 -11
  130. package/src/functions-templates/javascript/token-hider/package.json +1 -1
  131. package/src/functions-templates/javascript/transform-response/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  132. package/src/functions-templates/javascript/url-shortener/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  133. package/src/functions-templates/javascript/url-shortener/{{name}}.js +2 -2
  134. package/src/functions-templates/javascript/using-middleware/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  135. package/src/functions-templates/rust/hello-world/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  136. package/src/functions-templates/rust/hello-world/Cargo.toml +1 -1
  137. package/src/functions-templates/typescript/abtest/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  138. package/src/functions-templates/typescript/geolocation/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  139. package/src/functions-templates/typescript/hello-world/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  140. package/src/functions-templates/typescript/json/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  141. package/src/functions-templates/typescript/log/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  142. package/src/functions-templates/typescript/scheduled-function/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  143. package/src/functions-templates/typescript/set-cookies/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  144. package/src/functions-templates/typescript/set-req-header/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  145. package/src/functions-templates/typescript/set-res-header/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  146. package/src/functions-templates/typescript/transform-response/{.netlify-function-template.js → .netlify-function-template.cjs} +0 -0
  147. package/src/lib/{account.js → account.cjs} +0 -0
  148. package/src/lib/{api.js → api.cjs} +1 -1
  149. package/src/lib/{build.js → build.cjs} +0 -0
  150. package/src/lib/completion/{constants.js → constants.cjs} +1 -1
  151. package/src/lib/completion/{generate-autocompletion.js → generate-autocompletion.cjs} +2 -2
  152. package/src/lib/completion/{index.js → index.cjs} +1 -1
  153. package/src/lib/completion/{script.js → script.cjs} +1 -1
  154. package/src/lib/edge-functions/{consts.js → consts.cjs} +0 -0
  155. package/src/lib/edge-functions/{deploy.js → deploy.cjs} +2 -2
  156. package/src/lib/edge-functions/{editor-helper.js → editor-helper.cjs} +1 -1
  157. package/src/lib/edge-functions/{headers.js → headers.cjs} +0 -0
  158. package/src/lib/edge-functions/index.cjs +7 -0
  159. package/src/lib/edge-functions/{internal.js → internal.cjs} +3 -3
  160. package/src/lib/edge-functions/{proxy.js → proxy.cjs} +9 -9
  161. package/src/lib/edge-functions/{registry.js → registry.cjs} +1 -1
  162. package/src/lib/{exec-fetcher.js → exec-fetcher.cjs} +2 -2
  163. package/src/lib/{fs.js → fs.cjs} +0 -0
  164. package/src/lib/functions/{background.js → background.cjs} +2 -2
  165. package/src/lib/functions/{config.js → config.cjs} +0 -0
  166. package/src/lib/functions/{form-submissions-handler.js → form-submissions-handler.cjs} +3 -3
  167. package/src/lib/functions/{local-proxy.js → local-proxy.cjs} +1 -1
  168. package/src/lib/functions/{memoized-build.js → memoized-build.cjs} +0 -0
  169. package/src/lib/functions/{netlify-function.js → netlify-function.cjs} +1 -1
  170. package/src/lib/functions/{registry.js → registry.cjs} +4 -4
  171. package/src/lib/functions/runtimes/go/{index.js → index.cjs} +2 -2
  172. package/src/lib/functions/runtimes/{index.js → index.cjs} +3 -3
  173. package/src/lib/functions/runtimes/js/builders/{netlify-lambda.js → netlify-lambda.cjs} +3 -3
  174. package/src/lib/functions/runtimes/js/builders/{zisi.js → zisi.cjs} +4 -4
  175. package/src/lib/functions/runtimes/js/{index.js → index.cjs} +2 -2
  176. package/src/lib/functions/runtimes/rust/{index.js → index.cjs} +3 -3
  177. package/src/lib/functions/{scheduled.js → scheduled.cjs} +2 -2
  178. package/src/lib/functions/{server.js → server.cjs} +8 -8
  179. package/src/lib/functions/{synchronous.js → synchronous.cjs} +3 -3
  180. package/src/lib/functions/{utils.js → utils.cjs} +2 -2
  181. package/src/lib/{geo-location.js → geo-location.cjs} +0 -0
  182. package/src/lib/{http-agent.js → http-agent.cjs} +1 -1
  183. package/src/lib/{log.js → log.cjs} +1 -1
  184. package/src/lib/one-graph/{cli-client.js → cli-client.cjs} +2 -2
  185. package/src/lib/one-graph/{cli-netlify-graph.js → cli-netlify-graph.cjs} +1 -1
  186. package/src/lib/{path.js → path.cjs} +0 -0
  187. package/src/lib/{render-error-remplate.js → render-error-remplate.cjs} +0 -0
  188. package/src/lib/{settings.js → settings.cjs} +0 -0
  189. package/src/lib/{spinner.js → spinner.cjs} +0 -0
  190. package/src/lib/{string.js → string.cjs} +0 -0
  191. package/src/recipes/vscode/{index.js → index.cjs} +2 -2
  192. package/src/recipes/vscode/{settings.js → settings.cjs} +0 -0
  193. package/src/utils/addons/{compare.js → compare.cjs} +0 -0
  194. package/src/utils/addons/diffs/{index.js → index.cjs} +1 -1
  195. package/src/utils/addons/diffs/{options.js → options.cjs} +1 -1
  196. package/src/utils/addons/{prepare.js → prepare.cjs} +1 -1
  197. package/src/utils/addons/{prompts.js → prompts.cjs} +1 -1
  198. package/src/utils/addons/{render.js → render.cjs} +1 -1
  199. package/src/utils/addons/{validation.js → validation.cjs} +0 -0
  200. package/src/utils/{command-helpers.js → command-helpers.cjs} +3 -3
  201. package/src/utils/{create-stream-promise.js → create-stream-promise.cjs} +0 -0
  202. package/src/utils/{deferred.js → deferred.cjs} +0 -0
  203. package/src/utils/deploy/{constants.js → constants.cjs} +0 -0
  204. package/src/utils/deploy/{deploy-site.js → deploy-site.cjs} +8 -8
  205. package/src/utils/deploy/{hash-files.js → hash-files.cjs} +1 -1
  206. package/src/utils/deploy/{hash-fns.js → hash-fns.cjs} +1 -1
  207. package/src/utils/deploy/{hasher-segments.js → hasher-segments.cjs} +1 -1
  208. package/src/utils/deploy/index.cjs +4 -0
  209. package/src/utils/deploy/{upload-files.js → upload-files.cjs} +1 -1
  210. package/src/utils/deploy/{util.js → util.cjs} +1 -1
  211. package/src/utils/{detect-server-settings.js → detect-server-settings.cjs} +4 -4
  212. package/src/utils/{dev.js → dev.cjs} +3 -3
  213. package/src/utils/{dot-env.js → dot-env.cjs} +2 -2
  214. package/src/utils/env/{index.js → index.cjs} +1 -1
  215. package/src/utils/{execa.js → execa.cjs} +0 -0
  216. package/src/utils/functions/{constants.js → constants.cjs} +0 -0
  217. package/src/utils/functions/{functions.js → functions.cjs} +2 -2
  218. package/src/utils/functions/{get-functions.js → get-functions.cjs} +1 -1
  219. package/src/utils/functions/index.cjs +12 -0
  220. package/src/utils/{get-global-config.js → get-global-config.cjs} +1 -1
  221. package/src/utils/{get-repo-data.js → get-repo-data.cjs} +1 -1
  222. package/src/utils/{gh-auth.js → gh-auth.cjs} +3 -3
  223. package/src/utils/{gitignore.js → gitignore.cjs} +2 -2
  224. package/src/utils/{headers.js → headers.cjs} +1 -1
  225. package/src/utils/index.cjs +42 -0
  226. package/src/utils/init/{config-github.js → config-github.cjs} +3 -3
  227. package/src/utils/init/{config-manual.js → config-manual.cjs} +2 -2
  228. package/src/utils/init/{config.js → config.cjs} +3 -3
  229. package/src/utils/init/{frameworks.js → frameworks.cjs} +0 -0
  230. package/src/utils/init/{node-version.js → node-version.cjs} +1 -1
  231. package/src/utils/init/{plugins.js → plugins.cjs} +0 -0
  232. package/src/utils/init/{utils.js → utils.cjs} +6 -6
  233. package/src/utils/{live-tunnel.js → live-tunnel.cjs} +4 -4
  234. package/src/utils/lm/{install.js → install.cjs} +6 -6
  235. package/src/utils/lm/{requirements.js → requirements.cjs} +1 -1
  236. package/src/utils/lm/{steps.js → steps.cjs} +2 -2
  237. package/src/utils/lm/{ui.js → ui.cjs} +2 -2
  238. package/src/utils/{open-browser.js → open-browser.cjs} +1 -1
  239. package/src/utils/{parse-raw-flags.js → parse-raw-flags.cjs} +0 -0
  240. package/src/utils/{proxy.js → proxy.cjs} +8 -8
  241. package/src/utils/{read-repo-url.js → read-repo-url.cjs} +0 -0
  242. package/src/utils/{redirects.js → redirects.cjs} +1 -1
  243. package/src/utils/{rules-proxy.js → rules-proxy.cjs} +3 -3
  244. package/src/utils/sites/{utils.js → utils.cjs} +0 -0
  245. package/src/utils/{state-config.js → state-config.cjs} +1 -1
  246. package/src/utils/telemetry/index.cjs +5 -0
  247. package/src/utils/telemetry/{request.js → request.cjs} +0 -0
  248. package/src/utils/telemetry/{telemetry.js → telemetry.cjs} +4 -4
  249. package/src/utils/telemetry/{validation.js → validation.cjs} +1 -1
  250. package/bin/run +0 -34
  251. package/src/commands/addons/index.js +0 -5
  252. package/src/commands/api/index.js +0 -5
  253. package/src/commands/build/index.js +0 -5
  254. package/src/commands/completion/index.js +0 -5
  255. package/src/commands/deploy/index.js +0 -5
  256. package/src/commands/dev/index.js +0 -5
  257. package/src/commands/env/index.js +0 -5
  258. package/src/commands/functions/index.js +0 -5
  259. package/src/commands/graph/index.js +0 -5
  260. package/src/commands/index.js +0 -7
  261. package/src/commands/init/index.js +0 -6
  262. package/src/commands/link/index.js +0 -6
  263. package/src/commands/lm/index.js +0 -5
  264. package/src/commands/login/index.js +0 -6
  265. package/src/commands/logout/index.js +0 -5
  266. package/src/commands/open/index.js +0 -5
  267. package/src/commands/recipes/index.js +0 -8
  268. package/src/commands/sites/index.js +0 -7
  269. package/src/commands/status/index.js +0 -5
  270. package/src/commands/switch/index.js +0 -5
  271. package/src/commands/unlink/index.js +0 -5
  272. package/src/commands/watch/index.js +0 -5
  273. package/src/lib/edge-functions/index.js +0 -7
  274. package/src/utils/deploy/index.js +0 -4
  275. package/src/utils/functions/index.js +0 -12
  276. package/src/utils/index.js +0 -42
  277. package/src/utils/telemetry/index.js +0 -5
@@ -3,8 +3,8 @@ const fs = require('fs')
3
3
  const path = require('path')
4
4
  const process = require('process')
5
5
 
6
- const { getNetlifyGraphConfig } = require('../../lib/one-graph/cli-netlify-graph')
7
- const { NETLIFYDEVERR, chalk, error, log } = require('../../utils')
6
+ const { getNetlifyGraphConfig } = require('../../lib/one-graph/cli-netlify-graph.cjs')
7
+ const { NETLIFYDEVERR, chalk, error, log } = require('../../utils/index.cjs')
8
8
 
9
9
  /**
10
10
  * Creates the `netlify graph:config:write` command
@@ -1,15 +1,19 @@
1
1
  // @ts-check
2
2
  const gitRepoInfo = require('git-repo-info')
3
3
 
4
- const { OneGraphCliClient, ensureCLISession, upsertMergeCLISessionMetadata } = require('../../lib/one-graph/cli-client')
4
+ const {
5
+ OneGraphCliClient,
6
+ ensureCLISession,
7
+ upsertMergeCLISessionMetadata,
8
+ } = require('../../lib/one-graph/cli-client.cjs')
5
9
  const {
6
10
  defaultExampleOperationsDoc,
7
11
  getGraphEditUrlBySiteId,
8
12
  getNetlifyGraphConfig,
9
13
  readGraphQLOperationsSourceFile,
10
- } = require('../../lib/one-graph/cli-netlify-graph')
11
- const { NETLIFYDEVERR, chalk, error, log } = require('../../utils')
12
- const { openBrowser } = require('../../utils/open-browser')
14
+ } = require('../../lib/one-graph/cli-netlify-graph.cjs')
15
+ const { NETLIFYDEVERR, chalk, error, log } = require('../../utils/index.cjs')
16
+ const { openBrowser } = require('../../utils/open-browser.cjs')
13
17
 
14
18
  const { ensureAppForSite, executeCreatePersistedQueryMutation } = OneGraphCliClient
15
19
 
@@ -10,8 +10,8 @@ const {
10
10
  getCodegenModule,
11
11
  getNetlifyGraphConfig,
12
12
  readGraphQLSchemaFile,
13
- } = require('../../lib/one-graph/cli-netlify-graph')
14
- const { error, log } = require('../../utils')
13
+ } = require('../../lib/one-graph/cli-netlify-graph.cjs')
14
+ const { error, log } = require('../../utils/index.cjs')
15
15
 
16
16
  /**
17
17
  * Creates the `netlify graph:handler` command
@@ -5,9 +5,17 @@ const process = require('process')
5
5
  const { OneGraphClient } = require('netlify-onegraph-internal')
6
6
  const { v4: uuidv4 } = require('uuid')
7
7
 
8
- const { OneGraphCliClient, ensureCLISession } = require('../../lib/one-graph/cli-client')
9
- const { getNetlifyGraphConfig } = require('../../lib/one-graph/cli-netlify-graph')
10
- const { NETLIFYDEVERR, chalk, error, exit, getToken, log, translateFromEnvelopeToMongo } = require('../../utils')
8
+ const { OneGraphCliClient, ensureCLISession } = require('../../lib/one-graph/cli-client.cjs')
9
+ const { getNetlifyGraphConfig } = require('../../lib/one-graph/cli-netlify-graph.cjs')
10
+ const {
11
+ NETLIFYDEVERR,
12
+ chalk,
13
+ error,
14
+ exit,
15
+ getToken,
16
+ log,
17
+ translateFromEnvelopeToMongo,
18
+ } = require('../../utils/index.cjs')
11
19
 
12
20
  const { ensureAppForSite, executeCreateApiTokenMutation } = OneGraphCliClient
13
21
 
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
  const { GraphQL } = require('netlify-onegraph-internal')
3
3
 
4
- const { readLockfile } = require('../../lib/one-graph/cli-client')
4
+ const { readLockfile } = require('../../lib/one-graph/cli-client.cjs')
5
5
  const {
6
6
  buildSchema,
7
7
  defaultExampleOperationsDoc,
@@ -11,8 +11,8 @@ const {
11
11
  parse,
12
12
  readGraphQLOperationsSourceFile,
13
13
  readGraphQLSchemaFile,
14
- } = require('../../lib/one-graph/cli-netlify-graph')
15
- const { NETLIFYDEVERR, chalk, error, log } = require('../../utils')
14
+ } = require('../../lib/one-graph/cli-netlify-graph.cjs')
15
+ const { NETLIFYDEVERR, chalk, error, log } = require('../../utils/index.cjs')
16
16
 
17
17
  /**
18
18
  * Creates the `netlify graph:library` command
@@ -6,8 +6,8 @@ const {
6
6
  extractFunctionsFromOperationDoc,
7
7
  getNetlifyGraphConfig,
8
8
  readGraphQLOperationsSourceFile,
9
- } = require('../../lib/one-graph/cli-netlify-graph')
10
- const { log } = require('../../utils')
9
+ } = require('../../lib/one-graph/cli-netlify-graph.cjs')
10
+ const { log } = require('../../utils/index.cjs')
11
11
 
12
12
  const { parse } = GraphQL
13
13
 
@@ -11,9 +11,13 @@ const {
11
11
  readLockfile,
12
12
  readSchemaIdFromLockfile,
13
13
  refetchAndGenerateFromOneGraph,
14
- } = require('../../lib/one-graph/cli-client')
15
- const { buildSchema, getNetlifyGraphConfig, readGraphQLSchemaFile } = require('../../lib/one-graph/cli-netlify-graph')
16
- const { NETLIFYDEVERR, chalk, error, log, warn } = require('../../utils')
14
+ } = require('../../lib/one-graph/cli-client.cjs')
15
+ const {
16
+ buildSchema,
17
+ getNetlifyGraphConfig,
18
+ readGraphQLSchemaFile,
19
+ } = require('../../lib/one-graph/cli-netlify-graph.cjs')
20
+ const { NETLIFYDEVERR, chalk, error, log, warn } = require('../../utils/index.cjs')
17
21
 
18
22
  /**
19
23
  * Creates the `netlify graph:pull` command
@@ -1,11 +1,11 @@
1
1
  // @ts-check
2
- const { createGraphConfigWriteCommand } = require('./graph-config-write')
3
- const { createGraphEditCommand } = require('./graph-edit')
4
- const { createGraphHandlerCommand } = require('./graph-handler')
5
- const { createGraphInitCommand } = require('./graph-init')
6
- const { createGraphLibraryCommand } = require('./graph-library')
7
- const { createGraphOperationsCommand } = require('./graph-operations')
8
- const { createGraphPullCommand } = require('./graph-pull')
2
+ const { createGraphConfigWriteCommand } = require('./graph-config-write.cjs')
3
+ const { createGraphEditCommand } = require('./graph-edit.cjs')
4
+ const { createGraphHandlerCommand } = require('./graph-handler.cjs')
5
+ const { createGraphInitCommand } = require('./graph-init.cjs')
6
+ const { createGraphLibraryCommand } = require('./graph-library.cjs')
7
+ const { createGraphOperationsCommand } = require('./graph-operations.cjs')
8
+ const { createGraphPullCommand } = require('./graph-pull.cjs')
9
9
 
10
10
  /**
11
11
  * The graph command
@@ -0,0 +1,5 @@
1
+ const { createGraphCommand } = require('./graph.cjs')
2
+
3
+ module.exports = {
4
+ createGraphCommand,
5
+ }
@@ -0,0 +1,7 @@
1
+ const baseCommand = require('./base-command.cjs')
2
+ const { createMainCommand } = require('./main.cjs')
3
+
4
+ module.exports = {
5
+ ...baseCommand,
6
+ createMainCommand,
7
+ }
@@ -0,0 +1,6 @@
1
+ const { createInitCommand, init } = require('./init.cjs')
2
+
3
+ module.exports = {
4
+ createInitCommand,
5
+ init,
6
+ }
@@ -3,10 +3,10 @@ const dotProp = require('dot-prop')
3
3
  const inquirer = require('inquirer')
4
4
  const isEmpty = require('lodash/isEmpty')
5
5
 
6
- const { chalk, ensureNetlifyIgnore, exit, getRepoData, log, track } = require('../../utils')
7
- const { configureRepo } = require('../../utils/init/config')
8
- const { link } = require('../link')
9
- const { sitesCreate } = require('../sites')
6
+ const { chalk, ensureNetlifyIgnore, exit, getRepoData, log, track } = require('../../utils/index.cjs')
7
+ const { configureRepo } = require('../../utils/init/config.cjs')
8
+ const { link } = require('../link/index.cjs')
9
+ const { sitesCreate } = require('../sites/index.cjs')
10
10
 
11
11
  const persistState = ({ siteInfo, state }) => {
12
12
  // Save to .netlify/state.json file
@@ -0,0 +1,6 @@
1
+ const { createLinkCommand, link } = require('./link.cjs')
2
+
3
+ module.exports = {
4
+ createLinkCommand,
5
+ link,
6
+ }
@@ -2,8 +2,8 @@
2
2
  const inquirer = require('inquirer')
3
3
  const isEmpty = require('lodash/isEmpty')
4
4
 
5
- const { listSites } = require('../../lib/api')
6
- const { chalk, ensureNetlifyIgnore, error, exit, getRepoData, log, track } = require('../../utils')
5
+ const { listSites } = require('../../lib/api.cjs')
6
+ const { chalk, ensureNetlifyIgnore, error, exit, getRepoData, log, track } = require('../../utils/index.cjs')
7
7
 
8
8
  /**
9
9
  *
@@ -0,0 +1,5 @@
1
+ const { createLmCommand } = require('./lm.cjs')
2
+
3
+ module.exports = {
4
+ createLmCommand,
5
+ }
@@ -6,7 +6,7 @@ const {
6
6
  checkGitVersionStep,
7
7
  checkHelperVersionStep,
8
8
  checkLFSFiltersStep,
9
- } = require('../../utils/lm/steps')
9
+ } = require('../../utils/lm/steps.cjs')
10
10
 
11
11
  /**
12
12
  * The lm:info command
@@ -1,6 +1,6 @@
1
1
  // @ts-check
2
- const { installPlatform } = require('../../utils/lm/install')
3
- const { printBanner } = require('../../utils/lm/ui')
2
+ const { installPlatform } = require('../../utils/lm/install.cjs')
3
+ const { printBanner } = require('../../utils/lm/ui.cjs')
4
4
 
5
5
  /**
6
6
  * The lm:install command
@@ -1,10 +1,10 @@
1
1
  // @ts-check
2
2
  const Listr = require('listr')
3
3
 
4
- const { error, execa } = require('../../utils')
5
- const { installPlatform } = require('../../utils/lm/install')
6
- const { checkHelperVersion } = require('../../utils/lm/requirements')
7
- const { printBanner } = require('../../utils/lm/ui')
4
+ const { error, execa } = require('../../utils/index.cjs')
5
+ const { installPlatform } = require('../../utils/lm/install.cjs')
6
+ const { checkHelperVersion } = require('../../utils/lm/requirements.cjs')
7
+ const { printBanner } = require('../../utils/lm/ui.cjs')
8
8
 
9
9
  const installHelperIfMissing = async function ({ force }) {
10
10
  let installHelper = false
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- const { uninstall } = require('../../utils/lm/install')
2
+ const { uninstall } = require('../../utils/lm/install.cjs')
3
3
 
4
4
  /**
5
5
  * The lm:uninstall command
@@ -1,8 +1,8 @@
1
1
  // @ts-check
2
- const { createLmInfoCommand } = require('./lm-info')
3
- const { createLmInstallCommand } = require('./lm-install')
4
- const { createLmSetupCommand } = require('./lm-setup')
5
- const { createLmUninstallCommand } = require('./lm-uninstall')
2
+ const { createLmInfoCommand } = require('./lm-info.cjs')
3
+ const { createLmInstallCommand } = require('./lm-install.cjs')
4
+ const { createLmSetupCommand } = require('./lm-setup.cjs')
5
+ const { createLmUninstallCommand } = require('./lm-uninstall.cjs')
6
6
 
7
7
  /**
8
8
  * The lm command
@@ -0,0 +1,6 @@
1
+ const { createLoginCommand, login } = require('./login.cjs')
2
+
3
+ module.exports = {
4
+ createLoginCommand,
5
+ login,
6
+ }
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- const { chalk, exit, getToken, log } = require('../../utils')
2
+ const { chalk, exit, getToken, log } = require('../../utils/index.cjs')
3
3
 
4
4
  const msg = function (location) {
5
5
  switch (location) {
@@ -0,0 +1,5 @@
1
+ const { createLogoutCommand } = require('./logout.cjs')
2
+
3
+ module.exports = {
4
+ createLogoutCommand,
5
+ }
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- const { exit, getToken, log, track } = require('../../utils')
2
+ const { exit, getToken, log, track } = require('../../utils/index.cjs')
3
3
 
4
4
  /**
5
5
  * The logout command
@@ -18,30 +18,30 @@ const {
18
18
  log,
19
19
  track,
20
20
  warn,
21
- } = require('../utils')
22
-
23
- const { createAddonsCommand } = require('./addons')
24
- const { createApiCommand } = require('./api')
25
- const { BaseCommand } = require('./base-command')
26
- const { createBuildCommand } = require('./build')
27
- const { createCompletionCommand } = require('./completion')
28
- const { createDeployCommand } = require('./deploy')
29
- const { createDevCommand } = require('./dev')
30
- const { createEnvCommand } = require('./env')
31
- const { createFunctionsCommand } = require('./functions')
32
- const { createGraphCommand } = require('./graph')
33
- const { createInitCommand } = require('./init')
34
- const { createLinkCommand } = require('./link')
35
- const { createLmCommand } = require('./lm')
36
- const { createLoginCommand } = require('./login')
37
- const { createLogoutCommand } = require('./logout')
38
- const { createOpenCommand } = require('./open')
39
- const { createRecipesCommand, createRecipesListCommand } = require('./recipes')
40
- const { createSitesCommand } = require('./sites')
41
- const { createStatusCommand } = require('./status')
42
- const { createSwitchCommand } = require('./switch')
43
- const { createUnlinkCommand } = require('./unlink')
44
- const { createWatchCommand } = require('./watch')
21
+ } = require('../utils/index.cjs')
22
+
23
+ const { createAddonsCommand } = require('./addons/index.cjs')
24
+ const { createApiCommand } = require('./api/index.cjs')
25
+ const { BaseCommand } = require('./base-command.cjs')
26
+ const { createBuildCommand } = require('./build/index.cjs')
27
+ const { createCompletionCommand } = require('./completion/index.cjs')
28
+ const { createDeployCommand } = require('./deploy/index.cjs')
29
+ const { createDevCommand } = require('./dev/index.cjs')
30
+ const { createEnvCommand } = require('./env/index.cjs')
31
+ const { createFunctionsCommand } = require('./functions/index.cjs')
32
+ const { createGraphCommand } = require('./graph/index.cjs')
33
+ const { createInitCommand } = require('./init/index.cjs')
34
+ const { createLinkCommand } = require('./link/index.cjs')
35
+ const { createLmCommand } = require('./lm/index.cjs')
36
+ const { createLoginCommand } = require('./login/index.cjs')
37
+ const { createLogoutCommand } = require('./logout/index.cjs')
38
+ const { createOpenCommand } = require('./open/index.cjs')
39
+ const { createRecipesCommand, createRecipesListCommand } = require('./recipes/index.cjs')
40
+ const { createSitesCommand } = require('./sites/index.cjs')
41
+ const { createStatusCommand } = require('./status/index.cjs')
42
+ const { createSwitchCommand } = require('./switch/index.cjs')
43
+ const { createUnlinkCommand } = require('./unlink/index.cjs')
44
+ const { createWatchCommand } = require('./watch/index.cjs')
45
45
 
46
46
  const SUGGESTION_TIMEOUT = 1e4
47
47
 
@@ -0,0 +1,5 @@
1
+ const { createOpenCommand } = require('./open.cjs')
2
+
3
+ module.exports = {
4
+ createOpenCommand,
5
+ }
@@ -1,4 +1,4 @@
1
- const { error, exit, log, openBrowser, warn } = require('../../utils')
1
+ const { error, exit, log, openBrowser, warn } = require('../../utils/index.cjs')
2
2
 
3
3
  /**
4
4
  * The open:admin command
@@ -1,4 +1,4 @@
1
- const { error, exit, log, openBrowser, warn } = require('../../utils')
1
+ const { error, exit, log, openBrowser, warn } = require('../../utils/index.cjs')
2
2
 
3
3
  /**
4
4
  * The open:site command
@@ -1,7 +1,7 @@
1
- const { log } = require('../../utils')
1
+ const { log } = require('../../utils/index.cjs')
2
2
 
3
- const { createOpenAdminCommand, openAdmin } = require('./open-admin')
4
- const { createOpenSiteCommand, openSite } = require('./open-site')
3
+ const { createOpenAdminCommand, openAdmin } = require('./open-admin.cjs')
4
+ const { createOpenSiteCommand, openSite } = require('./open-site.cjs')
5
5
 
6
6
  /**
7
7
  * The open command
@@ -2,7 +2,7 @@ const { promises: fs } = require('fs')
2
2
  const { join, resolve } = require('path')
3
3
 
4
4
  const getRecipe = (name) => {
5
- const recipePath = resolve(__dirname, '../../recipes', name)
5
+ const recipePath = resolve(__dirname, '../../recipes', name, 'index.cjs')
6
6
 
7
7
  // eslint-disable-next-line import/no-dynamic-require, n/global-require
8
8
  const recipe = require(recipePath)
@@ -15,7 +15,7 @@ const listRecipes = async () => {
15
15
  const recipeNames = await fs.readdir(recipesPath)
16
16
  const recipes = await Promise.all(
17
17
  recipeNames.map((name) => {
18
- const recipePath = join(recipesPath, name)
18
+ const recipePath = join(recipesPath, name, 'index.cjs')
19
19
 
20
20
  // eslint-disable-next-line import/no-dynamic-require, n/global-require
21
21
  const recipe = require(recipePath)
@@ -0,0 +1,8 @@
1
+ const { createRecipesListCommand } = require('./recipes-list.cjs')
2
+ const { createRecipesCommand, runRecipe } = require('./recipes.cjs')
3
+
4
+ module.exports = {
5
+ createRecipesCommand,
6
+ createRecipesListCommand,
7
+ runRecipe,
8
+ }
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
  const AsciiTable = require('ascii-table')
3
3
 
4
- const { listRecipes } = require('./common')
4
+ const { listRecipes } = require('./common.cjs')
5
5
 
6
6
  /**
7
7
  * The recipes:list command
@@ -4,9 +4,9 @@ const { basename } = require('path')
4
4
  const inquirer = require('inquirer')
5
5
  const { findBestMatch } = require('string-similarity')
6
6
 
7
- const utils = require('../../utils/command-helpers')
7
+ const utils = require('../../utils/command-helpers.cjs')
8
8
 
9
- const { getRecipe, listRecipes } = require('./common')
9
+ const { getRecipe, listRecipes } = require('./common.cjs')
10
10
 
11
11
  const SUGGESTION_TIMEOUT = 1e4
12
12
 
@@ -0,0 +1,7 @@
1
+ const { sitesCreate } = require('./sites-create.cjs')
2
+ const { createSitesCommand } = require('./sites.cjs')
3
+
4
+ module.exports = {
5
+ createSitesCommand,
6
+ sitesCreate,
7
+ }
@@ -5,12 +5,22 @@ const pick = require('lodash/pick')
5
5
  const parseGitHubUrl = require('parse-github-url')
6
6
  const prettyjson = require('prettyjson')
7
7
 
8
- const { chalk, error, execa, getRepoData, getTerminalLink, log, logJson, track, warn } = require('../../utils')
9
- const { configureRepo } = require('../../utils/init/config')
10
- const { getGitHubToken } = require('../../utils/init/config-github')
11
- const { createRepo, getTemplatesFromGitHub, validateTemplate } = require('../../utils/sites/utils')
12
-
13
- const { getSiteNameInput } = require('./sites-create')
8
+ const {
9
+ chalk,
10
+ error,
11
+ execa,
12
+ getRepoData,
13
+ getTerminalLink,
14
+ log,
15
+ logJson,
16
+ track,
17
+ warn,
18
+ } = require('../../utils/index.cjs')
19
+ const { getGitHubToken } = require('../../utils/init/config-github.cjs')
20
+ const { configureRepo } = require('../../utils/init/config.cjs')
21
+ const { createRepo, getTemplatesFromGitHub, validateTemplate } = require('../../utils/sites/utils.cjs')
22
+
23
+ const { getSiteNameInput } = require('./sites-create.cjs')
14
24
 
15
25
  const fetchTemplates = async (token) => {
16
26
  const templatesFromGithubOrg = await getTemplatesFromGitHub(token)
@@ -108,19 +118,18 @@ const sitesCreateTemplate = async (repository, options, command) => {
108
118
  }
109
119
 
110
120
  const { name: nameFlag } = options
111
- let user
112
121
  let site
113
122
  let repoResp
114
123
 
115
124
  // Allow the user to reenter site name if selected one isn't available
116
125
  const inputSiteName = async (name) => {
117
- const { name: inputName, siteSuggestion } = await getSiteNameInput(name, user, api)
126
+ const { name: inputName } = await getSiteNameInput(name)
118
127
 
119
128
  try {
120
- const siteName = inputName ? inputName.trim() : siteSuggestion
129
+ const siteName = inputName.trim()
121
130
 
122
131
  // Create new repo from template
123
- repoResp = await createRepo(templateName, ghToken, siteName)
132
+ repoResp = await createRepo(templateName, ghToken, siteName || templateName)
124
133
 
125
134
  if (repoResp.errors) {
126
135
  if (repoResp.errors[0].includes('Name already exists on this account')) {
@@ -1,58 +1,28 @@
1
1
  // @ts-check
2
-
3
- const slugify = require('@sindresorhus/slugify')
4
2
  const { InvalidArgumentError } = require('commander')
5
3
  const inquirer = require('inquirer')
6
4
  const pick = require('lodash/pick')
7
- const sample = require('lodash/sample')
8
5
  const prettyjson = require('prettyjson')
9
- const { v4: uuidv4 } = require('uuid')
10
-
11
- const { chalk, error, getRepoData, log, logJson, track, warn } = require('../../utils')
12
- const { configureRepo } = require('../../utils/init/config')
13
- const { link } = require('../link')
14
-
15
- const SITE_NAME_SUGGESTION_SUFFIX_LENGTH = 5
16
6
 
17
- const getSiteNameInput = async (name, user, api) => {
18
- let siteSuggestion
19
- if (!user) user = await api.getCurrentUser()
7
+ const { chalk, error, getRepoData, log, logJson, track, warn } = require('../../utils/index.cjs')
8
+ const { configureRepo } = require('../../utils/init/config.cjs')
9
+ const { link } = require('../link/index.cjs')
20
10
 
11
+ const getSiteNameInput = async (name) => {
21
12
  if (!name) {
22
- let { slug } = user
23
- let suffix = ''
24
-
25
- // If the user doesn't have a slug, we'll compute one. Because `full_name` is not guaranteed to be unique, we
26
- // append a short randomly-generated ID to reduce the likelihood of a conflict.
27
- if (!slug) {
28
- slug = slugify(user.full_name || user.email)
29
- suffix = `-${uuidv4().slice(0, SITE_NAME_SUGGESTION_SUFFIX_LENGTH)}`
30
- }
31
-
32
- const suggestions = [
33
- `super-cool-site-by-${slug}${suffix}`,
34
- `the-awesome-${slug}-site${suffix}`,
35
- `${slug}-makes-great-sites${suffix}`,
36
- `netlify-thinks-${slug}-is-great${suffix}`,
37
- `the-great-${slug}-site${suffix}`,
38
- `isnt-${slug}-awesome${suffix}`,
39
- ]
40
- siteSuggestion = sample(suggestions)
41
-
42
13
  const { name: nameInput } = await inquirer.prompt([
43
14
  {
44
15
  type: 'input',
45
16
  name: 'name',
46
- message: 'Site name (you can change it later):',
47
- default: siteSuggestion,
17
+ message: 'Site name (leave blank for a random name; you can change it later):',
48
18
  validate: (input) =>
49
19
  /^[a-zA-Z\d-]+$/.test(input || undefined) || 'Only alphanumeric characters and hyphens are allowed',
50
20
  },
51
21
  ])
52
- name = nameInput || siteSuggestion
22
+ name = nameInput || ''
53
23
  }
54
24
 
55
- return { name, siteSuggestion }
25
+ return { name }
56
26
  }
57
27
 
58
28
  /**
@@ -83,12 +53,11 @@ const sitesCreate = async (options, command) => {
83
53
  accountSlug = accountSlugInput
84
54
  }
85
55
 
86
- let user
87
56
  let site
88
57
 
89
58
  // Allow the user to reenter site name if selected one isn't available
90
59
  const inputSiteName = async (name) => {
91
- const { name: siteName } = await getSiteNameInput(name, user, api)
60
+ const { name: siteName } = await getSiteNameInput(name)
92
61
 
93
62
  const body = {}
94
63
  if (typeof siteName === 'string') {
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
  const inquirer = require('inquirer')
3
3
 
4
- const { chalk, error, exit, log } = require('../../utils')
4
+ const { chalk, error, exit, log } = require('../../utils/index.cjs')
5
5
 
6
6
  /**
7
7
  * The sites:delete command
@@ -1,8 +1,8 @@
1
1
  // @ts-check
2
2
 
3
- const { listSites } = require('../../lib/api')
4
- const { startSpinner, stopSpinner } = require('../../lib/spinner')
5
- const { chalk, log, logJson } = require('../../utils')
3
+ const { listSites } = require('../../lib/api.cjs')
4
+ const { startSpinner, stopSpinner } = require('../../lib/spinner.cjs')
5
+ const { chalk, log, logJson } = require('../../utils/index.cjs')
6
6
 
7
7
  /**
8
8
  * The sites:list command
@@ -1,8 +1,8 @@
1
1
  // @ts-check
2
- const { createSitesCreateCommand } = require('./sites-create')
3
- const { createSitesFromTemplateCommand } = require('./sites-create-template')
4
- const { createSitesDeleteCommand } = require('./sites-delete')
5
- const { createSitesListCommand } = require('./sites-list')
2
+ const { createSitesFromTemplateCommand } = require('./sites-create-template.cjs')
3
+ const { createSitesCreateCommand } = require('./sites-create.cjs')
4
+ const { createSitesDeleteCommand } = require('./sites-delete.cjs')
5
+ const { createSitesListCommand } = require('./sites-list.cjs')
6
6
 
7
7
  /**
8
8
  * The sites command
@@ -0,0 +1,5 @@
1
+ const { createStatusCommand } = require('./status.cjs')
2
+
3
+ module.exports = {
4
+ createStatusCommand,
5
+ }
@@ -2,7 +2,7 @@
2
2
  const { get } = require('dot-prop')
3
3
  const prettyjson = require('prettyjson')
4
4
 
5
- const { error, log, warn } = require('../../utils')
5
+ const { error, log, warn } = require('../../utils/index.cjs')
6
6
 
7
7
  /**
8
8
  * The status:hooks command