@mesadev/sdk 0.44.1 → 0.46.0
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 +28 -17
- package/dist/api/access-token.d.ts +6 -47
- package/dist/api/access-token.d.ts.map +1 -1
- package/dist/api/access-token.js +6 -83
- package/dist/api/access-token.js.map +1 -1
- package/dist/api/client.d.ts +1 -1
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/api/repo-tag-filter.d.ts +7 -6
- package/dist/api/repo-tag-filter.d.ts.map +1 -1
- package/dist/api/resources.d.ts +54 -124
- package/dist/api/resources.d.ts.map +1 -1
- package/dist/api/resources.js +50 -80
- package/dist/api/resources.js.map +1 -1
- package/dist/fs/index.d.ts +1 -1
- package/dist/fs/index.d.ts.map +1 -1
- package/dist/fs/index.js.map +1 -1
- package/dist/fs/layout.d.ts +43 -10
- package/dist/fs/layout.d.ts.map +1 -1
- package/dist/fs/layout.js +49 -5
- package/dist/fs/layout.js.map +1 -1
- package/dist/fs/mesa-file-system.d.ts +23 -14
- package/dist/fs/mesa-file-system.d.ts.map +1 -1
- package/dist/fs/mesa-file-system.js +16 -6
- package/dist/fs/mesa-file-system.js.map +1 -1
- package/dist/fs/native-loader.d.ts +37 -8
- package/dist/fs/native-loader.d.ts.map +1 -1
- package/dist/fs/native-loader.js +1 -1
- package/dist/fs/native-loader.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/errors.d.ts +2 -8
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +1 -10
- package/dist/lib/errors.js.map +1 -1
- package/dist/mesa.d.ts +27 -85
- package/dist/mesa.d.ts.map +1 -1
- package/dist/mesa.js +58 -232
- package/dist/mesa.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.d.ts.map +1 -1
- package/dist/webhooks/index.js +1 -1
- package/dist/webhooks/index.js.map +1 -1
- package/dist/webhooks/schemas.d.ts +0 -125
- package/dist/webhooks/schemas.d.ts.map +1 -1
- package/dist/webhooks/schemas.js +4 -4
- package/dist/webhooks/schemas.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -18,22 +18,15 @@ bun add @mesadev/sdk
|
|
|
18
18
|
import { Mesa } from '@mesadev/sdk';
|
|
19
19
|
|
|
20
20
|
const mesa = new Mesa({
|
|
21
|
-
|
|
21
|
+
privateKey: process.env.MESA_PRIVATE_KEY,
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
//
|
|
24
|
+
// The organization comes from the key, so there is nothing to pass.
|
|
25
25
|
const repo = await mesa.repos.create({ name: 'my-repo' });
|
|
26
26
|
|
|
27
|
-
//
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
org: 'acme',
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
await mesaWithOrg.repos.list();
|
|
34
|
-
|
|
35
|
-
// Per-call org override
|
|
36
|
-
await mesa.repos.list({ org: 'other-org' });
|
|
27
|
+
// Somewhere you trust less, use a short-lived token instead of the key.
|
|
28
|
+
const scoped = new Mesa({ auth: { accessToken } });
|
|
29
|
+
await scoped.repos.list();
|
|
37
30
|
|
|
38
31
|
console.log(repo.name);
|
|
39
32
|
```
|
|
@@ -44,14 +37,32 @@ This package exposes org-inferred REST resources under `mesa.*`.
|
|
|
44
37
|
|
|
45
38
|
`Mesa` accepts:
|
|
46
39
|
|
|
47
|
-
- `
|
|
40
|
+
- `privateKey?: string` (falls back to `MESA_PRIVATE_KEY` in Node)
|
|
41
|
+
- `auth?: { privateKey } | { accessToken }`
|
|
48
42
|
- `apiUrl?: string` (defaults to `https://api.mesa.dev/v1`)
|
|
49
|
-
- `vcsUrl?: string` (optional VCS gateway override; only use when self-hosting Mesa)
|
|
50
|
-
- `org?: string` (optional default org; bypasses `/whoami` resolution)
|
|
51
43
|
- `fetch?: typeof fetch`
|
|
52
44
|
- `userAgent?: string`
|
|
53
45
|
- `webhookSecret?: string` (used by `mesa.webhooks.receive(...)`)
|
|
54
46
|
|
|
47
|
+
Pass exactly one of `privateKey` or `auth`. When neither is present, the SDK reads `MESA_PRIVATE_KEY` in Node. Private keys and access tokens already name the organization they belong to, so the client picks it up from the credential.
|
|
48
|
+
|
|
49
|
+
The TypeScript SDK does not accept API keys as client credentials and does not read `MESA_API_KEY`. API keys remain supported by the Mesa CLI and direct backend interfaces.
|
|
50
|
+
|
|
51
|
+
### Scoped access tokens
|
|
52
|
+
|
|
53
|
+
Mint a token in your trusted process and hand only that token to the sandbox or job that needs it:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
const { token } = await mesa.tokens.create({
|
|
57
|
+
authors: [{ name: 'Mesa Bot', email: 'mesa-bot@example.com' }],
|
|
58
|
+
scopes: ['read', 'write'],
|
|
59
|
+
repos: ['acme/agent-workspace'],
|
|
60
|
+
ttl_seconds: 60 * 60, // 1 hour
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
A token signed by a private key lasts 15 minutes by default and can be given up to 4 hours. A client built from an access token cannot mint another token.
|
|
65
|
+
|
|
55
66
|
## Webhook Handlers
|
|
56
67
|
|
|
57
68
|
Register typed handlers with `mesa.webhooks.on(...)` and pass the incoming
|
|
@@ -63,7 +74,7 @@ import { Hono } from 'hono';
|
|
|
63
74
|
import { Mesa } from '@mesadev/sdk';
|
|
64
75
|
|
|
65
76
|
const mesa = new Mesa({
|
|
66
|
-
|
|
77
|
+
privateKey: process.env.MESA_PRIVATE_KEY,
|
|
67
78
|
webhookSecret: process.env.MESA_WEBHOOK_SECRET,
|
|
68
79
|
});
|
|
69
80
|
|
|
@@ -93,5 +104,5 @@ Use `@mesadev/rest` directly, or call the API with your own HTTP client, when yo
|
|
|
93
104
|
If you previously used the older generated `@mesadev/sdk` package:
|
|
94
105
|
|
|
95
106
|
- use `apiUrl` instead of `serverURL`
|
|
96
|
-
-
|
|
107
|
+
- use the organization encoded in the private key or access token
|
|
97
108
|
- use resource namespaces (`mesa.repos`, `mesa.changes`, etc.); install `@mesadev/rest` directly when you need generated REST operations
|
|
@@ -1,34 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Local access-token signing for
|
|
3
|
-
*
|
|
2
|
+
* Local access-token signing for Ed25519 signing private keys. Tokens are
|
|
3
|
+
* produced entirely offline with no network round trip.
|
|
4
4
|
*
|
|
5
5
|
* This is the SDK-side counterpart to the server implementations in
|
|
6
|
-
* `packages/core/src/auth/access-token
|
|
7
|
-
* `
|
|
8
|
-
*
|
|
9
|
-
* `context/auth/signing-key-access-token-protocol.md`. JSON key order does not
|
|
10
|
-
* affect verification; each implementation may emit claims in any order.
|
|
11
|
-
*
|
|
12
|
-
* Secret derivation:
|
|
13
|
-
* secret = base64url_nopad(SHA-256(utf8(raw_api_key)))
|
|
14
|
-
* This is byte-identical to the value stored in the server's `apikey.key`
|
|
15
|
-
* column. The HMAC key is the UTF-8 bytes of this base64url string.
|
|
16
|
-
*
|
|
17
|
-
* Legacy HS256 tokens carry no org or user info. The server derives both from
|
|
18
|
-
* the API key row at verification time and clamps the requested scopes/repos
|
|
19
|
-
* to the key's current permissions. New callers should use canonical
|
|
20
|
-
* `repo_ids`; the backward-compatible `repos` claim carries full `org/repo`
|
|
21
|
-
* names.
|
|
6
|
+
* `packages/core/src/auth/signing-key-access-token.ts`. The wire contract lives
|
|
7
|
+
* in `context/auth/signing-key-access-token-protocol.md`. JSON key order does
|
|
8
|
+
* not affect verification.
|
|
22
9
|
*
|
|
23
10
|
* Implemented with `node:crypto` only so the published SDK retains Node 18
|
|
24
11
|
* support without adding a JWT dependency.
|
|
25
12
|
*/
|
|
26
13
|
import { z } from 'zod';
|
|
27
14
|
import type { PrivateKeyCredential } from './signing-key.js';
|
|
28
|
-
/** Default token lifetime when the caller does not request one. */
|
|
29
|
-
export declare const ACCESS_TOKEN_DEFAULT_TTL_SECONDS: number;
|
|
30
|
-
/** Hard cap on token lifetime; the server rejects anything longer at verify time. */
|
|
31
|
-
export declare const ACCESS_TOKEN_MAX_TTL_SECONDS: number;
|
|
32
15
|
declare const signingKeyAuthorSchema: z.ZodObject<{
|
|
33
16
|
name: z.ZodString;
|
|
34
17
|
email: z.ZodPipe<z.ZodDefault<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null>>;
|
|
@@ -48,18 +31,7 @@ export type RepositoryIdRestriction<NameField extends string = 'repos', IdField
|
|
|
48
31
|
export type RepositoryRestriction<NameField extends string = 'repos', IdField extends string = 'repoIds'> = RepositoryNameRestriction<NameField, IdField> | RepositoryIdRestriction<NameField, IdField>;
|
|
49
32
|
export type OptionalRepositoryRestriction<NameField extends string, IdField extends string> = Partial<RepositoryNameRestriction<NameField, IdField>> | RepositoryIdRestriction<NameField, IdField>;
|
|
50
33
|
export type ApiRepositoryRestriction = OptionalRepositoryRestriction<'repos', 'repo_ids'>;
|
|
51
|
-
|
|
52
|
-
/** The API key ID that signs this token; encoded into the `kid` header. */
|
|
53
|
-
apiKeyId: string;
|
|
54
|
-
/** The raw API key (`mesa_...`) the client holds; the signing secret is derived from it. */
|
|
55
|
-
rawApiKey: string;
|
|
56
|
-
/** Requested scopes; clamped to the key's current scopes at verify time. */
|
|
57
|
-
scopes: string[];
|
|
58
|
-
/** Repository restrictions are supplied by the mutually exclusive `repos` or `repoIds` fields. */
|
|
59
|
-
/** Token lifetime in seconds. Defaults to {@link ACCESS_TOKEN_DEFAULT_TTL_SECONDS}. */
|
|
60
|
-
ttlSeconds?: number;
|
|
61
|
-
};
|
|
62
|
-
export type SignedAccessToken = {
|
|
34
|
+
type SignedAccessToken = {
|
|
63
35
|
token: string;
|
|
64
36
|
/** Exact expiry as an ISO 8601 string. */
|
|
65
37
|
expiresAt: string;
|
|
@@ -83,19 +55,6 @@ type SignPrivateKeyAccessTokenInput = OptionalRepositoryRestriction<'repos', 're
|
|
|
83
55
|
export declare function toSignerRepositoryRestriction(input: ApiRepositoryRestriction): RepositoryRestriction;
|
|
84
56
|
/** Convert signer metadata back to the public snake-case token fields. */
|
|
85
57
|
export declare function toApiRepositoryRestriction(input: Pick<SignedAccessToken, 'repos' | 'repoIds'>): RepositoryRestriction<'repos', 'repo_ids'>;
|
|
86
|
-
/**
|
|
87
|
-
* Derive the HMAC signing secret from a raw API key. Byte-identical to the
|
|
88
|
-
* value stored in the server's `apikey.key` column. The HMAC key is the UTF-8
|
|
89
|
-
* bytes of the returned base64url-nopad string.
|
|
90
|
-
*/
|
|
91
|
-
export declare function deriveAccessTokenSigningSecret(rawApiKey: string): string;
|
|
92
|
-
/**
|
|
93
|
-
* Sign an access token with HS256 entirely client-side. The `iss` claim is the
|
|
94
|
-
* minting API key id (mirrors the `kid` header). JSON key order is not
|
|
95
|
-
* semantically meaningful because the server verifies the signature, not a byte-exact
|
|
96
|
-
* string.
|
|
97
|
-
*/
|
|
98
|
-
export declare function signAccessToken(input: SignAccessTokenInput): SignedAccessToken;
|
|
99
58
|
/** Sign the minimal Ed25519 access-token contract accepted by the server. */
|
|
100
59
|
export declare function signPrivateKeyAccessToken(input: SignPrivateKeyAccessTokenInput): SignedAccessToken;
|
|
101
60
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-token.d.ts","sourceRoot":"","sources":["../../src/api/access-token.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"access-token.d.ts","sourceRoot":"","sources":["../../src/api/access-token.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAgB7D,QAAA,MAAM,sBAAsB;;;iBAiB1B,CAAC;AASH,MAAM,MAAM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EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACxB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC1B,+EAA+E;IAC/E,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,KAAK,8BAA8B,GAAG,6BAA6B,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG;IACxF,UAAU,EAAE,oBAAoB,CAAC;IACjC,OAAO,CAAC,EAAE,SAAS,CAAC,qBAAqB,EAAE,GAAG,qBAAqB,EAAE,CAAC,CAAC;IACvE,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,4EAA4E;AAC5E,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,wBAAwB,GAAG,qBAAqB,CAMpG;AAED,0EAA0E;AAC1E,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAAC,GAClD,qBAAqB,CAAC,OAAO,EAAE,UAAU,CAAC,CAE5C;AAOD,6EAA6E;AAC7E,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,GAAG,iBAAiB,CAoClG"}
|
package/dist/api/access-token.js
CHANGED
|
@@ -1,29 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Local access-token signing for
|
|
3
|
-
*
|
|
2
|
+
* Local access-token signing for Ed25519 signing private keys. Tokens are
|
|
3
|
+
* produced entirely offline with no network round trip.
|
|
4
4
|
*
|
|
5
5
|
* This is the SDK-side counterpart to the server implementations in
|
|
6
|
-
* `packages/core/src/auth/access-token
|
|
7
|
-
* `
|
|
8
|
-
*
|
|
9
|
-
* `context/auth/signing-key-access-token-protocol.md`. JSON key order does not
|
|
10
|
-
* affect verification; each implementation may emit claims in any order.
|
|
11
|
-
*
|
|
12
|
-
* Secret derivation:
|
|
13
|
-
* secret = base64url_nopad(SHA-256(utf8(raw_api_key)))
|
|
14
|
-
* This is byte-identical to the value stored in the server's `apikey.key`
|
|
15
|
-
* column. The HMAC key is the UTF-8 bytes of this base64url string.
|
|
16
|
-
*
|
|
17
|
-
* Legacy HS256 tokens carry no org or user info. The server derives both from
|
|
18
|
-
* the API key row at verification time and clamps the requested scopes/repos
|
|
19
|
-
* to the key's current permissions. New callers should use canonical
|
|
20
|
-
* `repo_ids`; the backward-compatible `repos` claim carries full `org/repo`
|
|
21
|
-
* names.
|
|
6
|
+
* `packages/core/src/auth/signing-key-access-token.ts`. The wire contract lives
|
|
7
|
+
* in `context/auth/signing-key-access-token-protocol.md`. JSON key order does
|
|
8
|
+
* not affect verification.
|
|
22
9
|
*
|
|
23
10
|
* Implemented with `node:crypto` only so the published SDK retains Node 18
|
|
24
11
|
* support without adding a JWT dependency.
|
|
25
12
|
*/
|
|
26
|
-
import {
|
|
13
|
+
import { randomUUID, sign as signEd25519 } from 'node:crypto';
|
|
27
14
|
import { z } from 'zod';
|
|
28
15
|
import { InvalidOptionsError } from '../lib/errors.js';
|
|
29
16
|
import { looksLikePrivateKey } from './credentials.js';
|
|
@@ -33,18 +20,6 @@ import { looksLikePrivateKey } from './credentials.js';
|
|
|
33
20
|
const ACCESS_TOKEN_AUD = 'mesa-api';
|
|
34
21
|
/** JOSE `typ` header (RFC 9068 style) distinguishing access tokens. */
|
|
35
22
|
const ACCESS_TOKEN_TYP = 'mesa-at+jwt';
|
|
36
|
-
/** JWA algorithm: HMAC-SHA256, keyed by the per-key derived secret. */
|
|
37
|
-
const ACCESS_TOKEN_ALG = 'HS256';
|
|
38
|
-
/**
|
|
39
|
-
* Secret-derivation version, encoded into the `kid` header as
|
|
40
|
-
* `<api_key_id>.<version>`. Bump on the server and here together if the
|
|
41
|
-
* derivation ever changes.
|
|
42
|
-
*/
|
|
43
|
-
const ACCESS_TOKEN_DERIVATION_VERSION = 'v1';
|
|
44
|
-
/** Default token lifetime when the caller does not request one. */
|
|
45
|
-
export const ACCESS_TOKEN_DEFAULT_TTL_SECONDS = 60 * 60; // 1 hour
|
|
46
|
-
/** Hard cap on token lifetime; the server rejects anything longer at verify time. */
|
|
47
|
-
export const ACCESS_TOKEN_MAX_TTL_SECONDS = 24 * 60 * 60; // 24 hours
|
|
48
23
|
/** Default and maximum lifetimes accepted by the signing-key verifier. */
|
|
49
24
|
const SIGNING_KEY_ACCESS_TOKEN_DEFAULT_TTL_SECONDS = 15 * 60; // 15 minutes
|
|
50
25
|
const SIGNING_KEY_ACCESS_TOKEN_MAX_TTL_SECONDS = 4 * 60 * 60; // 4 hours
|
|
@@ -122,62 +97,10 @@ export function toSignerRepositoryRestriction(input) {
|
|
|
122
97
|
export function toApiRepositoryRestriction(input) {
|
|
123
98
|
return input.repoIds !== undefined ? { repo_ids: input.repoIds } : { repos: input.repos ?? null };
|
|
124
99
|
}
|
|
125
|
-
/**
|
|
126
|
-
* Derive the HMAC signing secret from a raw API key. Byte-identical to the
|
|
127
|
-
* value stored in the server's `apikey.key` column. The HMAC key is the UTF-8
|
|
128
|
-
* bytes of the returned base64url-nopad string.
|
|
129
|
-
*/
|
|
130
|
-
export function deriveAccessTokenSigningSecret(rawApiKey) {
|
|
131
|
-
return createHash('sha256').update(rawApiKey, 'utf8').digest('base64url');
|
|
132
|
-
}
|
|
133
|
-
/** The `kid` header: `<api_key_id>.<derivation_version>`. */
|
|
134
|
-
function buildKid(apiKeyId) {
|
|
135
|
-
return `${apiKeyId}.${ACCESS_TOKEN_DERIVATION_VERSION}`;
|
|
136
|
-
}
|
|
137
100
|
/** base64url-nopad encode a UTF-8 string. Node's `base64url` is already unpadded. */
|
|
138
101
|
function base64UrlJson(value) {
|
|
139
102
|
return Buffer.from(JSON.stringify(value), 'utf8').toString('base64url');
|
|
140
103
|
}
|
|
141
|
-
/**
|
|
142
|
-
* Sign an access token with HS256 entirely client-side. The `iss` claim is the
|
|
143
|
-
* minting API key id (mirrors the `kid` header). JSON key order is not
|
|
144
|
-
* semantically meaningful because the server verifies the signature, not a byte-exact
|
|
145
|
-
* string.
|
|
146
|
-
*/
|
|
147
|
-
export function signAccessToken(input) {
|
|
148
|
-
const ttlSeconds = input.ttlSeconds ?? ACCESS_TOKEN_DEFAULT_TTL_SECONDS;
|
|
149
|
-
if (!Number.isInteger(ttlSeconds) || ttlSeconds <= 0 || ttlSeconds > ACCESS_TOKEN_MAX_TTL_SECONDS) {
|
|
150
|
-
throw new InvalidOptionsError(`Token TTL must be an integer between 1 and ${ACCESS_TOKEN_MAX_TTL_SECONDS} seconds`);
|
|
151
|
-
}
|
|
152
|
-
const iat = Math.floor(Date.now() / 1000);
|
|
153
|
-
const exp = iat + ttlSeconds;
|
|
154
|
-
const jti = randomUUID();
|
|
155
|
-
if (input.repos !== undefined && input.repoIds !== undefined) {
|
|
156
|
-
throw new InvalidOptionsError('Token repos and repoIds restrictions are mutually exclusive');
|
|
157
|
-
}
|
|
158
|
-
const repoRestriction = input.repoIds !== undefined ? { repo_ids: input.repoIds } : { repos: input.repos ?? null };
|
|
159
|
-
const header = { alg: ACCESS_TOKEN_ALG, typ: ACCESS_TOKEN_TYP, kid: buildKid(input.apiKeyId) };
|
|
160
|
-
const payload = {
|
|
161
|
-
iss: input.apiKeyId,
|
|
162
|
-
aud: ACCESS_TOKEN_AUD,
|
|
163
|
-
scopes: input.scopes,
|
|
164
|
-
...repoRestriction,
|
|
165
|
-
iat,
|
|
166
|
-
exp,
|
|
167
|
-
jti,
|
|
168
|
-
};
|
|
169
|
-
const signingInput = `${base64UrlJson(header)}.${base64UrlJson(payload)}`;
|
|
170
|
-
const secret = deriveAccessTokenSigningSecret(input.rawApiKey);
|
|
171
|
-
const signature = createHmac('sha256', secret).update(signingInput, 'utf8').digest('base64url');
|
|
172
|
-
const token = `${signingInput}.${signature}`;
|
|
173
|
-
return {
|
|
174
|
-
token,
|
|
175
|
-
expiresAt: new Date(exp * 1000).toISOString(),
|
|
176
|
-
scopes: input.scopes,
|
|
177
|
-
...(input.repoIds !== undefined ? { repoIds: input.repoIds } : { repos: input.repos ?? null }),
|
|
178
|
-
jti,
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
104
|
/** Sign the minimal Ed25519 access-token contract accepted by the server. */
|
|
182
105
|
export function signPrivateKeyAccessToken(input) {
|
|
183
106
|
const parsed = signingKeyTokenInputSchema.safeParse(input);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-token.js","sourceRoot":"","sources":["../../src/api/access-token.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"access-token.js","sourceRoot":"","sources":["../../src/api/access-token.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,mFAAmF;AACnF,gFAAgF;AAChF,uDAAuD;AACvD,MAAM,gBAAgB,GAAG,UAAU,CAAC;AACpC,uEAAuE;AACvE,MAAM,gBAAgB,GAAG,aAAa,CAAC;AACvC,0EAA0E;AAC1E,MAAM,4CAA4C,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa;AAC3E,MAAM,wCAAwC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU;AACxE,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAGpC,MAAM,wBAAwB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAA0C,CAAC;AAErG,MAAM,sBAAsB,GAAG,CAAC,CAAC,M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,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,QAAQ,CAC1G,WAAW,CACZ,CAAC;IAEF,OAAO;QACL,KAAK,EAAE,GAAG,YAAY,IAAI,SAAS,EAAE;QACrC,SAAS,EAAE,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;QAC7C,MAAM;QACN,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC;QACnE,GAAG;KACJ,CAAC;AACJ,CAAC"}
|
package/dist/api/client.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type RestDataShape = {
|
|
|
11
11
|
};
|
|
12
12
|
export type RestOperation = (options: never) => Promise<unknown>;
|
|
13
13
|
export type RestRequestOptions<TData extends RestDataShape> = Simplify<Omit<RestOptions<TData, boolean>, 'baseUrl' | 'fetch' | 'headers' | 'responseStyle' | 'throwOnError'>>;
|
|
14
|
-
|
|
14
|
+
type RestClientConfig = {
|
|
15
15
|
/** Bearer credential, or a local signer that returns one for each request. */
|
|
16
16
|
credential: string | (() => string);
|
|
17
17
|
apiUrl: string;
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,IAAI,WAAW,EAAmB,KAAK,cAAc,EAAU,MAAM,eAAe,CAAC;AAM1G,KAAK,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,EAAE,CAAC;AAEjD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,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AE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAOF,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,CAAC,KAAK,SAAS,aAAa,EAAE,OAAO,EAC1C,SAAS,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,EACnC,kBAAkB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;CACnC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,CA+CrE"}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type
|
|
1
|
+
export { type TokensCreateAuthor, type TokensCreateInput, type TokensCreatePrivateKeyInput, type TokensCreateResponse, } from './resources.js';
|
|
2
2
|
export { type RepoTagFilter, type RepoTagValueFilter } from './repo-tag-filter.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/api/index.js
CHANGED
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAA+C,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type RepoTagEqFilter = {
|
|
2
2
|
$eq: string;
|
|
3
3
|
$in?: never;
|
|
4
4
|
$contains?: never;
|
|
@@ -6,7 +6,7 @@ export type RepoTagEqFilter = {
|
|
|
6
6
|
$ends_with?: never;
|
|
7
7
|
$exists?: never;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type RepoTagInFilter = {
|
|
10
10
|
$eq?: never;
|
|
11
11
|
$in: string[];
|
|
12
12
|
$contains?: never;
|
|
@@ -14,7 +14,7 @@ export type RepoTagInFilter = {
|
|
|
14
14
|
$ends_with?: never;
|
|
15
15
|
$exists?: never;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type RepoTagContainsFilter = {
|
|
18
18
|
$eq?: never;
|
|
19
19
|
$in?: never;
|
|
20
20
|
$contains: string;
|
|
@@ -22,7 +22,7 @@ export type RepoTagContainsFilter = {
|
|
|
22
22
|
$ends_with?: never;
|
|
23
23
|
$exists?: never;
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
type RepoTagStartsWithFilter = {
|
|
26
26
|
$eq?: never;
|
|
27
27
|
$in?: never;
|
|
28
28
|
$contains?: never;
|
|
@@ -30,7 +30,7 @@ export type RepoTagStartsWithFilter = {
|
|
|
30
30
|
$ends_with?: never;
|
|
31
31
|
$exists?: never;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
type RepoTagEndsWithFilter = {
|
|
34
34
|
$eq?: never;
|
|
35
35
|
$in?: never;
|
|
36
36
|
$contains?: never;
|
|
@@ -38,7 +38,7 @@ export type RepoTagEndsWithFilter = {
|
|
|
38
38
|
$ends_with: string;
|
|
39
39
|
$exists?: never;
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
type RepoTagExistsFilter = {
|
|
42
42
|
$eq?: never;
|
|
43
43
|
$in?: never;
|
|
44
44
|
$contains?: never;
|
|
@@ -54,4 +54,5 @@ export type RepoTagFilter = {
|
|
|
54
54
|
[tagKey: string]: RepoTagValueFilter | RepoTagFilter | RepoTagFilter[] | undefined;
|
|
55
55
|
};
|
|
56
56
|
export declare function serializeRepoTagsFilter(tags: RepoTagFilter | string | undefined): string | undefined;
|
|
57
|
+
export {};
|
|
57
58
|
//# sourceMappingURL=repo-tag-filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo-tag-filter.d.ts","sourceRoot":"","sources":["../../src/api/repo-tag-filter.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"repo-tag-filter.d.ts","sourceRoot":"","sources":["../../src/api/repo-tag-filter.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF,KAAK,qBAAqB,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