netlify-cli 10.17.2 → 10.17.5

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.
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "10.17.2",
3
+ "version": "10.17.5",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "netlify-cli",
9
- "version": "10.17.2",
9
+ "version": "10.17.5",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@netlify/build": "^27.11.3",
14
- "@netlify/config": "^18.1.3",
13
+ "@netlify/build": "^27.11.4",
14
+ "@netlify/config": "^18.1.4",
15
15
  "@netlify/edge-bundler": "^1.12.1",
16
16
  "@netlify/framework-info": "^9.2.0",
17
17
  "@netlify/local-functions-proxy": "^1.1.1",
18
- "@netlify/plugins-list": "^6.38.0",
18
+ "@netlify/plugins-list": "^6.39.0",
19
19
  "@netlify/zip-it-and-ship-it": "^5.13.4",
20
20
  "@octokit/rest": "^18.0.0",
21
21
  "@sindresorhus/slugify": "^1.1.0",
@@ -81,7 +81,7 @@
81
81
  "multiparty": "^4.2.1",
82
82
  "netlify": "^12.0.0",
83
83
  "netlify-headers-parser": "^6.0.2",
84
- "netlify-onegraph-internal": "0.8.4",
84
+ "netlify-onegraph-internal": "0.8.6",
85
85
  "netlify-redirect-parser": "^13.0.5",
86
86
  "netlify-redirector": "^0.2.1",
87
87
  "node-fetch": "^2.6.0",
@@ -1189,13 +1189,13 @@
1189
1189
  "integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
1190
1190
  },
1191
1191
  "node_modules/@netlify/build": {
1192
- "version": "27.11.3",
1193
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-27.11.3.tgz",
1194
- "integrity": "sha512-BLMhPSYEkM2YI//KzOH9J9zC6fmss1EHcSWirtdYe6o7Hv8nx2erCqTgLgo887JcZcKaN7HsWbJdyW+jbug5hg==",
1192
+ "version": "27.11.4",
1193
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-27.11.4.tgz",
1194
+ "integrity": "sha512-zUbvdN21VGQwg/jVmdpk0qgysUUtBf25hCBxrATt55g3EJVE0ygEm/wX2HV9JjO8OqpydmaaaDdRNmD29aNMAw==",
1195
1195
  "dependencies": {
1196
1196
  "@bugsnag/js": "^7.0.0",
1197
1197
  "@netlify/cache-utils": "^4.0.0",
1198
- "@netlify/config": "^18.1.3",
1198
+ "@netlify/config": "^18.1.4",
1199
1199
  "@netlify/edge-bundler": "^1.12.1",
1200
1200
  "@netlify/functions-utils": "^4.2.3",
1201
1201
  "@netlify/git-utils": "^4.0.0",
@@ -2011,9 +2011,9 @@
2011
2011
  }
2012
2012
  },
2013
2013
  "node_modules/@netlify/config": {
2014
- "version": "18.1.3",
2015
- "resolved": "https://registry.npmjs.org/@netlify/config/-/config-18.1.3.tgz",
2016
- "integrity": "sha512-StYyw6pAUHMHcnwfPJZrSjz2H2gmpmRtc7hwBCvNzkV9NAcAO7V60cT3oXE7LrITlr5zJaHQLMvUDmvqADJFfA==",
2014
+ "version": "18.1.4",
2015
+ "resolved": "https://registry.npmjs.org/@netlify/config/-/config-18.1.4.tgz",
2016
+ "integrity": "sha512-tM8qDVwBMTYB0n7R6EA6BtuVw9Iq6lNrqE8RjAY4eZ9cjbZkow4M2e0XhmYaNRderLhjYrDlqQr/ttUQA1tZRw==",
2017
2017
  "dependencies": {
2018
2018
  "chalk": "^5.0.0",
2019
2019
  "cron-parser": "^4.1.0",
@@ -3592,9 +3592,9 @@
3592
3592
  "integrity": "sha512-ni6R1xdR8EtH0iB8ixGt9ocuboW+Q8eN4ilTX8lfNHS6Y6Q2S+O/aB2n1BnAgv39wopeQsQ2meL9vfEePURl7w=="
3593
3593
  },
3594
3594
  "node_modules/@netlify/plugins-list": {
3595
- "version": "6.38.0",
3596
- "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.38.0.tgz",
3597
- "integrity": "sha512-fa6BfTCFF3gU2ygS4i175P2Zez8FKXgxKWtjdJPm8eh4UhJ0flIHdooTLZWTpBDL5YiDizk2cviPvOL8fQS93w==",
3595
+ "version": "6.39.0",
3596
+ "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.39.0.tgz",
3597
+ "integrity": "sha512-f8sMN7XFlQQ63km5vhg5y5+E3DXoWEoAe94YOMGlmzifZCCzPS/bEUVaQ07n+iDspy3dOIN97FHAAu0B2Jpe2Q==",
3598
3598
  "engines": {
3599
3599
  "node": "^12.20.0 || ^14.14.0 || >=16.0.0"
3600
3600
  }
@@ -15996,9 +15996,9 @@
15996
15996
  }
15997
15997
  },
15998
15998
  "node_modules/netlify-onegraph-internal": {
15999
- "version": "0.8.4",
16000
- "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.4.tgz",
16001
- "integrity": "sha512-2/yTjAY4qkoKK2aJhR/IX9+V9R7O4RggypAFR7tFBK67uaXDOY1TkImRnTB/9L8yDueyuLlkm0WmNbg/Vq0DfQ==",
15999
+ "version": "0.8.6",
16000
+ "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.6.tgz",
16001
+ "integrity": "sha512-B8xP8eonSNDe9ytJwQVND0eJYDd2JDwedwknJqtiANe11Hw4DHlw/eWZ7CdaTLiRXjD0WbMlW088NZrUZY2rtw==",
16002
16002
  "dependencies": {
16003
16003
  "graphql": "16.5.0",
16004
16004
  "node-fetch": "^2.6.0",
@@ -23384,13 +23384,13 @@
23384
23384
  "integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
23385
23385
  },
23386
23386
  "@netlify/build": {
23387
- "version": "27.11.3",
23388
- "resolved": "https://registry.npmjs.org/@netlify/build/-/build-27.11.3.tgz",
23389
- "integrity": "sha512-BLMhPSYEkM2YI//KzOH9J9zC6fmss1EHcSWirtdYe6o7Hv8nx2erCqTgLgo887JcZcKaN7HsWbJdyW+jbug5hg==",
23387
+ "version": "27.11.4",
23388
+ "resolved": "https://registry.npmjs.org/@netlify/build/-/build-27.11.4.tgz",
23389
+ "integrity": "sha512-zUbvdN21VGQwg/jVmdpk0qgysUUtBf25hCBxrATt55g3EJVE0ygEm/wX2HV9JjO8OqpydmaaaDdRNmD29aNMAw==",
23390
23390
  "requires": {
23391
23391
  "@bugsnag/js": "^7.0.0",
23392
23392
  "@netlify/cache-utils": "^4.0.0",
23393
- "@netlify/config": "^18.1.3",
23393
+ "@netlify/config": "^18.1.4",
23394
23394
  "@netlify/edge-bundler": "^1.12.1",
23395
23395
  "@netlify/functions-utils": "^4.2.3",
23396
23396
  "@netlify/git-utils": "^4.0.0",
@@ -23895,9 +23895,9 @@
23895
23895
  }
23896
23896
  },
23897
23897
  "@netlify/config": {
23898
- "version": "18.1.3",
23899
- "resolved": "https://registry.npmjs.org/@netlify/config/-/config-18.1.3.tgz",
23900
- "integrity": "sha512-StYyw6pAUHMHcnwfPJZrSjz2H2gmpmRtc7hwBCvNzkV9NAcAO7V60cT3oXE7LrITlr5zJaHQLMvUDmvqADJFfA==",
23898
+ "version": "18.1.4",
23899
+ "resolved": "https://registry.npmjs.org/@netlify/config/-/config-18.1.4.tgz",
23900
+ "integrity": "sha512-tM8qDVwBMTYB0n7R6EA6BtuVw9Iq6lNrqE8RjAY4eZ9cjbZkow4M2e0XhmYaNRderLhjYrDlqQr/ttUQA1tZRw==",
23901
23901
  "requires": {
23902
23902
  "chalk": "^5.0.0",
23903
23903
  "cron-parser": "^4.1.0",
@@ -24775,9 +24775,9 @@
24775
24775
  "integrity": "sha512-ni6R1xdR8EtH0iB8ixGt9ocuboW+Q8eN4ilTX8lfNHS6Y6Q2S+O/aB2n1BnAgv39wopeQsQ2meL9vfEePURl7w=="
24776
24776
  },
24777
24777
  "@netlify/plugins-list": {
24778
- "version": "6.38.0",
24779
- "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.38.0.tgz",
24780
- "integrity": "sha512-fa6BfTCFF3gU2ygS4i175P2Zez8FKXgxKWtjdJPm8eh4UhJ0flIHdooTLZWTpBDL5YiDizk2cviPvOL8fQS93w=="
24778
+ "version": "6.39.0",
24779
+ "resolved": "https://registry.npmjs.org/@netlify/plugins-list/-/plugins-list-6.39.0.tgz",
24780
+ "integrity": "sha512-f8sMN7XFlQQ63km5vhg5y5+E3DXoWEoAe94YOMGlmzifZCCzPS/bEUVaQ07n+iDspy3dOIN97FHAAu0B2Jpe2Q=="
24781
24781
  },
24782
24782
  "@netlify/run-utils": {
24783
24783
  "version": "4.0.1",
@@ -34229,9 +34229,9 @@
34229
34229
  }
34230
34230
  },
34231
34231
  "netlify-onegraph-internal": {
34232
- "version": "0.8.4",
34233
- "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.4.tgz",
34234
- "integrity": "sha512-2/yTjAY4qkoKK2aJhR/IX9+V9R7O4RggypAFR7tFBK67uaXDOY1TkImRnTB/9L8yDueyuLlkm0WmNbg/Vq0DfQ==",
34232
+ "version": "0.8.6",
34233
+ "resolved": "https://registry.npmjs.org/netlify-onegraph-internal/-/netlify-onegraph-internal-0.8.6.tgz",
34234
+ "integrity": "sha512-B8xP8eonSNDe9ytJwQVND0eJYDd2JDwedwknJqtiANe11Hw4DHlw/eWZ7CdaTLiRXjD0WbMlW088NZrUZY2rtw==",
34235
34235
  "requires": {
34236
34236
  "graphql": "16.5.0",
34237
34237
  "node-fetch": "^2.6.0",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "10.17.2",
4
+ "version": "10.17.5",
5
5
  "author": "Netlify Inc.",
6
6
  "contributors": [
7
7
  "@whitep4nth3r (https://twitter.com/whitep4nth3r)",
@@ -81,6 +81,7 @@
81
81
  "Liran Tal <liran.tal@gmail.com> (https://twitter.com/liran_tal)",
82
82
  "Louis DeScioli (https://twitter.com/descioli)",
83
83
  "Lukas Holzer <lukas.holzer@netlify.com> (https://twitter.com/luka5c0m)",
84
+ "Lxxyx <Lxxyxzj@gmail.com> (https://twitter.com/Lxxyx_)",
84
85
  "Marc Littlemore (https://twitter.com/marclittlemore)",
85
86
  "Marcus Weiner",
86
87
  "Mark Bello <mark@markbello.dev> (https://markbello.dev)",
@@ -221,12 +222,12 @@
221
222
  "prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,yml,json,html}\" \"*.{mjs,cjs,js,yml,json,html}\" \".*.{mjs,cjs,js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\" \"!**/*/package-lock.json\" \"!.github/**/*.md\""
222
223
  },
223
224
  "dependencies": {
224
- "@netlify/build": "^27.11.3",
225
- "@netlify/config": "^18.1.3",
225
+ "@netlify/build": "^27.11.4",
226
+ "@netlify/config": "^18.1.4",
226
227
  "@netlify/edge-bundler": "^1.12.1",
227
228
  "@netlify/framework-info": "^9.2.0",
228
229
  "@netlify/local-functions-proxy": "^1.1.1",
229
- "@netlify/plugins-list": "^6.38.0",
230
+ "@netlify/plugins-list": "^6.39.0",
230
231
  "@netlify/zip-it-and-ship-it": "^5.13.4",
231
232
  "@octokit/rest": "^18.0.0",
232
233
  "@sindresorhus/slugify": "^1.1.0",
@@ -292,7 +293,7 @@
292
293
  "multiparty": "^4.2.1",
293
294
  "netlify": "^12.0.0",
294
295
  "netlify-headers-parser": "^6.0.2",
295
- "netlify-onegraph-internal": "0.8.4",
296
+ "netlify-onegraph-internal": "0.8.6",
296
297
  "netlify-redirect-parser": "^13.0.5",
297
298
  "netlify-redirector": "^0.2.1",
298
299
  "node-fetch": "^2.6.0",
@@ -1,6 +1,5 @@
1
1
  // @ts-check
2
2
  const gitRepoInfo = require('git-repo-info')
3
- const { OneGraphClient } = require('netlify-onegraph-internal')
4
3
 
5
4
  const { OneGraphCliClient, ensureCLISession, upsertMergeCLISessionMetadata } = require('../../lib/one-graph/cli-client')
6
5
  const {
@@ -40,6 +39,7 @@ const graphEdit = async (options, command) => {
40
39
  }
41
40
 
42
41
  const netlifyToken = await command.authenticate()
42
+ const { jwt } = await OneGraphCliClient.getGraphJwtForSite({ siteId, nfToken: netlifyToken })
43
43
 
44
44
  await ensureAppForSite(netlifyToken, siteId)
45
45
 
@@ -62,8 +62,7 @@ const graphEdit = async (options, command) => {
62
62
  tags: ['netlify-cli', `session:${oneGraphSessionId}`, `git-branch:${branch}`],
63
63
  },
64
64
  {
65
- accessToken: netlifyToken,
66
-
65
+ accessToken: jwt,
67
66
  siteId,
68
67
  },
69
68
  )
@@ -76,7 +75,6 @@ const graphEdit = async (options, command) => {
76
75
 
77
76
  const newMetadata = { docId: persistedDoc.id }
78
77
 
79
- const { jwt } = await OneGraphClient.getGraphJwtForSite({ siteId, nfToken: netlifyToken })
80
78
  await upsertMergeCLISessionMetadata({
81
79
  config,
82
80
  jwt,
@@ -36,6 +36,8 @@ const graphHandler = async (args, options, command) => {
36
36
  const userOperationName = args.operationName
37
37
  const userCodegenId = options.codegen
38
38
 
39
+ const handlerOptions = options.data ? JSON.parse(options.data) : {}
40
+
39
41
  let operationName = userOperationName
40
42
  if (!operationName) {
41
43
  operationName = await autocompleteOperationNames({ netlifyGraphConfig })
@@ -70,7 +72,7 @@ const graphHandler = async (args, options, command) => {
70
72
  netlifyGraphConfig,
71
73
  schema,
72
74
  operationName,
73
- handlerOptions: {},
75
+ handlerOptions,
74
76
  })
75
77
  } else {
76
78
  error(`Failed to parse Netlify GraphQL schema`)
@@ -87,6 +89,7 @@ const createGraphHandlerCommand = (program) =>
87
89
  .command('graph:handler')
88
90
  .argument('[name]', 'Operation name')
89
91
  .option('-c, --codegen <id>', 'The id of the specific code generator to use')
92
+ .option("-d, --data '<json>'", 'Optional data to pass along to the code generator')
90
93
  .description(
91
94
  'Generate a handler for a Graph operation given its name. See `graph:operations` for a list of operations.',
92
95
  )
@@ -1,6 +1,7 @@
1
1
  // @ts-check
2
2
 
3
3
  const slugify = require('@sindresorhus/slugify')
4
+ const { InvalidArgumentError } = require('commander')
4
5
  const inquirer = require('inquirer')
5
6
  const pick = require('lodash/pick')
6
7
  const sample = require('lodash/sample')
@@ -84,7 +85,6 @@ const sitesCreate = async (options, command) => {
84
85
  accountSlug = accountSlugInput
85
86
  }
86
87
 
87
- const { name: nameFlag } = options
88
88
  let user
89
89
  let site
90
90
 
@@ -110,7 +110,7 @@ const sitesCreate = async (options, command) => {
110
110
  }
111
111
  }
112
112
  }
113
- await inputSiteName(nameFlag)
113
+ await inputSiteName(options.name)
114
114
 
115
115
  log()
116
116
  log(chalk.greenBright.bold.underline(`Site Created`))
@@ -175,6 +175,16 @@ const sitesCreate = async (options, command) => {
175
175
  return site
176
176
  }
177
177
 
178
+ const MAX_SITE_NAME_LENGTH = 63
179
+ const validateName = function (value) {
180
+ // netlify sites:create --name <A string of more than 63 words>
181
+ if (typeof value === 'string' && value.length > MAX_SITE_NAME_LENGTH) {
182
+ throw new InvalidArgumentError(`--name should be less than 64 characters, input length: ${value.length}`)
183
+ }
184
+
185
+ return value
186
+ }
187
+
178
188
  /**
179
189
  * Creates the `netlify sites:create` command
180
190
  * @param {import('../base-command').BaseCommand} program
@@ -187,8 +197,8 @@ const createSitesCreateCommand = (program) =>
187
197
  `Create an empty site (advanced)
188
198
  Create a blank site that isn't associated with any git remote. Will link the site to the current working directory.`,
189
199
  )
190
- .option('-n, --name [name]', 'name of site')
191
- .option('-a, --account-slug [slug]', 'account slug to create the site under')
200
+ .option('-n, --name <name>', 'name of site', validateName)
201
+ .option('-a, --account-slug <slug>', 'account slug to create the site under')
192
202
  .option('-c, --with-ci', 'initialize CI hooks during site creation')
193
203
  .option('-m, --manual', 'force manual CI setup. Used --with-ci flag')
194
204
  .option('--disable-linking', 'create the site without linking it to current directory')
@@ -15,6 +15,6 @@
15
15
  "author": "Netlify",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@netlify/functions": "^1.0.0"
18
+ "@netlify/functions": "^1.1.0"
19
19
  }
20
20
  }
@@ -9,15 +9,15 @@
9
9
  "version": "1.0.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@netlify/functions": "^1.0.0",
12
+ "@netlify/functions": "^1.1.0",
13
13
  "@types/node": "^14.0.0",
14
14
  "typescript": "^4.0.0"
15
15
  }
16
16
  },
17
17
  "node_modules/@netlify/functions": {
18
- "version": "1.0.0",
19
- "resolved": "https://registry.npmjs.org/@netlify/functions/-/functions-1.0.0.tgz",
20
- "integrity": "sha512-7fnJv3vr8uyyyOYPChwoec6MjzsCw1CoRUO2DhQ1BD6bOyJRlD4DUaOOGlMILB2LCT8P24p5LexEGx8AJb7xdA==",
18
+ "version": "1.1.0",
19
+ "resolved": "https://registry.npmjs.org/@netlify/functions/-/functions-1.1.0.tgz",
20
+ "integrity": "sha512-XUFC5nt4iLMrDK+6WjYrDOW9h6XGIQlEk3o++xglFbDKc6dsP+k6rjfz3vl0w8S9Oiosxj3uLaPW18szJc1UgA==",
21
21
  "dependencies": {
22
22
  "is-promise": "^4.0.0"
23
23
  },
@@ -50,9 +50,9 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@netlify/functions": {
53
- "version": "1.0.0",
54
- "resolved": "https://registry.npmjs.org/@netlify/functions/-/functions-1.0.0.tgz",
55
- "integrity": "sha512-7fnJv3vr8uyyyOYPChwoec6MjzsCw1CoRUO2DhQ1BD6bOyJRlD4DUaOOGlMILB2LCT8P24p5LexEGx8AJb7xdA==",
53
+ "version": "1.1.0",
54
+ "resolved": "https://registry.npmjs.org/@netlify/functions/-/functions-1.1.0.tgz",
55
+ "integrity": "sha512-XUFC5nt4iLMrDK+6WjYrDOW9h6XGIQlEk3o++xglFbDKc6dsP+k6rjfz3vl0w8S9Oiosxj3uLaPW18szJc1UgA==",
56
56
  "requires": {
57
57
  "is-promise": "^4.0.0"
58
58
  }
@@ -14,7 +14,7 @@
14
14
  "author": "Netlify",
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
- "@netlify/functions": "^1.0.0",
17
+ "@netlify/functions": "^1.1.0",
18
18
  "@types/node": "^14.0.0",
19
19
  "typescript": "^4.0.0"
20
20
  }
@@ -15,7 +15,7 @@
15
15
  "author": "Netlify",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@netlify/functions": "^1.0.0",
18
+ "@netlify/functions": "^1.1.0",
19
19
  "@types/node": "^14.18.9",
20
20
  "typescript": "^4.5.5"
21
21
  }
@@ -685,13 +685,19 @@ const generateHandlerByOperationName = ({
685
685
  }
686
686
 
687
687
  const parsedDoc = parse(currentOperationsDoc)
688
- const { functions } = extractFunctionsFromOperationDoc(GraphQL, parsedDoc)
688
+ const { fragments, functions } = extractFunctionsFromOperationDoc(GraphQL, parsedDoc)
689
689
 
690
- const operation = Object.values(functions).find(
691
- (potentialOperation) => potentialOperation.operationName === operationName,
690
+ const functionDefinition = Object.values(functions).find(
691
+ (potentialDefinition) => potentialDefinition.operationName === operationName,
692
692
  )
693
693
 
694
- if (!operation) {
694
+ const fragmentDefinition = Object.values(fragments).find(
695
+ (potentialDefinition) => potentialDefinition.fragmentName === operationName,
696
+ )
697
+
698
+ const definition = functionDefinition || fragmentDefinition
699
+
700
+ if (!definition) {
695
701
  warn(`No operation named ${operationName} was found in the operations doc`)
696
702
  return
697
703
  }
@@ -701,7 +707,7 @@ const generateHandlerByOperationName = ({
701
707
  generate,
702
708
  netlifyGraphConfig,
703
709
  schema,
704
- operationId: operation.id,
710
+ operationId: definition.id,
705
711
  handlerOptions,
706
712
  })
707
713
  }
@@ -201,10 +201,9 @@ const serveRedirect = async function ({ match, options, proxy, req, res }) {
201
201
  // construct destination URL from redirect rule match
202
202
  const dest = new URL(match.to, `${reqUrl.protocol}//${reqUrl.host}`)
203
203
 
204
- // We pass through request params in one of the following cases:
205
- // 1. The redirect rule doesn't have any query params
206
- // 2. This is a function redirect https://github.com/netlify/cli/issues/1605
207
- if ([...dest.searchParams].length === 0 || isFunction(options.functionsPort, stripOrigin(dest))) {
204
+ // We pass through request params if the redirect rule
205
+ // doesn't have any query params
206
+ if ([...dest.searchParams].length === 0) {
208
207
  dest.searchParams.forEach((_, key) => {
209
208
  dest.searchParams.delete(key)
210
209
  })