@c15t/backend 1.3.1 → 1.4.2-canary-20250702103734
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/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +13 -0
- package/dist/core.cjs +3 -5
- package/dist/core.js +3 -5
- package/dist/handlers/consent/show-banner.handler.d.ts.map +1 -1
- package/dist/router.cjs +3 -5
- package/dist/router.js +3 -5
- package/package.json +2 -2
- package/src/handlers/consent/show-banner.handler.ts +2 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
> @c15t/backend@1.
|
|
2
|
+
> @c15t/backend@1.4.2-canary-20250702103734 build /home/runner/work/c15t/c15t/packages/backend
|
|
3
3
|
> rslib build
|
|
4
4
|
|
|
5
5
|
Rslib v0.6.2
|
|
6
6
|
|
|
7
|
-
ready built in [1m0.
|
|
8
|
-
ready built in [1m0.
|
|
7
|
+
ready built in [1m0.71[22m s[90m (esm)[39m
|
|
8
|
+
ready built in [1m0.71[22m s[90m (cjs)[39m
|
|
9
9
|
start generating declaration files... [90m(esm)[39m
|
|
10
10
|
start generating declaration files... [90m(cjs)[39m
|
|
11
|
-
ready declaration files generated in [1m9.
|
|
12
|
-
ready declaration files generated in [1m9.
|
|
11
|
+
ready declaration files generated in [1m9.46[22m s [90m(esm)[39m
|
|
12
|
+
ready declaration files generated in [1m9.43[22m s [90m(cjs)[39m
|
|
13
13
|
|
|
14
14
|
[34m File (esm) Size [39m
|
|
15
15
|
[2mdist/pkgs/types/[22m[36mindex.js[39m 0.00 kB
|
|
@@ -19,16 +19,16 @@ ready declaration files generated in [1m9.73[22m s [90m(cjs)[39m
|
|
|
19
19
|
[2mdist/pkgs/db-adapters/adapters/memory-adapter/[22m[36mindex.js[39m 44.3 kB
|
|
20
20
|
[2mdist/pkgs/db-adapters/adapters/prisma-adapter/[22m[36mindex.js[39m 47.5 kB
|
|
21
21
|
[2mdist/pkgs/db-adapters/adapters/drizzle-adapter/[22m[36mindex.js[39m 50.0 kB
|
|
22
|
-
[2mdist/[22m[36mrouter.js[39m 50.
|
|
22
|
+
[2mdist/[22m[36mrouter.js[39m 50.5 kB
|
|
23
23
|
[2mdist/pkgs/migrations/[22m[36mindex.js[39m 50.7 kB
|
|
24
24
|
[2mdist/pkgs/db-adapters/adapters/kysely-adapter/[22m[36mindex.js[39m 55.3 kB
|
|
25
25
|
[2mdist/pkgs/data-model/schema/[22m[36mindex.js[39m 60.9 kB
|
|
26
26
|
[2mdist/schema/[22m[36mindex.js[39m 61.2 kB
|
|
27
27
|
[2mdist/pkgs/data-model/[22m[36mindex.js[39m 61.8 kB
|
|
28
28
|
[2mdist/pkgs/db-adapters/[22m[36mindex.js[39m 89.6 kB
|
|
29
|
-
[2mdist/[22m[36mcore.js[39m 155.
|
|
29
|
+
[2mdist/[22m[36mcore.js[39m 155.2 kB
|
|
30
30
|
|
|
31
|
-
[34mTotal:[39m
|
|
31
|
+
[34mTotal:[39m 780.2 kB
|
|
32
32
|
|
|
33
33
|
[2m -----[22m
|
|
34
34
|
|
|
@@ -39,7 +39,7 @@ ready declaration files generated in [1m9.73[22m s [90m(cjs)[39m
|
|
|
39
39
|
[2mdist/[22m[36mcontracts.cjs[39m 31.7 kB
|
|
40
40
|
[2mdist/pkgs/db-adapters/adapters/memory-adapter/[22m[36mindex.cjs[39m 45.3 kB
|
|
41
41
|
[2mdist/pkgs/db-adapters/adapters/prisma-adapter/[22m[36mindex.cjs[39m 48.4 kB
|
|
42
|
-
[2mdist/[22m[36mrouter.cjs[39m 50.
|
|
42
|
+
[2mdist/[22m[36mrouter.cjs[39m 50.2 kB
|
|
43
43
|
[2mdist/pkgs/db-adapters/adapters/drizzle-adapter/[22m[36mindex.cjs[39m 50.7 kB
|
|
44
44
|
[2mdist/pkgs/migrations/[22m[36mindex.cjs[39m 52.3 kB
|
|
45
45
|
[2mdist/pkgs/db-adapters/adapters/kysely-adapter/[22m[36mindex.cjs[39m 56.3 kB
|
|
@@ -47,7 +47,7 @@ ready declaration files generated in [1m9.73[22m s [90m(cjs)[39m
|
|
|
47
47
|
[2mdist/schema/[22m[36mindex.cjs[39m 64.5 kB
|
|
48
48
|
[2mdist/pkgs/data-model/[22m[36mindex.cjs[39m 66.0 kB
|
|
49
49
|
[2mdist/pkgs/db-adapters/[22m[36mindex.cjs[39m 90.8 kB
|
|
50
|
-
[2mdist/[22m[36mcore.cjs[39m 154.
|
|
50
|
+
[2mdist/[22m[36mcore.cjs[39m 154.1 kB
|
|
51
51
|
|
|
52
|
-
[34mTotal:[39m 800.
|
|
52
|
+
[34mTotal:[39m 800.7 kB
|
|
53
53
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @c15t/backend
|
|
2
2
|
|
|
3
|
+
## 1.4.2-canary-20250702103734
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [cd218e7]
|
|
8
|
+
- @c15t/translations@1.4.2-canary-20250702103734
|
|
9
|
+
|
|
10
|
+
## 1.4.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 8afd304: fix(backend): add custom c15t headers to override providers
|
|
15
|
+
|
|
3
16
|
## 1.3.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/core.cjs
CHANGED
|
@@ -2233,9 +2233,7 @@ function getBaseURL(url, path) {
|
|
|
2233
2233
|
const fromEnv = env.C15T_URL || env.NEXT_PUBLIC_C15T_URL || env.PUBLIC_C15T_URL || env.NUXT_PUBLIC_C15T_URL || env.NUXT_PUBLIC_AUTH_URL || ('/' !== env.BASE_URL ? env.BASE_URL : void 0);
|
|
2234
2234
|
if (fromEnv) return withPath(fromEnv, path);
|
|
2235
2235
|
}
|
|
2236
|
-
var package_namespaceObject = {
|
|
2237
|
-
i8: "1.3.1"
|
|
2238
|
-
};
|
|
2236
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.4.2-canary-20250702103734"}');
|
|
2239
2237
|
const createRegistry = (ctx)=>({
|
|
2240
2238
|
...auditLogRegistry(ctx),
|
|
2241
2239
|
...consentRegistry(ctx),
|
|
@@ -3095,8 +3093,8 @@ const show_banner_handler_showConsentBanner = os.consent.showBanner.handler(({ c
|
|
|
3095
3093
|
if (!value) return null;
|
|
3096
3094
|
return Array.isArray(value) ? value[0] ?? null : value;
|
|
3097
3095
|
};
|
|
3098
|
-
const countryCode = normalizeHeader(headers.get('cf-ipcountry')) ?? normalizeHeader(headers.get('x-vercel-ip-country')) ?? normalizeHeader(headers.get('x-amz-cf-ipcountry')) ?? normalizeHeader(headers.get('x-country-code'));
|
|
3099
|
-
const regionCode = normalizeHeader(headers.get('x-vercel-ip-country-region')) ?? normalizeHeader(headers.get('x-region-code'));
|
|
3096
|
+
const countryCode = normalizeHeader(headers.get('x-c15t-country')) ?? normalizeHeader(headers.get('cf-ipcountry')) ?? normalizeHeader(headers.get('x-vercel-ip-country')) ?? normalizeHeader(headers.get('x-amz-cf-ipcountry')) ?? normalizeHeader(headers.get('x-country-code'));
|
|
3097
|
+
const regionCode = normalizeHeader(headers.get('x-c15t-region')) ?? normalizeHeader(headers.get('x-vercel-ip-country-region')) ?? normalizeHeader(headers.get('x-region-code'));
|
|
3100
3098
|
const acceptLanguage = normalizeHeader(headers.get('accept-language'));
|
|
3101
3099
|
const preferredLanguage = getPreferredLanguage(acceptLanguage);
|
|
3102
3100
|
const { showConsentBanner, jurisdictionCode, message } = checkJurisdiction(countryCode);
|
package/dist/core.js
CHANGED
|
@@ -2198,9 +2198,7 @@ function getBaseURL(url, path) {
|
|
|
2198
2198
|
const fromEnv = env.C15T_URL || env.NEXT_PUBLIC_C15T_URL || env.PUBLIC_C15T_URL || env.NUXT_PUBLIC_C15T_URL || env.NUXT_PUBLIC_AUTH_URL || ('/' !== env.BASE_URL ? env.BASE_URL : void 0);
|
|
2199
2199
|
if (fromEnv) return withPath(fromEnv, path);
|
|
2200
2200
|
}
|
|
2201
|
-
var package_namespaceObject = {
|
|
2202
|
-
i8: "1.3.1"
|
|
2203
|
-
};
|
|
2201
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.4.2-canary-20250702103734"}');
|
|
2204
2202
|
const createRegistry = (ctx)=>({
|
|
2205
2203
|
...auditLogRegistry(ctx),
|
|
2206
2204
|
...consentRegistry(ctx),
|
|
@@ -3056,8 +3054,8 @@ const show_banner_handler_showConsentBanner = os.consent.showBanner.handler(({ c
|
|
|
3056
3054
|
if (!value) return null;
|
|
3057
3055
|
return Array.isArray(value) ? value[0] ?? null : value;
|
|
3058
3056
|
};
|
|
3059
|
-
const countryCode = normalizeHeader(headers.get('cf-ipcountry')) ?? normalizeHeader(headers.get('x-vercel-ip-country')) ?? normalizeHeader(headers.get('x-amz-cf-ipcountry')) ?? normalizeHeader(headers.get('x-country-code'));
|
|
3060
|
-
const regionCode = normalizeHeader(headers.get('x-vercel-ip-country-region')) ?? normalizeHeader(headers.get('x-region-code'));
|
|
3057
|
+
const countryCode = normalizeHeader(headers.get('x-c15t-country')) ?? normalizeHeader(headers.get('cf-ipcountry')) ?? normalizeHeader(headers.get('x-vercel-ip-country')) ?? normalizeHeader(headers.get('x-amz-cf-ipcountry')) ?? normalizeHeader(headers.get('x-country-code'));
|
|
3058
|
+
const regionCode = normalizeHeader(headers.get('x-c15t-region')) ?? normalizeHeader(headers.get('x-vercel-ip-country-region')) ?? normalizeHeader(headers.get('x-region-code'));
|
|
3061
3059
|
const acceptLanguage = normalizeHeader(headers.get('accept-language'));
|
|
3062
3060
|
const preferredLanguage = getPreferredLanguage(acceptLanguage);
|
|
3063
3061
|
const { showConsentBanner, jurisdictionCode, message } = checkJurisdiction(countryCode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show-banner.handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/consent/show-banner.handler.ts"],"names":[],"mappings":"AAqCA;;;GAGG;AACH,e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,IAAI;;;;EAmF3D"}
|
package/dist/router.cjs
CHANGED
|
@@ -911,8 +911,8 @@ const show_banner_handler_showConsentBanner = os.consent.showBanner.handler(({ c
|
|
|
911
911
|
if (!value) return null;
|
|
912
912
|
return Array.isArray(value) ? value[0] ?? null : value;
|
|
913
913
|
};
|
|
914
|
-
const countryCode = normalizeHeader(headers.get('cf-ipcountry')) ?? normalizeHeader(headers.get('x-vercel-ip-country')) ?? normalizeHeader(headers.get('x-amz-cf-ipcountry')) ?? normalizeHeader(headers.get('x-country-code'));
|
|
915
|
-
const regionCode = normalizeHeader(headers.get('x-vercel-ip-country-region')) ?? normalizeHeader(headers.get('x-region-code'));
|
|
914
|
+
const countryCode = normalizeHeader(headers.get('x-c15t-country')) ?? normalizeHeader(headers.get('cf-ipcountry')) ?? normalizeHeader(headers.get('x-vercel-ip-country')) ?? normalizeHeader(headers.get('x-amz-cf-ipcountry')) ?? normalizeHeader(headers.get('x-country-code'));
|
|
915
|
+
const regionCode = normalizeHeader(headers.get('x-c15t-region')) ?? normalizeHeader(headers.get('x-vercel-ip-country-region')) ?? normalizeHeader(headers.get('x-region-code'));
|
|
916
916
|
const acceptLanguage = normalizeHeader(headers.get('accept-language'));
|
|
917
917
|
const preferredLanguage = getPreferredLanguage(acceptLanguage);
|
|
918
918
|
const { showConsentBanner, jurisdictionCode, message } = checkJurisdiction(countryCode);
|
|
@@ -1207,9 +1207,7 @@ const consentHandlers = {
|
|
|
1207
1207
|
showBanner: show_banner_handler_showConsentBanner,
|
|
1208
1208
|
verify: verifyConsent
|
|
1209
1209
|
};
|
|
1210
|
-
var package_namespaceObject = {
|
|
1211
|
-
i8: "1.3.1"
|
|
1212
|
-
};
|
|
1210
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.4.2-canary-20250702103734"}');
|
|
1213
1211
|
const statusHandler = os.meta.status.handler(({ context })=>{
|
|
1214
1212
|
const typedContext = context;
|
|
1215
1213
|
const headers = typedContext.headers;
|
package/dist/router.js
CHANGED
|
@@ -873,8 +873,8 @@ const show_banner_handler_showConsentBanner = os.consent.showBanner.handler(({ c
|
|
|
873
873
|
if (!value) return null;
|
|
874
874
|
return Array.isArray(value) ? value[0] ?? null : value;
|
|
875
875
|
};
|
|
876
|
-
const countryCode = normalizeHeader(headers.get('cf-ipcountry')) ?? normalizeHeader(headers.get('x-vercel-ip-country')) ?? normalizeHeader(headers.get('x-amz-cf-ipcountry')) ?? normalizeHeader(headers.get('x-country-code'));
|
|
877
|
-
const regionCode = normalizeHeader(headers.get('x-vercel-ip-country-region')) ?? normalizeHeader(headers.get('x-region-code'));
|
|
876
|
+
const countryCode = normalizeHeader(headers.get('x-c15t-country')) ?? normalizeHeader(headers.get('cf-ipcountry')) ?? normalizeHeader(headers.get('x-vercel-ip-country')) ?? normalizeHeader(headers.get('x-amz-cf-ipcountry')) ?? normalizeHeader(headers.get('x-country-code'));
|
|
877
|
+
const regionCode = normalizeHeader(headers.get('x-c15t-region')) ?? normalizeHeader(headers.get('x-vercel-ip-country-region')) ?? normalizeHeader(headers.get('x-region-code'));
|
|
878
878
|
const acceptLanguage = normalizeHeader(headers.get('accept-language'));
|
|
879
879
|
const preferredLanguage = getPreferredLanguage(acceptLanguage);
|
|
880
880
|
const { showConsentBanner, jurisdictionCode, message } = checkJurisdiction(countryCode);
|
|
@@ -1169,9 +1169,7 @@ const consentHandlers = {
|
|
|
1169
1169
|
showBanner: show_banner_handler_showConsentBanner,
|
|
1170
1170
|
verify: verifyConsent
|
|
1171
1171
|
};
|
|
1172
|
-
var package_namespaceObject = {
|
|
1173
|
-
i8: "1.3.1"
|
|
1174
|
-
};
|
|
1172
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.4.2-canary-20250702103734"}');
|
|
1175
1173
|
const statusHandler = os.meta.status.handler(({ context })=>{
|
|
1176
1174
|
const typedContext = context;
|
|
1177
1175
|
const headers = typedContext.headers;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/backend",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.2-canary-20250702103734",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"neverthrow": "^8.2.0",
|
|
101
101
|
"superjson": "^2.2.2",
|
|
102
102
|
"zod": "^3.24.2",
|
|
103
|
-
"@c15t/translations": "1.
|
|
103
|
+
"@c15t/translations": "1.4.2-canary-20250702103734"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@electric-sql/pglite": "0.2.17",
|
|
@@ -65,12 +65,14 @@ export const showConsentBanner = os.consent.showBanner.handler(
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
const countryCode =
|
|
68
|
+
normalizeHeader(headers.get('x-c15t-country')) ??
|
|
68
69
|
normalizeHeader(headers.get('cf-ipcountry')) ??
|
|
69
70
|
normalizeHeader(headers.get('x-vercel-ip-country')) ??
|
|
70
71
|
normalizeHeader(headers.get('x-amz-cf-ipcountry')) ??
|
|
71
72
|
normalizeHeader(headers.get('x-country-code'));
|
|
72
73
|
|
|
73
74
|
const regionCode =
|
|
75
|
+
normalizeHeader(headers.get('x-c15t-region')) ??
|
|
74
76
|
normalizeHeader(headers.get('x-vercel-ip-country-region')) ??
|
|
75
77
|
normalizeHeader(headers.get('x-region-code'));
|
|
76
78
|
|