@mesadev/sdk 0.0.2
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/dist/client.d.ts +18 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/commit-builder.d.ts +26 -0
- package/dist/commit-builder.d.ts.map +1 -0
- package/dist/errors.d.ts +14 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +365 -0
- package/dist/repo.d.ts +38 -0
- package/dist/repo.d.ts.map +1 -0
- package/dist/src/client.d.ts +18 -0
- package/dist/src/client.d.ts.map +1 -0
- package/dist/src/commit-builder.d.ts +26 -0
- package/dist/src/commit-builder.d.ts.map +1 -0
- package/dist/src/errors.d.ts +14 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/index.d.ts +38 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/repo.d.ts +38 -0
- package/dist/src/repo.d.ts.map +1 -0
- package/dist/src/types.d.ts +91 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/tests/test-utils.d.ts +127 -0
- package/dist/tests/test-utils.d.ts.map +1 -0
- package/dist/tests/unit/client.test.d.ts +2 -0
- package/dist/tests/unit/client.test.d.ts.map +1 -0
- package/dist/tests/unit/commit-builder.test.d.ts +2 -0
- package/dist/tests/unit/commit-builder.test.d.ts.map +1 -0
- package/dist/tests/unit/repo.test.d.ts +2 -0
- package/dist/tests/unit/repo.test.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +91 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +48 -0
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Repo } from './repo';
|
|
2
|
+
import type { ApiKeyInfo, CreateApiKeyOptions, CreateRepoOptions, DepotConfig } from './types';
|
|
3
|
+
export declare class DepotClient {
|
|
4
|
+
private apiKey;
|
|
5
|
+
private baseUrl;
|
|
6
|
+
constructor(config: DepotConfig);
|
|
7
|
+
private request;
|
|
8
|
+
createRepo(options: CreateRepoOptions): Promise<Repo>;
|
|
9
|
+
getRepo(name: string): Promise<Repo>;
|
|
10
|
+
listRepos(): Promise<Repo[]>;
|
|
11
|
+
deleteRepo(name: string): Promise<void>;
|
|
12
|
+
createApiKey(options?: CreateApiKeyOptions): Promise<ApiKeyInfo>;
|
|
13
|
+
listApiKeys(): Promise<ApiKeyInfo[]>;
|
|
14
|
+
revokeApiKey(keyId: string): Promise<void>;
|
|
15
|
+
_request<T>(path: string, options?: RequestInit): Promise<T>;
|
|
16
|
+
getCloneUrl(orgName: string, repoName: string): string;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,WAAW,EAAY,MAAM,SAAS,CAAC;AAIzG,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;gBAEZ,MAAM,EAAE,WAAW;YAKjB,OAAO;IA+Bf,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBrD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBpC,SAAS,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAyB5B,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOvC,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,UAAU,CAAC;IA2BpE,WAAW,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAwBpC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOhD,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhE,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;CAIvD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DepotClient } from './client';
|
|
2
|
+
import type { CreateCommitOptions } from './types';
|
|
3
|
+
export declare class CommitBuilder {
|
|
4
|
+
private client;
|
|
5
|
+
private repoName;
|
|
6
|
+
private options;
|
|
7
|
+
private files;
|
|
8
|
+
constructor(client: DepotClient, repoName: string, options: CreateCommitOptions);
|
|
9
|
+
/**
|
|
10
|
+
* Add or update a file in the commit
|
|
11
|
+
*/
|
|
12
|
+
addFile(path: string, content: string | Buffer): this;
|
|
13
|
+
/**
|
|
14
|
+
* Delete a file in the commit
|
|
15
|
+
*/
|
|
16
|
+
deleteFile(path: string): this;
|
|
17
|
+
/**
|
|
18
|
+
* Send the commit to the server
|
|
19
|
+
*/
|
|
20
|
+
send(): Promise<{
|
|
21
|
+
sha: string;
|
|
22
|
+
branch: string;
|
|
23
|
+
message: string;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=commit-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-builder.d.ts","sourceRoot":"","sources":["../src/commit-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAgB,mBAAmB,EAAc,MAAM,SAAS,CAAC;AAa7E,qBAAa,aAAa;IAItB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,OAAO;IALjB,OAAO,CAAC,KAAK,CAAmB;gBAGtB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,mBAAmB;IAGtC;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAiBrD;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAQ9B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAkBxE"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ErrorCode = 'UNAUTHORIZED' | 'FORBIDDEN' | 'REPO_NOT_FOUND' | 'REF_NOT_FOUND' | 'FILE_NOT_FOUND' | 'ORG_NOT_FOUND' | 'REPO_EXISTS' | 'BRANCH_EXISTS' | 'QUOTA_EXCEEDED' | 'INVALID_REPO_NAME' | 'INVALID_REQUEST' | 'PATH_TRAVERSAL' | 'PUSH_REJECTED' | 'INTERNAL_ERROR' | 'NETWORK_ERROR';
|
|
2
|
+
export declare class DepotError extends Error {
|
|
3
|
+
code: ErrorCode;
|
|
4
|
+
details?: Record<string, unknown> | undefined;
|
|
5
|
+
constructor(code: ErrorCode, message: string, details?: Record<string, unknown> | undefined);
|
|
6
|
+
static fromResponse(body: {
|
|
7
|
+
error: {
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
details?: Record<string, unknown>;
|
|
11
|
+
};
|
|
12
|
+
}): DepotError;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,eAAe,CAAC;AAEpB,qBAAa,UAAW,SAAQ,KAAK;IAE1B,IAAI,EAAE,SAAS;IAEf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjC,IAAI,EAAE,SAAS,EACtB,OAAO,EAAE,MAAM,EACR,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;IAM1C,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE;QACxB,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;SAAE,CAAC;KAC7E,GAAG,UAAU;CAGf"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export { DepotClient } from './client';
|
|
2
|
+
export { CommitBuilder } from './commit-builder';
|
|
3
|
+
export { DepotError, type ErrorCode } from './errors';
|
|
4
|
+
export { Repo } from './repo';
|
|
5
|
+
export type * from './types';
|
|
6
|
+
import { DepotClient } from './client';
|
|
7
|
+
import type { DepotConfig } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* Create a new Depot client
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { createDepot } from '@mesa/depot-sdk';
|
|
14
|
+
*
|
|
15
|
+
* const depot = createDepot({
|
|
16
|
+
* apiKey: process.env.DEPOT_API_KEY,
|
|
17
|
+
* baseUrl: 'https://depot.mesa.dev', // Optional
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // Create a repo
|
|
21
|
+
* const repo = await depot.createRepo({ name: 'my-app' });
|
|
22
|
+
*
|
|
23
|
+
* // Create a commit
|
|
24
|
+
* const result = await repo
|
|
25
|
+
* .createCommit({
|
|
26
|
+
* branch: 'main',
|
|
27
|
+
* message: 'Initial commit',
|
|
28
|
+
* author: { name: 'Bot', email: 'bot@example.com' },
|
|
29
|
+
* })
|
|
30
|
+
* .addFile('README.md', '# My App')
|
|
31
|
+
* .addFile('package.json', JSON.stringify({ name: 'my-app' }, null, 2))
|
|
32
|
+
* .send();
|
|
33
|
+
*
|
|
34
|
+
* console.log(result.sha);
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const createDepot: (config: DepotConfig) => DepotClient;
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,mBAAmB,SAAS,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,WAAW,WAAY,WAAW,KAAG,WAEjD,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, {
|
|
5
|
+
get: all[name],
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
set: (newValue) => all[name] = () => newValue
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
12
|
+
|
|
13
|
+
// src/errors.ts
|
|
14
|
+
var exports_errors = {};
|
|
15
|
+
__export(exports_errors, {
|
|
16
|
+
DepotError: () => DepotError
|
|
17
|
+
});
|
|
18
|
+
var DepotError;
|
|
19
|
+
var init_errors = __esm(() => {
|
|
20
|
+
DepotError = class DepotError extends Error {
|
|
21
|
+
code;
|
|
22
|
+
details;
|
|
23
|
+
constructor(code, message, details) {
|
|
24
|
+
super(message);
|
|
25
|
+
this.code = code;
|
|
26
|
+
this.details = details;
|
|
27
|
+
this.name = "DepotError";
|
|
28
|
+
}
|
|
29
|
+
static fromResponse(body) {
|
|
30
|
+
return new DepotError(body.error.code, body.error.message, body.error.details);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// src/client.ts
|
|
36
|
+
init_errors();
|
|
37
|
+
|
|
38
|
+
// src/commit-builder.ts
|
|
39
|
+
class CommitBuilder {
|
|
40
|
+
client;
|
|
41
|
+
repoName;
|
|
42
|
+
options;
|
|
43
|
+
files = [];
|
|
44
|
+
constructor(client, repoName, options) {
|
|
45
|
+
this.client = client;
|
|
46
|
+
this.repoName = repoName;
|
|
47
|
+
this.options = options;
|
|
48
|
+
}
|
|
49
|
+
addFile(path, content) {
|
|
50
|
+
if (Buffer.isBuffer(content)) {
|
|
51
|
+
this.files.push({
|
|
52
|
+
path,
|
|
53
|
+
content: content.toString("base64"),
|
|
54
|
+
encoding: "base64"
|
|
55
|
+
});
|
|
56
|
+
} else {
|
|
57
|
+
this.files.push({
|
|
58
|
+
path,
|
|
59
|
+
content,
|
|
60
|
+
encoding: "utf-8"
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
deleteFile(path) {
|
|
66
|
+
this.files.push({
|
|
67
|
+
path,
|
|
68
|
+
action: "delete"
|
|
69
|
+
});
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
async send() {
|
|
73
|
+
const response = await this.client._request(`/api/v1/repos/${encodeURIComponent(this.repoName)}/commits`, {
|
|
74
|
+
method: "POST",
|
|
75
|
+
body: JSON.stringify({
|
|
76
|
+
branch: this.options.branch,
|
|
77
|
+
message: this.options.message,
|
|
78
|
+
author: this.options.author,
|
|
79
|
+
base_sha: this.options.baseSha,
|
|
80
|
+
files: this.files
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
return response;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// src/repo.ts
|
|
88
|
+
class Repo {
|
|
89
|
+
client;
|
|
90
|
+
info;
|
|
91
|
+
constructor(client, info) {
|
|
92
|
+
this.client = client;
|
|
93
|
+
this.info = info;
|
|
94
|
+
}
|
|
95
|
+
get id() {
|
|
96
|
+
return this.info.id;
|
|
97
|
+
}
|
|
98
|
+
get name() {
|
|
99
|
+
return this.info.name;
|
|
100
|
+
}
|
|
101
|
+
get defaultBranch() {
|
|
102
|
+
return this.info.defaultBranch;
|
|
103
|
+
}
|
|
104
|
+
get sizeBytes() {
|
|
105
|
+
return this.info.sizeBytes;
|
|
106
|
+
}
|
|
107
|
+
get lastPushAt() {
|
|
108
|
+
return this.info.lastPushAt;
|
|
109
|
+
}
|
|
110
|
+
get createdAt() {
|
|
111
|
+
return this.info.createdAt;
|
|
112
|
+
}
|
|
113
|
+
createCommit(options) {
|
|
114
|
+
return new CommitBuilder(this.client, this.name, options);
|
|
115
|
+
}
|
|
116
|
+
getCloneUrl(orgName) {
|
|
117
|
+
return this.client.getCloneUrl(orgName, this.name);
|
|
118
|
+
}
|
|
119
|
+
async listFiles(options = {}) {
|
|
120
|
+
const params = new URLSearchParams;
|
|
121
|
+
if (options.path)
|
|
122
|
+
params.set("path", options.path);
|
|
123
|
+
if (options.ref)
|
|
124
|
+
params.set("ref", options.ref);
|
|
125
|
+
const queryString = params.toString();
|
|
126
|
+
const response = await this.client._request(`/api/v1/repos/${encodeURIComponent(this.name)}/files${queryString ? `?${queryString}` : ""}`);
|
|
127
|
+
return response.entries;
|
|
128
|
+
}
|
|
129
|
+
async getFile(filePath, ref) {
|
|
130
|
+
const params = ref ? `?ref=${encodeURIComponent(ref)}` : "";
|
|
131
|
+
const response = await fetch(`${this.client.baseUrl}/api/v1/repos/${encodeURIComponent(this.name)}/files/${filePath}${params}`, {
|
|
132
|
+
headers: {
|
|
133
|
+
Authorization: `Bearer ${this.client.apiKey}`
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
if (!response.ok) {
|
|
137
|
+
const body = await response.json().catch(() => ({
|
|
138
|
+
error: { code: "INTERNAL_ERROR", message: response.statusText }
|
|
139
|
+
}));
|
|
140
|
+
const { DepotError: DepotError2 } = await Promise.resolve().then(() => (init_errors(), exports_errors));
|
|
141
|
+
throw DepotError2.fromResponse(body);
|
|
142
|
+
}
|
|
143
|
+
return response.text();
|
|
144
|
+
}
|
|
145
|
+
async listBranches() {
|
|
146
|
+
const response = await this.client._request(`/api/v1/repos/${encodeURIComponent(this.name)}/branches`);
|
|
147
|
+
return response.branches.map((b) => ({
|
|
148
|
+
name: b.name,
|
|
149
|
+
sha: b.sha,
|
|
150
|
+
isDefault: b.is_default
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
async createBranch(options) {
|
|
154
|
+
const response = await this.client._request(`/api/v1/repos/${encodeURIComponent(this.name)}/branches`, {
|
|
155
|
+
method: "POST",
|
|
156
|
+
body: JSON.stringify({
|
|
157
|
+
name: options.name,
|
|
158
|
+
from: options.from
|
|
159
|
+
})
|
|
160
|
+
});
|
|
161
|
+
return {
|
|
162
|
+
name: response.name,
|
|
163
|
+
sha: response.sha,
|
|
164
|
+
isDefault: response.is_default
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
async deleteBranch(branchName) {
|
|
168
|
+
await this.client._request(`/api/v1/repos/${encodeURIComponent(this.name)}/branches/${encodeURIComponent(branchName)}`, {
|
|
169
|
+
method: "DELETE"
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
async listCommits(options = {}) {
|
|
173
|
+
const params = new URLSearchParams;
|
|
174
|
+
if (options.branch)
|
|
175
|
+
params.set("branch", options.branch);
|
|
176
|
+
if (options.limit)
|
|
177
|
+
params.set("limit", options.limit.toString());
|
|
178
|
+
if (options.cursor)
|
|
179
|
+
params.set("cursor", options.cursor);
|
|
180
|
+
const queryString = params.toString();
|
|
181
|
+
const response = await this.client._request(`/api/v1/repos/${encodeURIComponent(this.name)}/commits${queryString ? `?${queryString}` : ""}`);
|
|
182
|
+
return {
|
|
183
|
+
commits: response.commits,
|
|
184
|
+
nextCursor: response.next_cursor,
|
|
185
|
+
hasMore: response.has_more
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
async getCommit(sha) {
|
|
189
|
+
return this.client._request(`/api/v1/repos/${encodeURIComponent(this.name)}/commits/${sha}`);
|
|
190
|
+
}
|
|
191
|
+
async getDiff(base, head) {
|
|
192
|
+
const params = new URLSearchParams({ base, head });
|
|
193
|
+
const response = await this.client._request(`/api/v1/repos/${encodeURIComponent(this.name)}/diff?${params}`);
|
|
194
|
+
return {
|
|
195
|
+
base: response.base,
|
|
196
|
+
head: response.head,
|
|
197
|
+
stats: {
|
|
198
|
+
additions: response.stats.additions,
|
|
199
|
+
deletions: response.stats.deletions,
|
|
200
|
+
filesChanged: response.stats.files_changed
|
|
201
|
+
},
|
|
202
|
+
diff: response.diff
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
async rename(newName) {
|
|
206
|
+
const response = await this.client._request(`/api/v1/repos/${encodeURIComponent(this.name)}`, {
|
|
207
|
+
method: "PATCH",
|
|
208
|
+
body: JSON.stringify({ name: newName })
|
|
209
|
+
});
|
|
210
|
+
this.info = {
|
|
211
|
+
id: response.id,
|
|
212
|
+
name: response.name,
|
|
213
|
+
defaultBranch: response.default_branch,
|
|
214
|
+
sizeBytes: response.size_bytes,
|
|
215
|
+
lastPushAt: response.last_push_at,
|
|
216
|
+
createdAt: response.created_at
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
async delete() {
|
|
220
|
+
await this.client._request(`/api/v1/repos/${encodeURIComponent(this.name)}`, {
|
|
221
|
+
method: "DELETE"
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
toJSON() {
|
|
225
|
+
return { ...this.info };
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// src/client.ts
|
|
230
|
+
var DEFAULT_BASE_URL = "https://depot.mesa.dev";
|
|
231
|
+
|
|
232
|
+
class DepotClient {
|
|
233
|
+
apiKey;
|
|
234
|
+
baseUrl;
|
|
235
|
+
constructor(config) {
|
|
236
|
+
this.apiKey = config.apiKey;
|
|
237
|
+
this.baseUrl = config.baseUrl || DEFAULT_BASE_URL;
|
|
238
|
+
}
|
|
239
|
+
async request(path, options = {}) {
|
|
240
|
+
const url = `${this.baseUrl}${path}`;
|
|
241
|
+
const headers = {
|
|
242
|
+
Authorization: `Bearer ${this.apiKey}`,
|
|
243
|
+
"Content-Type": "application/json",
|
|
244
|
+
...options.headers || {}
|
|
245
|
+
};
|
|
246
|
+
try {
|
|
247
|
+
const response = await fetch(url, {
|
|
248
|
+
...options,
|
|
249
|
+
headers
|
|
250
|
+
});
|
|
251
|
+
if (!response.ok) {
|
|
252
|
+
const body = await response.json().catch(() => ({
|
|
253
|
+
error: { code: "INTERNAL_ERROR", message: response.statusText }
|
|
254
|
+
}));
|
|
255
|
+
throw DepotError.fromResponse(body);
|
|
256
|
+
}
|
|
257
|
+
const text = await response.text();
|
|
258
|
+
return text ? JSON.parse(text) : {};
|
|
259
|
+
} catch (err) {
|
|
260
|
+
if (err instanceof DepotError)
|
|
261
|
+
throw err;
|
|
262
|
+
throw new DepotError("NETWORK_ERROR", `Request failed: ${err}`);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
async createRepo(options) {
|
|
266
|
+
const response = await this.request("/api/v1/repos", {
|
|
267
|
+
method: "POST",
|
|
268
|
+
body: JSON.stringify({
|
|
269
|
+
name: options.name,
|
|
270
|
+
default_branch: options.defaultBranch || "main"
|
|
271
|
+
})
|
|
272
|
+
});
|
|
273
|
+
return new Repo(this, {
|
|
274
|
+
id: response.id,
|
|
275
|
+
name: response.name,
|
|
276
|
+
defaultBranch: response.default_branch,
|
|
277
|
+
sizeBytes: response.size_bytes,
|
|
278
|
+
lastPushAt: null,
|
|
279
|
+
createdAt: response.created_at
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
async getRepo(name) {
|
|
283
|
+
const response = await this.request(`/api/v1/repos/${encodeURIComponent(name)}`);
|
|
284
|
+
return new Repo(this, {
|
|
285
|
+
id: response.id,
|
|
286
|
+
name: response.name,
|
|
287
|
+
defaultBranch: response.default_branch,
|
|
288
|
+
sizeBytes: response.size_bytes,
|
|
289
|
+
lastPushAt: response.last_push_at,
|
|
290
|
+
createdAt: response.created_at
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
async listRepos() {
|
|
294
|
+
const response = await this.request("/api/v1/repos");
|
|
295
|
+
return response.repos.map((r) => new Repo(this, {
|
|
296
|
+
id: r.id,
|
|
297
|
+
name: r.name,
|
|
298
|
+
defaultBranch: r.default_branch,
|
|
299
|
+
sizeBytes: r.size_bytes,
|
|
300
|
+
lastPushAt: r.last_push_at,
|
|
301
|
+
createdAt: r.created_at
|
|
302
|
+
}));
|
|
303
|
+
}
|
|
304
|
+
async deleteRepo(name) {
|
|
305
|
+
await this.request(`/api/v1/repos/${encodeURIComponent(name)}`, {
|
|
306
|
+
method: "DELETE"
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
async createApiKey(options = {}) {
|
|
310
|
+
const response = await this.request("/api/v1/api-keys", {
|
|
311
|
+
method: "POST",
|
|
312
|
+
body: JSON.stringify({
|
|
313
|
+
name: options.name,
|
|
314
|
+
scopes: options.scopes
|
|
315
|
+
})
|
|
316
|
+
});
|
|
317
|
+
return {
|
|
318
|
+
id: response.id,
|
|
319
|
+
key: response.key,
|
|
320
|
+
name: response.name,
|
|
321
|
+
scopes: response.scopes,
|
|
322
|
+
lastUsedAt: null,
|
|
323
|
+
expiresAt: null,
|
|
324
|
+
revokedAt: null,
|
|
325
|
+
createdAt: response.created_at
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
async listApiKeys() {
|
|
329
|
+
const response = await this.request("/api/v1/api-keys");
|
|
330
|
+
return response.api_keys.map((k) => ({
|
|
331
|
+
id: k.id,
|
|
332
|
+
name: k.name,
|
|
333
|
+
scopes: k.scopes,
|
|
334
|
+
lastUsedAt: k.last_used_at,
|
|
335
|
+
expiresAt: k.expires_at,
|
|
336
|
+
revokedAt: k.revoked_at,
|
|
337
|
+
createdAt: k.created_at
|
|
338
|
+
}));
|
|
339
|
+
}
|
|
340
|
+
async revokeApiKey(keyId) {
|
|
341
|
+
await this.request(`/api/v1/api-keys/${keyId}`, {
|
|
342
|
+
method: "DELETE"
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
_request(path, options = {}) {
|
|
346
|
+
return this.request(path, options);
|
|
347
|
+
}
|
|
348
|
+
getCloneUrl(orgName, repoName) {
|
|
349
|
+
const urlWithoutProtocol = this.baseUrl.replace(/^https?:\/\//, "");
|
|
350
|
+
return `https://${this.apiKey}@${urlWithoutProtocol}/${orgName}/${repoName}.git`;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// src/index.ts
|
|
355
|
+
init_errors();
|
|
356
|
+
var createDepot = (config) => {
|
|
357
|
+
return new DepotClient(config);
|
|
358
|
+
};
|
|
359
|
+
export {
|
|
360
|
+
createDepot,
|
|
361
|
+
Repo,
|
|
362
|
+
DepotError,
|
|
363
|
+
DepotClient,
|
|
364
|
+
CommitBuilder
|
|
365
|
+
};
|
package/dist/repo.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { DepotClient } from './client';
|
|
2
|
+
import { CommitBuilder } from './commit-builder';
|
|
3
|
+
import type { BranchInfo, CommitInfo, CreateBranchOptions, CreateCommitOptions, DiffResult, FileEntry, ListCommitsOptions, ListFilesOptions, RepoInfo } from './types';
|
|
4
|
+
export declare class Repo {
|
|
5
|
+
private client;
|
|
6
|
+
private info;
|
|
7
|
+
constructor(client: DepotClient, info: RepoInfo);
|
|
8
|
+
get id(): string;
|
|
9
|
+
get name(): string;
|
|
10
|
+
get defaultBranch(): string;
|
|
11
|
+
get sizeBytes(): number;
|
|
12
|
+
get lastPushAt(): string | null;
|
|
13
|
+
get createdAt(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Create a fluent commit builder
|
|
16
|
+
*/
|
|
17
|
+
createCommit(options: CreateCommitOptions): CommitBuilder;
|
|
18
|
+
/**
|
|
19
|
+
* Get the clone URL for this repository
|
|
20
|
+
*/
|
|
21
|
+
getCloneUrl(orgName: string): string;
|
|
22
|
+
listFiles(options?: ListFilesOptions): Promise<FileEntry[]>;
|
|
23
|
+
getFile(filePath: string, ref?: string): Promise<string>;
|
|
24
|
+
listBranches(): Promise<BranchInfo[]>;
|
|
25
|
+
createBranch(options: CreateBranchOptions): Promise<BranchInfo>;
|
|
26
|
+
deleteBranch(branchName: string): Promise<void>;
|
|
27
|
+
listCommits(options?: ListCommitsOptions): Promise<{
|
|
28
|
+
commits: CommitInfo[];
|
|
29
|
+
nextCursor: string | null;
|
|
30
|
+
hasMore: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
getCommit(sha: string): Promise<CommitInfo>;
|
|
33
|
+
getDiff(base: string, head: string): Promise<DiffResult>;
|
|
34
|
+
rename(newName: string): Promise<void>;
|
|
35
|
+
delete(): Promise<void>;
|
|
36
|
+
toJSON(): RepoInfo;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=repo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../src/repo.ts"],"names":[],"mappings":"AA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C1B,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IAoBI,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAI3C,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAsBxD,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBtC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAM7B,MAAM,IAAI,QAAQ;CAGnB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Repo } from './repo';
|
|
2
|
+
import type { ApiKeyInfo, CreateApiKeyOptions, CreateRepoOptions, DepotConfig } from './types';
|
|
3
|
+
export declare class DepotClient {
|
|
4
|
+
private apiKey;
|
|
5
|
+
private baseUrl;
|
|
6
|
+
constructor(config: DepotConfig);
|
|
7
|
+
private request;
|
|
8
|
+
createRepo(options: CreateRepoOptions): Promise<Repo>;
|
|
9
|
+
getRepo(name: string): Promise<Repo>;
|
|
10
|
+
listRepos(): Promise<Repo[]>;
|
|
11
|
+
deleteRepo(name: string): Promise<void>;
|
|
12
|
+
createApiKey(options?: CreateApiKeyOptions): Promise<ApiKeyInfo>;
|
|
13
|
+
listApiKeys(): Promise<ApiKeyInfo[]>;
|
|
14
|
+
revokeApiKey(keyId: string): Promise<void>;
|
|
15
|
+
_request<T>(path: string, options?: RequestInit): Promise<T>;
|
|
16
|
+
getCloneUrl(orgName: string, repoName: string): string;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,WAAW,EAAY,MAAM,SAAS,CAAC;AAIzG,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;gBAEZ,MAAM,EAAE,WAAW;YAKjB,OAAO;IA+Bf,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBrD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBpC,SAAS,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAyB5B,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOvC,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,UAAU,CAAC;IA2BpE,WAAW,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAwBpC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOhD,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhE,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;CAIvD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DepotClient } from './client';
|
|
2
|
+
import type { CreateCommitOptions } from './types';
|
|
3
|
+
export declare class CommitBuilder {
|
|
4
|
+
private client;
|
|
5
|
+
private repoName;
|
|
6
|
+
private options;
|
|
7
|
+
private files;
|
|
8
|
+
constructor(client: DepotClient, repoName: string, options: CreateCommitOptions);
|
|
9
|
+
/**
|
|
10
|
+
* Add or update a file in the commit
|
|
11
|
+
*/
|
|
12
|
+
addFile(path: string, content: string | Buffer): this;
|
|
13
|
+
/**
|
|
14
|
+
* Delete a file in the commit
|
|
15
|
+
*/
|
|
16
|
+
deleteFile(path: string): this;
|
|
17
|
+
/**
|
|
18
|
+
* Send the commit to the server
|
|
19
|
+
*/
|
|
20
|
+
send(): Promise<{
|
|
21
|
+
sha: string;
|
|
22
|
+
branch: string;
|
|
23
|
+
message: string;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=commit-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-builder.d.ts","sourceRoot":"","sources":["../../src/commit-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAgB,mBAAmB,EAAc,MAAM,SAAS,CAAC;AAa7E,qBAAa,aAAa;IAItB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,OAAO;IALjB,OAAO,CAAC,KAAK,CAAmB;gBAGtB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,mBAAmB;IAGtC;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAiBrD;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAQ9B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAkBxE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ErrorCode = 'UNAUTHORIZED' | 'FORBIDDEN' | 'REPO_NOT_FOUND' | 'REF_NOT_FOUND' | 'FILE_NOT_FOUND' | 'ORG_NOT_FOUND' | 'REPO_EXISTS' | 'BRANCH_EXISTS' | 'QUOTA_EXCEEDED' | 'INVALID_REPO_NAME' | 'INVALID_REQUEST' | 'PATH_TRAVERSAL' | 'PUSH_REJECTED' | 'INTERNAL_ERROR' | 'NETWORK_ERROR';
|
|
2
|
+
export declare class DepotError extends Error {
|
|
3
|
+
code: ErrorCode;
|
|
4
|
+
details?: Record<string, unknown> | undefined;
|
|
5
|
+
constructor(code: ErrorCode, message: string, details?: Record<string, unknown> | undefined);
|
|
6
|
+
static fromResponse(body: {
|
|
7
|
+
error: {
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
details?: Record<string, unknown>;
|
|
11
|
+
};
|
|
12
|
+
}): DepotError;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,eAAe,CAAC;AAEpB,qBAAa,UAAW,SAAQ,KAAK;IAE1B,IAAI,EAAE,SAAS;IAEf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjC,IAAI,EAAE,SAAS,EACtB,OAAO,EAAE,MAAM,EACR,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;IAM1C,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE;QACxB,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;SAAE,CAAC;KAC7E,GAAG,UAAU;CAGf"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export { DepotClient } from './client';
|
|
2
|
+
export { CommitBuilder } from './commit-builder';
|
|
3
|
+
export { DepotError, type ErrorCode } from './errors';
|
|
4
|
+
export { Repo } from './repo';
|
|
5
|
+
export type * from './types';
|
|
6
|
+
import { DepotClient } from './client';
|
|
7
|
+
import type { DepotConfig } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* Create a new Depot client
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { createDepot } from '@mesa/depot-sdk';
|
|
14
|
+
*
|
|
15
|
+
* const depot = createDepot({
|
|
16
|
+
* apiKey: process.env.DEPOT_API_KEY,
|
|
17
|
+
* baseUrl: 'https://depot.mesa.dev', // Optional
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // Create a repo
|
|
21
|
+
* const repo = await depot.createRepo({ name: 'my-app' });
|
|
22
|
+
*
|
|
23
|
+
* // Create a commit
|
|
24
|
+
* const result = await repo
|
|
25
|
+
* .createCommit({
|
|
26
|
+
* branch: 'main',
|
|
27
|
+
* message: 'Initial commit',
|
|
28
|
+
* author: { name: 'Bot', email: 'bot@example.com' },
|
|
29
|
+
* })
|
|
30
|
+
* .addFile('README.md', '# My App')
|
|
31
|
+
* .addFile('package.json', JSON.stringify({ name: 'my-app' }, null, 2))
|
|
32
|
+
* .send();
|
|
33
|
+
*
|
|
34
|
+
* console.log(result.sha);
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const createDepot: (config: DepotConfig) => DepotClient;
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,mBAAmB,SAAS,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,WAAW,WAAY,WAAW,KAAG,WAEjD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { DepotClient } from './client';
|
|
2
|
+
import { CommitBuilder } from './commit-builder';
|
|
3
|
+
import type { BranchInfo, CommitInfo, CreateBranchOptions, CreateCommitOptions, DiffResult, FileEntry, ListCommitsOptions, ListFilesOptions, RepoInfo } from './types';
|
|
4
|
+
export declare class Repo {
|
|
5
|
+
private client;
|
|
6
|
+
private info;
|
|
7
|
+
constructor(client: DepotClient, info: RepoInfo);
|
|
8
|
+
get id(): string;
|
|
9
|
+
get name(): string;
|
|
10
|
+
get defaultBranch(): string;
|
|
11
|
+
get sizeBytes(): number;
|
|
12
|
+
get lastPushAt(): string | null;
|
|
13
|
+
get createdAt(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Create a fluent commit builder
|
|
16
|
+
*/
|
|
17
|
+
createCommit(options: CreateCommitOptions): CommitBuilder;
|
|
18
|
+
/**
|
|
19
|
+
* Get the clone URL for this repository
|
|
20
|
+
*/
|
|
21
|
+
getCloneUrl(orgName: string): string;
|
|
22
|
+
listFiles(options?: ListFilesOptions): Promise<FileEntry[]>;
|
|
23
|
+
getFile(filePath: string, ref?: string): Promise<string>;
|
|
24
|
+
listBranches(): Promise<BranchInfo[]>;
|
|
25
|
+
createBranch(options: CreateBranchOptions): Promise<BranchInfo>;
|
|
26
|
+
deleteBranch(branchName: string): Promise<void>;
|
|
27
|
+
listCommits(options?: ListCommitsOptions): Promise<{
|
|
28
|
+
commits: CommitInfo[];
|
|
29
|
+
nextCursor: string | null;
|
|
30
|
+
hasMore: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
getCommit(sha: string): Promise<CommitInfo>;
|
|
33
|
+
getDiff(base: string, head: string): Promise<DiffResult>;
|
|
34
|
+
rename(newName: string): Promise<void>;
|
|
35
|
+
delete(): Promise<void>;
|
|
36
|
+
toJSON(): RepoInfo;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=repo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../src/repo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACT,MAAM,SAAS,CAAC;AAEjB,qBAAa,IAAI;IAEb,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,IAAI;gBADJ,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,QAAQ;IAGxB,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,UAAU,IAAI,MAAM,GAAG,IAAI,CAE9B;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,aAAa;IAIzD;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAK9B,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAa/D,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAuBxD,YAAY,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAgBrC,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAoB/D,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU/C,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC;QAC3D,OAAO,EAAE,UAAU,EAAE,CAAC;QACtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IAoBI,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAI3C,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAsBxD,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBtC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAM7B,MAAM,IAAI,QAAQ;CAGnB"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export type DepotConfig = {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
};
|
|
5
|
+
export type CreateRepoOptions = {
|
|
6
|
+
name: string;
|
|
7
|
+
defaultBranch?: string;
|
|
8
|
+
};
|
|
9
|
+
export type RepoInfo = {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
defaultBranch: string;
|
|
13
|
+
sizeBytes: number;
|
|
14
|
+
lastPushAt: string | null;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
};
|
|
17
|
+
export type FileEntry = {
|
|
18
|
+
name: string;
|
|
19
|
+
type: 'blob' | 'tree';
|
|
20
|
+
size?: number;
|
|
21
|
+
mode: string;
|
|
22
|
+
};
|
|
23
|
+
export type BranchInfo = {
|
|
24
|
+
name: string;
|
|
25
|
+
sha: string;
|
|
26
|
+
isDefault: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type CommitAuthor = {
|
|
29
|
+
name: string;
|
|
30
|
+
email: string;
|
|
31
|
+
date?: string;
|
|
32
|
+
};
|
|
33
|
+
export type CommitInfo = {
|
|
34
|
+
sha: string;
|
|
35
|
+
message: string;
|
|
36
|
+
author: CommitAuthor;
|
|
37
|
+
committer: CommitAuthor;
|
|
38
|
+
};
|
|
39
|
+
export type DiffStats = {
|
|
40
|
+
additions: number;
|
|
41
|
+
deletions: number;
|
|
42
|
+
filesChanged: number;
|
|
43
|
+
};
|
|
44
|
+
export type DiffResult = {
|
|
45
|
+
base: string;
|
|
46
|
+
head: string;
|
|
47
|
+
stats: DiffStats;
|
|
48
|
+
diff: string;
|
|
49
|
+
};
|
|
50
|
+
export type CreateCommitOptions = {
|
|
51
|
+
branch: string;
|
|
52
|
+
message: string;
|
|
53
|
+
author: CommitAuthor;
|
|
54
|
+
baseSha?: string;
|
|
55
|
+
};
|
|
56
|
+
export type FileChange = {
|
|
57
|
+
path: string;
|
|
58
|
+
content: string;
|
|
59
|
+
encoding?: 'utf-8' | 'base64';
|
|
60
|
+
} | {
|
|
61
|
+
path: string;
|
|
62
|
+
action: 'delete';
|
|
63
|
+
};
|
|
64
|
+
export type ListCommitsOptions = {
|
|
65
|
+
branch?: string;
|
|
66
|
+
limit?: number;
|
|
67
|
+
cursor?: string;
|
|
68
|
+
};
|
|
69
|
+
export type ListFilesOptions = {
|
|
70
|
+
path?: string;
|
|
71
|
+
ref?: string;
|
|
72
|
+
};
|
|
73
|
+
export type CreateBranchOptions = {
|
|
74
|
+
name: string;
|
|
75
|
+
from: string;
|
|
76
|
+
};
|
|
77
|
+
export type ApiKeyInfo = {
|
|
78
|
+
id: string;
|
|
79
|
+
key?: string;
|
|
80
|
+
name: string | null;
|
|
81
|
+
scopes: string[];
|
|
82
|
+
lastUsedAt: string | null;
|
|
83
|
+
expiresAt: string | null;
|
|
84
|
+
revokedAt: string | null;
|
|
85
|
+
createdAt: string;
|
|
86
|
+
};
|
|
87
|
+
export type CreateApiKeyOptions = {
|
|
88
|
+
name?: string;
|
|
89
|
+
scopes?: string[];
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS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EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock fetch responses for unit testing
|
|
3
|
+
*/
|
|
4
|
+
export type MockResponse = {
|
|
5
|
+
status?: number;
|
|
6
|
+
body?: unknown;
|
|
7
|
+
headers?: Record<string, string>;
|
|
8
|
+
};
|
|
9
|
+
export type MockHandler = (url: string, init?: RequestInit) => MockResponse | Promise<MockResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Set up fetch mocking for a test file.
|
|
12
|
+
* Call this at the top level of your test file.
|
|
13
|
+
*/
|
|
14
|
+
export declare function setupFetchMock(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Set the mock handler for the current test.
|
|
17
|
+
* Must be called within a test after setupFetchMock().
|
|
18
|
+
*/
|
|
19
|
+
export declare function mockFetch(handler: MockHandler): void;
|
|
20
|
+
/**
|
|
21
|
+
* Create a simple mock that returns the same response for all requests.
|
|
22
|
+
*/
|
|
23
|
+
export declare function mockFetchResponse(response: MockResponse): void;
|
|
24
|
+
/**
|
|
25
|
+
* Create a mock that returns different responses based on URL patterns.
|
|
26
|
+
*/
|
|
27
|
+
export declare function mockFetchRoutes(routes: Record<string, MockResponse | ((url: string, init?: RequestInit) => MockResponse)>): void;
|
|
28
|
+
/**
|
|
29
|
+
* Assert that fetch was called with expected parameters.
|
|
30
|
+
*/
|
|
31
|
+
export declare function expectFetchCalledWith(expectedUrl: string | RegExp, expectedInit?: Partial<RequestInit>): void;
|
|
32
|
+
/**
|
|
33
|
+
* Standard error response format
|
|
34
|
+
*/
|
|
35
|
+
export declare function errorResponse(code: string, message: string, status?: number): MockResponse;
|
|
36
|
+
type RepoResponse = {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
default_branch: string;
|
|
40
|
+
size_bytes: number;
|
|
41
|
+
created_at: string;
|
|
42
|
+
last_push_at: string | null;
|
|
43
|
+
};
|
|
44
|
+
type BranchResponse = {
|
|
45
|
+
name: string;
|
|
46
|
+
sha: string;
|
|
47
|
+
is_default: boolean;
|
|
48
|
+
};
|
|
49
|
+
type CommitResponse = {
|
|
50
|
+
sha: string;
|
|
51
|
+
message: string;
|
|
52
|
+
branch: string;
|
|
53
|
+
};
|
|
54
|
+
type CommitListItem = {
|
|
55
|
+
sha: string;
|
|
56
|
+
message: string;
|
|
57
|
+
author: {
|
|
58
|
+
name: string;
|
|
59
|
+
email: string;
|
|
60
|
+
};
|
|
61
|
+
committer: {
|
|
62
|
+
name: string;
|
|
63
|
+
email: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
type FileEntryResponse = {
|
|
67
|
+
name: string;
|
|
68
|
+
type: 'blob' | 'tree';
|
|
69
|
+
size: number;
|
|
70
|
+
mode: string;
|
|
71
|
+
};
|
|
72
|
+
type ApiKeyResponse = {
|
|
73
|
+
id: string;
|
|
74
|
+
key: string;
|
|
75
|
+
name: string | null;
|
|
76
|
+
scopes: string[];
|
|
77
|
+
created_at: string;
|
|
78
|
+
};
|
|
79
|
+
type ApiKeyListItem = {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string | null;
|
|
82
|
+
scopes: string[];
|
|
83
|
+
last_used_at: string | null;
|
|
84
|
+
expires_at: string | null;
|
|
85
|
+
revoked_at: string | null;
|
|
86
|
+
created_at: string;
|
|
87
|
+
};
|
|
88
|
+
type DiffResponse = {
|
|
89
|
+
base: string;
|
|
90
|
+
head: string;
|
|
91
|
+
stats: {
|
|
92
|
+
additions: number;
|
|
93
|
+
deletions: number;
|
|
94
|
+
files_changed: number;
|
|
95
|
+
};
|
|
96
|
+
diff: string;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Common mock responses for Depot API
|
|
100
|
+
*/
|
|
101
|
+
export declare const mockResponses: {
|
|
102
|
+
repo: (overrides?: Partial<RepoResponse>) => RepoResponse;
|
|
103
|
+
repoList: (repos?: RepoResponse[]) => {
|
|
104
|
+
repos: RepoResponse[];
|
|
105
|
+
};
|
|
106
|
+
branch: (overrides?: Partial<BranchResponse>) => BranchResponse;
|
|
107
|
+
branchList: (branches?: BranchResponse[]) => {
|
|
108
|
+
branches: BranchResponse[];
|
|
109
|
+
};
|
|
110
|
+
commit: (overrides?: Partial<CommitResponse>) => CommitResponse;
|
|
111
|
+
commitList: (commits?: CommitListItem[]) => {
|
|
112
|
+
commits: CommitListItem[];
|
|
113
|
+
next_cursor: null;
|
|
114
|
+
has_more: boolean;
|
|
115
|
+
};
|
|
116
|
+
fileEntry: (overrides?: Partial<FileEntryResponse>) => FileEntryResponse;
|
|
117
|
+
fileList: (entries?: FileEntryResponse[]) => {
|
|
118
|
+
entries: FileEntryResponse[];
|
|
119
|
+
};
|
|
120
|
+
apiKey: (overrides?: Partial<ApiKeyResponse>) => ApiKeyResponse;
|
|
121
|
+
apiKeyList: (keys?: ApiKeyListItem[]) => {
|
|
122
|
+
api_keys: ApiKeyListItem[];
|
|
123
|
+
};
|
|
124
|
+
diff: (overrides?: Partial<DiffResponse>) => DiffResponse;
|
|
125
|
+
};
|
|
126
|
+
export {};
|
|
127
|
+
//# sourceMappingURL=test-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../tests/test-utils.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAA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AEF;;GAEG;AACH,eAAO,MAAM,aAAa;uBACN,OAAO,CAAC,YAAY,CAAC,KAAQ,YAAY;uBAUxC,YAAY,EAAE;;;yBAIb,OAAO,CAAC,cAAc,CAAC,KAAQ,cAAc;4BAOzC,cAAc,EAAE;;;yBAIpB,OAAO,CAAC,cAAc,CAAC,KAAQ,cAAc;2BAO1C,cAAc,EAAE;;;;;4BAahB,OAAO,CAAC,iBAAiB,CAAC,KAAQ,iBAAiB;yBAQrD,iBAAiB,EAAE;;;yBAIpB,OAAO,CAAC,cAAc,CAAC,KAAQ,cAAc;wBAS7C,cAAc,EAAE;;;uBAclB,OAAO,CAAC,YAAY,CAAC,KAAQ,YAAY;CAO5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.test.d.ts","sourceRoot":"","sources":["../../../tests/unit/client.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-builder.test.d.ts","sourceRoot":"","sources":["../../../tests/unit/commit-builder.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo.test.d.ts","sourceRoot":"","sources":["../../../tests/unit/repo.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/errors.ts","../src/types.ts","../src/commit-builder.ts","../src/repo.ts","../src/client.ts","../src/index.ts","../tests/test-utils.ts","../tests/unit/client.test.ts","../tests/unit/commit-builder.test.ts","../tests/unit/repo.test.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/ts5.6/index.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/bun-types/globals.d.ts","../../../node_modules/bun-types/s3.d.ts","../../../node_modules/bun-types/fetch.d.ts","../../../node_modules/bun-types/bun.d.ts","../../../node_modules/@types/bun/index.d.ts","../../../node_modules/bun-types/extensions.d.ts","../../../node_modules/bun-types/devserver.d.ts","../../../node_modules/bun-types/ffi.d.ts","../../../node_modules/bun-types/html-rewriter.d.ts","../../../node_modules/bun-types/jsc.d.ts","../../../node_modules/bun-types/sqlite.d.ts","../../../node_modules/bun-types/vendor/expect-type/utils.d.ts","../../../node_modules/bun-types/vendor/expect-type/overloads.d.ts","../../../node_modules/bun-types/vendor/expect-type/branding.d.ts","../../../node_modules/bun-types/vendor/expect-type/messages.d.ts","../../../node_modules/bun-types/vendor/expect-type/index.d.ts","../../../node_modules/bun-types/test.d.ts","../../../node_modules/bun-types/wasm.d.ts","../../../node_modules/bun-types/overrides.d.ts","../../../node_modules/bun-types/deprecated.d.ts","../../../node_modules/bun-types/redis.d.ts","../../../node_modules/bun-types/shell.d.ts","../../../node_modules/bun-types/serve.d.ts","../../../node_modules/bun-types/sql.d.ts","../../../node_modules/bun-types/security.d.ts","../../../node_modules/bun-types/bundle.d.ts","../../../node_modules/bun-types/bun.ns.d.ts","../../../node_modules/bun-types/index.d.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"9d540251809289a05349b70ab5f4b7b99f922af66ab3c39ba56a475dcf95d5ff","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"c113f890ab2f7a10935d7bff7d2049bf46e3720bc0e405d1d5887c92c62e1d28","signature":"e599f86657d1c483cb7faacbbcbc6b96213d8826716ddc5ec37254c3a890ba0b"},{"version":"f2e18bf300f16d86e26a56cf6b3b476cbe72fc782b3ceb2583b7199b89f9b62c","signature":"bb686e9bc143272fd8d7fbecfe2fb3fae8f9cff5e2b9b608ec9eef16b9c5f587"},{"version":"6d8209266da6747ad0ffd0e628d850df917cd9b5d505fd0581fd23b229e09974","signature":"320915775d5a8f3f4cfe7e6d5b31412a649c1858205efe6b85150deae870e1da"},{"version":"b0d3c71927717c9b63f1b083d36aa16583c5da1308457f472c59193dafb0c35b","signature":"3daff84413e47cee3c77437746cb760395e163b57ce57a75be13da1930ab3c7c"},{"version":"d704cd0b39501f2bdf3556c6a7b415acbf87f52fb9230fc952b4af1178e42193","signature":"031664d4c6995ceced3917c11aa7850d9f50b6c41c11540d3591f14871ed31d1"},{"version":"db52caeb674944db6590c59840139834fa99e1357009347cdf92e0649ad2535d","signature":"ba1714659cd08eb771f7fe703bdc5d0ee06e9f435eb12d5a7bb9e512f6a42c59"},{"version":"307288f2908232640b72a8a372441335c3fcb5a7387648430268108161fec9b4","signature":"dd017500fa5388f21c4952bceb9fbe9656e7b5ced69398684b21e5ba97f8bf08"},{"version":"a896b713252b5912673c098c54041742a8d241d6b0b5263332f854323417f697","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"b4eba85c380f43ba4772c65e6b8c7dfc0717934f8187ddfd7f9c8b4d5a4ecc07","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"446a460b6892dfaeade3321afd3c17b5235fdfa6fd923f1969f12ec5dd5cff83","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686",{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true},"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a",{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true},{"version":"d2662405c15ec112ebc0c3ec787edb82d58d6acb1a9d109317d7bf9cff9d09a7","affectsGlobalScope":true},{"version":"362d474eb9feae178a83ead94d757c21e42d6d7090e4182f0c12e92830a3d25e","affectsGlobalScope":true},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true},{"version":"dc27badd4bf4a2b0024a0cd32a9bbf0be7073902c5177a58be14242e7d8bf2c7","affectsGlobalScope":true},{"version":"b972357e61ef2e072f8a88b9f4f5a70984c417237e6106f6b2390414a09ce523","affectsGlobalScope":true},"076cac5898bd833255def0f7c5717b83534212873505c9c958f1926d49f9bec6","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","75eb536b960b85f75e21490beeab53ea616646a995ad203e1af532d67a774fb6",{"version":"36d0976d3dad74078f707af107b5082dbe42ffcadb3442ff140c36c8a33b4887","affectsGlobalScope":true},"86e0d632e9ef88593e8724ffb6af05104e13a08f9d8df733a30f9991ac387fff","7646ad748a9ca15bf43d4c88f83cc851c67f8ec9c1186295605b59ba6bb36dcb",{"version":"cef8931bc129687165253f0642427c2a72705a4613b3ac461b9fa78c7cdaef32","affectsGlobalScope":true},"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","47b62c294beb69daa5879f052e416b02e6518f3e4541ae98adbfb27805dd6711","f8375506002c556ec412c7e2a5a9ece401079ee5d9eb2c1372e9f5377fac56c7","8edd6482bd72eca772f9df15d05c838dd688cdbd4d62690891fca6578cfda6fe","07ba29a1a495b710aea48a4cf19ae12b3cbda2a8e9ac62192af477027a99e8de","6dead64c944504250dd2fc9095231f36887cfc1534f1ff57737c19f92d165c91","b9a4824bb83f25d6d227394db2ed99985308cf2a3a35f0d6d39aa72b15473982",{"version":"6e9948b1e396106601365283680c319a9103c71a5725e7d03e26fe246df60c4c","affectsGlobalScope":true},"8e8e284b3832911aeede987e4d74cf0a00f2b03896b2fd3bf924344cc0f96b3c","37d37474a969ab1b91fc332eb6a375885dfd25279624dfa84dea48c9aedf4472","1ddd8c1a3ae1f8ab28affd53b13910be4afe0b35f28517b7f14c268e9e42647a","f1a79b6047d006548185e55478837dfbcdd234d6fe51532783f5dffd401cfb2b","cbc91187014fb1e738ef252751a9f84abf2989ec1c3b1637ec23b5b39cdf3d25","e822320b448edce0c7ede9cbeada034c72e1f1c8c8281974817030564c63dcb1",{"version":"9d65568cba17c9db40251023406668695ad698ea4a34542364af3e78edd37811","affectsGlobalScope":true},"f23e3d484de54d235bf702072100b541553a1df2550bad691fe84995e15cf7be","821c79b046e40d54a447bebd9307e70b86399a89980a87bbc98114411169e274","17bc38afc78d40b2f54af216c0cc31a4bd0c6897a5945fa39945dfc43260be2c",{"version":"d201b44ff390c220a94fb0ff6a534fe9fa15b44f8a86d0470009cdde3a3e62ab","affectsGlobalScope":true},{"version":"d44445141f204d5672c502a39c1124bcf1df225eba05df0d2957f79122be87b5","affectsGlobalScope":true},"de905bc5f7e7a81cb420e212b95ab5e3ab840f93e0cfa8ce879f6e7fa465d4a2","bc2ff43214898bc6d53cab92fb41b5309efec9cbb59a0650525980aee994de2b","bede3143eeddca3b8ec3592b09d7eb02042f9e195251040c5146eac09b173236","64a40cf4ec8a7a29db2b4bc35f042e5be8537c4be316e5221f40f30ca8ed7051","294c082d609e6523520290db4f1d54114ebc83643fb42abd965be5bcc5d9416b","cf7d740e39bd8adbdc7840ee91bef0af489052f6467edfcefb7197921757ec3b","37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093",{"version":"b9f0681c4d2cb00a5cfe08a7be9662627b912de562926819ebddfe2ef6a9b5ee","affectsGlobalScope":true},"b85151402164ab7cb665e58df5c1a29aa25ea4ed3a367f84a15589e7d7a9c8ca","89eb8abe2b5c146fbb8f3bf72f4e91de3541f2fb559ad5fed4ad5bf223a3dedb",{"version":"bc6cb10764a82f3025c0f4822b8ad711c16d1a5c75789be2d188d553b69b2d48","affectsGlobalScope":true},"41d510caf7ed692923cb6ef5932dc9cf1ed0f57de8eb518c5bab8358a21af674","2751c5a6b9054b61c9b03b3770b2d39b1327564672b63e3485ac03ffeb28b4f6","dc058956a93388aab38307b7b3b9b6379e1021e73a244aab6ac9427dc3a252a7","f33302cf240672359992c356f2005d395b559e176196d03f31a28cc7b01e69bc",{"version":"3ce25041ff6ae06c08fcaccd5fcd9baf4ca6e80e6cb5a922773a1985672e74c2","affectsGlobalScope":true},{"version":"652c0de14329a834ff06af6ad44670fac35849654a464fd9ae36edb92a362c12","affectsGlobalScope":true},"3b1e178016d3fc554505ae087c249b205b1c50624d482c542be9d4682bab81fc","5db7c5bb02ef47aaaec6d262d50c4e9355c80937d649365c343fa5e84569621d","cf45d0510b661f1da461479851ff902f188edb111777c37055eff12fa986a23a",{"version":"6831f13f06a15391dfeb2477d48ac58311ab675f85846a05499ee92d6e856933","affectsGlobalScope":true},"37bef1064b7d015aeaa7c0716fe23a0b3844abe2c0a3df7144153ca8445fe0da","59ef5d8f9f0274a03123bdd45bf38bf0e2a96d600ccb0606e0d780384e58f26a","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"6e215dac8b234548d91b718f9c07d5b09473cd5cabb29053fcd8be0af190acb6","affectsGlobalScope":true},"0da1adb8d70eba31791b5f9203a384a628f9a1b03162bc68306838e842eff203","f3d3e999a323c85c8a63ce90c6e4624ff89fe137a0e2508fddc08e0556d08abf","a1fdda024d346cd1906d4a1f66c2804217ef88b554946ac7d9b7bcbadcc75f11","37be812b06e518320ba82e2aff3ac2ca37370a9df917db708f081b9043fa3315","49ae37a1b5de16f762c8a151eeaec6b558ce3c27251052ef7a361144af42cad4",{"version":"fc9e630f9302d0414ccd6c8ed2706659cff5ae454a56560c6122fa4a3fac5bbd","affectsGlobalScope":true},"aa0a44af370a2d7c1aac988a17836f57910a6c52689f52f5b3ac1d4c6cadcb23",{"version":"0ac74c7586880e26b6a599c710b59284a284e084a2bbc82cd40fb3fbfdea71ae","affectsGlobalScope":true},"2ce12357dadbb8efc4e4ec4dab709c8071bf992722fc9adfea2fe0bd5b50923f","31bd1a31f935276adf90384a35edbd4614018ff008f57d62ffb57ac538e94e51","ffd344731abee98a0a85a735b19052817afd2156d97d1410819cd9bcd1bd575e","475e07c959f4766f90678425b45cf58ac9b95e50de78367759c1e5118e85d5c3","a524ae401b30a1b0814f1bbcdae459da97fa30ae6e22476e506bb3f82e3d9456","7375e803c033425e27cb33bae21917c106cb37b508fd242cccd978ef2ee244c7","eeb890c7e9218afdad2f30ad8a76b0b0b5161d11ce13b6723879de408e6bc47a","561c795984d06b91091780cebeac616e9e41d83240770e1af14e6ec083b713d5",{"version":"dfbcc400ac6d20b941ccc7bd9031b9d9f54e4d495dd79117334e771959df4805","affectsGlobalScope":true},{"version":"944d65951e33a13068be5cd525ec42bf9bc180263ba0b723fa236970aa21f611","affectsGlobalScope":true},{"version":"6b386c7b6ce6f369d18246904fa5eac73566167c88fb6508feba74fa7501a384","affectsGlobalScope":true},"592a109e67b907ffd2078cd6f727d5c326e06eaada169eef8fb18546d96f6797","f2eb1e35cae499d57e34b4ac3650248776fe7dbd9a3ec34b23754cfd8c22fceb","fbed43a6fcf5b675f5ec6fc960328114777862b58a2bb19c109e8fc1906caa09","9e98bd421e71f70c75dae7029e316745c89fa7b8bc8b43a91adf9b82c206099c","fc803e6b01f4365f71f51f9ce13f71396766848204d4f7a1b2b6154434b84b15","f3afcc0d6f77a9ca2d2c5c92eb4b89cd38d6fa4bdc1410d626bd701760a977ec",{"version":"c8109fe76467db6e801d0edfbc50e6826934686467c9418ce6b246232ce7f109","affectsGlobalScope":true},{"version":"e6f803e4e45915d58e721c04ec17830c6e6678d1e3e00e28edf3d52720909cea","affectsGlobalScope":true}],"root":[[73,82]],"options":{"allowImportingTsExtensions":false,"allowJs":false,"allowSyntheticDefaultImports":true,"composite":true,"module":99,"noErrorTruncation":true,"noFallthroughCasesInSwitch":true,"noPropertyAccessFromIndexSignature":false,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99,"verbatimModuleSyntax":true},"fileIdsList":[[90,99,177,178,179,180,183,194,195,196,197,198,199,200,201,204],[90,96,99,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,98,99,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,104,131,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,100,110,118,128,139,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,100,101,110,118,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,177,178,179,180,183,194,195,196,197,198,199,200,201],[85,86,87,90,99,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,102,140,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,103,104,111,119,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,104,128,136,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,105,107,110,118,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,98,99,106,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,107,108,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,109,110,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,98,99,110,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,110,111,112,128,139,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,110,111,112,125,128,131,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,107,110,113,118,128,139,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,110,111,113,114,118,128,136,139,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,113,115,128,136,139,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,110,116,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,117,139,144,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,107,110,118,128,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,119,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,120,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,98,99,121,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,122,138,144,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,123,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,124,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,110,125,126,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,125,127,140,142,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,110,128,129,131,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,130,131,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,128,129,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,131,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,132,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,128,133,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,110,134,135,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,134,135,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,104,118,128,136,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,137,177,178,179,180,183,194,195,196,197,198,199,200,201],[99,177,178,179,180,183,194,195,196,197,198,199,200,201],[88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,118,138,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,113,124,139,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,104,140,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,128,141,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,117,142,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,143,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,176,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,110,112,121,128,131,139,142,144,176,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,128,145,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,104,111,113,136,140,144,176,177,178,179,183,184,194,195,196,197,198,199,200,201],[90,99,177,178,179,180,183,194,195,197,198,199,200,201],[90,99,177,178,179,180,194,195,196,197,198,199,200,201],[90,99,176,177,178,180,183,194,195,196,197,198,199,200,201],[90,99,104,121,128,131,136,140,144,176,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,146,177,178,179,180,182,183,184,185,186,187,193,194,195,196,197,198,199,200,201,202,203],[12,90,91,99,102,104,111,112,119,131,136,139,145,177,178,179,180,183,194,196,197,198,199,200,201],[90,99,177,178,179,180,183,194,195,196,198,199,200,201],[90,99,111,177,179,180,183,194,195,196,197,198,199,200,201],[90,99,177,178,179,180,183,194,195,196,197,198,199,200],[90,99,177,178,179,180,183,194,195,196,197,198,200,201],[90,99,177,178,179,180,183,194,195,196,197,199,200,201],[90,99,177,178,179,180,183,187,194,195,196,197,198,199,201],[90,99,177,178,179,180,183,192,194,195,196,197,198,199,200,201],[90,99,177,178,179,180,183,188,189,194,195,196,197,198,199,200,201],[90,99,177,178,179,180,183,188,189,190,191,194,195,196,197,198,199,200,201],[90,99,177,178,179,180,183,188,190,194,195,196,197,198,199,200,201],[90,99,177,178,179,180,183,188,194,195,196,197,198,199,200,201],[90,99,177,178,179,180,183,195,196,197,198,199,200,201],[90,99,139,153,157,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,128,139,153,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,148,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,136,139,150,153,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,118,136,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,146,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,146,148,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,118,139,150,153,177,178,179,180,183,194,195,196,197,198,199,200,201],[83,84,90,99,110,128,139,149,152,177,178,179,180,183,194,195,196,197,198,199,200,201],[83,90,99,151,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,131,139,146,149,153,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,146,169,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,146,147,148,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,153,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,147,148,149,150,151,152,153,154,155,157,158,159,160,161,162,163,164,165,166,167,168,170,171,172,173,174,175,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,153,160,161,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,151,153,161,162,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,152,177,178,179,180,183,194,195,196,197,198,199,200,201],[83,90,99,148,153,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,153,157,161,162,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,157,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,139,151,153,156,177,178,179,180,183,194,195,196,197,198,199,200,201],[83,90,99,150,151,153,157,160,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,128,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,144,146,148,153,169,177,178,179,180,183,194,195,196,197,198,199,200,201],[73,74,76,90,99,177,178,179,180,183,194,195,196,197,198,199,200,201],[74,77,90,99,177,178,179,180,183,194,195,196,197,198,199,200,201],[73,74,75,76,77,90,99,177,178,179,180,183,194,195,196,197,198,199,200,201],[73,74,75,77,90,99,177,178,179,180,183,194,195,196,197,198,199,200,201],[90,99,177,178,179,180,183,193,194,195,196,197,198,199,200,201],[73,76,77,78,79,90,99,177,178,179,180,183,193,194,195,196,197,198,199,200,201],[75,77,79,90,99,177,178,179,180,183,193,194,195,196,197,198,199,200,201],[73,75,76,77,79,90,99,177,178,179,180,183,193,194,195,196,197,198,199,200,201]],"referencedMap":[[181,1],[96,2],[97,2],[98,3],[99,4],[100,5],[101,6],[85,7],[88,8],[86,7],[87,7],[102,9],[103,10],[104,11],[105,12],[106,13],[107,14],[108,14],[109,15],[110,16],[111,17],[112,18],[91,7],[113,19],[114,20],[115,21],[116,22],[117,23],[118,24],[119,25],[120,26],[121,27],[122,28],[123,29],[124,30],[125,31],[126,31],[127,32],[128,33],[130,34],[129,35],[131,36],[132,37],[133,38],[134,39],[135,40],[136,41],[137,42],[90,43],[89,7],[146,44],[138,45],[139,46],[140,47],[141,48],[142,49],[143,50],[92,7],[93,7],[94,7],[95,51],[144,52],[145,53],[180,54],[203,7],[202,7],[196,55],[183,56],[182,7],[179,57],[184,7],[177,58],[185,7],[204,59],[186,7],[195,60],[197,61],[178,62],[201,63],[199,64],[198,65],[200,66],[187,7],[193,67],[190,68],[192,69],[191,70],[189,71],[188,7],[194,72],[71,7],[72,7],[12,7],[14,7],[13,7],[2,7],[15,7],[16,7],[17,7],[18,7],[19,7],[20,7],[21,7],[22,7],[3,7],[23,7],[4,7],[24,7],[28,7],[25,7],[26,7],[27,7],[29,7],[30,7],[31,7],[5,7],[32,7],[33,7],[34,7],[35,7],[6,7],[39,7],[36,7],[37,7],[38,7],[40,7],[7,7],[41,7],[46,7],[47,7],[42,7],[43,7],[44,7],[45,7],[8,7],[51,7],[48,7],[49,7],[50,7],[52,7],[9,7],[53,7],[54,7],[55,7],[58,7],[56,7],[57,7],[59,7],[60,7],[10,7],[61,7],[1,7],[62,7],[63,7],[11,7],[68,7],[65,7],[64,7],[69,7],[67,7],[70,7],[66,7],[160,73],[167,74],[159,73],[174,75],[151,76],[150,77],[173,78],[168,79],[171,80],[153,81],[152,82],[148,83],[147,78],[170,84],[149,85],[154,86],[155,7],[158,86],[83,7],[176,87],[175,86],[162,88],[163,89],[165,90],[161,91],[164,92],[169,78],[156,93],[157,94],[166,95],[84,96],[172,97],[77,98],[75,99],[73,7],[78,100],[76,101],[74,7],[79,102],[80,103],[81,104],[82,105]],"affectedFilesPendingEmit":[77,75,73,78,76,74,79,80,81,82],"emitSignatures":[[73,[]],[74,[]],[75,[]],[76,[]],[77,[]],[78,[]],[79,[]],[80,[]],[81,[]],[82,[]]],"latestChangedDtsFile":"./tests/unit/repo.test.d.ts"},"version":"5.5.4"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export type DepotConfig = {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
};
|
|
5
|
+
export type CreateRepoOptions = {
|
|
6
|
+
name: string;
|
|
7
|
+
defaultBranch?: string;
|
|
8
|
+
};
|
|
9
|
+
export type RepoInfo = {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
defaultBranch: string;
|
|
13
|
+
sizeBytes: number;
|
|
14
|
+
lastPushAt: string | null;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
};
|
|
17
|
+
export type FileEntry = {
|
|
18
|
+
name: string;
|
|
19
|
+
type: 'blob' | 'tree';
|
|
20
|
+
size?: number;
|
|
21
|
+
mode: string;
|
|
22
|
+
};
|
|
23
|
+
export type BranchInfo = {
|
|
24
|
+
name: string;
|
|
25
|
+
sha: string;
|
|
26
|
+
isDefault: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type CommitAuthor = {
|
|
29
|
+
name: string;
|
|
30
|
+
email: string;
|
|
31
|
+
date?: string;
|
|
32
|
+
};
|
|
33
|
+
export type CommitInfo = {
|
|
34
|
+
sha: string;
|
|
35
|
+
message: string;
|
|
36
|
+
author: CommitAuthor;
|
|
37
|
+
committer: CommitAuthor;
|
|
38
|
+
};
|
|
39
|
+
export type DiffStats = {
|
|
40
|
+
additions: number;
|
|
41
|
+
deletions: number;
|
|
42
|
+
filesChanged: number;
|
|
43
|
+
};
|
|
44
|
+
export type DiffResult = {
|
|
45
|
+
base: string;
|
|
46
|
+
head: string;
|
|
47
|
+
stats: DiffStats;
|
|
48
|
+
diff: string;
|
|
49
|
+
};
|
|
50
|
+
export type CreateCommitOptions = {
|
|
51
|
+
branch: string;
|
|
52
|
+
message: string;
|
|
53
|
+
author: CommitAuthor;
|
|
54
|
+
baseSha?: string;
|
|
55
|
+
};
|
|
56
|
+
export type FileChange = {
|
|
57
|
+
path: string;
|
|
58
|
+
content: string;
|
|
59
|
+
encoding?: 'utf-8' | 'base64';
|
|
60
|
+
} | {
|
|
61
|
+
path: string;
|
|
62
|
+
action: 'delete';
|
|
63
|
+
};
|
|
64
|
+
export type ListCommitsOptions = {
|
|
65
|
+
branch?: string;
|
|
66
|
+
limit?: number;
|
|
67
|
+
cursor?: string;
|
|
68
|
+
};
|
|
69
|
+
export type ListFilesOptions = {
|
|
70
|
+
path?: string;
|
|
71
|
+
ref?: string;
|
|
72
|
+
};
|
|
73
|
+
export type CreateBranchOptions = {
|
|
74
|
+
name: string;
|
|
75
|
+
from: string;
|
|
76
|
+
};
|
|
77
|
+
export type ApiKeyInfo = {
|
|
78
|
+
id: string;
|
|
79
|
+
key?: string;
|
|
80
|
+
name: string | null;
|
|
81
|
+
scopes: string[];
|
|
82
|
+
lastUsedAt: string | null;
|
|
83
|
+
expiresAt: string | null;
|
|
84
|
+
revokedAt: string | null;
|
|
85
|
+
createdAt: string;
|
|
86
|
+
};
|
|
87
|
+
export type CreateApiKeyOptions = {
|
|
88
|
+
name?: string;
|
|
89
|
+
scopes?: string[];
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":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;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mesadev/sdk",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "SDK for interacting with Mesa Depot - a git remote backend",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "bun build ./src/index.ts --outdir ./dist --target node && tsc --emitDeclarationOnly --outDir ./dist",
|
|
22
|
+
"typecheck": "tsc --noEmit",
|
|
23
|
+
"typecheck:tests": "tsc -p tsconfig.test.json",
|
|
24
|
+
"tsc:build": "tsc -b --declaration --declarationMap --emitDeclarationOnly",
|
|
25
|
+
"test": "bun test",
|
|
26
|
+
"prepublishOnly": "bun run build"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/mesa/depot"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"git",
|
|
34
|
+
"depot",
|
|
35
|
+
"mesa",
|
|
36
|
+
"sdk"
|
|
37
|
+
],
|
|
38
|
+
"author": "Mesa",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"dependencies": {},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/bun": "^1.3.0",
|
|
43
|
+
"bun-types": "^1.3.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"typescript": "^5.0.0"
|
|
47
|
+
}
|
|
48
|
+
}
|