netlify-cli 17.33.3 → 17.33.4
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/build/build.d.ts.map +1 -1
- package/dist/commands/build/build.js +2 -6
- package/dist/commands/deploy/deploy.d.ts.map +1 -1
- package/dist/commands/deploy/deploy.js +5 -1
- package/dist/lib/build.d.ts +3 -1
- package/dist/lib/build.d.ts.map +1 -1
- package/dist/lib/build.js +3 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/build-info.d.ts +7 -0
- package/dist/utils/build-info.d.ts.map +1 -1
- package/dist/utils/build-info.js +22 -0
- package/dist/utils/deploy/deploy-site.d.ts.map +1 -1
- package/dist/utils/deploy/deploy-site.js +3 -1
- package/dist/utils/deploy/hash-fns.d.ts +1 -26
- package/dist/utils/deploy/hash-fns.d.ts.map +1 -1
- package/dist/utils/deploy/hash-fns.js +1 -1
- package/dist/utils/feature-flags.d.ts.map +1 -1
- package/dist/utils/feature-flags.js +2 -1
- package/functions-templates/typescript/hello-world/package-lock.json +6 -6
- package/npm-shrinkwrap.json +118 -118
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/build/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAMxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C;;GAEG;AAEH,eAAO,MAAM,YAAY;;;;;UAWxB,CAAA;AAED,eAAO,MAAM,KAAK,YAAmB,YAAY,WAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/build/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAMxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C;;GAEG;AAEH,eAAO,MAAM,YAAY;;;;;UAWxB,CAAA;AAED,eAAO,MAAM,KAAK,YAAmB,YAAY,WAAW,WAAW,kBA+BtE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getBuildOptions, runBuild } from '../../lib/build.js';
|
|
2
|
-
import { detectFrameworkSettings } from '../../utils/build-info.js';
|
|
2
|
+
import { detectFrameworkSettings, getDefaultConfig } from '../../utils/build-info.js';
|
|
3
3
|
import { error, exit, getToken } from '../../utils/command-helpers.js';
|
|
4
4
|
import { getEnvelopeEnv } from '../../utils/env/index.js';
|
|
5
5
|
/**
|
|
@@ -22,13 +22,9 @@ export const build = async (options, command) => {
|
|
|
22
22
|
// @ts-expect-error TS(2554) FIXME: Expected 1 arguments, but got 0.
|
|
23
23
|
const [token] = await getToken();
|
|
24
24
|
const settings = await detectFrameworkSettings(command, 'build');
|
|
25
|
-
// override the build command with the detection result if no command is specified through the config
|
|
26
|
-
if (!cachedConfig.config.build.command) {
|
|
27
|
-
cachedConfig.config.build.command = settings?.buildCommand;
|
|
28
|
-
cachedConfig.config.build.commandOrigin = 'heuristics';
|
|
29
|
-
}
|
|
30
25
|
const buildOptions = await getBuildOptions({
|
|
31
26
|
cachedConfig,
|
|
27
|
+
defaultConfig: getDefaultConfig(settings),
|
|
32
28
|
packagePath: command.workspacePackage,
|
|
33
29
|
currentDir: command.workingDir,
|
|
34
30
|
token,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/deploy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/deploy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAkCxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAyuB5C,eAAO,MAAM,MAAM,YAAmB,YAAY,WAAW,WAAW,kBAqHvE,CAAA"}
|
|
@@ -14,6 +14,7 @@ import { featureFlags as edgeFunctionsFeatureFlags } from '../../lib/edge-functi
|
|
|
14
14
|
import { normalizeFunctionsConfig } from '../../lib/functions/config.js';
|
|
15
15
|
import { BACKGROUND_FUNCTIONS_WARNING } from '../../lib/log.js';
|
|
16
16
|
import { startSpinner, stopSpinner } from '../../lib/spinner.js';
|
|
17
|
+
import { detectFrameworkSettings, getDefaultConfig } from '../../utils/build-info.js';
|
|
17
18
|
import { NETLIFYDEV, NETLIFYDEVERR, NETLIFYDEVLOG, chalk, error, exit, getToken, log, logJson, warn, } from '../../utils/command-helpers.js';
|
|
18
19
|
import { DEFAULT_DEPLOY_TIMEOUT } from '../../utils/deploy/constants.js';
|
|
19
20
|
import { deploySite } from '../../utils/deploy/deploy-site.js';
|
|
@@ -440,7 +441,7 @@ title, }) => {
|
|
|
440
441
|
* @returns
|
|
441
442
|
*/
|
|
442
443
|
// @ts-expect-error TS(7031) FIXME: Binding element 'cachedConfig' implicitly has an '... Remove this comment to see the full error message
|
|
443
|
-
const handleBuild = async ({ cachedConfig, currentDir, deployHandler, options, packagePath }) => {
|
|
444
|
+
const handleBuild = async ({ cachedConfig, currentDir, defaultConfig, deployHandler, options, packagePath }) => {
|
|
444
445
|
if (!options.build) {
|
|
445
446
|
return {};
|
|
446
447
|
}
|
|
@@ -448,6 +449,7 @@ const handleBuild = async ({ cachedConfig, currentDir, deployHandler, options, p
|
|
|
448
449
|
const [token] = await getToken();
|
|
449
450
|
const resolvedOptions = await getBuildOptions({
|
|
450
451
|
cachedConfig,
|
|
452
|
+
defaultConfig,
|
|
451
453
|
packagePath,
|
|
452
454
|
token,
|
|
453
455
|
options,
|
|
@@ -637,6 +639,7 @@ export const deploy = async (options, command) => {
|
|
|
637
639
|
const { workingDir } = command;
|
|
638
640
|
const { api, site, siteInfo } = command.netlify;
|
|
639
641
|
const alias = options.alias || options.branch;
|
|
642
|
+
const settings = await detectFrameworkSettings(command, 'build');
|
|
640
643
|
command.setAnalyticsPayload({ open: options.open, prod: options.prod, json: options.json, alias: Boolean(alias) });
|
|
641
644
|
if (options.branch) {
|
|
642
645
|
warn('--branch flag has been renamed to --alias and will be removed in future versions');
|
|
@@ -690,6 +693,7 @@ export const deploy = async (options, command) => {
|
|
|
690
693
|
await handleBuild({
|
|
691
694
|
packagePath: command.workspacePackage,
|
|
692
695
|
cachedConfig: command.netlify.cachedConfig,
|
|
696
|
+
defaultConfig: getDefaultConfig(settings),
|
|
693
697
|
currentDir: command.workingDir,
|
|
694
698
|
options,
|
|
695
699
|
// @ts-expect-error TS(7031) FIXME: Binding element 'netlifyConfig' implicitly has an ... Remove this comment to see the full error message
|
package/dist/lib/build.d.ts
CHANGED
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
* @param {*} config.deployHandler
|
|
15
15
|
* @returns {BuildConfig}
|
|
16
16
|
*/
|
|
17
|
-
export declare const getBuildOptions: ({ cachedConfig, currentDir, deployHandler, options: { context, cwd, debug, dry, json, offline, silent }, packagePath, token, }: {
|
|
17
|
+
export declare const getBuildOptions: ({ cachedConfig, currentDir, defaultConfig, deployHandler, options: { context, cwd, debug, dry, json, offline, silent }, packagePath, token, }: {
|
|
18
18
|
cachedConfig: any;
|
|
19
19
|
currentDir: any;
|
|
20
|
+
defaultConfig: any;
|
|
20
21
|
deployHandler: any;
|
|
21
22
|
options: {
|
|
22
23
|
context: any;
|
|
@@ -31,6 +32,7 @@ export declare const getBuildOptions: ({ cachedConfig, currentDir, deployHandler
|
|
|
31
32
|
token: any;
|
|
32
33
|
}) => Promise<{
|
|
33
34
|
cachedConfig: any;
|
|
35
|
+
defaultConfig: any;
|
|
34
36
|
siteId: any;
|
|
35
37
|
packagePath: any;
|
|
36
38
|
token: any;
|
package/dist/lib/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/lib/build.ts"],"names":[],"mappings":"AAYA;;;;GAIG;AAKH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/lib/build.ts"],"names":[],"mappings":"AAYA;;;;GAIG;AAKH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgE3B,CAAA;AAED;;;;GAIG;AAEH,eAAO,MAAM,QAAQ;;;;EAcpB,CAAA"}
|
package/dist/lib/build.js
CHANGED
|
@@ -30,6 +30,8 @@ export const getBuildOptions = async ({
|
|
|
30
30
|
cachedConfig,
|
|
31
31
|
// @ts-expect-error TS(7031) FIXME: Binding element 'currentDir' implicitly has an 'an... Remove this comment to see the full error message
|
|
32
32
|
currentDir,
|
|
33
|
+
// @ts-expect-error TS(7031) FIXME: Binding element 'defaultConfig' implicitly has an '... Remove this comment to see the full error message
|
|
34
|
+
defaultConfig,
|
|
33
35
|
// @ts-expect-error TS(7031) FIXME: Binding element 'deployHandler' implicitly has an ... Remove this comment to see the full error message
|
|
34
36
|
deployHandler,
|
|
35
37
|
// @ts-expect-error TS(7031) FIXME: Binding element 'context' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
@@ -61,6 +63,7 @@ token, }) => {
|
|
|
61
63
|
}
|
|
62
64
|
return {
|
|
63
65
|
cachedConfig,
|
|
66
|
+
defaultConfig,
|
|
64
67
|
siteId: cachedConfig.siteInfo.id,
|
|
65
68
|
packagePath,
|
|
66
69
|
token,
|