@thirdweb-dev/service-utils 0.9.9 → 0.9.10-nightly-88533d9113dc07c97cfaf0162591477c7056e69b-20250522000412
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.
@@ -14,7 +14,7 @@ function authorizeService(teamAndProjectResponse, serviceConfig) {
|
|
14
14
|
if (!team.enabledScopes.includes(serviceConfig.serviceScope)) {
|
15
15
|
return {
|
16
16
|
authorized: false,
|
17
|
-
errorMessage: `Invalid request: Unauthorized service: ${serviceConfig.serviceScope}. You can view the restrictions for this team in your dashboard: https://thirdweb.com`,
|
17
|
+
errorMessage: `Invalid request: Unauthorized service: ${serviceConfig.serviceScope} for team: ${team.name} (${team.id}). You can view the restrictions for this team in your dashboard: https://thirdweb.com`,
|
18
18
|
errorCode: "SERVICE_UNAUTHORIZED",
|
19
19
|
status: 403,
|
20
20
|
};
|
@@ -33,7 +33,7 @@ function authorizeService(teamAndProjectResponse, serviceConfig) {
|
|
33
33
|
if (!service) {
|
34
34
|
return {
|
35
35
|
authorized: false,
|
36
|
-
errorMessage: `Invalid request: Unauthorized service: ${serviceConfig.serviceScope}. You can view the restrictions on this project in your dashboard: https://thirdweb.com`,
|
36
|
+
errorMessage: `Invalid request: Unauthorized service: ${serviceConfig.serviceScope} for project: ${project.name} (${project.publishableKey}). You can view the restrictions on this project in your dashboard: https://thirdweb.com`,
|
37
37
|
errorCode: "SERVICE_UNAUTHORIZED",
|
38
38
|
status: 403,
|
39
39
|
};
|
@@ -44,7 +44,7 @@ function authorizeService(teamAndProjectResponse, serviceConfig) {
|
|
44
44
|
if (!isActionAllowed) {
|
45
45
|
return {
|
46
46
|
authorized: false,
|
47
|
-
errorMessage: `Invalid request: Unauthorized action: ${serviceConfig.serviceScope} ${serviceConfig.serviceAction}. You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key`,
|
47
|
+
errorMessage: `Invalid request: Unauthorized action: ${serviceConfig.serviceScope} ${serviceConfig.serviceAction} for project: ${project.name} (${project.publishableKey}). You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key`,
|
48
48
|
errorCode: "SERVICE_ACTION_UNAUTHORIZED",
|
49
49
|
status: 403,
|
50
50
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/core/authorize/service.ts"],"names":[],"mappings":";;AAGA,4CAoEC;AApED,SAAgB,gBAAgB,CAC9B,sBAA8C,EAC9C,aAAgC;IAEhC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,sBAAsB,CAAC;IAE7D,IAAI,aAAa,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;QACxC,qFAAqF;QACrF,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,IAAI;YACJ,UAAU;SACX,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC;QAC7D,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,0CAA0C,aAAa,CAAC,YAAY,
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/core/authorize/service.ts"],"names":[],"mappings":";;AAGA,4CAoEC;AApED,SAAgB,gBAAgB,CAC9B,sBAA8C,EAC9C,aAAgC;IAEhC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,sBAAsB,CAAC;IAE7D,IAAI,aAAa,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;QACxC,qFAAqF;QACrF,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,IAAI;YACJ,UAAU;SACX,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC;QAC7D,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,0CAA0C,a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KACX,CAAC;AACJ,CAAC"}
|
@@ -11,7 +11,7 @@ export function authorizeService(teamAndProjectResponse, serviceConfig) {
|
|
11
11
|
if (!team.enabledScopes.includes(serviceConfig.serviceScope)) {
|
12
12
|
return {
|
13
13
|
authorized: false,
|
14
|
-
errorMessage: `Invalid request: Unauthorized service: ${serviceConfig.serviceScope}. You can view the restrictions for this team in your dashboard: https://thirdweb.com`,
|
14
|
+
errorMessage: `Invalid request: Unauthorized service: ${serviceConfig.serviceScope} for team: ${team.name} (${team.id}). You can view the restrictions for this team in your dashboard: https://thirdweb.com`,
|
15
15
|
errorCode: "SERVICE_UNAUTHORIZED",
|
16
16
|
status: 403,
|
17
17
|
};
|
@@ -30,7 +30,7 @@ export function authorizeService(teamAndProjectResponse, serviceConfig) {
|
|
30
30
|
if (!service) {
|
31
31
|
return {
|
32
32
|
authorized: false,
|
33
|
-
errorMessage: `Invalid request: Unauthorized service: ${serviceConfig.serviceScope}. You can view the restrictions on this project in your dashboard: https://thirdweb.com`,
|
33
|
+
errorMessage: `Invalid request: Unauthorized service: ${serviceConfig.serviceScope} for project: ${project.name} (${project.publishableKey}). You can view the restrictions on this project in your dashboard: https://thirdweb.com`,
|
34
34
|
errorCode: "SERVICE_UNAUTHORIZED",
|
35
35
|
status: 403,
|
36
36
|
};
|
@@ -41,7 +41,7 @@ export function authorizeService(teamAndProjectResponse, serviceConfig) {
|
|
41
41
|
if (!isActionAllowed) {
|
42
42
|
return {
|
43
43
|
authorized: false,
|
44
|
-
errorMessage: `Invalid request: Unauthorized action: ${serviceConfig.serviceScope} ${serviceConfig.serviceAction}. You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key`,
|
44
|
+
errorMessage: `Invalid request: Unauthorized action: ${serviceConfig.serviceScope} ${serviceConfig.serviceAction} for project: ${project.name} (${project.publishableKey}). You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key`,
|
45
45
|
errorCode: "SERVICE_ACTION_UNAUTHORIZED",
|
46
46
|
status: 403,
|
47
47
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/core/authorize/service.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,gBAAgB,CAC9B,sBAA8C,EAC9C,aAAgC;IAEhC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,sBAAsB,CAAC;IAE7D,IAAI,aAAa,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;QACxC,qFAAqF;QACrF,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,IAAI;YACJ,UAAU;SACX,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC;QAC7D,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,0CAA0C,aAAa,CAAC,YAAY,
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../src/core/authorize/service.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,gBAAgB,CAC9B,sBAA8C,EAC9C,aAAgC;IAEhC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,sBAAsB,CAAC;IAE7D,IAAI,aAAa,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;QACxC,qFAAqF;QACrF,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,IAAI;YACJ,UAAU;SACX,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC;QAC7D,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,0CAA0C,aAAa,CAAC,YAAY,cAAc,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,wFAAwF;YAC7M,SAAS,EAAE,sBAAsB;YACjC,MAAM,EAAE,GAAG;SACZ,CAAC;IACJ,CAAC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.10-nightly-88533d9113dc07c97cfaf0162591477c7056e69b-20250522000412",
|
4
4
|
"type": "module",
|
5
5
|
"main": "dist/cjs/index.js",
|
6
6
|
"module": "dist/esm/index.js",
|
@@ -50,11 +50,11 @@
|
|
50
50
|
"zod": "3.24.3"
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
53
|
-
"@cloudflare/workers-types": "4.
|
53
|
+
"@cloudflare/workers-types": "4.20250520.0",
|
54
54
|
"@types/node": "22.14.1",
|
55
55
|
"@vitest/coverage-v8": "3.1.2",
|
56
56
|
"typescript": "5.8.3",
|
57
|
-
"vitest": "3.1.
|
57
|
+
"vitest": "3.1.4"
|
58
58
|
},
|
59
59
|
"scripts": {
|
60
60
|
"format": "biome format ./src --write",
|