@tokenoftrust/storefront-runner 2.0.16 → 2.0.18
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/apps/storefront/env.d.ts +18 -0
- package/apps/storefront/migrations-apps/0012_test_destinations.sql +29 -0
- package/apps/storefront/src/components/blog/ReactionBar.astro +1 -1
- package/apps/storefront/src/components/islands/CheckoutComplianceGate.tsx +365 -49
- package/apps/storefront/src/components/islands/checkoutVerificationFlow.ts +251 -0
- package/apps/storefront/src/config/compliance/rulesets.ts +18 -7
- package/apps/storefront/src/config/devTenantSeed.ts +24 -1
- package/apps/storefront/src/config/evidenceTenantRoster.ts +25 -0
- package/apps/storefront/src/config/publicationSpaceConfig.ts +25 -0
- package/apps/storefront/src/config/resolver.ts +5 -0
- package/apps/storefront/src/config/tenantAnalyticsFiles.ts +43 -0
- package/apps/storefront/src/config/tenants.ts +11 -0
- package/apps/storefront/src/layouts/Layout.astro +5 -1
- package/apps/storefront/src/lib/activity/killSwitch.ts +1 -1
- package/apps/storefront/src/lib/admin/consentSettingsClient.ts +113 -0
- package/apps/storefront/src/lib/apps/consentConfigRead.ts +24 -0
- package/apps/storefront/src/lib/apps/gtmMigrationDraft.ts +103 -0
- package/apps/storefront/src/lib/apps/routeParams.ts +45 -0
- package/apps/storefront/src/lib/auth/loginGate.ts +25 -0
- package/apps/storefront/src/lib/checkoutCommerce.ts +1 -1
- package/apps/storefront/src/lib/compliance/enforcement.ts +25 -3
- package/apps/storefront/src/lib/d1/schema-apps.ts +44 -0
- package/apps/storefront/src/lib/env.ts +13 -111
- package/apps/storefront/src/lib/fixtures/regulated-commerce-truth/index.ts +540 -0
- package/apps/storefront/src/lib/fixtures/ws3-readonly-clone-preflight/index.ts +495 -0
- package/apps/storefront/src/lib/integration/tenantAnalyticsDeclarations.ts +198 -0
- package/apps/storefront/src/lib/monitoring/manifest.ts +1 -1
- package/apps/storefront/src/lib/rawMarketingHtml.ts +9 -1
- package/apps/storefront/src/lib/runtimeEnv.ts +124 -0
- package/apps/storefront/src/lib/verification/totVerificationClient.ts +485 -0
- package/apps/storefront/src/middleware/candidatePin.ts +35 -0
- package/apps/storefront/src/middleware/controlPlane.ts +270 -0
- package/apps/storefront/src/middleware/index.ts +100 -796
- package/apps/storefront/src/middleware/publicRender.ts +43 -0
- package/apps/storefront/src/middleware/renderChain.ts +685 -0
- package/apps/storefront/src/middleware/routeBranch.ts +160 -0
- package/apps/storefront/src/middleware/staticBundle.ts +109 -0
- package/apps/storefront/src/pages/[...slug].astro +1 -0
- package/apps/storefront/src/pages/api/compliance/preflight.ts +179 -2
- package/apps/storefront/src/pages/index.astro +1 -0
- package/apps/storefront/vitest.config.ts +5 -0
- package/package.json +1 -1
- package/packages/public-runtime/package.json +1 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/deliver-test-event-request.schema.json +122 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/get-test-destination-delivery-request.schema.json +79 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/register-test-destination-request.schema.json +93 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/test-destination-delivery.schema.json +106 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/test-destination.schema.json +77 -0
- package/packages/public-runtime/schemas/publication-space/v1/manifest.schema.json +195 -0
- package/packages/public-runtime/schemas/publication-space/v1/normalized-mount.schema.json +80 -0
- package/packages/public-runtime/schemas/publication-space/v1/ref.schema.json +20 -0
- package/packages/public-runtime/schemas/publication-version/v1/pointer.schema.json +28 -0
- package/packages/public-runtime/schemas/publication-version/v1/transition-request.schema.json +44 -0
- package/packages/public-runtime/schemas/publication-version/v1/transition.schema.json +47 -0
- package/packages/public-runtime/schemas/publication-version/v1/version.schema.json +58 -0
- package/packages/public-runtime/src/activity/catalog.ts +1 -1
- package/packages/public-runtime/src/candidate-index.ts +6 -0
- package/packages/public-runtime/src/customization-reconcile.ts +8 -0
- package/packages/public-runtime/src/html-cache-policy.ts +57 -0
- package/packages/public-runtime/src/index.ts +7 -0
- package/packages/public-runtime/src/integration/consent-broker.ts +115 -0
- package/packages/public-runtime/src/integration/interim-bridge.ts +111 -27
- package/packages/public-runtime/src/integration/managed-analytics-api-v1.schemas.ts +65 -0
- package/packages/public-runtime/src/integration/managed-analytics-api-v1.ts +81 -0
- package/packages/public-runtime/src/integration/render-phases.ts +8 -3
- package/packages/public-runtime/src/publication-artifact.ts +203 -0
- package/packages/public-runtime/src/publication-space.ts +853 -0
- package/packages/public-runtime/src/publication-version.ts +587 -0
- package/packages/public-runtime/src/route-tier.ts +257 -0
- package/packages/public-runtime/src/static-bundle.ts +18 -5
- package/packages/public-runtime/src/tenant-assets.ts +85 -17
- package/packages/public-runtime/src/tenant.ts +70 -0
- package/packages/public-runtime/tests/conformance/fake-destination.ts +402 -0
- package/packages/public-runtime/tests/fixtures/publication-spaces/internal.json +32 -0
- package/packages/public-runtime/tests/fixtures/publication-spaces/mounted-public.json +38 -0
- package/packages/public-runtime/tests/fixtures/publication-spaces/normalized-mounts.json +39 -0
- package/packages/public-runtime/tests/fixtures/publication-spaces/ref.json +5 -0
- package/packages/public-runtime/tests/fixtures/publication-spaces/root-public.json +31 -0
- package/packages/public-runtime/tests/fixtures/publication-versions/articles-v1.json +20 -0
- package/packages/public-runtime/tests/fixtures/publication-versions/articles-v2.json +20 -0
- package/packages/public-runtime/tests/fixtures/publication-versions/internal-v1.json +20 -0
- package/packages/public-runtime/tests/fixtures/publication-versions/live-pointer.json +11 -0
- package/packages/public-runtime/tests/fixtures/publication-versions/live-transition-request.json +14 -0
- package/packages/public-runtime/tests/fixtures/publication-versions/live-transition.json +17 -0
- package/packages/public-runtime/tests/fixtures/publication-versions/root-v1.json +20 -0
- package/packages/public-runtime/tests/fixtures/publication-versions/root-v2.json +20 -0
- package/scripts/dev/ai-edit.mjs +16 -3
- package/scripts/dev/port-check.mjs +18 -3
- package/scripts/dev/publish.mjs +26 -3
- package/scripts/tenant/validate.mjs +14 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://tokenoftrust.com/schemas/managed-analytics/v1/get-test-destination-delivery-request.schema.json",
|
|
4
|
+
"title": "GetTestDestinationDeliveryRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"apiVersion",
|
|
9
|
+
"query"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"apiVersion": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"const": "v1"
|
|
15
|
+
},
|
|
16
|
+
"query": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": [
|
|
20
|
+
"destinationId",
|
|
21
|
+
"eventId"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"destinationId": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"not": {
|
|
27
|
+
"anyOf": [
|
|
28
|
+
{
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword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][Rr]|(?:[Ww][Ii][Nn][Dd][Oo][Ww]|[Dd][Oo][Cc][Uu][Mm][Ee][Nn][Tt]|[Gg][Ll][Oo][Bb][Aa][Ll][Tt][Hh][Ii][Ss]|[Cc][Oo][Nn][Ss][Oo][Ll][Ee])\\s*(?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"minLength": 1,
|
|
47
|
+
"maxLength": 128,
|
|
48
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
49
|
+
},
|
|
50
|
+
"eventId": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"not": {
|
|
53
|
+
"anyOf": [
|
|
54
|
+
{
|
|
55
|
+
"type": "string",
|
|
56
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{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[Ii][Nn][Dd][Ee][Xx][Ee][Dd][Dd][Bb]|[Qq][Uu][Ee][Rr][Yy][Ss][Ee][Ll][Ee][Cc][Tt][Oo][Rr]|(?:[Ww][Ii][Nn][Dd][Oo][Ww]|[Dd][Oo][Cc][Uu][Mm][Ee][Nn][Tt]|[Gg][Ll][Oo][Bb][Aa][Ll][Tt][Hh][Ii][Ss]|[Cc][Oo][Nn][Ss][Oo][Ll][Ee])\\s*(?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"minLength": 1,
|
|
73
|
+
"maxLength": 128,
|
|
74
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://tokenoftrust.com/schemas/managed-analytics/v1/register-test-destination-request.schema.json",
|
|
4
|
+
"title": "RegisterTestDestinationRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"apiVersion",
|
|
9
|
+
"idempotencyKey",
|
|
10
|
+
"expectedRevision",
|
|
11
|
+
"body"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"apiVersion": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"const": "v1"
|
|
17
|
+
},
|
|
18
|
+
"idempotencyKey": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"not": {
|
|
21
|
+
"anyOf": [
|
|
22
|
+
{
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][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|
39
|
+
},
|
|
40
|
+
"minLength": 8,
|
|
41
|
+
"maxLength": 128,
|
|
42
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
43
|
+
},
|
|
44
|
+
"expectedRevision": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"minimum": 0
|
|
47
|
+
},
|
|
48
|
+
"body": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": [
|
|
52
|
+
"destinationId",
|
|
53
|
+
"environment"
|
|
54
|
+
],
|
|
55
|
+
"properties": {
|
|
56
|
+
"destinationId": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"not": {
|
|
59
|
+
"anyOf": [
|
|
60
|
+
{
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "string",
|
|
66
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?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?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"minLength": 1,
|
|
79
|
+
"maxLength": 128,
|
|
80
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
81
|
+
},
|
|
82
|
+
"environment": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"enum": [
|
|
85
|
+
"local",
|
|
86
|
+
"candidate",
|
|
87
|
+
"staged"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
package/packages/public-runtime/schemas/managed-analytics/v1/test-destination-delivery.schema.json
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://tokenoftrust.com/schemas/managed-analytics/v1/test-destination-delivery.schema.json",
|
|
4
|
+
"title": "TestDestinationDeliveryV1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"destinationId",
|
|
10
|
+
"eventId",
|
|
11
|
+
"actionName",
|
|
12
|
+
"deliveredAt"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"schemaVersion": {
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"const": 1
|
|
18
|
+
},
|
|
19
|
+
"destinationId": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"not": {
|
|
22
|
+
"anyOf": [
|
|
23
|
+
{
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})[ .-]?[0-9]{3}[ .-]?[0-9]{4}(?=$|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
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
44
|
+
},
|
|
45
|
+
"eventId": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"not": {
|
|
48
|
+
"anyOf": [
|
|
49
|
+
{
|
|
50
|
+
"type": "string",
|
|
51
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "string",
|
|
55
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "string",
|
|
59
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^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$])"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"minLength": 1,
|
|
68
|
+
"maxLength": 128,
|
|
69
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
70
|
+
},
|
|
71
|
+
"actionName": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"enum": [
|
|
74
|
+
"user_clicked_contact_sales_mktg",
|
|
75
|
+
"user_clicked_create_account_mktg",
|
|
76
|
+
"user_clicked_login_mktg",
|
|
77
|
+
"user_clicked_contact_support_consumer_mktg",
|
|
78
|
+
"user_clicked_contact_support_partner_mktg"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"deliveredAt": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"not": {
|
|
84
|
+
"anyOf": [
|
|
85
|
+
{
|
|
86
|
+
"type": "string",
|
|
87
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "string",
|
|
91
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{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t][Hh][Ii][Ss]|[Cc][Oo][Nn][Ss][Oo][Ll][Ee])\\s*(?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"format": "date-time"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://tokenoftrust.com/schemas/managed-analytics/v1/test-destination.schema.json",
|
|
4
|
+
"title": "TestDestinationV1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"destinationId",
|
|
10
|
+
"environment",
|
|
11
|
+
"createdAt"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"schemaVersion": {
|
|
15
|
+
"type": "integer",
|
|
16
|
+
"const": 1
|
|
17
|
+
},
|
|
18
|
+
"destinationId": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"not": {
|
|
21
|
+
"anyOf": [
|
|
22
|
+
{
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})[ .-]?[0-9]{3}[ .-]?[0-9]{4}(?=$|[^0-9]))"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "(?:</?[A-Za-z][^>]*>|[Jj][Aa][Vv][Aa][Ss][Cc][Rr][Ii][Pp][Tt]\\s*:|[Ee][Vv][Aa][Ll]\\s*\\(|(?:[Aa][Ll][Ee][Rr][Tt]|[Ff][Ee][Tt][Cc][Hh])\\s*\\(|\\{\\{|\\}\\}|\\$\\{|#[A-Za-z_][A-Za-z0-9_-]*|(?:^|[\\s,>+~])\\.[A-Za-z_-][A-Za-z0-9_-]*(?:$|[\\s,>+~.#[\\:])|\\[[A-Za-z_:][-A-Za-z0-9_:.]*(?:[~|^$*]?=[^\\]]+)?\\]|(?:[Ll][Oo][Cc][Aa][Ll]|[Ss][Ee][Ss][Ss][Ii][Oo][Nn])[Ss][Tt][Oo][Rr][Aa][Gg][Ee]|[Ii][Nn][Dd][Ee][Xx][Ee][Dd][Dd][Bb]|[Qq][Uu][Ee][Rr][Yy][Ss][Ee][Ll][Ee][Cc][Tt][Oo][Rr]|(?:[Ww][Ii][Nn][Dd][Oo][Ww]|[Dd][Oo][Cc][Uu][Mm][Ee][Nn][Tt]|[Gg][Ll][Oo][Bb][Aa][Ll][Tt][Hh][Ii][Ss]|[Cc][Oo][Nn][Ss][Oo][Ll][Ee])\\s*(?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"maxLength": 128,
|
|
42
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
43
|
+
},
|
|
44
|
+
"environment": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"enum": [
|
|
47
|
+
"local",
|
|
48
|
+
"candidate",
|
|
49
|
+
"staged"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"createdAt": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"not": {
|
|
55
|
+
"anyOf": [
|
|
56
|
+
{
|
|
57
|
+
"type": "string",
|
|
58
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "string",
|
|
66
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})[ .-]?[0-9]{3}[ .-]?[0-9]{4}(?=$|[^0-9]))"
|
|
67
|
+
},
|
|
68
|
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|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://tokenoftrust.com/schemas/publication-space/v1/manifest.schema.json",
|
|
4
|
+
"title": "PublicationSpaceManifestV1",
|
|
5
|
+
"$comment": "This schema provides portable structural and lexical validation, including literal reserved mounts. validatePublicationSpaceManifestV1 enforces the same policy after path normalization.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": [
|
|
10
|
+
"version",
|
|
11
|
+
"id",
|
|
12
|
+
"tenant",
|
|
13
|
+
"source",
|
|
14
|
+
"routes",
|
|
15
|
+
"visibility",
|
|
16
|
+
"authorization",
|
|
17
|
+
"discovery",
|
|
18
|
+
"assets",
|
|
19
|
+
"renderer"
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"version": { "const": 1 },
|
|
23
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
24
|
+
"tenant": { "$ref": "#/$defs/identifier" },
|
|
25
|
+
"source": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"required": ["forge", "repo", "defaultBranch"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"forge": { "enum": ["gitea", "github", "fixture"] },
|
|
32
|
+
"repo": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1,
|
|
35
|
+
"maxLength": 256,
|
|
36
|
+
"pattern": "^(?!.*\\.\\.)(?!.*//)[A-Za-z0-9](?:[A-Za-z0-9._/-]{0,254}[A-Za-z0-9])?$"
|
|
37
|
+
},
|
|
38
|
+
"defaultBranch": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"maxLength": 256,
|
|
42
|
+
"pattern": "^(?![-/.])(?!HEAD$)(?!.*(?:/\\.|\\.\\.|@\\{|\\\\|\\s|~|\\^|:|\\?|\\*|\\[|//))(?!.*(?:^|/)[^/]*\\.lock(?:/|$))(?!.*[/.]$)[A-Za-z0-9._/-]+$"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"routes": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": ["canonicalMount"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"canonicalMount": { "$ref": "#/$defs/mountPath" },
|
|
53
|
+
"aliases": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": {
|
|
56
|
+
"oneOf": [
|
|
57
|
+
{
|
|
58
|
+
"type": "object",
|
|
59
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"required": ["from", "behavior"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"from": { "$ref": "#/$defs/aliasPath" },
|
|
64
|
+
"behavior": { "const": "render" }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "object",
|
|
69
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"required": ["from", "behavior", "to"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"from": { "$ref": "#/$defs/aliasPath" },
|
|
74
|
+
"behavior": { "const": "redirect-308" },
|
|
75
|
+
"to": { "$ref": "#/$defs/path" }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"visibility": { "enum": ["public", "internal"] },
|
|
84
|
+
"authorization": {
|
|
85
|
+
"oneOf": [
|
|
86
|
+
{
|
|
87
|
+
"type": "object",
|
|
88
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"required": ["policy"],
|
|
91
|
+
"properties": { "policy": { "const": "public" } }
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "object",
|
|
95
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["policy", "capability"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"policy": { "const": "capability" },
|
|
100
|
+
"capability": { "const": "internal-content-reader" }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"discovery": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["sitemap", "feeds", "publicSearch", "llms"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"sitemap": { "type": "boolean" },
|
|
112
|
+
"feeds": { "type": "boolean" },
|
|
113
|
+
"publicSearch": { "type": "boolean" },
|
|
114
|
+
"llms": { "type": "boolean" }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"assets": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"required": ["namespace", "access"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"namespace": { "$ref": "#/$defs/identifier" },
|
|
124
|
+
"access": { "enum": ["public", "authorized"] }
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"renderer": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"required": ["contractVersion", "themeContractVersion"],
|
|
132
|
+
"properties": {
|
|
133
|
+
"contractVersion": { "type": "string", "minLength": 1 },
|
|
134
|
+
"themeContractVersion": { "type": "string", "minLength": 1 }
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"allOf": [
|
|
139
|
+
{
|
|
140
|
+
"if": { "type": "object", "properties": { "visibility": { "const": "public" } } },
|
|
141
|
+
"then": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {
|
|
144
|
+
"authorization": { "type": "object", "properties": { "policy": { "const": "public" } } },
|
|
145
|
+
"assets": { "type": "object", "properties": { "access": { "const": "public" } } }
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"if": { "type": "object", "properties": { "visibility": { "const": "internal" } } },
|
|
151
|
+
"then": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"properties": {
|
|
154
|
+
"authorization": { "type": "object", "properties": { "policy": { "const": "capability" } } },
|
|
155
|
+
"assets": { "type": "object", "properties": { "access": { "const": "authorized" } } },
|
|
156
|
+
"discovery": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"properties": {
|
|
159
|
+
"sitemap": { "const": false },
|
|
160
|
+
"feeds": { "const": false },
|
|
161
|
+
"publicSearch": { "const": false },
|
|
162
|
+
"llms": { "const": false }
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"$defs": {
|
|
170
|
+
"identifier": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"pattern": "^[a-z0-9](?:[a-z0-9._-]{0,126}[a-z0-9])?$"
|
|
173
|
+
},
|
|
174
|
+
"path": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"not": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"pattern": "^/(?:(?:%25(?:2|%32)(?:[Ee]|%45|%65))){1,2}(?:/|$)"
|
|
179
|
+
},
|
|
180
|
+
"pattern": "^/(?!(?:(?:\\.|%2[eE])){1,2}(?:/|$))(?!.*/(?:(?:\\.|%2[eE])){1,2}(?:/|$))(?!.*%(?:2[fF]|5[cC]))(?!.*%25(?:(?:0|%30|1|%31)(?:[0-9A-Fa-f]|%3[0-9]|%4[1-6]|%6[1-6])|(?:2|%32)(?:[Ff]|%46|%66)|(?:5|%35)(?:[Cc]|%43|%63)|(?:7|%37)(?:[Ff]|%46|%66)))(?!.*\/(?:(?:%25(?:2|%32)(?:[Ee]|%45|%65))){1,2}(?:/|$))(?!.*[?#\\\\\\u0000-\\u001F\\u007F\\uD800-\\uDFFF])(?:[^%?#\\\\\\u0000-\\u001F\\u007F\\uD800-\\uDFFF]|%(?:2[0-9A-Ea-e]|[34][0-9A-Fa-f]|5[0-9A-Ba-bD-Fd-f]|6[0-9A-Fa-f]|7[0-9A-Ea-e])|%(?:[Cc][2-9A-Fa-f]|[Dd][0-9A-Fa-f])%(?:[89AaBb][0-9A-Fa-f])|%[Ee]0%(?:[AaBb][0-9A-Fa-f])%(?:[89AaBb][0-9A-Fa-f])|%[Ee][1-9A-Ca-cEFef]%(?:[89AaBb][0-9A-Fa-f])%(?:[89AaBb][0-9A-Fa-f])|%[Ee][Dd]%(?:[89][0-9A-Fa-f])%(?:[89AaBb][0-9A-Fa-f])|%[Ff]0%(?:[9AaBb][0-9A-Fa-f])%(?:[89AaBb][0-9A-Fa-f])%(?:[89AaBb][0-9A-Fa-f])|%[Ff][1-3]%(?:[89AaBb][0-9A-Fa-f])%(?:[89AaBb][0-9A-Fa-f])%(?:[89AaBb][0-9A-Fa-f])|%[Ff]4%8[0-9A-Fa-f]%(?:[89AaBb][0-9A-Fa-f])%(?:[89AaBb][0-9A-Fa-f]))*$"
|
|
181
|
+
},
|
|
182
|
+
"mountPath": {
|
|
183
|
+
"allOf": [
|
|
184
|
+
{ "$ref": "#/$defs/path" },
|
|
185
|
+
{ "type": "string", "pattern": "^/(?!(?:\\.well-known|__evidence|__preview|_astro|_style-guide|admin|api|apps|assets|auth|brand|capabilities|cockpit|collections|dashboard|dev|favicon\\.svg|health|js|llms\\.txt|platform|preview|products|robots\\.txt|saved|search|shared|sitemap\\.xml|style-guide|tenants)(?:/|$))" }
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"aliasPath": {
|
|
189
|
+
"allOf": [
|
|
190
|
+
{ "$ref": "#/$defs/mountPath" },
|
|
191
|
+
{ "type": "string", "pattern": "^/.+" }
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://tokenoftrust.com/schemas/publication-space/v1/normalized-mount.schema.json",
|
|
4
|
+
"title": "NormalizedPublicationMountEntryV1",
|
|
5
|
+
"$comment": "This schema provides portable structural and lexical validation. Cross-property equality/inequality and Unicode NFC are enforced by validateNormalizedPublicationMountEntryV1 because JSON Schema 2020-12 cannot compare property values or normalize Unicode.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"patternProperties": { "^\\$(?:schema|comment|id)$": {} },
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": ["version", "tenant", "spaceId", "kind", "mount", "canonicalMount", "behavior"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"version": { "const": 1 },
|
|
12
|
+
"tenant": { "$ref": "#/$defs/identifier" },
|
|
13
|
+
"spaceId": { "$ref": "#/$defs/identifier" },
|
|
14
|
+
"kind": { "enum": ["canonical", "alias"] },
|
|
15
|
+
"mount": { "$ref": "#/$defs/mountPath" },
|
|
16
|
+
"canonicalMount": { "$ref": "#/$defs/mountPath" },
|
|
17
|
+
"behavior": { "enum": ["render", "redirect-308"] },
|
|
18
|
+
"redirectTo": { "$ref": "#/$defs/normalizedPath" }
|
|
19
|
+
},
|
|
20
|
+
"allOf": [
|
|
21
|
+
{
|
|
22
|
+
"if": { "type": "object", "properties": { "kind": { "const": "canonical" } } },
|
|
23
|
+
"then": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": { "behavior": { "const": "render" } },
|
|
26
|
+
"not": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": { "redirectTo": {} },
|
|
29
|
+
"required": ["redirectTo"]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"if": { "type": "object", "properties": { "kind": { "const": "alias" } } },
|
|
35
|
+
"then": { "type": "object", "properties": { "mount": { "$ref": "#/$defs/aliasPath" } } }
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"if": { "type": "object", "properties": { "behavior": { "const": "render" } } },
|
|
39
|
+
"then": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"not": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": { "redirectTo": {} },
|
|
44
|
+
"required": ["redirectTo"]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"if": { "type": "object", "properties": { "behavior": { "const": "redirect-308" } } },
|
|
50
|
+
"then": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"properties": { "kind": { "const": "alias" } },
|
|
53
|
+
"required": ["redirectTo"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"$defs": {
|
|
58
|
+
"identifier": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "^[a-z0-9](?:[a-z0-9._-]{0,126}[a-z0-9])?$"
|
|
61
|
+
},
|
|
62
|
+
"normalizedPath": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"not": { "type": "string", "pattern": "^/(?:%252[Ee]){1,2}(?:/|$)" },
|
|
65
|
+
"pattern": "^/(?!(?:\\.{1,2})(?:/|$))(?!.*/\\.{1,2}(?:/|$))(?!.*%25(?:0[0-9A-Fa-f]|1[0-9A-Fa-f]|2[Ff]|5[Cc]|7[Ff]))(?!.*\/(?:%252[Ee]){1,2}(?:/|$))(?:(?:[A-Za-z0-9._!~*'()-]|%(?:20|2[2-6BC]|3[A-F]|40|5[BDE]|60|7[B-D])|%(?:C[2-9A-F]|D[0-9A-F])%(?:[89AB][0-9A-F])|%E0%(?:[AB][0-9A-F])%(?:[89AB][0-9A-F])|%E[1-9A-CEF]%(?:[89AB][0-9A-F])%(?:[89AB][0-9A-F])|%ED%(?:[89][0-9A-F])%(?:[89AB][0-9A-F])|%F0%(?:[9AB][0-9A-F])%(?:[89AB][0-9A-F])%(?:[89AB][0-9A-F])|%F[1-3]%(?:[89AB][0-9A-F])%(?:[89AB][0-9A-F])%(?:[89AB][0-9A-F])|%F4%8[0-9A-F]%(?:[89AB][0-9A-F])%(?:[89AB][0-9A-F]))+(?:/(?:[A-Za-z0-9._!~*'()-]|%(?:20|2[2-6BC]|3[A-F]|40|5[BDE]|60|7[B-D])|%(?:C[2-9A-F]|D[0-9A-F])%(?:[89AB][0-9A-F])|%E0%(?:[AB][0-9A-F])%(?:[89AB][0-9A-F])|%E[1-9A-CEF]%(?:[89AB][0-9A-F])%(?:[89AB][0-9A-F])|%ED%(?:[89][0-9A-F])%(?:[89AB][0-9A-F])|%F0%(?:[9AB][0-9A-F])%(?:[89AB][0-9A-F])%(?:[89AB][0-9A-F])|%F[1-3]%(?:[89AB][0-9A-F])%(?:[89AB][0-9A-F])%(?:[89AB][0-9A-F])|%F4%8[0-9A-F]%(?:[89AB][0-9A-F])%(?:[89AB][0-9A-F]))+)*)?$"
|
|
66
|
+
},
|
|
67
|
+
"mountPath": {
|
|
68
|
+
"allOf": [
|
|
69
|
+
{ "$ref": "#/$defs/normalizedPath" },
|
|
70
|
+
{ "type": "string", "pattern": "^/(?!(?:\\.well-known|__evidence|__preview|_astro|_style-guide|admin|api|apps|assets|auth|brand|capabilities|cockpit|collections|dashboard|dev|favicon\\.svg|health|js|llms\\.txt|platform|preview|products|robots\\.txt|saved|search|shared|sitemap\\.xml|style-guide|tenants)(?:/|$))" }
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"aliasPath": {
|
|
74
|
+
"allOf": [
|
|
75
|
+
{ "$ref": "#/$defs/mountPath" },
|
|
76
|
+
{ "type": "string", "pattern": "^/.+" }
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|