@cvr/linear 0.1.0 → 0.2.0
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 +13 -12
- package/bin/linear +0 -0
- package/package.json +29 -22
- package/src/commands/auth.ts +42 -40
- package/src/commands/issue.ts +167 -191
- package/src/commands/team.ts +17 -17
- package/src/lib/errors.ts +24 -26
- package/src/main.ts +22 -30
- package/src/services/Browser.ts +5 -5
- package/src/services/Config.ts +78 -80
- package/src/services/Linear.ts +124 -123
- package/src/services/Stdin.ts +9 -9
- package/tsconfig.json +0 -1
package/src/services/Stdin.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Context, Effect, Layer } from "effect"
|
|
1
|
+
import { Context, Effect, Layer } from "effect";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Simple stdin reading service that works with Bun compiled binaries.
|
|
@@ -7,28 +7,28 @@ import { Context, Effect, Layer } from "effect"
|
|
|
7
7
|
export class StdinService extends Context.Tag("StdinService")<
|
|
8
8
|
StdinService,
|
|
9
9
|
{
|
|
10
|
-
readonly readLine: (prompt: string) => Effect.Effect<string
|
|
10
|
+
readonly readLine: (prompt: string) => Effect.Effect<string>;
|
|
11
11
|
}
|
|
12
12
|
>() {
|
|
13
13
|
static readonly layer = Layer.succeed(StdinService, {
|
|
14
14
|
readLine: (prompt) =>
|
|
15
15
|
Effect.async<string>((resume) => {
|
|
16
16
|
// Use Node's readline API (Bun compatible)
|
|
17
|
-
const readline = require("node:readline")
|
|
17
|
+
const readline = require("node:readline");
|
|
18
18
|
const rl = readline.createInterface({
|
|
19
19
|
input: process.stdin,
|
|
20
20
|
output: process.stdout,
|
|
21
|
-
})
|
|
21
|
+
});
|
|
22
22
|
|
|
23
23
|
rl.question(prompt, (answer: string) => {
|
|
24
|
-
rl.close()
|
|
25
|
-
resume(Effect.succeed(answer))
|
|
26
|
-
})
|
|
24
|
+
rl.close();
|
|
25
|
+
resume(Effect.succeed(answer));
|
|
26
|
+
});
|
|
27
27
|
}),
|
|
28
|
-
})
|
|
28
|
+
});
|
|
29
29
|
|
|
30
30
|
static readonly testLayer = (input: string) =>
|
|
31
31
|
Layer.succeed(StdinService, {
|
|
32
32
|
readLine: (_prompt) => Effect.succeed(input),
|
|
33
|
-
})
|
|
33
|
+
});
|
|
34
34
|
}
|