netlify-cli 17.5.3 → 17.7.0

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 (295) hide show
  1. package/bin/{run.mjs → run.js} +3 -3
  2. package/npm-shrinkwrap.json +4 -4
  3. package/package.json +8 -9
  4. package/scripts/{postinstall.mjs → postinstall.js} +3 -4
  5. package/src/commands/addons/addons-auth.js +22 -0
  6. package/src/commands/addons/{addons-config.mjs → addons-config.js} +9 -34
  7. package/src/commands/addons/{addons-create.mjs → addons-create.js} +7 -33
  8. package/src/commands/addons/addons-delete.js +33 -0
  9. package/src/commands/addons/{addons-list.mjs → addons-list.js} +3 -25
  10. package/src/commands/addons/addons.js +68 -0
  11. package/src/commands/addons/index.js +1 -0
  12. package/src/commands/api/{api.mjs → api.js} +2 -24
  13. package/src/commands/api/index.js +13 -0
  14. package/src/commands/{base-command.mjs → base-command.js} +7 -7
  15. package/src/commands/blobs/blobs-delete.js +20 -0
  16. package/src/commands/blobs/{blobs-get.mjs → blobs-get.js} +2 -15
  17. package/src/commands/blobs/{blobs-list.mjs → blobs-list.js} +2 -16
  18. package/src/commands/blobs/{blobs-set.mjs → blobs-set.js} +2 -17
  19. package/src/commands/blobs/blobs.js +74 -0
  20. package/src/commands/blobs/index.js +1 -0
  21. package/src/commands/build/{build.mjs → build.js} +7 -28
  22. package/src/commands/build/index.js +13 -0
  23. package/src/commands/completion/completion.js +29 -0
  24. package/src/commands/completion/index.js +26 -0
  25. package/src/commands/deploy/{deploy.mjs → deploy.js} +17 -133
  26. package/src/commands/deploy/index.js +106 -0
  27. package/src/commands/dev/{dev-exec.mjs → dev-exec.js} +3 -15
  28. package/src/commands/dev/{dev.mjs → dev.js} +19 -38
  29. package/src/commands/dev/index.js +1 -0
  30. package/src/commands/env/{env-clone.mjs → env-clone.js} +71 -94
  31. package/src/commands/env/env-get.js +34 -0
  32. package/src/commands/env/{env-import.mjs → env-import.js} +38 -65
  33. package/src/commands/env/{env-list.mjs → env-list.js} +3 -37
  34. package/src/commands/env/{env-set.mjs → env-set.js} +36 -81
  35. package/src/commands/env/{env-unset.mjs → env-unset.js} +30 -62
  36. package/src/commands/env/env.js +127 -0
  37. package/src/commands/env/index.js +1 -0
  38. package/src/commands/functions/{functions-build.mjs → functions-build.js} +3 -22
  39. package/src/commands/functions/{functions-create.mjs → functions-create.js} +20 -47
  40. package/src/commands/functions/{functions-invoke.mjs → functions-invoke.js} +3 -41
  41. package/src/commands/functions/{functions-list.mjs → functions-list.js} +3 -27
  42. package/src/commands/functions/{functions-serve.mjs → functions-serve.js} +6 -28
  43. package/src/commands/functions/functions.js +98 -0
  44. package/src/commands/functions/index.js +1 -0
  45. package/src/commands/index.js +2 -0
  46. package/src/commands/init/index.js +12 -0
  47. package/src/commands/init/{init.mjs → init.js} +10 -31
  48. package/src/commands/integration/{deploy.mjs → deploy.js} +7 -28
  49. package/src/commands/integration/index.js +26 -0
  50. package/src/commands/link/index.js +13 -0
  51. package/src/commands/link/{link.mjs → link.js} +6 -28
  52. package/src/commands/lm/index.js +1 -0
  53. package/src/commands/lm/{lm-info.mjs → lm-info.js} +2 -9
  54. package/src/commands/lm/lm-install.js +8 -0
  55. package/src/commands/lm/{lm-setup.mjs → lm-setup.js} +6 -25
  56. package/src/commands/lm/lm-uninstall.js +7 -0
  57. package/src/commands/lm/lm.js +46 -0
  58. package/src/commands/login/index.js +9 -0
  59. package/src/commands/login/{login.mjs → login.js} +1 -19
  60. package/src/commands/logout/index.js +7 -0
  61. package/src/commands/logout/{logout.mjs → logout.js} +3 -16
  62. package/src/commands/logs/{build.mjs → build.js} +3 -8
  63. package/src/commands/logs/{functions.mjs → functions.js} +14 -14
  64. package/src/commands/logs/index.js +39 -0
  65. package/src/commands/logs/log-levels.js +11 -0
  66. package/src/commands/{main.mjs → main.js} +32 -32
  67. package/src/commands/open/index.js +31 -0
  68. package/src/commands/open/open-admin.js +11 -0
  69. package/src/commands/open/open-site.js +12 -0
  70. package/src/commands/open/open.js +13 -0
  71. package/src/commands/recipes/{common.mjs → common.js} +2 -2
  72. package/src/commands/recipes/index.js +20 -0
  73. package/src/commands/recipes/recipes-list.js +14 -0
  74. package/src/commands/recipes/{recipes.mjs → recipes.js} +8 -32
  75. package/src/commands/serve/index.js +27 -0
  76. package/src/commands/serve/{serve.mjs → serve.js} +14 -51
  77. package/src/commands/sites/index.js +1 -0
  78. package/src/commands/sites/{sites-create-template.mjs → sites-create-template.js} +9 -38
  79. package/src/commands/sites/{sites-create.mjs → sites-create.js} +5 -38
  80. package/src/commands/sites/{sites-delete.mjs → sites-delete.js} +2 -22
  81. package/src/commands/sites/{sites-list.mjs → sites-list.js} +4 -24
  82. package/src/commands/sites/sites.js +77 -0
  83. package/src/commands/status/index.js +19 -0
  84. package/src/commands/status/{status-hooks.mjs → status-hooks.js} +2 -20
  85. package/src/commands/status/{status.mjs → status.js} +2 -23
  86. package/src/commands/switch/index.js +7 -0
  87. package/src/commands/switch/{switch.mjs → switch.js} +3 -16
  88. package/src/commands/unlink/index.js +7 -0
  89. package/src/commands/unlink/unlink.js +21 -0
  90. package/src/commands/watch/index.js +8 -0
  91. package/src/commands/watch/{watch.mjs → watch.js} +4 -21
  92. package/src/lib/{api.mjs → api.js} +1 -1
  93. package/src/lib/blobs/{blobs.mjs → blobs.js} +2 -2
  94. package/src/lib/{build.mjs → build.js} +3 -3
  95. package/src/lib/completion/{constants.mjs → constants.js} +1 -1
  96. package/src/lib/completion/{generate-autocompletion.mjs → generate-autocompletion.js} +3 -3
  97. package/src/lib/completion/{index.mjs → index.js} +1 -1
  98. package/src/lib/completion/{script.mjs → script.js} +3 -3
  99. package/src/lib/edge-functions/{deploy.mjs → deploy.js} +2 -2
  100. package/src/lib/edge-functions/{editor-helper.mjs → editor-helper.js} +1 -1
  101. package/src/lib/edge-functions/{internal.mjs → internal.js} +2 -2
  102. package/src/lib/edge-functions/{proxy.mjs → proxy.js} +10 -11
  103. package/src/lib/edge-functions/{registry.mjs → registry.js} +1 -1
  104. package/src/lib/{exec-fetcher.mjs → exec-fetcher.js} +2 -2
  105. package/src/lib/functions/{background.mjs → background.js} +2 -2
  106. package/src/lib/functions/{form-submissions-handler.mjs → form-submissions-handler.js} +3 -3
  107. package/src/lib/functions/{local-proxy.mjs → local-proxy.js} +1 -1
  108. package/src/lib/functions/{netlify-function.mjs → netlify-function.js} +3 -3
  109. package/src/lib/functions/{registry.mjs → registry.js} +9 -9
  110. package/src/lib/functions/runtimes/go/{index.mjs → index.js} +2 -2
  111. package/src/lib/functions/runtimes/{index.mjs → index.js} +3 -4
  112. package/src/lib/functions/runtimes/js/builders/{netlify-lambda.mjs → netlify-lambda.js} +3 -3
  113. package/src/lib/functions/runtimes/js/builders/{zisi.mjs → zisi.js} +6 -6
  114. package/src/lib/functions/runtimes/js/{index.mjs → index.js} +4 -4
  115. package/src/lib/functions/runtimes/rust/{index.mjs → index.js} +4 -4
  116. package/src/lib/functions/{scheduled.mjs → scheduled.js} +2 -2
  117. package/src/lib/functions/{server.mjs → server.js} +15 -15
  118. package/src/lib/functions/{synchronous.mjs → synchronous.js} +3 -3
  119. package/src/lib/functions/{utils.mjs → utils.js} +2 -2
  120. package/src/lib/{geo-location.mjs → geo-location.js} +1 -1
  121. package/src/lib/{http-agent.mjs → http-agent.js} +1 -1
  122. package/src/lib/images/{proxy.mjs → proxy.js} +2 -2
  123. package/src/lib/{log.mjs → log.js} +1 -1
  124. package/src/recipes/vscode/{index.mjs → index.js} +2 -2
  125. package/src/recipes/vscode/{settings.mjs → settings.js} +0 -1
  126. package/src/utils/addons/diffs/{index.mjs → index.js} +1 -1
  127. package/src/utils/addons/diffs/{options.mjs → options.js} +0 -1
  128. package/src/utils/addons/{prepare.mjs → prepare.js} +2 -2
  129. package/src/utils/addons/{prompts.mjs → prompts.js} +1 -1
  130. package/src/utils/addons/{render.mjs → render.js} +1 -1
  131. package/src/utils/{banner.mjs → banner.js} +1 -1
  132. package/src/utils/{build-info.mjs → build-info.js} +3 -3
  133. package/src/utils/{command-helpers.mjs → command-helpers.js} +4 -9
  134. package/src/utils/deploy/{deploy-site.mjs → deploy-site.js} +8 -8
  135. package/src/utils/deploy/{hash-files.mjs → hash-files.js} +1 -1
  136. package/src/utils/deploy/{hash-fns.mjs → hash-fns.js} +3 -3
  137. package/src/utils/deploy/{hasher-segments.mjs → hasher-segments.js} +1 -1
  138. package/src/utils/deploy/{upload-files.mjs → upload-files.js} +1 -1
  139. package/src/utils/deploy/{util.mjs → util.js} +1 -1
  140. package/src/utils/{detect-server-settings.mjs → detect-server-settings.js} +6 -7
  141. package/src/utils/{dev.mjs → dev.js} +3 -3
  142. package/src/utils/{dot-env.mjs → dot-env.js} +2 -2
  143. package/src/utils/env/{index.mjs → index.js} +1 -1
  144. package/src/utils/{framework-server.mjs → framework-server.js} +4 -4
  145. package/src/utils/functions/{functions.mjs → functions.js} +2 -2
  146. package/src/utils/functions/{get-functions.mjs → get-functions.js} +1 -1
  147. package/src/utils/functions/index.js +3 -0
  148. package/src/utils/{get-global-config.mjs → get-global-config.js} +1 -1
  149. package/src/utils/{get-repo-data.mjs → get-repo-data.js} +1 -1
  150. package/src/utils/{get-site.mjs → get-site.js} +1 -1
  151. package/src/utils/{gh-auth.mjs → gh-auth.js} +3 -3
  152. package/src/utils/{gitignore.mjs → gitignore.js} +2 -2
  153. package/src/utils/{headers.mjs → headers.js} +1 -1
  154. package/src/utils/hooks/{requires-site-info.mjs → requires-site-info.js} +1 -1
  155. package/src/utils/init/{config-github.mjs → config-github.js} +4 -4
  156. package/src/utils/init/{config-manual.mjs → config-manual.js} +5 -5
  157. package/src/utils/init/{config.mjs → config.js} +4 -4
  158. package/src/utils/init/{node-version.mjs → node-version.js} +1 -1
  159. package/src/utils/init/{utils.mjs → utils.js} +7 -7
  160. package/src/utils/{live-tunnel.mjs → live-tunnel.js} +4 -4
  161. package/src/utils/lm/{install.mjs → install.js} +6 -6
  162. package/src/utils/lm/{requirements.mjs → requirements.js} +1 -1
  163. package/src/utils/lm/{steps.mjs → steps.js} +2 -2
  164. package/src/utils/lm/{ui.mjs → ui.js} +2 -2
  165. package/src/utils/{open-browser.mjs → open-browser.js} +1 -1
  166. package/src/utils/{proxy-server.mjs → proxy-server.js} +5 -5
  167. package/src/utils/{proxy.mjs → proxy.js} +11 -11
  168. package/src/utils/{redirects.mjs → redirects.js} +1 -1
  169. package/src/utils/{rules-proxy.mjs → rules-proxy.js} +3 -3
  170. package/src/utils/{run-build.mjs → run-build.js} +8 -8
  171. package/src/utils/{shell.mjs → shell.js} +2 -2
  172. package/src/utils/{state-config.mjs → state-config.js} +1 -1
  173. package/src/utils/{static-server.mjs → static-server.js} +1 -1
  174. package/src/utils/telemetry/index.js +2 -0
  175. package/src/utils/telemetry/{report-error.mjs → report-error.js} +4 -4
  176. package/src/utils/telemetry/{request.mjs → request.js} +1 -1
  177. package/src/utils/telemetry/{telemetry.mjs → telemetry.js} +5 -5
  178. package/src/utils/telemetry/{utils.mjs → utils.js} +1 -1
  179. package/src/utils/telemetry/{validation.mjs → validation.js} +1 -1
  180. package/src/utils/{validation.mjs → validation.js} +1 -1
  181. package/src/commands/addons/addons-auth.mjs +0 -45
  182. package/src/commands/addons/addons-delete.mjs +0 -53
  183. package/src/commands/addons/addons.mjs +0 -39
  184. package/src/commands/addons/index.mjs +0 -1
  185. package/src/commands/api/index.mjs +0 -1
  186. package/src/commands/blobs/blobs-delete.mjs +0 -35
  187. package/src/commands/blobs/blobs.mjs +0 -32
  188. package/src/commands/blobs/index.mjs +0 -1
  189. package/src/commands/build/index.mjs +0 -1
  190. package/src/commands/completion/completion.mjs +0 -53
  191. package/src/commands/completion/index.mjs +0 -1
  192. package/src/commands/deploy/index.mjs +0 -1
  193. package/src/commands/dev/index.mjs +0 -1
  194. package/src/commands/dev/types.d.ts +0 -30
  195. package/src/commands/env/env-get.mjs +0 -66
  196. package/src/commands/env/env.mjs +0 -41
  197. package/src/commands/env/index.mjs +0 -1
  198. package/src/commands/functions/functions.mjs +0 -39
  199. package/src/commands/functions/index.mjs +0 -1
  200. package/src/commands/index.mjs +0 -2
  201. package/src/commands/init/index.mjs +0 -1
  202. package/src/commands/integration/index.mjs +0 -24
  203. package/src/commands/link/index.mjs +0 -1
  204. package/src/commands/lm/index.mjs +0 -1
  205. package/src/commands/lm/lm-install.mjs +0 -27
  206. package/src/commands/lm/lm-uninstall.mjs +0 -18
  207. package/src/commands/lm/lm.mjs +0 -30
  208. package/src/commands/login/index.mjs +0 -1
  209. package/src/commands/logout/index.mjs +0 -1
  210. package/src/commands/logs/index.mjs +0 -12
  211. package/src/commands/open/index.mjs +0 -1
  212. package/src/commands/open/open-admin.mjs +0 -30
  213. package/src/commands/open/open-site.mjs +0 -31
  214. package/src/commands/open/open.mjs +0 -36
  215. package/src/commands/recipes/index.mjs +0 -1
  216. package/src/commands/recipes/recipes-list.mjs +0 -25
  217. package/src/commands/serve/index.mjs +0 -1
  218. package/src/commands/sites/index.mjs +0 -2
  219. package/src/commands/sites/sites.mjs +0 -30
  220. package/src/commands/status/index.mjs +0 -1
  221. package/src/commands/switch/index.mjs +0 -1
  222. package/src/commands/types.d.ts +0 -31
  223. package/src/commands/unlink/index.mjs +0 -1
  224. package/src/commands/unlink/unlink.mjs +0 -34
  225. package/src/commands/watch/index.mjs +0 -1
  226. package/src/functions-templates/typescript/abtest/{{name}}.ts +0 -31
  227. package/src/functions-templates/typescript/geolocation/{{name}}.ts +0 -24
  228. package/src/functions-templates/typescript/hello-world/{{name}}.ts +0 -12
  229. package/src/functions-templates/typescript/json/{{name}}.ts +0 -5
  230. package/src/functions-templates/typescript/log/{{name}}.ts +0 -9
  231. package/src/functions-templates/typescript/scheduled-function/{{name}}.ts +0 -12
  232. package/src/functions-templates/typescript/set-cookies/{{name}}.ts +0 -29
  233. package/src/functions-templates/typescript/set-req-header/{{name}}.ts +0 -5
  234. package/src/functions-templates/typescript/set-res-header/{{name}}.ts +0 -7
  235. package/src/functions-templates/typescript/transform-response/{{name}}.ts +0 -13
  236. package/src/utils/functions/index.mjs +0 -3
  237. package/src/utils/telemetry/index.mjs +0 -2
  238. package/src/utils/types.d.ts +0 -46
  239. /package/src/functions-templates/go/hello-world/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  240. /package/src/functions-templates/javascript/hello/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  241. /package/src/functions-templates/javascript/hello-world/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  242. /package/src/functions-templates/javascript/identity-signup/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  243. /package/src/functions-templates/javascript/image-external/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  244. /package/src/functions-templates/javascript/localized-content/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  245. /package/src/functions-templates/javascript/sanity-create/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  246. /package/src/functions-templates/javascript/sanity-groq/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  247. /package/src/functions-templates/javascript/scheduled-function/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  248. /package/src/functions-templates/javascript/set-cookies/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  249. /package/src/functions-templates/javascript/set-req-header/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  250. /package/src/functions-templates/javascript/set-res-header/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  251. /package/src/functions-templates/javascript/submission-created/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  252. /package/src/functions-templates/javascript/transform-response/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  253. /package/src/functions-templates/rust/hello-world/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  254. /package/src/functions-templates/typescript/abtest/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  255. /package/src/functions-templates/typescript/geolocation/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  256. /package/src/functions-templates/typescript/hello-world/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  257. /package/src/functions-templates/typescript/json/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  258. /package/src/functions-templates/typescript/log/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  259. /package/src/functions-templates/typescript/scheduled-function/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  260. /package/src/functions-templates/typescript/set-cookies/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  261. /package/src/functions-templates/typescript/set-req-header/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  262. /package/src/functions-templates/typescript/set-res-header/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  263. /package/src/functions-templates/typescript/transform-response/{.netlify-function-template.mjs → .netlify-function-template.js} +0 -0
  264. /package/src/lib/{account.mjs → account.js} +0 -0
  265. /package/src/lib/completion/{get-autocompletion.mjs → get-autocompletion.js} +0 -0
  266. /package/src/lib/edge-functions/{bootstrap.mjs → bootstrap.js} +0 -0
  267. /package/src/lib/edge-functions/{consts.mjs → consts.js} +0 -0
  268. /package/src/lib/edge-functions/{headers.mjs → headers.js} +0 -0
  269. /package/src/lib/{fs.mjs → fs.js} +0 -0
  270. /package/src/lib/functions/{config.mjs → config.js} +0 -0
  271. /package/src/lib/functions/{memoized-build.mjs → memoized-build.js} +0 -0
  272. /package/src/lib/functions/runtimes/js/{constants.mjs → constants.js} +0 -0
  273. /package/src/lib/functions/runtimes/js/{worker.mjs → worker.js} +0 -0
  274. /package/src/lib/{path.mjs → path.js} +0 -0
  275. /package/src/lib/{render-error-template.mjs → render-error-template.js} +0 -0
  276. /package/src/lib/{settings.mjs → settings.js} +0 -0
  277. /package/src/lib/{spinner.mjs → spinner.js} +0 -0
  278. /package/src/lib/{string.mjs → string.js} +0 -0
  279. /package/src/utils/addons/{compare.mjs → compare.js} +0 -0
  280. /package/src/utils/addons/{validation.mjs → validation.js} +0 -0
  281. /package/src/utils/{create-deferred.mjs → create-deferred.js} +0 -0
  282. /package/src/utils/{create-stream-promise.mjs → create-stream-promise.js} +0 -0
  283. /package/src/utils/deploy/{constants.mjs → constants.js} +0 -0
  284. /package/src/utils/deploy/{hash-config.mjs → hash-config.js} +0 -0
  285. /package/src/utils/{execa.mjs → execa.js} +0 -0
  286. /package/src/utils/{feature-flags.mjs → feature-flags.js} +0 -0
  287. /package/src/utils/functions/{constants.mjs → constants.js} +0 -0
  288. /package/src/utils/{get-package-json.mjs → get-package-json.js} +0 -0
  289. /package/src/utils/init/{plugins.mjs → plugins.js} +0 -0
  290. /package/src/utils/{parse-raw-flags.mjs → parse-raw-flags.js} +0 -0
  291. /package/src/utils/{read-repo-url.mjs → read-repo-url.js} +0 -0
  292. /package/src/utils/{request-id.mjs → request-id.js} +0 -0
  293. /package/src/utils/{sign-redirect.mjs → sign-redirect.js} +0 -0
  294. /package/src/utils/sites/{utils.mjs → utils.js} +0 -0
  295. /package/src/utils/websockets/{index.mjs → index.js} +0 -0
@@ -2,8 +2,8 @@ import { dirname, extname } from 'path';
2
2
  import { platform } from 'process';
3
3
  import { temporaryFile } from 'tempy';
4
4
  // @ts-expect-error TS(7034) FIXME: Variable 'execa' implicitly has type 'any' in some... Remove this comment to see the full error message
5
- import execa from '../../../../utils/execa.mjs';
6
- import { runFunctionsProxy } from '../../local-proxy.mjs';
5
+ import execa from '../../../../utils/execa.js';
6
+ import { runFunctionsProxy } from '../../local-proxy.js';
7
7
  const isWindows = platform === 'win32';
8
8
  export const name = 'go';
9
9
  // @ts-expect-error TS(7031) FIXME: Binding element 'binaryPath' implicitly has an 'an... Remove this comment to see the full error message
@@ -1,7 +1,6 @@
1
- /* eslint-disable import/no-namespace */
2
- import * as go from './go/index.mjs';
3
- import * as js from './js/index.mjs';
4
- import * as rust from './rust/index.mjs';
1
+ import * as go from './go/index.js';
2
+ import * as js from './js/index.js';
3
+ import * as rust from './rust/index.js';
5
4
  /* eslint-enable import/no-namespace */
6
5
  /**
7
6
  * @callback BuildFunction
@@ -2,9 +2,9 @@ import { readFile } from 'fs/promises';
2
2
  import { resolve } from 'path';
3
3
  import minimist from 'minimist';
4
4
  // @ts-expect-error TS(7034) FIXME: Variable 'execa' implicitly has type 'any' in some... Remove this comment to see the full error message
5
- import execa from '../../../../../utils/execa.mjs';
6
- import { fileExistsAsync } from '../../../../fs.mjs';
7
- import { memoizedBuild } from '../../../memoized-build.mjs';
5
+ import execa from '../../../../../utils/execa.js';
6
+ import { fileExistsAsync } from '../../../../fs.js';
7
+ import { memoizedBuild } from '../../../memoized-build.js';
8
8
  // @ts-expect-error TS(2525) FIXME: Initializer provides no value for this binding ele... Remove this comment to see the full error message
9
9
  export const detectNetlifyLambda = async function ({ packageJson } = {}) {
10
10
  const { dependencies, devDependencies, scripts } = packageJson || {};
@@ -6,11 +6,11 @@ import decache from 'decache';
6
6
  import { readPackageUp } from 'read-pkg-up';
7
7
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'sour... Remove this comment to see the full error message
8
8
  import sourceMapSupport from 'source-map-support';
9
- import { NETLIFYDEVERR } from '../../../../../utils/command-helpers.mjs';
10
- import { SERVE_FUNCTIONS_FOLDER } from '../../../../../utils/functions/functions.mjs';
11
- import { getPathInProject } from '../../../../settings.mjs';
12
- import { normalizeFunctionsConfig } from '../../../config.mjs';
13
- import { memoizedBuild } from '../../../memoized-build.mjs';
9
+ import { NETLIFYDEVERR } from '../../../../../utils/command-helpers.js';
10
+ import { SERVE_FUNCTIONS_FOLDER } from '../../../../../utils/functions/functions.js';
11
+ import { getPathInProject } from '../../../../settings.js';
12
+ import { normalizeFunctionsConfig } from '../../../config.js';
13
+ import { memoizedBuild } from '../../../memoized-build.js';
14
14
  const require = createRequire(import.meta.url);
15
15
  // @ts-expect-error TS(7006) FIXME: Parameter 'config' implicitly has an 'any' type.
16
16
  const addFunctionsConfigDefaults = (config) => ({
@@ -142,7 +142,7 @@ export default async function handler({ config, directory, errorExit, func, meta
142
142
  }
143
143
  else {
144
144
  // We must use esbuild for certain file extensions.
145
- const mustTranspile = ['.mjs', '.ts', '.mts', '.cts'].includes(path.extname(func.mainFile));
145
+ const mustTranspile = ['.js', '.ts', '.mts', '.cts'].includes(path.extname(func.mainFile));
146
146
  const mustUseEsbuild = hasTypeModule || mustTranspile;
147
147
  if (mustUseEsbuild && !functionsConfig['*'].nodeBundler) {
148
148
  functionsConfig['*'].nodeBundler = 'esbuild';
@@ -3,9 +3,9 @@ import { dirname } from 'path';
3
3
  import { pathToFileURL } from 'url';
4
4
  import { Worker } from 'worker_threads';
5
5
  import lambdaLocal from 'lambda-local';
6
- import detectNetlifyLambdaBuilder from './builders/netlify-lambda.mjs';
7
- import detectZisiBuilder, { parseFunctionForMetadata } from './builders/zisi.mjs';
8
- import { SECONDS_TO_MILLISECONDS } from './constants.mjs';
6
+ import detectNetlifyLambdaBuilder from './builders/netlify-lambda.js';
7
+ import detectZisiBuilder, { parseFunctionForMetadata } from './builders/zisi.js';
8
+ import { SECONDS_TO_MILLISECONDS } from './constants.js';
9
9
  export const name = 'js';
10
10
  // @ts-expect-error TS(7034) FIXME: Variable 'netlifyLambdaDetectorCache' implicitly h... Remove this comment to see the full error message
11
11
  let netlifyLambdaDetectorCache;
@@ -40,7 +40,7 @@ export const getBuildFunction = async ({ config, directory, errorExit, func, pro
40
40
  // @ts-expect-error TS(2532) FIXME: Object is possibly 'undefined'.
41
41
  return () => ({ schedule: metadata.schedule, srcFiles });
42
42
  };
43
- const workerURL = new URL('worker.mjs', import.meta.url);
43
+ const workerURL = new URL('worker.js', import.meta.url);
44
44
  // @ts-expect-error TS(7031) FIXME: Binding element 'context' implicitly has an 'any' ... Remove this comment to see the full error message
45
45
  export const invokeFunction = async ({ context, environment, event, func, timeout }) => {
46
46
  if (func.buildData.runtimeAPIVersion !== 2) {
@@ -4,10 +4,10 @@ import { platform } from 'process';
4
4
  import { findUp } from 'find-up';
5
5
  import toml from 'toml';
6
6
  // @ts-expect-error TS(7034) FIXME: Variable 'execa' implicitly has type 'any' in some... Remove this comment to see the full error message
7
- import execa from '../../../../utils/execa.mjs';
8
- import { SERVE_FUNCTIONS_FOLDER } from '../../../../utils/functions/functions.mjs';
9
- import { getPathInProject } from '../../../settings.mjs';
10
- import { runFunctionsProxy } from '../../local-proxy.mjs';
7
+ import execa from '../../../../utils/execa.js';
8
+ import { SERVE_FUNCTIONS_FOLDER } from '../../../../utils/functions/functions.js';
9
+ import { getPathInProject } from '../../../settings.js';
10
+ import { runFunctionsProxy } from '../../local-proxy.js';
11
11
  const isWindows = platform === 'win32';
12
12
  export const name = 'rs';
13
13
  // @ts-expect-error TS(7031) FIXME: Binding element 'func' implicitly has an 'any' typ... Remove this comment to see the full error message
@@ -1,6 +1,6 @@
1
1
  import AnsiToHtml from 'ansi-to-html';
2
- import { CLOCKWORK_USERAGENT } from '../../utils/functions/index.mjs';
3
- import { formatLambdaError } from './utils.mjs';
2
+ import { CLOCKWORK_USERAGENT } from '../../utils/functions/index.js';
3
+ import { formatLambdaError } from './utils.js';
4
4
  const ansiToHtml = new AnsiToHtml();
5
5
  // @ts-expect-error TS(7031) FIXME: Binding element 'error' implicitly has an 'any' ty... Remove this comment to see the full error message
6
6
  export const buildHelpResponse = ({ error, headers, path, result }) => {
@@ -5,18 +5,18 @@ import express from 'express';
5
5
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'expr... Remove this comment to see the full error message
6
6
  import expressLogging from 'express-logging';
7
7
  import jwtDecode from 'jwt-decode';
8
- import { NETLIFYDEVERR, NETLIFYDEVLOG, error as errorExit, log } from '../../utils/command-helpers.mjs';
9
- import { isFeatureFlagEnabled } from '../../utils/feature-flags.mjs';
10
- import { CLOCKWORK_USERAGENT, getFunctionsDistPath, getFunctionsServePath, getInternalFunctionsDir, } from '../../utils/functions/index.mjs';
11
- import { NFFunctionName, NFFunctionRoute } from '../../utils/headers.mjs';
12
- import { headers as efHeaders } from '../edge-functions/headers.mjs';
13
- import { getGeoLocation } from '../geo-location.mjs';
14
- import { handleBackgroundFunction, handleBackgroundFunctionResult } from './background.mjs';
15
- import { createFormSubmissionHandler } from './form-submissions-handler.mjs';
16
- import { FunctionsRegistry } from './registry.mjs';
17
- import { handleScheduledFunction } from './scheduled.mjs';
18
- import { handleSynchronousFunction } from './synchronous.mjs';
19
- import { shouldBase64Encode } from './utils.mjs';
8
+ import { NETLIFYDEVERR, NETLIFYDEVLOG, error as errorExit, log } from '../../utils/command-helpers.js';
9
+ import { isFeatureFlagEnabled } from '../../utils/feature-flags.js';
10
+ import { CLOCKWORK_USERAGENT, getFunctionsDistPath, getFunctionsServePath, getInternalFunctionsDir, } from '../../utils/functions/index.js';
11
+ import { NFFunctionName, NFFunctionRoute } from '../../utils/headers.js';
12
+ import { headers as efHeaders } from '../edge-functions/headers.js';
13
+ import { getGeoLocation } from '../geo-location.js';
14
+ import { handleBackgroundFunction, handleBackgroundFunctionResult } from './background.js';
15
+ import { createFormSubmissionHandler } from './form-submissions-handler.js';
16
+ import { FunctionsRegistry } from './registry.js';
17
+ import { handleScheduledFunction } from './scheduled.js';
18
+ import { handleSynchronousFunction } from './synchronous.js';
19
+ import { shouldBase64Encode } from './utils.js';
20
20
  // @ts-expect-error TS(7006) FIXME: Parameter 'headers' implicitly has an 'any' type.
21
21
  const buildClientContext = function (headers) {
22
22
  // inject a client context based on auth header, ported over from netlify-lambda (https://github.com/netlify/netlify-lambda/pull/57)
@@ -201,8 +201,8 @@ const getFunctionsServer = (options) => {
201
201
  /**
202
202
  *
203
203
  * @param {object} options
204
- * @param {import("../blobs/blobs.mjs").BlobsContext} options.blobsContext
205
- * @param {import('../../commands/base-command.mjs').default} options.command
204
+ * @param {import("../blobs/blobs.js").BlobsContext} options.blobsContext
205
+ * @param {import('../../commands/base-command.js').default} options.command
206
206
  * @param {*} options.capabilities
207
207
  * @param {*} options.config
208
208
  * @param {boolean} options.debug
@@ -212,7 +212,7 @@ const getFunctionsServer = (options) => {
212
212
  * @param {*} options.siteInfo
213
213
  * @param {string} options.siteUrl
214
214
  * @param {*} options.timeouts
215
- * @returns {Promise<import('./registry.mjs').FunctionsRegistry | undefined>}
215
+ * @returns {Promise<import('./registry.js').FunctionsRegistry | undefined>}
216
216
  */
217
217
  // @ts-expect-error TS(7006) FIXME: Parameter 'options' implicitly has an 'any' type.
218
218
  export const startFunctionsServer = async (options) => {
@@ -1,8 +1,8 @@
1
1
  import { Buffer } from 'buffer';
2
2
  import { isStream } from 'is-stream';
3
- import { chalk, logPadded, NETLIFYDEVERR } from '../../utils/command-helpers.mjs';
4
- import renderErrorTemplate from '../render-error-template.mjs';
5
- import { detectAwsSdkError } from './utils.mjs';
3
+ import { chalk, logPadded, NETLIFYDEVERR } from '../../utils/command-helpers.js';
4
+ import renderErrorTemplate from '../render-error-template.js';
5
+ import { detectAwsSdkError } from './utils.js';
6
6
  /**
7
7
  * @typedef InvocationError
8
8
  * @property {string} errorType
@@ -1,5 +1,5 @@
1
- import { chalk, warn } from '../../utils/command-helpers.mjs';
2
- import { MISSING_AWS_SDK_WARNING } from '../log.mjs';
1
+ import { chalk, warn } from '../../utils/command-helpers.js';
2
+ import { MISSING_AWS_SDK_WARNING } from '../log.js';
3
3
  // @ts-expect-error TS(7031) FIXME: Binding element 'error' implicitly has an 'any' ty... Remove this comment to see the full error message
4
4
  export const detectAwsSdkError = ({ error }) => {
5
5
  const isAwsSdkError = error && error.errorMessage && error.errorMessage.includes("Cannot find module 'aws-sdk'");
@@ -36,7 +36,7 @@ export const mockLocation = {
36
36
  * @param {"cache"|"update"|"mock"} params.mode
37
37
  * @param {string} params.geoCountry
38
38
  * @param {boolean} params.offline
39
- * @param {import('../utils/state-config.mjs').default} params.state
39
+ * @param {import('../utils/state-config.js').default} params.state
40
40
  * @returns {Promise<GeoLocation>}
41
41
  */
42
42
  // @ts-expect-error TS(7031) FIXME: Binding element 'geoCountry' implicitly has an 'an... Remove this comment to see the full error message
@@ -1,7 +1,7 @@
1
1
  import { readFile } from 'fs/promises';
2
2
  import HttpsProxyAgent from 'https-proxy-agent';
3
3
  import waitPort from 'wait-port';
4
- import { NETLIFYDEVERR, NETLIFYDEVWARN, exit, log } from '../utils/command-helpers.mjs';
4
+ import { NETLIFYDEVERR, NETLIFYDEVWARN, exit, log } from '../utils/command-helpers.js';
5
5
  // https://github.com/TooTallNate/node-https-proxy-agent/issues/89
6
6
  // Maybe replace with https://github.com/delvedor/hpagent
7
7
  // @ts-expect-error TS(2507) FIXME: Type 'typeof createHttpsProxyAgent' is not a const... Remove this comment to see the full error message
@@ -1,7 +1,7 @@
1
1
  import express from 'express';
2
2
  import { createIPX, ipxFSStorage, ipxHttpStorage, createIPXNodeServer } from 'ipx';
3
- import { log, NETLIFYDEVERR } from '../../utils/command-helpers.mjs';
4
- import { getProxyUrl } from '../../utils/proxy.mjs';
3
+ import { log, NETLIFYDEVERR } from '../../utils/command-helpers.js';
4
+ import { getProxyUrl } from '../../utils/proxy.js';
5
5
  export const IMAGE_URL_PATTERN = '/.netlify/images';
6
6
  // @ts-expect-error TS(7006) FIXME: Parameter 'config' implicitly has an 'any' type.
7
7
  export const parseAllDomains = function (config) {
@@ -1,4 +1,4 @@
1
- import { chalk } from '../utils/command-helpers.mjs';
1
+ import { chalk } from '../utils/command-helpers.js';
2
2
  const RED_BACKGROUND = chalk.red('-background');
3
3
  const [PRO, BUSINESS, ENTERPRISE] = ['Pro', 'Business', 'Enterprise'].map((plan) => chalk.magenta(plan));
4
4
  export const BACKGROUND_FUNCTIONS_WARNING = `A serverless function ending in \`${RED_BACKGROUND}\` was detected.
@@ -2,8 +2,8 @@ import { join } from 'path';
2
2
  import { DenoBridge } from '@netlify/edge-bundler';
3
3
  import execa from 'execa';
4
4
  import inquirer from 'inquirer';
5
- import { NETLIFYDEVLOG, NETLIFYDEVWARN, chalk, error, log } from '../../utils/command-helpers.mjs';
6
- import { applySettings, getSettings, writeSettings } from './settings.mjs';
5
+ import { NETLIFYDEVLOG, NETLIFYDEVWARN, chalk, error, log } from '../../utils/command-helpers.js';
6
+ import { applySettings, getSettings, writeSettings } from './settings.js';
7
7
  export const description = 'Create VS Code settings for an optimal experience with Netlify projects';
8
8
  // @ts-expect-error TS(7031) FIXME: Binding element 'fileExists' implicitly has an 'an... Remove this comment to see the full error message
9
9
  const getPrompt = ({ fileExists, path }) => {
@@ -1,6 +1,5 @@
1
1
  import { mkdir, readFile, stat, writeFile } from 'fs/promises';
2
2
  import { dirname, relative } from 'path';
3
- // eslint-disable-next-line import/no-namespace
4
3
  import * as JSONC from 'comment-json';
5
4
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'unix... Remove this comment to see the full error message
6
5
  import unixify from 'unixify';
@@ -1,6 +1,6 @@
1
1
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'conc... Remove this comment to see the full error message
2
2
  import concordance from 'concordance';
3
- import { concordanceDiffOptions, concordanceOptions } from './options.mjs';
3
+ import { concordanceDiffOptions, concordanceOptions } from './options.js';
4
4
  // @ts-expect-error TS(7006) FIXME: Parameter 'actualDescriptor' implicitly has an 'an... Remove this comment to see the full error message
5
5
  const formatDescriptorDiff = function (actualDescriptor, expectedDescriptor, options) {
6
6
  const diffOptions = { ...options, ...concordanceDiffOptions };
@@ -1,5 +1,4 @@
1
1
  import ansiStyles from 'ansi-styles';
2
- // eslint-disable-next-line no-restricted-imports
3
2
  import { Chalk } from 'chalk';
4
3
  const forceColor = new Chalk({ level: 1 });
5
4
  const colorTheme = {
@@ -1,4 +1,4 @@
1
- import { chalk, error, exit, log, warn } from '../command-helpers.mjs';
1
+ import { chalk, error, exit, log, warn } from '../command-helpers.js';
2
2
  export const ADDON_VALIDATION = {
3
3
  EXISTS: 'EXISTS',
4
4
  NOT_EXISTS: 'NOT_EXISTS',
@@ -88,7 +88,7 @@ export const getAddons = async ({ api, siteId }) => {
88
88
  /**
89
89
  *
90
90
  * @param {object} config
91
- * @param {import('../../commands/base-command.mjs').default} config.command
91
+ * @param {import('../../commands/base-command.js').default} config.command
92
92
  * @param {string} [config.addonName]
93
93
  * @param {keyof ADDON_VALIDATION} [config.validation]
94
94
  */
@@ -1,4 +1,4 @@
1
- import { chalk } from '../command-helpers.mjs';
1
+ import { chalk } from '../command-helpers.js';
2
2
  /* programmatically generate CLI prompts */
3
3
  // @ts-expect-error TS(7006) FIXME: Parameter 'settings' implicitly has an 'any' type.
4
4
  export default function generatePrompts(settings) {
@@ -1,5 +1,5 @@
1
1
  import AsciiTable from 'ascii-table';
2
- import { chalk } from '../command-helpers.mjs';
2
+ import { chalk } from '../command-helpers.js';
3
3
  // @ts-expect-error TS(7006) FIXME: Parameter 'values' implicitly has an 'any' type.
4
4
  export const renderMissingValues = function (values, manifest) {
5
5
  const display = values
@@ -1,5 +1,5 @@
1
1
  import boxen from 'boxen';
2
- import { chalk, log, NETLIFYDEVLOG } from './command-helpers.mjs';
2
+ import { chalk, log, NETLIFYDEVLOG } from './command-helpers.js';
3
3
  // @ts-expect-error TS(7031) FIXME: Binding element 'url' implicitly has an 'any' type... Remove this comment to see the full error message
4
4
  export const printBanner = ({ url }) => {
5
5
  const banner = chalk.bold(`${NETLIFYDEVLOG} Server now ready on ${url}`);
@@ -1,6 +1,6 @@
1
1
  import fuzzy from 'fuzzy';
2
2
  import inquirer from 'inquirer';
3
- import { chalk, log } from './command-helpers.mjs';
3
+ import { chalk, log } from './command-helpers.js';
4
4
  /**
5
5
  * Filters the inquirer settings based on the input
6
6
  * @param {ReturnType<typeof formatSettingsArrForInquirer>} scriptInquirerOptions
@@ -37,7 +37,7 @@ const formatSettingsArrForInquirer = function (settings, type = 'dev') {
37
37
  /**
38
38
  * Uses @netlify/build-info to detect the dev settings and port based on the framework
39
39
  * and the build system that is used.
40
- * @param {import('../commands/base-command.mjs').default} command
40
+ * @param {import('../commands/base-command.js').default} command
41
41
  * @param {'dev' | 'build'} type The type of command (dev or build)
42
42
  * @returns {Promise<Settings | undefined>}
43
43
  */
@@ -80,7 +80,7 @@ command = "${chosenSettings.devCommand}"
80
80
  };
81
81
  /**
82
82
  * Detects and filters the build setting for a project and a command
83
- * @param {import('../commands/base-command.mjs').default} command
83
+ * @param {import('../commands/base-command.js').default} command
84
84
  */
85
85
  // @ts-expect-error TS(7006) FIXME: Parameter 'command' implicitly has an 'any' type.
86
86
  export const detectBuildSettings = async (command) => {
@@ -2,17 +2,16 @@ import { once } from 'events';
2
2
  import os from 'os';
3
3
  import process from 'process';
4
4
  import { format, inspect } from 'util';
5
- // eslint-disable-next-line no-restricted-imports
6
5
  import { Chalk } from 'chalk';
7
6
  import chokidar from 'chokidar';
8
7
  import decache from 'decache';
9
8
  import WSL from 'is-wsl';
10
9
  import debounce from 'lodash/debounce.js';
11
10
  import terminalLink from 'terminal-link';
12
- import { clearSpinner, startSpinner } from '../lib/spinner.mjs';
13
- import getGlobalConfig from './get-global-config.mjs';
14
- import getPackageJson from './get-package-json.mjs';
15
- import { reportError } from './telemetry/report-error.mjs';
11
+ import { clearSpinner, startSpinner } from '../lib/spinner.js';
12
+ import getGlobalConfig from './get-global-config.js';
13
+ import getPackageJson from './get-package-json.js';
14
+ import { reportError } from './telemetry/report-error.js';
16
15
  /** The parsed process argv without the binary only arguments and flags */
17
16
  const argv = process.argv.slice(2);
18
17
  /**
@@ -202,7 +201,6 @@ export const exit = (code = 0) => {
202
201
  // @ts-expect-error TS(7006) FIXME: Parameter 'config' implicitly has an 'any' type.
203
202
  export const normalizeConfig = (config) => {
204
203
  // Unused var here is in order to omit 'publish' from build config
205
- // eslint-disable-next-line no-unused-vars
206
204
  const { publish, publishOrigin, ...build } = config.build;
207
205
  return publishOrigin === 'default' ? { ...config, build } : config;
208
206
  };
@@ -253,9 +251,6 @@ export const watchDebounced = async (target, { depth, ignored = [], onAdd = noOp
253
251
  // @ts-expect-error TS(7006) FIXME: Parameter 'text' implicitly has an 'any' type.
254
252
  export const getTerminalLink = (text, url) => terminalLink(text, url, { fallback: () => `${text} (${url})` });
255
253
  export const isNodeError = (err) => error instanceof Error;
256
- // FIXME: tsc is throwing the following error:
257
- // @ts-expect-error TS7060: This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint.
258
- // Adding a trailing comma to the generic type fixes the problem, but annoyingly Prettier is undoing that.
259
254
  export const nonNullable = (value) => value !== null && value !== undefined;
260
255
  export const noOp = () => {
261
256
  // no-op
@@ -1,14 +1,14 @@
1
1
  import { rm } from 'fs/promises';
2
2
  import cleanDeep from 'clean-deep';
3
3
  import { temporaryDirectory } from 'tempy';
4
- import { deployFileNormalizer, getDistPathIfExists, isEdgeFunctionFile } from '../../lib/edge-functions/deploy.mjs';
5
- import { warn } from '../command-helpers.mjs';
6
- import { DEFAULT_CONCURRENT_HASH, DEFAULT_CONCURRENT_UPLOAD, DEFAULT_DEPLOY_TIMEOUT, DEFAULT_MAX_RETRY, DEFAULT_SYNC_LIMIT, } from './constants.mjs';
7
- import { hashConfig } from './hash-config.mjs';
8
- import hashFiles from './hash-files.mjs';
9
- import hashFns from './hash-fns.mjs';
10
- import uploadFiles from './upload-files.mjs';
11
- import { getUploadList, waitForDeploy, waitForDiff } from './util.mjs';
4
+ import { deployFileNormalizer, getDistPathIfExists, isEdgeFunctionFile } from '../../lib/edge-functions/deploy.js';
5
+ import { warn } from '../command-helpers.js';
6
+ import { DEFAULT_CONCURRENT_HASH, DEFAULT_CONCURRENT_UPLOAD, DEFAULT_DEPLOY_TIMEOUT, DEFAULT_MAX_RETRY, DEFAULT_SYNC_LIMIT, } from './constants.js';
7
+ import { hashConfig } from './hash-config.js';
8
+ import hashFiles from './hash-files.js';
9
+ import hashFns from './hash-fns.js';
10
+ import uploadFiles from './upload-files.js';
11
+ import { getUploadList, waitForDeploy, waitForDiff } from './util.js';
12
12
  export const deploySite = async (
13
13
  // @ts-expect-error TS(7006) FIXME: Parameter 'api' implicitly has an 'any' type.
14
14
  api,
@@ -3,7 +3,7 @@ import { promisify } from 'util';
3
3
  import walker from 'folder-walker';
4
4
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'pump... Remove this comment to see the full error message
5
5
  import pumpModule from 'pump';
6
- import { fileFilterCtor, fileNormalizerCtor, hasherCtor, manifestCollectorCtor } from './hasher-segments.mjs';
6
+ import { fileFilterCtor, fileNormalizerCtor, hasherCtor, manifestCollectorCtor } from './hasher-segments.js';
7
7
  const pump = promisify(pumpModule);
8
8
  const hashFiles = async ({ assetType = 'file',
9
9
  // @ts-expect-error TS(7031) FIXME: Binding element 'concurrentHash' implicitly has an... Remove this comment to see the full error message
@@ -6,9 +6,9 @@ import { zipFunctions } from '@netlify/zip-it-and-ship-it';
6
6
  import fromArray from 'from2-array';
7
7
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'pump... Remove this comment to see the full error message
8
8
  import pumpModule from 'pump';
9
- import { getPathInProject } from '../../lib/settings.mjs';
10
- import { INTERNAL_FUNCTIONS_FOLDER } from '../functions/functions.mjs';
11
- import { hasherCtor, manifestCollectorCtor } from './hasher-segments.mjs';
9
+ import { getPathInProject } from '../../lib/settings.js';
10
+ import { INTERNAL_FUNCTIONS_FOLDER } from '../functions/functions.js';
11
+ import { hasherCtor, manifestCollectorCtor } from './hasher-segments.js';
12
12
  const pump = promisify(pumpModule);
13
13
  // Maximum age of functions manifest (2 minutes).
14
14
  const MANIFEST_FILE_TTL = 12e4;
@@ -7,7 +7,7 @@ import transform from 'parallel-transform';
7
7
  import { objCtor as objFilterCtor } from 'through2-filter';
8
8
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'thro... Remove this comment to see the full error message
9
9
  import { obj as map } from 'through2-map';
10
- import { normalizePath } from './util.mjs';
10
+ import { normalizePath } from './util.js';
11
11
  // a parallel transform stream segment ctor that hashes fileObj's created by folder-walker
12
12
  // TODO: use promises instead of callbacks
13
13
  /* eslint-disable promise/prefer-await-to-callbacks */
@@ -2,7 +2,7 @@ import fs from 'fs';
2
2
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'back... Remove this comment to see the full error message
3
3
  import backoff from 'backoff';
4
4
  import pMap from 'p-map';
5
- import { UPLOAD_INITIAL_DELAY, UPLOAD_MAX_DELAY, UPLOAD_RANDOM_FACTOR } from './constants.mjs';
5
+ import { UPLOAD_INITIAL_DELAY, UPLOAD_MAX_DELAY, UPLOAD_RANDOM_FACTOR } from './constants.js';
6
6
  // @ts-expect-error TS(7006) FIXME: Parameter 'api' implicitly has an 'any' type.
7
7
  const uploadFiles = async (api, deployId, uploadList, { concurrentUpload, maxRetry, statusCb }) => {
8
8
  if (!concurrentUpload || !statusCb || !maxRetry)
@@ -1,6 +1,6 @@
1
1
  import { sep } from 'path';
2
2
  import pWaitFor from 'p-wait-for';
3
- import { DEPLOY_POLL } from './constants.mjs';
3
+ import { DEPLOY_POLL } from './constants.js';
4
4
  // normalize windows paths to unix paths
5
5
  // @ts-expect-error TS(7006) FIXME: Parameter 'relname' implicitly has an 'any' type.
6
6
  export const normalizePath = (relname) => {
@@ -3,11 +3,11 @@ import { EOL } from 'os';
3
3
  import { dirname, relative, resolve } from 'path';
4
4
  import { getFramework, getSettings } from '@netlify/build-info';
5
5
  import getPort from 'get-port';
6
- import { detectFrameworkSettings } from './build-info.mjs';
7
- import { NETLIFYDEVWARN, chalk, log } from './command-helpers.mjs';
8
- import { acquirePort } from './dev.mjs';
9
- import { getInternalFunctionsDir } from './functions/functions.mjs';
10
- import { getPluginsToAutoInstall } from './init/utils.mjs';
6
+ import { detectFrameworkSettings } from './build-info.js';
7
+ import { NETLIFYDEVWARN, chalk, log } from './command-helpers.js';
8
+ import { acquirePort } from './dev.js';
9
+ import { getInternalFunctionsDir } from './functions/functions.js';
10
+ import { getPluginsToAutoInstall } from './init/utils.js';
11
11
  /** @param {string} str */
12
12
  // @ts-expect-error TS(7006) FIXME: Parameter 'str' implicitly has an 'any' type.
13
13
  const formatProperty = (str) => chalk.magenta(`'${str}'`);
@@ -49,7 +49,6 @@ const readHttpsSettings = async (options) => {
49
49
  */
50
50
  // @ts-expect-error TS(7006) FIXME: Parameter 'devConfig' implicitly has an 'any' type... Remove this comment to see the full error message
51
51
  function validateProperty(devConfig, property, type) {
52
- // eslint-disable-next-line valid-typeof
53
52
  if (devConfig[property] && typeof devConfig[property] !== type) {
54
53
  const formattedProperty = formatProperty(property);
55
54
  throw new TypeError(`Invalid ${formattedProperty} option provided in config. The value of ${formattedProperty} option must be of type ${type}`);
@@ -236,7 +235,7 @@ const handleForcedFramework = async ({ devConfig, project, workingDir, workspace
236
235
  * Get the server settings based on the flags and the devConfig
237
236
  * @param {import('../commands/dev/types.js').DevConfig} devConfig
238
237
  * @param {import('commander').OptionValues} flags
239
- * @param {import('../commands/base-command.mjs').default} command
238
+ * @param {import('../commands/base-command.js').default} command
240
239
  * @returns {Promise<import('./types.js').ServerSettings>}
241
240
  */
242
241
  // @ts-expect-error TS(7006) FIXME: Parameter 'devConfig' implicitly has an 'any' type... Remove this comment to see the full error message
@@ -1,9 +1,9 @@
1
1
  import process from 'process';
2
2
  import getPort from 'get-port';
3
3
  import isEmpty from 'lodash/isEmpty.js';
4
- import { supportsBackgroundFunctions } from '../lib/account.mjs';
5
- import { NETLIFYDEVLOG, chalk, error, log, warn } from './command-helpers.mjs';
6
- import { loadDotEnvFiles } from './dot-env.mjs';
4
+ import { supportsBackgroundFunctions } from '../lib/account.js';
5
+ import { NETLIFYDEVLOG, chalk, error, log, warn } from './command-helpers.js';
6
+ import { loadDotEnvFiles } from './dot-env.js';
7
7
  // Possible sources of environment variables. For the purpose of printing log messages only. Order does not matter.
8
8
  const ENV_VAR_SOURCES = {
9
9
  account: {
@@ -1,8 +1,8 @@
1
1
  import { readFile } from 'fs/promises';
2
2
  import path from 'path';
3
3
  import dotenv from 'dotenv';
4
- import { isFileAsync } from '../lib/fs.mjs';
5
- import { warn } from './command-helpers.mjs';
4
+ import { isFileAsync } from '../lib/fs.js';
5
+ import { warn } from './command-helpers.js';
6
6
  // @ts-expect-error TS(7031) FIXME: Binding element 'envFiles' implicitly has an 'any'... Remove this comment to see the full error message
7
7
  export const loadDotEnvFiles = async function ({ envFiles, projectDir }) {
8
8
  const response = await tryLoadDotEnvFiles({ projectDir, dotenvFiles: envFiles });
@@ -1,4 +1,4 @@
1
- import { error } from '../command-helpers.mjs';
1
+ import { error } from '../command-helpers.js';
2
2
  export const AVAILABLE_CONTEXTS = ['all', 'production', 'deploy-preview', 'branch-deploy', 'dev'];
3
3
  export const AVAILABLE_SCOPES = ['builds', 'functions', 'runtime', 'post_processing'];
4
4
  /**
@@ -1,8 +1,8 @@
1
1
  import waitPort from 'wait-port';
2
- import { startSpinner, stopSpinner } from '../lib/spinner.mjs';
3
- import { error, exit, log, NETLIFYDEVERR, NETLIFYDEVLOG } from './command-helpers.mjs';
4
- import { runCommand } from './shell.mjs';
5
- import { startStaticServer } from './static-server.mjs';
2
+ import { startSpinner, stopSpinner } from '../lib/spinner.js';
3
+ import { error, exit, log, NETLIFYDEVERR, NETLIFYDEVLOG } from './command-helpers.js';
4
+ import { runCommand } from './shell.js';
5
+ import { startStaticServer } from './static-server.js';
6
6
  // 10 minutes
7
7
  const FRAMEWORK_PORT_TIMEOUT = 6e5;
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  import { promises as fs } from 'fs';
2
2
  import { resolve } from 'path';
3
- import { isDirectoryAsync, isFileAsync } from '../../lib/fs.mjs';
4
- import { getPathInProject } from '../../lib/settings.mjs';
3
+ import { isDirectoryAsync, isFileAsync } from '../../lib/fs.js';
4
+ import { getPathInProject } from '../../lib/settings.js';
5
5
  export const INTERNAL_FUNCTIONS_FOLDER = 'functions-internal';
6
6
  export const SERVE_FUNCTIONS_FOLDER = 'functions-serve';
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  import { listFunctions } from '@netlify/zip-it-and-ship-it';
2
- import { fileExistsAsync } from '../../lib/fs.mjs';
2
+ import { fileExistsAsync } from '../../lib/fs.js';
3
3
  // @ts-expect-error TS(7006) FIXME: Parameter 'functionName' implicitly has an 'any' t... Remove this comment to see the full error message
4
4
  const getUrlPath = (functionName) => `/.netlify/functions/${functionName}`;
5
5
  export const BACKGROUND = '-background';
@@ -0,0 +1,3 @@
1
+ export * from './constants.js';
2
+ export * from './functions.js';
3
+ export * from './get-functions.js';
@@ -2,7 +2,7 @@ import { readFile } from 'fs/promises';
2
2
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'conf... Remove this comment to see the full error message
3
3
  import Configstore from 'configstore';
4
4
  import { v4 as uuidv4 } from 'uuid';
5
- import { getLegacyPathInHome, getPathInHome } from '../lib/settings.mjs';
5
+ import { getLegacyPathInHome, getPathInHome } from '../lib/settings.js';
6
6
  const globalConfigDefaults = {
7
7
  /* disable stats from being sent to Netlify */
8
8
  telemetryDisabled: false,
@@ -6,7 +6,7 @@ import gitRepoInfo from 'git-repo-info';
6
6
  import gitconfiglocal from 'gitconfiglocal';
7
7
  // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'pars... Remove this comment to see the full error message
8
8
  import parseGitRemote from 'parse-github-url';
9
- import { log } from './command-helpers.mjs';
9
+ import { log } from './command-helpers.js';
10
10
  /**
11
11
  *
12
12
  * @param {object} config
@@ -1,4 +1,4 @@
1
- import { error } from './command-helpers.mjs';
1
+ import { error } from './command-helpers.js';
2
2
  // @ts-expect-error TS(7006) FIXME: Parameter 'api' implicitly has an 'any' type.
3
3
  export const getSiteByName = async (api, siteName) => {
4
4
  try {
@@ -4,9 +4,9 @@ import process from 'process';
4
4
  import { Octokit } from '@octokit/rest';
5
5
  import getPort from 'get-port';
6
6
  import inquirer from 'inquirer';
7
- import { log } from './command-helpers.mjs';
8
- import createDeferred from './create-deferred.mjs';
9
- import openBrowser from './open-browser.mjs';
7
+ import { log } from './command-helpers.js';
8
+ import createDeferred from './create-deferred.js';
9
+ import openBrowser from './open-browser.js';
10
10
  const SERVER_PORT = 3000;
11
11
  /**
12
12
  * @typedef Token