@cvr/linear 0.3.0 → 0.5.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 +22 -10
- package/bin/linear +2 -2
- package/package.json +8 -6
- package/skills/linear/SKILL.md +23 -6
- package/src/cli.ts +15 -0
- package/src/commands/api.ts +94 -12
- package/src/commands/auth.ts +41 -41
- package/src/commands/file.ts +61 -0
- package/src/commands/issue.ts +307 -153
- package/src/commands/project.ts +14 -8
- package/src/commands/team.ts +23 -11
- package/src/domain/Files.ts +81 -0
- package/src/domain/Input.ts +68 -0
- package/src/domain/Linear.ts +158 -0
- package/src/lib/downloads.ts +71 -0
- package/src/lib/effect.ts +9 -0
- package/src/lib/errors.ts +3 -14
- package/src/lib/flags.ts +15 -0
- package/src/main.ts +3 -18
- package/src/services/Config.ts +126 -125
- package/src/services/Linear.ts +534 -438
- package/tsconfig.json +22 -3
- package/src/services/Browser.ts +0 -23
- package/src/services/Stdin.ts +0 -27
package/tsconfig.json
CHANGED
|
@@ -31,6 +31,23 @@
|
|
|
31
31
|
"ignoreEffectErrorsInTscExitCode": false,
|
|
32
32
|
"diagnosticSeverity": {
|
|
33
33
|
"anyUnknownInErrorContext": "error",
|
|
34
|
+
"asyncFunction": "off",
|
|
35
|
+
"cryptoRandomUUID": "off",
|
|
36
|
+
"cryptoRandomUUIDInEffect": "off",
|
|
37
|
+
"globalConsole": "off",
|
|
38
|
+
"globalConsoleInEffect": "off",
|
|
39
|
+
"globalDate": "off",
|
|
40
|
+
"globalDateInEffect": "off",
|
|
41
|
+
"globalFetch": "off",
|
|
42
|
+
"globalFetchInEffect": "off",
|
|
43
|
+
"globalRandom": "off",
|
|
44
|
+
"globalRandomInEffect": "off",
|
|
45
|
+
"globalTimers": "off",
|
|
46
|
+
"globalTimersInEffect": "off",
|
|
47
|
+
"newPromise": "off",
|
|
48
|
+
"nodeBuiltinImport": "off",
|
|
49
|
+
"processEnv": "off",
|
|
50
|
+
"processEnvInEffect": "off",
|
|
34
51
|
"deterministicKeys": "error",
|
|
35
52
|
"importFromBarrel": "warning",
|
|
36
53
|
"instanceOfSchema": "warning",
|
|
@@ -38,20 +55,22 @@
|
|
|
38
55
|
"missingEffectServiceDependency": "warning",
|
|
39
56
|
"schemaUnionOfLiterals": "warning",
|
|
40
57
|
"strictBooleanExpressions": "warning",
|
|
41
|
-
|
|
58
|
+
// Upstream default. The rule has no entry-point detection, so it fires on the single
|
|
59
|
+
// legitimate Effect.provide in src/main.ts. multipleEffectProvide still guards chains.
|
|
60
|
+
"strictEffectProvide": "off",
|
|
42
61
|
"catchAllToMapError": "warning",
|
|
43
62
|
"catchUnfailableEffect": "warning",
|
|
44
63
|
"effectFnOpportunity": "warning",
|
|
45
64
|
"effectMapVoid": "warning",
|
|
46
65
|
"effectSucceedWithVoid": "warning",
|
|
47
66
|
"leakingRequirements": "warning",
|
|
48
|
-
"preferSchemaOverJson": "
|
|
67
|
+
"preferSchemaOverJson": "off",
|
|
49
68
|
"redundantSchemaTagIdentifier": "warning",
|
|
50
69
|
"returnEffectInGen": "warning",
|
|
51
70
|
"runEffectInsideEffect": "error",
|
|
52
71
|
"schemaStructWithTag": "warning",
|
|
53
72
|
"schemaSyncInEffect": "warning",
|
|
54
|
-
"tryCatchInEffectGen": "
|
|
73
|
+
"tryCatchInEffectGen": "off",
|
|
55
74
|
"unnecessaryEffectGen": "warning",
|
|
56
75
|
"unnecessaryFailYieldableError": "warning",
|
|
57
76
|
"unnecessaryPipe": "warning",
|
package/src/services/Browser.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Context, Effect, Layer } from "effect";
|
|
2
|
-
import { BrowserError } from "../lib/errors.js";
|
|
3
|
-
|
|
4
|
-
export class BrowserService extends Context.Service<
|
|
5
|
-
BrowserService,
|
|
6
|
-
{
|
|
7
|
-
readonly open: (url: string) => Effect.Effect<void, BrowserError>;
|
|
8
|
-
}
|
|
9
|
-
>()("@cvr/linear/services/Browser/BrowserService") {
|
|
10
|
-
// macOS-only implementation using `open` command
|
|
11
|
-
static readonly layer = Layer.succeed(BrowserService, {
|
|
12
|
-
open: (url) =>
|
|
13
|
-
Effect.tryPromise({
|
|
14
|
-
try: () => Bun.$`open ${url}`.quiet(),
|
|
15
|
-
catch: (e) => BrowserError.make({ message: String(e) }),
|
|
16
|
-
}).pipe(Effect.asVoid),
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// No-op layer for testing
|
|
20
|
-
static readonly layerTest = Layer.succeed(BrowserService, {
|
|
21
|
-
open: (_url) => Effect.void,
|
|
22
|
-
});
|
|
23
|
-
}
|
package/src/services/Stdin.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Console, Context, Effect, Layer, Terminal } from "effect";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Simple stdin reading service that works with Bun compiled binaries.
|
|
5
|
-
* Uses Node's readline API which Bun supports.
|
|
6
|
-
*/
|
|
7
|
-
export class StdinService extends Context.Service<
|
|
8
|
-
StdinService,
|
|
9
|
-
{
|
|
10
|
-
readonly readLine: (prompt: string) => Effect.Effect<string, Terminal.QuitError>;
|
|
11
|
-
}
|
|
12
|
-
>()("@cvr/linear/services/Stdin/StdinService") {
|
|
13
|
-
static readonly layer = Layer.effect(
|
|
14
|
-
StdinService,
|
|
15
|
-
Effect.gen(function* () {
|
|
16
|
-
const terminal = yield* Terminal.Terminal;
|
|
17
|
-
return StdinService.of({
|
|
18
|
-
readLine: (prompt) => Console.log(prompt).pipe(Effect.andThen(terminal.readLine)),
|
|
19
|
-
});
|
|
20
|
-
}),
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
static readonly layerTest = (input: string) =>
|
|
24
|
-
Layer.succeed(StdinService, {
|
|
25
|
-
readLine: (_prompt) => Effect.succeed(input),
|
|
26
|
-
});
|
|
27
|
-
}
|