@rhythmjs/cli 0.0.2 → 0.0.3

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.
@@ -1,5 +1,5 @@
1
1
  import { t as RhythmPrompt } from "../prompt-DXqXd-xC.js";
2
- import { t as RhythmCliContext } from "../context-SCtZ6pOg.js";
2
+ import { t as RhythmCliContext } from "../context-DyXPT9sP.js";
3
3
  import { Rhythm } from "@rhythmjs/rhythm";
4
4
  //#region src/adapters/bun.d.ts
5
5
  export declare function toCliHandler<TContext extends RhythmCliContext, TProviders extends object = {}>(app: Rhythm<RhythmCliContext, TContext, TProviders>): (argv: string[]) => Promise<number>;
@@ -1,2 +1,2 @@
1
- import { n as RhythmCliResponse, t as RhythmCliContext } from "../context-SCtZ6pOg.js";
1
+ import { n as RhythmCliResponse, t as RhythmCliContext } from "../context-DyXPT9sP.js";
2
2
  export { RhythmCliContext, RhythmCliResponse };
@@ -1,7 +1,5 @@
1
- import { RhythmMutable } from "@rhythmjs/rhythm";
2
1
  //#region src/adapters/context.ts
3
2
  var RhythmCliResponse = class {
4
- [RhythmMutable] = true;
5
3
  exitCode = 0;
6
4
  stdout = [];
7
5
  stderr = [];
@@ -1,5 +1,5 @@
1
1
  import { t as RhythmPrompt } from "../prompt-DXqXd-xC.js";
2
- import { t as RhythmCliContext } from "../context-SCtZ6pOg.js";
2
+ import { t as RhythmCliContext } from "../context-DyXPT9sP.js";
3
3
  import { Rhythm } from "@rhythmjs/rhythm";
4
4
  //#region src/adapters/node.d.ts
5
5
  export declare function toCliHandler<TContext extends RhythmCliContext, TProviders extends object = {}>(app: Rhythm<RhythmCliContext, TContext, TProviders>): (argv: string[]) => Promise<number>;
@@ -0,0 +1,17 @@
1
+ //#region src/adapters/context.d.ts
2
+ declare class RhythmCliResponse {
3
+ exitCode: number;
4
+ stdout: string[];
5
+ stderr: string[];
6
+ print(line: string): this;
7
+ printError(line: string): this;
8
+ exit(code: number): this;
9
+ }
10
+ interface RhythmCliContext {
11
+ readonly argv: readonly string[];
12
+ readonly flags: Readonly<Record<string, string | boolean>>;
13
+ readonly stdin: ReadableStream<Uint8Array> | null;
14
+ readonly response: RhythmCliResponse;
15
+ }
16
+ //#endregion
17
+ export { RhythmCliResponse as n, RhythmCliContext as t };
@@ -1,8 +1,8 @@
1
- import { t as RhythmCliContext } from "./context-SCtZ6pOg.js";
2
- import { Middleware } from "@rhythmjs/rhythm";
1
+ import { t as RhythmCliContext } from "./context-DyXPT9sP.js";
2
+ import { Middleware } from "@rhythmjs/rhythm/types";
3
3
  //#region src/rhythm-cli.d.ts
4
4
  export interface RhythmCliCommandContext {
5
- args: Record<string, string>;
5
+ readonly args: Readonly<Record<string, string>>;
6
6
  }
7
7
  export interface RhythmCliOptions {
8
8
  prefix?: string;
@@ -1,5 +1,5 @@
1
1
  import { parseArgv } from "./argv.js";
2
- import { compose } from "@rhythmjs/rhythm";
2
+ import { compose } from "@rhythmjs/rhythm/compose";
3
3
  //#region src/rhythm-cli.ts
4
4
  function toSegments(command) {
5
5
  return command.trim().split(/\s+/).filter(Boolean);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhythmjs/cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Command-line argument parsing, prompts, and command routing for the Rhythm middleware kernel.",
5
5
  "homepage": "https://rhythm.js.org/cli",
6
6
  "license": "ISC",
@@ -49,7 +49,7 @@
49
49
  "access": "public"
50
50
  },
51
51
  "dependencies": {
52
- "@rhythmjs/rhythm": "0.0.2"
52
+ "@rhythmjs/rhythm": "0.0.3"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/bun": "^1.4.2",
@@ -1,19 +0,0 @@
1
- import { RhythmMutable } from "@rhythmjs/rhythm";
2
- //#region src/adapters/context.d.ts
3
- declare class RhythmCliResponse {
4
- readonly [RhythmMutable] = true;
5
- exitCode: number;
6
- stdout: string[];
7
- stderr: string[];
8
- print(line: string): this;
9
- printError(line: string): this;
10
- exit(code: number): this;
11
- }
12
- interface RhythmCliContext {
13
- argv: string[];
14
- flags: Record<string, string | boolean>;
15
- stdin: ReadableStream<Uint8Array> | null;
16
- response: RhythmCliResponse;
17
- }
18
- //#endregion
19
- export { RhythmCliResponse as n, RhythmCliContext as t };