netlify-cli 17.2.0 → 17.2.2
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/npm-shrinkwrap.json +719 -3031
- package/package.json +4 -4
- package/src/lib/functions/netlify-function.mjs +2 -5
- package/src/utils/run-build.mjs +7 -3
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.2.
|
|
4
|
+
"version": "17.2.2",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"@bugsnag/js": "7.20.2",
|
|
46
46
|
"@fastify/static": "6.10.2",
|
|
47
47
|
"@netlify/blobs": "^4.0.0",
|
|
48
|
-
"@netlify/build": "29.
|
|
49
|
-
"@netlify/build-info": "7.
|
|
48
|
+
"@netlify/build": "29.26.3",
|
|
49
|
+
"@netlify/build-info": "7.11.1",
|
|
50
50
|
"@netlify/config": "20.9.0",
|
|
51
51
|
"@netlify/edge-bundler": "^10.1.0",
|
|
52
52
|
"@netlify/local-functions-proxy": "1.1.1",
|
|
53
|
-
"@netlify/zip-it-and-ship-it": "9.
|
|
53
|
+
"@netlify/zip-it-and-ship-it": "9.26.1",
|
|
54
54
|
"@octokit/rest": "19.0.13",
|
|
55
55
|
"ansi-escapes": "6.2.0",
|
|
56
56
|
"ansi-styles": "6.2.1",
|
|
@@ -184,7 +184,7 @@ export default class NetlifyFunction {
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
// Invokes the function and returns its response object.
|
|
187
|
-
async invoke(event, context = {}) {
|
|
187
|
+
async invoke(event = {}, context = {}) {
|
|
188
188
|
await this.buildQueue
|
|
189
189
|
|
|
190
190
|
if (this.buildError) {
|
|
@@ -200,10 +200,7 @@ export default class NetlifyFunction {
|
|
|
200
200
|
token: this.blobsContext.token,
|
|
201
201
|
})
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
...context?.custom,
|
|
205
|
-
blobs: Buffer.from(payload).toString('base64'),
|
|
206
|
-
}
|
|
203
|
+
event.blobs = Buffer.from(payload).toString('base64')
|
|
207
204
|
}
|
|
208
205
|
|
|
209
206
|
try {
|
package/src/utils/run-build.mjs
CHANGED
|
@@ -110,7 +110,7 @@ export const runNetlifyBuild = async ({ command, env = {}, options, settings, ti
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
// Run Netlify Build using the main entry point.
|
|
113
|
-
const { success } = await buildSite(buildSiteOptions)
|
|
113
|
+
const { netlifyConfig, success } = await buildSite(buildSiteOptions)
|
|
114
114
|
|
|
115
115
|
if (!success) {
|
|
116
116
|
error('Could not start local server due to a build error')
|
|
@@ -120,10 +120,14 @@ export const runNetlifyBuild = async ({ command, env = {}, options, settings, ti
|
|
|
120
120
|
|
|
121
121
|
// Start the dev server, forcing the usage of a static server as opposed to
|
|
122
122
|
// the framework server.
|
|
123
|
-
|
|
123
|
+
const settingsOverrides = {
|
|
124
124
|
command: undefined,
|
|
125
125
|
useStaticServer: true,
|
|
126
|
-
}
|
|
126
|
+
}
|
|
127
|
+
if (!options.dir && netlifyConfig?.build?.publish) {
|
|
128
|
+
settingsOverrides.dist = netlifyConfig.build.publish
|
|
129
|
+
}
|
|
130
|
+
await devCommand(settingsOverrides)
|
|
127
131
|
|
|
128
132
|
return { configPath: tempConfigPath }
|
|
129
133
|
}
|