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
|
@@ -6,7 +6,6 @@ import getRepoData from '../../utils/get-repo-data.js';
|
|
|
6
6
|
import { configureRepo } from '../../utils/init/config.js';
|
|
7
7
|
import { track } from '../../utils/telemetry/index.js';
|
|
8
8
|
import { link } from '../link/link.js';
|
|
9
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'name' implicitly has an 'any' type.
|
|
10
9
|
export const getSiteNameInput = async (name) => {
|
|
11
10
|
if (!name) {
|
|
12
11
|
const { name: nameInput } = await inquirer.prompt([
|
|
@@ -17,7 +16,7 @@ export const getSiteNameInput = async (name) => {
|
|
|
17
16
|
validate: (input) => /^[a-zA-Z\d-]+$/.test(input || undefined) || 'Only alphanumeric characters and hyphens are allowed',
|
|
18
17
|
},
|
|
19
18
|
]);
|
|
20
|
-
name = nameInput
|
|
19
|
+
name = typeof nameInput === 'string' ? nameInput : '';
|
|
21
20
|
}
|
|
22
21
|
return { name };
|
|
23
22
|
};
|
|
@@ -32,7 +31,6 @@ export const sitesCreate = async (options, command) => {
|
|
|
32
31
|
type: 'list',
|
|
33
32
|
name: 'accountSlug',
|
|
34
33
|
message: 'Team:',
|
|
35
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'account' implicitly has an 'any' type.
|
|
36
34
|
choices: accounts.map((account) => ({
|
|
37
35
|
value: account.slug,
|
|
38
36
|
name: account.name,
|
|
@@ -43,12 +41,10 @@ export const sitesCreate = async (options, command) => {
|
|
|
43
41
|
}
|
|
44
42
|
let site;
|
|
45
43
|
// Allow the user to reenter site name if selected one isn't available
|
|
46
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'name' implicitly has an 'any' type.
|
|
47
44
|
const inputSiteName = async (name) => {
|
|
48
45
|
const { name: siteName } = await getSiteNameInput(name);
|
|
49
46
|
const body = {};
|
|
50
47
|
if (typeof siteName === 'string') {
|
|
51
|
-
// @ts-expect-error TS(2339) FIXME: Property 'name' does not exist on type '{}'.
|
|
52
48
|
body.name = siteName.trim();
|
|
53
49
|
}
|
|
54
50
|
try {
|
|
@@ -58,14 +54,11 @@ export const sitesCreate = async (options, command) => {
|
|
|
58
54
|
});
|
|
59
55
|
}
|
|
60
56
|
catch (error_) {
|
|
61
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
62
57
|
if (error_.status === 422) {
|
|
63
58
|
warn(`${siteName}.netlify.app already exists. Please try a different slug.`);
|
|
64
|
-
// @ts-expect-error TS(2554) FIXME: Expected 1 arguments, but got 0.
|
|
65
59
|
await inputSiteName();
|
|
66
60
|
}
|
|
67
61
|
else {
|
|
68
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
69
62
|
error(`createSiteInTeam error: ${error_.status}: ${error_.message}`);
|
|
70
63
|
}
|
|
71
64
|
}
|
|
@@ -92,7 +85,6 @@ export const sitesCreate = async (options, command) => {
|
|
|
92
85
|
});
|
|
93
86
|
if (options.withCi) {
|
|
94
87
|
log('Configuring CI');
|
|
95
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type '{ workingDir: any; }' is not ass... Remove this comment to see the full error message
|
|
96
88
|
const repoData = await getRepoData({ workingDir: command.workingDir });
|
|
97
89
|
// @ts-expect-error TS(2532) FIXME: Object is possibly 'undefined'.
|
|
98
90
|
await configureRepo({ command, siteId: site.id, repoData, manual: options.manual });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites-delete.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/sites-delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAIxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C,eAAO,MAAM,WAAW,WAAkB,MAAM,WAAW,YAAY,WAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"sites-delete.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/sites-delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAIxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C,eAAO,MAAM,WAAW,WAAkB,MAAM,WAAW,YAAY,WAAW,WAAW,kBA8E5F,CAAA"}
|
|
@@ -11,10 +11,12 @@ export const sitesDelete = async (siteId, options, command) => {
|
|
|
11
11
|
siteData = await api.getSite({ siteId });
|
|
12
12
|
}
|
|
13
13
|
catch (error_) {
|
|
14
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
15
14
|
if (error_.status === 404) {
|
|
16
15
|
error(`No site with id ${siteId} found. Please verify the siteId & try again.`);
|
|
17
16
|
}
|
|
17
|
+
else {
|
|
18
|
+
error(error_);
|
|
19
|
+
}
|
|
18
20
|
}
|
|
19
21
|
if (!siteData) {
|
|
20
22
|
error(`Unable to process site`);
|
|
@@ -63,12 +65,10 @@ export const sitesDelete = async (siteId, options, command) => {
|
|
|
63
65
|
await api.deleteSite({ site_id: siteId });
|
|
64
66
|
}
|
|
65
67
|
catch (error_) {
|
|
66
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
67
68
|
if (error_.status === 404) {
|
|
68
69
|
error(`No site with id ${siteId} found. Please verify the siteId & try again.`);
|
|
69
70
|
}
|
|
70
71
|
else {
|
|
71
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
72
72
|
error(`Delete Site error: ${error_.status}: ${error_.message}`);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites-list.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/sites-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"sites-list.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/sites-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAMxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAE5C,eAAO,MAAM,SAAS,YAAmB,YAAY,WAAW,WAAW,+BA+D1E,CAAA"}
|
|
@@ -15,7 +15,6 @@ export const sitesList = async (options, command) => {
|
|
|
15
15
|
stopSpinner({ spinner });
|
|
16
16
|
}
|
|
17
17
|
if (sites && sites.length !== 0) {
|
|
18
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'site' implicitly has an 'any' type.
|
|
19
18
|
const logSites = sites.map((site) => {
|
|
20
19
|
const siteInfo = {
|
|
21
20
|
id: site.id,
|
|
@@ -24,16 +23,14 @@ export const sitesList = async (options, command) => {
|
|
|
24
23
|
account_name: site.account_name,
|
|
25
24
|
};
|
|
26
25
|
if (site.build_settings && site.build_settings.repo_url) {
|
|
27
|
-
// @ts-expect-error TS(2339) FIXME: Property 'repo_url' does not exist on type '{ id: ... Remove this comment to see the full error message
|
|
28
26
|
siteInfo.repo_url = site.build_settings.repo_url;
|
|
29
27
|
}
|
|
30
28
|
return siteInfo;
|
|
31
29
|
});
|
|
32
30
|
// Json response for piping commands
|
|
33
31
|
if (options.json) {
|
|
34
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'site' implicitly has an 'any' type.
|
|
35
32
|
const redactedSites = sites.map((site) => {
|
|
36
|
-
if (site
|
|
33
|
+
if (site?.build_settings?.env) {
|
|
37
34
|
delete site.build_settings.env;
|
|
38
35
|
}
|
|
39
36
|
return site;
|
|
@@ -48,7 +45,6 @@ export const sitesList = async (options, command) => {
|
|
|
48
45
|
|
|
49
46
|
Count: ${logSites.length}
|
|
50
47
|
`);
|
|
51
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'logSite' implicitly has an 'any' type.
|
|
52
48
|
logSites.forEach((logSite) => {
|
|
53
49
|
log(`${chalk.greenBright(logSite.name)} - ${logSite.id}`);
|
|
54
50
|
log(` ${chalk.whiteBright.bold('url:')} ${chalk.yellowBright(logSite.ssl_url)}`);
|
|
@@ -4,7 +4,6 @@ import { chalk, error, exit, getToken, log, logJson, warn } from '../../utils/co
|
|
|
4
4
|
export const status = async (options, command) => {
|
|
5
5
|
const { api, globalConfig, site, siteInfo } = command.netlify;
|
|
6
6
|
const current = globalConfig.get('userId');
|
|
7
|
-
// @ts-expect-error TS(2554) FIXME: Expected 1 arguments, but got 0.
|
|
8
7
|
const [accessToken] = await getToken();
|
|
9
8
|
if (!accessToken) {
|
|
10
9
|
log(`Not logged in. Please log in to see site status.`);
|
|
@@ -24,10 +23,12 @@ export const status = async (options, command) => {
|
|
|
24
23
|
[accounts, user] = await Promise.all([api.listAccountsForUser(), api.getCurrentUser()]);
|
|
25
24
|
}
|
|
26
25
|
catch (error_) {
|
|
27
|
-
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
|
|
28
26
|
if (error_.status === 401) {
|
|
29
27
|
error('Your session has expired. Please try to re-authenticate by running `netlify logout` and `netlify login`.');
|
|
30
28
|
}
|
|
29
|
+
else {
|
|
30
|
+
error(error_);
|
|
31
|
+
}
|
|
31
32
|
}
|
|
32
33
|
const ghuser = command.netlify.globalConfig.get(`users.${current}.auth.github.user`);
|
|
33
34
|
const accountData = {
|
|
@@ -12,10 +12,10 @@ export const unlink = async (options, command) => {
|
|
|
12
12
|
await track('sites_unlinked', {
|
|
13
13
|
siteId: siteData.id || siteId,
|
|
14
14
|
});
|
|
15
|
-
if (site) {
|
|
15
|
+
if (site && site.configPath) {
|
|
16
16
|
log(`Unlinked ${site.configPath} from ${siteData ? siteData.name : siteId}`);
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
|
-
log(
|
|
19
|
+
log(`Unlinked from ${siteData ? siteData.name : siteId}`);
|
|
20
20
|
}
|
|
21
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../../src/commands/watch/watch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAMxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAoD5C,eAAO,MAAM,KAAK,YAAmB,YAAY,WAAW,WAAW,
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../../src/commands/watch/watch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAMxC,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAoD5C,eAAO,MAAM,KAAK,YAAmB,YAAY,WAAW,WAAW,kBA4DtE,CAAA"}
|
|
@@ -94,7 +94,6 @@ export const watch = async (options, command) => {
|
|
|
94
94
|
console.timeEnd('Deploy time');
|
|
95
95
|
}
|
|
96
96
|
catch (error_) {
|
|
97
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
98
97
|
error(error_);
|
|
99
98
|
}
|
|
100
99
|
};
|
package/dist/lib/api.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SiteInfo } from '../utils/types.js';
|
|
1
2
|
export declare const cancelDeploy: ({ api, deployId }: {
|
|
2
3
|
api: any;
|
|
3
4
|
deployId: any;
|
|
@@ -5,5 +6,5 @@ export declare const cancelDeploy: ({ api, deployId }: {
|
|
|
5
6
|
export declare const listSites: ({ api, options }: {
|
|
6
7
|
api: any;
|
|
7
8
|
options: any;
|
|
8
|
-
}) =>
|
|
9
|
+
}) => SiteInfo[];
|
|
9
10
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/lib/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,eAAO,MAAM,YAAY;;;mBAOxB,CAAA;AAOD,eAAO,MAAM,SAAS;;;MAA6B,QAAQ,EAQ1D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec-fetcher.d.ts","sourceRoot":"","sources":["../../src/lib/exec-fetcher.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,WAAW;;SAAiE,CAAA;AAsBzF,eAAO,MAAM,wBAAwB;;;;;;;sBA+CpC,CAAA;AAED,eAAO,MAAM,OAAO,0HASnB,CAAA;AAED;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,kBAAkB;;;;;;
|
|
1
|
+
{"version":3,"file":"exec-fetcher.d.ts","sourceRoot":"","sources":["../../src/lib/exec-fetcher.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,WAAW;;SAAiE,CAAA;AAsBzF,eAAO,MAAM,wBAAwB;;;;;;;sBA+CpC,CAAA;AAED,eAAO,MAAM,OAAO,0HASnB,CAAA;AAED;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,kBAAkB;;;;;;mBA2C9B,CAAA"}
|
package/dist/lib/exec-fetcher.js
CHANGED
|
@@ -126,7 +126,6 @@ export const fetchLatestVersion = async ({ destination, execName, extension, lat
|
|
|
126
126
|
Please open up an issue on our CLI repository so that we can support it:
|
|
127
127
|
${issueLink}`);
|
|
128
128
|
}
|
|
129
|
-
// @ts-expect-error TS(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
130
129
|
error(error_);
|
|
131
130
|
}
|
|
132
131
|
};
|