@sentroy-co/client-sdk 2.8.0 → 2.12.0

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/AGENTS.md CHANGED
@@ -767,6 +767,21 @@ function ConfigPanel() {
767
767
  | `apiKey` | `string` | `process.env.NEXT_PUBLIC_SENTROY_ENV_API_KEY` | Bearer token for browser polling |
768
768
  | `refreshIntervalMs` | `number` | `300000` (5 min) | `0` to disable polling |
769
769
 
770
+ ### Migration helper: `getEnvWithFallback(key)`
771
+
772
+ For codebases moving from `process.env` to vault gradually, use `getEnvWithFallback` — it tries vault first, falls back to `process.env[key]` on cache miss / fetch failure / missing token. The point is *zero downtime*: deploy the code change before populating the vault, and nothing breaks; fill the vault later, and the same code starts reading from there.
773
+
774
+ ```ts
775
+ import { getEnvWithFallback } from "@sentroy-co/client-sdk/vault"
776
+
777
+ // Old: process.env.STRIPE_SECRET_KEY
778
+ const stripeKey = await getEnvWithFallback("STRIPE_SECRET_KEY")
779
+ ```
780
+
781
+ After the value is in the vault and you've verified it's being read, swap the call to `getEnv` (or `getEnvOrThrow`) so a future `process.env` re-introduction doesn't silently shadow the vault value.
782
+
783
+ Bootstrap path (no `SENTROY_ENV_API_KEY` set) skips the fetch entirely and goes straight to `process.env` — so an app deployed without vault credentials still boots and reads its envs the legacy way. This is intentional: the vault is opt-in, not a hard requirement.
784
+
770
785
  ### Security notes
771
786
 
772
787
  - `useEnv()` only ever returns variables marked `public: true` in the dashboard. Server-only secrets stay server-side.
@@ -774,6 +789,88 @@ function ConfigPanel() {
774
789
  - The bootstrap token is per-(project, environment). A `prod` token cannot read `staging` and vice versa.
775
790
  - Variable values are AES-256-GCM encrypted at rest in the Sentroy vault DB. Decryption happens server-side just before the fetch endpoint streams the response.
776
791
 
792
+ ### Webhooks (`createVaultWebhookHandler`)
793
+
794
+ Variable changes can push directly to your app instead of waiting on the 5-min cache TTL. Configure a webhook in the dashboard under a project's **Webhooks** tab — Sentroy will POST to your URL on every `variable.create | variable.update | variable.delete`.
795
+
796
+ ```ts
797
+ // app/api/sentroy/vault-webhook/route.ts
798
+ import { createVaultWebhookHandler } from "@sentroy-co/client-sdk/vault"
799
+
800
+ export const POST = createVaultWebhookHandler({
801
+ secret: process.env.SENTROY_VAULT_WEBHOOK_SECRET!,
802
+ // optional — default behaviour: await refreshEnvCache()
803
+ async onChange(payload) {
804
+ console.log("vault changed", payload.action, payload.keys)
805
+ // your invalidation logic, then:
806
+ await refreshEnvCache()
807
+ },
808
+ // optional — replay-window check, default 5 min
809
+ maxAgeMs: 5 * 60 * 1000,
810
+ })
811
+ ```
812
+
813
+ Payload (signed):
814
+ ```json
815
+ {
816
+ "event": "vault.variable.changed",
817
+ "project": "<projectId>",
818
+ "environment": "prod",
819
+ "action": "create" | "update" | "delete",
820
+ "keys": ["DATABASE_URL", "..."],
821
+ "timestamp": 1731430000000
822
+ }
823
+ ```
824
+
825
+ Headers Sentroy sends: `X-Sentroy-Signature: sha256=<hex>` (HMAC over the raw body), `X-Sentroy-Event: vault.variable.changed`, `X-Sentroy-Webhook-Id: <id>`.
826
+
827
+ The handler returns:
828
+ - `200` with `{ ok: true }` after a verified signature + completed `onChange`
829
+ - `401` for missing/malformed/invalid signature, or timestamp outside the replay window
830
+ - `400` for an invalid JSON body
831
+ - `500` if `onChange` throws
832
+
833
+ Delivery is fire-and-forget on the Sentroy side with a 5 sec timeout; the dashboard records the last delivery's status + error string per webhook for visibility. Failed deliveries are not auto-retried (admin can flip the enabled toggle to retry manually by re-saving a variable, or we'll add a "resend" button later).
834
+
835
+ The vault webhook secret namespace is `whsec_*` — distinct from access tokens (`stk_*` / `stk_env_*`).
836
+
837
+ ### CLI (`sentroy env ...`)
838
+
839
+ The package ships a `sentroy` binary. After `npm install` (or `npm install -g`) it's available on `PATH`; `npx sentroy ...` works without a global install.
840
+
841
+ Auth is the same `SENTROY_ENV_API_KEY` used by `getEnv()` (or pass `--token=stk_env_...`). Base URL defaults to `https://sentroy.com` (override with `SENTROY_ENV_API_URL` or `--url=`). The token's (project, environment) scope is implicit — never specified on the CLI.
842
+
843
+ ```bash
844
+ # Push a local file to the vault. Without --delete-missing it's upsert-only.
845
+ # With --delete-missing it's a full sync — any vault key not in the file
846
+ # is removed (CLI prompts for confirmation interactively).
847
+ sentroy env push .env.production --delete-missing
848
+ sentroy env push .env.production --dry-run # show diff, no writes
849
+
850
+ # Diff local vs vault without writing.
851
+ sentroy env diff .env.production --delete-missing
852
+
853
+ # Pull the vault into a local file. Refuses to overwrite without --force.
854
+ sentroy env pull .env.staging --force
855
+
856
+ # List keys (or KEY=value with --values; only public-flagged with --public-only).
857
+ sentroy env list
858
+ sentroy env list --values
859
+ sentroy env list --public-only
860
+ ```
861
+
862
+ `push` requires the token to have `write` permission (toggle when generating the token in the dashboard). `pull`, `list`, and `diff` only need `read`.
863
+
864
+ The CLI parses the same `.env` flavour as the dashboard's developer mode:
865
+
866
+ - blank line resets pending description / public flag
867
+ - `# any comment` above a key becomes the variable's description
868
+ - `# @public` on its own line marks the next key as browser-readable
869
+ - `KEY="quoted with spaces"` and `KEY='single quoted'` both supported
870
+ - `export KEY=value` prefix is stripped
871
+
872
+ REST endpoint behind `push`: `POST /api/env-vault/push` with body `{ entries: [{key, value, public?, description?}], deleteMissing?: boolean }` and `Authorization: Bearer stk_env_...`. Response: `{ added, updated, unchanged, deleted, total, project, environment }`. Each insert/update/delete writes one audit log entry (checksum, no plaintext) tagged `source: "cli-push"`.
873
+
777
874
  ## Requirements
778
875
 
779
876
  - Node.js 18+ (uses native `fetch`)
package/README.md CHANGED
@@ -84,11 +84,15 @@ Manage your env vars in the dashboard at [vault.sentroy.com](https://vault.sentr
84
84
 
85
85
  ```ts
86
86
  // server side
87
- import { getEnv, getEnvOrThrow, preloadEnv } from "@sentroy-co/client-sdk/vault"
87
+ import { getEnv, getEnvOrThrow, getEnvWithFallback, preloadEnv } from "@sentroy-co/client-sdk/vault"
88
88
 
89
89
  await preloadEnv() // optional fail-fast at boot
90
90
  const dbUrl = await getEnv("DATABASE_URL")
91
91
  const turnstile = await getEnvOrThrow("BETTER_AUTH_TURNSTILE_SECRET")
92
+
93
+ // Migration helper — vault'tan oku, yoksa process.env fallback.
94
+ // Sentroy app'lerini kademeli olarak migrate ederken kullanışlı.
95
+ const stripe = await getEnvWithFallback("STRIPE_SECRET_KEY")
92
96
  ```
93
97
 
94
98
  ```tsx
@@ -106,6 +110,35 @@ const siteKey = useEnv("TURNSTILE_SITE_KEY")
106
110
 
107
111
  Bootstrap is a single env: `SENTROY_ENV_API_KEY`. Public/private split is enforced server-side — the React hook only ever sees `public: true` variables. Full reference at [docs.sentroy.com/env-vault](https://docs.sentroy.com/env-vault).
108
112
 
113
+ ### Webhooks (real-time invalidation)
114
+
115
+ Skip the 5-min cache TTL — point the vault at your app and it'll POST whenever any variable changes. The default handler verifies the HMAC-SHA256 signature and refreshes the cache:
116
+
117
+ ```ts
118
+ // app/api/sentroy/vault-webhook/route.ts
119
+ import { createVaultWebhookHandler } from "@sentroy-co/client-sdk/vault"
120
+
121
+ export const POST = createVaultWebhookHandler({
122
+ secret: process.env.SENTROY_VAULT_WEBHOOK_SECRET!,
123
+ })
124
+ ```
125
+
126
+ Configure the receiver URL in the vault dashboard under the project's **Webhooks** tab; the secret comes back once at create-time. Provide your own `onChange` handler for custom logic.
127
+
128
+ ### CLI
129
+
130
+ The package ships a `sentroy` CLI for syncing local `.env` files to the vault — useful for build pipelines and onboarding.
131
+
132
+ ```bash
133
+ # Use SENTROY_ENV_API_KEY (or pass --token=stk_env_...)
134
+ npx sentroy env push .env.production --delete-missing
135
+ npx sentroy env diff .env.production
136
+ npx sentroy env pull .env.staging --force
137
+ npx sentroy env list --values --public-only
138
+ ```
139
+
140
+ The token's (project, environment) scope is implicit. `--delete-missing` makes the push a full sync — keys not in the local file are removed from the vault. The token must have `write` permission for `push`; everything else only needs `read`.
141
+
109
142
  ## Self-hosted vs hosted
110
143
 
111
144
  The SDK is identical in both modes. Only `baseUrl` changes:
package/bin/sentroy.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ // Thin shim — keeps the shebang out of TypeScript-emitted files so tsc
3
+ // can still emit them as plain CommonJS modules without preserving comments.
4
+ require("../dist/cli/index.js")
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Minimal .env parser + serializer used by the CLI.
3
+ *
4
+ * Format conventions (mirrors apps/core/components/admin/env-vault-content.tsx
5
+ * developer mode):
6
+ * - blank line resets pending description/public flag
7
+ * - `# @public` on its own line marks the next variable as browser-readable
8
+ * - `# any other text` becomes the next variable's description
9
+ * - `KEY=value` (unquoted)
10
+ * - `KEY="value with spaces"` (double-quoted; supports \n, \", \\ escapes)
11
+ * - `KEY='single quotes'` (single-quoted; literal)
12
+ * - `export KEY=value` (export prefix stripped)
13
+ *
14
+ * Anything else is reported as a parse error with the offending line number.
15
+ */
16
+ export interface DotenvEntry {
17
+ key: string;
18
+ value: string;
19
+ public: boolean;
20
+ description: string | null;
21
+ }
22
+ export interface DotenvParseResult {
23
+ entries: DotenvEntry[];
24
+ errors: {
25
+ line: number;
26
+ message: string;
27
+ }[];
28
+ }
29
+ export declare function parseDotenv(text: string): DotenvParseResult;
30
+ /**
31
+ * Inverse of parseDotenv — emit a .env document that round-trips through it.
32
+ * Quotes values that contain whitespace or shell-special characters.
33
+ */
34
+ export declare function serializeDotenv(entries: DotenvEntry[]): string;
35
+ //# sourceMappingURL=dotenv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dotenv.d.ts","sourceRoot":"","sources":["../../src/cli/dotenv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC5C;AAID,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CA2F3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAkB9D"}
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ /**
3
+ * Minimal .env parser + serializer used by the CLI.
4
+ *
5
+ * Format conventions (mirrors apps/core/components/admin/env-vault-content.tsx
6
+ * developer mode):
7
+ * - blank line resets pending description/public flag
8
+ * - `# @public` on its own line marks the next variable as browser-readable
9
+ * - `# any other text` becomes the next variable's description
10
+ * - `KEY=value` (unquoted)
11
+ * - `KEY="value with spaces"` (double-quoted; supports \n, \", \\ escapes)
12
+ * - `KEY='single quotes'` (single-quoted; literal)
13
+ * - `export KEY=value` (export prefix stripped)
14
+ *
15
+ * Anything else is reported as a parse error with the offending line number.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.parseDotenv = parseDotenv;
19
+ exports.serializeDotenv = serializeDotenv;
20
+ const KEY_PATTERN = /^[A-Z_][A-Z0-9_]*$/;
21
+ function parseDotenv(text) {
22
+ const lines = text.split(/\r?\n/);
23
+ const entries = [];
24
+ const errors = [];
25
+ const seen = new Set();
26
+ let pendingDescription = [];
27
+ let pendingPublic = false;
28
+ for (let i = 0; i < lines.length; i++) {
29
+ const raw = lines[i] ?? "";
30
+ const line = raw.trim();
31
+ if (line === "") {
32
+ pendingDescription = [];
33
+ pendingPublic = false;
34
+ continue;
35
+ }
36
+ if (line.startsWith("#")) {
37
+ const body = line.slice(1).trim();
38
+ if (body === "@public") {
39
+ pendingPublic = true;
40
+ }
41
+ else if (body) {
42
+ pendingDescription.push(body);
43
+ }
44
+ continue;
45
+ }
46
+ const work = line.startsWith("export ") ? line.slice(7).trimStart() : line;
47
+ const eq = work.indexOf("=");
48
+ if (eq <= 0) {
49
+ errors.push({
50
+ line: i + 1,
51
+ message: "invalid syntax (expected KEY=value)",
52
+ });
53
+ pendingDescription = [];
54
+ pendingPublic = false;
55
+ continue;
56
+ }
57
+ const key = work.slice(0, eq).trim();
58
+ let value = work.slice(eq + 1);
59
+ if (!KEY_PATTERN.test(key)) {
60
+ errors.push({
61
+ line: i + 1,
62
+ message: "key must match [A-Z_][A-Z0-9_]*",
63
+ });
64
+ pendingDescription = [];
65
+ pendingPublic = false;
66
+ continue;
67
+ }
68
+ const trimmed = value.trim();
69
+ if ((trimmed.startsWith('"') && trimmed.endsWith('"')) ||
70
+ (trimmed.startsWith("'") && trimmed.endsWith("'"))) {
71
+ value = trimmed.slice(1, -1);
72
+ if (trimmed.startsWith('"')) {
73
+ value = value
74
+ .replace(/\\n/g, "\n")
75
+ .replace(/\\"/g, '"')
76
+ .replace(/\\\\/g, "\\");
77
+ }
78
+ }
79
+ else {
80
+ value = trimmed;
81
+ }
82
+ if (seen.has(key)) {
83
+ errors.push({ line: i + 1, message: `duplicate key ${key}` });
84
+ pendingDescription = [];
85
+ pendingPublic = false;
86
+ continue;
87
+ }
88
+ seen.add(key);
89
+ entries.push({
90
+ key,
91
+ value,
92
+ public: pendingPublic,
93
+ description: pendingDescription.length > 0 ? pendingDescription.join(" ") : null,
94
+ });
95
+ pendingDescription = [];
96
+ pendingPublic = false;
97
+ }
98
+ return { entries, errors };
99
+ }
100
+ /**
101
+ * Inverse of parseDotenv — emit a .env document that round-trips through it.
102
+ * Quotes values that contain whitespace or shell-special characters.
103
+ */
104
+ function serializeDotenv(entries) {
105
+ const blocks = [];
106
+ for (const e of entries) {
107
+ const parts = [];
108
+ if (e.description)
109
+ parts.push(`# ${e.description}`);
110
+ if (e.public)
111
+ parts.push("# @public");
112
+ const value = e.value;
113
+ const needsQuote = /[\s"'#$`\\]/.test(value) || value === "";
114
+ const escaped = needsQuote
115
+ ? `"${value
116
+ .replace(/\\/g, "\\\\")
117
+ .replace(/"/g, '\\"')
118
+ .replace(/\n/g, "\\n")}"`
119
+ : value;
120
+ parts.push(`${e.key}=${escaped}`);
121
+ blocks.push(parts.join("\n"));
122
+ }
123
+ return blocks.join("\n\n") + (blocks.length > 0 ? "\n" : "");
124
+ }
125
+ //# sourceMappingURL=dotenv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dotenv.js","sourceRoot":"","sources":["../../src/cli/dotenv.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAgBH,kCA2FC;AAMD,0CAkBC;AArHD,MAAM,WAAW,GAAG,oBAAoB,CAAA;AAExC,SAAgB,WAAW,CAAC,IAAY;IACtC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACjC,MAAM,OAAO,GAAkB,EAAE,CAAA;IACjC,MAAM,MAAM,GAAgC,EAAE,CAAA;IAC9C,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAA;IAE9B,IAAI,kBAAkB,GAAa,EAAE,CAAA;IACrC,IAAI,aAAa,GAAG,KAAK,CAAA;IAEzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QAC1B,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAA;QAEvB,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;YAChB,kBAAkB,GAAG,EAAE,CAAA;YACvB,aAAa,GAAG,KAAK,CAAA;YACrB,SAAQ;QACV,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;YACjC,IAAI,IAAI,KAAK,SAAS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AAa,EAAE,CAAA;IAC3B,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,MAAM,KAAK,GAAa,EAAE,CAAA;QAC1B,IAAI,CAAC,CAAC,WAAW;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAA;QACnD,IAAI,CAAC,CAAC,MAAM;YAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACrC,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAA;QACrB,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,CAAA;QAC5D,MAAM,OAAO,GAAG,UAAU;YACxB,CAAC,CAAC,IAAI,KAAK;iBACN,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;iBACtB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;iBACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;YAC7B,CAAC,CAAC,KAAK,CAAA;QACT,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,OAAO,EAAE,CAAC,CAAA;QACjC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IAC/B,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AAC9D,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * `sentroy env <subcommand>` — vault sync from a local .env file.
3
+ *
4
+ * The token's (project, environment) scope is implicit; the CLI never
5
+ * asks for either since it can't change them.
6
+ */
7
+ export declare function cmdPush(args: string[]): Promise<void>;
8
+ export declare function cmdPull(args: string[]): Promise<void>;
9
+ export declare function cmdList(args: string[]): Promise<void>;
10
+ export declare function cmdDiff(args: string[]): Promise<void>;
11
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/cli/env.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgMH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgF3D;AAID,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB3D;AAID,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAmB3D;AAID,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB3D"}