@townco/env 0.1.27 → 0.1.29

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/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import { z } from "zod";
2
2
  import envKeys from "./schema.json" with { type: "json" };
3
3
  export const parseEnvFromSrc = (src = process.env) => (...keys) => z
4
- .object(keys.reduce((acc, key) => ({ ...acc, [key]: z.string().min(1) }), {}))
4
+ .object(keys.reduce(
5
+ // biome-ignore lint/performance/noAccumulatingSpread: Small object building is acceptable
6
+ (acc, key) => ({ ...acc, [key]: z.string().min(1) }), {}))
5
7
  .parse(src);
6
8
  export const parseEnv = parseEnvFromSrc();
7
9
  export { EnvFile } from "./env-file";
package/dist/schema.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "ANTHROPIC_API_KEY": null,
3
+ "ARTIFACTS_KEY_PREFIX": null,
3
4
  "AWS_ACCESS_KEY_ID": null,
4
5
  "AWS_BUCKET": null,
5
6
  "AWS_ENDPOINT": null,
@@ -9,6 +10,8 @@
9
10
  "EXA_API_KEY": null,
10
11
  "FLY_ORG_SLUG": null,
11
12
  "FLY_TOKEN": null,
13
+ "LIBRARY_ROOT_API_KEY": null,
14
+ "LIBRARY_API_URL": null,
12
15
  "MCP_PROXY_URL": null,
13
16
  "NEXT_PUBLIC_SITE_URL": null,
14
17
  "NEXT_PUBLIC_SUPABASE_ANON_KEY": null,
@@ -1,16 +1,18 @@
1
1
  #!/usr/bin/env bun
2
2
  import path from "node:path";
3
- import { findRoot } from "@townco/core";
3
+ import { findRoot } from "@townco/core/path";
4
4
  const envKeysFile = path.join("src", "schema.json");
5
5
  export const updateSchema = async ({ filePath = envKeysFile, ...opts } = {}) => {
6
6
  const keys = (await Bun.file(opts.envFile ?? path.join(await findRoot(), ".env.in")).text())
7
7
  .split("\n")
8
- .filter((line) => line.match(/^[A-Z_]+\=/))
8
+ .filter((line) => line.match(/^[A-Z_]+=/))
9
9
  .map((line) => line.split("=")[0])
10
10
  .filter((k) => Boolean(k))
11
11
  .sort();
12
12
  await Bun.write(filePath, Bun.spawnSync(["biome", "format", "--stdin-file-path", filePath], {
13
- stdin: Buffer.from(JSON.stringify(keys.reduce((acc, key) => ({ ...acc, [key]: null }), {}))),
13
+ stdin: Buffer.from(JSON.stringify(
14
+ // biome-ignore lint/performance/noAccumulatingSpread: Small object building is acceptable
15
+ keys.reduce((acc, key) => ({ ...acc, [key]: null }), {}))),
14
16
  }).stdout.toString());
15
17
  };
16
18
  if (import.meta.main)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@townco/env",
3
3
  "type": "module",
4
- "version": "0.1.27",
4
+ "version": "0.1.29",
5
5
  "description": "env",
6
6
  "license": "UNLICENSED",
7
7
  "main": "./dist/index.js",
@@ -21,9 +21,8 @@
21
21
  }
22
22
  },
23
23
  "devDependencies": {
24
- "@biomejs/biome": "^2.3.8",
25
- "@townco/core": "0.0.55",
26
- "@townco/tsconfig": "0.1.74",
24
+ "@townco/core": "0.0.57",
25
+ "@townco/tsconfig": "0.1.76",
27
26
  "typescript": "^5.9.3"
28
27
  },
29
28
  "scripts": {
@@ -32,7 +31,7 @@
32
31
  "schema:update": "bun src/update-schema"
33
32
  },
34
33
  "dependencies": {
35
- "@townco/core": "0.0.55",
34
+ "@townco/core": "0.0.57",
36
35
  "zod": "^4.1.13"
37
36
  }
38
37
  }