@teambit/cli 0.0.861 → 0.0.863
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_harmony_cli-preview.js +1 -1
- package/artifacts/schema.json +1016 -839
- package/dist/cli-parser.d.ts +35 -0
- package/dist/cli.aspect.d.ts +4 -0
- package/dist/cli.cmd.d.ts +32 -0
- package/dist/cli.composition.d.ts +1 -0
- package/dist/cli.main.runtime.d.ts +85 -0
- package/dist/command-runner.d.ts +29 -0
- package/dist/completion.cmd.d.ts +8 -0
- package/dist/exceptions/already-exists.d.ts +4 -0
- package/dist/exceptions/command-not-found.d.ts +7 -0
- package/dist/exceptions/index.d.ts +1 -0
- package/dist/generate-doc-md.d.ts +25 -0
- package/dist/get-command-id.d.ts +1 -0
- package/dist/help.cmd.d.ts +16 -0
- package/dist/help.d.ts +3 -0
- package/dist/index.d.ts +6 -0
- package/dist/legacy-command-adapter.d.ts +29 -0
- package/dist/legacy-command-adapter.js.map +1 -1
- package/dist/{preview-1712805335812.js → preview-1714533890836.js} +2 -2
- package/dist/version.cmd.d.ts +14 -0
- package/dist/yargs-adapter.d.ts +20 -0
- package/package.json +4 -4
- package/tsconfig.json +1 -7
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import yargs from 'yargs';
|
|
2
|
+
import { Command } from '@teambit/legacy/dist/cli/command';
|
|
3
|
+
import { GroupsType } from '@teambit/legacy/dist/cli/command-groups';
|
|
4
|
+
import { OnCommandStartSlot } from './cli.main.runtime';
|
|
5
|
+
export declare class CLIParser {
|
|
6
|
+
private commands;
|
|
7
|
+
private groups;
|
|
8
|
+
private onCommandStartSlot;
|
|
9
|
+
parser: yargs.Argv<{}>;
|
|
10
|
+
constructor(commands: Command[], groups: GroupsType, onCommandStartSlot: OnCommandStartSlot);
|
|
11
|
+
parse(args?: string[]): Promise<void>;
|
|
12
|
+
private setHelpMiddleware;
|
|
13
|
+
private handleCommandFailure;
|
|
14
|
+
private configureCompletion;
|
|
15
|
+
private printHelp;
|
|
16
|
+
private configureParser;
|
|
17
|
+
private parseCommandWithSubCommands;
|
|
18
|
+
private getYargsCommand;
|
|
19
|
+
private configureGlobalFlags;
|
|
20
|
+
private throwForNonExistsCommand;
|
|
21
|
+
/**
|
|
22
|
+
* manipulate the command help output. there is no API from Yarn to do any of this, so it needs to be done manually.
|
|
23
|
+
* see https://github.com/yargs/yargs/issues/1956
|
|
24
|
+
*
|
|
25
|
+
* the original order of the output:
|
|
26
|
+
* description
|
|
27
|
+
* Options
|
|
28
|
+
* Commands
|
|
29
|
+
* Global
|
|
30
|
+
* Positionals
|
|
31
|
+
* Examples
|
|
32
|
+
*/
|
|
33
|
+
private logCommandHelp;
|
|
34
|
+
private findCommandByArgv;
|
|
35
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Command } from '@teambit/legacy/dist/cli/command';
|
|
2
|
+
import type { CommandOptions } from '@teambit/legacy/dist/cli/legacy-command';
|
|
3
|
+
import { CLIMain } from './cli.main.runtime';
|
|
4
|
+
import { GenerateOpts } from './generate-doc-md';
|
|
5
|
+
export declare class CliGenerateCmd implements Command {
|
|
6
|
+
private cliMain;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
alias: string;
|
|
10
|
+
loader: boolean;
|
|
11
|
+
group: string;
|
|
12
|
+
options: CommandOptions;
|
|
13
|
+
constructor(cliMain: CLIMain);
|
|
14
|
+
report(args: any, { metadata, docs }: GenerateOpts & {
|
|
15
|
+
docs?: boolean;
|
|
16
|
+
}): Promise<string>;
|
|
17
|
+
json(): Promise<(Partial<Command> & {
|
|
18
|
+
commands?: any;
|
|
19
|
+
})[]>;
|
|
20
|
+
}
|
|
21
|
+
export declare class CliCmd implements Command {
|
|
22
|
+
private cliMain;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
alias: string;
|
|
26
|
+
commands: Command[];
|
|
27
|
+
loader: boolean;
|
|
28
|
+
group: string;
|
|
29
|
+
options: CommandOptions;
|
|
30
|
+
constructor(cliMain: CLIMain);
|
|
31
|
+
report(): Promise<string>;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { SlotRegistry } from '@teambit/harmony';
|
|
2
|
+
import { CLIArgs, Flags, Command } from '@teambit/legacy/dist/cli/command';
|
|
3
|
+
import { GroupsType } from '@teambit/legacy/dist/cli/command-groups';
|
|
4
|
+
import { Logger, LoggerMain } from '@teambit/logger';
|
|
5
|
+
export type CommandList = Array<Command>;
|
|
6
|
+
export type OnStart = (hasWorkspace: boolean, currentCommand: string) => Promise<void>;
|
|
7
|
+
export type OnCommandStart = (commandName: string, args: CLIArgs, flags: Flags) => Promise<void>;
|
|
8
|
+
export type OnBeforeExitFn = () => Promise<void>;
|
|
9
|
+
export type OnStartSlot = SlotRegistry<OnStart>;
|
|
10
|
+
export type OnCommandStartSlot = SlotRegistry<OnCommandStart>;
|
|
11
|
+
export type CommandsSlot = SlotRegistry<CommandList>;
|
|
12
|
+
export type OnBeforeExitSlot = SlotRegistry<OnBeforeExitFn>;
|
|
13
|
+
export declare class CLIMain {
|
|
14
|
+
private commandsSlot;
|
|
15
|
+
private onStartSlot;
|
|
16
|
+
readonly onCommandStartSlot: OnCommandStartSlot;
|
|
17
|
+
private onBeforeExitSlot;
|
|
18
|
+
private logger;
|
|
19
|
+
groups: GroupsType;
|
|
20
|
+
constructor(commandsSlot: CommandsSlot, onStartSlot: OnStartSlot, onCommandStartSlot: OnCommandStartSlot, onBeforeExitSlot: OnBeforeExitSlot, logger: Logger);
|
|
21
|
+
/**
|
|
22
|
+
* registers a new command in to the CLI.
|
|
23
|
+
*/
|
|
24
|
+
register(...commands: CommandList): void;
|
|
25
|
+
/**
|
|
26
|
+
* helpful for having the same command name in different environments (e.g. legacy and non-legacy).
|
|
27
|
+
* for example `cli.unregister('tag');` removes the "bit tag" command.
|
|
28
|
+
*/
|
|
29
|
+
unregister(commandName: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* list of all registered commands. (legacy and new).
|
|
32
|
+
*/
|
|
33
|
+
get commands(): CommandList;
|
|
34
|
+
/**
|
|
35
|
+
* get an instance of a registered command. (useful for aspects to modify and extend existing commands)
|
|
36
|
+
*/
|
|
37
|
+
getCommand(name: string): Command | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* when running `bit help`, commands are grouped by categories.
|
|
40
|
+
* this method helps registering a new group by providing its name and a description.
|
|
41
|
+
* the name is what needs to be assigned to the `group` property of the Command interface.
|
|
42
|
+
* the description is what shown in the `bit help` output.
|
|
43
|
+
*/
|
|
44
|
+
registerGroup(name: string, description: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* onStart is when bootstrapping the CLI. (it happens before onCommandStart)
|
|
47
|
+
*/
|
|
48
|
+
registerOnStart(onStartFn: OnStart): this;
|
|
49
|
+
/**
|
|
50
|
+
* onCommandStart is when a command is about to start and we have the command object and the parsed args and flags
|
|
51
|
+
* already. (it happens after onStart)
|
|
52
|
+
*/
|
|
53
|
+
registerOnCommandStart(onCommandStartFn: OnCommandStart): this;
|
|
54
|
+
/**
|
|
55
|
+
* This will register a function to be called before the process exits.
|
|
56
|
+
* This will run only for "regular" exits
|
|
57
|
+
* e.g.
|
|
58
|
+
* yes - command run and finished successfully
|
|
59
|
+
* yes - command run and failed gracefully (code 1)
|
|
60
|
+
* not SIGKILL (kill -9)
|
|
61
|
+
* not SIGINT (Ctrl+C)
|
|
62
|
+
* not SIGTERM (kill)
|
|
63
|
+
* not uncaughtException
|
|
64
|
+
* not unhandledRejection
|
|
65
|
+
*
|
|
66
|
+
* @param onBeforeExitFn
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
registerOnBeforeExit(onBeforeExitFn: OnBeforeExitFn): this;
|
|
70
|
+
/**
|
|
71
|
+
* execute commands registered to this aspect.
|
|
72
|
+
*/
|
|
73
|
+
run(hasWorkspace: boolean): Promise<void>;
|
|
74
|
+
private invokeOnStart;
|
|
75
|
+
private setDefaults;
|
|
76
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
77
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
78
|
+
static slots: (((registerFn: () => string) => SlotRegistry<CommandList>) | ((registerFn: () => string) => SlotRegistry<OnStart>) | ((registerFn: () => string) => SlotRegistry<OnCommandStart>))[];
|
|
79
|
+
static provider([loggerMain]: [LoggerMain], config: any, [commandsSlot, onStartSlot, onCommandStartSlot, onBeforeExitSlot]: [
|
|
80
|
+
CommandsSlot,
|
|
81
|
+
OnStartSlot,
|
|
82
|
+
OnCommandStartSlot,
|
|
83
|
+
OnBeforeExitSlot
|
|
84
|
+
]): Promise<CLIMain>;
|
|
85
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CLIArgs, Command, Flags } from '@teambit/legacy/dist/cli/command';
|
|
2
|
+
import { OnCommandStartSlot } from './cli.main.runtime';
|
|
3
|
+
export declare class CommandRunner {
|
|
4
|
+
private command;
|
|
5
|
+
private args;
|
|
6
|
+
private flags;
|
|
7
|
+
private onCommandStartSlot;
|
|
8
|
+
private commandName;
|
|
9
|
+
constructor(command: Command, args: CLIArgs, flags: Flags, onCommandStartSlot: OnCommandStartSlot);
|
|
10
|
+
/**
|
|
11
|
+
* run command using one of the handler, "json"/"report"/"render". once done, exit the process.
|
|
12
|
+
*/
|
|
13
|
+
runCommand(): Promise<boolean | void | null>;
|
|
14
|
+
private bootstrapCommand;
|
|
15
|
+
private invokeOnCommandStart;
|
|
16
|
+
/**
|
|
17
|
+
* this works for both, Harmony commands and Legacy commands (the legacy-command-adapter
|
|
18
|
+
* implements json() method)
|
|
19
|
+
*/
|
|
20
|
+
private runJsonHandler;
|
|
21
|
+
private runReportHandler;
|
|
22
|
+
private runWaitHandler;
|
|
23
|
+
/**
|
|
24
|
+
* the loader and logger.console write output to the console during the command execution.
|
|
25
|
+
* for internals commands, such as, _put, _fetch, the command.loader = false.
|
|
26
|
+
*/
|
|
27
|
+
private determineConsoleWritingDuringCommand;
|
|
28
|
+
private writeAndExit;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AlreadyExistsError } from './already-exists';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Command } from '@teambit/legacy/dist/cli/command';
|
|
2
|
+
export type GenerateOpts = {
|
|
3
|
+
metadata?: Record<string, string>;
|
|
4
|
+
};
|
|
5
|
+
type CommandObject = ReturnType<typeof oneCommandToObject> & {
|
|
6
|
+
commands?: any;
|
|
7
|
+
};
|
|
8
|
+
export declare class GenerateCommandsDoc {
|
|
9
|
+
private commands;
|
|
10
|
+
private options;
|
|
11
|
+
constructor(commands: Command[], options: GenerateOpts);
|
|
12
|
+
generate(): string;
|
|
13
|
+
generateJson(): CommandObject[];
|
|
14
|
+
private commandsToObjects;
|
|
15
|
+
private getFrontmatter;
|
|
16
|
+
private getAllPublicCommandsSorted;
|
|
17
|
+
private generateCommand;
|
|
18
|
+
private generateSubCommands;
|
|
19
|
+
private generateArguments;
|
|
20
|
+
private generateOptions;
|
|
21
|
+
private formatStringToMD;
|
|
22
|
+
private formatDescription;
|
|
23
|
+
}
|
|
24
|
+
declare function oneCommandToObject(command: Command): Partial<Command>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getCommandId(cmdName: string): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Command } from '@teambit/legacy/dist/cli/command';
|
|
2
|
+
import type { CommandOptions } from '@teambit/legacy/dist/cli/legacy-command';
|
|
3
|
+
import { CLIMain } from './cli.main.runtime';
|
|
4
|
+
export declare class HelpCmd implements Command {
|
|
5
|
+
private cliMain;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
alias: string;
|
|
9
|
+
loader: boolean;
|
|
10
|
+
group: string;
|
|
11
|
+
options: CommandOptions;
|
|
12
|
+
constructor(cliMain: CLIMain);
|
|
13
|
+
report(_: any, { internal }: {
|
|
14
|
+
internal: boolean;
|
|
15
|
+
}): Promise<string>;
|
|
16
|
+
}
|
package/dist/help.d.ts
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CLIAspect, MainRuntime } from './cli.aspect';
|
|
2
|
+
export type { CLIMain, CommandList, CommandsSlot } from './cli.main.runtime';
|
|
3
|
+
export type { Command, CLIArgs, Flags, GenericObject } from '@teambit/legacy/dist/cli/command';
|
|
4
|
+
export type { CommandOptions } from '@teambit/legacy/dist/cli/legacy-command';
|
|
5
|
+
export * from './exceptions';
|
|
6
|
+
export { CLIAspect as default, MainRuntime, CLIAspect };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CommandOptions, LegacyCommand } from '@teambit/legacy/dist/cli/legacy-command';
|
|
2
|
+
import type { Command, GenericObject } from '@teambit/legacy/dist/cli/command';
|
|
3
|
+
import { CLIMain } from './cli.main.runtime';
|
|
4
|
+
export declare class LegacyCommandAdapter implements Command {
|
|
5
|
+
private cmd;
|
|
6
|
+
alias: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
options: CommandOptions;
|
|
10
|
+
extendedDescription?: string;
|
|
11
|
+
group?: string;
|
|
12
|
+
loader?: boolean;
|
|
13
|
+
commands: Command[];
|
|
14
|
+
private?: boolean;
|
|
15
|
+
skipWorkspace?: boolean;
|
|
16
|
+
helpUrl?: string;
|
|
17
|
+
_packageManagerArgs?: string[];
|
|
18
|
+
constructor(cmd: LegacyCommand, cliExtension: CLIMain);
|
|
19
|
+
private action;
|
|
20
|
+
report(params: any, options: {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}): Promise<{
|
|
23
|
+
data: string;
|
|
24
|
+
code: number;
|
|
25
|
+
}>;
|
|
26
|
+
json(params: any, options: {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}): Promise<GenericObject>;
|
|
29
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LegacyCommandAdapter","constructor","cmd","cliExtension","_defineProperty","name","description","helpUrl","options","opts","alias","extendedDescription","skipWorkspace","group","loader","private","commands","map","sub","action","params","res","_packageManagerArgs","data","code","__code","undefined","report","actionResult","json","JSON","parse","exports"],"sources":["legacy-command-adapter.ts"],"sourcesContent":["import { LegacyCommand } from '@teambit/legacy/dist/cli/legacy-command';\nimport { Command,
|
|
1
|
+
{"version":3,"names":["LegacyCommandAdapter","constructor","cmd","cliExtension","_defineProperty","name","description","helpUrl","options","opts","alias","extendedDescription","skipWorkspace","group","loader","private","commands","map","sub","action","params","res","_packageManagerArgs","data","code","__code","undefined","report","actionResult","json","JSON","parse","exports"],"sources":["legacy-command-adapter.ts"],"sourcesContent":["import { CommandOptions, LegacyCommand } from '@teambit/legacy/dist/cli/legacy-command';\nimport type { Command, GenericObject } from '@teambit/legacy/dist/cli/command';\nimport { CLIMain } from './cli.main.runtime';\n\nexport class LegacyCommandAdapter implements Command {\n alias: string;\n name: string;\n description: string;\n options: CommandOptions;\n extendedDescription?: string;\n group?: string;\n loader?: boolean;\n commands: Command[];\n private?: boolean;\n skipWorkspace?: boolean;\n helpUrl?: string;\n _packageManagerArgs?: string[];\n constructor(private cmd: LegacyCommand, cliExtension: CLIMain) {\n this.name = cmd.name;\n this.description = cmd.description;\n this.helpUrl = cmd.helpUrl;\n this.options = cmd.opts || [];\n this.alias = cmd.alias;\n this.extendedDescription = cmd.extendedDescription;\n this.skipWorkspace = cmd.skipWorkspace;\n this.group = cmd.group;\n this.loader = cmd.loader;\n this.private = cmd.private;\n this.commands = (cmd.commands || []).map((sub) => new LegacyCommandAdapter(sub, cliExtension));\n }\n\n private async action(params: any, options: { [key: string]: any }): Promise<ActionResult> {\n const res = await this.cmd.action(params, options, this._packageManagerArgs);\n let data = res;\n let code = 0;\n if (res && res.__code !== undefined) {\n data = res.data;\n code = res.__code;\n }\n const report = this.cmd.report(data, params, options);\n return {\n code,\n report,\n };\n }\n\n async report(params: any, options: { [key: string]: any }): Promise<{ data: string; code: number }> {\n const actionResult = await this.action(params, options);\n return { data: actionResult.report, code: actionResult.code };\n }\n\n async json(params: any, options: { [key: string]: any }): Promise<GenericObject> {\n const actionResult = await this.action(params, options);\n return {\n data: JSON.parse(actionResult.report),\n code: actionResult.code,\n };\n }\n}\n\ntype ActionResult = {\n code: number;\n report: string;\n};\n"],"mappings":";;;;;;;;;AAIO,MAAMA,oBAAoB,CAAoB;EAanDC,WAAWA,CAASC,GAAkB,EAAEC,YAAqB,EAAE;IAAA,KAA3CD,GAAkB,GAAlBA,GAAkB;IAAAE,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IACpC,IAAI,CAACC,IAAI,GAAGH,GAAG,CAACG,IAAI;IACpB,IAAI,CAACC,WAAW,GAAGJ,GAAG,CAACI,WAAW;IAClC,IAAI,CAACC,OAAO,GAAGL,GAAG,CAACK,OAAO;IAC1B,IAAI,CAACC,OAAO,GAAGN,GAAG,CAACO,IAAI,IAAI,EAAE;IAC7B,IAAI,CAACC,KAAK,GAAGR,GAAG,CAACQ,KAAK;IACtB,IAAI,CAACC,mBAAmB,GAAGT,GAAG,CAACS,mBAAmB;IAClD,IAAI,CAACC,aAAa,GAAGV,GAAG,CAACU,aAAa;IACtC,IAAI,CAACC,KAAK,GAAGX,GAAG,CAACW,KAAK;IACtB,IAAI,CAACC,MAAM,GAAGZ,GAAG,CAACY,MAAM;IACxB,IAAI,CAACC,OAAO,GAAGb,GAAG,CAACa,OAAO;IAC1B,IAAI,CAACC,QAAQ,GAAG,CAACd,GAAG,CAACc,QAAQ,IAAI,EAAE,EAAEC,GAAG,CAAEC,GAAG,IAAK,IAAIlB,oBAAoB,CAACkB,GAAG,EAAEf,YAAY,CAAC,CAAC;EAChG;EAEA,MAAcgB,MAAMA,CAACC,MAAW,EAAEZ,OAA+B,EAAyB;IACxF,MAAMa,GAAG,GAAG,MAAM,IAAI,CAACnB,GAAG,CAACiB,MAAM,CAACC,MAAM,EAAEZ,OAAO,EAAE,IAAI,CAACc,mBAAmB,CAAC;IAC5E,IAAIC,IAAI,GAAGF,GAAG;IACd,IAAIG,IAAI,GAAG,CAAC;IACZ,IAAIH,GAAG,IAAIA,GAAG,CAACI,MAAM,KAAKC,SAAS,EAAE;MACnCH,IAAI,GAAGF,GAAG,CAACE,IAAI;MACfC,IAAI,GAAGH,GAAG,CAACI,MAAM;IACnB;IACA,MAAME,MAAM,GAAG,IAAI,CAACzB,GAAG,CAACyB,MAAM,CAACJ,IAAI,EAAEH,MAAM,EAAEZ,OAAO,CAAC;IACrD,OAAO;MACLgB,IAAI;MACJG;IACF,CAAC;EACH;EAEA,MAAMA,MAAMA,CAACP,MAAW,EAAEZ,OAA+B,EAA2C;IAClG,MAAMoB,YAAY,GAAG,MAAM,IAAI,CAACT,MAAM,CAACC,MAAM,EAAEZ,OAAO,CAAC;IACvD,OAAO;MAAEe,IAAI,EAAEK,YAAY,CAACD,MAAM;MAAEH,IAAI,EAAEI,YAAY,CAACJ;IAAK,CAAC;EAC/D;EAEA,MAAMK,IAAIA,CAACT,MAAW,EAAEZ,OAA+B,EAA0B;IAC/E,MAAMoB,YAAY,GAAG,MAAM,IAAI,CAACT,MAAM,CAACC,MAAM,EAAEZ,OAAO,CAAC;IACvD,OAAO;MACLe,IAAI,EAAEO,IAAI,CAACC,KAAK,CAACH,YAAY,CAACD,MAAM,CAAC;MACrCH,IAAI,EAAEI,YAAY,CAACJ;IACrB,CAAC;EACH;AACF;AAACQ,OAAA,CAAAhC,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.863/dist/cli.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_cli@0.0.863/dist/cli.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Command } from '@teambit/legacy/dist/cli/command';
|
|
2
|
+
import type { CommandOptions } from '@teambit/legacy/dist/cli/legacy-command';
|
|
3
|
+
export declare class VersionCmd implements Command {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
alias: string;
|
|
7
|
+
loader: boolean;
|
|
8
|
+
group: string;
|
|
9
|
+
options: CommandOptions;
|
|
10
|
+
report(): Promise<any>;
|
|
11
|
+
json(): Promise<{
|
|
12
|
+
bit: any;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Command } from '@teambit/legacy/dist/cli/command';
|
|
2
|
+
import { Arguments, CommandModule, Argv, Options } from 'yargs';
|
|
3
|
+
import { OnCommandStartSlot } from './cli.main.runtime';
|
|
4
|
+
export declare const GLOBAL_GROUP = "Global";
|
|
5
|
+
export declare const STANDARD_GROUP = "Options";
|
|
6
|
+
export declare class YargsAdapter implements CommandModule {
|
|
7
|
+
private commanderCommand;
|
|
8
|
+
private onCommandStartSlot;
|
|
9
|
+
command: string;
|
|
10
|
+
describe?: string;
|
|
11
|
+
aliases?: string;
|
|
12
|
+
constructor(commanderCommand: Command, onCommandStartSlot: OnCommandStartSlot);
|
|
13
|
+
builder(yargs: Argv): Argv<{}>;
|
|
14
|
+
handler(argv: Arguments): Promise<boolean | void | null>;
|
|
15
|
+
get positional(): import("@teambit/legacy/dist/cli/command").CommandArg[] | undefined;
|
|
16
|
+
static optionsToBuilder(command: Command): {
|
|
17
|
+
[key: string]: Options;
|
|
18
|
+
};
|
|
19
|
+
static getGlobalOptions(command: Command): Record<string, any>;
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.863",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/cli",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "cli",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.863"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"pad-right": "0.2.2",
|
|
18
18
|
"@teambit/harmony": "0.4.6",
|
|
19
19
|
"@teambit/bit-error": "0.0.404",
|
|
20
|
-
"@teambit/logger": "0.0.
|
|
20
|
+
"@teambit/logger": "0.0.956"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/didyoumean": "1.2.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@types/yargs": "17.0.0",
|
|
26
26
|
"@types/mocha": "9.1.0",
|
|
27
27
|
"chai": "4.3.0",
|
|
28
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
28
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.33"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "^17.0.0 || ^18.0.0",
|
package/tsconfig.json
CHANGED
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
24
|
-
"composite": true
|
|
23
|
+
"noImplicitAny": false
|
|
25
24
|
},
|
|
26
25
|
"exclude": [
|
|
27
26
|
"artifacts",
|
|
@@ -36,10 +35,5 @@
|
|
|
36
35
|
"include": [
|
|
37
36
|
"**/*",
|
|
38
37
|
"**/*.json"
|
|
39
|
-
],
|
|
40
|
-
"references": [
|
|
41
|
-
{
|
|
42
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.954"
|
|
43
|
-
}
|
|
44
38
|
]
|
|
45
39
|
}
|