@zitadel/cli 1.0.0-alpha.21 → 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.
Files changed (64) hide show
  1. package/README.md +2248 -227
  2. package/SKILLS.md +246 -58
  3. package/dist/groups-CMB0fMzE.mjs +22 -0
  4. package/dist/groups-CMB0fMzE.mjs.map +1 -0
  5. package/dist/index.mjs +16027 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/dist/lib/oclif/help.mjs +67 -0
  8. package/dist/lib/oclif/help.mjs.map +1 -0
  9. package/oclif.manifest.json +4577 -185
  10. package/package.json +42 -8
  11. package/dist/branding-cygSBPkV.mjs +0 -79
  12. package/dist/branding-cygSBPkV.mjs.map +0 -1
  13. package/dist/claim-state-DlfD6Res.mjs +0 -66
  14. package/dist/claim-state-DlfD6Res.mjs.map +0 -1
  15. package/dist/commands/apply.mjs +0 -81
  16. package/dist/commands/apply.mjs.map +0 -1
  17. package/dist/commands/branding/eject.mjs +0 -104
  18. package/dist/commands/branding/eject.mjs.map +0 -1
  19. package/dist/commands/claim.mjs +0 -415
  20. package/dist/commands/claim.mjs.map +0 -1
  21. package/dist/commands/doctor.mjs +0 -1122
  22. package/dist/commands/doctor.mjs.map +0 -1
  23. package/dist/commands/eject.mjs +0 -157
  24. package/dist/commands/eject.mjs.map +0 -1
  25. package/dist/commands/logs.mjs +0 -58
  26. package/dist/commands/logs.mjs.map +0 -1
  27. package/dist/commands/plan.mjs +0 -65
  28. package/dist/commands/plan.mjs.map +0 -1
  29. package/dist/commands/reset.mjs +0 -79
  30. package/dist/commands/reset.mjs.map +0 -1
  31. package/dist/commands/schemas/list.mjs +0 -146
  32. package/dist/commands/schemas/list.mjs.map +0 -1
  33. package/dist/commands/setup.mjs +0 -1271
  34. package/dist/commands/setup.mjs.map +0 -1
  35. package/dist/commands/start.mjs +0 -288
  36. package/dist/commands/start.mjs.map +0 -1
  37. package/dist/commands/status.mjs +0 -151
  38. package/dist/commands/status.mjs.map +0 -1
  39. package/dist/commands/stop.mjs +0 -105
  40. package/dist/commands/stop.mjs.map +0 -1
  41. package/dist/designs-Ckz18Dpo.mjs +0 -38
  42. package/dist/designs-Ckz18Dpo.mjs.map +0 -1
  43. package/dist/docker-Ev1Ggt9l.mjs +0 -436
  44. package/dist/docker-Ev1Ggt9l.mjs.map +0 -1
  45. package/dist/environment-rjRVkJjW.mjs +0 -17
  46. package/dist/environment-rjRVkJjW.mjs.map +0 -1
  47. package/dist/journey-guidance-BGrOX_gT.mjs +0 -40
  48. package/dist/journey-guidance-BGrOX_gT.mjs.map +0 -1
  49. package/dist/oclif-CanO3zdt.mjs +0 -1769
  50. package/dist/oclif-CanO3zdt.mjs.map +0 -1
  51. package/dist/orca-66vAxeIe.mjs +0 -3917
  52. package/dist/orca-66vAxeIe.mjs.map +0 -1
  53. package/dist/package-manager-DFdLcDx1.mjs +0 -194
  54. package/dist/package-manager-DFdLcDx1.mjs.map +0 -1
  55. package/dist/ports-BM20XIZb.mjs +0 -116
  56. package/dist/ports-BM20XIZb.mjs.map +0 -1
  57. package/dist/processes-DKHPkU8O.mjs +0 -120
  58. package/dist/processes-DKHPkU8O.mjs.map +0 -1
  59. package/dist/project-CHhot85s.mjs +0 -140
  60. package/dist/project-CHhot85s.mjs.map +0 -1
  61. package/dist/sync-BBlACKzT.mjs +0 -1633
  62. package/dist/sync-BBlACKzT.mjs.map +0 -1
  63. package/dist/user-schema-DTuOsdKE.mjs +0 -91
  64. package/dist/user-schema-DTuOsdKE.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,WAAW;GACf,KAAK,OAAO,KAAK,OAAO,MAAM,MAAM,eAAe,KAAK,OAAO,MAAM,eAAe,GAAG;GACvF,KAAK,QAAQ,SAAS,GAAG,IAAI,oBAAoB;GACjD,GAAG,OAAO,KAAK,CAAC,OAAO,aAAa,KAAK,QAAQ,OAAO,KAAK,QAAQ,CAAC,CAAC;GACvE,GAAI,WAAW,SAAS,IAAI,CAAC,KAAK,QAAQ,2BAA2B,KAAK,WAAW,CAAC,CAAC,GAAG,EAAE;GAC5F,KAAK,QACH,SACA,CAAC,qCAAqC,oBAAoB,IAAI,UAAU,CAAC,KAAK,KAAK,CACpF;GACD,KAAK,QACH,YACA;IAAC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