-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
arkenvChanges to the `arkenv` npm package.Changes to the `arkenv` npm package.bugSomething isn't workingSomething isn't working
Description
This type doesn't work when being put into createEnv:
import { type } from "arkenv";
export default type({
BUN_PUBLIC_API_URL: "string.url",
BUN_PUBLIC_DEBUG: "boolean",
});The existence of the first type throws:
apps/playgrounds/bun-react on 568-coercion-playgroundsexamples [$!] via 🥟 v1.3.2
❯ nb
> bun-react-playground@0.1.0 build /Users/yamcodes/code/arkenv/apps/playgrounds/bun-react
> NODE_ENV=production bun bin/build.ts
31 | }
32 | };
33 | export const ToJsonSchema = {
34 | Error: ToJsonSchemaError,
35 | throw: (...args) => {
36 | throw new ToJsonSchema.Error(...args);
^
ToJsonSchemaError: {
code: "predicate",
base: {
type: "string"
},
predicate: Function(isParsableUrl)
}
context: {
code: "predicate",
base: [Object ...],
predicate: [Function: isParsableUrl],
},
code: "predicate"
at throw (/Users/yamcodes/code/arkenv/node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/toJsonSchema.js:36:15)
at reduce (1:11)
at toResolvedJsonSchema (/Users/yamcodes/code/arkenv/node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/root.js:102:29)
at reduceObjectJsonSchema (/Users/yamcodes/code/arkenv/node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/structure.js:560:48)
at reduce (1:11)
at toResolvedJsonSchema (/Users/yamcodes/code/arkenv/node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/root.js:102:29)
at toJsonSchema (/Users/yamcodes/code/arkenv/node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/roots/root.js:75:36)
at l (/Users/yamcodes/code/arkenv/packages/arkenv/dist/index.js:1:2188)
at v (/Users/yamcodes/code/arkenv/packages/arkenv/dist/index.js:4:320)
at n (/Users/yamcodes/code/arkenv/packages/bun-plugin/dist/index.js:1:89)
Bun v1.3.2 (macOS arm64)
ELIFECYCLE Command failed with exit code 1.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
arkenvChanges to the `arkenv` npm package.Changes to the `arkenv` npm package.bugSomething isn't workingSomething isn't working