@astrale-os/adapter-cloudflare 0.5.0-beta.171 → 0.5.0-beta.172

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.
@@ -281,11 +281,13 @@ class NamespaceDeployment {
281
281
  }
282
282
  /**
283
283
  * Write the summary, then the record whose presence activates the label (AM-131), so an active
284
- * label always has a summary. A summary already there is kept; so is a record of this release.
284
+ * label always has a summary. A record of this release already there is kept; so is a summary,
285
+ * except that it is made to name this script's URL and key when it names another script's.
285
286
  */
286
287
  async activate(keyId) {
287
288
  const { plan } = this;
288
- if ((await this.routing.summary(plan.label)) === undefined) {
289
+ const summary = await this.routing.summary(plan.label);
290
+ if (summary === undefined) {
289
291
  await this.routing.writeSummary({
290
292
  id: plan.label,
291
293
  url: plan.url,
@@ -298,6 +300,12 @@ class NamespaceDeployment {
298
300
  signingKeyId: keyId,
299
301
  });
300
302
  }
303
+ else if (summary.url !== plan.url || summary.signingKeyId !== keyId) {
304
+ // A script deleted outside any retirement leaves its summary naming a key no script holds,
305
+ // which a later deploy and the platform tooling refuse: it follows the script recreated
306
+ // under the label, and keeps the label's activation instant, retention and state.
307
+ await this.routing.writeSummary({ ...summary, url: plan.url, signingKeyId: keyId });
308
+ }
301
309
  const record = await this.routing.activate(plan.record);
302
310
  this.applied();
303
311
  return record;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/adapter-cloudflare",
3
- "version": "0.5.0-beta.171",
3
+ "version": "0.5.0-beta.172",
4
4
  "description": "Deploy an Astrale Domain through Cloudflare Workers",
5
5
  "keywords": [
6
6
  "adapter",
@@ -57,7 +57,7 @@
57
57
  "registry": "https://registry.npmjs.org/"
58
58
  },
59
59
  "dependencies": {
60
- "@astrale-os/sdk": "0.6.0-beta.16",
60
+ "@astrale-os/sdk": "0.6.0-beta.17",
61
61
  "@noble/hashes": "2.3.0",
62
62
  "@restatedev/restate-sdk-cloudflare-workers": "1.17.0",
63
63
  "hono": "^4.6.20",