alepha 0.22.0 → 0.23.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/dist/api/jobs/index.d.ts +20 -20
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/keys/index.d.ts +6 -6
- package/dist/api/users/index.d.ts +43 -9
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +24 -3
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.d.ts +13 -13
- package/dist/cli/core/index.d.ts +46 -40
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +51 -101
- package/dist/cli/core/index.js.map +1 -1
- package/dist/cli/i18n/index.d.ts +12 -5
- package/dist/cli/i18n/index.d.ts.map +1 -1
- package/dist/cli/i18n/index.js +45 -11
- package/dist/cli/i18n/index.js.map +1 -1
- package/dist/cli/platform-lib/index.d.ts +32 -6
- package/dist/cli/platform-lib/index.d.ts.map +1 -1
- package/dist/cli/platform-lib/index.js +82 -19
- package/dist/cli/platform-lib/index.js.map +1 -1
- package/dist/command/index.d.ts +1 -1
- package/dist/mcp/index.d.ts +9 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +23 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/react/form/index.d.ts +0 -1
- package/dist/react/form/index.d.ts.map +1 -1
- package/dist/react/form/index.js +16 -15
- package/dist/react/form/index.js.map +1 -1
- package/dist/react/i18n/index.d.ts +43 -0
- package/dist/react/i18n/index.d.ts.map +1 -1
- package/dist/react/i18n/index.js +114 -10
- package/dist/react/i18n/index.js.map +1 -1
- package/dist/react/router/index.browser.js +128 -5
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +108 -1
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +184 -6
- package/dist/react/router/index.js.map +1 -1
- package/dist/react/sitemap/index.browser.js +35 -0
- package/dist/react/sitemap/index.browser.js.map +1 -0
- package/dist/react/sitemap/index.d.ts +92 -0
- package/dist/react/sitemap/index.d.ts.map +1 -0
- package/dist/react/sitemap/index.js +131 -0
- package/dist/react/sitemap/index.js.map +1 -0
- package/dist/server/auth/index.d.ts +105 -1
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +1604 -7
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cookies/index.d.ts +15 -0
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +22 -3
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.d.ts +18 -0
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +25 -0
- package/dist/server/core/index.js.map +1 -1
- package/package.json +16 -3
- package/src/api/users/controllers/RealmController.ts +1 -0
- package/src/api/users/primitives/$realm.ts +26 -0
- package/src/api/users/providers/RealmProvider.ts +15 -0
- package/src/api/users/schemas/realmConfigSchema.ts +14 -0
- package/src/cli/core/atoms/buildOptions.ts +0 -12
- package/src/cli/core/commands/build.ts +0 -10
- package/src/cli/core/index.ts +0 -3
- package/src/cli/core/tasks/BuildCloudflareTask.ts +37 -17
- package/src/cli/core/tasks/BuildPrerenderTask.ts +44 -7
- package/src/cli/i18n/__tests__/I18nCheckService.spec.ts +48 -0
- package/src/cli/i18n/services/I18nCheckService.ts +65 -11
- package/src/cli/platform-lib/adapters/CloudflareAdapter.ts +128 -36
- package/src/mcp/__tests__/McpServerProvider.spec.ts +71 -0
- package/src/mcp/providers/McpServerProvider.ts +55 -0
- package/src/react/form/__tests__/FormModel-submit-loading.spec.ts +71 -0
- package/src/react/form/__tests__/form-submitting-reactive.browser.spec.tsx +96 -0
- package/src/react/form/services/FormModel.ts +57 -39
- package/src/react/i18n/__tests__/I18nProvider.spec.ts +89 -0
- package/src/react/i18n/__tests__/locale-routing.spec.ts +107 -0
- package/src/react/i18n/providers/I18nProvider.ts +171 -12
- package/src/react/router/__tests__/RouterLocaleProvider.spec.ts +127 -0
- package/src/react/router/index.browser.ts +4 -0
- package/src/react/router/index.shared.ts +1 -0
- package/src/react/router/index.ts +9 -0
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +15 -1
- package/src/react/router/providers/ReactPageProvider.ts +12 -1
- package/src/react/router/providers/ReactServerProvider.ts +92 -1
- package/src/react/router/providers/RootComponentsProvider.ts +13 -0
- package/src/react/router/providers/RouterLocaleProvider.ts +125 -0
- package/src/react/router/providers/__tests__/RootComponentsProvider.spec.ts +15 -0
- package/src/react/router/providers/__tests__/rootComponents.ssr.browser.spec.tsx +67 -0
- package/src/react/sitemap/__tests__/$sitemap.spec.ts +131 -0
- package/src/react/sitemap/index.browser.ts +21 -0
- package/src/react/sitemap/index.ts +25 -0
- package/src/react/sitemap/primitives/$sitemap.browser.ts +26 -0
- package/src/react/sitemap/primitives/$sitemap.ts +196 -0
- package/src/server/auth/__tests__/appleClientSecret.spec.ts +34 -0
- package/src/server/auth/__tests__/authFederationClient.spec.ts +40 -0
- package/src/server/auth/__tests__/federationAssertion.spec.ts +146 -0
- package/src/server/auth/__tests__/federationRedirectReplay.spec.ts +44 -0
- package/src/server/auth/helpers/appleClientSecret.ts +24 -0
- package/src/server/auth/helpers/federationAssertion.ts +74 -0
- package/src/server/auth/helpers/jtiReplayGuard.ts +41 -0
- package/src/server/auth/helpers/safeRedirectPath.ts +19 -0
- package/src/server/auth/index.ts +4 -0
- package/src/server/auth/primitives/$authFederationBroker.ts +273 -0
- package/src/server/auth/primitives/$authFederationClient.ts +89 -0
- package/src/server/auth/providers/ServerAuthProvider.ts +18 -4
- package/src/server/cookies/__tests__/ServerCookiesProvider.spec.ts +70 -0
- package/src/server/cookies/providers/ServerCookiesProvider.ts +23 -3
- package/src/server/core/interfaces/ServerRequest.ts +8 -0
- package/src/server/core/primitives/$route.ts +27 -0
- package/src/cli/core/tasks/BuildSitemapTask.ts +0 -130
package/dist/cli/i18n/index.d.ts
CHANGED
|
@@ -69,13 +69,20 @@ declare class I18nCheckService {
|
|
|
69
69
|
* Find unused translation keys.
|
|
70
70
|
*
|
|
71
71
|
* Discovery is fully static: we walk `scan` dirs, identify files
|
|
72
|
-
* that import `$dictionary` (matched via the literal substring)
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* exempted.
|
|
72
|
+
* that import `$dictionary` (matched via the literal substring) plus
|
|
73
|
+
* any per-language files they lazily `import(...)`, extract every
|
|
74
|
+
* `"a.b.c": ...` property key declared across them, then grep the
|
|
75
|
+
* remaining source files for a quoted-literal occurrence of each key.
|
|
76
|
+
* Anything matching a `dynamicPrefixes` entry is exempted.
|
|
77
77
|
*/
|
|
78
78
|
check(options: I18nCheckOptions): Promise<I18nCheckResult>;
|
|
79
|
+
/**
|
|
80
|
+
* Resolve a relative `import("…")` specifier from `fromFile` to an absolute
|
|
81
|
+
* path that was actually scanned. Returns `undefined` for bare/package
|
|
82
|
+
* specifiers or targets outside the scan set. Extensionless specifiers are
|
|
83
|
+
* probed against each supported source extension.
|
|
84
|
+
*/
|
|
85
|
+
protected resolveImport(fromFile: string, spec: string, files: Map<string, string>): string | undefined;
|
|
79
86
|
}
|
|
80
87
|
//#endregion
|
|
81
88
|
//#region ../../src/cli/i18n/commands/I18nCommand.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/cli/i18n/atoms/i18nOptions.ts","../../../src/cli/i18n/services/I18nCheckService.ts","../../../src/cli/i18n/commands/I18nCommand.ts","../../../src/cli/i18n/index.ts"],"mappings":";;;;;;;;;AAQA;;cAAa,WAAA,mBAAW,IAAA,mBAAA,SAAA,mBAAA,OAAA;EAqCtB;;;;;;;;;;;;;;;;;;;EAKqB;;;;;;;AAAmC;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/cli/i18n/atoms/i18nOptions.ts","../../../src/cli/i18n/services/I18nCheckService.ts","../../../src/cli/i18n/commands/I18nCommand.ts","../../../src/c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ucked away in an unusual location.
|
|
81
81
|
*/
|
|
82
82
|
const DICTIONARY_MARKER = "$dictionary";
|
|
83
|
+
/**
|
|
84
|
+
* Captures the module specifier of a lazily-imported dictionary, i.e. the
|
|
85
|
+
* `"./fr.ts"` in `$dictionary({ lazy: () => import("./fr.ts") })`. Apps
|
|
86
|
+
* commonly split each language into its own file so a session only ships the
|
|
87
|
+
* active locale — those key files carry no `$dictionary` marker, so without
|
|
88
|
+
* this the keys would be invisible to the check.
|
|
89
|
+
*
|
|
90
|
+
* `[^{}]*?` keeps the match inside the `$dictionary` call's own object literal
|
|
91
|
+
* (it stops at the first brace), so unrelated lazy imports in the same file —
|
|
92
|
+
* e.g. a sibling `$page({ lazy: () => import("./Page.tsx") })` or a
|
|
93
|
+
* `$dictionary` whose `lazy` returns an inline `({ default: {…} })` object —
|
|
94
|
+
* are never mistaken for dictionary key files.
|
|
95
|
+
*/
|
|
96
|
+
const DICTIONARY_LAZY_IMPORT_RE = /\$dictionary\s*\(\s*\{[^{}]*?import\s*\(\s*["']([^"']+)["']/g;
|
|
83
97
|
var I18nCheckService = class {
|
|
84
98
|
fs = $inject(FileSystemProvider);
|
|
85
99
|
/**
|
|
86
100
|
* Find unused translation keys.
|
|
87
101
|
*
|
|
88
102
|
* Discovery is fully static: we walk `scan` dirs, identify files
|
|
89
|
-
* that import `$dictionary` (matched via the literal substring)
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* exempted.
|
|
103
|
+
* that import `$dictionary` (matched via the literal substring) plus
|
|
104
|
+
* any per-language files they lazily `import(...)`, extract every
|
|
105
|
+
* `"a.b.c": ...` property key declared across them, then grep the
|
|
106
|
+
* remaining source files for a quoted-literal occurrence of each key.
|
|
107
|
+
* Anything matching a `dynamicPrefixes` entry is exempted.
|
|
94
108
|
*/
|
|
95
109
|
async check(options) {
|
|
96
110
|
const { root, scan, dynamicPrefixes, exclude } = options;
|
|
@@ -111,18 +125,26 @@ var I18nCheckService = class {
|
|
|
111
125
|
allFiles.push(abs);
|
|
112
126
|
}
|
|
113
127
|
}
|
|
114
|
-
const dictionaryFiles = [];
|
|
115
|
-
const allKeys = /* @__PURE__ */ new Set();
|
|
116
128
|
const fileContents = /* @__PURE__ */ new Map();
|
|
117
|
-
for (const file of allFiles)
|
|
118
|
-
|
|
119
|
-
|
|
129
|
+
for (const file of allFiles) fileContents.set(file, (await this.fs.readFile(file)).toString("utf8"));
|
|
130
|
+
const dictionarySet = /* @__PURE__ */ new Set();
|
|
131
|
+
for (const [file, text] of fileContents) {
|
|
120
132
|
if (!text.includes(DICTIONARY_MARKER)) continue;
|
|
133
|
+
dictionarySet.add(file);
|
|
134
|
+
for (const m of text.matchAll(DICTIONARY_LAZY_IMPORT_RE)) {
|
|
135
|
+
const target = this.resolveImport(file, m[1], fileContents);
|
|
136
|
+
if (target) dictionarySet.add(target);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
const dictionaryFiles = [];
|
|
140
|
+
const allKeys = /* @__PURE__ */ new Set();
|
|
141
|
+
for (const file of dictionarySet) {
|
|
142
|
+
const text = fileContents.get(file);
|
|
143
|
+
if (!text) continue;
|
|
121
144
|
const before = allKeys.size;
|
|
122
145
|
for (const m of text.matchAll(KEY_DECLARATION_RE)) allKeys.add(m[1]);
|
|
123
146
|
if (allKeys.size > before) dictionaryFiles.push(file);
|
|
124
147
|
}
|
|
125
|
-
const dictionarySet = new Set(dictionaryFiles);
|
|
126
148
|
const corpusParts = [];
|
|
127
149
|
let scannedFiles = 0;
|
|
128
150
|
for (const [file, text] of fileContents) {
|
|
@@ -149,6 +171,18 @@ var I18nCheckService = class {
|
|
|
149
171
|
unused: unused.sort()
|
|
150
172
|
};
|
|
151
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Resolve a relative `import("…")` specifier from `fromFile` to an absolute
|
|
176
|
+
* path that was actually scanned. Returns `undefined` for bare/package
|
|
177
|
+
* specifiers or targets outside the scan set. Extensionless specifiers are
|
|
178
|
+
* probed against each supported source extension.
|
|
179
|
+
*/
|
|
180
|
+
resolveImport(fromFile, spec, files) {
|
|
181
|
+
if (!spec.startsWith(".")) return void 0;
|
|
182
|
+
const base = this.fs.join(fromFile, "..", spec);
|
|
183
|
+
if (files.has(base)) return base;
|
|
184
|
+
for (const ext of SCAN_EXTS) if (files.has(base + ext)) return base + ext;
|
|
185
|
+
}
|
|
152
186
|
};
|
|
153
187
|
//#endregion
|
|
154
188
|
//#region ../../src/cli/i18n/commands/I18nCommand.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/cli/i18n/atoms/i18nOptions.ts","../../../src/cli/i18n/services/I18nCheckService.ts","../../../src/cli/i18n/commands/I18nCommand.ts","../../../src/cli/i18n/index.ts"],"sourcesContent":["import { $atom, type Static, t } from \"alepha\";\n\n/**\n * i18n CLI configuration atom.\n *\n * Filled from the `i18n` plugin in `alepha.config.ts`.\n * Read by `I18nCommand` to drive `alepha i18n check`.\n */\nexport const i18nOptions = $atom({\n name: \"alepha.cli.i18n.options\",\n description: \"i18n unused-key check configuration\",\n schema: t.optional(\n t.object({\n /**\n * Directories (relative to the project root) to scan both for\n * `$dictionary(...)` declarations and for translation key usage.\n *\n * @default [\"src\"]\n */\n scan: t.optional(t.array(t.text())),\n\n /**\n * Key prefixes that are constructed at runtime (e.g. via template\n * literals like `` tr(`archive.type.${kind}`) ``). Every key\n * starting with one of these prefixes is exempted from the\n * unused check.\n *\n * Keep this list short and audit it when a feature is removed —\n * a stale prefix here means dead keys can hide.\n *\n * @default []\n */\n dynamicPrefixes: t.optional(t.array(t.text())),\n\n /**\n * Additional path substrings (matched against the full file\n * path) that should be excluded from the scan, on top of the\n * defaults (`node_modules`, `dist`, `__tests__`, `.spec.*`,\n * `.test.*`, `.alepha`).\n *\n * @default []\n */\n exclude: t.optional(t.array(t.text())),\n }),\n ),\n});\n\n/**\n * Type for i18n options.\n */\nexport type I18nOptions = Static<typeof i18nOptions.schema>;\n","import { $inject } from \"alepha\";\nimport { FileSystemProvider } from \"alepha/system\";\n\n/**\n * File extensions considered when scanning for dictionaries / usage.\n */\nconst SCAN_EXTS = [\".ts\", \".tsx\", \".mts\", \".cts\"];\n\n/**\n * Built-in path substrings that are always excluded from scanning.\n */\nconst DEFAULT_EXCLUDES = [\n \"/node_modules/\",\n \"/dist/\",\n \"/__tests__/\",\n \"/.alepha/\",\n \".spec.ts\",\n \".spec.tsx\",\n \".test.ts\",\n \".test.tsx\",\n];\n\n/**\n * Matches a quoted dotted property key on the left-hand side of a\n * dictionary entry: `\"some.dotted.key\":`. The \"at least one dot\"\n * requirement rules out unrelated quoted strings (e.g. JSON literals\n * inside helper text).\n */\nconst KEY_DECLARATION_RE = /\"([\\w-]+(?:\\.[\\w-]+)+)\"\\s*:/g;\n\n/**\n * Heuristic for spotting files that declare a dictionary. Conservative\n * by design — we'd rather scan a few unrelated files than miss a\n * dictionary tucked away in an unusual location.\n */\nconst DICTIONARY_MARKER = \"$dictionary\";\n\nexport interface I18nCheckOptions {\n root: string;\n scan: string[];\n dynamicPrefixes: string[];\n exclude: string[];\n}\n\nexport interface I18nCheckResult {\n /** Total number of keys discovered across all dictionary files. */\n totalKeys: number;\n /** Number of keys exempted via `dynamicPrefixes`. */\n exemptKeys: number;\n /** Number of source files scanned for references. */\n scannedFiles: number;\n /** Dictionary files that contributed keys. */\n dictionaryFiles: string[];\n /** Keys that have no quoted-literal reference anywhere in the scan. */\n unused: string[];\n}\n\nexport class I18nCheckService {\n protected readonly fs = $inject(FileSystemProvider);\n\n /**\n * Find unused translation keys.\n *\n * Discovery is fully static: we walk `scan` dirs, identify files\n * that import `$dictionary` (matched via the literal substring),\n * extract every `\"a.b.c\": ...` property key declared in them, then\n * grep the remaining source files for a quoted-literal occurrence\n * of each key. Anything matching a `dynamicPrefixes` entry is\n * exempted.\n */\n async check(options: I18nCheckOptions): Promise<I18nCheckResult> {\n const { root, scan, dynamicPrefixes, exclude } = options;\n const excludes = [...DEFAULT_EXCLUDES, ...exclude];\n\n const allFiles: string[] = [];\n for (const dir of scan) {\n const absDir = this.fs.join(root, dir);\n let entries: string[];\n try {\n entries = await this.fs.ls(absDir, { recursive: true });\n } catch {\n // Missing scan dir is silently skipped — config carries\n // optional paths (e.g. .vendor/**) that may not exist locally.\n continue;\n }\n for (const rel of entries) {\n const abs = this.fs.join(absDir, rel);\n if (!SCAN_EXTS.some((ext) => abs.endsWith(ext))) continue;\n if (excludes.some((sub) => abs.includes(sub))) continue;\n allFiles.push(abs);\n }\n }\n\n const dictionaryFiles: string[] = [];\n const allKeys = new Set<string>();\n const fileContents = new Map<string, string>();\n\n for (const file of allFiles) {\n const text = (await this.fs.readFile(file)).toString(\"utf8\");\n fileContents.set(file, text);\n if (!text.includes(DICTIONARY_MARKER)) continue;\n const before = allKeys.size;\n for (const m of text.matchAll(KEY_DECLARATION_RE)) {\n allKeys.add(m[1]);\n }\n if (allKeys.size > before) dictionaryFiles.push(file);\n }\n\n // Concatenate every non-dictionary file into one corpus so each\n // key is tested with a single regex run rather than O(files × keys).\n const dictionarySet = new Set(dictionaryFiles);\n const corpusParts: string[] = [];\n let scannedFiles = 0;\n for (const [file, text] of fileContents) {\n if (dictionarySet.has(file)) continue;\n corpusParts.push(text);\n scannedFiles++;\n }\n const corpus = corpusParts.join(\"\\n\");\n\n let exemptKeys = 0;\n const unused: string[] = [];\n for (const key of allKeys) {\n if (dynamicPrefixes.some((p) => key.startsWith(p))) {\n exemptKeys++;\n continue;\n }\n const literal = key.replace(/[.\\\\]/g, (c) => `\\\\${c}`);\n // Key must appear as a quoted string literal — `\"...\"`, `'...'`,\n // or `` `...` ``. Quotes on both sides rule out accidental\n // substring hits in longer keys.\n const re = new RegExp(`[\"'\\`]${literal}[\"'\\`]`);\n if (!re.test(corpus)) unused.push(key);\n }\n\n return {\n totalKeys: allKeys.size,\n exemptKeys,\n scannedFiles,\n dictionaryFiles,\n unused: unused.sort(),\n };\n }\n}\n","import { $inject, $state } from \"alepha\";\nimport { $command } from \"alepha/command\";\nimport { $logger, ConsoleColorProvider } from \"alepha/logger\";\nimport { i18nOptions } from \"../atoms/i18nOptions.ts\";\nimport { I18nCheckService } from \"../services/I18nCheckService.ts\";\n\nexport class I18nCommand {\n protected readonly log = $logger();\n protected readonly options = $state(i18nOptions);\n protected readonly checkService = $inject(I18nCheckService);\n protected readonly color = $inject(ConsoleColorProvider);\n\n protected resolveOptions() {\n return {\n scan: this.options?.scan ?? [\"src\"],\n dynamicPrefixes: this.options?.dynamicPrefixes ?? [],\n exclude: this.options?.exclude ?? [],\n };\n }\n\n protected readonly check = $command({\n name: \"check\",\n description: \"Report translation keys with no quoted-literal reference\",\n handler: async ({ root }) => {\n const opts = this.resolveOptions();\n const c = this.color;\n\n const result = await this.checkService.check({ root, ...opts });\n\n if (result.totalKeys === 0) {\n process.stdout.write(\n `\\n${c.set(\"ORANGE\", \"warn\")} No translation keys found. ` +\n `Did the dictionary location change? ` +\n `Searched: ${opts.scan.join(\", \")}\\n\\n`,\n );\n process.exit(2);\n }\n\n process.stdout.write(\n `\\nChecked ${c.set(\"CYAN\", String(result.totalKeys))} keys across ` +\n `${c.set(\"CYAN\", String(result.scannedFiles))} files ` +\n `(${result.dictionaryFiles.length} dictionary ` +\n `${result.dictionaryFiles.length === 1 ? \"file\" : \"files\"}).\\n`,\n );\n if (result.exemptKeys > 0) {\n process.stdout.write(\n ` exempt (dynamic prefixes): ${result.exemptKeys}\\n`,\n );\n }\n\n if (result.unused.length === 0) {\n process.stdout.write(\n `\\n${c.set(\"GREEN\", \"✓\")} All translations are referenced.\\n\\n`,\n );\n return;\n }\n\n process.stdout.write(\n `\\n${c.set(\"RED\", \"✗\")} Unused translations (${result.unused.length}):\\n`,\n );\n for (const k of result.unused) {\n process.stdout.write(` ${c.set(\"DIM\", \"-\")} ${k}\\n`);\n }\n process.stdout.write(\n `\\nEither delete the key from its dictionary, or add its prefix to ` +\n `${c.set(\"CYAN\", \"dynamicPrefixes\")} in alepha.config.ts ` +\n `if it's constructed at runtime.\\n\\n`,\n );\n process.exit(1);\n },\n });\n\n public readonly i18n = $command({\n name: \"i18n\",\n description: \"Internationalization tooling\",\n children: [this.check],\n handler: async ({ help }) => {\n help();\n },\n });\n}\n","import { $context, $module } from \"alepha\";\nimport { type I18nOptions, i18nOptions } from \"./atoms/i18nOptions.ts\";\nimport { I18nCommand } from \"./commands/I18nCommand.ts\";\nimport { I18nCheckService } from \"./services/I18nCheckService.ts\";\n\n// ---------------------------------------------------------------------------\n\n/**\n * CLI plugin for finding unused translation keys.\n *\n * Statically scans the project for `$dictionary(...)` calls, extracts\n * every declared key, and reports the ones that have no quoted-literal\n * reference anywhere else in the source tree. Designed to be wired\n * into `yarn v` (or any verify pipeline) so dead i18n entries can't\n * pile up unnoticed when a feature is removed.\n *\n * Commands:\n * - `alepha i18n check` — report unused translation keys\n *\n * Configuration in `alepha.config.ts`:\n *\n * ```typescript\n * import { i18n } from \"alepha/cli/i18n\";\n *\n * export default defineConfig({\n * plugins: [\n * i18n({\n * scan: [\"src\", \".vendor/@alepha/ui\"],\n * dynamicPrefixes: [\"archive.type.\", \"petitions.filter.\"],\n * }),\n * ],\n * });\n * ```\n */\nexport const AlephaCliI18nPlugin = $module({\n name: \"alepha.cli.plugins.i18n\",\n atoms: [i18nOptions],\n services: [I18nCommand, I18nCheckService],\n});\n\nexport const i18n = (options: I18nOptions = {}) => {\n return () => {\n const { alepha } = $context();\n alepha.with(AlephaCliI18nPlugin).set(i18nOptions, options);\n };\n};\n\n// ---------------------------------------------------------------------------\n\nexport * from \"./atoms/i18nOptions.ts\";\nexport * from \"./commands/I18nCommand.ts\";\nexport * from \"./services/I18nCheckService.ts\";\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,cAAc,MAAM;CAC/B,MAAM;CACN,aAAa;CACb,QAAQ,EAAE,SACR,EAAE,OAAO;;;;;;;EAOP,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;;;;;;;;;;;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B;AAC1C,CAAC;AAED,MAAa,QAAQ,UAAuB,CAAC,MAAM;CACjD,aAAa;EACX,MAAM,EAAE,WAAW,SAAS;EAC5B,OAAO,KAAK,mBAAmB,EAAE,IAAI,aAAa,OAAO;CAC3D;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/cli/i18n/atoms/i18nOptions.ts","../../../src/cli/i18n/services/I18nCheckService.ts","../../../src/cli/i18n/commands/I18nCommand.ts","../../../src/cli/i18n/index.ts"],"sourcesContent":["import { $atom, type Static, t } from \"alepha\";\n\n/**\n * i18n CLI configuration atom.\n *\n * Filled from the `i18n` plugin in `alepha.config.ts`.\n * Read by `I18nCommand` to drive `alepha i18n check`.\n */\nexport const i18nOptions = $atom({\n name: \"alepha.cli.i18n.options\",\n description: \"i18n unused-key check configuration\",\n schema: t.optional(\n t.object({\n /**\n * Directories (relative to the project root) to scan both for\n * `$dictionary(...)` declarations and for translation key usage.\n *\n * @default [\"src\"]\n */\n scan: t.optional(t.array(t.text())),\n\n /**\n * Key prefixes that are constructed at runtime (e.g. via template\n * literals like `` tr(`archive.type.${kind}`) ``). Every key\n * starting with one of these prefixes is exempted from the\n * unused check.\n *\n * Keep this list short and audit it when a feature is removed —\n * a stale prefix here means dead keys can hide.\n *\n * @default []\n */\n dynamicPrefixes: t.optional(t.array(t.text())),\n\n /**\n * Additional path substrings (matched against the full file\n * path) that should be excluded from the scan, on top of the\n * defaults (`node_modules`, `dist`, `__tests__`, `.spec.*`,\n * `.test.*`, `.alepha`).\n *\n * @default []\n */\n exclude: t.optional(t.array(t.text())),\n }),\n ),\n});\n\n/**\n * Type for i18n options.\n */\nexport type I18nOptions = Static<typeof i18nOptions.schema>;\n","import { $inject } from \"alepha\";\nimport { FileSystemProvider } from \"alepha/system\";\n\n/**\n * File extensions considered when scanning for dictionaries / usage.\n */\nconst SCAN_EXTS = [\".ts\", \".tsx\", \".mts\", \".cts\"];\n\n/**\n * Built-in path substrings that are always excluded from scanning.\n */\nconst DEFAULT_EXCLUDES = [\n \"/node_modules/\",\n \"/dist/\",\n \"/__tests__/\",\n \"/.alepha/\",\n \".spec.ts\",\n \".spec.tsx\",\n \".test.ts\",\n \".test.tsx\",\n];\n\n/**\n * Matches a quoted dotted property key on the left-hand side of a\n * dictionary entry: `\"some.dotted.key\":`. The \"at least one dot\"\n * requirement rules out unrelated quoted strings (e.g. JSON literals\n * inside helper text).\n */\nconst KEY_DECLARATION_RE = /\"([\\w-]+(?:\\.[\\w-]+)+)\"\\s*:/g;\n\n/**\n * Heuristic for spotting files that declare a dictionary. Conservative\n * by design — we'd rather scan a few unrelated files than miss a\n * dictionary tucked away in an unusual location.\n */\nconst DICTIONARY_MARKER = \"$dictionary\";\n\n/**\n * Captures the module specifier of a lazily-imported dictionary, i.e. the\n * `\"./fr.ts\"` in `$dictionary({ lazy: () => import(\"./fr.ts\") })`. Apps\n * commonly split each language into its own file so a session only ships the\n * active locale — those key files carry no `$dictionary` marker, so without\n * this the keys would be invisible to the check.\n *\n * `[^{}]*?` keeps the match inside the `$dictionary` call's own object literal\n * (it stops at the first brace), so unrelated lazy imports in the same file —\n * e.g. a sibling `$page({ lazy: () => import(\"./Page.tsx\") })` or a\n * `$dictionary` whose `lazy` returns an inline `({ default: {…} })` object —\n * are never mistaken for dictionary key files.\n */\nconst DICTIONARY_LAZY_IMPORT_RE =\n /\\$dictionary\\s*\\(\\s*\\{[^{}]*?import\\s*\\(\\s*[\"']([^\"']+)[\"']/g;\n\nexport interface I18nCheckOptions {\n root: string;\n scan: string[];\n dynamicPrefixes: string[];\n exclude: string[];\n}\n\nexport interface I18nCheckResult {\n /** Total number of keys discovered across all dictionary files. */\n totalKeys: number;\n /** Number of keys exempted via `dynamicPrefixes`. */\n exemptKeys: number;\n /** Number of source files scanned for references. */\n scannedFiles: number;\n /** Dictionary files that contributed keys. */\n dictionaryFiles: string[];\n /** Keys that have no quoted-literal reference anywhere in the scan. */\n unused: string[];\n}\n\nexport class I18nCheckService {\n protected readonly fs = $inject(FileSystemProvider);\n\n /**\n * Find unused translation keys.\n *\n * Discovery is fully static: we walk `scan` dirs, identify files\n * that import `$dictionary` (matched via the literal substring) plus\n * any per-language files they lazily `import(...)`, extract every\n * `\"a.b.c\": ...` property key declared across them, then grep the\n * remaining source files for a quoted-literal occurrence of each key.\n * Anything matching a `dynamicPrefixes` entry is exempted.\n */\n async check(options: I18nCheckOptions): Promise<I18nCheckResult> {\n const { root, scan, dynamicPrefixes, exclude } = options;\n const excludes = [...DEFAULT_EXCLUDES, ...exclude];\n\n const allFiles: string[] = [];\n for (const dir of scan) {\n const absDir = this.fs.join(root, dir);\n let entries: string[];\n try {\n entries = await this.fs.ls(absDir, { recursive: true });\n } catch {\n // Missing scan dir is silently skipped — config carries\n // optional paths (e.g. .vendor/**) that may not exist locally.\n continue;\n }\n for (const rel of entries) {\n const abs = this.fs.join(absDir, rel);\n if (!SCAN_EXTS.some((ext) => abs.endsWith(ext))) continue;\n if (excludes.some((sub) => abs.includes(sub))) continue;\n allFiles.push(abs);\n }\n }\n\n const fileContents = new Map<string, string>();\n for (const file of allFiles) {\n fileContents.set(file, (await this.fs.readFile(file)).toString(\"utf8\"));\n }\n\n // A file is a dictionary if it declares `$dictionary` OR it is the target\n // of a `$dictionary({ lazy: () => import(\"…\") })` (the split per-language\n // key files, which carry no marker of their own). Resolving the lazy\n // targets first lets their keys be extracted below and keeps them out of\n // the usage corpus (their `\"key\": \"value\"` lines aren't references).\n const dictionarySet = new Set<string>();\n for (const [file, text] of fileContents) {\n if (!text.includes(DICTIONARY_MARKER)) continue;\n dictionarySet.add(file);\n for (const m of text.matchAll(DICTIONARY_LAZY_IMPORT_RE)) {\n const target = this.resolveImport(file, m[1], fileContents);\n if (target) dictionarySet.add(target);\n }\n }\n\n const dictionaryFiles: string[] = [];\n const allKeys = new Set<string>();\n for (const file of dictionarySet) {\n const text = fileContents.get(file);\n if (!text) continue;\n const before = allKeys.size;\n for (const m of text.matchAll(KEY_DECLARATION_RE)) {\n allKeys.add(m[1]);\n }\n if (allKeys.size > before) dictionaryFiles.push(file);\n }\n\n // Concatenate every non-dictionary file into one corpus so each\n // key is tested with a single regex run rather than O(files × keys).\n const corpusParts: string[] = [];\n let scannedFiles = 0;\n for (const [file, text] of fileContents) {\n if (dictionarySet.has(file)) continue;\n corpusParts.push(text);\n scannedFiles++;\n }\n const corpus = corpusParts.join(\"\\n\");\n\n let exemptKeys = 0;\n const unused: string[] = [];\n for (const key of allKeys) {\n if (dynamicPrefixes.some((p) => key.startsWith(p))) {\n exemptKeys++;\n continue;\n }\n const literal = key.replace(/[.\\\\]/g, (c) => `\\\\${c}`);\n // Key must appear as a quoted string literal — `\"...\"`, `'...'`,\n // or `` `...` ``. Quotes on both sides rule out accidental\n // substring hits in longer keys.\n const re = new RegExp(`[\"'\\`]${literal}[\"'\\`]`);\n if (!re.test(corpus)) unused.push(key);\n }\n\n return {\n totalKeys: allKeys.size,\n exemptKeys,\n scannedFiles,\n dictionaryFiles,\n unused: unused.sort(),\n };\n }\n\n /**\n * Resolve a relative `import(\"…\")` specifier from `fromFile` to an absolute\n * path that was actually scanned. Returns `undefined` for bare/package\n * specifiers or targets outside the scan set. Extensionless specifiers are\n * probed against each supported source extension.\n */\n protected resolveImport(\n fromFile: string,\n spec: string,\n files: Map<string, string>,\n ): string | undefined {\n if (!spec.startsWith(\".\")) return undefined;\n // `join(file, \"..\", spec)` drops the filename then applies the relative\n // specifier — i.e. resolves against `fromFile`'s directory.\n const base = this.fs.join(fromFile, \"..\", spec);\n if (files.has(base)) return base;\n for (const ext of SCAN_EXTS) {\n if (files.has(base + ext)) return base + ext;\n }\n return undefined;\n }\n}\n","import { $inject, $state } from \"alepha\";\nimport { $command } from \"alepha/command\";\nimport { $logger, ConsoleColorProvider } from \"alepha/logger\";\nimport { i18nOptions } from \"../atoms/i18nOptions.ts\";\nimport { I18nCheckService } from \"../services/I18nCheckService.ts\";\n\nexport class I18nCommand {\n protected readonly log = $logger();\n protected readonly options = $state(i18nOptions);\n protected readonly checkService = $inject(I18nCheckService);\n protected readonly color = $inject(ConsoleColorProvider);\n\n protected resolveOptions() {\n return {\n scan: this.options?.scan ?? [\"src\"],\n dynamicPrefixes: this.options?.dynamicPrefixes ?? [],\n exclude: this.options?.exclude ?? [],\n };\n }\n\n protected readonly check = $command({\n name: \"check\",\n description: \"Report translation keys with no quoted-literal reference\",\n handler: async ({ root }) => {\n const opts = this.resolveOptions();\n const c = this.color;\n\n const result = await this.checkService.check({ root, ...opts });\n\n if (result.totalKeys === 0) {\n process.stdout.write(\n `\\n${c.set(\"ORANGE\", \"warn\")} No translation keys found. ` +\n `Did the dictionary location change? ` +\n `Searched: ${opts.scan.join(\", \")}\\n\\n`,\n );\n process.exit(2);\n }\n\n process.stdout.write(\n `\\nChecked ${c.set(\"CYAN\", String(result.totalKeys))} keys across ` +\n `${c.set(\"CYAN\", String(result.scannedFiles))} files ` +\n `(${result.dictionaryFiles.length} dictionary ` +\n `${result.dictionaryFiles.length === 1 ? \"file\" : \"files\"}).\\n`,\n );\n if (result.exemptKeys > 0) {\n process.stdout.write(\n ` exempt (dynamic prefixes): ${result.exemptKeys}\\n`,\n );\n }\n\n if (result.unused.length === 0) {\n process.stdout.write(\n `\\n${c.set(\"GREEN\", \"✓\")} All translations are referenced.\\n\\n`,\n );\n return;\n }\n\n process.stdout.write(\n `\\n${c.set(\"RED\", \"✗\")} Unused translations (${result.unused.length}):\\n`,\n );\n for (const k of result.unused) {\n process.stdout.write(` ${c.set(\"DIM\", \"-\")} ${k}\\n`);\n }\n process.stdout.write(\n `\\nEither delete the key from its dictionary, or add its prefix to ` +\n `${c.set(\"CYAN\", \"dynamicPrefixes\")} in alepha.config.ts ` +\n `if it's constructed at runtime.\\n\\n`,\n );\n process.exit(1);\n },\n });\n\n public readonly i18n = $command({\n name: \"i18n\",\n description: \"Internationalization tooling\",\n children: [this.check],\n handler: async ({ help }) => {\n help();\n },\n });\n}\n","import { $context, $module } from \"alepha\";\nimport { type I18nOptions, i18nOptions } from \"./atoms/i18nOptions.ts\";\nimport { I18nCommand } from \"./commands/I18nCommand.ts\";\nimport { I18nCheckService } from \"./services/I18nCheckService.ts\";\n\n// ---------------------------------------------------------------------------\n\n/**\n * CLI plugin for finding unused translation keys.\n *\n * Statically scans the project for `$dictionary(...)` calls, extracts\n * every declared key, and reports the ones that have no quoted-literal\n * reference anywhere else in the source tree. Designed to be wired\n * into `yarn v` (or any verify pipeline) so dead i18n entries can't\n * pile up unnoticed when a feature is removed.\n *\n * Commands:\n * - `alepha i18n check` — report unused translation keys\n *\n * Configuration in `alepha.config.ts`:\n *\n * ```typescript\n * import { i18n } from \"alepha/cli/i18n\";\n *\n * export default defineConfig({\n * plugins: [\n * i18n({\n * scan: [\"src\", \".vendor/@alepha/ui\"],\n * dynamicPrefixes: [\"archive.type.\", \"petitions.filter.\"],\n * }),\n * ],\n * });\n * ```\n */\nexport const AlephaCliI18nPlugin = $module({\n name: \"alepha.cli.plugins.i18n\",\n atoms: [i18nOptions],\n services: [I18nCommand, I18nCheckService],\n});\n\nexport const i18n = (options: I18nOptions = {}) => {\n return () => {\n const { alepha } = $context();\n alepha.with(AlephaCliI18nPlugin).set(i18nOptions, options);\n };\n};\n\n// ---------------------------------------------------------------------------\n\nexport * from \"./atoms/i18nOptions.ts\";\nexport * from \"./commands/I18nCommand.ts\";\nexport * from \"./services/I18nCheckService.ts\";\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,cAAc,MAAM;CAC/B,MAAM;CACN,aAAa;CACb,QAAQ,EAAE,SACR,EAAE,OAAO;;;;;;;EAOP,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;;;;;;;;;;;;EAalC,iBAAiB,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;;;;;;;;;EAU7C,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;CACvC,CAAC,CACH;AACF,CAAC;;;;;;ACvCD,MAAM,YA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AAE,GAAG,EAAE,GAAG;GAEtD,QAAQ,OAAO,MACb,qEACK,EAAE,IAAI,QAAQ,iBAAiB,EAAE,yDAExC;GACA,QAAQ,KAAK,CAAC;EAChB;CACF,CAAC;CAED,OAAuB,SAAS;EAC9B,MAAM;EACN,aAAa;EACb,UAAU,CAAC,KAAK,KAAK;EACrB,SAAS,OAAO,EAAE,WAAW;GAC3B,KAAK;EACP;CACF,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9CA,MAAa,sBAAsB,QAAQ;CACzC,MAAM;CACN,OAAO,CAAC,WAAW;CACnB,UAAU,CAAC,aAAa,gBAAgB;AAC1C,CAAC;AAED,MAAa,QAAQ,UAAuB,CAAC,MAAM;CACjD,aAAa;EACX,MAAM,EAAE,WAAW,SAAS;EAC5B,OAAO,KAAK,mBAAmB,EAAE,IAAI,aAAa,OAAO;CAC3D;AACF"}
|
|
@@ -812,15 +812,41 @@ declare class CloudflareAdapter extends PlatformAdapter {
|
|
|
812
812
|
protected ensureD1(name: string): Promise<string>;
|
|
813
813
|
protected ensureHyperdrive(name: string, connectionString: string): Promise<string>;
|
|
814
814
|
protected ensureR2(name: string): Promise<void>;
|
|
815
|
+
/** Whether a Cloudflare error message indicates the bucket is already gone. */
|
|
816
|
+
protected isMissingBucketError(msg: string): boolean;
|
|
817
|
+
/**
|
|
818
|
+
* Resolve S3 credentials for wiping an R2 bucket over the S3 protocol.
|
|
819
|
+
*
|
|
820
|
+
* Prefers the account's R2 S3 credentials from the environment
|
|
821
|
+
* (`S3_ACCESS_KEY_ID` / `S3_SECRET_ACCESS_KEY`) — these are already
|
|
822
|
+
* provisioned for the deploy (artifact registry) and are account-scoped,
|
|
823
|
+
* so they can empty any bucket without minting anything. Returns `null`
|
|
824
|
+
* when not configured, letting the caller fall back to token minting.
|
|
825
|
+
*/
|
|
826
|
+
protected resolveR2Credentials(): {
|
|
827
|
+
accessKeyId: string;
|
|
828
|
+
secretAccessKey: string;
|
|
829
|
+
} | null;
|
|
830
|
+
/**
|
|
831
|
+
* Delete an R2 bucket, emptying it first only when necessary.
|
|
832
|
+
*
|
|
833
|
+
* Cloudflare's REST `DELETE /r2/buckets/:name` succeeds on an empty bucket
|
|
834
|
+
* but rejects a non-empty one. So we attempt the delete directly (the
|
|
835
|
+
* common teardown case — no objects, no creds needed), and only on failure
|
|
836
|
+
* empty the bucket over the S3 protocol and retry. A missing bucket is a
|
|
837
|
+
* no-op, so teardown is idempotent.
|
|
838
|
+
*/
|
|
839
|
+
protected deleteR2Bucket(name: string, ctx: PlatformContext): Promise<void>;
|
|
815
840
|
/**
|
|
816
841
|
* Empty an R2 bucket via the S3-compatible API.
|
|
817
842
|
*
|
|
818
|
-
* Cloudflare's REST
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
*
|
|
823
|
-
*
|
|
843
|
+
* Cloudflare's REST API has no object-level endpoints — objects must be
|
|
844
|
+
* listed and deleted over the S3 protocol. We use the account's R2 S3
|
|
845
|
+
* credentials (`S3_ACCESS_KEY_ID` / `S3_SECRET_ACCESS_KEY`) when present;
|
|
846
|
+
* otherwise we fall back to minting a short-lived bucket-scoped token via
|
|
847
|
+
* the CF API (requires a user-scoped `CLOUDFLARE_API_TOKEN`) and revoke it
|
|
848
|
+
* after. When neither is available the wipe is skipped with a warning —
|
|
849
|
+
* the caller still attempts the delete, which succeeds for empty buckets.
|
|
824
850
|
*
|
|
825
851
|
* Also aborts any pending multipart uploads — those count as bucket
|
|
826
852
|
* contents from R2's perspective and would otherwise block the delete.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/cli/platform-lib/providers/PlatformCacheProvider.ts","../../../src/cli/platform-lib/schemas/cloudflare.ts","../../../src/cli/platform-lib/services/WranglerApi.ts","../../../src/cli/platform-lib/services/CloudflareApi.ts","../../../src/cli/platform-lib/atoms/platformOptions.ts","../../../src/cli/platform-lib/services/NamingService.ts","../../../src/cli/platform-lib/adapters/PlatformAdapter.ts","../../../src/cli/platform-lib/adapters/CloudflareAdapter.ts","../../../src/cli/platform-lib/schemas/vercel.ts","../../../src/cli/platform-lib/services/VercelCli.ts","../../../src/cli/platform-lib/services/VercelApi.ts","../../../src/cli/platform-lib/adapters/VercelAdapter.ts","../../../src/cli/platform-lib/providers/SecretStoreProvider.ts","../../../src/cli/platform-lib/providers/GitHubSecretStore.ts","../../../src/cli/platform-lib/providers/MemorySecretStore.ts","../../../src/cli/platform-lib/schemas/platform.ts","../../../src/cli/platform-lib/services/PlatformInspector.ts","../../../src/cli/platform-lib/services/PlatformOrchestrator.ts","../../../src/cli/platform-lib/services/SecretFilterService.ts","../../../src/cli/platform-lib/index.ts"],"mappings":";;;;;;;;UAIU,aAAA;EAAA,CACP,OAAA;IACC,cAAA;IACA,SAAA;EAAA;AAAA;AAL+C;;;;;;AAAA,cAetC,qBAAA;EAAA,0BACe,MAAA;EAAA,mBAEP,EAAA,EAAE,kBAAA;EAAA,mBACF,QAAA,EAAQ,gBAAA;EAAA,UAEjB,SAAA,CAAU,IAAA;EAIP,YAAA,CAAa,IAAA,UAAc,OAAA,WAAkB,OAAA;EAU7C,YAAA,CACX,IAAA,UACA,OAAA,WACC,OAAA;EAKU,WAAA,CACX,IAAA,UACA,OAAA,UACA,SAAA,YACC,OAAA;EAAA,UASa,SAAA,CAAU,IAAA,WAAe,OAAA,CAAQ,aAAA;EAAA,UASjC,UAAA,CACd,IAAA,UACA,KAAA,EAAO,aAAA,GACN,OAAA;AAAA;;;cC/DQ,uBAAA,oBAAuB,OAAA;;;;KAKxB,iBAAA,GAAoB,MAAM,QAAQ,uBAAA;AAAA,cAMjC,kBAAA,oBAAkB,OAAA;;;;KAKnB,YAAA,GAAe,MAAM,QAAQ,kBAAA;AAAA,cAM5B,kBAAA,oBAAkB,OAAA;;;;KAKnB,YAAA,GAAe,MAAM,QAAQ,kBAAA;AAAA,cAM5B,kBAAA,oBAAkB,OAAA;;;;KAKnB,YAA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EiBwEK,cAAA,CAAe,MAAA;IAAU,IAAA;IAAgB,MAAA;EAAA;EAsBnC,IAAA,CAAK,OAAA;IAChB,IAAA;IACA,GAAA;IACA,KAAA,EAAO,QAAA;IACP,SAAA,EAAW,iBAAA;IACX,GAAA,EAAK,YAAA;IACL,OAAA,GAAU,MAAA,aAAmB,OAAA;IAE7B,MAAA;EAAA,IACE,OAAA;EA2CS,IAAA,CAAK,OAAA;IAChB,IAAA;IACA,GAAA;IACA,SAAA,EAAW,iBAAA;IAEX,MAAA;EAAA,IACE,OAAA;IACF,MAAA,EAAQ,sBAAA;IACR,MAAA,EAAQ,aAAA;IACR,SAAA,EAAW,iBAAA;EAAA;EAaA,MAAA,CAAO,OAAA;IAClB,IAAA;IACA,GAAA;IACA,KAAA,EAAO,QAAA;IACP,SAAA,EAAW,iBAAA;IACX,GAAA,EAAK,YAAA,EhBvMP;IgByME,MAAA;EAAA,IACE,OAAA;IAAU,MAAA,EAAQ,sBAAA;IAAwB,KAAA,EAAO,aAAA;EAAA;EA6B9C,QAAA,CAAS,GAAA;AAAA;;;;;;;;;;;AjB1PiC;;ckBQtC,mBAAA;EAAA,0BACe,aAAA,EAAa,GAAA;EAAA,0BACb,aAAA;EAAA,0BACA,aAAA;ElBNxB;;AAAS;EkBWJ,MAAA,CAAO,OAAA,EAAS,MAAA,mBAAyB,MAAA;ElBDhB;;;;;;EkBoBzB,YAAA,CAAa,GAAA;ElBqB6B;;;EkBX1C,WAAA,CAAY,UAAA;AAAA;;;;;;;;;;;AlB7C8B;;;;;;cmB2BtC,uBAAA,mBAAuB,OAAA,kBAAA,MAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/cli/platform-lib/providers/PlatformCacheProvider.ts","../../../src/cli/platform-lib/schemas/cloudflare.ts","../../../src/cli/platform-lib/services/WranglerApi.ts","../../../src/cli/platform-lib/services/CloudflareApi.ts","../../../src/cli/platform-lib/atoms/platformOptions.ts","../../../src/cli/platform-lib/services/NamingService.ts","../../../src/cli/platform-lib/adapters/PlatformAdapter.ts","../../../src/cli/platform-lib/adapters/CloudflareAdapter.ts","../../../src/cli/platform-lib/schemas/vercel.ts","../../../src/cli/platform-lib/services/VercelCli.ts","../../../src/cli/platform-lib/services/VercelApi.ts","../../../src/cli/platform-lib/adapters/VercelAdapter.ts","../../../src/cli/platform-lib/providers/SecretStoreProvider.ts","../../../src/cli/platform-lib/providers/GitHubSecretStore.ts","../../../src/cli/platform-lib/providers/MemorySecretStore.ts","../../../src/cli/platform-lib/schemas/platform.ts","../../../src/cli/platform-lib/services/PlatformInspector.ts","../../../src/cli/platform-lib/services/PlatformOrchestrator.ts","../../../src/cli/platform-lib/services/SecretFilterService.ts","../../../src/cli/platform-lib/index.ts"],"mappings":";;;;;;;;UAIU,aAAA;EAAA,CACP,OAAA;IACC,cAAA;IACA,SAAA;EAAA;AAAA;AAL+C;;;;;;AAAA,cAetC,qBAAA;EAAA,0BACe,MAAA;EAAA,mBAEP,EAAA,EAAE,kBAAA;EAAA,mBACF,QAAA,EAAQ,gBAAA;EAAA,UAEjB,SAAA,CAAU,IAAA;EAIP,YAAA,CAAa,IAAA,UAAc,OAAA,WAAkB,OAAA;EAU7C,YAAA,CACX,IAAA,UACA,OAAA,WACC,OAAA;EAKU,WAAA,CACX,IAAA,UACA,OAAA,UACA,SAAA,YACC,OAAA;EAAA,UASa,SAAA,CAAU,IAAA,WAAe,OAAA,CAAQ,aAAA;EAAA,UASjC,UAAA,CACd,IAAA,UACA,KAAA,EAAO,aAAA,GACN,OAAA;AAAA;;;cC/DQ,uBAAA,oBAAuB,OAAA;;;;KAKxB,iBAAA,GAAoB,MAAM,QAAQ,uBAAA;AAAA,cAMjC,kBAAA,oBAAkB,OAAA;;;;KAKnB,YAAA,GAAe,MAAM,QAAQ,kBAAA;AAAA,cAM5B,kBAAA,oBAAkB,OAAA;;;;KAKnB,YAAA,GAAe,MAAM,QAAQ,kBAAA;AAAA,cAM5B,kBAAA,oBAAkB,OA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apter = class CloudflareAdapter extends PlatformAdapter {
|
|
|
1450
1450
|
name: `delete r2 ${name}`,
|
|
1451
1451
|
handler: async () => {
|
|
1452
1452
|
try {
|
|
1453
|
-
await this.
|
|
1454
|
-
await this.api.deleteR2(name);
|
|
1453
|
+
await this.deleteR2Bucket(name, ctx);
|
|
1455
1454
|
} catch (error) {
|
|
1456
1455
|
const msg = String(error.message || "");
|
|
1457
|
-
if (
|
|
1456
|
+
if (this.isMissingBucketError(msg)) this.log.debug(`Bucket ${name} not found — skipping.`);
|
|
1458
1457
|
else this.log.warn(`Failed to delete r2 ${name}: ${msg}`);
|
|
1459
1458
|
}
|
|
1460
1459
|
}
|
|
@@ -1510,33 +1509,97 @@ var CloudflareAdapter = class CloudflareAdapter extends PlatformAdapter {
|
|
|
1510
1509
|
if ((await this.api.listR2()).find((b) => b.name === name)) return;
|
|
1511
1510
|
await this.api.createR2(name);
|
|
1512
1511
|
}
|
|
1512
|
+
/** Whether a Cloudflare error message indicates the bucket is already gone. */
|
|
1513
|
+
isMissingBucketError(msg) {
|
|
1514
|
+
return msg.includes("does not exist") || msg.includes("NoSuchBucket") || msg.includes("bucket not found");
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* Resolve S3 credentials for wiping an R2 bucket over the S3 protocol.
|
|
1518
|
+
*
|
|
1519
|
+
* Prefers the account's R2 S3 credentials from the environment
|
|
1520
|
+
* (`S3_ACCESS_KEY_ID` / `S3_SECRET_ACCESS_KEY`) — these are already
|
|
1521
|
+
* provisioned for the deploy (artifact registry) and are account-scoped,
|
|
1522
|
+
* so they can empty any bucket without minting anything. Returns `null`
|
|
1523
|
+
* when not configured, letting the caller fall back to token minting.
|
|
1524
|
+
*/
|
|
1525
|
+
resolveR2Credentials() {
|
|
1526
|
+
const accessKeyId = process.env.S3_ACCESS_KEY_ID;
|
|
1527
|
+
const secretAccessKey = process.env.S3_SECRET_ACCESS_KEY;
|
|
1528
|
+
if (accessKeyId && secretAccessKey) return {
|
|
1529
|
+
accessKeyId,
|
|
1530
|
+
secretAccessKey
|
|
1531
|
+
};
|
|
1532
|
+
return null;
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* Delete an R2 bucket, emptying it first only when necessary.
|
|
1536
|
+
*
|
|
1537
|
+
* Cloudflare's REST `DELETE /r2/buckets/:name` succeeds on an empty bucket
|
|
1538
|
+
* but rejects a non-empty one. So we attempt the delete directly (the
|
|
1539
|
+
* common teardown case — no objects, no creds needed), and only on failure
|
|
1540
|
+
* empty the bucket over the S3 protocol and retry. A missing bucket is a
|
|
1541
|
+
* no-op, so teardown is idempotent.
|
|
1542
|
+
*/
|
|
1543
|
+
async deleteR2Bucket(name, ctx) {
|
|
1544
|
+
try {
|
|
1545
|
+
await this.api.deleteR2(name);
|
|
1546
|
+
return;
|
|
1547
|
+
} catch (error) {
|
|
1548
|
+
const msg = String(error.message || "");
|
|
1549
|
+
if (this.isMissingBucketError(msg)) return;
|
|
1550
|
+
this.log.debug(`Direct delete of r2 ${name} failed (${msg}); emptying then retrying.`);
|
|
1551
|
+
}
|
|
1552
|
+
await this.wipeR2Bucket(name, ctx);
|
|
1553
|
+
try {
|
|
1554
|
+
await this.api.deleteR2(name);
|
|
1555
|
+
} catch (error) {
|
|
1556
|
+
const msg = String(error.message || "");
|
|
1557
|
+
if (this.isMissingBucketError(msg)) return;
|
|
1558
|
+
throw error;
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1513
1561
|
/**
|
|
1514
1562
|
* Empty an R2 bucket via the S3-compatible API.
|
|
1515
1563
|
*
|
|
1516
|
-
* Cloudflare's REST
|
|
1517
|
-
*
|
|
1518
|
-
*
|
|
1519
|
-
*
|
|
1520
|
-
*
|
|
1521
|
-
*
|
|
1564
|
+
* Cloudflare's REST API has no object-level endpoints — objects must be
|
|
1565
|
+
* listed and deleted over the S3 protocol. We use the account's R2 S3
|
|
1566
|
+
* credentials (`S3_ACCESS_KEY_ID` / `S3_SECRET_ACCESS_KEY`) when present;
|
|
1567
|
+
* otherwise we fall back to minting a short-lived bucket-scoped token via
|
|
1568
|
+
* the CF API (requires a user-scoped `CLOUDFLARE_API_TOKEN`) and revoke it
|
|
1569
|
+
* after. When neither is available the wipe is skipped with a warning —
|
|
1570
|
+
* the caller still attempts the delete, which succeeds for empty buckets.
|
|
1522
1571
|
*
|
|
1523
1572
|
* Also aborts any pending multipart uploads — those count as bucket
|
|
1524
1573
|
* contents from R2's perspective and would otherwise block the delete.
|
|
1525
1574
|
*/
|
|
1526
1575
|
async wipeR2Bucket(bucketName, ctx) {
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1576
|
+
let creds = this.resolveR2Credentials();
|
|
1577
|
+
let mintedTokenId;
|
|
1578
|
+
if (!creds) {
|
|
1579
|
+
if (!process.env.CLOUDFLARE_API_TOKEN) {
|
|
1580
|
+
this.log.warn(`Skipping R2 wipe for ${bucketName}: no S3 credentials (S3_ACCESS_KEY_ID / S3_SECRET_ACCESS_KEY) and no CLOUDFLARE_API_TOKEN to mint a bucket-scoped token. A non-empty bucket must be emptied manually in the Cloudflare dashboard.`);
|
|
1581
|
+
return;
|
|
1582
|
+
}
|
|
1583
|
+
try {
|
|
1584
|
+
const tokenName = `alepha-teardown-${bucketName}-${Date.now()}`;
|
|
1585
|
+
const token = await this.api.createR2Token(tokenName, bucketName);
|
|
1586
|
+
mintedTokenId = token.id;
|
|
1587
|
+
creds = {
|
|
1588
|
+
accessKeyId: token.accessKeyId,
|
|
1589
|
+
secretAccessKey: token.secretAccessKey
|
|
1590
|
+
};
|
|
1591
|
+
} catch (error) {
|
|
1592
|
+
this.log.warn(`Skipping R2 wipe for ${bucketName}: could not mint an R2 token (${String(error.message || "")}). Set S3_ACCESS_KEY_ID / S3_SECRET_ACCESS_KEY for reliable teardown.`);
|
|
1593
|
+
return;
|
|
1594
|
+
}
|
|
1530
1595
|
}
|
|
1531
|
-
const tokenName = `alepha-teardown-${bucketName}-${Date.now()}`;
|
|
1532
|
-
const token = await this.api.createR2Token(tokenName, bucketName);
|
|
1533
1596
|
try {
|
|
1534
1597
|
const accountId = await this.api.resolveAccountId();
|
|
1535
1598
|
const jur = ctx.envConfig.jurisdiction;
|
|
1536
1599
|
const host = jur ? `${accountId}.${jur}.r2.cloudflarestorage.com` : `${accountId}.r2.cloudflarestorage.com`;
|
|
1537
1600
|
const client = new S3mini({
|
|
1538
|
-
accessKeyId:
|
|
1539
|
-
secretAccessKey:
|
|
1601
|
+
accessKeyId: creds.accessKeyId,
|
|
1602
|
+
secretAccessKey: creds.secretAccessKey,
|
|
1540
1603
|
region: "auto",
|
|
1541
1604
|
endpoint: `https://${host}/${bucketName}`
|
|
1542
1605
|
});
|
|
@@ -1567,10 +1630,10 @@ var CloudflareAdapter = class CloudflareAdapter extends PlatformAdapter {
|
|
|
1567
1630
|
}
|
|
1568
1631
|
if (total > 0) this.log.info(`Emptied ${total} object(s) from bucket ${bucketName}.`);
|
|
1569
1632
|
} finally {
|
|
1570
|
-
try {
|
|
1571
|
-
await this.api.deleteR2Token(
|
|
1633
|
+
if (mintedTokenId) try {
|
|
1634
|
+
await this.api.deleteR2Token(mintedTokenId);
|
|
1572
1635
|
} catch (error) {
|
|
1573
|
-
this.log.warn(`Failed to revoke ephemeral R2 token ${
|
|
1636
|
+
this.log.warn(`Failed to revoke ephemeral R2 token ${mintedTokenId}: ${String(error.message || "")}`);
|
|
1574
1637
|
}
|
|
1575
1638
|
}
|
|
1576
1639
|
}
|