@alteran/astro 0.1.3 → 0.1.4

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.
Files changed (28) hide show
  1. package/README.md +1 -1
  2. package/index.js +0 -11
  3. package/package.json +1 -1
  4. package/src/pages/debug/db/commits.ts +1 -1
  5. package/src/pages/debug/gc/blobs.ts +1 -1
  6. package/src/pages/debug/record.ts +1 -1
  7. package/src/pages/xrpc/com.atproto.identity.updateHandle.ts +1 -1
  8. package/src/pages/xrpc/com.atproto.repo.applyWrites.ts +3 -3
  9. package/src/pages/xrpc/com.atproto.repo.createRecord.ts +5 -5
  10. package/src/pages/xrpc/com.atproto.repo.deleteRecord.ts +5 -5
  11. package/src/pages/xrpc/com.atproto.repo.describeRepo.ts +1 -1
  12. package/src/pages/xrpc/com.atproto.repo.getRecord.ts +1 -1
  13. package/src/pages/xrpc/com.atproto.repo.listRecords.ts +1 -1
  14. package/src/pages/xrpc/com.atproto.repo.putRecord.ts +5 -5
  15. package/src/pages/xrpc/com.atproto.repo.uploadBlob.ts +5 -5
  16. package/src/pages/xrpc/com.atproto.server.createSession.ts +3 -3
  17. package/src/pages/xrpc/com.atproto.server.refreshSession.ts +4 -4
  18. package/src/pages/xrpc/com.atproto.sync.getBlocks.json.ts +2 -2
  19. package/src/pages/xrpc/com.atproto.sync.getBlocks.ts +3 -3
  20. package/src/pages/xrpc/com.atproto.sync.getCheckout.json.ts +3 -3
  21. package/src/pages/xrpc/com.atproto.sync.getCheckout.ts +1 -1
  22. package/src/pages/xrpc/com.atproto.sync.getHead.ts +1 -1
  23. package/src/pages/xrpc/com.atproto.sync.getLatestCommit.ts +1 -1
  24. package/src/pages/xrpc/com.atproto.sync.getRecord.ts +2 -2
  25. package/src/pages/xrpc/com.atproto.sync.getRepo.json.ts +3 -3
  26. package/src/pages/xrpc/com.atproto.sync.getRepo.range.ts +1 -1
  27. package/src/pages/xrpc/com.atproto.sync.getRepo.ts +1 -1
  28. package/src/pages/xrpc/com.atproto.sync.listBlobs.ts +1 -1
package/README.md CHANGED
@@ -32,7 +32,7 @@ alteran({
32
32
  ```
33
33
 
34
34
  The integration automatically:
35
- - Adds a Vite alias of `@alteran/*` that points to the package runtime
35
+ - Resolves all injected routes against the packaged runtime without requiring a Vite alias
36
36
  - Registers the middleware that applies structured logging and CORS enforcement
37
37
  - Injects all PDS HTTP endpoints into the host project
38
38
  - Sets `build.serverEntry` to the packaged Cloudflare worker (unless you opt out)
package/index.js CHANGED
@@ -59,7 +59,6 @@ export default function alteran(options = {}) {
59
59
  injectServerEntry = true,
60
60
  } = options;
61
61
 
62
- const aliasTarget = resolvePackagePath('./src');
63
62
  const middlewareEntrypoint = resolvePackagePath('./src/middleware.ts');
64
63
  const serverEntrypoint = resolvePackagePath('./src/_worker.ts');
65
64
 
@@ -79,16 +78,6 @@ export default function alteran(options = {}) {
79
78
  updateConfig({ output: 'server' });
80
79
  }
81
80
 
82
- updateConfig({
83
- vite: {
84
- resolve: {
85
- alias: {
86
- '@alteran': aliasTarget,
87
- },
88
- },
89
- },
90
- });
91
-
92
81
  if (injectServerEntry) {
93
82
  if (config.build?.serverEntry && config.build.serverEntry !== serverEntrypoint) {
94
83
  logger.info(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alteran/astro",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Astro integration for running a Cloudflare-hosted Bluesky PDS with Alteran.",
5
5
  "module": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  import type { APIContext } from 'astro';
2
2
  import { drizzle } from 'drizzle-orm/d1';
3
- import { commit_log } from '@alteran/db/schema';
3
+ import { commit_log } from '../../../db/schema';
4
4
  import { desc } from 'drizzle-orm';
5
5
 
6
6
  export const prerender = false;
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { listOrphanBlobKeys, deleteBlobByKey } from '@alteran/db/dal';
2
+ import { listOrphanBlobKeys, deleteBlobByKey } from '../../../db/dal';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { getRecord as dalGetRecord, putRecord as dalPutRecord } from '@alteran/db/dal';
2
+ import { getRecord as dalGetRecord, putRecord as dalPutRecord } from '../../db/dal';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { readJson } from '@alteran/lib/util';
2
+ import { readJson } from '../../lib/util';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,7 +1,7 @@
1
1
  import type { APIContext } from 'astro';
2
- import { RepoManager } from '@alteran/services/repo-manager';
3
- import { readJson } from '@alteran/lib/util';
4
- import { bumpRoot } from '@alteran/db/repo';
2
+ import { RepoManager } from '../../services/repo-manager';
3
+ import { readJson } from '../../lib/util';
4
+ import { bumpRoot } from '../../db/repo';
5
5
 
6
6
  export const prerender = false;
7
7
 
@@ -1,9 +1,9 @@
1
1
  import type { APIContext } from 'astro';
2
- import { isAuthorized, unauthorized } from '@alteran/lib/auth';
3
- import { checkRate } from '@alteran/lib/ratelimit';
4
- import { readJsonBounded } from '@alteran/lib/util';
5
- import { RepoManager } from '@alteran/services/repo-manager';
6
- import { notifySequencer } from '@alteran/lib/sequencer';
2
+ import { isAuthorized, unauthorized } from '../../lib/auth';
3
+ import { checkRate } from '../../lib/ratelimit';
4
+ import { readJsonBounded } from '../../lib/util';
5
+ import { RepoManager } from '../../services/repo-manager';
6
+ import { notifySequencer } from '../../lib/sequencer';
7
7
 
8
8
  export const prerender = false;
9
9
 
@@ -1,9 +1,9 @@
1
1
  import type { APIContext } from 'astro';
2
- import { isAuthorized, unauthorized } from '@alteran/lib/auth';
3
- import { checkRate } from '@alteran/lib/ratelimit';
4
- import { readJsonBounded } from '@alteran/lib/util';
5
- import { RepoManager } from '@alteran/services/repo-manager';
6
- import { notifySequencer } from '@alteran/lib/sequencer';
2
+ import { isAuthorized, unauthorized } from '../../lib/auth';
3
+ import { checkRate } from '../../lib/ratelimit';
4
+ import { readJsonBounded } from '../../lib/util';
5
+ import { RepoManager } from '../../services/repo-manager';
6
+ import { notifySequencer } from '../../lib/sequencer';
7
7
 
8
8
  export const prerender = false;
9
9
 
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { getRoot } from '@alteran/db/repo';
2
+ import { getRoot } from '../../db/repo';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { getRecord as dalGetRecord } from '@alteran/db/dal';
2
+ import { getRecord as dalGetRecord } from '../../db/dal';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { RepoManager } from '@alteran/services/repo-manager';
2
+ import { RepoManager } from '../../services/repo-manager';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,9 +1,9 @@
1
1
  import type { APIContext } from 'astro';
2
- import { isAuthorized, unauthorized } from '@alteran/lib/auth';
3
- import { checkRate } from '@alteran/lib/ratelimit';
4
- import { readJsonBounded } from '@alteran/lib/util';
5
- import { RepoManager } from '@alteran/services/repo-manager';
6
- import { notifySequencer } from '@alteran/lib/sequencer';
2
+ import { isAuthorized, unauthorized } from '../../lib/auth';
3
+ import { checkRate } from '../../lib/ratelimit';
4
+ import { readJsonBounded } from '../../lib/util';
5
+ import { RepoManager } from '../../services/repo-manager';
6
+ import { notifySequencer } from '../../lib/sequencer';
7
7
 
8
8
  export const prerender = false;
9
9
 
@@ -1,9 +1,9 @@
1
1
  import type { APIContext } from 'astro';
2
- import { isAuthorized, unauthorized } from '@alteran/lib/auth';
3
- import { checkRate } from '@alteran/lib/ratelimit';
4
- import { isAllowedMime } from '@alteran/lib/util';
5
- import { R2BlobStore } from '@alteran/services/r2-blob-store';
6
- import { putBlobRef, checkBlobQuota, updateBlobQuota } from '@alteran/db/dal';
2
+ import { isAuthorized, unauthorized } from '../../lib/auth';
3
+ import { checkRate } from '../../lib/ratelimit';
4
+ import { isAllowedMime } from '../../lib/util';
5
+ import { R2BlobStore } from '../../services/r2-blob-store';
6
+ import { putBlobRef, checkBlobQuota, updateBlobQuota } from '../../db/dal';
7
7
 
8
8
  export const prerender = false;
9
9
 
@@ -1,8 +1,8 @@
1
1
  import type { APIContext } from 'astro';
2
- import { signJwt } from '@alteran/lib/jwt';
3
- import { readJson } from '@alteran/lib/util';
2
+ import { signJwt } from '../../lib/jwt';
3
+ import { readJson } from '../../lib/util';
4
4
  import { drizzle } from 'drizzle-orm/d1';
5
- import { login_attempts } from '@alteran/db/schema';
5
+ import { login_attempts } from '../../db/schema';
6
6
  import { eq } from 'drizzle-orm';
7
7
 
8
8
  export const prerender = false;
@@ -1,9 +1,9 @@
1
1
  import type { APIContext } from 'astro';
2
- import { signJwt, verifyJwt } from '@alteran/lib/jwt';
3
- import { bearerToken } from '@alteran/lib/util';
4
- import { lazyCleanupExpiredTokens } from '@alteran/lib/token-cleanup';
2
+ import { signJwt, verifyJwt } from '../../lib/jwt';
3
+ import { bearerToken } from '../../lib/util';
4
+ import { lazyCleanupExpiredTokens } from '../../lib/token-cleanup';
5
5
  import { drizzle } from 'drizzle-orm/d1';
6
- import { token_revocation } from '@alteran/db/schema';
6
+ import { token_revocation } from '../../db/schema';
7
7
  import { eq } from 'drizzle-orm';
8
8
 
9
9
  export const prerender = false;
@@ -1,6 +1,6 @@
1
1
  import type { APIContext } from 'astro';
2
- import { getRecordsByCids as dalGetByCids } from '@alteran/db/dal';
3
- import { tryParse } from '@alteran/lib/util';
2
+ import { getRecordsByCids as dalGetByCids } from '../../db/dal';
3
+ import { tryParse } from '../../lib/util';
4
4
 
5
5
  export const prerender = false;
6
6
 
@@ -1,8 +1,8 @@
1
1
  import type { APIContext } from 'astro';
2
- import { NotFound } from '@alteran/lib/errors';
3
- import { D1Blockstore } from '@alteran/lib/mst';
2
+ import { NotFound } from '../../lib/errors';
3
+ import { D1Blockstore } from '../../lib/mst';
4
4
  import { CID } from 'multiformats/cid';
5
- import { encodeExistingBlocksToCAR } from '@alteran/services/car';
5
+ import { encodeExistingBlocksToCAR } from '../../services/car';
6
6
 
7
7
  export const prerender = false;
8
8
 
@@ -1,7 +1,7 @@
1
1
  import type { APIContext } from 'astro';
2
- import { getRoot as getRepoRoot } from '@alteran/db/repo';
3
- import { listRecords as dalListRecords } from '@alteran/db/dal';
4
- import { tryParse } from '@alteran/lib/util';
2
+ import { getRoot as getRepoRoot } from '../../db/repo';
3
+ import { listRecords as dalListRecords } from '../../db/dal';
4
+ import { tryParse } from '../../lib/util';
5
5
 
6
6
  export const prerender = false;
7
7
 
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { buildRepoCar, buildRepoCarRange } from '@alteran/services/car';
2
+ import { buildRepoCar, buildRepoCarRange } from '../../services/car';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { getRoot as getRepoRoot } from '@alteran/db/repo';
2
+ import { getRoot as getRepoRoot } from '../../db/repo';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { getRoot } from '@alteran/db/repo';
2
+ import { getRoot } from '../../db/repo';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,6 +1,6 @@
1
1
  import type { APIContext } from 'astro';
2
- import { RepoManager } from '@alteran/services/repo-manager';
3
- import { encodeRecordBlock } from '@alteran/services/car';
2
+ import { RepoManager } from '../../services/repo-manager';
3
+ import { encodeRecordBlock } from '../../services/car';
4
4
  import * as dagCbor from '@ipld/dag-cbor';
5
5
  import { CID } from 'multiformats/cid';
6
6
  import { sha256 } from 'multiformats/hashes/sha2';
@@ -1,7 +1,7 @@
1
1
  import type { APIContext } from 'astro';
2
- import { getRoot as getRepoRoot } from '@alteran/db/repo';
3
- import { listRecords as dalListRecords } from '@alteran/db/dal';
4
- import { tryParse } from '@alteran/lib/util';
2
+ import { getRoot as getRepoRoot } from '../../db/repo';
3
+ import { listRecords as dalListRecords } from '../../db/dal';
4
+ import { tryParse } from '../../lib/util';
5
5
 
6
6
  export const prerender = false;
7
7
 
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { buildRepoCarRange } from '@alteran/services/car';
2
+ import { buildRepoCarRange } from '../../services/car';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,5 +1,5 @@
1
1
  import type { APIContext } from 'astro';
2
- import { buildRepoCar } from '@alteran/services/car';
2
+ import { buildRepoCar } from '../../services/car';
3
3
 
4
4
  export const prerender = false;
5
5
 
@@ -1,6 +1,6 @@
1
1
  import type { APIContext } from 'astro';
2
2
  import { drizzle } from 'drizzle-orm/d1';
3
- import { blob_ref } from '@alteran/db/schema';
3
+ import { blob_ref } from '../../db/schema';
4
4
  import { eq, gt, and } from 'drizzle-orm';
5
5
 
6
6
  export const prerender = false;