netlify-cli 18.0.1 → 18.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.
Files changed (47) hide show
  1. package/dist/commands/logs/build.js +1 -1
  2. package/dist/commands/logs/functions.d.ts.map +1 -1
  3. package/dist/commands/logs/functions.js +2 -1
  4. package/dist/commands/sites/sites-create-template.d.ts.map +1 -1
  5. package/dist/commands/sites/sites-create-template.js +1 -0
  6. package/dist/commands/sites/sites-create.js +1 -1
  7. package/dist/commands/sites/sites-delete.js +2 -2
  8. package/dist/commands/status/status-hooks.js +0 -1
  9. package/dist/commands/status/status.js +2 -2
  10. package/dist/commands/watch/watch.js +1 -1
  11. package/dist/tsconfig.tsbuildinfo +1 -1
  12. package/dist/utils/addons/prepare.d.ts +0 -4
  13. package/dist/utils/addons/prepare.d.ts.map +1 -1
  14. package/dist/utils/addons/prepare.js +0 -4
  15. package/dist/utils/command-helpers.d.ts +4 -4
  16. package/dist/utils/command-helpers.d.ts.map +1 -1
  17. package/dist/utils/proxy.d.ts.map +1 -1
  18. package/dist/utils/proxy.js +3 -1
  19. package/dist/utils/shell.d.ts +0 -4
  20. package/dist/utils/shell.d.ts.map +1 -1
  21. package/dist/utils/shell.js +0 -7
  22. package/dist/utils/telemetry/telemetry.d.ts +3 -3
  23. package/dist/utils/telemetry/telemetry.d.ts.map +1 -1
  24. package/functions-templates/typescript/hello-world/package-lock.json +6 -6
  25. package/npm-shrinkwrap.json +797 -1191
  26. package/package.json +5 -8
  27. package/dist/commands/blobs/index.d.ts +0 -2
  28. package/dist/commands/blobs/index.d.ts.map +0 -1
  29. package/dist/commands/blobs/index.js +0 -1
  30. package/dist/utils/addons/compare.d.ts +0 -2
  31. package/dist/utils/addons/compare.d.ts.map +0 -1
  32. package/dist/utils/addons/compare.js +0 -33
  33. package/dist/utils/addons/diffs/index.d.ts +0 -2
  34. package/dist/utils/addons/diffs/index.d.ts.map +0 -1
  35. package/dist/utils/addons/diffs/index.js +0 -19
  36. package/dist/utils/addons/diffs/options.d.ts +0 -221
  37. package/dist/utils/addons/diffs/options.d.ts.map +0 -1
  38. package/dist/utils/addons/diffs/options.js +0 -105
  39. package/dist/utils/addons/prompts.d.ts +0 -12
  40. package/dist/utils/addons/prompts.d.ts.map +0 -1
  41. package/dist/utils/addons/prompts.js +0 -90
  42. package/dist/utils/addons/validation.d.ts +0 -4
  43. package/dist/utils/addons/validation.d.ts.map +0 -1
  44. package/dist/utils/addons/validation.js +0 -22
  45. package/dist/utils/init/node-version.d.ts +0 -5
  46. package/dist/utils/init/node-version.d.ts.map +0 -1
  47. package/dist/utils/init/node-version.js +0 -25
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "18.0.1",
4
+ "version": "18.0.3",
5
5
  "author": "Netlify Inc.",
6
6
  "type": "module",
7
7
  "engines": {
@@ -38,19 +38,18 @@
38
38
  "@bugsnag/js": "7.25.0",
39
39
  "@fastify/static": "7.0.4",
40
40
  "@netlify/blobs": "8.1.0",
41
- "@netlify/build": "29.58.2",
41
+ "@netlify/build": "29.58.8",
42
42
  "@netlify/build-info": "8.0.0",
43
- "@netlify/config": "20.21.2",
43
+ "@netlify/config": "20.21.7",
44
44
  "@netlify/edge-bundler": "12.3.2",
45
45
  "@netlify/edge-functions": "2.11.1",
46
46
  "@netlify/headers-parser": "7.3.0",
47
47
  "@netlify/local-functions-proxy": "1.1.1",
48
48
  "@netlify/redirect-parser": "14.5.0",
49
- "@netlify/zip-it-and-ship-it": "9.42.2",
49
+ "@netlify/zip-it-and-ship-it": "9.42.4",
50
50
  "@octokit/rest": "20.1.1",
51
51
  "@opentelemetry/api": "1.8.0",
52
52
  "ansi-escapes": "7.0.0",
53
- "ansi-styles": "6.2.1",
54
53
  "ansi-to-html": "0.7.2",
55
54
  "ascii-table": "0.0.9",
56
55
  "backoff": "2.5.0",
@@ -62,7 +61,6 @@
62
61
  "clean-deep": "3.4.0",
63
62
  "commander": "10.0.1",
64
63
  "comment-json": "4.2.5",
65
- "concordance": "5.0.4",
66
64
  "configstore": "6.0.0",
67
65
  "content-type": "1.0.5",
68
66
  "cookie": "0.7.2",
@@ -111,10 +109,9 @@
111
109
  "maxstache": "1.0.7",
112
110
  "maxstache-stream": "1.0.4",
113
111
  "multiparty": "4.2.3",
114
- "netlify": "13.2.1",
112
+ "netlify": "13.3.3",
115
113
  "netlify-redirector": "0.5.0",
116
114
  "node-fetch": "3.3.2",
117
- "node-version-alias": "3.4.1",
118
115
  "ora": "8.1.1",
119
116
  "p-filter": "4.1.0",
120
117
  "p-map": "7.0.3",
@@ -1,2 +0,0 @@
1
- export { createBlobsCommand } from './blobs.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/blobs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA"}
@@ -1 +0,0 @@
1
- export { createBlobsCommand } from './blobs.js';
@@ -1,2 +0,0 @@
1
- export default function compare(oldValues: any, newValues: any): string;
2
- //# sourceMappingURL=compare.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../../src/utils/addons/compare.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,UAgCnD"}
@@ -1,33 +0,0 @@
1
- import isEqual from 'lodash/isEqual.js';
2
- // @ts-expect-error TS(7006) FIXME: Parameter 'oldValues' implicitly has an 'any' type... Remove this comment to see the full error message
3
- export default function compare(oldValues, newValues) {
4
- const initialData = {
5
- // default everything is equal
6
- isEqual: true,
7
- // Keys that are different
8
- keys: [],
9
- // Values of the keys that are different
10
- diffs: {},
11
- };
12
- const oldKeys = Object.keys(oldValues);
13
- const newKeys = Object.keys(newValues);
14
- const set = new Set([...newKeys, ...oldKeys]);
15
- // @ts-expect-error TS(2769) FIXME: No overload matches this call.
16
- return [...set].reduce((acc, current) => {
17
- // if values not deep equal. There are changes
18
- if (!isEqual(newValues[current], oldValues[current])) {
19
- return {
20
- isEqual: false,
21
- keys: [...acc.keys, current],
22
- diffs: {
23
- ...acc.diffs,
24
- [`${current}`]: {
25
- newValue: newValues[current],
26
- oldValue: oldValues[current],
27
- },
28
- },
29
- };
30
- }
31
- return acc;
32
- }, initialData);
33
- }
@@ -1,2 +0,0 @@
1
- export default function diffValues(actual: any, expected: any): any;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/addons/diffs/index.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,KAAA,EAAE,QAAQ,KAAA,OAUlD"}
@@ -1,19 +0,0 @@
1
- // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'conc... Remove this comment to see the full error message
2
- import concordance from 'concordance';
3
- import { concordanceDiffOptions, concordanceOptions } from './options.js';
4
- // @ts-expect-error TS(7006) FIXME: Parameter 'actualDescriptor' implicitly has an 'an... Remove this comment to see the full error message
5
- const formatDescriptorDiff = function (actualDescriptor, expectedDescriptor, options) {
6
- const diffOptions = { ...options, ...concordanceDiffOptions };
7
- return concordance.diffDescriptors(actualDescriptor, expectedDescriptor, diffOptions);
8
- };
9
- // @ts-expect-error TS(7006) FIXME: Parameter 'actual' implicitly has an 'any' type.
10
- export default function diffValues(actual, expected) {
11
- const result = concordance.compare(actual, expected, concordanceOptions);
12
- if (result.pass) {
13
- return null;
14
- }
15
- const actualDescriptor = result.actual || concordance.describe(actual, concordanceOptions);
16
- const expectedDescriptor = result.expected || concordance.describe(expected, concordanceOptions);
17
- // @ts-expect-error TS(2554) FIXME: Expected 3 arguments, but got 2.
18
- return formatDescriptorDiff(actualDescriptor, expectedDescriptor);
19
- }
@@ -1,221 +0,0 @@
1
- export declare const concordanceOptions: {
2
- maxDepth: number;
3
- plugins: any[];
4
- theme: {
5
- boolean: import("ansi-styles").CSPair;
6
- circular: string;
7
- date: {
8
- invalid: string;
9
- value: import("ansi-styles").CSPair;
10
- };
11
- diffGutters: {
12
- actual: string;
13
- expected: string;
14
- padding: string;
15
- };
16
- error: {
17
- ctor: {
18
- open: string;
19
- close: string;
20
- };
21
- name: import("ansi-styles").CSPair;
22
- };
23
- function: {
24
- name: import("ansi-styles").CSPair;
25
- stringTag: import("ansi-styles").CSPair;
26
- };
27
- global: import("ansi-styles").CSPair;
28
- item: {
29
- after: string;
30
- };
31
- list: {
32
- openBracket: string;
33
- closeBracket: string;
34
- };
35
- mapEntry: {
36
- after: string;
37
- };
38
- maxDepth: string;
39
- null: import("ansi-styles").CSPair;
40
- number: import("ansi-styles").CSPair;
41
- object: {
42
- openBracket: string;
43
- closeBracket: string;
44
- ctor: import("ansi-styles").CSPair;
45
- stringTag: {
46
- open: string;
47
- close: string;
48
- };
49
- secondaryStringTag: {
50
- open: string;
51
- close: string;
52
- };
53
- };
54
- property: {
55
- after: string;
56
- keyBracket: {
57
- open: string;
58
- close: string;
59
- };
60
- valueFallback: string;
61
- };
62
- regexp: {
63
- source: {
64
- open: string;
65
- close: string;
66
- };
67
- flags: import("ansi-styles").CSPair;
68
- };
69
- stats: {
70
- separator: string;
71
- };
72
- string: {
73
- open: string;
74
- close: string;
75
- line: {
76
- open: string;
77
- close: string;
78
- };
79
- multiline: {
80
- start: string;
81
- end: string;
82
- };
83
- controlPicture: import("ansi-styles").CSPair;
84
- diff: {
85
- insert: {
86
- open: string;
87
- close: string;
88
- };
89
- delete: {
90
- open: string;
91
- close: string;
92
- };
93
- equal: import("ansi-styles").CSPair;
94
- insertLine: {
95
- open: string;
96
- close: string;
97
- };
98
- deleteLine: {
99
- open: string;
100
- close: string;
101
- };
102
- };
103
- };
104
- symbol: import("ansi-styles").CSPair;
105
- typedArray: {
106
- bytes: import("ansi-styles").CSPair;
107
- };
108
- undefined: import("ansi-styles").CSPair;
109
- };
110
- };
111
- export declare const concordanceDiffOptions: {
112
- maxDepth: number;
113
- plugins: any[];
114
- theme: {
115
- boolean: import("ansi-styles").CSPair;
116
- circular: string;
117
- date: {
118
- invalid: string;
119
- value: import("ansi-styles").CSPair;
120
- };
121
- diffGutters: {
122
- actual: string;
123
- expected: string;
124
- padding: string;
125
- };
126
- error: {
127
- ctor: {
128
- open: string;
129
- close: string;
130
- };
131
- name: import("ansi-styles").CSPair;
132
- };
133
- function: {
134
- name: import("ansi-styles").CSPair;
135
- stringTag: import("ansi-styles").CSPair;
136
- };
137
- global: import("ansi-styles").CSPair;
138
- item: {
139
- after: string;
140
- };
141
- list: {
142
- openBracket: string;
143
- closeBracket: string;
144
- };
145
- mapEntry: {
146
- after: string;
147
- };
148
- maxDepth: string;
149
- null: import("ansi-styles").CSPair;
150
- number: import("ansi-styles").CSPair;
151
- object: {
152
- openBracket: string;
153
- closeBracket: string;
154
- ctor: import("ansi-styles").CSPair;
155
- stringTag: {
156
- open: string;
157
- close: string;
158
- };
159
- secondaryStringTag: {
160
- open: string;
161
- close: string;
162
- };
163
- };
164
- property: {
165
- after: string;
166
- keyBracket: {
167
- open: string;
168
- close: string;
169
- };
170
- valueFallback: string;
171
- };
172
- regexp: {
173
- source: {
174
- open: string;
175
- close: string;
176
- };
177
- flags: import("ansi-styles").CSPair;
178
- };
179
- stats: {
180
- separator: string;
181
- };
182
- string: {
183
- open: string;
184
- close: string;
185
- line: {
186
- open: string;
187
- close: string;
188
- };
189
- multiline: {
190
- start: string;
191
- end: string;
192
- };
193
- controlPicture: import("ansi-styles").CSPair;
194
- diff: {
195
- insert: {
196
- open: string;
197
- close: string;
198
- };
199
- delete: {
200
- open: string;
201
- close: string;
202
- };
203
- equal: import("ansi-styles").CSPair;
204
- insertLine: {
205
- open: string;
206
- close: string;
207
- };
208
- deleteLine: {
209
- open: string;
210
- close: string;
211
- };
212
- };
213
- };
214
- symbol: import("ansi-styles").CSPair;
215
- typedArray: {
216
- bytes: import("ansi-styles").CSPair;
217
- };
218
- undefined: import("ansi-styles").CSPair;
219
- };
220
- };
221
- //# sourceMappingURL=options.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/utils/addons/diffs/options.ts"],"names":[],"mappings":"AA0GA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAkC,CAAA;AAEjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAkC,CAAA"}
@@ -1,105 +0,0 @@
1
- import ansiStyles from 'ansi-styles';
2
- import { Chalk } from 'chalk';
3
- const forceColor = new Chalk({ level: 1 });
4
- const colorTheme = {
5
- boolean: ansiStyles.yellow,
6
- circular: forceColor.grey('[Circular]'),
7
- date: {
8
- invalid: forceColor.red('invalid'),
9
- value: ansiStyles.blue,
10
- },
11
- diffGutters: {
12
- actual: `${forceColor.red('-')} `,
13
- expected: `${forceColor.green('+')} `,
14
- padding: ' ',
15
- },
16
- error: {
17
- ctor: {
18
- open: `${ansiStyles.grey.open}(`,
19
- close: `)${ansiStyles.grey.close}`,
20
- },
21
- name: ansiStyles.magenta,
22
- },
23
- function: {
24
- name: ansiStyles.blue,
25
- stringTag: ansiStyles.magenta,
26
- },
27
- global: ansiStyles.magenta,
28
- item: {
29
- after: forceColor.grey(','),
30
- },
31
- list: {
32
- openBracket: forceColor.grey('['),
33
- closeBracket: forceColor.grey(']'),
34
- },
35
- mapEntry: {
36
- after: forceColor.grey(','),
37
- },
38
- maxDepth: forceColor.grey('…'),
39
- null: ansiStyles.yellow,
40
- number: ansiStyles.yellow,
41
- object: {
42
- openBracket: forceColor.grey('{'),
43
- closeBracket: forceColor.grey('}'),
44
- ctor: ansiStyles.magenta,
45
- stringTag: {
46
- open: `${ansiStyles.magenta.open}@`,
47
- close: ansiStyles.magenta.close,
48
- },
49
- secondaryStringTag: {
50
- open: `${ansiStyles.grey.open}@`,
51
- close: ansiStyles.grey.close,
52
- },
53
- },
54
- property: {
55
- after: forceColor.grey(','),
56
- keyBracket: { open: forceColor.grey('['), close: forceColor.grey(']') },
57
- valueFallback: forceColor.grey('…'),
58
- },
59
- regexp: {
60
- source: {
61
- open: `${ansiStyles.blue.open}/`,
62
- close: `/${ansiStyles.blue.close}`,
63
- },
64
- flags: ansiStyles.yellow,
65
- },
66
- stats: { separator: forceColor.grey('---') },
67
- string: {
68
- open: ansiStyles.white.open,
69
- close: ansiStyles.white.close,
70
- line: { open: forceColor.white("'"), close: forceColor.white("'") },
71
- multiline: { start: forceColor.white('`'), end: forceColor.white('`') },
72
- controlPicture: ansiStyles.grey,
73
- diff: {
74
- insert: {
75
- open: ansiStyles.bgGreen.open + ansiStyles.black.open,
76
- close: ansiStyles.black.close + ansiStyles.bgGreen.close,
77
- },
78
- delete: {
79
- open: ansiStyles.bgRed.open + ansiStyles.black.open,
80
- close: ansiStyles.black.close + ansiStyles.bgRed.close,
81
- },
82
- equal: ansiStyles.white,
83
- insertLine: {
84
- open: ansiStyles.green.open,
85
- close: ansiStyles.green.close,
86
- },
87
- deleteLine: {
88
- open: ansiStyles.red.open,
89
- close: ansiStyles.red.close,
90
- },
91
- },
92
- },
93
- symbol: ansiStyles.yellow,
94
- typedArray: {
95
- bytes: ansiStyles.yellow,
96
- },
97
- undefined: ansiStyles.yellow,
98
- };
99
- // @ts-expect-error TS(7034) FIXME: Variable 'plugins' implicitly has type 'any[]' in ... Remove this comment to see the full error message
100
- const plugins = [];
101
- const theme = colorTheme;
102
- // @ts-expect-error TS(7005) FIXME: Variable 'plugins' implicitly has an 'any[]' type.
103
- export const concordanceOptions = { maxDepth: 3, plugins, theme };
104
- // @ts-expect-error TS(7005) FIXME: Variable 'plugins' implicitly has an 'any[]' type.
105
- export const concordanceDiffOptions = { maxDepth: 1, plugins, theme };
@@ -1,12 +0,0 @@
1
- export default function generatePrompts(settings: any): (false | {
2
- type: string;
3
- name: string;
4
- message: string;
5
- validate?: undefined;
6
- } | {
7
- type: string;
8
- name: string;
9
- message: string;
10
- validate: ((value: any) => string | true) | (() => boolean);
11
- } | undefined)[];
12
- //# sourceMappingURL=prompts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/utils/addons/prompts.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,QAAQ,KAAA;;;;;;;;;;iBAoE/C"}
@@ -1,90 +0,0 @@
1
- import { chalk } from '../command-helpers.js';
2
- /* programmatically generate CLI prompts */
3
- // @ts-expect-error TS(7006) FIXME: Parameter 'settings' implicitly has an 'any' type.
4
- export default function generatePrompts(settings) {
5
- const { config, configValues } = settings;
6
- const configItems = Object.keys(config);
7
- return configItems
8
- .map((key, index) => {
9
- const setting = config[key];
10
- // const { type, displayName } = setting
11
- let prompt;
12
- // Tell user to use types
13
- if (!setting.type) {
14
- console.log(`⚠️ ${chalk.yellowBright(`Warning: no \`type\` is set for config key: ${configItems[index]}`)}`);
15
- console.log(`It's highly recommended that you type your configuration values. It will help with automatic documentation, sharing of your services, and make your services configurable through a GUI`);
16
- console.log('');
17
- }
18
- // Handle shorthand config. Probably will be removed. Severely limited + not great UX
19
- if (typeof setting === 'string' || typeof setting === 'boolean') {
20
- if (typeof setting === 'string') {
21
- prompt = {
22
- type: 'input',
23
- name: key,
24
- message: `Enter string value for '${key}':`,
25
- };
26
- // if current stage value set show as default
27
- if (configValues[key]) {
28
- // @ts-expect-error TS(2339) FIXME: Property 'default' does not exist on type '{ type:... Remove this comment to see the full error message
29
- prompt.default = configValues[key];
30
- }
31
- }
32
- else if (typeof setting === 'boolean') {
33
- prompt = {
34
- type: 'confirm',
35
- name: key,
36
- message: `Do you want '${key}':`,
37
- };
38
- }
39
- return prompt;
40
- }
41
- // For future use. Once UX is decided
42
- // const defaultValidation = (setting.required) ? validateRequired : noValidate
43
- const defaultValidation = noValidate;
44
- const validateFunction = setting.pattern ? validate(setting.pattern) : defaultValidation;
45
- const isRequiredText = setting.required ? ` (${chalk.yellow('required')})` : '';
46
- if (setting.type === 'string' || /string/.test(setting.type)) {
47
- prompt = {
48
- type: 'input',
49
- name: key,
50
- message: `${chalk.white(key)}${isRequiredText} - ${setting.displayName}` || `Please enter value for ${key}`,
51
- validate: validateFunction,
52
- };
53
- // if value previously set show it
54
- if (configValues[key]) {
55
- // @ts-expect-error TS(2339) FIXME: Property 'default' does not exist on type '{ type:... Remove this comment to see the full error message
56
- prompt.default = configValues[key];
57
- // else show default value if provided
58
- }
59
- else if (setting.default) {
60
- // @ts-expect-error TS(2339) FIXME: Property 'default' does not exist on type '{ type:... Remove this comment to see the full error message
61
- prompt.default = setting.default;
62
- }
63
- return prompt;
64
- }
65
- return false;
66
- })
67
- .filter(Boolean);
68
- }
69
- const noValidate = function () {
70
- return true;
71
- };
72
- // Will use this soon
73
- // function validateRequired(value) {
74
- // // eslint-disable-line
75
- // if (value) {
76
- // return true
77
- // }
78
- // return `Please enter a value this field is required`
79
- // }
80
- // @ts-expect-error TS(7006) FIXME: Parameter 'pattern' implicitly has an 'any' type.
81
- const validate = function (pattern) {
82
- // @ts-expect-error TS(7006) FIXME: Parameter 'value' implicitly has an 'any' type.
83
- return function validateValue(value) {
84
- const regex = new RegExp(pattern);
85
- if (regex.test(value)) {
86
- return true;
87
- }
88
- return `Please enter a value matching regex pattern: /${chalk.yellowBright(pattern)}/`;
89
- };
90
- };
@@ -1,4 +0,0 @@
1
- export declare const requiredConfigValues: (config: any) => string[];
2
- export declare const missingConfigValues: (requiredConfig: any, providedConfig: any) => any;
3
- export declare const updateConfigValues: (allowedConfig: any, currentConfig: any, newConfig: any) => {};
4
- //# sourceMappingURL=validation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/addons/validation.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,oBAAoB,2BAEhC,CAAA;AAGD,eAAO,MAAM,mBAAmB,mDAG/B,CAAA;AAGD,eAAO,MAAM,kBAAkB,gEAW9B,CAAA"}
@@ -1,22 +0,0 @@
1
- // @ts-expect-error TS(7006) FIXME: Parameter 'config' implicitly has an 'any' type.
2
- export const requiredConfigValues = function (config) {
3
- return Object.keys(config).filter((key) => config[key].required);
4
- };
5
- // @ts-expect-error TS(7006) FIXME: Parameter 'requiredConfig' implicitly has an 'any'... Remove this comment to see the full error message
6
- export const missingConfigValues = function (requiredConfig, providedConfig) {
7
- // @ts-expect-error TS(7006) FIXME: Parameter 'key' implicitly has an 'any' type.
8
- return requiredConfig.filter((key) => !providedConfig[key]);
9
- };
10
- // @ts-expect-error TS(7006) FIXME: Parameter 'allowedConfig' implicitly has an 'any' ... Remove this comment to see the full error message
11
- export const updateConfigValues = function (allowedConfig, currentConfig, newConfig) {
12
- return Object.keys(allowedConfig).reduce((acc, key) => {
13
- if (newConfig[key]) {
14
- // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
15
- acc[key] = newConfig[key];
16
- return acc;
17
- }
18
- // @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
19
- acc[key] = currentConfig[key];
20
- return acc;
21
- }, {});
22
- };
@@ -1,5 +0,0 @@
1
- export declare const detectNodeVersion: ({ baseDirectory, env }: {
2
- baseDirectory: any;
3
- env: any;
4
- }) => Promise<`${number}.${number}.${number}${string}`>;
5
- //# sourceMappingURL=node-version.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"node-version.d.ts","sourceRoot":"","sources":["../../../src/utils/init/node-version.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,iBAAiB;;;uDAiB7B,CAAA"}
@@ -1,25 +0,0 @@
1
- import { readFile } from 'fs/promises';
2
- import { locatePath } from 'locate-path';
3
- import nodeVersionAlias from 'node-version-alias';
4
- import { warn } from '../command-helpers.js';
5
- const DEFAULT_NODE_VERSION = '12.18.0';
6
- const NVM_FLAG_PREFIX = '--';
7
- // to support NODE_VERSION=--lts, etc.
8
- // @ts-expect-error TS(7006) FIXME: Parameter 'version' implicitly has an 'any' type.
9
- const normalizeConfiguredVersion = (version) => version.startsWith(NVM_FLAG_PREFIX) ? version.slice(NVM_FLAG_PREFIX.length) : version;
10
- // @ts-expect-error TS(7031) FIXME: Binding element 'baseDirectory' implicitly has an ... Remove this comment to see the full error message
11
- export const detectNodeVersion = async ({ baseDirectory, env }) => {
12
- try {
13
- const nodeVersionFile = await locatePath(['.nvmrc', '.node-version'], { cwd: baseDirectory });
14
- const configuredVersion = nodeVersionFile === undefined ? env.NODE_VERSION?.value : await readFile(nodeVersionFile, 'utf8');
15
- const version = configuredVersion === undefined || configuredVersion === null
16
- ? DEFAULT_NODE_VERSION
17
- : await nodeVersionAlias(normalizeConfiguredVersion(configuredVersion));
18
- return version;
19
- }
20
- catch (error) {
21
- // @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
22
- warn(`Failed detecting Node.js version: ${error.message}`);
23
- return DEFAULT_NODE_VERSION;
24
- }
25
- };