@monoflake/sdk 2026.1004.6 → 2026.1005.1

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.
@@ -33,7 +33,7 @@ export declare const ROOT_KEY = "state/index.json";
33
33
  * either. The type survives as the one thing that decides the extension: a caller asks for a
34
34
  * `content` object and the table below says that is spelled `json`.
35
35
  */
36
- export declare function artifactAddress(type: ArtifactType, hash: string): string;
36
+ export declare function artifactAddress(type: ArtifactType, cid: string): string;
37
37
  /**
38
38
  * Where an object lives: its content id, fanned out, and nothing else.
39
39
  *
@@ -36,8 +36,8 @@ const ROOT_KEY = "state/index.json";
36
36
  * either. The type survives as the one thing that decides the extension: a caller asks for a
37
37
  * `content` object and the table below says that is spelled `json`.
38
38
  */
39
- function artifactAddress(type, hash) {
40
- return `object/${hash}.${EXTENSION[type]}`;
39
+ function artifactAddress(type, cid) {
40
+ return `object/${cid}.${EXTENSION[type]}`;
41
41
  }
42
42
  /**
43
43
  * Where an object lives: its content id, fanned out, and nothing else.
@@ -71,14 +71,14 @@ function recordKey(resource) {
71
71
  function parseArtifactKey(key) {
72
72
  const match = /^([a-z]+)\/([0-9a-f]+)\.([a-z0-9]+)$/.exec(key);
73
73
  if (!match) return void 0;
74
- const [, type, hash, ext] = match;
75
- if (!type || !hash || !ext) return void 0;
76
- if (!HASH_PATTERN.test(hash)) return void 0;
74
+ const [, type, digest, ext] = match;
75
+ if (!type || !digest || !ext) return void 0;
76
+ if (!HASH_PATTERN.test(digest)) return void 0;
77
77
  if (!ARTIFACT_TYPES.includes(type)) return void 0;
78
78
  if (EXTENSION[type] !== ext) return void 0;
79
79
  return {
80
80
  type,
81
- hash,
81
+ hash: digest,
82
82
  ext
83
83
  };
84
84
  }
@@ -54,8 +54,8 @@ function longEdge(file) {
54
54
  function best(image, want) {
55
55
  const vector = image.variants.find((file) => SCALABLE_MIMES.has(file.mime));
56
56
  if (vector) return vector;
57
- const rungs = [...image.variants].sort((a, b) => longEdge(a) - longEdge(b));
58
- return rungs.find((file) => longEdge(file) >= want) ?? rungs[rungs.length - 1];
57
+ const ordered = image.variants.toSorted((a, b) => longEdge(a) - longEdge(b));
58
+ return ordered.find((file) => longEdge(file) >= want) ?? ordered.at(-1);
59
59
  }
60
60
  /**
61
61
  * What an icon's file is spelled with, keyed by what is in it.
@@ -74,7 +74,6 @@ export declare const URLS: {
74
74
  readonly keeper: 'https://keeper.internal.ixc.one';
75
75
  readonly host: 'http://host:11011';
76
76
  readonly app: 'https://canmi.app';
77
- readonly infra: 'https://ffoni.com';
78
77
  readonly alias: 'https://ill.li';
79
78
  readonly ledger: "https://api.internal.ixc.one/ledger";
80
79
  readonly cron: "https://api.internal.ixc.one/cron";
@@ -164,10 +163,6 @@ export declare const GATEWAY: {
164
163
  readonly deployments: 'ixc.one';
165
164
  readonly alias: 'ill.li';
166
165
  readonly symlink: 'symlink.si';
167
- readonly retired: {
168
- readonly api: 'api.ffoni.com';
169
- readonly cdn: 'cdn.ffoni.com';
170
- };
171
166
  readonly providers: {
172
167
  readonly int: 'our own machines';
173
168
  readonly cf: 'Cloudflare';
@@ -180,9 +175,8 @@ export declare const GATEWAY: {
180
175
  };
181
176
  /**
182
177
  * Every hostname the gateway answers at home, as a certificate and a router name them: a wildcard
183
- * over each zone it owns below the apex, and the two apexes it is. The retired hosts are left out:
184
- * the house never asks them. See infra's spec/architecture/host.md, "The inside side answers the
185
- * internal gateway alone".
178
+ * over each zone it owns below the apex, and the two apexes it is. See infra's
179
+ * spec/architecture/host.md, "The inside side answers the internal gateway alone".
186
180
  */
187
181
  export declare const GATEWAY_HOSTS: readonly string[];
188
182
  /**
package/dist/src/index.js CHANGED
@@ -83,8 +83,8 @@ const API = {
83
83
  public: "https://api.monoflake.com"
84
84
  };
85
85
  /**
86
- * The domains owned here, which the production map below reads rather than spelling twice. `infra`
87
- * is the retired apex api and cdn hung off; `alias` the alias layer's. `app` is the suffix every
86
+ * The domains owned here, which the production map below reads rather than spelling twice.
87
+ * `alias` is the alias layer's. `app` is the suffix every
88
88
  * interface is on behind Access, see spec/architecture/services.md; `panel`, `keeper` and `host`
89
89
  * are infra's, see infra's spec/architecture/host.md; `ledger` is where every service records its
90
90
  * tasks, see ledger.md; `shot` is the public scope a capture's pictures are named under, see
@@ -92,7 +92,6 @@ const API = {
92
92
  */
93
93
  const INTERNAL = {
94
94
  app: "https://canmi.app",
95
- infra: "https://ffoni.com",
96
95
  alias: "https://ill.li",
97
96
  ...INFRA,
98
97
  ledger: `${API.private}/ledger`,
@@ -144,10 +143,6 @@ const GATEWAY = {
144
143
  deployments: "ixc.one",
145
144
  alias: "ill.li",
146
145
  symlink: "symlink.si",
147
- retired: {
148
- api: "api.ffoni.com",
149
- cdn: "cdn.ffoni.com"
150
- },
151
146
  providers: {
152
147
  int: "our own machines",
153
148
  cf: "Cloudflare",
@@ -160,9 +155,8 @@ const GATEWAY = {
160
155
  };
161
156
  /**
162
157
  * Every hostname the gateway answers at home, as a certificate and a router name them: a wildcard
163
- * over each zone it owns below the apex, and the two apexes it is. The retired hosts are left out:
164
- * the house never asks them. See infra's spec/architecture/host.md, "The inside side answers the
165
- * internal gateway alone".
158
+ * over each zone it owns below the apex, and the two apexes it is. See infra's
159
+ * spec/architecture/host.md, "The inside side answers the internal gateway alone".
166
160
  */
167
161
  const GATEWAY_HOSTS = [
168
162
  ...GATEWAY.domains.map((domain) => `*.${domain}`),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoflake/sdk",
3
- "version": "2026.1004.6",
3
+ "version": "2026.1005.1",
4
4
  "description": "Addresses and clients for the platform.",
5
5
  "keywords": [
6
6
  "cloudflare-workers",