@thirdweb-dev/service-utils 0.0.0-dev-f9e7a8f-20230809203233 → 0.0.0-dev-cdaa524-20230809213020
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/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.cjs.dev.js +1 -1
- package/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.cjs.prod.js +1 -1
- package/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.esm.js +1 -1
- package/dist/declarations/src/core/api.d.ts.map +1 -1
- package/dist/{index-344fbb77.cjs.dev.js → index-2a87d4b6.cjs.dev.js} +6 -12
- package/dist/{index-a9977faf.cjs.prod.js → index-3144e58f.cjs.prod.js} +6 -12
- package/dist/{index-8ed31e63.esm.js → index-70ede577.esm.js} +6 -12
- package/node/dist/thirdweb-dev-service-utils-node.cjs.dev.js +1 -1
- package/node/dist/thirdweb-dev-service-utils-node.cjs.prod.js +1 -1
- package/node/dist/thirdweb-dev-service-utils-node.esm.js +1 -1
- package/package.json +1 -1
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var index = require('../../dist/index-
|
5
|
+
var index = require('../../dist/index-2a87d4b6.cjs.dev.js');
|
6
6
|
var services = require('../../dist/services-a3f36057.cjs.dev.js');
|
7
7
|
var aws4fetch = require('aws4fetch');
|
8
8
|
var zod = require('zod');
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var index = require('../../dist/index-
|
5
|
+
var index = require('../../dist/index-3144e58f.cjs.prod.js');
|
6
6
|
var services = require('../../dist/services-9e185105.cjs.prod.js');
|
7
7
|
var aws4fetch = require('aws4fetch');
|
8
8
|
var zod = require('zod');
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { a as authorize } from '../../dist/index-
|
1
|
+
import { a as authorize } from '../../dist/index-70ede577.esm.js';
|
2
2
|
export { b as SERVICES, S as SERVICE_DEFINITIONS, a as SERVICE_NAMES, g as getServiceByName } from '../../dist/services-86283509.esm.js';
|
3
3
|
import { AwsClient } from 'aws4fetch';
|
4
4
|
import { z } from 'zod';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"../../../../src/core","sources":["api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,eAAe,EAAE,MAAM,EAAE,CAAC;QAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,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AAM,CAAC;IACb,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,WAAW,CAAC,CAgBtB;AAED,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,kBAAkB,CAAC,CAe7B"}
|
@@ -14,13 +14,10 @@ async function fetchKeyMetadataFromApi(clientId, config) {
|
|
14
14
|
"content-type": "application/json"
|
15
15
|
}
|
16
16
|
});
|
17
|
-
|
18
|
-
|
19
|
-
json = await response.json();
|
20
|
-
} catch (e) {
|
21
|
-
throw new Error(`Error fetching key metadata from API: ${response.status} - ${response.statusText} - ${await response.text()}`);
|
17
|
+
if (!response.ok) {
|
18
|
+
throw new Error(`Error fetching key metadata from API: ${response.statusText}`);
|
22
19
|
}
|
23
|
-
return json;
|
20
|
+
return await response.json();
|
24
21
|
}
|
25
22
|
async function fetchAccountFromApi(jwt, config) {
|
26
23
|
const {
|
@@ -36,13 +33,10 @@ async function fetchAccountFromApi(jwt, config) {
|
|
36
33
|
authorization: `Bearer ${jwt}`
|
37
34
|
}
|
38
35
|
});
|
39
|
-
|
40
|
-
|
41
|
-
json = await response.json();
|
42
|
-
} catch (e) {
|
43
|
-
throw new Error(`Error fetching account from API: ${response.status} - ${response.statusText} - ${await response.text()}`);
|
36
|
+
if (!response.ok) {
|
37
|
+
throw new Error(`Error fetching account from API: ${response.statusText}`);
|
44
38
|
}
|
45
|
-
return json;
|
39
|
+
return await response.json();
|
46
40
|
}
|
47
41
|
|
48
42
|
function authorizeClient(authOptions, apiKeyMeta) {
|
@@ -14,13 +14,10 @@ async function fetchKeyMetadataFromApi(clientId, config) {
|
|
14
14
|
"content-type": "application/json"
|
15
15
|
}
|
16
16
|
});
|
17
|
-
|
18
|
-
|
19
|
-
json = await response.json();
|
20
|
-
} catch (e) {
|
21
|
-
throw new Error(`Error fetching key metadata from API: ${response.status} - ${response.statusText} - ${await response.text()}`);
|
17
|
+
if (!response.ok) {
|
18
|
+
throw new Error(`Error fetching key metadata from API: ${response.statusText}`);
|
22
19
|
}
|
23
|
-
return json;
|
20
|
+
return await response.json();
|
24
21
|
}
|
25
22
|
async function fetchAccountFromApi(jwt, config) {
|
26
23
|
const {
|
@@ -36,13 +33,10 @@ async function fetchAccountFromApi(jwt, config) {
|
|
36
33
|
authorization: `Bearer ${jwt}`
|
37
34
|
}
|
38
35
|
});
|
39
|
-
|
40
|
-
|
41
|
-
json = await response.json();
|
42
|
-
} catch (e) {
|
43
|
-
throw new Error(`Error fetching account from API: ${response.status} - ${response.statusText} - ${await response.text()}`);
|
36
|
+
if (!response.ok) {
|
37
|
+
throw new Error(`Error fetching account from API: ${response.statusText}`);
|
44
38
|
}
|
45
|
-
return json;
|
39
|
+
return await response.json();
|
46
40
|
}
|
47
41
|
|
48
42
|
function authorizeClient(authOptions, apiKeyMeta) {
|
@@ -12,13 +12,10 @@ async function fetchKeyMetadataFromApi(clientId, config) {
|
|
12
12
|
"content-type": "application/json"
|
13
13
|
}
|
14
14
|
});
|
15
|
-
|
16
|
-
|
17
|
-
json = await response.json();
|
18
|
-
} catch (e) {
|
19
|
-
throw new Error(`Error fetching key metadata from API: ${response.status} - ${response.statusText} - ${await response.text()}`);
|
15
|
+
if (!response.ok) {
|
16
|
+
throw new Error(`Error fetching key metadata from API: ${response.statusText}`);
|
20
17
|
}
|
21
|
-
return json;
|
18
|
+
return await response.json();
|
22
19
|
}
|
23
20
|
async function fetchAccountFromApi(jwt, config) {
|
24
21
|
const {
|
@@ -34,13 +31,10 @@ async function fetchAccountFromApi(jwt, config) {
|
|
34
31
|
authorization: `Bearer ${jwt}`
|
35
32
|
}
|
36
33
|
});
|
37
|
-
|
38
|
-
|
39
|
-
json = await response.json();
|
40
|
-
} catch (e) {
|
41
|
-
throw new Error(`Error fetching account from API: ${response.status} - ${response.statusText} - ${await response.text()}`);
|
34
|
+
if (!response.ok) {
|
35
|
+
throw new Error(`Error fetching account from API: ${response.statusText}`);
|
42
36
|
}
|
43
|
-
return json;
|
37
|
+
return await response.json();
|
44
38
|
}
|
45
39
|
|
46
40
|
function authorizeClient(authOptions, apiKeyMeta) {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var node_crypto = require('node:crypto');
|
6
|
-
var index = require('../../dist/index-
|
6
|
+
var index = require('../../dist/index-2a87d4b6.cjs.dev.js');
|
7
7
|
var services = require('../../dist/services-a3f36057.cjs.dev.js');
|
8
8
|
|
9
9
|
async function authorizeNode(authInput, serviceConfig) {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var node_crypto = require('node:crypto');
|
6
|
-
var index = require('../../dist/index-
|
6
|
+
var index = require('../../dist/index-3144e58f.cjs.prod.js');
|
7
7
|
var services = require('../../dist/services-9e185105.cjs.prod.js');
|
8
8
|
|
9
9
|
async function authorizeNode(authInput, serviceConfig) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createHash } from 'node:crypto';
|
2
|
-
import { a as authorize } from '../../dist/index-
|
2
|
+
import { a as authorize } from '../../dist/index-70ede577.esm.js';
|
3
3
|
export { b as SERVICES, S as SERVICE_DEFINITIONS, a as SERVICE_NAMES, g as getServiceByName } from '../../dist/services-86283509.esm.js';
|
4
4
|
|
5
5
|
async function authorizeNode(authInput, serviceConfig) {
|
package/package.json
CHANGED