@forge/os 3.0.1-next.0-experimental-9423de1 → 4.0.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 +26 -3
- package/out/index.d.ts +4 -6
- package/out/index.d.ts.map +1 -1
- package/out/index.js +7 -5
- package/package.json +3 -4
- package/out/__test__/os.test.d.ts +0 -2
- package/out/__test__/os.test.d.ts.map +0 -1
- package/out/__test__/os.test.js +0 -227
- package/out/errorCodes.d.ts +0 -6
- package/out/errorCodes.d.ts.map +0 -1
- package/out/errorCodes.js +0 -8
- package/out/errors.d.ts +0 -21
- package/out/errors.d.ts.map +0 -1
- package/out/errors.js +0 -26
- package/out/os.d.ts +0 -13
- package/out/os.d.ts.map +0 -1
- package/out/os.js +0 -87
- package/out/types.d.ts +0 -20
- package/out/types.d.ts.map +0 -1
- package/out/types.js +0 -2
- package/out/utils/__test__/error-handling.test.d.ts +0 -2
- package/out/utils/__test__/error-handling.test.d.ts.map +0 -1
- package/out/utils/__test__/error-handling.test.js +0 -137
- package/out/utils/error-handling.d.ts +0 -7
- package/out/utils/error-handling.d.ts.map +0 -1
- package/out/utils/error-handling.js +0 -48
- package/out/utils/types.d.ts +0 -3
- package/out/utils/types.d.ts.map +0 -1
- package/out/utils/types.js +0 -2
package/README.md
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
> ⚠️ **Deprecated:** `@forge/os` is deprecated and will no longer receive updates.
|
|
2
|
+
> Please migrate to [`@forge/object-store`](https://www.npmjs.com/package/@forge/object-store).
|
|
3
|
+
|
|
4
|
+
## Migration
|
|
5
|
+
|
|
6
|
+
Replace your import:
|
|
2
7
|
|
|
3
|
-
Usage example:
|
|
4
8
|
```typescript
|
|
5
|
-
|
|
9
|
+
// Before
|
|
10
|
+
import os from '@forge/os';
|
|
11
|
+
|
|
12
|
+
// After
|
|
13
|
+
import objectStore from '@forge/object-store';
|
|
6
14
|
```
|
|
15
|
+
|
|
16
|
+
Note that `@forge/object-store` has a different API surface — it uses **presigned URLs** for uploads and downloads rather than direct buffer transfers. The methods `put` and `download` from `@forge/os` have no direct equivalent; instead use:
|
|
17
|
+
|
|
18
|
+
| `@forge/os` | `@forge/object-store` equivalent |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `os.put(key, buffer)` | `objectStore.createUploadUrl(...)` → upload via the presigned URL |
|
|
21
|
+
| `os.download(key)` | `objectStore.createDownloadUrl(...)` → fetch via the presigned URL |
|
|
22
|
+
| `os.get(key)` | `objectStore.get(key)` |
|
|
23
|
+
| `os.delete(key)` | `objectStore.delete(key)` |
|
|
24
|
+
| `os.createUploadUrl(body)` | `objectStore.createUploadUrl(body)` |
|
|
25
|
+
| `os.createDownloadUrl(key)` | `objectStore.createDownloadUrl(key)` |
|
|
26
|
+
|
|
27
|
+
`@forge/object-store` also adds `createPublicUploadUrl`, `createPublicDownloadUrl`, and `createCDNUrl`.
|
|
28
|
+
|
|
29
|
+
See the [`@forge/object-store` documentation](https://www.npmjs.com/package/@forge/object-store) for full usage details.
|
package/out/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
export { errorCodes, os, ForgeError, ObjectReference };
|
|
6
|
-
export default os;
|
|
1
|
+
export { errorCodes, ForgeError, ObjectReference, UploadUrlBody, PresignedUrlResponse, GetOptions, DeleteOptions, CreateDownloadUrlOptions } from '@forge/object-store';
|
|
2
|
+
export { objectStore as os } from '@forge/object-store';
|
|
3
|
+
import objectStore from '@forge/object-store';
|
|
4
|
+
export default objectStore;
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,aAAa,EACb,wBAAwB,EACzB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,WAAW,IAAI,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,eAAe,WAAW,CAAC"}
|
package/out/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.os = exports.errorCodes = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var object_store_1 = require("@forge/object-store");
|
|
6
|
+
Object.defineProperty(exports, "errorCodes", { enumerable: true, get: function () { return object_store_1.errorCodes; } });
|
|
7
|
+
var object_store_2 = require("@forge/object-store");
|
|
8
|
+
Object.defineProperty(exports, "os", { enumerable: true, get: function () { return object_store_2.objectStore; } });
|
|
9
|
+
const object_store_3 = tslib_1.__importDefault(require("@forge/object-store"));
|
|
10
|
+
exports.default = object_store_3.default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/os",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Forge Object Store SDK",
|
|
5
|
+
"deprecated": "⚠️ @forge/os is deprecated. Please use @forge/object-store instead: https://www.npmjs.com/package/@forge/object-store",
|
|
5
6
|
"author": "Atlassian",
|
|
6
7
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
7
8
|
"main": "out/index.js",
|
|
@@ -16,12 +17,10 @@
|
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
19
|
"@types/node": "20.19.1",
|
|
19
|
-
"expect-type": "^0.17.3",
|
|
20
|
-
"jest-when": "^3.6.0",
|
|
21
20
|
"typescript": "5.9.2"
|
|
22
21
|
},
|
|
23
22
|
"dependencies": {
|
|
24
|
-
"@forge/
|
|
23
|
+
"@forge/object-store": "^2.0.1"
|
|
25
24
|
},
|
|
26
25
|
"publishConfig": {
|
|
27
26
|
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"os.test.d.ts","sourceRoot":"","sources":["../../src/__test__/os.test.ts"],"names":[],"mappings":""}
|
package/out/__test__/os.test.js
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const api_1 = require("@forge/api");
|
|
4
|
-
const os_1 = require("../os");
|
|
5
|
-
jest.mock('@forge/api');
|
|
6
|
-
const DEFAULT_HEADERS = {
|
|
7
|
-
Accept: 'application/json',
|
|
8
|
-
'Content-Type': 'application/json'
|
|
9
|
-
};
|
|
10
|
-
const createMockBody = (body) => {
|
|
11
|
-
return jest.fn().mockResolvedValue(body);
|
|
12
|
-
};
|
|
13
|
-
describe('ObjectStoreClient', () => {
|
|
14
|
-
let osClient;
|
|
15
|
-
let mockFetch;
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
osClient = new os_1.ObjectStoreClient();
|
|
18
|
-
mockFetch = jest.fn();
|
|
19
|
-
api_1.__fetchProduct.mockReturnValue(mockFetch);
|
|
20
|
-
jest.clearAllMocks();
|
|
21
|
-
});
|
|
22
|
-
describe('sendRequest', () => {
|
|
23
|
-
it('should send a request with the correct options and return the response', async () => {
|
|
24
|
-
const mockResponse = { ok: true, status: 200 };
|
|
25
|
-
mockFetch.mockResolvedValue(mockResponse);
|
|
26
|
-
const path = 'api/v1/objects/1';
|
|
27
|
-
const options = { method: 'GET', headers: { ...DEFAULT_HEADERS, 'Custom-Header': 'value' } };
|
|
28
|
-
const response = await osClient['sendRequest'](path, options);
|
|
29
|
-
expect(mockFetch).toHaveBeenCalledWith(path, {
|
|
30
|
-
...options,
|
|
31
|
-
redirect: 'follow',
|
|
32
|
-
headers: {
|
|
33
|
-
...options.headers,
|
|
34
|
-
...DEFAULT_HEADERS
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
expect(response).toBe(mockResponse);
|
|
38
|
-
});
|
|
39
|
-
it('should handle requests without options', async () => {
|
|
40
|
-
const mockResponse = { ok: true, status: 200 };
|
|
41
|
-
mockFetch.mockResolvedValue(mockResponse);
|
|
42
|
-
const path = 'api/v1/objects/1';
|
|
43
|
-
const response = await osClient['sendRequest'](path);
|
|
44
|
-
expect(mockFetch).toHaveBeenCalledWith(path, {
|
|
45
|
-
redirect: 'follow'
|
|
46
|
-
});
|
|
47
|
-
expect(response).toBe(mockResponse);
|
|
48
|
-
});
|
|
49
|
-
it('should handle requests that set headers', async () => {
|
|
50
|
-
const mockResponse = { ok: true, status: 200 };
|
|
51
|
-
mockFetch.mockResolvedValue(mockResponse);
|
|
52
|
-
const path = 'api/v1/objects/1';
|
|
53
|
-
const options = { method: 'GET', headers: { 'Content-Type': 'application/octet-stream' } };
|
|
54
|
-
const response = await osClient['sendRequest'](path, options);
|
|
55
|
-
expect(mockFetch).toHaveBeenCalledWith(path, {
|
|
56
|
-
redirect: 'follow',
|
|
57
|
-
method: 'GET',
|
|
58
|
-
headers: {
|
|
59
|
-
'Content-Type': 'application/octet-stream'
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
expect(response).toBe(mockResponse);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
describe('put', () => {
|
|
66
|
-
it('should send a PUT request with the correct headers and body', async () => {
|
|
67
|
-
const mockResponse = { ok: true, status: 201, text: createMockBody(null) };
|
|
68
|
-
mockFetch.mockResolvedValue(mockResponse);
|
|
69
|
-
const objectId = '1';
|
|
70
|
-
const buffer = Buffer.from('hello world');
|
|
71
|
-
await osClient.put(objectId, buffer);
|
|
72
|
-
expect(mockFetch).toHaveBeenCalledWith('api/v1/objects/1', {
|
|
73
|
-
method: 'PUT',
|
|
74
|
-
redirect: 'follow',
|
|
75
|
-
headers: {
|
|
76
|
-
...DEFAULT_HEADERS,
|
|
77
|
-
'Content-Type': 'application/octet-stream'
|
|
78
|
-
},
|
|
79
|
-
body: buffer
|
|
80
|
-
});
|
|
81
|
-
expect(mockResponse.status).toBe(201);
|
|
82
|
-
expect(mockResponse.text).toHaveBeenCalled();
|
|
83
|
-
});
|
|
84
|
-
it('should send a PUT request with the ttl headers and body', async () => {
|
|
85
|
-
const mockResponse = { ok: true, status: 201, text: createMockBody(null) };
|
|
86
|
-
mockFetch.mockResolvedValue(mockResponse);
|
|
87
|
-
const objectId = '1';
|
|
88
|
-
const buffer = Buffer.from('hello world');
|
|
89
|
-
await osClient.put(objectId, buffer, 100);
|
|
90
|
-
expect(mockFetch).toHaveBeenCalledWith('api/v1/objects/1', {
|
|
91
|
-
method: 'PUT',
|
|
92
|
-
redirect: 'follow',
|
|
93
|
-
headers: {
|
|
94
|
-
...DEFAULT_HEADERS,
|
|
95
|
-
'Content-Type': 'application/octet-stream',
|
|
96
|
-
'ttl-seconds': '100'
|
|
97
|
-
},
|
|
98
|
-
body: buffer
|
|
99
|
-
});
|
|
100
|
-
expect(mockResponse.status).toBe(201);
|
|
101
|
-
expect(mockResponse.text).toHaveBeenCalled();
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
describe('get', () => {
|
|
105
|
-
it('should send a POST request with the correct headers and body', async () => {
|
|
106
|
-
const mockResponse = {
|
|
107
|
-
ok: true,
|
|
108
|
-
status: 200,
|
|
109
|
-
text: createMockBody(JSON.stringify({ message: 'Blåhaj' }))
|
|
110
|
-
};
|
|
111
|
-
mockFetch.mockResolvedValue(mockResponse);
|
|
112
|
-
const objectId = '1';
|
|
113
|
-
const response = await osClient.get(objectId);
|
|
114
|
-
expect(mockFetch).toHaveBeenCalledWith('api/v1/metadata', {
|
|
115
|
-
method: 'POST',
|
|
116
|
-
redirect: 'follow',
|
|
117
|
-
headers: {
|
|
118
|
-
Accept: 'application/json',
|
|
119
|
-
'Content-Type': 'application/json'
|
|
120
|
-
},
|
|
121
|
-
body: JSON.stringify({
|
|
122
|
-
key: objectId
|
|
123
|
-
})
|
|
124
|
-
});
|
|
125
|
-
expect(mockResponse.status).toBe(200);
|
|
126
|
-
expect(mockResponse.text).toHaveBeenCalled();
|
|
127
|
-
expect(response).toEqual({ message: 'Blåhaj' });
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
describe('delete', () => {
|
|
131
|
-
it('should send a POST request with the correct headers and body', async () => {
|
|
132
|
-
const mockResponse = { ok: true, status: 204, text: createMockBody(null) };
|
|
133
|
-
mockFetch.mockResolvedValue(mockResponse);
|
|
134
|
-
const objectId = '1';
|
|
135
|
-
await osClient.delete(objectId);
|
|
136
|
-
expect(mockFetch).toHaveBeenCalledWith('api/v1/delete', {
|
|
137
|
-
method: 'POST',
|
|
138
|
-
redirect: 'follow',
|
|
139
|
-
headers: {
|
|
140
|
-
Accept: 'application/json',
|
|
141
|
-
'Content-Type': 'application/json'
|
|
142
|
-
},
|
|
143
|
-
body: JSON.stringify({ key: objectId })
|
|
144
|
-
});
|
|
145
|
-
expect(mockResponse.status).toBe(204);
|
|
146
|
-
expect(mockResponse.text).toHaveBeenCalled();
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
describe('download', () => {
|
|
150
|
-
it('should send a GET request with the correct headers and return a buffer', async () => {
|
|
151
|
-
const mockResponse = {
|
|
152
|
-
ok: true,
|
|
153
|
-
status: 200,
|
|
154
|
-
arrayBuffer: createMockBody(Buffer.from('I shall be downloaded as buffer!'))
|
|
155
|
-
};
|
|
156
|
-
mockFetch.mockResolvedValue(mockResponse);
|
|
157
|
-
const objectId = '1';
|
|
158
|
-
const response = await osClient.download(objectId);
|
|
159
|
-
expect(mockFetch).toHaveBeenCalledWith('api/v1/objects/1/download', {
|
|
160
|
-
method: 'GET',
|
|
161
|
-
redirect: 'follow',
|
|
162
|
-
headers: {
|
|
163
|
-
Accept: 'application/octet-stream'
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
expect(mockResponse.status).toBe(200);
|
|
167
|
-
expect(mockResponse.arrayBuffer).toHaveBeenCalled();
|
|
168
|
-
expect(response?.toString('utf-8')).toEqual('I shall be downloaded as buffer!');
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
describe('createUploadUrl', () => {
|
|
172
|
-
it('should send a POST request with the correct headers and body, and return a URL', async () => {
|
|
173
|
-
const mockResponse = {
|
|
174
|
-
ok: true,
|
|
175
|
-
status: 200,
|
|
176
|
-
text: createMockBody(JSON.stringify({ url: 'upload-url' }))
|
|
177
|
-
};
|
|
178
|
-
mockFetch.mockResolvedValue(mockResponse);
|
|
179
|
-
const objectId = '1';
|
|
180
|
-
const fileProperties = {
|
|
181
|
-
key: objectId,
|
|
182
|
-
length: 123,
|
|
183
|
-
checksum: 'abc123',
|
|
184
|
-
checksumType: 'SHA1',
|
|
185
|
-
ttlSeconds: 3600,
|
|
186
|
-
overwrite: true
|
|
187
|
-
};
|
|
188
|
-
const response = await osClient.createUploadUrl(fileProperties);
|
|
189
|
-
expect(mockFetch).toHaveBeenCalledWith('api/v1/upload-url', {
|
|
190
|
-
method: 'POST',
|
|
191
|
-
redirect: 'follow',
|
|
192
|
-
headers: {
|
|
193
|
-
Accept: 'application/json',
|
|
194
|
-
'Content-Type': 'application/json'
|
|
195
|
-
},
|
|
196
|
-
body: JSON.stringify(fileProperties)
|
|
197
|
-
});
|
|
198
|
-
expect(mockResponse.status).toBe(200);
|
|
199
|
-
expect(mockResponse.text).toHaveBeenCalled();
|
|
200
|
-
expect(response).toEqual({ url: 'upload-url' });
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
describe('createDownloadUrl', () => {
|
|
204
|
-
it('should send a POST request with the correct headers and body, and return a URL', async () => {
|
|
205
|
-
const mockResponse = {
|
|
206
|
-
ok: true,
|
|
207
|
-
status: 200,
|
|
208
|
-
text: createMockBody(JSON.stringify({ url: 'download-url' }))
|
|
209
|
-
};
|
|
210
|
-
mockFetch.mockResolvedValue(mockResponse);
|
|
211
|
-
const objectId = '1';
|
|
212
|
-
const response = await osClient.createDownloadUrl(objectId);
|
|
213
|
-
expect(mockFetch).toHaveBeenCalledWith('api/v1/download-url', {
|
|
214
|
-
method: 'POST',
|
|
215
|
-
redirect: 'follow',
|
|
216
|
-
headers: {
|
|
217
|
-
Accept: 'application/json',
|
|
218
|
-
'Content-Type': 'application/json'
|
|
219
|
-
},
|
|
220
|
-
body: JSON.stringify({ key: objectId })
|
|
221
|
-
});
|
|
222
|
-
expect(mockResponse.status).toBe(200);
|
|
223
|
-
expect(mockResponse.text).toHaveBeenCalled();
|
|
224
|
-
expect(response).toEqual({ url: 'download-url' });
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
});
|
package/out/errorCodes.d.ts
DELETED
package/out/errorCodes.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errorCodes.d.ts","sourceRoot":"","sources":["../src/errorCodes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;CAIb,CAAC"}
|
package/out/errorCodes.js
DELETED
package/out/errors.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface ForgeError {
|
|
2
|
-
code: string;
|
|
3
|
-
message: string;
|
|
4
|
-
context?: Record<string, unknown>;
|
|
5
|
-
}
|
|
6
|
-
export interface APIErrorResponseDetails {
|
|
7
|
-
status: number;
|
|
8
|
-
statusText: string;
|
|
9
|
-
traceId?: string | null;
|
|
10
|
-
}
|
|
11
|
-
export declare class ForgeObjectStoreError extends Error {
|
|
12
|
-
constructor(message: string);
|
|
13
|
-
}
|
|
14
|
-
export declare class ForgeObjectStoreAPIError extends ForgeObjectStoreError {
|
|
15
|
-
responseDetails: APIErrorResponseDetails;
|
|
16
|
-
code: string;
|
|
17
|
-
message: string;
|
|
18
|
-
context: Record<string, unknown>;
|
|
19
|
-
constructor(responseDetails: APIErrorResponseDetails, forgeError: ForgeError);
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/out/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,wBAAyB,SAAQ,qBAAqB;IACjE,eAAe,EAAE,uBAAuB,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAErB,eAAe,EAAE,uBAAuB,EAAE,UAAU,EAAE,UAAU;CAU7E"}
|
package/out/errors.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ForgeObjectStoreAPIError = exports.ForgeObjectStoreError = void 0;
|
|
4
|
-
class ForgeObjectStoreError extends Error {
|
|
5
|
-
constructor(message) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.name = 'ForgeObjectStoreError';
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.ForgeObjectStoreError = ForgeObjectStoreError;
|
|
11
|
-
class ForgeObjectStoreAPIError extends ForgeObjectStoreError {
|
|
12
|
-
responseDetails;
|
|
13
|
-
code;
|
|
14
|
-
message;
|
|
15
|
-
context;
|
|
16
|
-
constructor(responseDetails, forgeError) {
|
|
17
|
-
super(forgeError.message);
|
|
18
|
-
const { status, statusText, traceId } = responseDetails;
|
|
19
|
-
this.responseDetails = { status, statusText, traceId };
|
|
20
|
-
const { code, message, context, ...bodyData } = forgeError;
|
|
21
|
-
this.code = code;
|
|
22
|
-
this.message = message;
|
|
23
|
-
this.context = { ...context, ...bodyData };
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.ForgeObjectStoreAPIError = ForgeObjectStoreAPIError;
|
package/out/os.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ObjectReference, PresignedUrlResponse, UploadUrlBody } from './types';
|
|
2
|
-
export declare class ObjectStoreClient {
|
|
3
|
-
private sendRequest;
|
|
4
|
-
private requestJson;
|
|
5
|
-
put(key: string, buffer: Buffer, ttlSeconds?: number): Promise<ObjectReference | undefined>;
|
|
6
|
-
get(key: string): Promise<ObjectReference | undefined>;
|
|
7
|
-
delete(key: string): Promise<void>;
|
|
8
|
-
download(key: string): Promise<Buffer | undefined>;
|
|
9
|
-
createUploadUrl(body: UploadUrlBody): Promise<PresignedUrlResponse | undefined>;
|
|
10
|
-
createDownloadUrl(key: string): Promise<PresignedUrlResponse | undefined>;
|
|
11
|
-
}
|
|
12
|
-
export declare const os: ObjectStoreClient;
|
|
13
|
-
//# sourceMappingURL=os.d.ts.map
|
package/out/os.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"os.d.ts","sourceRoot":"","sources":["../src/os.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAS/E,qBAAa,iBAAiB;YAEd,WAAW;YASX,WAAW;IAqCZ,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAa3F,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAgBtD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAalC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAoBlD,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;IAgB/E,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;CAWvF;AAED,eAAO,MAAM,EAAE,mBAA0B,CAAC"}
|
package/out/os.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.os = exports.ObjectStoreClient = void 0;
|
|
4
|
-
const api_1 = require("@forge/api");
|
|
5
|
-
const error_handling_1 = require("./utils/error-handling");
|
|
6
|
-
const errors_1 = require("./errors");
|
|
7
|
-
var ValidHttpMethod;
|
|
8
|
-
(function (ValidHttpMethod) {
|
|
9
|
-
ValidHttpMethod["PUT"] = "PUT";
|
|
10
|
-
ValidHttpMethod["GET"] = "GET";
|
|
11
|
-
ValidHttpMethod["DELETE"] = "DELETE";
|
|
12
|
-
ValidHttpMethod["POST"] = "POST";
|
|
13
|
-
})(ValidHttpMethod || (ValidHttpMethod = {}));
|
|
14
|
-
class ObjectStoreClient {
|
|
15
|
-
async sendRequest(path, options) {
|
|
16
|
-
return await (0, api_1.__fetchProduct)({ provider: 'app', remote: 'os', type: 'os' })(path, {
|
|
17
|
-
...options,
|
|
18
|
-
redirect: 'follow',
|
|
19
|
-
headers: options?.headers
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
async requestJson(method, path, headers, body) {
|
|
23
|
-
const response = await this.sendRequest(path, {
|
|
24
|
-
method,
|
|
25
|
-
headers,
|
|
26
|
-
body: body
|
|
27
|
-
});
|
|
28
|
-
if (response.status === 404) {
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
await (0, error_handling_1.checkResponseError)(response);
|
|
32
|
-
const responseText = await response.text();
|
|
33
|
-
if (!responseText || responseText.trim().length === 0) {
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
try {
|
|
37
|
-
return JSON.parse(responseText);
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
throw new errors_1.ForgeObjectStoreError(`Unexpected error. Response was not valid JSON: ${responseText}`);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
async put(key, buffer, ttlSeconds) {
|
|
44
|
-
const headers = {
|
|
45
|
-
Accept: 'application/json',
|
|
46
|
-
'Content-Type': 'application/octet-stream',
|
|
47
|
-
...(ttlSeconds ? { 'ttl-seconds': ttlSeconds.toString() } : {})
|
|
48
|
-
};
|
|
49
|
-
return this.requestJson(ValidHttpMethod.PUT, `api/v1/objects/${key}`, headers, buffer);
|
|
50
|
-
}
|
|
51
|
-
async get(key) {
|
|
52
|
-
return this.requestJson(ValidHttpMethod.POST, `api/v1/metadata`, {
|
|
53
|
-
Accept: 'application/json',
|
|
54
|
-
'Content-Type': 'application/json'
|
|
55
|
-
}, JSON.stringify({ key }));
|
|
56
|
-
}
|
|
57
|
-
async delete(key) {
|
|
58
|
-
return this.requestJson(ValidHttpMethod.POST, `api/v1/delete`, { Accept: 'application/json', 'Content-Type': 'application/json' }, JSON.stringify({ key }));
|
|
59
|
-
}
|
|
60
|
-
async download(key) {
|
|
61
|
-
const response = await this.sendRequest(`api/v1/objects/${key}/download`, {
|
|
62
|
-
method: ValidHttpMethod.GET,
|
|
63
|
-
headers: {
|
|
64
|
-
Accept: 'application/octet-stream'
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
if (response.status === 404) {
|
|
68
|
-
return undefined;
|
|
69
|
-
}
|
|
70
|
-
await (0, error_handling_1.checkResponseError)(response);
|
|
71
|
-
return await response.arrayBuffer().then((buffer) => Buffer.from(buffer));
|
|
72
|
-
}
|
|
73
|
-
async createUploadUrl(body) {
|
|
74
|
-
return this.requestJson(ValidHttpMethod.POST, 'api/v1/upload-url', {
|
|
75
|
-
Accept: 'application/json',
|
|
76
|
-
'Content-Type': 'application/json'
|
|
77
|
-
}, JSON.stringify(body));
|
|
78
|
-
}
|
|
79
|
-
async createDownloadUrl(key) {
|
|
80
|
-
return this.requestJson(ValidHttpMethod.POST, `api/v1/download-url`, {
|
|
81
|
-
Accept: 'application/json',
|
|
82
|
-
'Content-Type': 'application/json'
|
|
83
|
-
}, JSON.stringify({ key }));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
exports.ObjectStoreClient = ObjectStoreClient;
|
|
87
|
-
exports.os = new ObjectStoreClient();
|
package/out/types.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface ObjectReference {
|
|
2
|
-
key: string;
|
|
3
|
-
checksum: string;
|
|
4
|
-
size: number;
|
|
5
|
-
createdAt?: string;
|
|
6
|
-
currentVersion?: string;
|
|
7
|
-
contentType?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface UploadUrlBody {
|
|
10
|
-
key: string;
|
|
11
|
-
length: number;
|
|
12
|
-
checksum: string;
|
|
13
|
-
checksumType: 'SHA1' | 'SHA256' | 'CRC32' | 'CRC32C';
|
|
14
|
-
ttlSeconds?: number;
|
|
15
|
-
overwrite?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface PresignedUrlResponse {
|
|
18
|
-
url: string;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=types.d.ts.map
|
package/out/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;CACb"}
|
package/out/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-handling.test.d.ts","sourceRoot":"","sources":["../../../src/utils/__test__/error-handling.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const errorCodes_1 = require("../../errorCodes");
|
|
4
|
-
const error_handling_1 = require("../error-handling");
|
|
5
|
-
const errors_1 = require("../../errors");
|
|
6
|
-
describe('error-handling', () => {
|
|
7
|
-
it('isForgeError', () => {
|
|
8
|
-
expect((0, error_handling_1.isForgeError)({ code: 'code', message: 'message' })).toBe(true);
|
|
9
|
-
expect((0, error_handling_1.isForgeError)({ code: 'code' })).toBe(false);
|
|
10
|
-
expect((0, error_handling_1.isForgeError)({ message: 'message' })).toBe(false);
|
|
11
|
-
expect((0, error_handling_1.isForgeError)({})).toBe(false);
|
|
12
|
-
expect((0, error_handling_1.isForgeError)(null)).toBe(false);
|
|
13
|
-
expect((0, error_handling_1.isForgeError)(undefined)).toBe(false);
|
|
14
|
-
expect((0, error_handling_1.isForgeError)('string')).toBe(false);
|
|
15
|
-
expect((0, error_handling_1.isForgeError)(123)).toBe(false);
|
|
16
|
-
});
|
|
17
|
-
it('safeGetParsedBody', () => {
|
|
18
|
-
expect((0, error_handling_1.safeGetParsedBody)('{"valid": "json"}')).toEqual({ valid: 'json' });
|
|
19
|
-
expect((0, error_handling_1.safeGetParsedBody)('invalid json')).toBeUndefined();
|
|
20
|
-
});
|
|
21
|
-
describe('checkResponseError', () => {
|
|
22
|
-
const traceId = 'trace-id';
|
|
23
|
-
it('should do nothing if response is ok', async () => {
|
|
24
|
-
const mockResponse = new Response('OK', {
|
|
25
|
-
status: 200,
|
|
26
|
-
statusText: 'OK'
|
|
27
|
-
});
|
|
28
|
-
await expect((0, error_handling_1.checkResponseError)(mockResponse)).resolves.toBeUndefined();
|
|
29
|
-
});
|
|
30
|
-
describe('Forge errors - ForgeObjectStoreAPIError', () => {
|
|
31
|
-
const message = 'A test error has occurred';
|
|
32
|
-
const code = 'ERROR_CODE';
|
|
33
|
-
it('should return a ForgeObjectStoreError when response body is a Forge error', async () => {
|
|
34
|
-
const mockResponse = new Response(JSON.stringify({ code, message }), {
|
|
35
|
-
status: 400,
|
|
36
|
-
statusText: 'Bad Request',
|
|
37
|
-
headers: { 'x-trace-id': traceId }
|
|
38
|
-
});
|
|
39
|
-
await expect(async () => await (0, error_handling_1.checkResponseError)(mockResponse)).rejects.toMatchError(new errors_1.ForgeObjectStoreAPIError({
|
|
40
|
-
status: 400,
|
|
41
|
-
statusText: 'Bad Request',
|
|
42
|
-
traceId
|
|
43
|
-
}, { code, message }));
|
|
44
|
-
});
|
|
45
|
-
it('should include context if present in the Forge error', async () => {
|
|
46
|
-
const context = { key: 'value' };
|
|
47
|
-
const mockResponse = new Response(JSON.stringify({ code, message, context }), {
|
|
48
|
-
status: 400,
|
|
49
|
-
statusText: 'Bad Request',
|
|
50
|
-
headers: { 'x-trace-id': traceId }
|
|
51
|
-
});
|
|
52
|
-
await expect(async () => await (0, error_handling_1.checkResponseError)(mockResponse)).rejects.toMatchError(new errors_1.ForgeObjectStoreAPIError({
|
|
53
|
-
status: 400,
|
|
54
|
-
statusText: 'Bad Request',
|
|
55
|
-
traceId
|
|
56
|
-
}, { code, message, context }));
|
|
57
|
-
});
|
|
58
|
-
it('should include top level additional fields if present in the Forge error', async () => {
|
|
59
|
-
const extraFields = { extraValue: 'value', debug: true };
|
|
60
|
-
const mockResponse = new Response(JSON.stringify({ code, message, ...extraFields }), {
|
|
61
|
-
status: 400,
|
|
62
|
-
statusText: 'Bad Request',
|
|
63
|
-
headers: { 'x-trace-id': traceId }
|
|
64
|
-
});
|
|
65
|
-
await expect(async () => await (0, error_handling_1.checkResponseError)(mockResponse)).rejects.toMatchError(new errors_1.ForgeObjectStoreAPIError({
|
|
66
|
-
status: 400,
|
|
67
|
-
statusText: 'Bad Request',
|
|
68
|
-
traceId
|
|
69
|
-
}, { code, message, context: extraFields }));
|
|
70
|
-
});
|
|
71
|
-
it('should merge context and additional top level fields if both present in the Forge error', async () => {
|
|
72
|
-
const context = { key: 'value' };
|
|
73
|
-
const extraFields = { extraValue: 'value', debug: true };
|
|
74
|
-
const mockResponse = new Response(JSON.stringify({ code, message, context, ...extraFields }), {
|
|
75
|
-
status: 400,
|
|
76
|
-
statusText: 'Bad Request',
|
|
77
|
-
headers: { 'x-trace-id': traceId }
|
|
78
|
-
});
|
|
79
|
-
await expect(async () => await (0, error_handling_1.checkResponseError)(mockResponse)).rejects.toThrowError(new errors_1.ForgeObjectStoreAPIError({
|
|
80
|
-
status: 400,
|
|
81
|
-
statusText: 'Bad Request',
|
|
82
|
-
traceId
|
|
83
|
-
}, { code, message, context: { ...context, ...extraFields } }));
|
|
84
|
-
});
|
|
85
|
-
describe('Handle non forge errors', () => {
|
|
86
|
-
it('returns an UNKNOWN_ERROR when no response body', async () => {
|
|
87
|
-
const mockResponse = new Response(undefined, {
|
|
88
|
-
status: 404,
|
|
89
|
-
statusText: 'Not Found',
|
|
90
|
-
headers: { 'x-trace-id': traceId }
|
|
91
|
-
});
|
|
92
|
-
await expect(async () => await (0, error_handling_1.checkResponseError)(mockResponse)).rejects.toMatchError(new errors_1.ForgeObjectStoreAPIError({
|
|
93
|
-
status: 404,
|
|
94
|
-
statusText: 'Not Found',
|
|
95
|
-
traceId
|
|
96
|
-
}, {
|
|
97
|
-
code: errorCodes_1.errorCodes.UNKNOWN_ERROR,
|
|
98
|
-
context: { responseText: '' },
|
|
99
|
-
message: 'Unexpected error in Forge OS API request'
|
|
100
|
-
}));
|
|
101
|
-
});
|
|
102
|
-
it("returns UNKNOWN_ERROR if there is a JSON body that isn't a forge error", async () => {
|
|
103
|
-
const body = JSON.stringify({ not: 'a forge error' });
|
|
104
|
-
const mockResponse = new Response(body, {
|
|
105
|
-
status: 500,
|
|
106
|
-
statusText: 'Internal Server Error',
|
|
107
|
-
headers: { 'x-trace-id': traceId }
|
|
108
|
-
});
|
|
109
|
-
await expect(async () => await (0, error_handling_1.checkResponseError)(mockResponse)).rejects.toMatchError(new errors_1.ForgeObjectStoreAPIError({
|
|
110
|
-
status: 500,
|
|
111
|
-
statusText: 'Internal Server Error',
|
|
112
|
-
traceId
|
|
113
|
-
}, {
|
|
114
|
-
code: errorCodes_1.errorCodes.UNKNOWN_ERROR,
|
|
115
|
-
context: { responseText: body },
|
|
116
|
-
message: 'Unexpected error in Forge OS API request'
|
|
117
|
-
}));
|
|
118
|
-
});
|
|
119
|
-
it('returns RATE_LIMIT_EXCEEDED when status is 429', async () => {
|
|
120
|
-
const mockResponse = new Response(undefined, {
|
|
121
|
-
status: 429,
|
|
122
|
-
statusText: 'Rate Limit Exceeded',
|
|
123
|
-
headers: { 'x-trace-id': traceId }
|
|
124
|
-
});
|
|
125
|
-
await expect(async () => await (0, error_handling_1.checkResponseError)(mockResponse)).rejects.toMatchError(new errors_1.ForgeObjectStoreAPIError({
|
|
126
|
-
status: 429,
|
|
127
|
-
statusText: 'Rate Limit Exceeded',
|
|
128
|
-
traceId
|
|
129
|
-
}, {
|
|
130
|
-
code: errorCodes_1.errorCodes.RATE_LIMIT_EXCEEDED,
|
|
131
|
-
message: 'You have exceeded the rate limits for OS. Please wait and try again later.'
|
|
132
|
-
}));
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { APIResponse } from '@forge/api';
|
|
2
|
-
import { ForgeError } from '../errors';
|
|
3
|
-
export declare function isForgeError(body: unknown): body is ForgeError;
|
|
4
|
-
export declare function safeGetParsedBody(text: string): unknown | undefined;
|
|
5
|
-
export declare function extractTraceId(response: APIResponse): string | null;
|
|
6
|
-
export declare function checkResponseError(response: APIResponse, message?: string): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=error-handling.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/utils/error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAA2B,UAAU,EAA4B,MAAM,WAAW,CAAC;AAG1F,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,UAAU,CAE9D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAMnE;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAInE;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B/F"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isForgeError = isForgeError;
|
|
4
|
-
exports.safeGetParsedBody = safeGetParsedBody;
|
|
5
|
-
exports.extractTraceId = extractTraceId;
|
|
6
|
-
exports.checkResponseError = checkResponseError;
|
|
7
|
-
const errors_1 = require("../errors");
|
|
8
|
-
const errorCodes_1 = require("../errorCodes");
|
|
9
|
-
function isForgeError(body) {
|
|
10
|
-
return typeof body === 'object' && body !== null && 'code' in body && 'message' in body;
|
|
11
|
-
}
|
|
12
|
-
function safeGetParsedBody(text) {
|
|
13
|
-
try {
|
|
14
|
-
return JSON.parse(text);
|
|
15
|
-
}
|
|
16
|
-
catch (error) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function extractTraceId(response) {
|
|
21
|
-
return (response.headers.get('x-b3-traceid') || response.headers.get('x-trace-id') || response.headers.get('atl-traceid'));
|
|
22
|
-
}
|
|
23
|
-
async function checkResponseError(response, message) {
|
|
24
|
-
if (response.ok) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const responseText = await response.text();
|
|
28
|
-
const details = {
|
|
29
|
-
status: response.status,
|
|
30
|
-
statusText: response.statusText,
|
|
31
|
-
traceId: extractTraceId(response)
|
|
32
|
-
};
|
|
33
|
-
if (details.status === 429) {
|
|
34
|
-
throw new errors_1.ForgeObjectStoreAPIError(details, {
|
|
35
|
-
code: errorCodes_1.errorCodes.RATE_LIMIT_EXCEEDED,
|
|
36
|
-
message: 'You have exceeded the rate limits for OS. Please wait and try again later.'
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
const parsedBody = safeGetParsedBody(responseText);
|
|
40
|
-
if (parsedBody && isForgeError(parsedBody)) {
|
|
41
|
-
throw new errors_1.ForgeObjectStoreAPIError(details, parsedBody);
|
|
42
|
-
}
|
|
43
|
-
throw new errors_1.ForgeObjectStoreAPIError(details, {
|
|
44
|
-
code: errorCodes_1.errorCodes.UNKNOWN_ERROR,
|
|
45
|
-
message: message || 'Unexpected error in Forge OS API request',
|
|
46
|
-
context: { responseText }
|
|
47
|
-
});
|
|
48
|
-
}
|
package/out/utils/types.d.ts
DELETED
package/out/utils/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC,CAAC"}
|
package/out/utils/types.js
DELETED