netlify-cli 17.37.1 → 17.37.2
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/addons/addons-config.d.ts.map +1 -1
- package/dist/commands/addons/addons-config.js +0 -1
- package/dist/commands/addons/addons-create.d.ts.map +1 -1
- package/dist/commands/addons/addons-create.js +0 -1
- package/dist/commands/addons/addons-delete.d.ts.map +1 -1
- package/dist/commands/addons/addons-delete.js +0 -1
- package/dist/commands/api/api.d.ts.map +1 -1
- package/dist/commands/api/api.js +0 -1
- package/dist/commands/base-command.d.ts +2 -2
- package/dist/commands/base-command.d.ts.map +1 -1
- package/dist/commands/base-command.js +0 -1
- package/dist/commands/build/build.d.ts.map +1 -1
- package/dist/commands/build/build.js +0 -1
- package/dist/commands/completion/completion.d.ts.map +1 -1
- package/dist/commands/completion/completion.js +35 -2
- package/dist/commands/deploy/deploy.d.ts.map +1 -1
- package/dist/commands/deploy/deploy.js +3 -5
- package/dist/commands/functions/functions-create.d.ts.map +1 -1
- package/dist/commands/functions/functions-create.js +2 -5
- package/dist/commands/functions/functions-invoke.d.ts.map +1 -1
- package/dist/commands/functions/functions-invoke.js +0 -1
- package/dist/commands/integration/deploy.d.ts.map +1 -1
- package/dist/commands/integration/deploy.js +2 -4
- package/dist/commands/link/link.d.ts.map +1 -1
- package/dist/commands/link/link.js +8 -21
- package/dist/commands/lm/lm-setup.d.ts.map +1 -1
- package/dist/commands/lm/lm-setup.js +0 -1
- package/dist/commands/login/login.d.ts.map +1 -1
- package/dist/commands/login/login.js +0 -2
- package/dist/commands/logout/logout.d.ts.map +1 -1
- package/dist/commands/logout/logout.js +0 -1
- package/dist/commands/logs/build.d.ts.map +1 -1
- package/dist/commands/logs/build.js +4 -0
- package/dist/commands/sites/sites-create-template.d.ts +2 -1
- package/dist/commands/sites/sites-create-template.d.ts.map +1 -1
- package/dist/commands/sites/sites-create-template.js +2 -11
- package/dist/commands/sites/sites-create.d.ts +2 -2
- package/dist/commands/sites/sites-create.d.ts.map +1 -1
- package/dist/commands/sites/sites-create.js +1 -9
- package/dist/commands/sites/sites-delete.d.ts.map +1 -1
- package/dist/commands/sites/sites-delete.js +3 -3
- package/dist/commands/sites/sites-list.d.ts.map +1 -1
- package/dist/commands/sites/sites-list.js +1 -5
- package/dist/commands/status/status.js +3 -2
- package/dist/commands/unlink/unlink.js +2 -2
- package/dist/commands/watch/watch.d.ts.map +1 -1
- package/dist/commands/watch/watch.js +0 -1
- package/dist/lib/api.d.ts +2 -1
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/exec-fetcher.d.ts.map +1 -1
- package/dist/lib/exec-fetcher.js +0 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/addons/prepare.d.ts.map +1 -1
- package/dist/utils/addons/prepare.js +1 -5
- package/dist/utils/command-helpers.d.ts +21 -6
- package/dist/utils/command-helpers.d.ts.map +1 -1
- package/dist/utils/command-helpers.js +14 -9
- package/dist/utils/dev.d.ts.map +1 -1
- package/dist/utils/dev.js +0 -2
- package/dist/utils/framework-server.d.ts.map +1 -1
- package/dist/utils/framework-server.js +0 -1
- package/dist/utils/get-repo-data.d.ts +2 -2
- package/dist/utils/get-repo-data.d.ts.map +1 -1
- package/dist/utils/get-repo-data.js +0 -1
- package/dist/utils/get-site.d.ts.map +1 -1
- package/dist/utils/get-site.js +7 -2
- package/dist/utils/hooks/requires-site-info.d.ts.map +1 -1
- package/dist/utils/hooks/requires-site-info.js +0 -3
- package/dist/utils/sites/utils.d.ts +2 -1
- package/dist/utils/sites/utils.d.ts.map +1 -1
- package/dist/utils/sites/utils.js +14 -8
- package/dist/utils/types.d.ts +124 -0
- package/dist/utils/types.d.ts.map +1 -1
- package/functions-templates/typescript/hello-world/package-lock.json +6 -6
- package/npm-shrinkwrap.json +56 -56
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addons-config.d.ts","sourceRoot":"","sources":["../../../src/commands/addons/addons-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAYxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"addons-config.d.ts","sourceRoot":"","sources":["../../../src/commands/addons/addons-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAYxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AA6B5C,eAAO,MAAM,YAAY,cAAqB,MAAM,WAAW,YAAY,WAAW,WAAW,+BAqHhG,CAAA"}
|
|
@@ -31,7 +31,6 @@ const update = async function ({ addonName, api, currentConfig, instanceId, newC
|
|
|
31
31
|
log(`Add-on "${addonName}" successfully updated`);
|
|
32
32
|
}
|
|
33
33
|
catch (error_) {
|
|
34
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
35
34
|
error(error_.message);
|
|
36
35
|
}
|
|
37
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addons-create.d.ts","sourceRoot":"","sources":["../../../src/commands/addons/addons-create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAUxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"addons-create.d.ts","sourceRoot":"","sources":["../../../src/commands/addons/addons-create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAUxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAmB5C,eAAO,MAAM,YAAY,cAAqB,MAAM,WAAW,YAAY,WAAW,WAAW,+BA2EhG,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addons-delete.d.ts","sourceRoot":"","sources":["../../../src/commands/addons/addons-delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAKxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C,eAAO,MAAM,YAAY,cAAqB,MAAM,WAAW,YAAY,WAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"addons-delete.d.ts","sourceRoot":"","sources":["../../../src/commands/addons/addons-delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAKxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C,eAAO,MAAM,YAAY,cAAqB,MAAM,WAAW,YAAY,WAAW,WAAW,kBA4BhG,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/commands/api/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAIxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C,eAAO,MAAM,UAAU,cAAqB,MAAM,WAAW,YAAY,WAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/commands/api/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAIxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C,eAAO,MAAM,UAAU,cAAqB,MAAM,WAAW,YAAY,WAAW,WAAW,kBAqC9F,CAAA"}
|
package/dist/commands/api/api.js
CHANGED
|
@@ -34,7 +34,6 @@ export const apiCommand = async (apiMethod, options, command) => {
|
|
|
34
34
|
logJson(apiResponse);
|
|
35
35
|
}
|
|
36
36
|
catch (error_) {
|
|
37
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
38
37
|
error(error_);
|
|
39
38
|
}
|
|
40
39
|
};
|
|
@@ -45,8 +45,8 @@ export default class BaseCommand extends Command {
|
|
|
45
45
|
createHelp(): Help;
|
|
46
46
|
/** Will be called on the end of an action to track the metrics */
|
|
47
47
|
onEnd(error_?: unknown): Promise<void>;
|
|
48
|
-
authenticate(tokenFromFlag?: string): Promise<
|
|
49
|
-
expensivelyAuthenticate(): Promise<
|
|
48
|
+
authenticate(tokenFromFlag?: string): Promise<string | undefined>;
|
|
49
|
+
expensivelyAuthenticate(): Promise<string | undefined>;
|
|
50
50
|
/** Adds some data to the analytics payload */
|
|
51
51
|
setAnalyticsPayload(payload: Record<string, unknown>): void;
|
|
52
52
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/commands/base-command.ts"],"names":[],"mappings":"AAOA,OAAO,EAAiB,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAU,MAAM,WAAW,CAAA;AA0BjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAQxD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,KAAK,SAAS,GAAG;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC,CAAA;AAuGD,0EAA0E;AAC1E,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;;IAC9C,4DAA4D;IAE5D,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAyC;IAE7D,OAAO,EAAE,OAAO,CAAA;IAEhB;;;;OAIG;IAGH,UAAU,SAAgB;IAE1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,YAAY,EAAE,YAAY,CAAK;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW;IAqDxC,mIAAmI;IACnI,aAAa;IAKb,mFAAmF;IACnF,QAAQ,EAAE,MAAM,EAAE,CAAK;IACvB,oCAAoC;IACpC,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE;IAK9B,iEAAiE;IACjE,UAAU,IAAI,IAAI;IAgIlB,kEAAkE;IAC5D,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO;IAwBtB,YAAY,CAAC,aAAa,CAAC,EAAE,MAAM;IAQnC,uBAAuB;IA4D7B,8CAA8C;IAC9C,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOpD;;OAEG;YACW,IAAI;IAkMlB,iDAAiD;IAC3C,SAAS,CAAC,MAAM,EAAE;QACtB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACrB,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,2EAA2E;QAC3E,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/commands/base-command.ts"],"names":[],"mappings":"AAOA,OAAO,EAAiB,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAU,MAAM,WAAW,CAAA;AA0BjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAQxD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,KAAK,SAAS,GAAG;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC,CAAA;AAuGD,0EAA0E;AAC1E,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;;IAC9C,4DAA4D;IAE5D,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAyC;IAE7D,OAAO,EAAE,OAAO,CAAA;IAEhB;;;;OAIG;IAGH,UAAU,SAAgB;IAE1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,YAAY,EAAE,YAAY,CAAK;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW;IAqDxC,mIAAmI;IACnI,aAAa;IAKb,mFAAmF;IACnF,QAAQ,EAAE,MAAM,EAAE,CAAK;IACvB,oCAAoC;IACpC,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE;IAK9B,iEAAiE;IACjE,UAAU,IAAI,IAAI;IAgIlB,kEAAkE;IAC5D,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO;IAwBtB,YAAY,CAAC,aAAa,CAAC,EAAE,MAAM;IAQnC,uBAAuB;IA4D7B,8CAA8C;IAC9C,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOpD;;OAEG;YACW,IAAI;IAkMlB,iDAAiD;IAC3C,SAAS,CAAC,MAAM,EAAE;QACtB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACrB,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,2EAA2E;QAC3E,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC;IAgDpC;;OAEG;IACH,gBAAgB,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAI5C;;;;OAIG;IACH,iBAAiB,IAAI,YAAY,GAAG,KAAK;IAIzC;;OAEG;IACH,cAAc,CAAC,CAAC,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC;CAGjE"}
|
|
@@ -579,7 +579,6 @@ class BaseCommand extends Command {
|
|
|
579
579
|
// the option to say that we don't need API data.)
|
|
580
580
|
if (isUserError && !config.offline && config.token) {
|
|
581
581
|
if (flags.debug) {
|
|
582
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
583
582
|
error(error_, { exit: false });
|
|
584
583
|
warn('Failed to resolve config, falling back to offline resolution');
|
|
585
584
|
}
|
|
@@ -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,kBA8BtE,CAAA"}
|
|
@@ -19,7 +19,6 @@ export const build = async (options, command) => {
|
|
|
19
19
|
const { cachedConfig, siteInfo } = command.netlify;
|
|
20
20
|
command.setAnalyticsPayload({ dry: options.dry });
|
|
21
21
|
// Retrieve Netlify Build options
|
|
22
|
-
// @ts-expect-error TS(2554) FIXME: Expected 1 arguments, but got 0.
|
|
23
22
|
const [token] = await getToken();
|
|
24
23
|
const settings = await detectFrameworkSettings(command, 'build');
|
|
25
24
|
const buildOptions = await getBuildOptions({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../../src/commands/completion/completion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../../src/commands/completion/completion.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAaxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAI5C,eAAO,MAAM,kBAAkB,YAAmB,YAAY,WAAW,WAAW,kBAkDnF,CAAA;AAED,eAAO,MAAM,mBAAmB,YAAmB,YAAY,WAAW,WAAW,kBAQpF,CAAA"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { homedir } from 'os';
|
|
1
3
|
import { dirname, join } from 'path';
|
|
2
4
|
import { fileURLToPath } from 'url';
|
|
5
|
+
import inquirer from 'inquirer';
|
|
3
6
|
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'tabt... Remove this comment to see the full error message
|
|
4
7
|
import { install, uninstall } from 'tabtab';
|
|
5
8
|
import { generateAutocompletion } from '../../lib/completion/index.js';
|
|
6
|
-
import { error } from '../../utils/command-helpers.js';
|
|
9
|
+
import { error, log, chalk, checkFileForLine, TABTAB_CONFIG_LINE, AUTOLOAD_COMPINIT, } from '../../utils/command-helpers.js';
|
|
7
10
|
const completer = join(dirname(fileURLToPath(import.meta.url)), '../../lib/completion/script.js');
|
|
8
11
|
export const completionGenerate = async (options, command) => {
|
|
9
12
|
const { parent } = command;
|
|
@@ -16,7 +19,37 @@ export const completionGenerate = async (options, command) => {
|
|
|
16
19
|
name: parent.name(),
|
|
17
20
|
completer,
|
|
18
21
|
});
|
|
19
|
-
|
|
22
|
+
const zshConfigFilepath = join(process.env.HOME || homedir(), '.zshrc');
|
|
23
|
+
if (fs.existsSync(zshConfigFilepath) &&
|
|
24
|
+
checkFileForLine(zshConfigFilepath, TABTAB_CONFIG_LINE) &&
|
|
25
|
+
!checkFileForLine(zshConfigFilepath, AUTOLOAD_COMPINIT)) {
|
|
26
|
+
log(`To enable Tabtab autocompletion with zsh, the following line may need to be added to your ~/.zshrc:`);
|
|
27
|
+
log(chalk.bold.cyan(`\n${AUTOLOAD_COMPINIT}\n`));
|
|
28
|
+
const { compinitAdded } = await inquirer.prompt([
|
|
29
|
+
{
|
|
30
|
+
type: 'confirm',
|
|
31
|
+
name: 'compinitAdded',
|
|
32
|
+
message: `Would you like to add it?`,
|
|
33
|
+
default: true,
|
|
34
|
+
},
|
|
35
|
+
]);
|
|
36
|
+
if (compinitAdded) {
|
|
37
|
+
await fs.readFile(zshConfigFilepath, 'utf8', (err, data) => {
|
|
38
|
+
const updatedZshFile = AUTOLOAD_COMPINIT + '\n' + data;
|
|
39
|
+
fs.writeFileSync(zshConfigFilepath, updatedZshFile, 'utf8');
|
|
40
|
+
});
|
|
41
|
+
log('Successfully added compinit line to .zshrc');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
log(`Completion for ${parent.name()} successfully installed!`);
|
|
45
|
+
if (process.platform !== 'win32') {
|
|
46
|
+
log("\nTo ensure proper functionality, you'll need to set appropriate file permissions.");
|
|
47
|
+
log(chalk.bold('Add executable permissions by running the following command:'));
|
|
48
|
+
log(chalk.bold.cyan(`\nchmod +x ${completer}\n`));
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
log(`\nTo ensure proper functionality, you may need to set appropriate file permissions to ${completer}.`);
|
|
52
|
+
}
|
|
20
53
|
};
|
|
21
54
|
export const completionUninstall = async (options, command) => {
|
|
22
55
|
if (!command.parent) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/deploy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/deploy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAA;AAkC7C,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAqvB5C,eAAO,MAAM,MAAM,YAAmB,YAAY,WAAW,WAAW,kBAoHvE,CAAA"}
|
|
@@ -40,12 +40,10 @@ const triggerDeploy = async ({ api, options, siteData, siteId }) => {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
catch (error_) {
|
|
43
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
44
43
|
if (error_.status === 404) {
|
|
45
44
|
error('Site not found. Please rerun "netlify link" and make sure that your site has CI configured.');
|
|
46
45
|
}
|
|
47
46
|
else {
|
|
48
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
49
47
|
error(error_.message);
|
|
50
48
|
}
|
|
51
49
|
}
|
|
@@ -289,7 +287,8 @@ const uploadDeployBlobs = async ({ cachedConfig, deployId, options, packagePath,
|
|
|
289
287
|
msg: 'Uploading blobs to deploy store...\n',
|
|
290
288
|
phase: 'start',
|
|
291
289
|
});
|
|
292
|
-
const [token] = await getToken(
|
|
290
|
+
const [token] = await getToken();
|
|
291
|
+
const blobsToken = token || undefined;
|
|
293
292
|
const { success } = await runCoreSteps(['blobs_upload'], {
|
|
294
293
|
...options,
|
|
295
294
|
quiet: silent,
|
|
@@ -297,7 +296,7 @@ const uploadDeployBlobs = async ({ cachedConfig, deployId, options, packagePath,
|
|
|
297
296
|
packagePath,
|
|
298
297
|
deployId,
|
|
299
298
|
siteId,
|
|
300
|
-
token,
|
|
299
|
+
token: blobsToken,
|
|
301
300
|
});
|
|
302
301
|
if (!success) {
|
|
303
302
|
statusCb({
|
|
@@ -448,7 +447,6 @@ const handleBuild = async ({ cachedConfig, currentDir, defaultConfig, deployHand
|
|
|
448
447
|
if (!options.build) {
|
|
449
448
|
return {};
|
|
450
449
|
}
|
|
451
|
-
// @ts-expect-error TS(2554) FIXME: Expected 1 arguments, but got 0.
|
|
452
450
|
const [token] = await getToken();
|
|
453
451
|
const resolvedOptions = await getBuildOptions({
|
|
454
452
|
cachedConfig,
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAsBxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAotB5C,eAAO,MAAM,eAAe,SAAgB,MAAM,WAAW,YAAY,WAAW,WAAW,kBAQ9F,CAAA"}
|
|
@@ -12,7 +12,7 @@ import fetch from 'node-fetch';
|
|
|
12
12
|
import ora from 'ora';
|
|
13
13
|
import { fileExistsAsync } from '../../lib/fs.js';
|
|
14
14
|
import { getAddons, getCurrentAddon, getSiteData } from '../../utils/addons/prepare.js';
|
|
15
|
-
import { NETLIFYDEVERR, NETLIFYDEVLOG, NETLIFYDEVWARN, chalk, error, log } from '../../utils/command-helpers.js';
|
|
15
|
+
import { NETLIFYDEVERR, NETLIFYDEVLOG, NETLIFYDEVWARN, chalk, error, log, } from '../../utils/command-helpers.js';
|
|
16
16
|
import { copyTemplateDir } from '../../utils/copy-template-dir/copy-template-dir.js';
|
|
17
17
|
import { getDotEnvVariables, injectEnvVariables } from '../../utils/dev.js';
|
|
18
18
|
import execa from '../../utils/execa.js';
|
|
@@ -410,7 +410,6 @@ const scaffoldFromTemplate = async function (command, options, argumentName, fun
|
|
|
410
410
|
}
|
|
411
411
|
catch (error_) {
|
|
412
412
|
error(`$${NETLIFYDEVERR} Error downloading from URL: ${options.url}`);
|
|
413
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
414
413
|
error(error_);
|
|
415
414
|
process.exit(1);
|
|
416
415
|
}
|
|
@@ -484,7 +483,6 @@ const createFunctionAddon = async function ({ addonName, addons, api, siteData,
|
|
|
484
483
|
return true;
|
|
485
484
|
}
|
|
486
485
|
catch (error_) {
|
|
487
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
488
486
|
error(error_.message);
|
|
489
487
|
}
|
|
490
488
|
};
|
|
@@ -573,8 +571,7 @@ const installAddons = async function (command, functionAddons, fnPath) {
|
|
|
573
571
|
await handleAddonDidInstall({ addonCreated, addonDidInstall, command, fnPath });
|
|
574
572
|
}
|
|
575
573
|
catch (error_) {
|
|
576
|
-
|
|
577
|
-
error(`${NETLIFYDEVERR} Error installing addon: `, error_);
|
|
574
|
+
error(`${NETLIFYDEVERR} Error installing addon: ${error_}`);
|
|
578
575
|
}
|
|
579
576
|
});
|
|
580
577
|
return Promise.all(arr);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions-invoke.d.ts","sourceRoot":"","sources":["../../../src/commands/functions/functions-invoke.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAMxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAwI5C,eAAO,MAAM,eAAe,iBAAwB,MAAM,WAAW,YAAY,WAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"functions-invoke.d.ts","sourceRoot":"","sources":["../../../src/commands/functions/functions-invoke.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAMxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAwI5C,eAAO,MAAM,eAAe,iBAAwB,MAAM,WAAW,YAAY,WAAW,WAAW,kBA4FtG,CAAA"}
|
|
@@ -204,7 +204,6 @@ export const functionsInvoke = async (nameArgument, options, command) => {
|
|
|
204
204
|
console.log(data);
|
|
205
205
|
}
|
|
206
206
|
catch (error_) {
|
|
207
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
208
207
|
error(`Ran into an error invoking your function: ${error_.message}`);
|
|
209
208
|
}
|
|
210
209
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/integration/deploy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAUxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAS5C,wBAAgB,cAAc,CAAC,WAAW,KAAA,EAAE,YAAY,KAAA,OAOvD;AA0FD,wBAAsB,mBAAmB,CAAC,UAAU,KAAA,EAAE,MAAM,KAAA,EAAE,SAAS,KAAA,EAAE,sBAAsB,KAAA,EAAE,KAAK,KAAA,iBA0ErG;AAED,wBAAsB,iBAAiB,CAErC,UAAU,KAAA,EAEV,OAAO,KAAA,EAEP,MAAM,KAAA,EAEN,SAAS,KAAA,EAET,sBAAsB,KAAA,EAEtB,KAAK,KAAA,EAEL,qBAAqB,KAAA,iBA4HtB;AA4BD,eAAO,MAAM,gBAAgB,0BA6B5B,CAAA;AAED,eAAO,MAAM,MAAM,YAAmB,YAAY,WAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/integration/deploy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAUxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAS5C,wBAAgB,cAAc,CAAC,WAAW,KAAA,EAAE,YAAY,KAAA,OAOvD;AA0FD,wBAAsB,mBAAmB,CAAC,UAAU,KAAA,EAAE,MAAM,KAAA,EAAE,SAAS,KAAA,EAAE,sBAAsB,KAAA,EAAE,KAAK,KAAA,iBA0ErG;AAED,wBAAsB,iBAAiB,CAErC,UAAU,KAAA,EAEV,OAAO,KAAA,EAEP,MAAM,KAAA,EAEN,SAAS,KAAA,EAET,sBAAsB,KAAA,EAEtB,KAAK,KAAA,EAEL,qBAAqB,KAAA,iBA4HtB;AA4BD,eAAO,MAAM,gBAAgB,0BA6B5B,CAAA;AAED,eAAO,MAAM,MAAM,YAAmB,YAAY,WAAW,WAAW,kBAgEvE,CAAA"}
|
|
@@ -321,7 +321,6 @@ export const getConfiguration = (workingDir) => {
|
|
|
321
321
|
export const deploy = async (options, command) => {
|
|
322
322
|
const { api, cachedConfig, site, siteInfo } = command.netlify;
|
|
323
323
|
const { id: siteId } = site;
|
|
324
|
-
// @ts-expect-error TS(2554) FIXME: Expected 1 arguments, but got 0.
|
|
325
324
|
const [token] = await getToken();
|
|
326
325
|
const workingDir = resolve(command.workingDir);
|
|
327
326
|
const buildOptions = await getBuildOptions({
|
|
@@ -336,6 +335,7 @@ export const deploy = async (options, command) => {
|
|
|
336
335
|
checkOptions(buildOptions);
|
|
337
336
|
const { description, integrationLevel, name, scopes, slug } = await getConfiguration(command.workingDir);
|
|
338
337
|
const localIntegrationConfig = { name, description, scopes, slug, integrationLevel };
|
|
338
|
+
const headers = token ? { 'netlify-token': token } : undefined;
|
|
339
339
|
// @ts-expect-error TS(2345) FIXME: Argument of type '{ api: any; site: any; siteInfo:... Remove this comment to see the full error message
|
|
340
340
|
const { accountId } = await getSiteInformation({
|
|
341
341
|
api,
|
|
@@ -343,9 +343,7 @@ export const deploy = async (options, command) => {
|
|
|
343
343
|
siteInfo,
|
|
344
344
|
});
|
|
345
345
|
const { body: registeredIntegration, statusCode } = await fetch(`${getIntegrationAPIUrl()}/${accountId}/integrations?site_id=${siteId}`, {
|
|
346
|
-
headers
|
|
347
|
-
'netlify-token': token,
|
|
348
|
-
},
|
|
346
|
+
headers,
|
|
349
347
|
}).then(async (res) => {
|
|
350
348
|
const body = await res.json();
|
|
351
349
|
return { body, statusCode: res.status };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/commands/link/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/commands/link/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAUxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAyO5C,eAAO,MAAM,IAAI,YAAmB,YAAY,WAAW,WAAW,iBAqFrE,CAAA"}
|
|
@@ -48,9 +48,7 @@ const linkPrompt = async (command, options) => {
|
|
|
48
48
|
if (sites.length === 0) {
|
|
49
49
|
error(`You don't have any sites yet. Run ${chalk.cyanBright('netlify sites:create')} to create a site.`);
|
|
50
50
|
}
|
|
51
|
-
const matchingSites = sites.filter(
|
|
52
|
-
// @ts-expect-error TS(2339) FIXME: Property 'repo_url' does not exist on type '{}'.
|
|
53
|
-
({ build_settings: buildSettings = {} }) => repoData.httpsUrl === buildSettings.repo_url);
|
|
51
|
+
const matchingSites = sites.filter(({ build_settings: buildSettings = {} }) => repoData.httpsUrl === buildSettings.repo_url);
|
|
54
52
|
// If no remote matches. Throw error
|
|
55
53
|
if (matchingSites.length === 0) {
|
|
56
54
|
log(chalk.redBright.bold.underline(`No Matching Site Found`));
|
|
@@ -76,7 +74,6 @@ Run ${chalk.cyanBright('git remote -v')} to see a list of your git remotes.`);
|
|
|
76
74
|
type: 'list',
|
|
77
75
|
name: 'selectedSite',
|
|
78
76
|
message: 'Which site do you want to link?',
|
|
79
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'matchingSite' implicitly has an 'any' t... Remove this comment to see the full error message
|
|
80
77
|
choices: matchingSites.map((matchingSite) => ({
|
|
81
78
|
name: `${matchingSite.name} - ${matchingSite.ssl_url}`,
|
|
82
79
|
value: matchingSite,
|
|
@@ -101,7 +98,7 @@ Run ${chalk.cyanBright('git remote -v')} to see a list of your git remotes.`);
|
|
|
101
98
|
]);
|
|
102
99
|
log(`Looking for sites with names containing '${searchTerm}'...`);
|
|
103
100
|
log();
|
|
104
|
-
let matchingSites;
|
|
101
|
+
let matchingSites = [];
|
|
105
102
|
try {
|
|
106
103
|
matchingSites = await listSites({
|
|
107
104
|
api,
|
|
@@ -109,12 +106,10 @@ Run ${chalk.cyanBright('git remote -v')} to see a list of your git remotes.`);
|
|
|
109
106
|
});
|
|
110
107
|
}
|
|
111
108
|
catch (error_) {
|
|
112
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
113
109
|
if (error_.status === 404) {
|
|
114
110
|
error(`'${searchTerm}' not found`);
|
|
115
111
|
}
|
|
116
112
|
else {
|
|
117
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
118
113
|
error(error_);
|
|
119
114
|
}
|
|
120
115
|
}
|
|
@@ -132,7 +127,6 @@ or run ${chalk.cyanBright('netlify sites:create')} to create a site.`);
|
|
|
132
127
|
name: 'selectedSite',
|
|
133
128
|
message: 'Which site do you want to link?',
|
|
134
129
|
paginated: true,
|
|
135
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'matchingSite' implicitly has an 'any' t... Remove this comment to see the full error message
|
|
136
130
|
choices: matchingSites.map((matchingSite) => ({ name: matchingSite.name, value: matchingSite })),
|
|
137
131
|
},
|
|
138
132
|
]);
|
|
@@ -156,7 +150,6 @@ or run ${chalk.cyanBright('netlify sites:create')} to create a site.`);
|
|
|
156
150
|
sites = await listSites({ api, options: { maxPages: 1, filter: 'all' } });
|
|
157
151
|
}
|
|
158
152
|
catch (error_) {
|
|
159
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
160
153
|
error(error_);
|
|
161
154
|
}
|
|
162
155
|
if (!sites || sites.length === 0) {
|
|
@@ -191,12 +184,10 @@ or run ${chalk.cyanBright('netlify sites:create')} to create a site.`);
|
|
|
191
184
|
site = await api.getSite({ siteId });
|
|
192
185
|
}
|
|
193
186
|
catch (error_) {
|
|
194
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
195
187
|
if (error_.status === 404) {
|
|
196
|
-
error(
|
|
188
|
+
error(`Site ID '${siteId}' not found`);
|
|
197
189
|
}
|
|
198
190
|
else {
|
|
199
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
200
191
|
error(error_);
|
|
201
192
|
}
|
|
202
193
|
}
|
|
@@ -249,12 +240,10 @@ export const link = async (options, command) => {
|
|
|
249
240
|
siteData = await api.getSite({ site_id: options.id });
|
|
250
241
|
}
|
|
251
242
|
catch (error_) {
|
|
252
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
253
243
|
if (error_.status === 404) {
|
|
254
244
|
error(new Error(`Site id ${options.id} not found`));
|
|
255
245
|
}
|
|
256
246
|
else {
|
|
257
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
258
247
|
error(error_);
|
|
259
248
|
}
|
|
260
249
|
}
|
|
@@ -268,7 +257,7 @@ export const link = async (options, command) => {
|
|
|
268
257
|
});
|
|
269
258
|
}
|
|
270
259
|
else if (options.name) {
|
|
271
|
-
let results;
|
|
260
|
+
let results = [];
|
|
272
261
|
try {
|
|
273
262
|
results = await listSites({
|
|
274
263
|
api,
|
|
@@ -279,23 +268,21 @@ export const link = async (options, command) => {
|
|
|
279
268
|
});
|
|
280
269
|
}
|
|
281
270
|
catch (error_) {
|
|
282
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
283
271
|
if (error_.status === 404) {
|
|
284
272
|
error(new Error(`${options.name} not found`));
|
|
285
273
|
}
|
|
286
274
|
else {
|
|
287
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
288
275
|
error(error_);
|
|
289
276
|
}
|
|
290
277
|
}
|
|
291
278
|
if (results.length === 0) {
|
|
292
279
|
error(new Error(`No sites found named ${options.name}`));
|
|
293
280
|
}
|
|
294
|
-
const
|
|
295
|
-
state.set('siteId',
|
|
296
|
-
log(`Linked to ${
|
|
281
|
+
const matchingSiteData = results.find((site) => site.name === options.name) || results[0];
|
|
282
|
+
state.set('siteId', matchingSiteData.id);
|
|
283
|
+
log(`Linked to ${matchingSiteData.name}`);
|
|
297
284
|
await track('sites_linked', {
|
|
298
|
-
siteId: (
|
|
285
|
+
siteId: (matchingSiteData && matchingSiteData.id) || siteId,
|
|
299
286
|
linkType: 'manual',
|
|
300
287
|
kind: 'byName',
|
|
301
288
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lm-setup.d.ts","sourceRoot":"","sources":["../../../src/commands/lm/lm-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAQxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAiD5C,eAAO,MAAM,OAAO,YAAmB,YAAY,WAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"lm-setup.d.ts","sourceRoot":"","sources":["../../../src/commands/lm/lm-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAQxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAiD5C,eAAO,MAAM,OAAO,YAAmB,YAAY,WAAW,WAAW,kBAiCxE,CAAA"}
|
|
@@ -55,7 +55,6 @@ export const lmSetup = async (options, command) => {
|
|
|
55
55
|
helperInstalled = await installHelperIfMissing({ force: options.forceInstall });
|
|
56
56
|
}
|
|
57
57
|
catch (error_) {
|
|
58
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
59
58
|
error(error_);
|
|
60
59
|
}
|
|
61
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/commands/login/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/commands/login/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAIxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAe5C,eAAO,MAAM,KAAK,YAAmB,YAAY,WAAW,WAAW,uBAkBtE,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { chalk, exit, getToken, log } from '../../utils/command-helpers.js';
|
|
2
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'location' implicitly has an 'any' type.
|
|
3
2
|
const msg = function (location) {
|
|
4
3
|
switch (location) {
|
|
5
4
|
case 'env':
|
|
@@ -13,7 +12,6 @@ const msg = function (location) {
|
|
|
13
12
|
}
|
|
14
13
|
};
|
|
15
14
|
export const login = async (options, command) => {
|
|
16
|
-
// @ts-expect-error TS(2554) FIXME: Expected 1 arguments, but got 0.
|
|
17
15
|
const [accessToken, location] = await getToken();
|
|
18
16
|
command.setAnalyticsPayload({ new: options.new });
|
|
19
17
|
if (accessToken && !options.new) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../src/commands/logout/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAIxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C,eAAO,MAAM,MAAM,YAAmB,YAAY,WAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../src/commands/logout/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAIxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C,eAAO,MAAM,MAAM,YAAmB,YAAY,WAAW,WAAW,kBAwBvE,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { exit, getToken, log } from '../../utils/command-helpers.js';
|
|
2
2
|
import { track } from '../../utils/telemetry/index.js';
|
|
3
3
|
export const logout = async (options, command) => {
|
|
4
|
-
// @ts-expect-error TS(2554) FIXME: Expected 1 arguments, but got 0.
|
|
5
4
|
const [accessToken, location] = await getToken();
|
|
6
5
|
if (!accessToken) {
|
|
7
6
|
log(`Already logged out`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/logs/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAK7C,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAA;AAEjD,wBAAgB,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,UAyB1E;AAED,eAAO,MAAM,SAAS,YAAmB,YAAY,WAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/logs/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAK7C,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAA;AAEjD,wBAAgB,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,UAyB1E;AAED,eAAO,MAAM,SAAS,YAAmB,YAAY,WAAW,WAAW,kBAuD1E,CAAA"}
|
|
@@ -30,6 +30,10 @@ export const logsBuild = async (options, command) => {
|
|
|
30
30
|
const { site } = command.netlify;
|
|
31
31
|
const { id: siteId } = site;
|
|
32
32
|
const userId = command.netlify.globalConfig.get('userId');
|
|
33
|
+
if (!siteId) {
|
|
34
|
+
log('You must link a site before attempting to view deploy logs');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
33
37
|
const deploys = await client.listSiteDeploys({ siteId, state: 'building' });
|
|
34
38
|
if (deploys.length === 0) {
|
|
35
39
|
log('No active builds');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OptionValues } from 'commander';
|
|
2
2
|
import BaseCommand from '../base-command.js';
|
|
3
|
-
|
|
3
|
+
import { Template } from '../../utils/types.js';
|
|
4
|
+
export declare const fetchTemplates: (token: string) => Promise<Template[]>;
|
|
4
5
|
export declare const sitesCreateTemplate: (repository: string, options: OptionValues, command: BaseCommand) => Promise<undefined>;
|
|
5
6
|
//# sourceMappingURL=sites-create-template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites-create-template.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/sites-create-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAcxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"sites-create-template.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/sites-create-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAcxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAc,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG3D,eAAO,MAAM,cAAc,UAAiB,MAAM,KAAG,QAAQ,QAAQ,EAAE,CAUtE,CAAA;AAoCD,eAAO,MAAM,mBAAmB,eAAsB,MAAM,WAAW,YAAY,WAAW,WAAW,uBA0LxG,CAAA"}
|
|
@@ -11,20 +11,15 @@ import { configureRepo } from '../../utils/init/config.js';
|
|
|
11
11
|
import { createRepo, getTemplatesFromGitHub, validateTemplate } from '../../utils/sites/utils.js';
|
|
12
12
|
import { track } from '../../utils/telemetry/index.js';
|
|
13
13
|
import { getSiteNameInput } from './sites-create.js';
|
|
14
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'token' implicitly has an 'any' type.
|
|
15
14
|
export const fetchTemplates = async (token) => {
|
|
16
15
|
const templatesFromGithubOrg = await getTemplatesFromGitHub(token);
|
|
17
|
-
return
|
|
18
|
-
// @ts-expect-error TS(18046) - 'templatesFromGithubOrg' if of type 'unknown'
|
|
19
|
-
templatesFromGithubOrg
|
|
20
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'repo' implicitly has an 'any' type.
|
|
16
|
+
return templatesFromGithubOrg
|
|
21
17
|
.filter((repo) => !repo.archived && !repo.disabled)
|
|
22
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'template' implicitly has an 'any' type.
|
|
23
18
|
.map((template) => ({
|
|
24
19
|
name: template.name,
|
|
25
20
|
sourceCodeUrl: template.html_url,
|
|
26
21
|
slug: template.full_name,
|
|
27
|
-
}))
|
|
22
|
+
}));
|
|
28
23
|
};
|
|
29
24
|
// @ts-expect-error TS(7031) FIXME: Binding element 'ghToken' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
30
25
|
const getTemplateName = async ({ ghToken, options, repository }) => {
|
|
@@ -43,7 +38,6 @@ const getTemplateName = async ({ ghToken, options, repository }) => {
|
|
|
43
38
|
type: 'list',
|
|
44
39
|
name: 'templateName',
|
|
45
40
|
message: 'Template:',
|
|
46
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'template' implicitly has an 'any' type.
|
|
47
41
|
choices: templates.map((template) => ({
|
|
48
42
|
value: template.slug,
|
|
49
43
|
name: template.name,
|
|
@@ -132,14 +126,12 @@ export const sitesCreateTemplate = async (repository, options, command) => {
|
|
|
132
126
|
}
|
|
133
127
|
}
|
|
134
128
|
catch (error_) {
|
|
135
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
136
129
|
if (error_.status === 422 || error_.message === 'Duplicate repo') {
|
|
137
130
|
warn(`${name}.netlify.app already exists or a repository named ${name} already exists on this account. Please try a different slug.`);
|
|
138
131
|
// @ts-expect-error TS(2554) FIXME: Expected 1 arguments, but got 0.
|
|
139
132
|
await inputSiteName();
|
|
140
133
|
}
|
|
141
134
|
else {
|
|
142
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
143
135
|
error(`createSiteInTeam error: ${error_.status}: ${error_.message}`);
|
|
144
136
|
}
|
|
145
137
|
}
|
|
@@ -181,7 +173,6 @@ export const sitesCreateTemplate = async (repository, options, command) => {
|
|
|
181
173
|
}
|
|
182
174
|
if (options.withCi) {
|
|
183
175
|
log('Configuring CI');
|
|
184
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type '{ workingDir: any; }' is not ass... Remove this comment to see the full error message
|
|
185
176
|
const repoData = await getRepoData({ workingDir: command.workingDir });
|
|
186
177
|
// @ts-expect-error TS(2532) FIXME: Object is possibly 'undefined'.
|
|
187
178
|
await configureRepo({ command, siteId: site.id, repoData, manual: options.manual });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OptionValues } from 'commander';
|
|
2
2
|
import BaseCommand from '../base-command.js';
|
|
3
|
-
export declare const getSiteNameInput: (name:
|
|
4
|
-
name:
|
|
3
|
+
export declare const getSiteNameInput: (name: string | undefined) => Promise<{
|
|
4
|
+
name: string;
|
|
5
5
|
}>;
|
|
6
6
|
export declare const sitesCreate: (options: OptionValues, command: BaseCommand) => Promise<undefined>;
|
|
7
7
|
//# sourceMappingURL=sites-create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites-create.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/sites-create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AASxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAI5C,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"sites-create.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/sites-create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AASxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAI5C,eAAO,MAAM,gBAAgB,SAAgB,MAAM,GAAG,SAAS;UAAmB,MAAM;EAevF,CAAA;AAED,eAAO,MAAM,WAAW,YAAmB,YAAY,WAAW,WAAW,uBAuH5E,CAAA"}
|