@gradial/aci 0.1.45 → 0.1.46
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/dist/audience-data-models.d.ts +142 -2
- package/dist/audience-data-models.js +2 -0
- package/dist/cli/compile-registry.d.mts +1 -5
- package/dist/cli/compile-registry.mjs +10 -25
- package/dist/cli/validate-content.d.mts +1 -31
- package/dist/cli/validate-content.mjs +12 -50
- package/dist/cli/verify-next-cdn-routes.mjs +1 -0
- package/dist/content/provider.d.ts +1 -1
- package/dist/content/resolve-slots.js +0 -1
- package/dist/content/types.d.ts +0 -2
- package/dist/internal/render-proof.d.ts +1 -0
- package/dist/internal/render-proof.js +197 -0
- package/dist/next/middleware.js +9 -54
- package/dist/next/page.js +9 -4
- package/dist/next/personalization-host.d.ts +5 -0
- package/dist/next/server.js +88 -75
- package/dist/next/vercel-collect-sdk-route.js +6 -30
- package/dist/next/vercel-edge-projection-v1.d.ts +24 -0
- package/dist/next/vercel-edge-projection-v1.js +880 -0
- package/dist/next/vercel-s3-personalization.js +7 -11
- package/dist/providers/s3.d.ts +2 -4
- package/dist/providers/s3.js +173 -19
- package/dist/types/block-ref.d.ts +0 -2
- package/dist/types/block-ref.js +0 -1
- package/package.json +2 -2
- package/src/cli/compile-registry.mjs +10 -24
- package/src/cli/validate-content.mjs +13 -52
- package/src/cli/verify-next-cdn-routes.mjs +6 -0
- package/src/types/block-ref.ts +0 -2
- package/templates/astro/starter-content/src/fixtures/atomicBlocks.ts +6 -7
- package/templates/astro/starter-content/src/fixtures/composition.ts +2 -3
- package/templates/astro/starter-content/src/fixtures/sections.ts +1 -2
- package/templates/common/.agents/skills/authoring/SKILL.md +3 -11
- package/templates/common/.agents/skills/authoring/references/block-slots.md +0 -3
- package/templates/common/.content/pages/home/_index.json +0 -10
- package/templates/common/starter-content/.content/pages/about/_index.json +6 -6
- package/templates/common/starter-content/.content/pages/home/_index.json +38 -22
- package/src/types/block-ref.test.ts +0 -45
- package/templates/nextjs/template/src/app/collect/route.ts +0 -18
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"regions": {
|
|
12
12
|
"main": [
|
|
13
13
|
{
|
|
14
|
-
"$type": "component",
|
|
15
14
|
"id": "hero",
|
|
16
15
|
"component": "home_hero",
|
|
17
16
|
"props": {
|
|
@@ -28,7 +27,6 @@
|
|
|
28
27
|
}
|
|
29
28
|
},
|
|
30
29
|
{
|
|
31
|
-
"$type": "component",
|
|
32
30
|
"id": "why-meridian",
|
|
33
31
|
"component": "feature_grid",
|
|
34
32
|
"props": {
|
|
@@ -36,7 +34,6 @@
|
|
|
36
34
|
"subtitle": "Engineered for the edges of the world.",
|
|
37
35
|
"features": [
|
|
38
36
|
{
|
|
39
|
-
"$type": "component",
|
|
40
37
|
"id": "global-coverage",
|
|
41
38
|
"component": "feature_card",
|
|
42
39
|
"props": {
|
|
@@ -46,7 +43,6 @@
|
|
|
46
43
|
}
|
|
47
44
|
},
|
|
48
45
|
{
|
|
49
|
-
"$type": "component",
|
|
50
46
|
"id": "low-latency",
|
|
51
47
|
"component": "feature_card",
|
|
52
48
|
"props": {
|
|
@@ -56,7 +52,6 @@
|
|
|
56
52
|
}
|
|
57
53
|
},
|
|
58
54
|
{
|
|
59
|
-
"$type": "component",
|
|
60
55
|
"id": "easy-setup",
|
|
61
56
|
"component": "feature_card",
|
|
62
57
|
"props": {
|
|
@@ -69,7 +64,6 @@
|
|
|
69
64
|
}
|
|
70
65
|
},
|
|
71
66
|
{
|
|
72
|
-
"$type": "component",
|
|
73
67
|
"id": "personalization-choice",
|
|
74
68
|
"component": "personalization_choice",
|
|
75
69
|
"props": {
|
|
@@ -81,7 +75,6 @@
|
|
|
81
75
|
}
|
|
82
76
|
},
|
|
83
77
|
{
|
|
84
|
-
"$type": "component",
|
|
85
78
|
"id": "stats",
|
|
86
79
|
"component": "stats_bar",
|
|
87
80
|
"props": {
|
|
@@ -94,7 +87,6 @@
|
|
|
94
87
|
}
|
|
95
88
|
},
|
|
96
89
|
{
|
|
97
|
-
"$type": "component",
|
|
98
90
|
"id": "cta",
|
|
99
91
|
"component": "container",
|
|
100
92
|
"props": {
|
|
@@ -102,7 +94,6 @@
|
|
|
102
94
|
"className": "items-center justify-center text-center",
|
|
103
95
|
"content": [
|
|
104
96
|
{
|
|
105
|
-
"$type": "component",
|
|
106
97
|
"id": "cta-primary",
|
|
107
98
|
"component": "button",
|
|
108
99
|
"props": {
|
|
@@ -114,7 +105,6 @@
|
|
|
114
105
|
}
|
|
115
106
|
},
|
|
116
107
|
{
|
|
117
|
-
"$type": "component",
|
|
118
108
|
"id": "cta-secondary",
|
|
119
109
|
"component": "button",
|
|
120
110
|
"props": {
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"regions": {
|
|
12
12
|
"main": [
|
|
13
13
|
{
|
|
14
|
-
"$type": "component",
|
|
15
14
|
"id": "about-hero",
|
|
16
15
|
"component": "home_hero",
|
|
17
16
|
"props": {
|
|
@@ -25,17 +24,16 @@
|
|
|
25
24
|
"assetId": "ast_site_about_hero",
|
|
26
25
|
"alt": "Meridian network coverage map with soft gradient"
|
|
27
26
|
}
|
|
28
|
-
}
|
|
27
|
+
},
|
|
28
|
+
"$type": "component"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
"$type": "component",
|
|
32
31
|
"id": "about-actions",
|
|
33
32
|
"component": "container",
|
|
34
33
|
"props": {
|
|
35
34
|
"className": "items-center justify-center text-center",
|
|
36
35
|
"content": [
|
|
37
36
|
{
|
|
38
|
-
"$type": "component",
|
|
39
37
|
"id": "home-link",
|
|
40
38
|
"component": "button",
|
|
41
39
|
"props": {
|
|
@@ -44,10 +42,12 @@
|
|
|
44
42
|
"variant": "primary",
|
|
45
43
|
"icon": "arrow_forward",
|
|
46
44
|
"iconPosition": "after"
|
|
47
|
-
}
|
|
45
|
+
},
|
|
46
|
+
"$type": "component"
|
|
48
47
|
}
|
|
49
48
|
]
|
|
50
|
-
}
|
|
49
|
+
},
|
|
50
|
+
"$type": "component"
|
|
51
51
|
}
|
|
52
52
|
]
|
|
53
53
|
}
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"regions": {
|
|
12
12
|
"main": [
|
|
13
13
|
{
|
|
14
|
-
"$type": "component",
|
|
15
14
|
"id": "hero",
|
|
16
15
|
"component": "home_hero",
|
|
17
16
|
"props": {
|
|
@@ -25,10 +24,10 @@
|
|
|
25
24
|
"assetId": "ast_site_home_hero",
|
|
26
25
|
"alt": "Light abstract hero background with satellite constellation"
|
|
27
26
|
}
|
|
28
|
-
}
|
|
27
|
+
},
|
|
28
|
+
"$type": "component"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
"$type": "component",
|
|
32
31
|
"id": "why-meridian",
|
|
33
32
|
"component": "feature_grid",
|
|
34
33
|
"props": {
|
|
@@ -36,53 +35,69 @@
|
|
|
36
35
|
"subtitle": "Engineered for the edges of the world.",
|
|
37
36
|
"features": [
|
|
38
37
|
{
|
|
39
|
-
"$type": "component",
|
|
40
38
|
"id": "global-coverage",
|
|
41
39
|
"component": "feature_card",
|
|
42
40
|
"props": {
|
|
43
41
|
"icon": "globe",
|
|
44
42
|
"title": "Global coverage",
|
|
45
43
|
"description": "A constellation of low-orbit satellites keeps you connected across continents, oceans, and remote terrain."
|
|
46
|
-
}
|
|
44
|
+
},
|
|
45
|
+
"$type": "component"
|
|
47
46
|
},
|
|
48
47
|
{
|
|
49
|
-
"$type": "component",
|
|
50
48
|
"id": "low-latency",
|
|
51
49
|
"component": "feature_card",
|
|
52
50
|
"props": {
|
|
53
51
|
"icon": "speed",
|
|
54
52
|
"title": "Low latency",
|
|
55
53
|
"description": "Sub-50ms latency means video calls, gaming, and real-time control feel local, even in the middle of nowhere."
|
|
56
|
-
}
|
|
54
|
+
},
|
|
55
|
+
"$type": "component"
|
|
57
56
|
},
|
|
58
57
|
{
|
|
59
|
-
"$type": "component",
|
|
60
58
|
"id": "easy-setup",
|
|
61
59
|
"component": "feature_card",
|
|
62
60
|
"props": {
|
|
63
61
|
"icon": "setup",
|
|
64
62
|
"title": "Easy setup",
|
|
65
63
|
"description": "A compact terminal and a phone app. Point at the sky, power on, and get online in minutes."
|
|
66
|
-
}
|
|
64
|
+
},
|
|
65
|
+
"$type": "component"
|
|
67
66
|
}
|
|
68
67
|
]
|
|
69
|
-
}
|
|
68
|
+
},
|
|
69
|
+
"$type": "component"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
"$type": "component",
|
|
73
72
|
"id": "stats",
|
|
74
73
|
"component": "stats_bar",
|
|
75
74
|
"props": {
|
|
76
75
|
"stats": [
|
|
77
|
-
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
{
|
|
77
|
+
"label": "Network uptime",
|
|
78
|
+
"value": "99.9",
|
|
79
|
+
"suffix": "%"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"label": "Average latency",
|
|
83
|
+
"value": "<50",
|
|
84
|
+
"suffix": "ms"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"label": "Countries covered",
|
|
88
|
+
"value": "40",
|
|
89
|
+
"suffix": "+"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"label": "Orbital satellites",
|
|
93
|
+
"value": "2,400",
|
|
94
|
+
"suffix": ""
|
|
95
|
+
}
|
|
81
96
|
]
|
|
82
|
-
}
|
|
97
|
+
},
|
|
98
|
+
"$type": "component"
|
|
83
99
|
},
|
|
84
100
|
{
|
|
85
|
-
"$type": "component",
|
|
86
101
|
"id": "cta",
|
|
87
102
|
"component": "container",
|
|
88
103
|
"props": {
|
|
@@ -90,7 +105,6 @@
|
|
|
90
105
|
"className": "items-center justify-center text-center",
|
|
91
106
|
"content": [
|
|
92
107
|
{
|
|
93
|
-
"$type": "component",
|
|
94
108
|
"id": "cta-primary",
|
|
95
109
|
"component": "button",
|
|
96
110
|
"props": {
|
|
@@ -99,10 +113,10 @@
|
|
|
99
113
|
"variant": "primary",
|
|
100
114
|
"icon": "arrow_forward",
|
|
101
115
|
"iconPosition": "after"
|
|
102
|
-
}
|
|
116
|
+
},
|
|
117
|
+
"$type": "component"
|
|
103
118
|
},
|
|
104
119
|
{
|
|
105
|
-
"$type": "component",
|
|
106
120
|
"id": "cta-secondary",
|
|
107
121
|
"component": "button",
|
|
108
122
|
"props": {
|
|
@@ -111,10 +125,12 @@
|
|
|
111
125
|
"variant": "outline",
|
|
112
126
|
"icon": "arrow_forward",
|
|
113
127
|
"iconPosition": "after"
|
|
114
|
-
}
|
|
128
|
+
},
|
|
129
|
+
"$type": "component"
|
|
115
130
|
}
|
|
116
131
|
]
|
|
117
|
-
}
|
|
132
|
+
},
|
|
133
|
+
"$type": "component"
|
|
118
134
|
}
|
|
119
135
|
]
|
|
120
136
|
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import assert from 'node:assert/strict';
|
|
2
|
-
import test from 'node:test';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
|
|
5
|
-
import { compileSchema } from '../compiler/zod-to-jsonschema.js';
|
|
6
|
-
import { defineComponentContract } from '../define-component.js';
|
|
7
|
-
import { blockRefArray } from './block-ref.js';
|
|
8
|
-
|
|
9
|
-
const childContract = defineComponentContract({
|
|
10
|
-
id: 'child',
|
|
11
|
-
props: z.object({
|
|
12
|
-
label: z.string(),
|
|
13
|
-
}),
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
test('block references require and accept the component discriminator', () => {
|
|
17
|
-
const schema = blockRefArray([childContract]);
|
|
18
|
-
const typed = {
|
|
19
|
-
$type: 'component',
|
|
20
|
-
id: 'child-1',
|
|
21
|
-
component: 'child',
|
|
22
|
-
props: { label: 'Hello' },
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
assert.equal(schema.safeParse([typed]).success, true);
|
|
26
|
-
assert.equal(schema.safeParse([{
|
|
27
|
-
id: typed.id,
|
|
28
|
-
component: typed.component,
|
|
29
|
-
props: typed.props,
|
|
30
|
-
}]).success, false);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
test('compiled block-reference schema exposes the component discriminator', () => {
|
|
34
|
-
const compiled = compileSchema(blockRefArray([childContract])) as {
|
|
35
|
-
items?: {
|
|
36
|
-
properties?: Record<string, { const?: string }>;
|
|
37
|
-
required?: string[];
|
|
38
|
-
additionalProperties?: boolean;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
assert.equal(compiled.items?.properties?.$type?.const, 'component');
|
|
43
|
-
assert.equal(compiled.items?.required?.includes('$type'), true);
|
|
44
|
-
assert.equal(compiled.items?.additionalProperties, false);
|
|
45
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createPersonalizationCollectRoute,
|
|
3
|
-
createVercelCollectionFromEnv,
|
|
4
|
-
} from '@gradial/aci/next/vercel-personalization';
|
|
5
|
-
|
|
6
|
-
export const runtime = 'nodejs';
|
|
7
|
-
|
|
8
|
-
const personalization = createVercelCollectionFromEnv();
|
|
9
|
-
const unavailable = async () => new Response('personalization host is not configured', {
|
|
10
|
-
status: 503,
|
|
11
|
-
headers: { 'Cache-Control': 'private, no-store' },
|
|
12
|
-
});
|
|
13
|
-
const collect = personalization
|
|
14
|
-
? createPersonalizationCollectRoute(personalization)
|
|
15
|
-
: unavailable;
|
|
16
|
-
|
|
17
|
-
export const POST = collect;
|
|
18
|
-
export const OPTIONS = collect;
|