netlify-cli 16.3.2 → 16.3.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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "16.3.
|
|
3
|
+
"version": "16.3.3",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "16.3.
|
|
9
|
+
"version": "16.3.3",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -63,20 +63,24 @@ const triggerDeploy = async ({ api, options, siteData, siteId }) => {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Retrieves the folder containing the static files that need to be deployed
|
|
67
67
|
* @param {object} config
|
|
68
|
-
* @param {
|
|
68
|
+
* @param {import('../base-command.mjs').default} config.command The process working directory
|
|
69
69
|
* @param {object} config.config
|
|
70
70
|
* @param {import('commander').OptionValues} config.options
|
|
71
71
|
* @param {object} config.site
|
|
72
72
|
* @param {object} config.siteData
|
|
73
73
|
* @returns {Promise<string>}
|
|
74
74
|
*/
|
|
75
|
-
const getDeployFolder = async ({ config, options, site, siteData
|
|
76
|
-
console.log()
|
|
75
|
+
const getDeployFolder = async ({ command, config, options, site, siteData }) => {
|
|
77
76
|
let deployFolder
|
|
77
|
+
// if the `--dir .` flag is provided we should resolve it to the working directory.
|
|
78
|
+
// - in regular sites this is the `process.cwd`
|
|
79
|
+
// - in mono repositories this will be the root of the jsWorkspace
|
|
78
80
|
if (options.dir) {
|
|
79
|
-
deployFolder =
|
|
81
|
+
deployFolder = command.workspacePackage
|
|
82
|
+
? resolve(command.jsWorkspaceRoot || site.root)
|
|
83
|
+
: resolve(command.workingDir, options.dir)
|
|
80
84
|
} else if (config?.build?.publish) {
|
|
81
85
|
deployFolder = resolve(site.root, config.build.publish)
|
|
82
86
|
} else if (siteData?.build_settings?.dir) {
|
|
@@ -91,7 +95,7 @@ const getDeployFolder = async ({ config, options, site, siteData, workingDir })
|
|
|
91
95
|
name: 'promptPath',
|
|
92
96
|
message: 'Publish directory',
|
|
93
97
|
default: '.',
|
|
94
|
-
filter: (input) => resolve(workingDir, input),
|
|
98
|
+
filter: (input) => resolve(command.workingDir, input),
|
|
95
99
|
},
|
|
96
100
|
])
|
|
97
101
|
deployFolder = promptPath
|
|
@@ -599,7 +603,7 @@ const deploy = async (options, command) => {
|
|
|
599
603
|
})
|
|
600
604
|
const config = newConfig || command.netlify.config
|
|
601
605
|
|
|
602
|
-
const deployFolder = await getDeployFolder({
|
|
606
|
+
const deployFolder = await getDeployFolder({ command, options, config, site, siteData })
|
|
603
607
|
const functionsFolder = getFunctionsFolder({ workingDir, options, config, site, siteData })
|
|
604
608
|
const { configPath } = site
|
|
605
609
|
const edgeFunctionsConfig = command.netlify.config.edge_functions
|