Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Refactor the internals of prompt rendering (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 authored Nov 30, 2023
1 parent 1512ce7 commit 6d6259e
Show file tree
Hide file tree
Showing 15 changed files with 838 additions and 977 deletions.
6 changes: 3 additions & 3 deletions examples/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ const numberPrompt = Prompt.float({
})

const textPrompt = Prompt.text({
message: `Please answer the following question\nWhat is your favorite food?`,
type: "hidden",
message: "Enter your password: ",
type: "password",
validate: (value) =>
value.length === 0
? Effect.fail("must be non-empty\nyou entered " + value)
? Effect.fail("Password cannot be empty")
: Effect.succeed(value)
})

Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,38 +57,38 @@
"coverage": "vitest run --coverage"
},
"peerDependencies": {
"@effect/platform": "^0.31.0",
"@effect/platform": "^0.31.2",
"@effect/printer": "^0.24.0",
"@effect/printer-ansi": "^0.24.0",
"@effect/schema": "^0.49.0",
"@effect/printer-ansi": "^0.25.0",
"@effect/schema": "^0.50.0",
"effect": "2.0.0-next.56"
},
"devDependencies": {
"@babel/cli": "^7.23.4",
"@babel/core": "^7.23.3",
"@babel/core": "^7.23.5",
"@babel/plugin-transform-export-namespace-from": "^7.23.4",
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@effect/build-utils": "^0.5.0",
"@effect/docgen": "^0.3.5",
"@effect/docgen": "^0.3.6",
"@effect/eslint-plugin": "^0.1.2",
"@effect/language-service": "^0.0.21",
"@effect/platform": "^0.31.0",
"@effect/platform-node": "^0.32.0",
"@effect/platform": "^0.31.2",
"@effect/platform-node": "^0.32.3",
"@effect/printer": "^0.24.0",
"@effect/printer-ansi": "^0.24.0",
"@effect/schema": "^0.49.0",
"@types/node": "^20.9.2",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@effect/printer-ansi": "^0.25.0",
"@effect/schema": "^0.50.0",
"@types/node": "^20.10.1",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@vitest/coverage-v8": "^0.34.6",
"babel-plugin-annotate-pure-calls": "^0.4.0",
"effect": "2.0.0-next.56",
"error-stack-parser": "^2.1.4",
"eslint": "^8.54.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-codegen": "^0.18.1",
"eslint-plugin-codegen": "^0.21.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
Expand All @@ -97,9 +97,9 @@
"madge": "^6.1.0",
"rimraf": "^5.0.5",
"stackframe": "^1.3.4",
"tsx": "^4.1.4",
"tsx": "^4.6.0",
"typescript": "^5.3.2",
"vite": "^5.0.0",
"vite": "^5.0.4",
"vitest": "^0.34.6"
}
}
Loading

0 comments on commit 6d6259e

Please sign in to comment.