netlify-cli 17.23.6 → 17.23.7
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.d.ts.map +1 -1
- package/dist/commands/functions/functions-create.js +1 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/copy-template-dir/copy-template-dir.d.ts +2 -0
- package/dist/utils/copy-template-dir/copy-template-dir.d.ts.map +1 -0
- package/dist/utils/copy-template-dir/copy-template-dir.js +74 -0
- package/npm-shrinkwrap.json +24 -2180
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions-create.d.ts","sourceRoot":"","sources":["../../../src/commands/functions/functions-create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"functions-create.d.ts","sourceRoot":"","sources":["../../../src/commands/functions/functions-create.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAcxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAutB5C,eAAO,MAAM,eAAe,SAAgB,MAAM,WAAW,YAAY,WAAW,WAAW,kBAQ9F,CAAA"}
|
|
@@ -5,9 +5,6 @@ import { createRequire } from 'module';
|
|
|
5
5
|
import path, { dirname, join, relative } from 'path';
|
|
6
6
|
import process from 'process';
|
|
7
7
|
import { fileURLToPath, pathToFileURL } from 'url';
|
|
8
|
-
import { promisify } from 'util';
|
|
9
|
-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'copy... Remove this comment to see the full error message
|
|
10
|
-
import copyTemplateDirOriginal from 'copy-template-dir';
|
|
11
8
|
import { findUp } from 'find-up';
|
|
12
9
|
import fuzzy from 'fuzzy';
|
|
13
10
|
import inquirer from 'inquirer';
|
|
@@ -16,10 +13,10 @@ import ora from 'ora';
|
|
|
16
13
|
import { fileExistsAsync } from '../../lib/fs.js';
|
|
17
14
|
import { getAddons, getCurrentAddon, getSiteData } from '../../utils/addons/prepare.js';
|
|
18
15
|
import { NETLIFYDEVERR, NETLIFYDEVLOG, NETLIFYDEVWARN, chalk, error, log } from '../../utils/command-helpers.js';
|
|
16
|
+
import { copyTemplateDir } from '../../utils/copy-template-dir/copy-template-dir.js';
|
|
19
17
|
import { getDotEnvVariables, injectEnvVariables } from '../../utils/dev.js';
|
|
20
18
|
import execa from '../../utils/execa.js';
|
|
21
19
|
import { readRepoURL, validateRepoURL } from '../../utils/read-repo-url.js';
|
|
22
|
-
const copyTemplateDir = promisify(copyTemplateDirOriginal);
|
|
23
20
|
const require = createRequire(import.meta.url);
|
|
24
21
|
const templatesDir = path.resolve(dirname(fileURLToPath(import.meta.url)), '../../../functions-templates');
|
|
25
22
|
/**
|
|
@@ -436,7 +433,6 @@ const scaffoldFromTemplate = async function (command, options, argumentName, fun
|
|
|
436
433
|
// be removed before the command finishes.
|
|
437
434
|
const omittedFromOutput = new Set(['.netlify-function-template.mjs', 'package.json', 'package-lock.json']);
|
|
438
435
|
const createdFiles = await copyTemplateDir(pathToTemplate, functionPath, vars);
|
|
439
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'filePath' implicitly has an 'any' type.
|
|
440
436
|
createdFiles.forEach((filePath) => {
|
|
441
437
|
const filename = path.basename(filePath);
|
|
442
438
|
if (!omittedFromOutput.has(filename)) {
|