@tokenoftrust/storefront-runner 2.4.46 → 2.4.47

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/storefront-runner",
3
- "version": "2.4.46",
3
+ "version": "2.4.47",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
6
6
  "packageManager": "pnpm@11.9.0",
@@ -134,18 +134,16 @@ export function applyDeclaredTenantConfig(tenant, declared) {
134
134
 
135
135
  /**
136
136
  * The declaration a tenant repo commits at `ref`, read through any source with the
137
- * reconcile's `readFile(path, ref)` shape. `{}` when the file is absent or unreadable.
137
+ * reconcile's `readFile(path, ref)` shape. `{}` when the file is absent. A read that fails
138
+ * or a file that does not parse THROWS: an unknown declaration is never "declares nothing",
139
+ * which would judge a regulated store as unregulated.
138
140
  *
139
141
  * @param {{ readFile(path: string, ref: string): Promise<string | null> }} source
140
142
  * @param {string} ref
141
143
  */
142
144
  export async function readDeclaredTenantConfigAt(source, ref) {
143
- try {
144
- const raw = await source.readFile(".tot/config.json", ref);
145
- return raw ? declaredTenantConfig(JSON.parse(raw)) : {};
146
- } catch {
147
- return {};
148
- }
145
+ const raw = await source.readFile(".tot/config.json", ref);
146
+ return raw ? declaredTenantConfig(JSON.parse(raw)) : {};
149
147
  }
150
148
 
151
149
  /**