netlify-cli 16.0.2 → 16.0.3
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
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.3",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "16.0.
|
|
9
|
+
"version": "16.0.3",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@bugsnag/js": "7.20.2",
|
|
14
14
|
"@fastify/static": "6.10.2",
|
|
15
|
-
"@netlify/build": "29.20.
|
|
15
|
+
"@netlify/build": "29.20.4",
|
|
16
16
|
"@netlify/build-info": "7.7.3",
|
|
17
17
|
"@netlify/config": "20.8.0",
|
|
18
18
|
"@netlify/edge-bundler": "8.17.1",
|
|
@@ -781,9 +781,9 @@
|
|
|
781
781
|
"integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
|
|
782
782
|
},
|
|
783
783
|
"node_modules/@netlify/build": {
|
|
784
|
-
"version": "29.20.
|
|
785
|
-
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.20.
|
|
786
|
-
"integrity": "sha512-
|
|
784
|
+
"version": "29.20.4",
|
|
785
|
+
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.20.4.tgz",
|
|
786
|
+
"integrity": "sha512-qXht5lWE0RThGhhB5ILQv4/2Jp+p0muTDp9n+KtlqpinO1SvXicVPw+D2o3iWMsz3vQak6yX09oEvumP2Q+TVQ==",
|
|
787
787
|
"dependencies": {
|
|
788
788
|
"@bugsnag/js": "^7.0.0",
|
|
789
789
|
"@honeycombio/opentelemetry-node": "^0.4.0",
|
|
@@ -15295,9 +15295,9 @@
|
|
|
15295
15295
|
"integrity": "sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw=="
|
|
15296
15296
|
},
|
|
15297
15297
|
"@netlify/build": {
|
|
15298
|
-
"version": "29.20.
|
|
15299
|
-
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.20.
|
|
15300
|
-
"integrity": "sha512-
|
|
15298
|
+
"version": "29.20.4",
|
|
15299
|
+
"resolved": "https://registry.npmjs.org/@netlify/build/-/build-29.20.4.tgz",
|
|
15300
|
+
"integrity": "sha512-qXht5lWE0RThGhhB5ILQv4/2Jp+p0muTDp9n+KtlqpinO1SvXicVPw+D2o3iWMsz3vQak6yX09oEvumP2Q+TVQ==",
|
|
15301
15301
|
"requires": {
|
|
15302
15302
|
"@bugsnag/js": "^7.0.0",
|
|
15303
15303
|
"@honeycombio/opentelemetry-node": "^0.4.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": "16.0.
|
|
4
|
+
"version": "16.0.3",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@bugsnag/js": "7.20.2",
|
|
46
46
|
"@fastify/static": "6.10.2",
|
|
47
|
-
"@netlify/build": "29.20.
|
|
47
|
+
"@netlify/build": "29.20.4",
|
|
48
48
|
"@netlify/build-info": "7.7.3",
|
|
49
49
|
"@netlify/config": "20.8.0",
|
|
50
50
|
"@netlify/edge-bundler": "8.17.1",
|
|
@@ -324,6 +324,7 @@ const runDeploy = async ({
|
|
|
324
324
|
deployToProduction,
|
|
325
325
|
functionsConfig,
|
|
326
326
|
functionsFolder,
|
|
327
|
+
packagePath,
|
|
327
328
|
silent,
|
|
328
329
|
site,
|
|
329
330
|
siteData,
|
|
@@ -345,13 +346,13 @@ const runDeploy = async ({
|
|
|
345
346
|
results = await api.createSiteDeploy({ siteId, title, body: { draft, branch: alias } })
|
|
346
347
|
deployId = results.id
|
|
347
348
|
|
|
348
|
-
const internalFunctionsFolder = await getInternalFunctionsDir({ base: site.root })
|
|
349
|
+
const internalFunctionsFolder = await getInternalFunctionsDir({ base: site.root, packagePath })
|
|
349
350
|
|
|
350
351
|
// The order of the directories matter: zip-it-and-ship-it will prioritize
|
|
351
352
|
// functions from the rightmost directories. In this case, we want user
|
|
352
353
|
// functions to take precedence over internal functions.
|
|
353
354
|
const functionDirectories = [internalFunctionsFolder, functionsFolder].filter(Boolean)
|
|
354
|
-
const manifestPath = skipFunctionsCache ? null : await getFunctionsManifestPath({ base: site.root })
|
|
355
|
+
const manifestPath = skipFunctionsCache ? null : await getFunctionsManifestPath({ base: site.root, packagePath })
|
|
355
356
|
|
|
356
357
|
// @ts-ignore
|
|
357
358
|
results = await deploySite(api, siteId, deployFolder, {
|
|
@@ -367,6 +368,7 @@ const runDeploy = async ({
|
|
|
367
368
|
workingDir: command.workingDir,
|
|
368
369
|
manifestPath,
|
|
369
370
|
skipFunctionsCache,
|
|
371
|
+
siteRoot: site.root,
|
|
370
372
|
})
|
|
371
373
|
} catch (error_) {
|
|
372
374
|
if (deployId) {
|
|
@@ -657,6 +659,7 @@ const deploy = async (options, command) => {
|
|
|
657
659
|
functionsConfig,
|
|
658
660
|
// pass undefined functionsFolder if doesn't exist
|
|
659
661
|
functionsFolder: functionsFolderStat && functionsFolder,
|
|
662
|
+
packagePath: command.workspacePackage,
|
|
660
663
|
silent: options.json || options.silent,
|
|
661
664
|
site,
|
|
662
665
|
siteData,
|
|
@@ -40,6 +40,7 @@ export const deploySite = async (
|
|
|
40
40
|
// API calls this the 'title'
|
|
41
41
|
message: title,
|
|
42
42
|
siteEnv,
|
|
43
|
+
siteRoot,
|
|
43
44
|
skipFunctionsCache,
|
|
44
45
|
statusCb = () => {
|
|
45
46
|
/* default to noop */
|
|
@@ -78,6 +79,7 @@ export const deploySite = async (
|
|
|
78
79
|
manifestPath,
|
|
79
80
|
skipFunctionsCache,
|
|
80
81
|
siteEnv,
|
|
82
|
+
rootDir: siteRoot,
|
|
81
83
|
}),
|
|
82
84
|
])
|
|
83
85
|
const edgeFunctionsCount = Object.keys(files).filter(isEdgeFunctionFile).length
|
|
@@ -20,10 +20,10 @@ const getFunctionZips = async ({
|
|
|
20
20
|
directories,
|
|
21
21
|
functionsConfig,
|
|
22
22
|
manifestPath,
|
|
23
|
+
rootDir,
|
|
23
24
|
skipFunctionsCache,
|
|
24
25
|
statusCb,
|
|
25
26
|
tmpDir,
|
|
26
|
-
workingDir,
|
|
27
27
|
}) => {
|
|
28
28
|
statusCb({
|
|
29
29
|
type: 'functions-manifest',
|
|
@@ -68,7 +68,7 @@ const getFunctionZips = async ({
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
return await zipFunctions(directories, tmpDir, {
|
|
71
|
-
basePath:
|
|
71
|
+
basePath: rootDir,
|
|
72
72
|
configFileDirectories: [getPathInProject([INTERNAL_FUNCTIONS_FOLDER])],
|
|
73
73
|
config: functionsConfig,
|
|
74
74
|
})
|
|
@@ -19,15 +19,15 @@ export const SERVE_FUNCTIONS_FOLDER = 'functions-serve'
|
|
|
19
19
|
export const getFunctionsDir = ({ config, options }, defaultValue) =>
|
|
20
20
|
options.functions || config.dev?.functions || config.functionsDirectory || config.dev?.Functions || defaultValue
|
|
21
21
|
|
|
22
|
-
export const getFunctionsManifestPath = async ({ base }) => {
|
|
23
|
-
const path = resolve(base, getPathInProject(['functions', 'manifest.json']))
|
|
22
|
+
export const getFunctionsManifestPath = async ({ base, packagePath = '' }) => {
|
|
23
|
+
const path = resolve(base, packagePath, getPathInProject(['functions', 'manifest.json']))
|
|
24
24
|
const isFile = await isFileAsync(path)
|
|
25
25
|
|
|
26
26
|
return isFile ? path : null
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export const getFunctionsDistPath = async ({ base }) => {
|
|
30
|
-
const path = resolve(base, getPathInProject(['functions']))
|
|
29
|
+
export const getFunctionsDistPath = async ({ base, packagePath = '' }) => {
|
|
30
|
+
const path = resolve(base, packagePath, getPathInProject(['functions']))
|
|
31
31
|
const isDirectory = await isDirectoryAsync(path)
|
|
32
32
|
|
|
33
33
|
return isDirectory ? path : null
|
|
@@ -38,10 +38,11 @@ export const getFunctionsDistPath = async ({ base }) => {
|
|
|
38
38
|
* @param {object} config
|
|
39
39
|
* @param {string} config.base
|
|
40
40
|
* @param {boolean=} config.ensureExists
|
|
41
|
+
* @param {string} config.packagePath
|
|
41
42
|
* @returns
|
|
42
43
|
*/
|
|
43
|
-
export const getInternalFunctionsDir = async ({ base, ensureExists }) => {
|
|
44
|
-
const path = resolve(base, getPathInProject([INTERNAL_FUNCTIONS_FOLDER]))
|
|
44
|
+
export const getInternalFunctionsDir = async ({ base, ensureExists, packagePath = '' }) => {
|
|
45
|
+
const path = resolve(base, packagePath, getPathInProject([INTERNAL_FUNCTIONS_FOLDER]))
|
|
45
46
|
|
|
46
47
|
if (ensureExists) {
|
|
47
48
|
await fs.mkdir(path, { recursive: true })
|