netlify-cli 19.0.1-rc.0 → 19.0.1-rc.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/completion/completion.d.ts +4 -4
- package/dist/commands/completion/completion.d.ts.map +1 -1
- package/dist/commands/completion/completion.js +4 -4
- package/dist/lib/completion/script.js +3 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/framework-server.d.ts.map +1 -1
- package/dist/utils/framework-server.js +2 -3
- package/dist/utils/proxy.d.ts.map +1 -1
- package/dist/utils/proxy.js +55 -22
- package/dist/utils/run-build.d.ts.map +1 -1
- package/dist/utils/run-build.js +1 -0
- package/dist/utils/types.d.ts +2 -0
- package/dist/utils/types.d.ts.map +1 -1
- package/functions-templates/javascript/scheduled-function/package.json +1 -1
- package/functions-templates/typescript/hello-world/package-lock.json +15 -46
- package/functions-templates/typescript/hello-world/package.json +1 -1
- package/functions-templates/typescript/scheduled-function/package.json +1 -1
- package/npm-shrinkwrap.json +485 -1234
- package/package.json +11 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OptionValues } from 'commander';
|
|
2
|
-
import BaseCommand from '../base-command.js';
|
|
3
|
-
export declare const completionGenerate: (
|
|
4
|
-
export declare const completionUninstall: (
|
|
1
|
+
import type { OptionValues } from 'commander';
|
|
2
|
+
import type BaseCommand from '../base-command.js';
|
|
3
|
+
export declare const completionGenerate: (_options: OptionValues, command: BaseCommand) => Promise<void>;
|
|
4
|
+
export declare const completionUninstall: (_options: OptionValues, command: BaseCommand) => Promise<void>;
|
|
5
5
|
//# sourceMappingURL=completion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../../src/commands/completion/completion.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../../src/commands/completion/completion.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAY7C,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAA;AAIjD,eAAO,MAAM,kBAAkB,aAAoB,YAAY,WAAW,WAAW,kBAiEpF,CAAA;AAED,eAAO,MAAM,mBAAmB,aAAoB,YAAY,WAAW,WAAW,kBAQrF,CAAA"}
|
|
@@ -3,11 +3,11 @@ import { homedir } from 'os';
|
|
|
3
3
|
import { dirname, join } from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
import inquirer from 'inquirer';
|
|
6
|
-
import { install, uninstall } from 'tabtab';
|
|
6
|
+
import { install, uninstall } from '@pnpm/tabtab';
|
|
7
7
|
import { generateAutocompletion } from '../../lib/completion/index.js';
|
|
8
8
|
import { error, log, chalk, checkFileForLine, TABTAB_CONFIG_LINE, AUTOLOAD_COMPINIT, } from '../../utils/command-helpers.js';
|
|
9
9
|
const completer = join(dirname(fileURLToPath(import.meta.url)), '../../lib/completion/script.js');
|
|
10
|
-
export const completionGenerate = async (
|
|
10
|
+
export const completionGenerate = async (_options, command) => {
|
|
11
11
|
const { parent } = command;
|
|
12
12
|
if (!parent) {
|
|
13
13
|
error(`There has been an error generating the completion script.`);
|
|
@@ -40,7 +40,7 @@ export const completionGenerate = async (options, command) => {
|
|
|
40
40
|
},
|
|
41
41
|
]);
|
|
42
42
|
if (compinitAdded) {
|
|
43
|
-
|
|
43
|
+
fs.readFile(zshConfigFilepath, 'utf8', (_err, data) => {
|
|
44
44
|
const updatedZshFile = AUTOLOAD_COMPINIT + '\n' + data;
|
|
45
45
|
fs.writeFileSync(zshConfigFilepath, updatedZshFile, 'utf8');
|
|
46
46
|
});
|
|
@@ -57,7 +57,7 @@ export const completionGenerate = async (options, command) => {
|
|
|
57
57
|
log(`\nTo ensure proper functionality, you may need to set appropriate file permissions to ${completer}.`);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
export const completionUninstall = async (
|
|
60
|
+
export const completionUninstall = async (_options, command) => {
|
|
61
61
|
if (!command.parent) {
|
|
62
62
|
error(`There has been an error deleting the completion script.`);
|
|
63
63
|
return;
|
|
@@ -4,24 +4,15 @@
|
|
|
4
4
|
// if this file is renamed or moved then it needs to be adapted there
|
|
5
5
|
import { existsSync, readFileSync } from 'fs';
|
|
6
6
|
import process from 'process';
|
|
7
|
-
import { log, parseEnv } from 'tabtab';
|
|
7
|
+
import { getShellFromEnv, log, parseEnv } from '@pnpm/tabtab';
|
|
8
8
|
import { AUTOCOMPLETION_FILE } from './constants.js';
|
|
9
9
|
import getAutocompletion from './get-autocompletion.js';
|
|
10
|
-
/**
|
|
11
|
-
* @typedef CompletionItem
|
|
12
|
-
* @type import('tabtab').CompletionItem
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @param {import('tabtab').TabtabEnv} env
|
|
17
|
-
* @param {Record<string, CompletionItem & {options: CompletionItem[]}>} program
|
|
18
|
-
* @returns {CompletionItem[]|void}
|
|
19
|
-
*/
|
|
20
10
|
const env = parseEnv(process.env);
|
|
11
|
+
const shell = getShellFromEnv(process.env);
|
|
21
12
|
if (existsSync(AUTOCOMPLETION_FILE)) {
|
|
22
13
|
const program = JSON.parse(readFileSync(AUTOCOMPLETION_FILE, 'utf-8'));
|
|
23
14
|
const autocomplete = getAutocompletion(env, program);
|
|
24
15
|
if (autocomplete && autocomplete.length !== 0) {
|
|
25
|
-
log(autocomplete);
|
|
16
|
+
log(autocomplete, shell);
|
|
26
17
|
}
|
|
27
18
|
}
|