Add wish/wrapper control plane CLI package#160
Add wish/wrapper control plane CLI package#160subtleGradient wants to merge 1 commit intoeffect-native/mainfrom
Conversation
subtleGradient
left a comment
There was a problem hiding this comment.
Use @effect/platform instead of node:fs or node:path
| Effect.tryPromise({ | ||
| try: () => fs.readFile(configPath, "utf8"), | ||
| catch: (error) => error as Error | ||
| }) |
There was a problem hiding this comment.
Use @effect/platform instead
| const configPath = path.join(rootDir, "wrp.config.json") | ||
| const exists = yield* Effect.tryPromise({ | ||
| try: () => fs.access(configPath).then(() => true).catch(() => false), | ||
| catch: (error) => error as Error | ||
| }) |
There was a problem hiding this comment.
Use @effect/platform instead
| const content = yield* readConfigFile(configPath) | ||
| const parsed = JSON.parse(content) as Partial<WrpConfig> |
There was a problem hiding this comment.
Use Effect Schema instead
| Effect.tryPromise({ | ||
| try: () => fs.access(filePath).then(() => true).catch(() => false), | ||
| catch: (error) => error as Error | ||
| }) |
There was a problem hiding this comment.
Use @effect/platform instead
| const ensureDir = (dir: string) => | ||
| Effect.tryPromise({ | ||
| try: () => fs.mkdir(dir, { recursive: true }), | ||
| catch: (error) => error as Error | ||
| }) | ||
|
|
||
| const writeFile = (filePath: string, content: string) => | ||
| Effect.tryPromise({ | ||
| try: () => fs.writeFile(filePath, content, "utf8"), | ||
| catch: (error) => error as Error | ||
| }) |
There was a problem hiding this comment.
Use @effect/platform instead
| const promptgraphRoot = path.join(rootDir, config.promptgraphDir) | ||
| const targetsRoot = path.join(rootDir, config.targetsDir) |
There was a problem hiding this comment.
Use @effect/platform instead
| import { promises as fs } from "node:fs" | ||
| import path from "node:path" |
There was a problem hiding this comment.
Use @effect/platform instead
| @@ -0,0 +1,15 @@ | |||
| import { spawn } from "node:child_process" | |||
There was a problem hiding this comment.
Use @effect/platform instead
| import { promises as fs } from "node:fs" | ||
| import path from "node:path" |
There was a problem hiding this comment.
Use @effect/platform instead
| import { promises as fs } from "node:fs" | ||
| import path from "node:path" |
There was a problem hiding this comment.
Use @effect/platform instead
Summary
Testing
Codex Task