netlify-cli 17.22.1 → 17.23.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/dist/commands/functions/functions-create.js +4 -4
- package/dist/lib/http-agent.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/deploy/deploy-site.d.ts.map +1 -1
- package/dist/utils/deploy/deploy-site.js +0 -1
- package/dist/utils/deploy/hash-fns.d.ts +13 -3
- package/dist/utils/deploy/hash-fns.d.ts.map +1 -1
- package/dist/utils/deploy/hash-fns.js +25 -12
- package/functions-templates/javascript/scheduled-function/package.json +1 -1
- package/functions-templates/typescript/hello-world/package-lock.json +53 -19
- package/functions-templates/typescript/hello-world/package.json +1 -1
- package/functions-templates/typescript/scheduled-function/package.json +1 -1
- package/npm-shrinkwrap.json +798 -507
- package/package.json +11 -11
- /package/functions-templates/go/hello-world/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/hello/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/hello-world/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/identity-signup/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/image-external/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/localized-content/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/sanity-create/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/sanity-groq/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/scheduled-function/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/set-cookies/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/set-req-header/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/set-res-header/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/submission-created/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/javascript/transform-response/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/rust/hello-world/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/typescript/abtest/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/typescript/geolocation/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/typescript/hello-world/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/typescript/json/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/typescript/log/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/typescript/scheduled-function/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/typescript/set-cookies/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/typescript/set-req-header/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/typescript/set-res-header/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
- /package/functions-templates/typescript/transform-response/{.netlify-function-template.js → .netlify-function-template.mjs} +0 -0
|
@@ -94,7 +94,7 @@ const formatRegistryArrayForInquirer = async function (lang, funcType) {
|
|
|
94
94
|
.filter((folder) => Boolean(folder?.isDirectory()))
|
|
95
95
|
.map(async ({ name }) => {
|
|
96
96
|
try {
|
|
97
|
-
const templatePath = path.join(templatesDir, lang, name, '.netlify-function-template.
|
|
97
|
+
const templatePath = path.join(templatesDir, lang, name, '.netlify-function-template.mjs');
|
|
98
98
|
// @ts-expect-error TS(7036) FIXME: Dynamic import's specifier must be of type 'string... Remove this comment to see the full error message
|
|
99
99
|
const template = await import(pathToFileURL(templatePath));
|
|
100
100
|
return template.default;
|
|
@@ -324,7 +324,7 @@ const downloadFromURL = async function (command, options, argumentName, function
|
|
|
324
324
|
log(`${NETLIFYDEVLOG} Installing dependencies for ${nameToUse} complete `);
|
|
325
325
|
});
|
|
326
326
|
// read, execute, and delete function template file if exists
|
|
327
|
-
const fnTemplateFile = path.join(fnFolder, '.netlify-function-template.
|
|
327
|
+
const fnTemplateFile = path.join(fnFolder, '.netlify-function-template.mjs');
|
|
328
328
|
if (await fileExistsAsync(fnTemplateFile)) {
|
|
329
329
|
const { default: { addons = [], onComplete }, } = await import(pathToFileURL(fnTemplateFile).href);
|
|
330
330
|
await installAddons(command, addons, path.resolve(fnFolder));
|
|
@@ -435,7 +435,7 @@ const scaffoldFromTemplate = async function (command, options, argumentName, fun
|
|
|
435
435
|
let functionPackageJson;
|
|
436
436
|
// These files will not be part of the log message because they'll likely
|
|
437
437
|
// be removed before the command finishes.
|
|
438
|
-
const omittedFromOutput = new Set(['.netlify-function-template.
|
|
438
|
+
const omittedFromOutput = new Set(['.netlify-function-template.mjs', 'package.json', 'package-lock.json']);
|
|
439
439
|
const createdFiles = await copyTemplateDir(pathToTemplate, functionPath, vars);
|
|
440
440
|
// @ts-expect-error TS(7006) FIXME: Parameter 'filePath' implicitly has an 'any' type.
|
|
441
441
|
createdFiles.forEach((filePath) => {
|
|
@@ -449,7 +449,7 @@ const scaffoldFromTemplate = async function (command, options, argumentName, fun
|
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
451
|
// delete function template file that was copied over by copydir
|
|
452
|
-
await unlink(path.join(functionPath, '.netlify-function-template.
|
|
452
|
+
await unlink(path.join(functionPath, '.netlify-function-template.mjs'));
|
|
453
453
|
// npm install
|
|
454
454
|
if (functionPackageJson !== undefined) {
|
|
455
455
|
const spinner = ora({
|
package/dist/lib/http-agent.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readFile } from 'fs/promises';
|
|
2
|
-
import HttpsProxyAgent from 'https-proxy-agent';
|
|
2
|
+
import { HttpsProxyAgent } from 'https-proxy-agent';
|
|
3
3
|
import waitPort from 'wait-port';
|
|
4
4
|
import { NETLIFYDEVERR, NETLIFYDEVWARN, exit, log } from '../utils/command-helpers.js';
|
|
5
5
|
// https://github.com/TooTallNate/node-https-proxy-agent/issues/89
|