@composable-os/product 0.1.0-beta.14 → 0.1.0-beta.15

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/index.d.ts CHANGED
@@ -337,8 +337,8 @@ export declare function clientWeb(product: ClientProductDefinition, environment?
337
337
  /**
338
338
  * The deployed name of each of a release's Worker and resource names, for a client product: the
339
339
  * release's product's names replaced by the client's (`crm-app` → `gym-app`, the `crm` database →
340
- * `gym`). Only names that differ are listed. What the deployment state's `workerNames` and
341
- * `resourceNames` hold (ADR 0193).
340
+ * `gym`). Only names that differ are listed, and no Durable Object class. What the deployment
341
+ * state's `workerNames` and `resourceNames` hold (ADR 0193).
342
342
  */
343
343
  export declare function clientNameMaps(release: ProductDefinition, client: ProductDefinition["names"], manifest: {
344
344
  workers: {
@@ -346,6 +346,7 @@ export declare function clientNameMaps(release: ProductDefinition, client: Produ
346
346
  }[];
347
347
  resources: {
348
348
  name: string;
349
+ type?: string;
349
350
  }[];
350
351
  }): {
351
352
  workers: Record<string, string>;
package/dist/index.js CHANGED
@@ -269,8 +269,8 @@ export function clientWeb(product, environment) {
269
269
  /**
270
270
  * The deployed name of each of a release's Worker and resource names, for a client product: the
271
271
  * release's product's names replaced by the client's (`crm-app` → `gym-app`, the `crm` database →
272
- * `gym`). Only names that differ are listed. What the deployment state's `workerNames` and
273
- * `resourceNames` hold (ADR 0193).
272
+ * `gym`). Only names that differ are listed, and no Durable Object class. What the deployment
273
+ * state's `workerNames` and `resourceNames` hold (ADR 0193).
274
274
  */
275
275
  export function clientNameMaps(release, client, manifest) {
276
276
  const rename = (name) => {
@@ -292,7 +292,10 @@ export function clientNameMaps(release, client, manifest) {
292
292
  const map = (names) => Object.fromEntries(names.map((name) => [name, rename(name)]).filter(([from, to]) => from !== to));
293
293
  return {
294
294
  workers: map(manifest.workers.map((w) => w.name)),
295
- resources: map(manifest.resources.map((r) => r.name)),
295
+ // A Durable Object class (`<worker>:<Class>` in the manifest) is not a named resource of the
296
+ // account: it belongs to its Worker, which the workers map renames. Listing it here made the
297
+ // installer refuse the names (`--names`), so no client product could be installed.
298
+ resources: map(manifest.resources.filter((r) => r.type !== "durable_object").map((r) => r.name)),
296
299
  };
297
300
  }
298
301
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composable-os/product",
3
- "version": "0.1.0-beta.14",
3
+ "version": "0.1.0-beta.15",
4
4
  "license": "FSL-1.1-ALv2",
5
5
  "type": "module",
6
6
  "repository": {