netlify-cli 17.10.1 → 17.11.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 (39) hide show
  1. package/npm-shrinkwrap.json +956 -203
  2. package/package.json +2 -3
  3. package/src/commands/base-command.js +47 -102
  4. package/src/commands/deploy/deploy.js +5 -8
  5. package/src/commands/dev/dev.js +0 -1
  6. package/src/commands/functions/functions-create.js +0 -4
  7. package/src/commands/link/link.js +0 -5
  8. package/src/commands/lm/lm-setup.js +0 -2
  9. package/src/commands/main.js +0 -2
  10. package/src/commands/serve/serve.js +3 -1
  11. package/src/commands/sites/sites-create-template.js +0 -3
  12. package/src/lib/blobs/blobs.js +1 -1
  13. package/src/lib/edge-functions/proxy.js +2 -21
  14. package/src/lib/edge-functions/registry.js +42 -10
  15. package/src/lib/exec-fetcher.js +0 -2
  16. package/src/lib/functions/local-proxy.js +1 -3
  17. package/src/lib/functions/netlify-function.js +3 -3
  18. package/src/lib/functions/registry.js +17 -27
  19. package/src/lib/functions/runtimes/go/index.js +0 -3
  20. package/src/lib/functions/runtimes/index.js +0 -34
  21. package/src/lib/functions/runtimes/js/builders/netlify-lambda.js +10 -10
  22. package/src/lib/functions/runtimes/rust/index.js +0 -2
  23. package/src/lib/functions/server.js +23 -13
  24. package/src/utils/banner.js +2 -3
  25. package/src/utils/build-info.js +22 -39
  26. package/src/utils/command-helpers.js +3 -11
  27. package/src/utils/deploy/deploy-site.js +0 -6
  28. package/src/utils/detect-server-settings.js +15 -101
  29. package/src/utils/execa.js +1 -4
  30. package/src/utils/feature-flags.js +1 -7
  31. package/src/utils/framework-server.js +6 -10
  32. package/src/utils/functions/functions.js +2 -9
  33. package/src/utils/init/utils.js +17 -32
  34. package/src/utils/live-tunnel.js +0 -2
  35. package/src/utils/lm/requirements.js +0 -5
  36. package/src/utils/sites/utils.js +0 -1
  37. package/src/utils/telemetry/report-error.js +0 -2
  38. package/src/utils/telemetry/telemetry.js +1 -21
  39. package/src/lib/edge-functions/internal.js +0 -46
@@ -1,46 +0,0 @@
1
- import { readFile, stat } from 'fs/promises';
2
- import { dirname, join, resolve } from 'path';
3
- import { getPathInProject } from '../settings.js';
4
- import { INTERNAL_EDGE_FUNCTIONS_FOLDER } from './consts.js';
5
- /**
6
- * @param {string} workingDir
7
- */
8
- // @ts-expect-error TS(7006) FIXME: Parameter 'workingDir' implicitly has an 'any' typ... Remove this comment to see the full error message
9
- export const getInternalFunctions = async (workingDir) => {
10
- const path = join(workingDir, getPathInProject([INTERNAL_EDGE_FUNCTIONS_FOLDER]));
11
- try {
12
- const stats = await stat(path);
13
- if (!stats.isDirectory()) {
14
- throw new Error('Internal edge functions directory expected');
15
- }
16
- }
17
- catch {
18
- return {
19
- functions: [],
20
- path: null,
21
- };
22
- }
23
- try {
24
- const manifestPath = join(path, 'manifest.json');
25
- // @ts-expect-error TS(2345) FIXME: Argument of type 'Buffer' is not assignable to par... Remove this comment to see the full error message
26
- const manifest = JSON.parse(await readFile(manifestPath));
27
- if (manifest.version !== 1) {
28
- throw new Error('Unsupported manifest format');
29
- }
30
- const data = {
31
- functions: manifest.functions || [],
32
- path,
33
- };
34
- if (manifest.import_map) {
35
- // @ts-expect-error TS(2339) FIXME: Property 'importMap' does not exist on type '{ fun... Remove this comment to see the full error message
36
- data.importMap = resolve(dirname(manifestPath), manifest.import_map);
37
- }
38
- return data;
39
- }
40
- catch {
41
- return {
42
- functions: [],
43
- path,
44
- };
45
- }
46
- };