netlify-cli 17.5.1 → 17.5.3

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "17.5.1",
4
+ "version": "17.5.3",
5
5
  "author": "Netlify Inc.",
6
6
  "type": "module",
7
7
  "engines": {
@@ -47,12 +47,12 @@
47
47
  "@bugsnag/js": "7.20.2",
48
48
  "@fastify/static": "6.10.2",
49
49
  "@netlify/blobs": "6.3.0",
50
- "@netlify/build": "29.26.6",
50
+ "@netlify/build": "29.27.0",
51
51
  "@netlify/build-info": "7.11.1",
52
52
  "@netlify/config": "20.10.0",
53
- "@netlify/edge-bundler": "10.1.2",
53
+ "@netlify/edge-bundler": "10.1.3",
54
54
  "@netlify/local-functions-proxy": "1.1.1",
55
- "@netlify/zip-it-and-ship-it": "9.26.1",
55
+ "@netlify/zip-it-and-ship-it": "9.26.2",
56
56
  "@octokit/rest": "19.0.13",
57
57
  "ansi-escapes": "6.2.0",
58
58
  "ansi-styles": "6.2.1",
@@ -153,7 +153,7 @@
153
153
  "uuid": "9.0.0",
154
154
  "wait-port": "1.0.4",
155
155
  "write-file-atomic": "5.0.1",
156
- "ws": "^8.14.2",
156
+ "ws": "8.14.2",
157
157
  "zod": "3.22.4"
158
158
  }
159
159
  }
@@ -42,12 +42,12 @@ export const createCompletionCommand = (program) => {
42
42
  name: command.parent.name(),
43
43
  });
44
44
  });
45
- return program
45
+ return (program
46
46
  .command('completion')
47
47
  .description('Generate shell completion script\nRun this command to see instructions for your shell.')
48
48
  .addExamples(['netlify completion:install'])
49
49
  // @ts-expect-error TS(7006) FIXME: Parameter 'options' implicitly has an 'any' type.
50
50
  .action((options, command) => {
51
51
  command.help();
52
- });
52
+ }));
53
53
  };
@@ -203,7 +203,7 @@ const dev = async (options, command) => {
203
203
  // @ts-expect-error TS(7006) FIXME: Parameter 'program' implicitly has an 'any' type.
204
204
  export const createDevCommand = (program) => {
205
205
  createDevExecCommand(program);
206
- return program
206
+ return (program
207
207
  .command('dev')
208
208
  .alias('develop')
209
209
  .description(`Local dev server\nThe dev command will run a local dev server with Netlify's proxy and redirect rules`)
@@ -259,5 +259,5 @@ export const createDevCommand = (program) => {
259
259
  'netlify dev --edge-inspect-brk=127.0.0.1:9229',
260
260
  'BROWSER=none netlify dev # disable browser auto opening',
261
261
  ])
262
- .action(dev);
262
+ .action(dev));
263
263
  };
@@ -74,7 +74,7 @@ const filterRegistry = function (registry, input) {
74
74
  // eslint-disable-next-line unicorn/no-array-method-this-argument
75
75
  const filteredTemplates = fuzzy.filter(input, temp);
76
76
  const filteredTemplateNames = new Set(filteredTemplates.map((filteredTemplate) => (input ? filteredTemplate.string : filteredTemplate)));
77
- return registry
77
+ return (registry
78
78
  // @ts-expect-error TS(7006) FIXME: Parameter 't' implicitly has an 'any' type.
79
79
  .filter((t) => filteredTemplateNames.has(t.name + t.description))
80
80
  // @ts-expect-error TS(7006) FIXME: Parameter 't' implicitly has an 'any' type.
@@ -84,7 +84,7 @@ const filterRegistry = function (registry, input) {
84
84
  const { score } = filteredTemplates.find((filteredTemplate) => filteredTemplate.string === t.name + t.description);
85
85
  t.score = score;
86
86
  return t;
87
- });
87
+ }));
88
88
  };
89
89
  /**
90
90
  * @param {string} lang
@@ -154,8 +154,8 @@ const pickTemplate = async function ({ language: languageFromFlag }, funcType) {
154
154
  let language = languageFromFlag;
155
155
  if (language === undefined) {
156
156
  const langs = funcType === 'edge'
157
- // @ts-expect-error TS(2339) FIXME: Property 'value' does not exist on type 'false | {... Remove this comment to see the full error message
158
- ? languages.filter((lang) => lang.value === 'javascript' || lang.value === 'typescript')
157
+ ? // @ts-expect-error TS(2339) FIXME: Property 'value' does not exist on type 'false | {... Remove this comment to see the full error message
158
+ languages.filter((lang) => lang.value === 'javascript' || lang.value === 'typescript')
159
159
  : languages.filter(Boolean);
160
160
  const { language: languageFromPrompt } = await inquirer.prompt({
161
161
  // @ts-expect-error
@@ -1,5 +1,6 @@
1
1
  import process from 'process';
2
2
  import { Option } from 'commander';
3
+ import { getBlobsContext } from '../../lib/blobs/blobs.mjs';
3
4
  import { promptEditorHelper } from '../../lib/edge-functions/editor-helper.mjs';
4
5
  import { startFunctionsServer } from '../../lib/functions/server.mjs';
5
6
  import { printBanner } from '../../utils/banner.mjs';
@@ -52,7 +53,7 @@ const serve = async (options, command) => {
52
53
  // server and registry are initialized, and any functions created by
53
54
  // Netlify Build are loaded.
54
55
  await getInternalFunctionsDir({ base: site.root, ensureExists: true });
55
- let settings = /** @type {import('../../utils/types.js').ServerSettings} */ ({});
56
+ let settings;
56
57
  try {
57
58
  settings = await detectServerSettings(devConfig, options, command);
58
59
  cachedConfig.config = getConfigWithPlugins(cachedConfig.config, settings);
@@ -60,7 +61,7 @@ const serve = async (options, command) => {
60
61
  catch (error_) {
61
62
  // @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
62
63
  log(NETLIFYDEVERR, error_.message);
63
- exit(1);
64
+ return exit(1);
64
65
  }
65
66
  command.setAnalyticsPayload({ live: options.live });
66
67
  log(`${NETLIFYDEVLOG} Building site for production`);
@@ -70,8 +71,14 @@ const serve = async (options, command) => {
70
71
  settings,
71
72
  options,
72
73
  });
74
+ const blobsContext = await getBlobsContext({
75
+ debug: options.debug,
76
+ projectRoot: command.workingDir,
77
+ siteID: site.id ?? 'unknown-site-id',
78
+ });
73
79
  const functionsRegistry = await startFunctionsServer({
74
80
  api,
81
+ blobsContext,
75
82
  command,
76
83
  config,
77
84
  debug: options.debug,
@@ -15,7 +15,7 @@ import { getSiteNameInput } from './sites-create.mjs';
15
15
  // @ts-expect-error TS(7006) FIXME: Parameter 'token' implicitly has an 'any' type.
16
16
  export const fetchTemplates = async (token) => {
17
17
  const templatesFromGithubOrg = await getTemplatesFromGitHub(token);
18
- return templatesFromGithubOrg
18
+ return (templatesFromGithubOrg
19
19
  // @ts-expect-error TS(7006) FIXME: Parameter 'repo' implicitly has an 'any' type.
20
20
  .filter((repo) => !repo.archived && !repo.disabled)
21
21
  // @ts-expect-error TS(7006) FIXME: Parameter 'template' implicitly has an 'any' type.
@@ -23,7 +23,7 @@ export const fetchTemplates = async (token) => {
23
23
  name: template.name,
24
24
  sourceCodeUrl: template.html_url,
25
25
  slug: template.full_name,
26
- }));
26
+ })));
27
27
  };
28
28
  // @ts-expect-error TS(7031) FIXME: Binding element 'ghToken' implicitly has an 'any' ... Remove this comment to see the full error message
29
29
  const getTemplateName = async ({ ghToken, options, repository }) => {