@cvr/linear 0.2.0 → 0.4.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 +43 -10
- package/bin/linear +0 -0
- package/package.json +25 -21
- package/skills/linear/SKILL.md +146 -0
- package/src/cli.ts +14 -0
- package/src/commands/api.ts +148 -0
- package/src/commands/auth.ts +46 -34
- package/src/commands/issue.ts +475 -201
- package/src/commands/project.ts +51 -0
- package/src/commands/team.ts +28 -5
- package/src/domain/Input.ts +55 -0
- package/src/domain/Linear.ts +134 -0
- package/src/lib/errors.ts +11 -18
- package/src/lib/flags.ts +5 -0
- package/src/lib/json.ts +5 -0
- package/src/main.ts +18 -30
- package/src/services/Config.ts +118 -129
- package/src/services/Linear.ts +421 -159
- package/tsconfig.json +67 -7
- package/src/services/Browser.ts +0 -23
- package/src/services/Stdin.ts +0 -34
package/tsconfig.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
4
|
-
"module": "
|
|
5
|
-
"moduleResolution": "
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
6
|
"moduleDetection": "force",
|
|
7
7
|
"verbatimModuleSyntax": true,
|
|
8
8
|
"esModuleInterop": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
9
10
|
"strict": true,
|
|
11
|
+
"noUncheckedIndexedAccess": true,
|
|
12
|
+
"noFallthroughCasesInSwitch": true,
|
|
13
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
10
14
|
"noUnusedLocals": true,
|
|
11
15
|
"noImplicitOverride": true,
|
|
12
16
|
"skipLibCheck": true,
|
|
@@ -14,14 +18,70 @@
|
|
|
14
18
|
"declarationMap": true,
|
|
15
19
|
"sourceMap": true,
|
|
16
20
|
"outDir": "dist",
|
|
17
|
-
"rootDir": "
|
|
18
|
-
"types": ["bun
|
|
21
|
+
"rootDir": ".",
|
|
22
|
+
"types": ["bun"],
|
|
19
23
|
"plugins": [
|
|
20
24
|
{
|
|
21
|
-
"name": "@effect/language-service"
|
|
25
|
+
"name": "@effect/language-service",
|
|
26
|
+
"diagnostics": true,
|
|
27
|
+
"diagnosticsName": true,
|
|
28
|
+
"includeSuggestionsInTsc": true,
|
|
29
|
+
"ignoreEffectSuggestionsInTscExitCode": false,
|
|
30
|
+
"ignoreEffectWarningsInTscExitCode": false,
|
|
31
|
+
"ignoreEffectErrorsInTscExitCode": false,
|
|
32
|
+
"diagnosticSeverity": {
|
|
33
|
+
"anyUnknownInErrorContext": "error",
|
|
34
|
+
"deterministicKeys": "error",
|
|
35
|
+
"importFromBarrel": "warning",
|
|
36
|
+
"instanceOfSchema": "warning",
|
|
37
|
+
"missedPipeableOpportunity": "suggestion",
|
|
38
|
+
"missingEffectServiceDependency": "warning",
|
|
39
|
+
"schemaUnionOfLiterals": "warning",
|
|
40
|
+
"strictBooleanExpressions": "warning",
|
|
41
|
+
"strictEffectProvide": "warning",
|
|
42
|
+
"catchAllToMapError": "warning",
|
|
43
|
+
"catchUnfailableEffect": "warning",
|
|
44
|
+
"effectFnOpportunity": "warning",
|
|
45
|
+
"effectMapVoid": "warning",
|
|
46
|
+
"effectSucceedWithVoid": "warning",
|
|
47
|
+
"leakingRequirements": "warning",
|
|
48
|
+
"preferSchemaOverJson": "warning",
|
|
49
|
+
"redundantSchemaTagIdentifier": "warning",
|
|
50
|
+
"returnEffectInGen": "warning",
|
|
51
|
+
"runEffectInsideEffect": "error",
|
|
52
|
+
"schemaStructWithTag": "warning",
|
|
53
|
+
"schemaSyncInEffect": "warning",
|
|
54
|
+
"tryCatchInEffectGen": "warning",
|
|
55
|
+
"unnecessaryEffectGen": "warning",
|
|
56
|
+
"unnecessaryFailYieldableError": "warning",
|
|
57
|
+
"unnecessaryPipe": "warning",
|
|
58
|
+
"unnecessaryPipeChain": "warning"
|
|
59
|
+
},
|
|
60
|
+
"keyPatterns": [
|
|
61
|
+
{
|
|
62
|
+
"target": "service",
|
|
63
|
+
"pattern": "default",
|
|
64
|
+
"skipLeadingPath": ["src/"]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"target": "error",
|
|
68
|
+
"pattern": "default",
|
|
69
|
+
"skipLeadingPath": ["src/"]
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"overrides": [
|
|
73
|
+
{
|
|
74
|
+
"include": ["**/tests/**/*.ts", "**/*.test.ts"],
|
|
75
|
+
"options": {
|
|
76
|
+
"diagnosticSeverity": {
|
|
77
|
+
"strictEffectProvide": "off"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
22
82
|
}
|
|
23
83
|
]
|
|
24
84
|
},
|
|
25
|
-
"include": ["src/**/*"],
|
|
85
|
+
"include": ["src/**/*", "tests/**/*", "vitest.config.ts"],
|
|
26
86
|
"exclude": ["node_modules", "dist", "bin"]
|
|
27
87
|
}
|
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.Tag("@linear/BrowserService")<
|
|
5
|
-
BrowserService,
|
|
6
|
-
{
|
|
7
|
-
readonly open: (url: string) => Effect.Effect<void, BrowserError>;
|
|
8
|
-
}
|
|
9
|
-
>() {
|
|
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 testLayer = Layer.succeed(BrowserService, {
|
|
21
|
-
open: (_url) => Effect.void,
|
|
22
|
-
});
|
|
23
|
-
}
|
package/src/services/Stdin.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Context, Effect, Layer } 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.Tag("StdinService")<
|
|
8
|
-
StdinService,
|
|
9
|
-
{
|
|
10
|
-
readonly readLine: (prompt: string) => Effect.Effect<string>;
|
|
11
|
-
}
|
|
12
|
-
>() {
|
|
13
|
-
static readonly layer = Layer.succeed(StdinService, {
|
|
14
|
-
readLine: (prompt) =>
|
|
15
|
-
Effect.async<string>((resume) => {
|
|
16
|
-
// Use Node's readline API (Bun compatible)
|
|
17
|
-
const readline = require("node:readline");
|
|
18
|
-
const rl = readline.createInterface({
|
|
19
|
-
input: process.stdin,
|
|
20
|
-
output: process.stdout,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
rl.question(prompt, (answer: string) => {
|
|
24
|
-
rl.close();
|
|
25
|
-
resume(Effect.succeed(answer));
|
|
26
|
-
});
|
|
27
|
-
}),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
static readonly testLayer = (input: string) =>
|
|
31
|
-
Layer.succeed(StdinService, {
|
|
32
|
-
readLine: (_prompt) => Effect.succeed(input),
|
|
33
|
-
});
|
|
34
|
-
}
|