@gradial/aci 0.1.42 → 0.1.43
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/CHANGELOG.md +8 -0
- package/README.md +4 -4
- package/dist/audience-data-models.d.ts +286 -0
- package/dist/audience-data-models.js +46 -0
- package/dist/cli/compile-registry.d.mts +5 -1
- package/dist/cli/compile-registry.mjs +25 -10
- package/dist/cli/validate-content.d.mts +31 -1
- package/dist/cli/validate-content.mjs +50 -12
- package/dist/collect/aci.js +1 -0
- package/dist/collect/aci.js.sha256 +1 -0
- package/dist/collect/batcher.d.ts +2 -0
- package/dist/collect/batcher.js +18 -6
- package/dist/collect/consent/envelope.d.ts +9 -3
- package/dist/collect/consent/envelope.js +58 -40
- package/dist/collect/index.js +9 -2
- package/dist/collect/linkclicks.js +4 -2
- package/dist/collect/transport.d.ts +2 -0
- package/dist/collect/transport.js +6 -3
- package/dist/consent/portable-envelope.d.ts +9 -0
- package/dist/consent/portable-envelope.js +110 -0
- package/dist/consent-banner/index.js +2 -1
- package/dist/content/assets.d.ts +1 -0
- package/dist/content/assets.js +1 -0
- package/dist/content/resolve-slots.js +1 -0
- package/dist/content/types.d.ts +2 -0
- package/dist/next/collect-route.d.ts +2 -2
- package/dist/next/collect-route.js +90 -19
- package/dist/next/envelope-digest.d.ts +21 -0
- package/dist/next/envelope-digest.js +58 -0
- package/dist/next/middleware.d.ts +16 -2
- package/dist/next/middleware.js +190 -10
- package/dist/next/personalization-host.d.ts +16 -7
- package/dist/next/personalization-host.js +14 -33
- package/dist/next/server.d.ts +1 -0
- package/dist/next/server.js +3 -0
- package/dist/next/vercel-collect-sdk-route.d.ts +27 -0
- package/dist/next/vercel-collect-sdk-route.js +205 -0
- package/dist/next/vercel-personalization.d.ts +3 -2
- package/dist/next/vercel-personalization.js +3 -2
- package/dist/next/vercel-s3-personalization.d.ts +25 -4
- package/dist/next/vercel-s3-personalization.js +368 -14
- package/dist/providers/s3.d.ts +19 -4
- package/dist/providers/s3.js +92 -22
- package/dist/testing/conformance/checks.js +75 -4
- package/dist/types/block-ref.d.ts +2 -0
- package/dist/types/block-ref.js +1 -0
- package/package.json +27 -16
- package/src/cli/compile-registry.mjs +24 -10
- package/src/cli/validate-content.mjs +52 -13
- package/src/types/block-ref.test.ts +45 -0
- package/src/types/block-ref.ts +2 -0
- package/templates/astro/starter-content/src/fixtures/atomicBlocks.ts +7 -6
- package/templates/astro/starter-content/src/fixtures/composition.ts +3 -2
- package/templates/astro/starter-content/src/fixtures/sections.ts +2 -1
- package/templates/common/.agents/skills/authoring/SKILL.md +11 -3
- package/templates/common/.agents/skills/authoring/references/block-slots.md +3 -0
- package/templates/common/.content/pages/home/_index.json +10 -0
- package/templates/common/starter-content/.content/pages/about/_index.json +3 -0
- package/templates/common/starter-content/.content/pages/home/_index.json +9 -0
- package/templates/nextjs/starter-content/src/middleware.ts +31 -1
- package/templates/nextjs/template/src/app/collect/route.ts +2 -2
- package/templates/nextjs/template/src/middleware.ts +31 -1
- package/templates/nextjs/template/src/middleware.ts.tmpl +31 -1
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"regions": {
|
|
12
12
|
"main": [
|
|
13
13
|
{
|
|
14
|
+
"$type": "component",
|
|
14
15
|
"id": "hero",
|
|
15
16
|
"component": "home_hero",
|
|
16
17
|
"props": {
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
}
|
|
28
29
|
},
|
|
29
30
|
{
|
|
31
|
+
"$type": "component",
|
|
30
32
|
"id": "why-meridian",
|
|
31
33
|
"component": "feature_grid",
|
|
32
34
|
"props": {
|
|
@@ -34,6 +36,7 @@
|
|
|
34
36
|
"subtitle": "Engineered for the edges of the world.",
|
|
35
37
|
"features": [
|
|
36
38
|
{
|
|
39
|
+
"$type": "component",
|
|
37
40
|
"id": "global-coverage",
|
|
38
41
|
"component": "feature_card",
|
|
39
42
|
"props": {
|
|
@@ -43,6 +46,7 @@
|
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
{
|
|
49
|
+
"$type": "component",
|
|
46
50
|
"id": "low-latency",
|
|
47
51
|
"component": "feature_card",
|
|
48
52
|
"props": {
|
|
@@ -52,6 +56,7 @@
|
|
|
52
56
|
}
|
|
53
57
|
},
|
|
54
58
|
{
|
|
59
|
+
"$type": "component",
|
|
55
60
|
"id": "easy-setup",
|
|
56
61
|
"component": "feature_card",
|
|
57
62
|
"props": {
|
|
@@ -64,6 +69,7 @@
|
|
|
64
69
|
}
|
|
65
70
|
},
|
|
66
71
|
{
|
|
72
|
+
"$type": "component",
|
|
67
73
|
"id": "stats",
|
|
68
74
|
"component": "stats_bar",
|
|
69
75
|
"props": {
|
|
@@ -76,6 +82,7 @@
|
|
|
76
82
|
}
|
|
77
83
|
},
|
|
78
84
|
{
|
|
85
|
+
"$type": "component",
|
|
79
86
|
"id": "cta",
|
|
80
87
|
"component": "container",
|
|
81
88
|
"props": {
|
|
@@ -83,6 +90,7 @@
|
|
|
83
90
|
"className": "items-center justify-center text-center",
|
|
84
91
|
"content": [
|
|
85
92
|
{
|
|
93
|
+
"$type": "component",
|
|
86
94
|
"id": "cta-primary",
|
|
87
95
|
"component": "button",
|
|
88
96
|
"props": {
|
|
@@ -94,6 +102,7 @@
|
|
|
94
102
|
}
|
|
95
103
|
},
|
|
96
104
|
{
|
|
105
|
+
"$type": "component",
|
|
97
106
|
"id": "cta-secondary",
|
|
98
107
|
"component": "button",
|
|
99
108
|
"props": {
|
|
@@ -7,5 +7,35 @@ export default createGradialMiddleware({
|
|
|
7
7
|
|
|
8
8
|
export const config = {
|
|
9
9
|
runtime: 'nodejs',
|
|
10
|
-
matcher: [
|
|
10
|
+
matcher: [
|
|
11
|
+
'/((?!_next(?:/|$)|api(?:/|$)|collect(?:/|$)|gradial/assets(?:/|$)|favicon\\.ico$).*)',
|
|
12
|
+
{
|
|
13
|
+
source: '/:path*',
|
|
14
|
+
has: [{ type: 'header', key: 'x-gradial-framework-origin-auth' }],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
source: '/:path*',
|
|
18
|
+
has: [{ type: 'header', key: 'x-baremetal-site-id' }],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
source: '/:path*',
|
|
22
|
+
has: [{ type: 'header', key: 'x-baremetal-release-id' }],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
source: '/:path*',
|
|
26
|
+
has: [{ type: 'header', key: 'x-aci-content-ref' }],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
source: '/:path*',
|
|
30
|
+
has: [{ type: 'header', key: 'x-baremetal-content-base-url' }],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
source: '/:path*',
|
|
34
|
+
has: [{ type: 'header', key: 'x-aci-content-path' }],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
source: '/:path*',
|
|
38
|
+
has: [{ type: 'query', key: '__aci_content_path' }],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
11
41
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPersonalizationCollectRoute,
|
|
3
|
-
|
|
3
|
+
createVercelCollectionFromEnv,
|
|
4
4
|
} from '@gradial/aci/next/vercel-personalization';
|
|
5
5
|
|
|
6
6
|
export const runtime = 'nodejs';
|
|
7
7
|
|
|
8
|
-
const personalization =
|
|
8
|
+
const personalization = createVercelCollectionFromEnv();
|
|
9
9
|
const unavailable = async () => new Response('personalization host is not configured', {
|
|
10
10
|
status: 503,
|
|
11
11
|
headers: { 'Cache-Control': 'private, no-store' },
|
|
@@ -7,5 +7,35 @@ export default createGradialMiddleware({
|
|
|
7
7
|
|
|
8
8
|
export const config = {
|
|
9
9
|
runtime: 'nodejs',
|
|
10
|
-
matcher: [
|
|
10
|
+
matcher: [
|
|
11
|
+
'/((?!_next(?:/|$)|api(?:/|$)|collect(?:/|$)|gradial/assets(?:/|$)|favicon\\.ico$).*)',
|
|
12
|
+
{
|
|
13
|
+
source: '/:path*',
|
|
14
|
+
has: [{ type: 'header', key: 'x-gradial-framework-origin-auth' }],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
source: '/:path*',
|
|
18
|
+
has: [{ type: 'header', key: 'x-baremetal-site-id' }],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
source: '/:path*',
|
|
22
|
+
has: [{ type: 'header', key: 'x-baremetal-release-id' }],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
source: '/:path*',
|
|
26
|
+
has: [{ type: 'header', key: 'x-aci-content-ref' }],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
source: '/:path*',
|
|
30
|
+
has: [{ type: 'header', key: 'x-baremetal-content-base-url' }],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
source: '/:path*',
|
|
34
|
+
has: [{ type: 'header', key: 'x-aci-content-path' }],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
source: '/:path*',
|
|
38
|
+
has: [{ type: 'query', key: '__aci_content_path' }],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
11
41
|
};
|
|
@@ -6,5 +6,35 @@ export default createGradialMiddleware();
|
|
|
6
6
|
// Source of truth: aciMiddlewareMatcher from '@gradial/aci/next/middleware'.
|
|
7
7
|
// The conformance check verifies this stays in sync with the SDK export.
|
|
8
8
|
export const config = {
|
|
9
|
-
matcher: [
|
|
9
|
+
matcher: [
|
|
10
|
+
'/((?!_next(?:/|$)|api(?:/|$)|collect(?:/|$)|gradial/assets(?:/|$)|favicon\\.ico$).*)',
|
|
11
|
+
{
|
|
12
|
+
source: '/:path*',
|
|
13
|
+
has: [{ type: 'header', key: 'x-gradial-framework-origin-auth' }],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
source: '/:path*',
|
|
17
|
+
has: [{ type: 'header', key: 'x-baremetal-site-id' }],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
source: '/:path*',
|
|
21
|
+
has: [{ type: 'header', key: 'x-baremetal-release-id' }],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
source: '/:path*',
|
|
25
|
+
has: [{ type: 'header', key: 'x-aci-content-ref' }],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
source: '/:path*',
|
|
29
|
+
has: [{ type: 'header', key: 'x-baremetal-content-base-url' }],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
source: '/:path*',
|
|
33
|
+
has: [{ type: 'header', key: 'x-aci-content-path' }],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
source: '/:path*',
|
|
37
|
+
has: [{ type: 'query', key: '__aci_content_path' }],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
10
40
|
};
|