@zitadel/cli 1.0.0-alpha.22 → 1.0.0-alpha.23
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/README.md +2248 -227
- package/SKILLS.md +237 -65
- package/dist/groups-CMB0fMzE.mjs +22 -0
- package/dist/groups-CMB0fMzE.mjs.map +1 -0
- package/dist/index.mjs +16027 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/oclif/help.mjs +67 -0
- package/dist/lib/oclif/help.mjs.map +1 -0
- package/oclif.manifest.json +4577 -185
- package/package.json +40 -8
- package/dist/box-B_mwKole.mjs +0 -35
- package/dist/box-B_mwKole.mjs.map +0 -1
- package/dist/branding-DvoH8e0D.mjs +0 -79
- package/dist/branding-DvoH8e0D.mjs.map +0 -1
- package/dist/claim-state-B6ZSKmhW.mjs +0 -125
- package/dist/claim-state-B6ZSKmhW.mjs.map +0 -1
- package/dist/commands/apply.mjs +0 -81
- package/dist/commands/apply.mjs.map +0 -1
- package/dist/commands/branding/eject.mjs +0 -104
- package/dist/commands/branding/eject.mjs.map +0 -1
- package/dist/commands/claim.mjs +0 -445
- package/dist/commands/claim.mjs.map +0 -1
- package/dist/commands/doctor.mjs +0 -1138
- package/dist/commands/doctor.mjs.map +0 -1
- package/dist/commands/eject.mjs +0 -157
- package/dist/commands/eject.mjs.map +0 -1
- package/dist/commands/logs.mjs +0 -58
- package/dist/commands/logs.mjs.map +0 -1
- package/dist/commands/plan.mjs +0 -65
- package/dist/commands/plan.mjs.map +0 -1
- package/dist/commands/reset.mjs +0 -79
- package/dist/commands/reset.mjs.map +0 -1
- package/dist/commands/schemas/list.mjs +0 -146
- package/dist/commands/schemas/list.mjs.map +0 -1
- package/dist/commands/setup.mjs +0 -1309
- package/dist/commands/setup.mjs.map +0 -1
- package/dist/commands/start.mjs +0 -288
- package/dist/commands/start.mjs.map +0 -1
- package/dist/commands/status.mjs +0 -151
- package/dist/commands/status.mjs.map +0 -1
- package/dist/commands/stop.mjs +0 -105
- package/dist/commands/stop.mjs.map +0 -1
- package/dist/designs-Ckz18Dpo.mjs +0 -38
- package/dist/designs-Ckz18Dpo.mjs.map +0 -1
- package/dist/docker-B1MjOMFo.mjs +0 -436
- package/dist/docker-B1MjOMFo.mjs.map +0 -1
- package/dist/environment-fibXmzM8.mjs +0 -17
- package/dist/environment-fibXmzM8.mjs.map +0 -1
- package/dist/journey-guidance-C9MxJNTg.mjs +0 -40
- package/dist/journey-guidance-C9MxJNTg.mjs.map +0 -1
- package/dist/oclif-JlsN1lfO.mjs +0 -1769
- package/dist/oclif-JlsN1lfO.mjs.map +0 -1
- package/dist/orca-CPMHzmg3.mjs +0 -3917
- package/dist/orca-CPMHzmg3.mjs.map +0 -1
- package/dist/package-manager-CDUsoGBy.mjs +0 -194
- package/dist/package-manager-CDUsoGBy.mjs.map +0 -1
- package/dist/ports-hidBnSW-.mjs +0 -116
- package/dist/ports-hidBnSW-.mjs.map +0 -1
- package/dist/processes-Cv19mJ2I.mjs +0 -120
- package/dist/processes-Cv19mJ2I.mjs.map +0 -1
- package/dist/project-Ba0nriNm.mjs +0 -140
- package/dist/project-Ba0nriNm.mjs.map +0 -1
- package/dist/sync-ChlLQ4vZ.mjs +0 -1633
- package/dist/sync-ChlLQ4vZ.mjs.map +0 -1
- package/dist/user-schema-C2mC-JTN.mjs +0 -91
- package/dist/user-schema-C2mC-JTN.mjs.map +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { n as COMMAND_GROUPS, t as ADDITIONAL_COMMANDS_GROUP } from "../../groups-CMB0fMzE.mjs";
|
|
2
|
+
import { Help, toConfiguredId, ux } from "@oclif/core";
|
|
3
|
+
//#region src/lib/oclif/help.ts
|
|
4
|
+
/**
|
|
5
|
+
* Summaries for oclif plugin commands that ship without one. `version` prints
|
|
6
|
+
* a blank line otherwise.
|
|
7
|
+
*/
|
|
8
|
+
const PLUGIN_SUMMARIES = { version: "Show the CLI version" };
|
|
9
|
+
/**
|
|
10
|
+
* Root help in the style of `gh --help`: a tagline, usage, the commands under
|
|
11
|
+
* headed groups with oclif's utilities last, then flags, examples, and where
|
|
12
|
+
* to go next. Only {@link showRootHelp} is replaced; per-command and
|
|
13
|
+
* per-topic help (`start --help`, `schemas --help`) stay oclif's own. Wired
|
|
14
|
+
* in via `oclif.helpClass` in `package.json`.
|
|
15
|
+
*/
|
|
16
|
+
var ZitadelHelp = class extends Help {
|
|
17
|
+
async showRootHelp() {
|
|
18
|
+
const { bin } = this.config;
|
|
19
|
+
const commands = this.rootCommands();
|
|
20
|
+
const width = Math.max(0, ...commands.map((command) => this.displayName(command).length));
|
|
21
|
+
const list = (entries) => entries.map((command) => `${this.displayName(command).padEnd(width)} ${this.oneLineSummary(command)}`).join("\n");
|
|
22
|
+
const groups = COMMAND_GROUPS.map((group) => [group, byGroup(commands, group)]).filter(([, entries]) => entries.length > 0);
|
|
23
|
+
const additional = commands.filter((command) => command.group === void 0).sort((a, b) => a.id.localeCompare(b.id));
|
|
24
|
+
const sections = [
|
|
25
|
+
this.render(this.config.pjson.oclif.description ?? this.config.pjson.description ?? ""),
|
|
26
|
+
this.section("Usage", `${bin} <command> [flags]`),
|
|
27
|
+
...groups.map(([group, entries]) => this.section(group, list(entries))),
|
|
28
|
+
...additional.length > 0 ? [this.section(ADDITIONAL_COMMANDS_GROUP, list(additional))] : [],
|
|
29
|
+
this.section("Flags", ["--help Show help for command", `--version Show ${bin} version`].join("\n")),
|
|
30
|
+
this.section("Examples", [
|
|
31
|
+
`$ ${bin} setup --framework next`,
|
|
32
|
+
`$ ${bin} start`,
|
|
33
|
+
`$ ${bin} doctor`
|
|
34
|
+
].join("\n")),
|
|
35
|
+
this.section("Learn more", `Use \`${bin} <command> --help\` for more information about a command.`)
|
|
36
|
+
];
|
|
37
|
+
this.log(sections.join("\n\n"));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The commands the root screen lists: every visible command, grouped or
|
|
41
|
+
* not, whatever its depth. Alias entries and `help` itself are left out.
|
|
42
|
+
*/
|
|
43
|
+
rootCommands() {
|
|
44
|
+
return this.sortedCommands.filter((command) => command.id !== "help" && !command.aliases?.includes(command.id));
|
|
45
|
+
}
|
|
46
|
+
displayName(command) {
|
|
47
|
+
return `${toConfiguredId(command.id, this.config)}:`;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The summary as `gh` prints it: the first clause of the summary or
|
|
51
|
+
* description, with no trailing full stop. Built from the raw statics rather
|
|
52
|
+
* than {@link summary} so a user theme's colour codes cannot end up inside
|
|
53
|
+
* the clause; the theme is applied once the text is final.
|
|
54
|
+
*/
|
|
55
|
+
oneLineSummary(command) {
|
|
56
|
+
const source = PLUGIN_SUMMARIES[command.id] ?? command.summary ?? command.description ?? "";
|
|
57
|
+
const [clause = ""] = this.render(source).split(/[.:]\s|\n/, 1);
|
|
58
|
+
return ux.colorize(this.config.theme?.commandSummary, clause.trim().replace(/\.$/, ""));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function byGroup(commands, group) {
|
|
62
|
+
return commands.filter((command) => command.group === group).sort((a, b) => (a.groupOrder ?? Number.MAX_SAFE_INTEGER) - (b.groupOrder ?? Number.MAX_SAFE_INTEGER) || a.id.localeCompare(b.id));
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { ZitadelHelp as default };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=help.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.mjs","names":[],"sources":["../../../src/lib/oclif/help.ts"],"sourcesContent":["import { type Command, Help, toConfiguredId, ux } from \"@oclif/core\";\n\nimport { ADDITIONAL_COMMANDS_GROUP, COMMAND_GROUPS, type CommandGroup } from \"./groups\";\n\n/** A loaded command plus the root-help statics `BaseCommand` (`./base`) declares. */\ntype GroupedCommand = Command.Loadable & { group?: CommandGroup; groupOrder?: number };\n\n/**\n * Summaries for oclif plugin commands that ship without one. `version` prints\n * a blank line otherwise.\n */\nconst PLUGIN_SUMMARIES: Readonly<Record<string, string>> = {\n version: \"Show the CLI version\",\n};\n\n/**\n * Root help in the style of `gh --help`: a tagline, usage, the commands under\n * headed groups with oclif's utilities last, then flags, examples, and where\n * to go next. Only {@link showRootHelp} is replaced; per-command and\n * per-topic help (`start --help`, `schemas --help`) stay oclif's own. Wired\n * in via `oclif.helpClass` in `package.json`.\n */\nexport default class ZitadelHelp extends Help {\n protected override async showRootHelp(): Promise<void> {\n const { bin } = this.config;\n const commands = this.rootCommands();\n const width = Math.max(0, ...commands.map((command) => this.displayName(command).length));\n const list = (entries: readonly GroupedCommand[]): string =>\n entries\n .map(\n (command) => `${this.displayName(command).padEnd(width)} ${this.oneLineSummary(command)}`,\n )\n .join(\"\\n\");\n\n const groups = COMMAND_GROUPS.map((group) => [group, byGroup(commands, group)] as const).filter(\n ([, entries]) => entries.length > 0,\n );\n const additional = commands\n .filter((command) => command.group === undefined)\n .sort((a, b) => a.id.localeCompare(b.id));\n\n const sections = [\n this.render(this.config.pjson.oclif.description ?? this.config.pjson.description ?? \"\"),\n this.section(\"Usage\", `${bin} <command> [flags]`),\n ...groups.map(([group, entries]) => this.section(group, list(entries))),\n ...(additional.length > 0 ? [this.section(ADDITIONAL_COMMANDS_GROUP, list(additional))] : []),\n this.section(\n \"Flags\",\n [\"--help Show help for command\", `--version Show ${bin} version`].join(\"\\n\"),\n ),\n this.section(\n \"Examples\",\n [`$ ${bin} setup --framework next`, `$ ${bin} start`, `$ ${bin} doctor`].join(\"\\n\"),\n ),\n this.section(\n \"Learn more\",\n `Use \\`${bin} <command> --help\\` for more information about a command.`,\n ),\n ];\n this.log(sections.join(\"\\n\\n\"));\n }\n\n /**\n * The commands the root screen lists: every visible command, grouped or\n * not, whatever its depth. Alias entries and `help` itself are left out.\n */\n private rootCommands(): GroupedCommand[] {\n return (this.sortedCommands as GroupedCommand[]).filter(\n (command) => command.id !== \"help\" && !command.aliases?.includes(command.id),\n );\n }\n\n private displayName(command: GroupedCommand): string {\n return `${toConfiguredId(command.id, this.config)}:`;\n }\n\n /**\n * The summary as `gh` prints it: the first clause of the summary or\n * description, with no trailing full stop. Built from the raw statics rather\n * than {@link summary} so a user theme's colour codes cannot end up inside\n * the clause; the theme is applied once the text is final.\n */\n private oneLineSummary(command: GroupedCommand): string {\n const source = PLUGIN_SUMMARIES[command.id] ?? command.summary ?? command.description ?? \"\";\n const [clause = \"\"] = this.render(source).split(/[.:]\\s|\\n/, 1);\n return ux.colorize(this.config.theme?.commandSummary, clause.trim().replace(/\\.$/, \"\"));\n }\n}\n\nfunction byGroup(commands: readonly GroupedCommand[], group: CommandGroup): GroupedCommand[] {\n return commands\n .filter((command) => command.group === group)\n .sort(\n (a, b) =>\n (a.groupOrder ?? Number.MAX_SAFE_INTEGER) - (b.groupOrder ?? Number.MAX_SAFE_INTEGER) ||\n a.id.localeCompare(b.id),\n );\n}\n"],"mappings":";;;;;;;AAWA,MAAM,mBAAqD,EACzD,SAAS,wBACV;;;;;;;;AASD,IAAqB,cAArB,cAAyC,KAAK;CAC5C,MAAyB,eAA8B;EACrD,MAAM,EAAE,QAAQ,KAAK;EACrB,MAAM,WAAW,KAAK,cAAc;EACpC,MAAM,QAAQ,KAAK,IAAI,GAAG,GAAG,SAAS,KAAK,YAAY,KAAK,YAAY,QAAQ,CAAC,OAAO,CAAC;EACzF,MAAM,QAAQ,YACZ,QACG,KACE,YAAY,GAAG,KAAK,YAAY,QAAQ,CAAC,OAAO,MAAM,CAAC,GAAG,KAAK,eAAe,QAAQ,GACxF,CACA,KAAK,KAAK;EAEf,MAAM,SAAS,eAAe,KAAK,UAAU,CAAC,OAAO,QAAQ,UAAU,MAAM,CAAC,CAAU,CAAC,QACtF,GAAG,aAAa,QAAQ,SAAS,EACnC;EACD,MAAM,aAAa,SAChB,QAAQ,YAAY,QAAQ,UAAU,KAAA,EAAU,CAChD,MAAM,GAAG,MAAM,EAAE,GAAG,cAAc,EAAE,GAAG,CAAC;EAE3C,MAAM,W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