@nan0web/release 1.0.1 → 1.0.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.
Files changed (108) hide show
  1. package/README.md +24 -42
  2. package/bin/nan0release.js +27 -42
  3. package/package.json +21 -14
  4. package/src/Release/Document.js +13 -19
  5. package/src/Release/MarkdownToTest.js +35 -33
  6. package/src/Release/Person.js +3 -8
  7. package/src/Release/Scanner.js +179 -0
  8. package/src/Release.js +19 -12
  9. package/src/Team.js +9 -9
  10. package/src/architecture/ProjectManagementAsCode.js +8 -8
  11. package/src/cli/index.js +9 -0
  12. package/src/co/AppCommandOptions.js +4 -6
  13. package/src/commands/CloseCommand.js +67 -0
  14. package/src/commands/Command.js +48 -0
  15. package/src/commands/DepsCommand.js +143 -0
  16. package/src/commands/InitCommand.js +48 -56
  17. package/src/commands/PublishCommand.js +80 -119
  18. package/src/commands/SpecCommand.js +41 -0
  19. package/src/commands/StatusCommand.js +26 -0
  20. package/src/db/ReleaseDB.js +5 -5
  21. package/src/index.js +18 -0
  22. package/src/ui/cli/ReleaseCLi.js +52 -0
  23. package/src/utils/runSpawn.js +0 -0
  24. package/types/Release/Document.d.ts +2 -2
  25. package/types/Release/Person.d.ts +3 -3
  26. package/types/Release/Scanner.d.ts +90 -0
  27. package/types/Release.d.ts +37 -33
  28. package/types/ReleaseCLI.d.ts +29 -28
  29. package/types/Team.d.ts +3 -3
  30. package/types/architecture/ProjectManagementAsCode.d.ts +1 -1
  31. package/types/cli/index.d.ts +2 -0
  32. package/types/co/AppCommandMessage.d.ts +10 -11
  33. package/types/co/AppCommandOptions.d.ts +1 -2
  34. package/types/commands/BaseCommand.d.ts +23 -0
  35. package/types/commands/ChatCommand.d.ts +9 -9
  36. package/types/commands/ChatMessage.d.ts +36 -0
  37. package/types/commands/CloseCommand.d.ts +25 -0
  38. package/types/commands/Command.d.ts +28 -0
  39. package/types/commands/DepsCommand.d.ts +32 -0
  40. package/types/commands/DepsMessage.d.ts +28 -0
  41. package/types/commands/HostCommand.d.ts +7 -7
  42. package/types/commands/HostMessage.d.ts +44 -0
  43. package/types/commands/InitCommand.d.ts +24 -19
  44. package/types/commands/InitMessage.d.ts +24 -0
  45. package/types/commands/ListCommand.d.ts +8 -8
  46. package/types/commands/ListMessage.d.ts +30 -0
  47. package/types/commands/PublishCommand.d.ts +36 -47
  48. package/types/commands/PublishMessage.d.ts +39 -0
  49. package/types/commands/SealCommand.d.ts +7 -7
  50. package/types/commands/SealMessage.d.ts +28 -0
  51. package/types/commands/ServeCommand.d.ts +7 -7
  52. package/types/commands/ServeMessage.d.ts +30 -0
  53. package/types/commands/ShowCommand.d.ts +7 -7
  54. package/types/commands/SpecCommand.d.ts +25 -0
  55. package/types/commands/StatusCommand.d.ts +9 -0
  56. package/types/commands/SubCommand.d.ts +9 -7
  57. package/types/commands/ValidateCommand.d.ts +7 -7
  58. package/types/commands/ValidateMessage.d.ts +20 -0
  59. package/types/db/ReleaseDB.d.ts +2 -2
  60. package/types/index.d.ts +10 -0
  61. package/types/ui/cli/ReleaseCLi.d.ts +10 -0
  62. package/types/ui/cli/index.d.ts +0 -0
  63. package/types/utils/runSpawn.d.ts +0 -0
  64. package/.datasets/README.dataset.jsonl +0 -19
  65. package/.editorconfig +0 -20
  66. package/CHANGELOG.md +0 -6
  67. package/CONTRIBUTING.md +0 -42
  68. package/bin/commands/InitCommand.js +0 -10
  69. package/bin/lib/functions.js +0 -240
  70. package/bin/lib/functions.test.js +0 -138
  71. package/bin/release.js +0 -12
  72. package/bin/release.test.js +0 -73
  73. package/bin/temp/package.json +0 -1
  74. package/docs/system.uk.md +0 -413
  75. package/docs/uk/README.md +0 -284
  76. package/legacy/PrepareCommand.js +0 -154
  77. package/legacy/PrepareCommand.test.js +0 -189
  78. package/legacy/changelog.js +0 -446
  79. package/releases/1/0/v1.0.0/models/Person.js +0 -26
  80. package/releases/1/0/v1.0.0/models/Person.test.js +0 -44
  81. package/releases/1/0/v1.0.0/models/company.js +0 -11
  82. package/releases/1/0/v1.0.0/models/members.js +0 -14
  83. package/releases/1/0/v1.0.0/models/members.test.js +0 -21
  84. package/releases/1/0/v1.0.0/models/teams/DevTeam.js +0 -6
  85. package/releases/1/0/v1.0.0/models/teams/DevTeam.test.js +0 -15
  86. package/releases/1/0/v1.0.0/models/teams/index.js +0 -5
  87. package/releases/1/0/v1.0.0/release.js +0 -12
  88. package/releases/1/0/v1.0.0/release.md +0 -121
  89. package/releases/1/0/v1.0.0/release.test.js +0 -36
  90. package/releases/1/0/v1.0.0/test/YaRaSLove/git-native.test.js +0 -14
  91. package/releases/current.js +0 -3
  92. package/releases/index.js +0 -11
  93. package/src/README.md.js +0 -468
  94. package/src/Release/MarkdownToTest.test.js +0 -60
  95. package/src/ReleaseCLI.js +0 -122
  96. package/src/architecture/ProjectManagementAsCode.test.js +0 -128
  97. package/src/co/AppCommandMessage.js +0 -22
  98. package/src/commands/ChatCommand.js +0 -56
  99. package/src/commands/HostCommand.js +0 -63
  100. package/src/commands/ListCommand.js +0 -56
  101. package/src/commands/SealCommand.js +0 -51
  102. package/src/commands/ServeCommand.js +0 -53
  103. package/src/commands/ShowCommand.js +0 -58
  104. package/src/commands/SubCommand.js +0 -21
  105. package/src/commands/ValidateCommand.js +0 -66
  106. package/system.md +0 -571
  107. package/tsconfig.json +0 -23
  108. /package/{bin/lib/temp/pnpm-lock.yaml → src/ui/cli/index.js} +0 -0
@@ -1,38 +1,8 @@
1
- export default Release;
2
- export type ReleaseConfig = {
3
- /**
4
- * - Release version
5
- */
6
- version?: string | undefined;
7
- /**
8
- * -
9
- */
10
- createdAt?: string | number | Date | undefined;
11
- /**
12
- * -
13
- */
14
- startAt?: string | number | Date | undefined;
15
- /**
16
- * -
17
- */
18
- planAt?: string | number | Date | undefined;
19
- /**
20
- * -
21
- */
22
- completeAt?: string | number | Date | undefined;
23
- /**
24
- * -
25
- */
26
- document?: string | ReleaseDocument | undefined;
27
- /**
28
- * - Task map with test functions
29
- */
30
- tasks?: Map<string, Function> | undefined;
31
- };
32
1
  /**
33
2
  * @typedef {Object} ReleaseConfig
34
3
  * @property {string} [version] - Release version
35
4
  * @property {string | number | Date | undefined} [createdAt] -
5
+ * @property {string | number | Date | undefined} [date] - Alias for createdAt
36
6
  * @property {string | number | Date | undefined} [startAt] -
37
7
  * @property {string | number | Date | undefined} [planAt] -
38
8
  * @property {string | number | Date | undefined} [completeAt] -
@@ -42,7 +12,7 @@ export type ReleaseConfig = {
42
12
  /**
43
13
  * Release management class that coordinates task validation and release execution
44
14
  */
45
- declare class Release {
15
+ export default class Release {
46
16
  /**
47
17
  * Creates a Release instance
48
18
  * @param {ReleaseConfig} config - Release configuration
@@ -85,5 +55,39 @@ declare class Release {
85
55
  */
86
56
  getProgress(): Promise<any>;
87
57
  }
88
- import ReleaseDocument from "./Release/Document.js";
58
+ export type ReleaseConfig = {
59
+ /**
60
+ * - Release version
61
+ */
62
+ version?: string | undefined;
63
+ /**
64
+ * -
65
+ */
66
+ createdAt?: string | number | Date | undefined;
67
+ /**
68
+ * - Alias for createdAt
69
+ */
70
+ date?: string | number | Date | undefined;
71
+ /**
72
+ * -
73
+ */
74
+ startAt?: string | number | Date | undefined;
75
+ /**
76
+ * -
77
+ */
78
+ planAt?: string | number | Date | undefined;
79
+ /**
80
+ * -
81
+ */
82
+ completeAt?: string | number | Date | undefined;
83
+ /**
84
+ * -
85
+ */
86
+ document?: string | ReleaseDocument | undefined;
87
+ /**
88
+ * - Task map with test functions
89
+ */
90
+ tasks?: Map<string, Function> | undefined;
91
+ };
92
+ import ReleaseDocument from './Release/Document.js';
89
93
  import Logger from '@nan0web/log';
@@ -2,32 +2,33 @@
2
2
  /**
3
3
  * CLI application for release management
4
4
  */
5
- export default class ReleaseCLI extends Command {
6
- static Message: typeof AppCommandMessage;
7
- constructor();
8
- /** @type {DB?} */
9
- db: DB | null;
10
- /** @type {FS} */
11
- fs: FS;
12
- /** @type {Record<string, Release>} */
13
- releases: Record<string, Release>;
14
- /** @type {Release?} */
15
- current: Release | null;
16
- /**
17
- * @param {string[] | string} argv
18
- * @returns {AppCommandMessage}
19
- */
20
- parse(argv?: string[] | string): AppCommandMessage;
21
- /**
22
- * Run CLI application
23
- * @param {string[]} argv - Command line arguments
24
- * @returns {Promise<void>}
25
- */
26
- run(argv: string[]): Promise<void>;
27
- loadReleaseFiles(): Promise<void>;
5
+ export default class ReleaseCLI {
6
+ static Message: typeof AppCommandMessage
7
+ /** @type {Logger} */
8
+ logger: Logger
9
+ /** @type {DB?} */
10
+ db: DB | null
11
+ /** @type {FS} */
12
+ fs: FS
13
+ /** @type {Record<string, Release>} */
14
+ releases: Record<string, Release>
15
+ /** @type {Release?} */
16
+ current: Release | null
17
+ /**
18
+ * @param {string[] | string} argv
19
+ * @returns {AppCommandMessage}
20
+ */
21
+ parse(argv?: string[] | string): AppCommandMessage
22
+ /**
23
+ * Run CLI application
24
+ * @param {string[]} argv - Command line arguments
25
+ * @returns {Promise<void>}
26
+ */
27
+ run(argv: string[]): Promise<void>
28
+ loadReleaseFiles(): Promise<void>
28
29
  }
29
- import { Command } from '@nan0web/co';
30
- import DB from "./db/ReleaseDB.js";
31
- import FS from "@nan0web/db-fs";
32
- import Release from './Release.js';
33
- import AppCommandMessage from './co/AppCommandMessage.js';
30
+ import Logger from '@nan0web/log'
31
+ import DB from './db/ReleaseDB.js'
32
+ import FS from '@nan0web/db-fs'
33
+ import Release from './Release.js'
34
+ import AppCommandMessage from './co/AppCommandMessage.js'
package/types/Team.d.ts CHANGED
@@ -22,6 +22,6 @@ declare class Person {
22
22
  /** @type {HumanContact[]} */
23
23
  contacts: HumanContact[];
24
24
  }
25
- import { HumanName } from "@nan0web/verse";
26
- import { HumanGender } from "@nan0web/verse";
27
- import { HumanContact } from "@nan0web/verse";
25
+ import { HumanName } from '@nan0web/verse';
26
+ import { HumanGender } from '@nan0web/verse';
27
+ import { HumanContact } from '@nan0web/verse';
@@ -12,7 +12,7 @@ export class ProjectManagement {
12
12
  constructor(config?: {
13
13
  projectPath?: string | undefined;
14
14
  autoTrack?: boolean | undefined;
15
- } | undefined);
15
+ });
16
16
  /** @type {string} */
17
17
  projectPath: string;
18
18
  /** @type {boolean} */
@@ -0,0 +1,2 @@
1
+ export default createReleaseCLI;
2
+ import createReleaseCLI from '../ui/cli/ReleaseCLi.js';
@@ -1,12 +1,11 @@
1
- export default class AppCommandMessage extends CommandMessage {
2
- /**
3
- * @param {*} input
4
- * @returns {AppCommandMessage}
5
- */
6
- static from(input: any): AppCommandMessage;
7
- set opts(arg: AppCommandOptions);
8
- /** @returns {AppCommandOptions} */
9
- get opts(): AppCommandOptions;
1
+ export default class AppCommandMessage {
2
+ /**
3
+ * @param {*} input
4
+ * @returns {AppCommandMessage}
5
+ */
6
+ static from(input: any): AppCommandMessage
7
+ set opts(arg: AppCommandOptions)
8
+ /** @returns {AppCommandOptions} */
9
+ get opts(): AppCommandOptions
10
10
  }
11
- import { CommandMessage } from "@nan0web/co";
12
- import AppCommandOptions from "./AppCommandOptions.js";
11
+ import AppCommandOptions from './AppCommandOptions.js'
@@ -1,5 +1,4 @@
1
- export default AppCommandOptions;
2
- declare class AppCommandOptions {
1
+ export default class AppCommandOptions {
3
2
  /**
4
3
  * @param {Object} input
5
4
  */
@@ -0,0 +1,23 @@
1
+ /** @typedef {import("@nan0web/test/types/exec/runSpawn").SpawnResult} SpawnResult */
2
+ /**
3
+ * @extends {Command}
4
+ */
5
+ export default class BaseCommand {
6
+ /**
7
+ * @param {string} cmd
8
+ * @param {string[]} args
9
+ * @param {string} errorMsg
10
+ * @param {FS} fs
11
+ * @param {number[]} [okCodes=[0]]
12
+ * @returns {Promise<SpawnResult>}
13
+ */
14
+ _run(
15
+ cmd: string,
16
+ args: string[],
17
+ errorMsg: string,
18
+ fs: FS,
19
+ okCodes?: number[] | undefined,
20
+ ): Promise<SpawnResult>
21
+ }
22
+ export type SpawnResult = import('@nan0web/test/types/exec/runSpawn').SpawnResult
23
+ import FS from '@nan0web/db-fs'
@@ -1,4 +1,4 @@
1
- export default ChatCommand;
1
+ export default ChatCommand
2
2
  /**
3
3
  * ChatCommand – writes a message to the release‑wide chat (chat/…/timestamp.username.md)
4
4
  *
@@ -9,12 +9,12 @@ export default ChatCommand;
9
9
  * --user <string> – username to embed in the filename (defaults to "anonymous")
10
10
  */
11
11
  declare class ChatCommand extends SubCommand {
12
- /**
13
- * Run the chat command.
14
- *
15
- * @param {AppCommandMessage} ctx – command context (contains args and opts)
16
- */
17
- run(ctx: AppCommandMessage): Promise<void>;
12
+ /**
13
+ * Run the chat command.
14
+ *
15
+ * @param {AppCommandMessage} ctx – command context (contains args and opts)
16
+ */
17
+ run(ctx: AppCommandMessage): Promise<void>
18
18
  }
19
- import SubCommand from "./SubCommand.js";
20
- import AppCommandMessage from "../co/AppCommandMessage.js";
19
+ import SubCommand from './SubCommand.js'
20
+ import AppCommandMessage from '../co/AppCommandMessage.js'
@@ -0,0 +1,36 @@
1
+ export class ChatBody {
2
+ static write: {
3
+ help: string
4
+ defaultValue: boolean
5
+ type: string
6
+ }
7
+ static user: {
8
+ help: string
9
+ defaultValue: string
10
+ type: string
11
+ }
12
+ constructor({
13
+ write,
14
+ user,
15
+ args,
16
+ }?: {
17
+ write?: boolean | undefined
18
+ user?: string | undefined
19
+ args?: any[] | undefined
20
+ })
21
+ /** @type {boolean} */
22
+ write: boolean
23
+ /** @type {string} */
24
+ user: string
25
+ /** @type {string[]} */
26
+ args: string[]
27
+ }
28
+ export default class ChatMessage extends Message {
29
+ constructor(input?: {})
30
+ /** @type {ChatBody} */
31
+ body: ChatBody
32
+ /** @returns {AsyncGenerator<OutputMessage>} */
33
+ run(): AsyncGenerator<OutputMessage>
34
+ }
35
+ import { Message } from '@nan0web/co'
36
+ import { OutputMessage } from '@nan0web/co'
@@ -0,0 +1,25 @@
1
+ export default class CloseCommand extends Command {
2
+ static name: string;
3
+ static help: string;
4
+ static Body: typeof CloseBody;
5
+ /** @param {Partial<Command> & { body?: Partial<CloseBody> }} [input={}] */
6
+ constructor(input?: Partial<Command> & {
7
+ body?: Partial<CloseBody>;
8
+ });
9
+ body: CloseBody;
10
+ run(): AsyncGenerator<OutputMessage, void, unknown>;
11
+ }
12
+ import Command from './Command.js';
13
+ declare class CloseBody {
14
+ static version: {
15
+ help: string;
16
+ defaultValue: string;
17
+ };
18
+ constructor({ version }?: {
19
+ version?: string | undefined;
20
+ });
21
+ /** @type {string} */
22
+ version: string;
23
+ }
24
+ import { OutputMessage } from '@nan0web/co';
25
+ export {};
@@ -0,0 +1,28 @@
1
+ /** @typedef {import("@nan0web/test/types/exec/runSpawn").SpawnResult} SpawnResult */
2
+ export default class Command extends UiMessage {
3
+ /**
4
+ * @param {Partial<UiMessage> & { }} [input={}]
5
+ */
6
+ constructor(input?: Partial<UiMessage> & {});
7
+ /** @type {DBFS} */
8
+ fs: DBFS;
9
+ /** @type {Logger} */
10
+ logger: Logger;
11
+ get Body(): new () => {};
12
+ /**
13
+ * Run the command.
14
+ * @param {string} cmd
15
+ * @param {string[]} [args=[]]
16
+ * @param {string} [fail=""]
17
+ * @returns {Promise<SpawnResult>}
18
+ * @throws {Error}
19
+ */
20
+ _run(cmd: string, args?: string[], fail?: string): Promise<SpawnResult>;
21
+ /** @returns {AsyncGenerator<OutputMessage>} */
22
+ run(): AsyncGenerator<OutputMessage>;
23
+ }
24
+ export type SpawnResult = import("@nan0web/test/types/exec/runSpawn").SpawnResult;
25
+ import { UiMessage } from '@nan0web/ui';
26
+ import DBFS from '@nan0web/db-fs';
27
+ import Logger from '@nan0web/log';
28
+ import { OutputMessage } from '@nan0web/co';
@@ -0,0 +1,32 @@
1
+ export default class DepsCommand extends Command {
2
+ static name: string;
3
+ static help: string;
4
+ static Body: typeof DepsBody;
5
+ /** @param {Partial<DepsBody>} [input={}] */
6
+ constructor(input?: Partial<DepsBody>);
7
+ /** @type {DepsBody} */
8
+ body: DepsBody;
9
+ /**
10
+ * @param {DepsCommand} [msg]
11
+ * @returns {AsyncGenerator<OutputMessage>}
12
+ */
13
+ run(msg?: DepsCommand): AsyncGenerator<OutputMessage>;
14
+ }
15
+ import Command from './Command.js';
16
+ declare class DepsBody {
17
+ static fix: {
18
+ help: string;
19
+ defaultValue: boolean;
20
+ };
21
+ static latest: {
22
+ help: string;
23
+ defaultValue: boolean;
24
+ };
25
+ constructor(input?: {});
26
+ /** @type {boolean} */
27
+ fix: boolean;
28
+ /** @type {boolean} */
29
+ latest: boolean;
30
+ }
31
+ import { OutputMessage } from '@nan0web/co';
32
+ export {};
@@ -0,0 +1,28 @@
1
+ /** @typedef {import("@nan0web/co").MessageInput} MessageInput */
2
+ export class DepsBody {
3
+ static fix: {
4
+ help: string
5
+ defaultValue: boolean
6
+ }
7
+ constructor(input?: {})
8
+ /** @type {boolean} */
9
+ fix: boolean
10
+ }
11
+ export default class DepsMessage extends Message {
12
+ static Body: typeof DepsBody
13
+ /** @param {MessageInput & { body?: Partial<DepsBody> }} [input={}] */
14
+ constructor(
15
+ input?:
16
+ | (import('@nan0web/co/types/Message').MessageInput & {
17
+ body?: Partial<DepsBody> | undefined
18
+ })
19
+ | undefined,
20
+ )
21
+ /** @type {DepsBody} */
22
+ body: DepsBody
23
+ /** @returns {AsyncGenerator<OutputMessage>} */
24
+ run(): AsyncGenerator<OutputMessage>
25
+ }
26
+ export type MessageInput = import('@nan0web/co').MessageInput
27
+ import { Message } from '@nan0web/co'
28
+ import { OutputMessage } from '@nan0web/co'
@@ -6,11 +6,11 @@
6
6
  * release host [--port <number>] [--webui]
7
7
  */
8
8
  export default class HostCommand extends SubCommand {
9
- /**
10
- * Run the host server.
11
- *
12
- * @param {Object} ctx – command context
13
- */
14
- run(ctx: any): Promise<void>;
9
+ /**
10
+ * Run the host server.
11
+ *
12
+ * @param {Object} ctx – command context
13
+ */
14
+ run(ctx: any): Promise<void>
15
15
  }
16
- import SubCommand from "./SubCommand.js";
16
+ import SubCommand from './SubCommand.js'
@@ -0,0 +1,44 @@
1
+ export default class HostMessage extends Message {
2
+ static Body: {
3
+ new ({ port, webui }?: { port?: number | undefined; webui?: boolean | undefined }): {
4
+ /** @type {number} */
5
+ port: number
6
+ /** @type {boolean} */
7
+ webui: boolean
8
+ }
9
+ port: {
10
+ help: string
11
+ defaultValue: number
12
+ type: string
13
+ }
14
+ webui: {
15
+ help: string
16
+ defaultValue: boolean
17
+ type: string
18
+ }
19
+ }
20
+ constructor(input?: {})
21
+ /** @type {HostMessage.Body} */
22
+ body: {
23
+ new ({ port, webui }?: { port?: number | undefined; webui?: boolean | undefined }): {
24
+ /** @type {number} */
25
+ port: number
26
+ /** @type {boolean} */
27
+ webui: boolean
28
+ }
29
+ port: {
30
+ help: string
31
+ defaultValue: number
32
+ type: string
33
+ }
34
+ webui: {
35
+ help: string
36
+ defaultValue: boolean
37
+ type: string
38
+ }
39
+ }
40
+ /** @returns {AsyncGenerator<OutputMessage>} */
41
+ run(): AsyncGenerator<OutputMessage>
42
+ }
43
+ import { Message } from '@nan0web/co'
44
+ import { OutputMessage } from '@nan0web/co'
@@ -1,20 +1,25 @@
1
- export default InitCommand;
2
- /**
3
- * InitCommand – scaffolds a new release directory with the minimal set of
4
- * files required for a functional release (release.js, release.md and a
5
- * placeholder task folder). The command is deliberately tiny – it only
6
- * creates the filesystem layout and writes a tiny starter release object.
7
- *
8
- * Usage:
9
- * release init v1.0.0
10
- */
11
- declare class InitCommand extends SubCommand {
12
- /**
13
- * Run the init process.
14
- *
15
- * @param {AppCommandMessage} msg – command context (contains parsed options)
16
- */
17
- run(msg: AppCommandMessage): Promise<void>;
1
+ export default class InitCommand extends Command {
2
+ static name: string;
3
+ static help: string;
4
+ static Body: typeof InitBody;
5
+ /** @param {Partial<Command> & { body?: Partial<InitBody> }} [input={}] */
6
+ constructor(input?: Partial<Command> & {
7
+ body?: Partial<InitBody>;
8
+ });
9
+ body: InitBody;
10
+ run(): AsyncGenerator<OutputMessage, void, unknown>;
18
11
  }
19
- import SubCommand from "./SubCommand.js";
20
- import AppCommandMessage from "../co/AppCommandMessage.js";
12
+ import Command from './Command.js';
13
+ declare class InitBody {
14
+ static version: {
15
+ help: string;
16
+ defaultValue: string;
17
+ };
18
+ constructor({ version }?: {
19
+ version?: string | undefined;
20
+ });
21
+ /** @type {string} */
22
+ version: string;
23
+ }
24
+ import { OutputMessage } from '@nan0web/co';
25
+ export {};
@@ -0,0 +1,24 @@
1
+ export class InitBody {
2
+ static version: {
3
+ help: string
4
+ required: boolean
5
+ placeholder: string
6
+ }
7
+ constructor({ version }?: { version?: string | undefined })
8
+ /** @type {string} */
9
+ version: string
10
+ }
11
+ export default class InitMessage extends Message {
12
+ static Body: typeof InitBody
13
+ constructor(input?: {})
14
+ /** @type {InitBody} */
15
+ body: InitBody
16
+ /**
17
+ * Core implementation – mirrors the legacy `InitCommand`.
18
+ *
19
+ * @returns {AsyncGenerator<OutputMessage>}
20
+ */
21
+ run(): AsyncGenerator<OutputMessage>
22
+ }
23
+ import { Message } from '@nan0web/co'
24
+ import { OutputMessage } from '@nan0web/co'
@@ -10,12 +10,12 @@
10
10
  * --json – output JSON instead of a human‑readable list
11
11
  */
12
12
  export default class ListCommand extends SubCommand {
13
- /**
14
- * Execute the command.
15
- *
16
- * @param {Object} ctx – command context (contains parsed args)
17
- * @returns {Promise<void>}
18
- */
19
- run(ctx: any): Promise<void>;
13
+ /**
14
+ * Execute the command.
15
+ *
16
+ * @param {Object} ctx – command context (contains parsed args)
17
+ * @returns {Promise<void>}
18
+ */
19
+ run(ctx: any): Promise<void>
20
20
  }
21
- import SubCommand from "./SubCommand.js";
21
+ import SubCommand from './SubCommand.js'
@@ -0,0 +1,30 @@
1
+ export default class ListMessage extends Message {
2
+ static Body: {
3
+ new ({ json }?: { json?: boolean | undefined }): {
4
+ /** @type {boolean} */
5
+ json: boolean
6
+ }
7
+ json: {
8
+ help: string
9
+ defaultValue: boolean
10
+ type: string
11
+ }
12
+ }
13
+ constructor(input?: {})
14
+ /** @type {ListMessage.Body} */
15
+ body: {
16
+ new ({ json }?: { json?: boolean | undefined }): {
17
+ /** @type {boolean} */
18
+ json: boolean
19
+ }
20
+ json: {
21
+ help: string
22
+ defaultValue: boolean
23
+ type: string
24
+ }
25
+ }
26
+ /** @returns {AsyncGenerator<OutputMessage>} */
27
+ run(): AsyncGenerator<OutputMessage>
28
+ }
29
+ import { Message } from '@nan0web/co'
30
+ import { OutputMessage } from '@nan0web/co'