@strifeapp/astro 1.2.0 → 1.4.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/README.md +28 -4
- package/dist/Insights.astro +243 -0
- package/dist/edit-mode.js +21 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{vite-plugin-strife-store-Tvau120y.js → vite-plugin-strife-store-B-B_HXbA.js} +13 -51
- package/dist/vite-plugin-strife-store-entry.js +1 -1
- package/dist/vite-plugin-strife-store.d.ts.map +1 -1
- package/package.json +6 -3
- package/dist/localized-content-index.js +0 -798
- package/dist/secrets-codec.d.ts +0 -54
- package/dist/secrets-codec.d.ts.map +0 -1
package/dist/secrets-codec.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Codec for the single `STRIFE_SECRET` env var.
|
|
3
|
-
*
|
|
4
|
-
* Wire format (dot-separated, JWT-style): `v1.<meta>.<cert>`
|
|
5
|
-
* - `meta` = base64url(JSON.stringify({ urls, database, password?, type?, teamId?, previewSecret? }))
|
|
6
|
-
* - `cert` = base64url(<raw PFX bytes>) — encoded ONCE (no double-base64)
|
|
7
|
-
*
|
|
8
|
-
* This module is the single source of truth for the format. The generation
|
|
9
|
-
* script (encode) and the generated `strife:store` module (decode) both bind to
|
|
10
|
-
* it. It is intentionally dependency-free (Node `Buffer` only) so the decode
|
|
11
|
-
* logic runs on every Node-based runtime, including edge runtimes without
|
|
12
|
-
* `node:zlib`. No compression, no encryption — base64url is encoding, not secrecy.
|
|
13
|
-
*
|
|
14
|
-
* Error messages carry only STRUCTURAL diagnostics — never the blob value, the
|
|
15
|
-
* decoded meta, the certificate bytes, or the password (R7 no-leak): a decode
|
|
16
|
-
* error can surface in an SSR log or error overlay.
|
|
17
|
-
*/
|
|
18
|
-
export interface PackedSecrets {
|
|
19
|
-
urls: string[];
|
|
20
|
-
database: string;
|
|
21
|
-
/** Raw PFX bytes (NOT base64). RavenDB receives this Buffer directly. */
|
|
22
|
-
certificate: Buffer;
|
|
23
|
-
password?: string;
|
|
24
|
-
type?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Team/workspace id. Matched against the `workspace` claim of a preview
|
|
27
|
-
* (edit-mode) token. Not secret on its own — an identifier, like an account
|
|
28
|
-
* number.
|
|
29
|
-
*/
|
|
30
|
-
teamId?: string;
|
|
31
|
-
/**
|
|
32
|
-
* HMAC secret used to verify preview (edit-mode) tokens. Distinct in purpose
|
|
33
|
-
* from the DB certificate/password, but rides in the same blob so consumers
|
|
34
|
-
* configure a single var. Consumed by edit-mode.ts.
|
|
35
|
-
*/
|
|
36
|
-
previewSecret?: string;
|
|
37
|
-
}
|
|
38
|
-
/** Thrown on a malformed blob. Messages are structural-only (no secret content). */
|
|
39
|
-
export declare class SecretsDecodeError extends Error {
|
|
40
|
-
constructor(message: string);
|
|
41
|
-
}
|
|
42
|
-
export declare function encodeSecrets(secrets: PackedSecrets): string;
|
|
43
|
-
/**
|
|
44
|
-
* Decode a `STRIFE_SECRET` blob.
|
|
45
|
-
*
|
|
46
|
-
* @returns the packed secrets, or `null` when the blob carries a *known-shape*
|
|
47
|
-
* but unrecognised version (e.g. a future `v2`). `null` signals the caller to
|
|
48
|
-
* treat `STRIFE_SECRET` as unset and degrade to the four-var fallback chain,
|
|
49
|
-
* rather than aborting module init.
|
|
50
|
-
* @throws {SecretsDecodeError} when the blob is malformed (wrong section count,
|
|
51
|
-
* no version prefix, bad base64url, invalid/incomplete JSON).
|
|
52
|
-
*/
|
|
53
|
-
export declare function decodeSecrets(value: string): PackedSecrets | null;
|
|
54
|
-
//# sourceMappingURL=secrets-codec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secrets-codec.d.ts","sourceRoot":"","sources":["../src/secrets-codec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oFAAoF;AACpF,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAc5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CA0DjE"}
|