@thirdweb-dev/service-utils 0.2.3 → 0.2.4-nightly-952009cd-20230801011858
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 +1 -0
- package/dist/declarations/src/core/api.d.ts.map +1 -1
- package/dist/declarations/src/core/authorize/client.d.ts.map +1 -1
- package/dist/{index-d752cff8.esm.js → index-1a9e95da.esm.js} +10 -0
- package/dist/{index-4496b57e.cjs.dev.js → index-2a55e378.cjs.prod.js} +10 -0
- package/dist/{index-7c6b47cd.cjs.prod.js → index-c30ff05a.cjs.dev.js} +10 -0
- 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-c30ff05a.cjs.dev.js');
|
6
6
|
var services = require('../../dist/services-a3f36057.cjs.dev.js');
|
7
7
|
|
8
8
|
const DEFAULT_CACHE_TTL_SECONDS = 60;
|
@@ -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-2a55e378.cjs.prod.js');
|
6
6
|
var services = require('../../dist/services-9e185105.cjs.prod.js');
|
7
7
|
|
8
8
|
const DEFAULT_CACHE_TTL_SECONDS = 60;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { a as authorize } from '../../dist/index-
|
1
|
+
import { a as authorize } from '../../dist/index-1a9e95da.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
|
|
4
4
|
const DEFAULT_CACHE_TTL_SECONDS = 60;
|
@@ -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,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,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,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,WAAW,CAAC,CAgBtB"}
|
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,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,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,WAAW,CAAC,CAgBtB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,wBAAgB,eAAe,CAC7B,WAAW,EAAE,0BAA0B,EACvC,UAAU,EAAE,cAAc,GACzB,mBAAmB,
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,wBAAgB,eAAe,CAC7B,WAAW,EAAE,0BAA0B,EACvC,UAAU,EAAE,cAAc,GACzB,mBAAmB,CA+FrB"}
|
@@ -29,6 +29,8 @@ function authorizeClient(authOptions, apiKeyMeta) {
|
|
29
29
|
bundleIds,
|
30
30
|
secretHash
|
31
31
|
} = apiKeyMeta;
|
32
|
+
|
33
|
+
// check for secretHash
|
32
34
|
if (providedSecretHash) {
|
33
35
|
if (secretHash !== providedSecretHash) {
|
34
36
|
return {
|
@@ -44,6 +46,14 @@ function authorizeClient(authOptions, apiKeyMeta) {
|
|
44
46
|
};
|
45
47
|
}
|
46
48
|
|
49
|
+
// check for public restrictions
|
50
|
+
if (domains.includes("*")) {
|
51
|
+
return {
|
52
|
+
authorized: true,
|
53
|
+
apiKeyMeta
|
54
|
+
};
|
55
|
+
}
|
56
|
+
|
47
57
|
// validate domains
|
48
58
|
if (origin) {
|
49
59
|
if (
|
@@ -31,6 +31,8 @@ function authorizeClient(authOptions, apiKeyMeta) {
|
|
31
31
|
bundleIds,
|
32
32
|
secretHash
|
33
33
|
} = apiKeyMeta;
|
34
|
+
|
35
|
+
// check for secretHash
|
34
36
|
if (providedSecretHash) {
|
35
37
|
if (secretHash !== providedSecretHash) {
|
36
38
|
return {
|
@@ -46,6 +48,14 @@ function authorizeClient(authOptions, apiKeyMeta) {
|
|
46
48
|
};
|
47
49
|
}
|
48
50
|
|
51
|
+
// check for public restrictions
|
52
|
+
if (domains.includes("*")) {
|
53
|
+
return {
|
54
|
+
authorized: true,
|
55
|
+
apiKeyMeta
|
56
|
+
};
|
57
|
+
}
|
58
|
+
|
49
59
|
// validate domains
|
50
60
|
if (origin) {
|
51
61
|
if (
|
@@ -31,6 +31,8 @@ function authorizeClient(authOptions, apiKeyMeta) {
|
|
31
31
|
bundleIds,
|
32
32
|
secretHash
|
33
33
|
} = apiKeyMeta;
|
34
|
+
|
35
|
+
// check for secretHash
|
34
36
|
if (providedSecretHash) {
|
35
37
|
if (secretHash !== providedSecretHash) {
|
36
38
|
return {
|
@@ -46,6 +48,14 @@ function authorizeClient(authOptions, apiKeyMeta) {
|
|
46
48
|
};
|
47
49
|
}
|
48
50
|
|
51
|
+
// check for public restrictions
|
52
|
+
if (domains.includes("*")) {
|
53
|
+
return {
|
54
|
+
authorized: true,
|
55
|
+
apiKeyMeta
|
56
|
+
};
|
57
|
+
}
|
58
|
+
|
49
59
|
// validate domains
|
50
60
|
if (origin) {
|
51
61
|
if (
|
@@ -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-c30ff05a.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-2a55e378.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-1a9e95da.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