blogwright-core 0.1.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.
Files changed (84) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +7 -0
  3. package/dist/adapters/memory-fs.d.ts +9 -0
  4. package/dist/adapters/memory-fs.js +54 -0
  5. package/dist/adapters/memory-fs.js.map +1 -0
  6. package/dist/adapters/node-fs.d.ts +4 -0
  7. package/dist/adapters/node-fs.js +65 -0
  8. package/dist/adapters/node-fs.js.map +1 -0
  9. package/dist/adapters/node-terminal.d.ts +29 -0
  10. package/dist/adapters/node-terminal.js +58 -0
  11. package/dist/adapters/node-terminal.js.map +1 -0
  12. package/dist/adapters/script-terminal.d.ts +22 -0
  13. package/dist/adapters/script-terminal.js +38 -0
  14. package/dist/adapters/script-terminal.js.map +1 -0
  15. package/dist/aws/acm.d.ts +20 -0
  16. package/dist/aws/acm.js +55 -0
  17. package/dist/aws/acm.js.map +1 -0
  18. package/dist/aws/cloudfront.d.ts +72 -0
  19. package/dist/aws/cloudfront.js +341 -0
  20. package/dist/aws/cloudfront.js.map +1 -0
  21. package/dist/aws/credentials.d.ts +19 -0
  22. package/dist/aws/credentials.js +36 -0
  23. package/dist/aws/credentials.js.map +1 -0
  24. package/dist/aws/endpoint.d.ts +29 -0
  25. package/dist/aws/endpoint.js +58 -0
  26. package/dist/aws/endpoint.js.map +1 -0
  27. package/dist/aws/errors.d.ts +20 -0
  28. package/dist/aws/errors.js +35 -0
  29. package/dist/aws/errors.js.map +1 -0
  30. package/dist/aws/form.d.ts +2 -0
  31. package/dist/aws/form.js +11 -0
  32. package/dist/aws/form.js.map +1 -0
  33. package/dist/aws/iam.d.ts +18 -0
  34. package/dist/aws/iam.js +122 -0
  35. package/dist/aws/iam.js.map +1 -0
  36. package/dist/aws/logs.d.ts +32 -0
  37. package/dist/aws/logs.js +148 -0
  38. package/dist/aws/logs.js.map +1 -0
  39. package/dist/aws/microvms.d.ts +85 -0
  40. package/dist/aws/microvms.js +182 -0
  41. package/dist/aws/microvms.js.map +1 -0
  42. package/dist/aws/route53.d.ts +19 -0
  43. package/dist/aws/route53.js +71 -0
  44. package/dist/aws/route53.js.map +1 -0
  45. package/dist/aws/s3.d.ts +31 -0
  46. package/dist/aws/s3.js +178 -0
  47. package/dist/aws/s3.js.map +1 -0
  48. package/dist/aws/secretsmanager.d.ts +21 -0
  49. package/dist/aws/secretsmanager.js +84 -0
  50. package/dist/aws/secretsmanager.js.map +1 -0
  51. package/dist/aws/signer.d.ts +44 -0
  52. package/dist/aws/signer.js +144 -0
  53. package/dist/aws/signer.js.map +1 -0
  54. package/dist/aws/sts.d.ts +7 -0
  55. package/dist/aws/sts.js +22 -0
  56. package/dist/aws/sts.js.map +1 -0
  57. package/dist/aws/xml.d.ts +18 -0
  58. package/dist/aws/xml.js +65 -0
  59. package/dist/aws/xml.js.map +1 -0
  60. package/dist/clients.d.ts +33 -0
  61. package/dist/clients.js +38 -0
  62. package/dist/clients.js.map +1 -0
  63. package/dist/colors.d.ts +11 -0
  64. package/dist/colors.js +24 -0
  65. package/dist/colors.js.map +1 -0
  66. package/dist/config.d.ts +136 -0
  67. package/dist/config.js +236 -0
  68. package/dist/config.js.map +1 -0
  69. package/dist/index.d.ts +26 -0
  70. package/dist/index.js +27 -0
  71. package/dist/index.js.map +1 -0
  72. package/dist/ports.d.ts +53 -0
  73. package/dist/ports.js +15 -0
  74. package/dist/ports.js.map +1 -0
  75. package/dist/repo-root.d.ts +8 -0
  76. package/dist/repo-root.js +20 -0
  77. package/dist/repo-root.js.map +1 -0
  78. package/dist/state.d.ts +23 -0
  79. package/dist/state.js +44 -0
  80. package/dist/state.js.map +1 -0
  81. package/dist/util.d.ts +15 -0
  82. package/dist/util.js +38 -0
  83. package/dist/util.js.map +1 -0
  84. package/package.json +42 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Minimal XML helpers for the handful of AWS REST-XML / query responses this CLI
3
+ * reads (S3, STS, IAM, CloudFront). Not a general XML parser — it extracts tag
4
+ * contents by name, which is sufficient for the flat response shapes we consume.
5
+ */
6
+ export declare function decodeEntities(value: string): string;
7
+ export declare function encodeEntities(value: string): string;
8
+ /** Return the inner content of the first `<name>…</name>` element, or undefined. */
9
+ export declare function firstTag(xml: string, name: string): string | undefined;
10
+ /** Return the decoded text value of the first `<name>` element. */
11
+ export declare function textTag(xml: string, name: string): string | undefined;
12
+ /**
13
+ * Like {@link textTag} but verbatim — no trimming. For values where whitespace
14
+ * is data, like S3 object keys (a trimmed key would target a different object).
15
+ */
16
+ export declare function rawTextTag(xml: string, name: string): string | undefined;
17
+ /** Return the inner content of every `<name>…</name>` element. */
18
+ export declare function allTags(xml: string, name: string): string[];
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Minimal XML helpers for the handful of AWS REST-XML / query responses this CLI
3
+ * reads (S3, STS, IAM, CloudFront). Not a general XML parser — it extracts tag
4
+ * contents by name, which is sufficient for the flat response shapes we consume.
5
+ */
6
+ const ENTITIES = {
7
+ '&amp;': '&',
8
+ '&lt;': '<',
9
+ '&gt;': '>',
10
+ '&quot;': '"',
11
+ '&apos;': "'",
12
+ };
13
+ export function decodeEntities(value) {
14
+ return value.replace(/&(amp|lt|gt|quot|apos);/g, (m) => ENTITIES[m] ?? m);
15
+ }
16
+ export function encodeEntities(value) {
17
+ return value.replace(/[&<>"']/g, (ch) => {
18
+ switch (ch) {
19
+ case '&':
20
+ return '&amp;';
21
+ case '<':
22
+ return '&lt;';
23
+ case '>':
24
+ return '&gt;';
25
+ case '"':
26
+ return '&quot;';
27
+ default:
28
+ return '&apos;';
29
+ }
30
+ });
31
+ }
32
+ /** Return the inner content of the first `<name>…</name>` element, or undefined. */
33
+ export function firstTag(xml, name) {
34
+ const re = new RegExp(`<${escapeName(name)}(?:\\s[^>]*)?>([\\s\\S]*?)</${escapeName(name)}>`);
35
+ const m = re.exec(xml);
36
+ return m?.[1];
37
+ }
38
+ /** Return the decoded text value of the first `<name>` element. */
39
+ export function textTag(xml, name) {
40
+ const inner = firstTag(xml, name);
41
+ return inner === undefined ? undefined : decodeEntities(inner.trim());
42
+ }
43
+ /**
44
+ * Like {@link textTag} but verbatim — no trimming. For values where whitespace
45
+ * is data, like S3 object keys (a trimmed key would target a different object).
46
+ */
47
+ export function rawTextTag(xml, name) {
48
+ const inner = firstTag(xml, name);
49
+ return inner === undefined ? undefined : decodeEntities(inner);
50
+ }
51
+ /** Return the inner content of every `<name>…</name>` element. */
52
+ export function allTags(xml, name) {
53
+ const re = new RegExp(`<${escapeName(name)}(?:\\s[^>]*)?>([\\s\\S]*?)</${escapeName(name)}>`, 'g');
54
+ const out = [];
55
+ let m;
56
+ while ((m = re.exec(xml)) !== null) {
57
+ if (m[1] !== undefined)
58
+ out.push(m[1]);
59
+ }
60
+ return out;
61
+ }
62
+ function escapeName(name) {
63
+ return name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
64
+ }
65
+ //# sourceMappingURL=xml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xml.js","sourceRoot":"","sources":["../../src/aws/xml.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,QAAQ,GAA2B;IACvC,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,GAAG;CACd,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,OAAO,KAAK,CAAC,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE;QACtC,QAAQ,EAAE,EAAE,CAAC;YACX,KAAK,GAAG;gBACN,OAAO,OAAO,CAAC;YACjB,KAA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EAAE,CAAC;IACzB,IAAI,CAAyB,CAAC;IAC9B,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS;YAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { AcmClient } from './aws/acm.js';
2
+ import { CloudFrontClient } from './aws/cloudfront.js';
3
+ import { type CredentialProvider } from './aws/credentials.js';
4
+ import { IamClient } from './aws/iam.js';
5
+ import { LogsClient } from './aws/logs.js';
6
+ import { MicrovmsClient } from './aws/microvms.js';
7
+ import { Route53Client } from './aws/route53.js';
8
+ import { S3Client } from './aws/s3.js';
9
+ import { SecretsManagerClient } from './aws/secretsmanager.js';
10
+ import { SigningClient, type Transport } from './aws/signer.js';
11
+ import { StsClient } from './aws/sts.js';
12
+ export interface ClientBundleOptions {
13
+ region: string;
14
+ /** Endpoint override (config or AWS_ENDPOINT_URL); routes all services to one origin. */
15
+ endpointOverride?: string | undefined;
16
+ credentials?: CredentialProvider | undefined;
17
+ transport?: Transport | undefined;
18
+ }
19
+ export interface AwsClients {
20
+ region: string;
21
+ signing: SigningClient;
22
+ s3: S3Client;
23
+ sts: StsClient;
24
+ iam: IamClient;
25
+ logs: LogsClient;
26
+ acm: AcmClient;
27
+ cloudfront: CloudFrontClient;
28
+ route53: Route53Client;
29
+ microvms: MicrovmsClient;
30
+ secrets: SecretsManagerClient;
31
+ }
32
+ /** Build the full set of service clients that share one signing transport. */
33
+ export declare function createClients(opts: ClientBundleOptions): AwsClients;
@@ -0,0 +1,38 @@
1
+ import { AcmClient } from './aws/acm.js';
2
+ import { CloudFrontClient } from './aws/cloudfront.js';
3
+ import { createCredentialProvider } from './aws/credentials.js';
4
+ import { IamClient } from './aws/iam.js';
5
+ import { LogsClient } from './aws/logs.js';
6
+ import { MicrovmsClient } from './aws/microvms.js';
7
+ import { Route53Client } from './aws/route53.js';
8
+ import { S3Client } from './aws/s3.js';
9
+ import { SecretsManagerClient } from './aws/secretsmanager.js';
10
+ import { SigningClient } from './aws/signer.js';
11
+ import { StsClient } from './aws/sts.js';
12
+ /** Build the full set of service clients that share one signing transport. */
13
+ export function createClients(opts) {
14
+ const endpointOverride = opts.endpointOverride ?? process.env.AWS_ENDPOINT_URL;
15
+ const credentials = opts.credentials ?? createCredentialProvider({ override: Boolean(endpointOverride) });
16
+ const base = {
17
+ endpointOverride,
18
+ credentials,
19
+ ...(opts.transport ? { transport: opts.transport } : {}),
20
+ };
21
+ const signing = new SigningClient({ region: opts.region, ...base });
22
+ // ACM for CloudFront must be us-east-1 regardless of the primary region.
23
+ const usEast1 = new SigningClient({ region: 'us-east-1', ...base });
24
+ return {
25
+ region: opts.region,
26
+ signing,
27
+ s3: new S3Client(signing),
28
+ sts: new StsClient(signing),
29
+ iam: new IamClient(signing),
30
+ logs: new LogsClient(signing),
31
+ acm: new AcmClient(usEast1),
32
+ cloudfront: new CloudFrontClient(usEast1),
33
+ route53: new Route53Client(usEast1),
34
+ microvms: new MicrovmsClient(signing),
35
+ secrets: new SecretsManagerClient(signing),
36
+ };
37
+ }
38
+ //# sourceMappingURL=clients.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clients.js","sourceRoot":"","sources":["../src/clients.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAA2B,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc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SAAS,CAAC,OAAO,CAAC;QAC3B,IAAI,EAAE,IAAI,UAAU,CAAC,OAAO,CAAC;QAC7B,GAAG,EAAE,IAAI,SAAS,CAAC,OAAO,CAAC;QAC3B,UAAU,EAAE,IAAI,gBAAgB,CAAC,OAAO,CAAC;QACzC,OAAO,EAAE,IAAI,aAAa,CAAC,OAAO,CAAC;QACnC,QAAQ,EAAE,IAAI,cAAc,CAAC,OAAO,CAAC;QACrC,OAAO,EAAE,IAAI,oBAAoB,CAAC,OAAO,CAAC;KAC3C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /** ANSI colour helpers; loggers strip the codes off-TTY via {@link stripColors}. */
2
+ export declare const colors: {
3
+ dim: (s: string) => string;
4
+ bold: (s: string) => string;
5
+ green: (s: string) => string;
6
+ yellow: (s: string) => string;
7
+ red: (s: string) => string;
8
+ cyan: (s: string) => string;
9
+ };
10
+ /** Remove every ANSI colour code, for piped output and CI logs. */
11
+ export declare function stripColors(text: string): string;
package/dist/colors.js ADDED
@@ -0,0 +1,24 @@
1
+ /*
2
+ * ANSI colour helpers shared by the CLI and feature packages. Pure string
3
+ * composition — writing (and stripping for non-interactive sessions) is the
4
+ * logger's job.
5
+ */
6
+ const ESCAPE = '\u001B';
7
+ function paint(code, text) {
8
+ return `${ESCAPE}[${code}m${text}${ESCAPE}[0m`;
9
+ }
10
+ /** ANSI colour helpers; loggers strip the codes off-TTY via {@link stripColors}. */
11
+ export const colors = {
12
+ dim: (s) => paint('2', s),
13
+ bold: (s) => paint('1', s),
14
+ green: (s) => paint('32', s),
15
+ yellow: (s) => paint('33', s),
16
+ red: (s) => paint('31', s),
17
+ cyan: (s) => paint('36', s),
18
+ };
19
+ const COLOR_CODES = new RegExp(`${ESCAPE}\\[[0-9;]*m`, 'g');
20
+ /** Remove every ANSI colour code, for piped output and CI logs. */
21
+ export function stripColors(text) {
22
+ return text.replace(COLOR_CODES, '');
23
+ }
24
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,GAAG,QAAQ,CAAC;AAExB,SAAS,KAAK,CAAC,IAAY,EAAE,IAAY;IACvC,OAAO,GAAG,MAAM,IAAI,IAAI,IAAI,IAAI,GAAG,MAAM,KAAK,CAAC;AACjD,CAAC;AAED,oFAAoF;AACpF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IACjC,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IAClC,KAAK,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACpC,MAAM,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACrC,GAAG,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAClC,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;CACpC,CAAC;AAEF,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,GAAG,MAAM,aAAa,EAAE,GAAG,CAAC,CAAC;AAE5D,mEAAmE;AACnE,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC"}
@@ -0,0 +1,136 @@
1
+ /** Per-environment configuration and deterministic resource naming. */
2
+ export interface IdlePolicyConfig {
3
+ autoResumeEnabled: boolean;
4
+ maxIdleDurationSeconds: number;
5
+ suspendedDurationSeconds: number;
6
+ }
7
+ /** robots.txt policy. `auto` = index in production, block crawlers everywhere else. */
8
+ export type RobotsMode = 'auto' | 'index' | 'noindex' | 'off';
9
+ export interface SeoConfig {
10
+ /**
11
+ * How the deploy pipeline writes robots.txt into the published site:
12
+ * - `auto` (default): production → indexable; every other environment → blocked.
13
+ * - `index` / `noindex`: force either regardless of environment.
14
+ * - `off`: don't manage robots.txt at all (leave whatever the build produced).
15
+ */
16
+ robots: RobotsMode;
17
+ /** Explicit robots.txt body; when set it overrides `robots` verbatim. */
18
+ robotsContent?: string | undefined;
19
+ /**
20
+ * sitemap.xml generation (built from the site's HTML pages, absolute URLs):
21
+ * `auto` (default) → on in production, off elsewhere; `on`/`off` force it.
22
+ * Requires a resolvable site origin (custom domain or the CloudFront domain).
23
+ */
24
+ sitemap: 'auto' | 'on' | 'off';
25
+ }
26
+ /** AT Protocol / standard.site publishing (see `blogwright pds`). Inert when absent. */
27
+ export interface PdsConfig {
28
+ /** Publication display name (site.standard.publication `name`). */
29
+ name: string;
30
+ /** Optional publication description. */
31
+ description?: string | undefined;
32
+ /**
33
+ * Resolver used by `pds login` to turn a handle into a DID (unused when
34
+ * logging in with a bare DID). The PDS endpoint itself is discovered from
35
+ * the DID document during OAuth.
36
+ */
37
+ handleResolver?: string | undefined;
38
+ /** Secrets Manager secret holding the OAuth client key + session. */
39
+ secretName: string;
40
+ }
41
+ /**
42
+ * Repo-relative paths the pds commands read/write in the consuming site.
43
+ * The OAuth client documents and the standard.site well-known file live at
44
+ * protocol-fixed locations under `publicDir` (their URL paths are part of the
45
+ * OAuth client id / standard.site spec), so only the directory roots vary.
46
+ */
47
+ export interface PathsConfig {
48
+ /** The static-asset directory served at the site root (Astro's `public/`). */
49
+ publicDir: string;
50
+ /** Content-collection directory the pds sync enumerates for posts. */
51
+ content: string;
52
+ /** JSON file the site imports to render its document <link> tags. */
53
+ atprotoJson: string;
54
+ /**
55
+ * Directory the MicroVM builds in (`pnpm install && pnpm build` runs here).
56
+ * "." for an app at the repo root; "web" for a monorepo subdirectory.
57
+ */
58
+ app: string;
59
+ /** Built output directory the MicroVM publishes, relative to the repo root. */
60
+ dist: string;
61
+ }
62
+ export interface OpsConfig {
63
+ /** Primary region for S3 / MicroVM / logs. ACM+CloudFront are always us-east-1. */
64
+ region: string;
65
+ /** Stable slug used in every derived AWS resource name. Required. */
66
+ siteName: string;
67
+ /** Custom domain; may also be supplied via --domain. */
68
+ domain?: string | undefined;
69
+ /** MicroVM builder sizing / lifecycle. */
70
+ microvm: {
71
+ memory: number;
72
+ maxDurationSeconds: number;
73
+ idle: IdlePolicyConfig;
74
+ };
75
+ /** CloudWatch retention (days). */
76
+ retention: {
77
+ microvmDays: number;
78
+ cloudfrontDays: number;
79
+ };
80
+ /** Extra path prefixes excluded from the source zip (on top of .gitignore). */
81
+ sourceIgnore: string[];
82
+ /**
83
+ * Paths zipped into the deploy source even when gitignored — for artifacts a
84
+ * pre-deploy step builds outside the MicroVM (a wasm bundle, generated
85
+ * assets). Each entry must exist and be non-empty at deploy time, so a
86
+ * forgotten pre-build fails fast instead of shipping a broken site.
87
+ */
88
+ sourceInclude: string[];
89
+ /** CloudFront default root object. */
90
+ defaultRootObject: string;
91
+ /** If more than this many paths change in a deploy, invalidate `/*` instead. */
92
+ invalidationMaxPaths: number;
93
+ /** GitHub `owner/repo`, used to scope the preview stack's OIDC deploy role. */
94
+ githubRepo?: string | undefined;
95
+ /**
96
+ * Single-page app mode: CloudFront serves /index.html with a 200 for
97
+ * unknown paths (client-side routing) instead of the 404 page. Applies to
98
+ * the main distribution at creation; previews are unaffected (their error
99
+ * responses cannot be host-routed).
100
+ */
101
+ spa: boolean;
102
+ /** robots.txt / sitemap.xml behaviour (environment-aware defaults). */
103
+ seo: SeoConfig;
104
+ /** standard.site publishing to the owner's AT Protocol PDS; disabled when absent. */
105
+ pds?: PdsConfig | undefined;
106
+ /** Site-repo layout; the defaults match a stock Astro project. */
107
+ paths: PathsConfig;
108
+ }
109
+ /** Every setting except the required `siteName`. */
110
+ export declare const DEFAULT_CONFIG: Omit<OpsConfig, 'siteName'>;
111
+ /** Strip // and /* *\/ comments from a JSONC string, respecting string literals. */
112
+ export declare function stripJsonComments(input: string): string;
113
+ /**
114
+ * Remove trailing commas before a closing `}`/`]`, respecting string literals.
115
+ * JSONC editors accept them (and hand-written configs grow them), but
116
+ * JSON.parse does not. Run after comment stripping.
117
+ */
118
+ export declare function stripTrailingCommas(input: string): string;
119
+ /** Parse + validate a JSONC config document, merged over defaults. */
120
+ export declare function parseConfig(text: string): OpsConfig;
121
+ export declare function mergeConfig(raw: Partial<OpsConfig>): OpsConfig;
122
+ export interface Names {
123
+ env: string;
124
+ bucket: string;
125
+ prefix: string;
126
+ buildRole: string;
127
+ execRole: string;
128
+ microvmImage: string;
129
+ microvmLogGroup: string;
130
+ cloudfrontLogGroup: string;
131
+ oac: string;
132
+ deliverySource: string;
133
+ deliveryDestination: string;
134
+ }
135
+ /** Derive deterministic, environment-prefixed resource names. */
136
+ export declare function deriveNames(env: string, accountId: string, cfg: OpsConfig): Names;
package/dist/config.js ADDED
@@ -0,0 +1,236 @@
1
+ /** Per-environment configuration and deterministic resource naming. */
2
+ /** Every setting except the required `siteName`. */
3
+ export const DEFAULT_CONFIG = {
4
+ region: 'us-east-1',
5
+ microvm: {
6
+ memory: 4,
7
+ maxDurationSeconds: 1800,
8
+ idle: {
9
+ autoResumeEnabled: false,
10
+ maxIdleDurationSeconds: 300,
11
+ suspendedDurationSeconds: 120,
12
+ },
13
+ },
14
+ retention: {
15
+ microvmDays: 365,
16
+ cloudfrontDays: 90,
17
+ },
18
+ sourceIgnore: ['.jj/', '.git/', 'node_modules/', 'dist/', '.astro/'],
19
+ sourceInclude: [],
20
+ defaultRootObject: 'index.html',
21
+ invalidationMaxPaths: 1000,
22
+ spa: false,
23
+ seo: { robots: 'auto', sitemap: 'auto' },
24
+ paths: {
25
+ publicDir: 'public',
26
+ content: 'src/content/blog',
27
+ atprotoJson: 'src/data/atproto.json',
28
+ app: '.',
29
+ dist: 'dist',
30
+ },
31
+ };
32
+ /** Strip // and /* *\/ comments from a JSONC string, respecting string literals. */
33
+ export function stripJsonComments(input) {
34
+ let out = '';
35
+ let inString = false;
36
+ let inLine = false;
37
+ let inBlock = false;
38
+ for (let i = 0; i < input.length; i++) {
39
+ const ch = input[i];
40
+ const next = input[i + 1];
41
+ if (inLine) {
42
+ if (ch === '\n') {
43
+ inLine = false;
44
+ out += ch;
45
+ }
46
+ continue;
47
+ }
48
+ if (inBlock) {
49
+ if (ch === '*' && next === '/') {
50
+ inBlock = false;
51
+ i++;
52
+ }
53
+ continue;
54
+ }
55
+ if (inString) {
56
+ out += ch;
57
+ if (ch === '\\') {
58
+ out += next ?? '';
59
+ i++;
60
+ }
61
+ else if (ch === '"') {
62
+ inString = false;
63
+ }
64
+ continue;
65
+ }
66
+ if (ch === '"') {
67
+ inString = true;
68
+ out += ch;
69
+ continue;
70
+ }
71
+ if (ch === '/' && next === '/') {
72
+ inLine = true;
73
+ i++;
74
+ continue;
75
+ }
76
+ if (ch === '/' && next === '*') {
77
+ inBlock = true;
78
+ i++;
79
+ continue;
80
+ }
81
+ out += ch;
82
+ }
83
+ return out;
84
+ }
85
+ /**
86
+ * Remove trailing commas before a closing `}`/`]`, respecting string literals.
87
+ * JSONC editors accept them (and hand-written configs grow them), but
88
+ * JSON.parse does not. Run after comment stripping.
89
+ */
90
+ export function stripTrailingCommas(input) {
91
+ let out = '';
92
+ let inString = false;
93
+ for (let i = 0; i < input.length; i++) {
94
+ const ch = input[i];
95
+ if (inString) {
96
+ out += ch;
97
+ if (ch === '\\') {
98
+ out += input[i + 1] ?? '';
99
+ i++;
100
+ }
101
+ else if (ch === '"') {
102
+ inString = false;
103
+ }
104
+ continue;
105
+ }
106
+ if (ch === '"') {
107
+ inString = true;
108
+ out += ch;
109
+ continue;
110
+ }
111
+ if (ch === ',') {
112
+ // A comma directly followed (across whitespace) by a closer is dropped.
113
+ let j = i + 1;
114
+ while (j < input.length && /\s/.test(input[j]))
115
+ j++;
116
+ if (input[j] === '}' || input[j] === ']')
117
+ continue;
118
+ }
119
+ out += ch;
120
+ }
121
+ return out;
122
+ }
123
+ /** Parse + validate a JSONC config document, merged over defaults. */
124
+ export function parseConfig(text) {
125
+ const raw = JSON.parse(stripTrailingCommas(stripJsonComments(text)));
126
+ return mergeConfig(raw);
127
+ }
128
+ export function mergeConfig(raw) {
129
+ if (!raw.siteName) {
130
+ throw new Error('config.siteName is required — a stable lowercase slug used in every derived AWS resource name');
131
+ }
132
+ const cfg = {
133
+ ...DEFAULT_CONFIG,
134
+ ...raw,
135
+ siteName: raw.siteName,
136
+ microvm: {
137
+ ...DEFAULT_CONFIG.microvm,
138
+ ...raw.microvm,
139
+ idle: { ...DEFAULT_CONFIG.microvm.idle, ...raw.microvm?.idle },
140
+ },
141
+ retention: { ...DEFAULT_CONFIG.retention, ...raw.retention },
142
+ seo: { ...DEFAULT_CONFIG.seo, ...raw.seo },
143
+ paths: { ...DEFAULT_CONFIG.paths, ...raw.paths },
144
+ };
145
+ if (raw.pds) {
146
+ cfg.pds = {
147
+ ...raw.pds,
148
+ secretName: raw.pds.secretName ?? `${cfg.siteName}/atproto`,
149
+ };
150
+ }
151
+ validateConfig(cfg);
152
+ return cfg;
153
+ }
154
+ function validateConfig(cfg) {
155
+ if (!/^[a-z0-9-]+$/.test(cfg.siteName)) {
156
+ throw new Error(`config.siteName must be lowercase alphanumeric/dashes, got "${cfg.siteName}"`);
157
+ }
158
+ if (!cfg.region)
159
+ throw new Error('config.region is required');
160
+ const memories = [0.5, 1, 2, 4, 8];
161
+ if (!memories.includes(cfg.microvm.memory)) {
162
+ throw new Error(`config.microvm.memory must be one of ${memories.join(', ')} GB`);
163
+ }
164
+ if (cfg.microvm.maxDurationSeconds < 1 || cfg.microvm.maxDurationSeconds > 28_800) {
165
+ throw new Error('config.microvm.maxDurationSeconds must be in 1..28800');
166
+ }
167
+ if (cfg.retention.microvmDays < 1 || cfg.retention.cloudfrontDays < 1) {
168
+ throw new Error('config retention days must be positive');
169
+ }
170
+ const robotsModes = ['auto', 'index', 'noindex', 'off'];
171
+ if (!robotsModes.includes(cfg.seo.robots)) {
172
+ throw new Error(`config.seo.robots must be one of ${robotsModes.join(', ')}`);
173
+ }
174
+ const sitemapModes = ['auto', 'on', 'off'];
175
+ if (!sitemapModes.includes(cfg.seo.sitemap)) {
176
+ throw new Error(`config.seo.sitemap must be one of ${sitemapModes.join(', ')}`);
177
+ }
178
+ for (const entry of cfg.sourceInclude) {
179
+ if (entry.startsWith('/') || entry.split('/').includes('..')) {
180
+ throw new Error(`config.sourceInclude entries must be repo-relative without "..", got "${entry}"`);
181
+ }
182
+ }
183
+ for (const [key, value] of [
184
+ ['app', cfg.paths.app],
185
+ ['dist', cfg.paths.dist],
186
+ ]) {
187
+ if (!value || value.startsWith('/') || value.split('/').includes('..')) {
188
+ throw new Error(`config.paths.${key} must be repo-relative without "..", got "${value}"`);
189
+ }
190
+ }
191
+ if (cfg.pds) {
192
+ if (!cfg.pds.name?.trim())
193
+ throw new Error('config.pds.name is required');
194
+ if (cfg.pds.handleResolver !== undefined) {
195
+ let resolver;
196
+ try {
197
+ resolver = new URL(cfg.pds.handleResolver);
198
+ }
199
+ catch {
200
+ throw new Error(`config.pds.handleResolver must be a URL, got "${cfg.pds.handleResolver}"`);
201
+ }
202
+ if (resolver.protocol !== 'https:') {
203
+ throw new Error(`config.pds.handleResolver must be https, got "${cfg.pds.handleResolver}"`);
204
+ }
205
+ }
206
+ if (!/^[\w/+=.@-]+$/.test(cfg.pds.secretName)) {
207
+ throw new Error(`config.pds.secretName has invalid characters: "${cfg.pds.secretName}"`);
208
+ }
209
+ }
210
+ }
211
+ /** Derive deterministic, environment-prefixed resource names. */
212
+ export function deriveNames(env, accountId, cfg) {
213
+ if (!/^[a-z0-9-]+$/.test(env)) {
214
+ throw new Error(`environment must be lowercase alphanumeric/dashes, got "${env}"`);
215
+ }
216
+ const prefix = `${env}-${cfg.siteName}`;
217
+ const bucket = `${prefix}-${accountId}`;
218
+ const microvmImage = `${prefix}-builder`;
219
+ if (bucket.length > 63) {
220
+ throw new Error(`derived bucket name "${bucket}" exceeds S3's 63-char limit; shorten env or siteName`);
221
+ }
222
+ return {
223
+ env,
224
+ bucket,
225
+ prefix,
226
+ buildRole: `${prefix}-build-role`,
227
+ execRole: `${prefix}-exec-role`,
228
+ microvmImage,
229
+ microvmLogGroup: `/aws/lambda/microvms/${microvmImage}`,
230
+ cloudfrontLogGroup: `/${cfg.siteName}/${env}/cloudfront`,
231
+ oac: `${prefix}-oac`,
232
+ deliverySource: `${prefix}-cf-source`,
233
+ deliveryDestination: `${prefix}-cf-dest`,
234
+ };
235
+ }
236
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAmHvE,oDAAoD;AACpD,MAAM,CAAC,MAAM,cAAc,GAAgC;IACzD,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE;QACP,MAAM,EAAE,CAAC;QACT,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE;YACJ,iBAAiB,EAAE,KAAK;YACxB,sBAAsB,EAAE,GAAG;YAC3B,wBAAwB,EAAE,GAAG;SAC9B;KACF;IACD,SAAS,EAAE;QACT,WAAW,EAAE,GAAG;QAChB,cAAc,EAAE,EAAE;KACnB;IACD,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,CAAC;IACpE,aAAa,EAAE,EAAE;IACjB,iBAAiB,EAAE,YAAY;IAC/B,oBAAoB,EAAE,IAAI;IAC1B,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;IACxC,KAAK,EAAE;QACL,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,uBAAuB;QACpC,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,MAAM;KACb;CACF,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AAE,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,wBAAwB,MAAM,uDAAuD,CACtF,CAAC;IACJ,CAAC;IACD,OAAO;QACL,GAAG;QACH,MAAM;QACN,MAAM;QACN,SAAS,EAAE,GAAG,MAAM,aAAa;QACjC,QAAQ,EAAE,GAAG,MAAM,YAAY;QAC/B,YAAY;QACZ,eAAe,EAAE,wBAAwB,YAAY,EAAE;QACvD,kBAAkB,EAAE,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,aAAa;QACxD,GAAG,EAAE,GAAG,MAAM,MAAM;QACpB,cAAc,EAAE,GAAG,MAAM,YAAY;QACrC,mBAAmB,EAAE,GAAG,MAAM,UAAU;KACzC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ export * from './adapters/memory-fs.js';
2
+ export * from './adapters/node-fs.js';
3
+ export * from './adapters/node-terminal.js';
4
+ export * from './adapters/script-terminal.js';
5
+ export * from './aws/acm.js';
6
+ export * from './aws/cloudfront.js';
7
+ export * from './aws/credentials.js';
8
+ export * from './aws/endpoint.js';
9
+ export * from './aws/errors.js';
10
+ export * from './aws/form.js';
11
+ export * from './aws/iam.js';
12
+ export * from './aws/logs.js';
13
+ export * from './aws/microvms.js';
14
+ export * from './aws/route53.js';
15
+ export * from './aws/s3.js';
16
+ export * from './aws/secretsmanager.js';
17
+ export * from './aws/signer.js';
18
+ export * from './aws/sts.js';
19
+ export * from './aws/xml.js';
20
+ export * from './clients.js';
21
+ export * from './colors.js';
22
+ export * from './config.js';
23
+ export * from './ports.js';
24
+ export * from './repo-root.js';
25
+ export * from './state.js';
26
+ export * from './util.js';
package/dist/index.js ADDED
@@ -0,0 +1,27 @@
1
+ export * from './adapters/memory-fs.js';
2
+ export * from './adapters/node-fs.js';
3
+ export * from './adapters/node-terminal.js';
4
+ export * from './adapters/script-terminal.js';
5
+ export * from './aws/acm.js';
6
+ export * from './aws/cloudfront.js';
7
+ export * from './aws/credentials.js';
8
+ export * from './aws/endpoint.js';
9
+ export * from './aws/errors.js';
10
+ export * from './aws/form.js';
11
+ export * from './aws/iam.js';
12
+ export * from './aws/logs.js';
13
+ export * from './aws/microvms.js';
14
+ export * from './aws/route53.js';
15
+ export * from './aws/s3.js';
16
+ export * from './aws/secretsmanager.js';
17
+ export * from './aws/signer.js';
18
+ export * from './aws/sts.js';
19
+ export * from './aws/xml.js';
20
+ export * from './clients.js';
21
+ export * from './colors.js';
22
+ export * from './config.js';
23
+ export * from './ports.js';
24
+ export * from './repo-root.js';
25
+ export * from './state.js';
26
+ export * from './util.js';
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}