@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.
- package/README.md +1 -1
- package/index.js +0 -11
- package/package.json +1 -1
- package/src/pages/debug/db/commits.ts +1 -1
- package/src/pages/debug/gc/blobs.ts +1 -1
- package/src/pages/debug/record.ts +1 -1
- package/src/pages/xrpc/com.atproto.identity.updateHandle.ts +1 -1
- package/src/pages/xrpc/com.atproto.repo.applyWrites.ts +3 -3
- package/src/pages/xrpc/com.atproto.repo.createRecord.ts +5 -5
- package/src/pages/xrpc/com.atproto.repo.deleteRecord.ts +5 -5
- package/src/pages/xrpc/com.atproto.repo.describeRepo.ts +1 -1
- package/src/pages/xrpc/com.atproto.repo.getRecord.ts +1 -1
- package/src/pages/xrpc/com.atproto.repo.listRecords.ts +1 -1
- package/src/pages/xrpc/com.atproto.repo.putRecord.ts +5 -5
- package/src/pages/xrpc/com.atproto.repo.uploadBlob.ts +5 -5
- package/src/pages/xrpc/com.atproto.server.createSession.ts +3 -3
- package/src/pages/xrpc/com.atproto.server.refreshSession.ts +4 -4
- package/src/pages/xrpc/com.atproto.sync.getBlocks.json.ts +2 -2
- package/src/pages/xrpc/com.atproto.sync.getBlocks.ts +3 -3
- package/src/pages/xrpc/com.atproto.sync.getCheckout.json.ts +3 -3
- package/src/pages/xrpc/com.atproto.sync.getCheckout.ts +1 -1
- package/src/pages/xrpc/com.atproto.sync.getHead.ts +1 -1
- package/src/pages/xrpc/com.atproto.sync.getLatestCommit.ts +1 -1
- package/src/pages/xrpc/com.atproto.sync.getRecord.ts +2 -2
- package/src/pages/xrpc/com.atproto.sync.getRepo.json.ts +3 -3
- package/src/pages/xrpc/com.atproto.sync.getRepo.range.ts +1 -1
- package/src/pages/xrpc/com.atproto.sync.getRepo.ts +1 -1
- 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
|
-
-
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import type { APIContext } from 'astro';
|
|
2
|
-
import { RepoManager } from '
|
|
3
|
-
import { readJson } from '
|
|
4
|
-
import { bumpRoot } from '
|
|
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 '
|
|
3
|
-
import { checkRate } from '
|
|
4
|
-
import { readJsonBounded } from '
|
|
5
|
-
import { RepoManager } from '
|
|
6
|
-
import { notifySequencer } from '
|
|
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 '
|
|
3
|
-
import { checkRate } from '
|
|
4
|
-
import { readJsonBounded } from '
|
|
5
|
-
import { RepoManager } from '
|
|
6
|
-
import { notifySequencer } from '
|
|
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 '
|
|
3
|
-
import { checkRate } from '
|
|
4
|
-
import { readJsonBounded } from '
|
|
5
|
-
import { RepoManager } from '
|
|
6
|
-
import { notifySequencer } from '
|
|
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 '
|
|
3
|
-
import { checkRate } from '
|
|
4
|
-
import { isAllowedMime } from '
|
|
5
|
-
import { R2BlobStore } from '
|
|
6
|
-
import { putBlobRef, checkBlobQuota, updateBlobQuota } from '
|
|
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 '
|
|
3
|
-
import { readJson } from '
|
|
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 '
|
|
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 '
|
|
3
|
-
import { bearerToken } from '
|
|
4
|
-
import { lazyCleanupExpiredTokens } from '
|
|
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 '
|
|
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 '
|
|
3
|
-
import { tryParse } from '
|
|
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 '
|
|
3
|
-
import { D1Blockstore } from '
|
|
2
|
+
import { NotFound } from '../../lib/errors';
|
|
3
|
+
import { D1Blockstore } from '../../lib/mst';
|
|
4
4
|
import { CID } from 'multiformats/cid';
|
|
5
|
-
import { encodeExistingBlocksToCAR } from '
|
|
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 '
|
|
3
|
-
import { listRecords as dalListRecords } from '
|
|
4
|
-
import { tryParse } from '
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import type { APIContext } from 'astro';
|
|
2
|
-
import { RepoManager } from '
|
|
3
|
-
import { encodeRecordBlock } from '
|
|
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 '
|
|
3
|
-
import { listRecords as dalListRecords } from '
|
|
4
|
-
import { tryParse } from '
|
|
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
|
|