{"_id":"@bota-apps/app-config","_rev":"5-237b63880b35e32d66bf75dd4fff8106","name":"@bota-apps/app-config","dist-tags":{"latest":"0.2.2"},"versions":{"0.0.1":{"name":"@bota-apps/app-config","version":"0.0.1","author":{"name":"bota-apps"},"license":"MIT","_id":"@bota-apps/app-config@0.0.1","maintainers":[{"name":"bota-apps","email":"imusema.hassen@icloud.com"}],"homepage":"https://github.com/bota-apps/packages/tree/main/packages/app-config#readme","bugs":{"url":"https://github.com/bota-apps/packages/issues"},"dist":{"shasum":"1cb65736b40f0dad95ac1c0e9990dee883651703","tarball":"https://registry.npmjs.org/@bota-apps/app-config/-/app-config-0.0.1.tgz","fileCount":15,"integrity":"sha512-iogTlNdJIKfXze60AG813tsPEudJTUZAdeFa3gZHrEH30Izjw+1tEizVIaB0PAGSta1yIpYBRXcXZR9L+imJoA==","signatures":[{"sig":"MEQCIHbahlGOI6OKGzsHV/wpeW47jRE/rIIuEgH0dtg47TGIAiBzK67laWeOb6gOm1I159zZgqqIenLMTtJr4lMvgPYXfA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10968},"main":"./dist/index.js","type":"module","_from":"file:bota-apps-app-config-0.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"rm -rf dist && tsc && node ../../scripts/fixExtensions.mjs","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"bota-apps","email":"imusema.hassen@icloud.com"},"_resolved":"/private/var/folders/wp/6cc4gkfd481b73439xdrv4wm0000gn/T/ab9294cdfa4ea2286cc08f852f778f6d/bota-apps-app-config-0.0.1.tgz","_integrity":"sha512-iogTlNdJIKfXze60AG813tsPEudJTUZAdeFa3gZHrEH30Izjw+1tEizVIaB0PAGSta1yIpYBRXcXZR9L+imJoA==","repository":{"url":"git+https://github.com/bota-apps/packages.git","type":"git","directory":"packages/app-config"},"_npmVersion":"10.9.8","description":"Standardized runtime env config for @bota-apps apps: createViteAppConfig (maps Vite VITE_* env vars onto a Zod schema, failing fast on missing/invalid values) and graphqlAppEnv — the base env schema every GraphQL-backed host shares (mode, apiUrl, sessionO","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"zod":"^3.24.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/app-config_0.0.1_1783304894598_0.3869277310004444","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@bota-apps/app-config","version":"0.1.0","author":{"name":"bota-apps"},"license":"MIT","_id":"@bota-apps/app-config@0.1.0","maintainers":[{"name":"bota-apps","email":"imusema.hassen@icloud.com"}],"homepage":"https://github.com/bota-apps/packages/tree/main/packages/app-config#readme","bugs":{"url":"https://github.com/bota-apps/packages/issues"},"dist":{"shasum":"2b2302dba480733ea01b10e50b968a4d109c89e9","tarball":"https://registry.npmjs.org/@bota-apps/app-config/-/app-config-0.1.0.tgz","fileCount":15,"integrity":"sha512-ODlSR5mAkPEPlDBzmHLMWx6AWpKIdFwSTRUAPDzuIMhkPQ26tOI6SQhLLKJSmbAjDZLFZ6zgE5qu3bZcBezK2g==","signatures":[{"sig":"MEUCIEJrGdB/ch91wP+TRqxFUrh2WJr480EJxNG1GFeOd1ObAiEAsyVulbFOL8vVMuhvOPizQO/BQ2ErVKLSPaJM9M2xUwQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10968},"main":"./dist/index.js","type":"module","_from":"file:bota-apps-app-config-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"rm -rf dist && tsc && node ../../scripts/fixExtensions.mjs","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a51358f9-1187-4b75-9161-f7a495a912bb"}},"_resolved":"/tmp/86111bb2a130d03b0d830a759ef89407/bota-apps-app-config-0.1.0.tgz","_integrity":"sha512-ODlSR5mAkPEPlDBzmHLMWx6AWpKIdFwSTRUAPDzuIMhkPQ26tOI6SQhLLKJSmbAjDZLFZ6zgE5qu3bZcBezK2g==","repository":{"url":"git+https://github.com/bota-apps/packages.git","type":"git","directory":"packages/app-config"},"_npmVersion":"11.18.0","description":"Standardized runtime env config for @bota-apps apps: createViteAppConfig (maps Vite VITE_* env vars onto a Zod schema, failing fast on missing/invalid values) and graphqlAppEnv — the base env schema every GraphQL-backed host shares (mode, apiUrl, sessionO","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"zod":"^3.24.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/app-config_0.1.0_1783306214581_0.14419552591443607","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bota-apps/app-config","version":"0.2.0","author":{"name":"bota-apps"},"license":"MIT","_id":"@bota-apps/app-config@0.2.0","maintainers":[{"name":"bota-apps","email":"imusema.hassen@icloud.com"}],"homepage":"https://github.com/bota-apps/packages/tree/main/packages/app-config#readme","bugs":{"url":"https://github.com/bota-apps/packages/issues"},"dist":{"shasum":"b45e416e6e472894a3b61b6ebe7e7ee5265303ec","tarball":"https://registry.npmjs.org/@bota-apps/app-config/-/app-config-0.2.0.tgz","fileCount":19,"integrity":"sha512-OcewnvbFORdJpGLd4t2DNjeuWrL6cfP6n67dZ8/V6tY+a/x8eXBQ3r+sqLccIwQ5xQ51jZ4ZWE9oAE5BOwJWpw==","signatures":[{"sig":"MEQCIQDCHjMiuspEn/6dkDimZUHHxTMqZIVals4PlrsRfICk6gIfeAcQrpEB4xPoEP5f/RnAaC1b9zIC/I6iIxgZXmOU3A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16152},"main":"./dist/index.js","type":"module","_from":"file:bota-apps-app-config-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"rm -rf dist && tsc && node ../../scripts/fixExtensions.mjs","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a51358f9-1187-4b75-9161-f7a495a912bb"}},"_resolved":"/tmp/75fa5631dc73ffc27b404deb2a56b71c/bota-apps-app-config-0.2.0.tgz","_integrity":"sha512-OcewnvbFORdJpGLd4t2DNjeuWrL6cfP6n67dZ8/V6tY+a/x8eXBQ3r+sqLccIwQ5xQ51jZ4ZWE9oAE5BOwJWpw==","repository":{"url":"git+https://github.com/bota-apps/packages.git","type":"git","directory":"packages/app-config"},"_npmVersion":"11.18.0","description":"Standardized runtime env config for @bota-apps apps: createViteAppConfig (maps Vite VITE_* env vars onto a Zod schema, failing fast on missing/invalid values), graphqlAppEnv — the base env schema every GraphQL-backed host shares (mode, apiUrl, authUrl, ba","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"zod":"^3.24.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/app-config_0.2.0_1783309517679_0.6276927163422006","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@bota-apps/app-config","version":"0.2.1","keywords":["bota-apps","typescript","config","env","vite","zod","graphql","schema"],"author":{"url":"https://github.com/bota-apps","name":"Bota Apps"},"license":"MIT","_id":"@bota-apps/app-config@0.2.1","maintainers":[{"name":"bota-apps","email":"imusema.hassen@icloud.com"}],"homepage":"https://github.com/bota-apps/packages/tree/main/packages/app-config#readme","bugs":{"url":"https://github.com/bota-apps/packages/issues"},"dist":{"shasum":"aed907cfccc962d83ce4d725d1aaa3699d546581","tarball":"https://registry.npmjs.org/@bota-apps/app-config/-/app-config-0.2.1.tgz","fileCount":19,"integrity":"sha512-llftJTZbSr6ACoZy39Cu192RXJZRlTN4ubhFLnjKX1z15RG8k2PaKUKJj1x/MjPdMvwQkjJkzVJZpG/N5tuEXQ==","signatures":[{"sig":"MEUCIQCUzgI0EmzonjpIFdpMl/rr92DpwmxfeBpG2lH1RFxUiQIgW67Z2gKslzrYAwi4wjMnGm/i7591U0YKesaTbzRfQIM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17993},"main":"./dist/index.js","type":"module","_from":"file:bota-apps-app-config-0.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"rm -rf dist && tsc && node ../../scripts/fixExtensions.mjs","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8130a9ee-b48b-46a8-81d1-fa8e65f9ab77"}},"_resolved":"/tmp/e1b1013693c5b7303dd4a4f7403bf51b/bota-apps-app-config-0.2.1.tgz","_integrity":"sha512-llftJTZbSr6ACoZy39Cu192RXJZRlTN4ubhFLnjKX1z15RG8k2PaKUKJj1x/MjPdMvwQkjJkzVJZpG/N5tuEXQ==","repository":{"url":"git+https://github.com/bota-apps/packages.git","type":"git","directory":"packages/app-config"},"_npmVersion":"11.18.0","description":"Standardized runtime env config for @bota-apps apps: createViteAppConfig (maps Vite VITE_* env vars onto a Zod schema, failing fast on missing/invalid values), graphqlAppEnv — the base env schema every GraphQL-backed host shares (mode, apiUrl, authUrl, ba","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"zod":"^3.24.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/app-config_0.2.1_1783319739800_0.5083720305781638","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@bota-apps/app-config","version":"0.2.2","description":"Standardized runtime env config for @bota-apps apps: createViteAppConfig (maps Vite VITE_* env vars onto a Zod schema, failing fast on missing/invalid values), graphqlAppEnv — the base env schema every GraphQL-backed host shares (mode, apiUrl, authUrl, ba","keywords":["bota-apps","typescript","config","env","vite","zod","graphql","schema"],"license":"MIT","author":{"name":"Bota Apps","url":"https://github.com/bota-apps"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"repository":{"type":"git","url":"git+https://github.com/bota-apps/packages.git","directory":"packages/app-config"},"homepage":"https://github.com/bota-apps/packages/tree/main/packages/app-config#readme","bugs":{"url":"https://github.com/bota-apps/packages/issues"},"publishConfig":{"access":"public"},"dependencies":{"zod":"^3.24.4"},"devDependencies":{"typescript":"^5.8.3"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"build":"rm -rf dist && tsc && node ../../scripts/fixExtensions.mjs","typecheck":"tsc --noEmit","clean":"rm -rf dist"},"_id":"@bota-apps/app-config@0.2.2","_integrity":"sha512-4jxL66MuyDcKAIT7Nu+B/0qMm6zzxHh0VXyef9eZCTQ8gmkd5v2tBEfG0A0bxVB6AgbfsLFadDPxLrDDujcoSQ==","_resolved":"/tmp/677d68a2fdec6661c5b3dbbe3e8aeabc/bota-apps-app-config-0.2.2.tgz","_from":"file:bota-apps-app-config-0.2.2.tgz","_nodeVersion":"22.23.1","_npmVersion":"11.18.0","dist":{"integrity":"sha512-4jxL66MuyDcKAIT7Nu+B/0qMm6zzxHh0VXyef9eZCTQ8gmkd5v2tBEfG0A0bxVB6AgbfsLFadDPxLrDDujcoSQ==","shasum":"e66e41a9dd5ccda395ece2d8f55dd9bffd00f8ee","tarball":"https://registry.npmjs.org/@bota-apps/app-config/-/app-config-0.2.2.tgz","fileCount":19,"unpackedSize":17991,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bota-apps%2fapp-config@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHBlfV5T5H/y10hAbU69cvl4AgLqzTxRNw9vNuBT0aPkAiEAnO0NDIGWVeE0c0yaJDiXBklmQPy1ao23dxqEVENTz/Q="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8130a9ee-b48b-46a8-81d1-fa8e65f9ab77"}},"directories":{},"maintainers":[{"name":"bota-apps","email":"imusema.hassen@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/app-config_0.2.2_1783672709710_0.6984408603317747"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-06T02:28:14.488Z","modified":"2026-07-10T08:38:30.079Z","0.0.1":"2026-07-06T02:28:14.728Z","0.1.0":"2026-07-06T02:50:14.709Z","0.2.0":"2026-07-06T03:45:17.820Z","0.2.1":"2026-07-06T06:35:39.923Z","0.2.2":"2026-07-10T08:38:29.831Z"},"bugs":{"url":"https://github.com/bota-apps/packages/issues"},"author":{"name":"Bota Apps","url":"https://github.com/bota-apps"},"license":"MIT","homepage":"https://github.com/bota-apps/packages/tree/main/packages/app-config#readme","keywords":["bota-apps","typescript","config","env","vite","zod","graphql","schema"],"repository":{"type":"git","url":"git+https://github.com/bota-apps/packages.git","directory":"packages/app-config"},"description":"Standardized runtime env config for @bota-apps apps: createViteAppConfig (maps Vite VITE_* env vars onto a Zod schema, failing fast on missing/invalid values), graphqlAppEnv — the base env schema every GraphQL-backed host shares (mode, apiUrl, authUrl, ba","maintainers":[{"name":"bota-apps","email":"imusema.hassen@icloud.com"}],"readme":"# @bota-apps/app-config\n\nStandardized runtime environment config for `@bota-apps` apps. It owns the Vite env\nresolver and the base env schema every GraphQL-backed host shares, so each app derives\nits config from one Zod schema that fails fast at startup instead of hand-rolling env\nparsing and degrading silently on a missing var.\n\n## Install\n\n```bash\npnpm add @bota-apps/app-config\n# peer: zod\n```\n\n## Usage\n\nExtend the base schema with any app-only keys, resolve it from `import.meta.env`, and\nfeed the session paths to the auth client:\n\n```ts\nimport { createViteAppConfig, graphqlAppEnv, sessionPaths } from \"@bota-apps/app-config\";\nimport { createAuthClient } from \"@bota-apps/auth-client\";\nimport { z } from \"zod\";\n\nconst envSchema = graphqlAppEnv.extend({\n  missingTranslationLevel: z.enum([\"error\", \"warning\", \"info\", \"ignore\"]).optional(),\n});\n\nexport const env = createViteAppConfig(envSchema, import.meta.env);\n\nconst authClient = createAuthClient({\n  authUrl: env.authUrl,\n  paths: sessionPaths(env, subdomain),\n});\n```\n\n### `createViteAppConfig(schema, import.meta.env)`\n\nMaps each schema key onto a Vite env var — `apiUrl` → `VITE_API_URL`, with the `mode`\nbuiltin reading `MODE` — and parses the result with Zod. No defaults: a missing or\ninvalid var throws at startup, so config fails fast rather than silently degrading.\n\n### `graphqlAppEnv`\n\nThe base env schema every GraphQL-backed host shares. Names are deployment-agnostic\n(`apiUrl`/`authUrl` describe roles, not a specific backend). Extend it with `.extend({ … })`\nfor app-only keys.\n\n| Schema key             | Env var                        | Notes                                                            |\n| ---------------------- | ------------------------------ | ---------------------------------------------------------------- |\n| `mode`                 | `MODE` (Vite builtin)          | `development \\| staging \\| production`                           |\n| `apiUrl`               | `VITE_API_URL`                 | Same-origin path (`/graphql`) or an absolute API URL             |\n| `authUrl`              | `VITE_AUTH_URL`                | Empty = same-origin; an absolute origin for the standalone stack |\n| `baseDomains`          | `VITE_BASE_DOMAINS`            | Comma-separated; the active tenant is the subdomain under one    |\n| `sessionUserPath`      | `VITE_SESSION_USER_PATH`       | Session gateway route — resolved against `authUrl`               |\n| `sessionLoginPath`     | `VITE_SESSION_LOGIN_PATH`      | \"                                                                |\n| `sessionLogoutPath`    | `VITE_SESSION_LOGOUT_PATH`     | \"                                                                |\n| `sessionSwitchOrgPath` | `VITE_SESSION_SWITCH_ORG_PATH` | \"                                                                |\n\n`baseDomains` is transformed from the comma-separated string into a trimmed, non-empty\n`string[]`. The resolved type is exported as `GraphqlAppEnv`.\n\n### `sessionPaths(env, subdomain)`\n\nMaps the `session*Path` env keys onto the `@bota-apps/auth-client` `paths` shape,\nappending the active tenant `subdomain` to the user endpoint. Kept structural (no\nauth-client import) so app-config stays dependency-light; it matches `SessionPaths` by\nshape. Hosts derive their session contract from config instead of hand-rolling the\nmapping.\n\n## API\n\n| Export                | Kind     | What                                                                         |\n| --------------------- | -------- | ---------------------------------------------------------------------------- |\n| `createViteAppConfig` | function | Resolve a Zod-validated config from Vite env vars, failing fast on bad input |\n| `graphqlAppEnv`       | schema   | Base Zod env schema shared by every GraphQL-backed host                      |\n| `GraphqlAppEnv`       | type     | `z.infer` of the resolved base env                                           |\n| `sessionPaths`        | function | Map `session*Path` env keys onto the auth-client `paths` shape               |\n| `SessionPaths`        | type     | Structural shape of the auth-client session paths                            |\n\nPart of the [`@bota-apps` packages monorepo](https://github.com/bota-apps/packages).\n","readmeFilename":"README.md"}