diff --git a/.changeset/static-sites-from-the-repo.md b/.changeset/static-sites-from-the-repo.md index f79e07a..2ee5cdb 100644 --- a/.changeset/static-sites-from-the-repo.md +++ b/.changeset/static-sites-from-the-repo.md @@ -8,7 +8,7 @@ Static sites served from the repo, in a new `@pdsjs/sites` package. -A site's files are ordinary blobs and a site is one `js.pds.site.deploy` +A site's files are ordinary blobs and a site is one `dev.pdsjs.site.deploy` record holding the path→blob manifest, so a deploy is a stock atproto write: it rides the firehose, survives migration, and lands in backups with everything else. `pdsjs-site deploy ./dist --site home` uploads only the files diff --git a/docs/superpowers/plans/2026-08-06-app-platform-serve-phase-1.md b/docs/superpowers/plans/2026-08-06-app-platform-serve-phase-1.md index ef7f627..7629ac2 100644 --- a/docs/superpowers/plans/2026-08-06-app-platform-serve-phase-1.md +++ b/docs/superpowers/plans/2026-08-06-app-platform-serve-phase-1.md @@ -2,7 +2,7 @@ > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. -**Goal:** Serve static sites from the account repo (blobs + a `js.pds.site.deploy` manifest record) on the deployment's apex and one-label subdomains, via a new `@pdsjs/sites` package and one hostname-dispatch seam in core, with a deploy CLI and an account-UI Sites page. +**Goal:** Serve static sites from the account repo (blobs + a `dev.pdsjs.site.deploy` manifest record) on the deployment's apex and one-label subdomains, via a new `@pdsjs/sites` package and one hostname-dispatch seam in core, with a deploy CLI and an account-UI Sites page. **Architecture:** New workspace package `packages/sites`, workspace-only dependency on `@pdsjs/core`. Core gains `config.siteHandler` / `config.siteBrowser` and one hostname check at the top of `fetch()`; platform packages gate on `PDS_SITE_DOMAIN` and compose the handler from ports. Site content never renders on the PDS origin. diff --git a/docs/superpowers/specs/2026-08-06-app-platform-serve.md b/docs/superpowers/specs/2026-08-06-app-platform-serve.md index 3176562..b0682d1 100644 --- a/docs/superpowers/specs/2026-08-06-app-platform-serve.md +++ b/docs/superpowers/specs/2026-08-06-app-platform-serve.md @@ -11,7 +11,7 @@ fully and sketches the rest so nothing in Serve forecloses them. ## 0. Why this shape - **The repo is the deploy artifact.** A site is ordinary repo data: blobs - uploaded with `com.atproto.repo.uploadBlob`, one `js.pds.site.deploy` record + uploaded with `com.atproto.repo.uploadBlob`, one `dev.pdsjs.site.deploy` record written with `putRecord`. Deploys ride the firehose, survive migration, are covered by backup and CAR export, and need zero new write endpoints or auth surface. The server side of Serve is read-only. @@ -35,7 +35,7 @@ dependencies. packages/sites/src/ index.js re-exports hostname.js hostnameToSite(hostname, siteDomain, apexName) → string|null - lexicons.js js.pds.site.deploy / js.pds.app.manifest / js.pds.app.install + lexicons.js dev.pdsjs.site.deploy / dev.pdsjs.app.manifest / dev.pdsjs.app.install manifest.js loadSite(): record read → decode → base merge → path map (LRU) serve.js path normalization, lookup order, header assembly, MIME table handler.js createSiteHandler(ctx) → (request, url) => Response|null @@ -75,7 +75,7 @@ Defined as plain JSON in `packages/sites/src/lexicons.js`. Record validation fails open for unresolvable collections, so the schemas gate nothing at write time; they exist for the CLI, tooling, and eventual publication. -### `js.pds.site.deploy` — one record per site, rkey = site name +### `dev.pdsjs.site.deploy` — one record per site, rkey = site name The rkey is a lowercase DNS label; it binds the site to `.`, and the configured apex name (default `home`) binds to @@ -89,7 +89,7 @@ the apex. redeploy become orphans and the hourly reaper collects them after 24h. - `fallback`: path served with status 200 for any unmatched request path (SPA client-side routing). -- `base`: `com.atproto.repo.strongRef` to another `js.pds.site.deploy` record +- `base`: `com.atproto.repo.strongRef` to another `dev.pdsjs.site.deploy` record in the same repo whose files merge beneath this record's (this record wins on conflicts). One hop only; a base may not itself have a base. This is the headroom valve for the 1 MB record write cap: one record holds roughly @@ -104,16 +104,16 @@ signal and the recovery path for blobs uploaded with generic tools. header-injection surface, and every other header is either dedicated (`contentType`) or the server's job. -### `js.pds.app.manifest` — published in the developer's repo +### `dev.pdsjs.app.manifest` — published in the developer's repo `name`, `description`, `icon` (image blob), `site` (strongRef to the -`js.pds.site.deploy` record holding the app's frontend), `scopes` (strings in +`dev.pdsjs.site.deploy` record holding the app's frontend), `scopes` (strings in the host's OAuth scope grammar), `primitives` (enum array: serve/grant/query/react/schedule), `external` (boolean: the app talks to services beyond the user's own PDS — surfaced prominently at install), `createdAt`. -### `js.pds.app.install` — written to the user's repo at install (rkey tid) +### `dev.pdsjs.app.install` — written to the user's repo at install (rkey tid) `manifest` (strongRef — the CID pin freezes the reviewed version; a changed manifest requires re-consent), `grantedScopes`, `site` (local site name @@ -140,7 +140,7 @@ Per request, in order: answering OPTIONS with the PDS's permissive CORS headers would advertise PDS-ness on a site origin. 4. **Load the site** (`manifest.js`): `getRecord` on - `at:///js.pds.site.deploy/`; miss → built-in 404 page. Decode + `at:///dev.pdsjs.site.deploy/`; miss → built-in 404 page. Decode the DAG-CBOR, stringify blob CIDs, merge a `base` record if present (refusing a second hop), and build `Map`. The record is re-read every request — it is @@ -309,16 +309,16 @@ Nothing in Serve forecloses these; each attaches at its own seam. live only as scope strings on token rows, so revoking an install means revoking all matching-client tokens; per-app toggles eventually want a grants table keyed by client_id. -- **Query.** `js.pds.query.def` records (collection, filter, sort) +- **Query.** `dev.pdsjs.query.def` records (collection, filter, sort) materialized into DO SQLite by replay plus incremental updates from a new optional `onCommit(evt)` core callback; served at - `GET /xrpc/js.pds.query.run` via a `queryRoutes` route-table option (these + `GET /xrpc/dev.pdsjs.query.run` via a `queryRoutes` route-table option (these are path-routed, so the spaceRoutes shape fits). -- **React.** `js.pds.react.rule` records: collection match → signed webhook +- **React.** `dev.pdsjs.react.rule` records: collection match → signed webhook POST or template-derived record write. Consumes the same `onCommit` tap; retries ride platform alarms. Strictly URL + static headers + payload — never code. -- **Schedule.** `js.pds.schedule.task` records (cron, fetch URL, target +- **Schedule.** `dev.pdsjs.schedule.task` records (cron, fetch URL, target collection); the platform clock (DO alarm / node interval, the hourly-GC precedent) calls an exported `runDueTasks(ctx)`. Core untouched. diff --git a/examples/cloudflare/wrangler.toml b/examples/cloudflare/wrangler.toml index 117b7ec..ef93ef3 100644 --- a/examples/cloudflare/wrangler.toml +++ b/examples/cloudflare/wrangler.toml @@ -31,7 +31,7 @@ id = "your-kv-namespace-id" # [vars] # PDS_ENABLE_SPACES = "true" -# Static sites served from the repo (js.pds.site.deploy records + blobs). +# Static sites served from the repo (dev.pdsjs.site.deploy records + blobs). # PDS_SITE_DOMAIN enables the feature; each site serves at # ., and the site named by PDS_SITE_APEX_NAME (default # "home") serves at the apex. The PDS itself should answer on a hostname diff --git a/packages/core/src/handlers/account.js b/packages/core/src/handlers/account.js index a803f66..2927e5f 100644 --- a/packages/core/src/handlers/account.js +++ b/packages/core/src/handlers/account.js @@ -1462,7 +1462,7 @@ export function createAccountHandlers(ctx) { if (!name) throw new Error('Name the site to delete.'); if (!siteBrowser) throw new Error('Sites are not enabled.'); - const uri = `at://${did}/js.pds.site.deploy/${name}`; + const uri = `at://${did}/dev.pdsjs.site.deploy/${name}`; if (!(await actorStorage.getRecord(uri))) { throw new Error('No such site.'); } diff --git a/packages/deno/src/index.js b/packages/deno/src/index.js index d074395..a2121b8 100644 --- a/packages/deno/src/index.js +++ b/packages/deno/src/index.js @@ -133,7 +133,7 @@ function createWebSocketPort() { * @param {string} [options.password] - Password for createSession * @param {import('@pdsjs/core/ports').LexiconResolverPort} [options.lexiconResolver] - Lexicon resolver for record validation * @param {import('@pdsjs/core/ports').BackupTargetPort} [options.backupTarget] - Where scheduled backups land (createFsBackupTarget from the blobs-fs package, or createS3BackupTarget from blobs-s3). Absent, the backups page reports backups as unavailable. - * @param {string} [options.siteDomain] - Apex domain static sites serve under (js.pds.site.deploy records + blobs). Requires the sites package, an optional peer dependency. + * @param {string} [options.siteDomain] - Apex domain static sites serve under (dev.pdsjs.site.deploy records + blobs). Requires the sites package, an optional peer dependency. * @param {string} [options.siteApexName] - Site name served at the apex (default "home") * @returns {Promise} */ diff --git a/packages/node/src/index.js b/packages/node/src/index.js index 145056a..abb21b8 100644 --- a/packages/node/src/index.js +++ b/packages/node/src/index.js @@ -279,7 +279,7 @@ function deliverOverSmtp({ host, port, from, to, subject, text, html }) { * @param {boolean} [options.spaces] - Enable permissioned data (proposal 0016). * Requires the spaces package to be installed; it is an optional peer dependency. * @param {string} [options.siteDomain] - Apex domain static sites serve under - * (js.pds.site.deploy records + blobs). Requires the sites package, an optional + * (dev.pdsjs.site.deploy records + blobs). Requires the sites package, an optional * peer dependency. The reverse proxy must route the apex and *.domain here, * with a wildcard certificate (DNS-01). * @param {string} [options.siteApexName] - Site name served at the apex (default "home") diff --git a/packages/sites/src/cli.js b/packages/sites/src/cli.js index b873bff..9cc81b6 100644 --- a/packages/sites/src/cli.js +++ b/packages/sites/src/cli.js @@ -15,7 +15,7 @@ function usage() { console.error(`Usage: pdsjs-site deploy --site --pds --handle [--fallback ] Deploys a directory as a static site: files become blobs, the manifest -becomes the js.pds.site.deploy/ record. The app password is read from +becomes the dev.pdsjs.site.deploy/ record. The app password is read from the PDS_APP_PASSWORD environment variable, never from arguments.`); process.exit(2); } diff --git a/packages/sites/src/deploy.js b/packages/sites/src/deploy.js index 0ac040b..d5f7651 100644 --- a/packages/sites/src/deploy.js +++ b/packages/sites/src/deploy.js @@ -69,7 +69,7 @@ export function uploadContentType(path) { * @property {Array<{path: string, cid: string, contentType: string, bytes: Uint8Array}>} uploads * @property {string[]} reused - paths kept from the current deploy * @property {string[]} removed - paths in the current deploy but not local - * @property {Record} record - the new js.pds.site.deploy value, with upload placeholders filled by finishRecord + * @property {Record} record - the new dev.pdsjs.site.deploy value, with upload placeholders filled by finishRecord */ /** diff --git a/packages/sites/src/index.js b/packages/sites/src/index.js index 46709f9..21b2392 100644 --- a/packages/sites/src/index.js +++ b/packages/sites/src/index.js @@ -1,6 +1,6 @@ // @pdsjs/sites - static sites and apps served from the account repo // -// Files are ordinary blobs, a site is one js.pds.site.deploy record, and +// Files are ordinary blobs, a site is one dev.pdsjs.site.deploy record, and // serving happens only on hostnames that are not the PDS hostname. Core // never imports this package; a platform package builds the handler from // ports and passes it as `config.siteHandler`. @@ -9,9 +9,9 @@ export { createSiteBrowser } from './browser.js'; export { createSiteHandler } from './handler.js'; export { hostnameToSite, isValidSiteName } from './hostname.js'; export { - jsPdsAppInstall, - jsPdsAppManifest, - jsPdsSiteDeploy, + devPdsjsAppInstall, + devPdsjsAppManifest, + devPdsjsSiteDeploy, SITE_COLLECTION, siteLexicons, } from './lexicons.js'; diff --git a/packages/sites/src/lexicons.js b/packages/sites/src/lexicons.js index 5f8d61e..2b3a587 100644 --- a/packages/sites/src/lexicons.js +++ b/packages/sites/src/lexicons.js @@ -10,9 +10,9 @@ * label that binds the site to `.`; the deployment's * configured apex name binds to the apex itself. */ -export const jsPdsSiteDeploy = { +export const devPdsjsSiteDeploy = { lexicon: 1, - id: 'js.pds.site.deploy', + id: 'dev.pdsjs.site.deploy', defs: { main: { type: 'record', @@ -38,7 +38,7 @@ export const jsPdsSiteDeploy = { type: 'ref', ref: 'com.atproto.repo.strongRef', description: - "Another js.pds.site.deploy record in this repo whose files merge beneath this record's; this record wins on path conflicts. One hop only: a base may not itself declare a base.", + "Another dev.pdsjs.site.deploy record in this repo whose files merge beneath this record's; this record wins on path conflicts. One hop only: a base may not itself declare a base.", }, createdAt: { type: 'string', format: 'datetime' }, }, @@ -70,9 +70,9 @@ export const jsPdsSiteDeploy = { * the referenced site's blobs into the installer's own repo, so the app * keeps working if the developer's repo disappears. */ -export const jsPdsAppManifest = { +export const devPdsjsAppManifest = { lexicon: 1, - id: 'js.pds.app.manifest', + id: 'dev.pdsjs.app.manifest', defs: { main: { type: 'record', @@ -88,7 +88,7 @@ export const jsPdsAppManifest = { type: 'ref', ref: 'com.atproto.repo.strongRef', description: - "The js.pds.site.deploy record in this repo holding the app's frontend.", + "The dev.pdsjs.site.deploy record in this repo holding the app's frontend.", }, scopes: { type: 'array', @@ -119,9 +119,9 @@ export const jsPdsAppManifest = { * An installed app, written to the installing user's repo. The manifest ref * pins the reviewed version by CID; an updated manifest requires re-consent. */ -export const jsPdsAppInstall = { +export const devPdsjsAppInstall = { lexicon: 1, - id: 'js.pds.app.install', + id: 'dev.pdsjs.app.install', defs: { main: { type: 'record', @@ -134,13 +134,13 @@ export const jsPdsAppInstall = { type: 'ref', ref: 'com.atproto.repo.strongRef', description: - "The developer's js.pds.app.manifest record, pinned by CID.", + "The developer's dev.pdsjs.app.manifest record, pinned by CID.", }, grantedScopes: { type: 'array', items: { type: 'string' } }, site: { type: 'string', description: - "Local site name: the js.pds.site.deploy rkey holding this install's copied frontend.", + "Local site name: the dev.pdsjs.site.deploy rkey holding this install's copied frontend.", }, config: { type: 'unknown', @@ -154,10 +154,10 @@ export const jsPdsAppInstall = { }; /** The collection a site manifest lives in. */ -export const SITE_COLLECTION = 'js.pds.site.deploy'; +export const SITE_COLLECTION = 'dev.pdsjs.site.deploy'; export const siteLexicons = [ - jsPdsSiteDeploy, - jsPdsAppManifest, - jsPdsAppInstall, + devPdsjsSiteDeploy, + devPdsjsAppManifest, + devPdsjsAppInstall, ]; diff --git a/packages/sites/src/manifest.js b/packages/sites/src/manifest.js index 0666a11..cd7718d 100644 --- a/packages/sites/src/manifest.js +++ b/packages/sites/src/manifest.js @@ -1,6 +1,6 @@ // @pdsjs/sites - site manifest loading // -// A site is one js.pds.site.deploy record; this module turns it into a +// A site is one dev.pdsjs.site.deploy record; this module turns it into a // path → file map ready to serve. The record itself is re-read on every // request — it is storage-local and it is the only correct redeploy signal — // but the decoded, merged map is cached keyed by the record CIDs involved, @@ -33,7 +33,7 @@ const CACHE_LIMIT = 32; const cache = new Map(); /** - * Decoded record value for a js.pds.site.deploy record. + * Decoded record value for a dev.pdsjs.site.deploy record. * @typedef {Object} DeployRecordValue * @property {Array<{path?: unknown, blob?: {ref?: Uint8Array|{$link?: unknown}, mimeType?: string, size?: number}, contentType?: unknown, cacheControl?: unknown}>} [files] * @property {unknown} [fallback] @@ -107,7 +107,7 @@ function addFiles(files, value) { /** * Extract the record key from a base strongRef, requiring it to name a - * js.pds.site.deploy record in the same repo. + * dev.pdsjs.site.deploy record in the same repo. * @param {DeployRecordValue} value * @param {string} did * @returns {string|null} diff --git a/packages/sites/test/account-api.test.js b/packages/sites/test/account-api.test.js index f2e4805..197be2e 100644 --- a/packages/sites/test/account-api.test.js +++ b/packages/sites/test/account-api.test.js @@ -19,7 +19,7 @@ const PDS_HOST = 'pds.example.com'; async function fixtures() { const data = new TextEncoder().encode('

hi

'); const value = cborEncodeDagCbor({ - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [ { path: 'index.html', @@ -34,7 +34,7 @@ async function fixtures() { createdAt: '2026-08-06T00:00:00.000Z', }); return { - uri: `at://${DID}/js.pds.site.deploy/home`, + uri: `at://${DID}/dev.pdsjs.site.deploy/home`, cid: cidToString(await createCid(value)), value, }; @@ -180,9 +180,9 @@ describe('/account/api/sites/delete', () => { body: { name: 'home' }, }); expect(status).toBe(200); - expect(deleted).toEqual([`at://${DID}/js.pds.site.deploy/home`]); + expect(deleted).toEqual([`at://${DID}/dev.pdsjs.site.deploy/home`]); expect(commits).toEqual([ - [{ action: 'delete', uri: `at://${DID}/js.pds.site.deploy/home` }], + [{ action: 'delete', uri: `at://${DID}/dev.pdsjs.site.deploy/home` }], ]); expect(reapCount()).toBe(1); }); diff --git a/packages/sites/test/browser.test.js b/packages/sites/test/browser.test.js index 322612a..898fa38 100644 --- a/packages/sites/test/browser.test.js +++ b/packages/sites/test/browser.test.js @@ -29,12 +29,12 @@ async function storageWith(sites) { }); } const value = cborEncodeDagCbor({ - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files, createdAt: site.createdAt ?? '2026-08-06T00:00:00.000Z', }); rows.push({ - uri: `at://${DID}/js.pds.site.deploy/${site.name}`, + uri: `at://${DID}/dev.pdsjs.site.deploy/${site.name}`, cid: cidToString(await createCid(value)), value, }); diff --git a/packages/sites/test/deploy.test.js b/packages/sites/test/deploy.test.js index b1585c3..7621e6f 100644 --- a/packages/sites/test/deploy.test.js +++ b/packages/sites/test/deploy.test.js @@ -47,7 +47,7 @@ describe('planDeploy', () => { expect(plan.reused).toEqual([]); expect(plan.removed).toEqual([]); expect(plan.record).toMatchObject({ - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', fallback: 'index.html', createdAt: '2026-08-06T00:00:00.000Z', }); @@ -157,7 +157,10 @@ describe('planDeploy', () => { }); it('carries an existing base ref through untouched', async () => { - const base = { uri: 'at://did:plc:x/js.pds.site.deploy/assets', cid: 'b1' }; + const base = { + uri: 'at://did:plc:x/dev.pdsjs.site.deploy/assets', + cid: 'b1', + }; const plan = await planDeploy({ site: 'home', files: [{ path: 'index.html', bytes: bytes('hi') }], diff --git a/packages/sites/test/handler.test.js b/packages/sites/test/handler.test.js index 3b22f6f..c9e09b0 100644 --- a/packages/sites/test/handler.test.js +++ b/packages/sites/test/handler.test.js @@ -47,7 +47,7 @@ async function setup(opts = {}) { fileEntries.push(entry); } const record = /** @type {Record} */ ({ - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: fileEntries, createdAt: '2026-08-06T00:00:00.000Z', }); @@ -60,7 +60,7 @@ async function setup(opts = {}) { actorStorage: /** @type {any} */ ({ getRecord: async (/** @type {string} */ uri) => { calls.getRecord++; - return uri === `at://${DID}/js.pds.site.deploy/${siteName}` + return uri === `at://${DID}/dev.pdsjs.site.deploy/${siteName}` ? { cid: recordCid, value: bytes } : null; }, diff --git a/packages/sites/test/manifest.test.js b/packages/sites/test/manifest.test.js index 0a4ea19..242f289 100644 --- a/packages/sites/test/manifest.test.js +++ b/packages/sites/test/manifest.test.js @@ -56,7 +56,7 @@ async function mockStorage(records) { } /** @param {string} name */ -const uri = (name) => `at://${DID}/js.pds.site.deploy/${name}`; +const uri = (name) => `at://${DID}/dev.pdsjs.site.deploy/${name}`; describe('loadSite', () => { beforeEach(() => clearManifestCache()); @@ -71,7 +71,7 @@ describe('loadSite', () => { const css = await blobRef('body{}', 'text/css'); const { storage } = await mockStorage({ [uri('home')]: { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [ { path: 'index.html', blob: stripCidString(index) }, { @@ -106,13 +106,13 @@ describe('loadSite', () => { const index = await blobRef('', 'text/html'); const { storage } = await mockStorage({ [uri('app')]: { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [{ path: 'index.html', blob: stripCidString(index) }], fallback: '/index.html', createdAt: '2026-08-06T00:00:00.000Z', }, [uri('broken')]: { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [{ path: 'index.html', blob: stripCidString(index) }], fallback: 'missing.html', createdAt: '2026-08-06T00:00:00.000Z', @@ -127,7 +127,7 @@ describe('loadSite', () => { const good = await blobRef('ok', 'text/plain'); const { storage } = await mockStorage({ [uri('home')]: { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [ { path: 'good.txt', blob: stripCidString(good) }, { path: '', blob: stripCidString(good) }, @@ -151,7 +151,7 @@ describe('loadSite', () => { const cid = cidToString(await createBlobCid(data)); const { storage } = await mockStorage({ [uri('home')]: { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [ { path: 'index.html', @@ -181,7 +181,7 @@ describe('loadSite', () => { const newIndex = await blobRef('new', 'text/html'); const { storage, encoded } = await mockStorage({ [uri('assets')]: { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [ { path: 'shared.css', blob: stripCidString(shared) }, { path: 'index.html', blob: stripCidString(oldIndex) }, @@ -191,7 +191,7 @@ describe('loadSite', () => { }); const baseCid = encoded.get(uri('assets'))?.cid; const topRecord = { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [{ path: 'index.html', blob: stripCidString(newIndex) }], base: { uri: uri('assets'), cid: baseCid }, createdAt: '2026-08-06T00:00:00.000Z', @@ -212,18 +212,18 @@ describe('loadSite', () => { const file = await blobRef('x', 'text/plain'); const records = /** @type {Record} */ ({}); records[uri('deep')] = { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [{ path: 'a.txt', blob: stripCidString(file) }], createdAt: '2026-08-06T00:00:00.000Z', }; records[uri('mid')] = { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [], base: { uri: uri('deep'), cid: 'bafyfake' }, createdAt: '2026-08-06T00:00:00.000Z', }; records[uri('top')] = { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [], base: { uri: uri('mid'), cid: 'bafyfake' }, createdAt: '2026-08-06T00:00:00.000Z', @@ -238,12 +238,12 @@ describe('loadSite', () => { const v2 = await blobRef('v2', 'text/html'); const { storage, encoded } = await mockStorage({ [uri('assets')]: { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [{ path: 'base.txt', blob: stripCidString(v1) }], createdAt: '2026-08-06T00:00:00.000Z', }, [uri('home')]: { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [{ path: 'index.html', blob: stripCidString(v1) }], base: { uri: uri('assets'), cid: 'bafypin' }, createdAt: '2026-08-06T00:00:00.000Z', @@ -257,7 +257,7 @@ describe('loadSite', () => { // Redeploy the base only; the merged map must rebuild const newBase = { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [{ path: 'base.txt', blob: stripCidString(v2) }], createdAt: '2026-08-06T00:00:00.000Z', }; @@ -276,7 +276,7 @@ describe('loadSite', () => { const file = await blobRef('bytes', 'application/wasm'); const { storage } = await mockStorage({ [uri('home')]: { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [{ path: 'm.wasm', blob: stripCidString(file) }], createdAt: '2026-08-06T00:00:00.000Z', }, diff --git a/packages/sites/test/seam.test.js b/packages/sites/test/seam.test.js index ac4ab28..d99b70d 100644 --- a/packages/sites/test/seam.test.js +++ b/packages/sites/test/seam.test.js @@ -25,7 +25,7 @@ async function siteFixture() { const cidBytes = await createBlobCid(data); const blobCid = cidToString(cidBytes); const record = { - $type: 'js.pds.site.deploy', + $type: 'dev.pdsjs.site.deploy', files: [ { path: 'index.html', @@ -57,7 +57,7 @@ async function makePds(opts = {}) { const fixture = await siteFixture(); const actorStorage = /** @type {any} */ ({ getRecord: async (/** @type {string} */ uri) => - uri === `at://${DID}/js.pds.site.deploy/home` + uri === `at://${DID}/dev.pdsjs.site.deploy/home` ? { cid: fixture.recordCid, value: fixture.recordBytes } : null, getDid: async () => DID,