netlify-cli 12.6.0 → 12.7.1
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/README.md +5 -0
- package/npm-shrinkwrap.json +14638 -29919
- package/package.json +6 -4
- package/src/commands/base-command.mjs +16 -5
- package/src/commands/dev/dev.mjs +27 -524
- package/src/commands/functions/functions-serve.mjs +5 -1
- package/src/commands/main.mjs +2 -0
- package/src/commands/serve/serve.mjs +189 -0
- package/src/functions-templates/javascript/oauth-passport/package.json +1 -1
- package/src/lib/edge-functions/registry.mjs +2 -5
- package/src/lib/functions/registry.mjs +55 -33
- package/src/lib/functions/runtimes/js/builders/zisi.mjs +2 -1
- package/src/lib/functions/runtimes/rust/index.mjs +2 -1
- package/src/lib/functions/server.mjs +35 -18
- package/src/utils/banner.mjs +17 -0
- package/src/utils/detect-server-settings.mjs +35 -1
- package/src/utils/dev.mjs +8 -5
- package/src/utils/framework-server.mjs +66 -0
- package/src/utils/functions/functions.mjs +18 -2
- package/src/utils/graph.mjs +170 -0
- package/src/utils/proxy-server.mjs +90 -0
- package/src/utils/run-build.mjs +129 -0
- package/src/utils/shell.mjs +120 -0
- package/src/utils/static-server.mjs +34 -0
- package/src/utils/validation.mjs +15 -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": "12.
|
|
4
|
+
"version": "12.7.1",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/netlify/cli/issues"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
|
-
"prepare": "husky install node_modules/@netlify/eslint-config-node/.husky/",
|
|
41
|
+
"prepare": "is-ci || husky install node_modules/@netlify/eslint-config-node/.husky/",
|
|
42
42
|
"start": "node ./bin/run.mjs",
|
|
43
43
|
"test": "run-s format test:dev",
|
|
44
44
|
"format": "run-s format:check-fix:*",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"config": {
|
|
74
74
|
"eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{src,scripts,site,tests,.github}/**/*.{mjs,cjs,js,md,html}\" \"*.{mjs,cjs,js,md,html}\" \".*.{mjs,cjs,js,md,html}\"",
|
|
75
|
-
"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\" \"
|
|
75
|
+
"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\" \"!**/*/package-lock.json\" \"!.github/**/*.md\""
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@fastify/static": "^6.6.0",
|
|
@@ -111,6 +111,7 @@
|
|
|
111
111
|
"execa": "^5.0.0",
|
|
112
112
|
"express": "^4.17.1",
|
|
113
113
|
"express-logging": "^1.1.1",
|
|
114
|
+
"extract-zip": "^2.0.1",
|
|
114
115
|
"fastify": "^4.10.2",
|
|
115
116
|
"find-up": "^5.0.0",
|
|
116
117
|
"flush-write-stream": "^2.0.0",
|
|
@@ -132,7 +133,7 @@
|
|
|
132
133
|
"is-plain-obj": "^3.0.0",
|
|
133
134
|
"is-wsl": "^2.2.0",
|
|
134
135
|
"isexe": "^2.0.0",
|
|
135
|
-
"jsonwebtoken": "^
|
|
136
|
+
"jsonwebtoken": "^9.0.0",
|
|
136
137
|
"jwt-decode": "^3.0.0",
|
|
137
138
|
"lambda-local": "^2.0.1",
|
|
138
139
|
"listr": "^0.14.3",
|
|
@@ -192,6 +193,7 @@
|
|
|
192
193
|
"graphviz": "^0.0.9",
|
|
193
194
|
"husky": "^8.0.0",
|
|
194
195
|
"ini": "^2.0.0",
|
|
196
|
+
"is-ci": "^3.0.1",
|
|
195
197
|
"mock-fs": "^5.1.2",
|
|
196
198
|
"nock": "^13.2.4",
|
|
197
199
|
"p-timeout": "^4.0.0",
|
|
@@ -469,11 +469,7 @@ export default class BaseCommand extends Command {
|
|
|
469
469
|
return await resolveConfig({
|
|
470
470
|
config: options.config,
|
|
471
471
|
cwd,
|
|
472
|
-
context:
|
|
473
|
-
options.context ||
|
|
474
|
-
process.env.CONTEXT ||
|
|
475
|
-
// Dev commands have a default context of `dev`, otherwise we let netlify/config handle default behavior
|
|
476
|
-
(['dev', 'dev:exec'].includes(this.name()) ? 'dev' : undefined),
|
|
472
|
+
context: options.context || process.env.CONTEXT || this.getDefaultContext(),
|
|
477
473
|
debug: this.opts().debug,
|
|
478
474
|
siteId: options.siteId || (typeof options.site === 'string' && options.site) || state.get('siteId'),
|
|
479
475
|
token,
|
|
@@ -505,4 +501,19 @@ export default class BaseCommand extends Command {
|
|
|
505
501
|
exit(1)
|
|
506
502
|
}
|
|
507
503
|
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Returns the context that should be used in case one hasn't been explicitly
|
|
507
|
+
* set. The default context is `dev` most of the time, but some commands may
|
|
508
|
+
* wish to override that.
|
|
509
|
+
*
|
|
510
|
+
* @returns {string}
|
|
511
|
+
*/
|
|
512
|
+
getDefaultContext() {
|
|
513
|
+
if (this.name() === 'serve') {
|
|
514
|
+
return 'production'
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
return 'dev'
|
|
518
|
+
}
|
|
508
519
|
}
|