@jimhoyd/urlcode 0.3.0 → 0.4.0-alpha.1
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/.claude/skills/urlcode-authoring/SKILL.md +106 -0
- package/.claude/skills/urlcode-operations/SKILL.md +114 -0
- package/.claude-plugin/marketplace.json +18 -0
- package/CONTRIBUTING.md +30 -2
- package/README.md +157 -230
- package/ROADMAP.md +85 -2
- package/SECURITY.md +8 -1
- package/dist/BUILD-MANIFEST.json +62 -32
- package/dist/adapters.js +4 -23
- package/dist/agent-lists.js +1 -1
- package/dist/agents-guide.js +113 -0
- package/dist/authoring-files.js +60 -0
- package/dist/authoring.js +11 -1
- package/dist/aws.js +4 -3
- package/dist/build-cloudflare.js +11 -24
- package/dist/bulk.js +37 -0
- package/dist/capabilities.js +208 -0
- package/dist/capability-query.js +72 -0
- package/dist/catalog.js +105 -0
- package/dist/cli.js +154 -15
- package/dist/client-address.js +1 -1
- package/dist/compliance-rules/baseline.js +8 -8
- package/dist/compliance-rules/privacy.js +3 -3
- package/dist/compliance-rules/strict.js +5 -5
- package/dist/conditions.js +88 -0
- package/dist/config.js +60 -4
- package/dist/context.js +156 -0
- package/dist/ecosystem-cli.js +88 -0
- package/dist/egress.js +98 -0
- package/dist/examples.js +92 -0
- package/dist/explain-cli.js +64 -0
- package/dist/explain.js +132 -0
- package/dist/extensions.js +172 -0
- package/dist/function-sources.js +15 -3
- package/dist/index.js +37 -0
- package/dist/init-with.js +165 -0
- package/dist/interchange-cli.js +42 -0
- package/dist/interchange.js +189 -0
- package/dist/link-cli.js +1 -1
- package/dist/management-policy.js +0 -1
- package/dist/manifest.js +111 -0
- package/dist/match.js +2 -2
- package/dist/mcp-authoring.js +147 -0
- package/dist/mcp.js +97 -0
- package/dist/observability.js +6 -0
- package/dist/operator-host.js +29 -0
- package/dist/plugins.js +12 -0
- package/dist/policies/agents.js +2 -2
- package/dist/policies/compression.js +2 -1
- package/dist/policies/security.js +0 -0
- package/dist/policies.js +1 -1
- package/dist/policy.js +29 -7
- package/dist/prerender.js +100 -41
- package/dist/project-tests.js +3 -3
- package/dist/provider-verification.js +92 -0
- package/dist/proxy.js +44 -0
- package/dist/readiness.js +5 -5
- package/dist/recipes.js +41 -0
- package/dist/route-diff.js +106 -0
- package/dist/router.js +42 -2
- package/dist/runtime.js +95 -14
- package/dist/schema-query.js +62 -0
- package/dist/signals.js +24 -0
- package/dist/site.js +0 -0
- package/dist/tooling.js +96 -0
- package/dist/types/adapters.d.ts +7 -4
- package/dist/types/agent-lists.d.ts +0 -1
- package/dist/types/agents-guide.d.ts +17 -0
- package/dist/types/authoring-files.d.ts +10 -0
- package/dist/types/aws.d.ts +3 -1
- package/dist/types/build-cloudflare.d.ts +1 -0
- package/dist/types/bulk.d.ts +27 -0
- package/dist/types/capabilities.d.ts +55 -0
- package/dist/types/capability-query.d.ts +24 -0
- package/dist/types/catalog.d.ts +65 -0
- package/dist/types/client-address.d.ts +0 -1
- package/dist/types/compliance-rules/baseline.d.ts +1 -9
- package/dist/types/compliance-rules/privacy.d.ts +1 -4
- package/dist/types/compliance-rules/strict.d.ts +0 -5
- package/dist/types/conditions.d.ts +19 -0
- package/dist/types/config.d.ts +20 -2
- package/dist/types/context.d.ts +65 -0
- package/dist/types/ecosystem-cli.d.ts +17 -0
- package/dist/types/egress.d.ts +46 -0
- package/dist/types/examples.d.ts +50 -0
- package/dist/types/explain-cli.d.ts +11 -0
- package/dist/types/explain.d.ts +95 -0
- package/dist/types/extensions.d.ts +122 -0
- package/dist/types/function-sources.d.ts +5 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/init-with.d.ts +30 -0
- package/dist/types/interchange-cli.d.ts +16 -0
- package/dist/types/interchange.d.ts +42 -0
- package/dist/types/link-cli.d.ts +2 -1
- package/dist/types/management-policy.d.ts +0 -1
- package/dist/types/manifest.d.ts +81 -0
- package/dist/types/match.d.ts +1 -0
- package/dist/types/mcp-authoring.d.ts +92 -0
- package/dist/types/mcp.d.ts +12 -0
- package/dist/types/observability.d.ts +2 -0
- package/dist/types/operator-host.d.ts +8 -0
- package/dist/types/plugins.d.ts +2 -0
- package/dist/types/policies/agents.d.ts +0 -2
- package/dist/types/policies/compression.d.ts +2 -0
- package/dist/types/policies/security.d.ts +0 -1
- package/dist/types/policy.d.ts +15 -4
- package/dist/types/project-tests.d.ts +3 -1
- package/dist/types/provider-verification.d.ts +53 -0
- package/dist/types/proxy.d.ts +21 -0
- package/dist/types/readiness.d.ts +1 -1
- package/dist/types/recipes.d.ts +30 -0
- package/dist/types/route-diff.d.ts +27 -0
- package/dist/types/runtime.d.ts +11 -0
- package/dist/types/schema-query.d.ts +12 -0
- package/dist/types/signals.d.ts +25 -0
- package/dist/types/site.d.ts +0 -1
- package/dist/types/tooling.d.ts +115 -0
- package/dist/types/types.d.ts +57 -0
- package/dist/types/typescript-authoring.d.ts +12 -0
- package/dist/types/vercel.d.ts +3 -1
- package/dist/types/verify-deployment.d.ts +47 -0
- package/dist/types.js +21 -2
- package/dist/typescript-authoring.js +104 -0
- package/dist/vercel.js +4 -3
- package/dist/verify-deployment.js +270 -0
- package/docs/AI-AUTHORING.md +130 -8
- package/docs/BULK.md +79 -0
- package/docs/CAPABILITIES.md +179 -0
- package/docs/CAPACITY.md +1 -1
- package/docs/CI.md +142 -0
- package/docs/CONDITIONS.md +74 -0
- package/docs/DEPLOYMENT-CHECKS.md +108 -0
- package/docs/DYNAMIC-LINKS.md +18 -518
- package/docs/EGRESS.md +125 -0
- package/docs/EXTENSIONS.md +226 -0
- package/docs/FRAMEWORK.md +182 -0
- package/docs/INSTALL.md +45 -7
- package/docs/INTERCHANGE.md +134 -0
- package/docs/MIDDLEWARE-EXAMPLES.md +75 -0
- package/docs/MIDDLEWARE.md +2 -0
- package/docs/NEXT-PHASE-PLAN.md +90 -0
- package/docs/NEXT-STEPS.md +415 -0
- package/docs/OBSERVABILITY.md +4 -2
- package/docs/OPERATIONAL-PROOF.md +4 -1
- package/docs/OPERATIONS.md +6 -3
- package/docs/PLUGINS.md +37 -0
- package/docs/POLICIES.md +12 -309
- package/docs/PRERENDER.md +40 -0
- package/docs/PROJECT-DIRECTION.md +42 -0
- package/docs/PROVIDER-VERIFICATION.md +84 -0
- package/docs/READINESS.md +21 -1
- package/docs/README.md +82 -31
- package/docs/RECIPES.md +99 -0
- package/docs/RELEASE-READINESS.md +11 -9
- package/docs/RELEASE-SECURITY.md +27 -4
- package/docs/SECURITY-AUDIT.md +1 -1
- package/docs/SPECIFICATION.md +95 -8
- package/docs/SPIKE-BUSINESS-SUITE.md +1013 -0
- package/docs/SPIKE-EXTENSION-MODEL.md +419 -0
- package/docs/SPIKE-EXTENSIONS.md +1 -0
- package/docs/SPIKE-LAMBDA-COMPILE.md +199 -0
- package/docs/STANDARDS.md +150 -142
- package/docs/STARTERS.md +21 -1
- package/docs/TOOLING.md +291 -0
- package/docs/TYPESCRIPT-AUTHORING.md +67 -0
- package/docs/TYPESCRIPT.md +1 -1
- package/docs/USABILITY-REVIEW.md +123 -0
- package/docs/YAML-GUIDE.md +18 -479
- package/docs/YAML-REFERENCE.md +127 -16
- package/docs/links/cli.md +110 -0
- package/docs/links/limits.md +175 -0
- package/docs/links/management-api.md +80 -0
- package/docs/links/pools.md +75 -0
- package/docs/links/setup.md +135 -0
- package/docs/policies/agents.md +1 -1
- package/docs/policies/contract.md +52 -0
- package/docs/policies/hardened.md +56 -0
- package/docs/policies/interoperability.md +169 -0
- package/docs/policies/operations.md +45 -0
- package/docs/yaml/assets.md +36 -0
- package/docs/yaml/conditions.md +20 -0
- package/docs/yaml/functions.md +160 -0
- package/docs/yaml/links.md +30 -0
- package/docs/yaml/middleware.md +29 -0
- package/docs/yaml/organization.md +74 -0
- package/docs/yaml/policies.md +37 -0
- package/docs/yaml/redirects.md +64 -0
- package/docs/yaml/responses.md +57 -0
- package/docs/yaml/site.md +24 -0
- package/examples/assets/example.yaml +17 -0
- package/examples/aws/example.yaml +20 -0
- package/examples/cloudflare/example.yaml +19 -0
- package/examples/compliance/example.yaml +11 -0
- package/examples/conditions/README.md +12 -0
- package/examples/conditions/example.yaml +19 -0
- package/examples/conditions/tests/requests.json +13 -0
- package/examples/conditions/urlcode.yaml +24 -0
- package/examples/cookbook/README.md +8 -4
- package/examples/cookbook/example.yaml +17 -0
- package/examples/cookbook/functions/catalog.mjs +3 -0
- package/examples/cookbook/functions/fail.mjs +4 -0
- package/examples/cookbook/functions/items.mjs +3 -0
- package/examples/cookbook/functions/profile.mjs +3 -0
- package/examples/cookbook/functions/resource.mjs +3 -0
- package/examples/cookbook/functions/status.mjs +3 -0
- package/examples/cookbook/middleware/auth.mjs +48 -0
- package/examples/cookbook/middleware/body.mjs +15 -0
- package/examples/cookbook/middleware/bucket.mjs +19 -0
- package/examples/cookbook/middleware/cors.mjs +21 -0
- package/examples/cookbook/middleware/debug.mjs +13 -0
- package/examples/cookbook/middleware/envelope.mjs +11 -0
- package/examples/cookbook/middleware/errors.mjs +11 -0
- package/examples/cookbook/middleware/etag.mjs +18 -0
- package/examples/cookbook/middleware/locale.mjs +16 -0
- package/examples/cookbook/middleware/maintenance.mjs +10 -0
- package/examples/cookbook/middleware/methods.mjs +15 -0
- package/examples/cookbook/middleware/negotiate.mjs +20 -0
- package/examples/cookbook/middleware/referer.mjs +12 -0
- package/examples/cookbook/middleware/request-id.mjs +16 -0
- package/examples/cookbook/route-index.json +676 -0
- package/examples/cookbook/routes/middleware.yaml +126 -0
- package/examples/cookbook/tests/requests.json +526 -0
- package/examples/cookbook/urlcode.yaml +1 -0
- package/examples/egress/README.md +22 -0
- package/examples/egress/example.yaml +19 -0
- package/examples/egress/urlcode.yaml +19 -0
- package/examples/extensions/README.md +7 -0
- package/examples/extensions/example.yaml +21 -0
- package/examples/extensions/urlcode.yaml +25 -0
- package/examples/live-links/example.yaml +21 -0
- package/examples/monitoring/example.yaml +8 -0
- package/examples/prerender/example.yaml +16 -0
- package/examples/provider-conformance/README.md +12 -0
- package/examples/provider-conformance/example.yaml +14 -0
- package/examples/provider-conformance/urlcode.yaml +34 -0
- package/examples/tunnel/example.yaml +8 -0
- package/examples/vercel/example.yaml +19 -0
- package/llms-full.txt +2709 -0
- package/llms.txt +48 -19
- package/package.json +29 -7
- package/packaging/claude-plugin/.claude-plugin/plugin.json +19 -0
- package/packaging/claude-plugin/skills/urlcode-authoring/SKILL.md +106 -0
- package/packaging/claude-plugin/skills/urlcode-operations/SKILL.md +114 -0
- package/recipes/authenticated-json-api/README.md +51 -0
- package/recipes/authenticated-json-api/functions/profile.mjs +5 -0
- package/recipes/authenticated-json-api/recipe.yaml +34 -0
- package/recipes/authenticated-json-api/tests/requests.json +39 -0
- package/recipes/authenticated-json-api/urlcode.yaml +12 -0
- package/recipes/contact-form/README.md +25 -0
- package/recipes/contact-form/functions/contact.mjs +17 -0
- package/recipes/contact-form/recipe.yaml +33 -0
- package/recipes/contact-form/tests/requests.json +47 -0
- package/recipes/contact-form/urlcode.yaml +18 -0
- package/recipes/cors-api/README.md +16 -0
- package/recipes/cors-api/functions/items.mjs +3 -0
- package/recipes/cors-api/middleware/cors.mjs +21 -0
- package/recipes/cors-api/recipe.yaml +26 -0
- package/recipes/cors-api/tests/requests.json +65 -0
- package/recipes/cors-api/urlcode.yaml +12 -0
- package/recipes/health-page/README.md +13 -0
- package/recipes/health-page/recipe.yaml +23 -0
- package/recipes/health-page/tests/requests.json +36 -0
- package/recipes/health-page/urlcode.yaml +19 -0
- package/recipes/json-api/README.md +6 -0
- package/recipes/json-api/functions/echo.mjs +3 -0
- package/recipes/json-api/recipe.yaml +25 -0
- package/recipes/json-api/tests/requests.json +34 -0
- package/recipes/json-api/urlcode.yaml +12 -0
- package/recipes/middleware/README.md +34 -0
- package/recipes/middleware/functions/catalog.mjs +3 -0
- package/recipes/middleware/functions/fail.mjs +4 -0
- package/recipes/middleware/functions/items.mjs +3 -0
- package/recipes/middleware/functions/profile.mjs +3 -0
- package/recipes/middleware/functions/resource.mjs +3 -0
- package/recipes/middleware/functions/status.mjs +3 -0
- package/recipes/middleware/middleware/auth.mjs +48 -0
- package/recipes/middleware/middleware/body.mjs +15 -0
- package/recipes/middleware/middleware/bucket.mjs +19 -0
- package/recipes/middleware/middleware/cors.mjs +21 -0
- package/recipes/middleware/middleware/debug.mjs +13 -0
- package/recipes/middleware/middleware/envelope.mjs +11 -0
- package/recipes/middleware/middleware/errors.mjs +11 -0
- package/recipes/middleware/middleware/etag.mjs +18 -0
- package/recipes/middleware/middleware/locale.mjs +16 -0
- package/recipes/middleware/middleware/maintenance.mjs +10 -0
- package/recipes/middleware/middleware/methods.mjs +15 -0
- package/recipes/middleware/middleware/negotiate.mjs +20 -0
- package/recipes/middleware/middleware/referer.mjs +12 -0
- package/recipes/middleware/middleware/request-id.mjs +16 -0
- package/recipes/middleware/public/guide.txt +1 -0
- package/recipes/middleware/recipe.yaml +50 -0
- package/recipes/middleware/tests/requests.json +528 -0
- package/recipes/middleware/urlcode.yaml +127 -0
- package/recipes/protected-download/README.md +22 -0
- package/recipes/protected-download/files/report.txt +1 -0
- package/recipes/protected-download/recipe.yaml +31 -0
- package/recipes/protected-download/tests/requests.json +32 -0
- package/recipes/protected-download/urlcode.yaml +15 -0
- package/recipes/redirect/README.md +7 -0
- package/recipes/redirect/recipe.yaml +25 -0
- package/recipes/redirect/tests/requests.json +19 -0
- package/recipes/redirect/urlcode.yaml +9 -0
- package/recipes/static-plus-api/README.md +15 -0
- package/recipes/static-plus-api/functions/info.mjs +3 -0
- package/recipes/static-plus-api/public/assets/index.html +3 -0
- package/recipes/static-plus-api/public/assets/site.css +1 -0
- package/recipes/static-plus-api/public/index.html +8 -0
- package/recipes/static-plus-api/recipe.yaml +29 -0
- package/recipes/static-plus-api/tests/requests.json +56 -0
- package/recipes/static-plus-api/urlcode.yaml +23 -0
- package/recipes/typescript/README.md +7 -0
- package/recipes/typescript/functions/hello.ts +5 -0
- package/recipes/typescript/recipe.yaml +23 -0
- package/recipes/typescript/tests/requests.json +18 -0
- package/recipes/typescript/urlcode.yaml +5 -0
- package/recipes/webhook-receiver/README.md +16 -0
- package/recipes/webhook-receiver/functions/receive.mjs +16 -0
- package/recipes/webhook-receiver/recipe.yaml +26 -0
- package/recipes/webhook-receiver/tests/requests.json +59 -0
- package/recipes/webhook-receiver/urlcode.yaml +16 -0
- package/schemas/recipe.schema.json +138 -0
- package/schemas/urlcode.schema.json +656 -80
- package/skills/urlcode/SKILL.md +98 -0
- package/starters/default/.github/workflows/urlcode.yml +23 -0
- package/starters/default/.mcp.json +12 -0
- package/starters/default/AGENTS.md +79 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: "1"
|
|
2
|
+
routes:
|
|
3
|
+
/proxy/{id}:
|
|
4
|
+
proxy:
|
|
5
|
+
url: https://api.example.com/items/{id}
|
|
6
|
+
query: [page]
|
|
7
|
+
requestHeaders: [accept]
|
|
8
|
+
responseHeaders: [content-type, content-encoding]
|
|
9
|
+
parameters:
|
|
10
|
+
- name: id
|
|
11
|
+
in: path
|
|
12
|
+
required: true
|
|
13
|
+
schema:
|
|
14
|
+
type: string
|
|
15
|
+
/event:
|
|
16
|
+
respond:
|
|
17
|
+
text: Accepted
|
|
18
|
+
signals:
|
|
19
|
+
- url: https://hooks.example.com/events
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Operator extension fixture
|
|
2
|
+
|
|
3
|
+
This project declares two logical extensions and two protected routes: `/private` spells out `policies.extensions.demo`, while `/account` uses the route-level `auth` short form that expands to `policies.extensions.auth`. It contains no host modules or credentials. `test/extensions.test.ts` loads this exact YAML with an explicitly supplied demo registry and exercises both endpoints.
|
|
4
|
+
|
|
5
|
+
Runtime activation requires an external operator registry with a reviewed, static `projectSha256` matching `inspectExtensionRevision(project)`, plus an explicit canonical origin. Inspecting a revision does not grant it. The registry supplies versioned configuration and policy schemas and trusted host callbacks. Missing providers or mismatched revisions fail before activation. Cloudflare refuses this feature until an explicit Worker implementation exists.
|
|
6
|
+
|
|
7
|
+
The demo provider in the test is a protocol fixture, not authentication suitable for deployment. Real auth and admin services live in separate packages and supply their own registries.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
id: extensions
|
|
2
|
+
description: Two declared operator extensions, one mount and two protected routes, one through the route-level auth short form.
|
|
3
|
+
tags: [extensions, auth, operator, mount, protected, policies.extensions, registry, revision]
|
|
4
|
+
complexity: advanced
|
|
5
|
+
capabilities: [enabled, extension, methods, policies.extensions, respond]
|
|
6
|
+
targets: {self-hosted: compatible, aws: compatible, vercel: compatible, cloudflare: refused}
|
|
7
|
+
routes: 3
|
|
8
|
+
services:
|
|
9
|
+
- name: operator registry
|
|
10
|
+
description: RuntimeExtension registrations for demo and auth with a reviewed projectSha256; test/extensions.test.ts supplies one.
|
|
11
|
+
grants:
|
|
12
|
+
- kind: extension
|
|
13
|
+
description: Each registration pins this revision; inspecting the hash grants nothing.
|
|
14
|
+
- kind: origin
|
|
15
|
+
description: The canonical origin every activation needs.
|
|
16
|
+
files: [urlcode.yaml, README.md]
|
|
17
|
+
tests:
|
|
18
|
+
commands:
|
|
19
|
+
- node src/cli.ts validate --local --project examples/extensions --host-file /operator/host.mjs --origin https://extensions.example.test
|
|
20
|
+
behavior:
|
|
21
|
+
- "/account uses auth: {role: member}; routes and audit show the expanded policies.extensions.auth form"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
version: '1'
|
|
2
|
+
extensions:
|
|
3
|
+
demo:
|
|
4
|
+
version: '1'
|
|
5
|
+
config:
|
|
6
|
+
label: hello
|
|
7
|
+
auth:
|
|
8
|
+
version: '1'
|
|
9
|
+
config: {}
|
|
10
|
+
routes:
|
|
11
|
+
/demo/*:
|
|
12
|
+
extension: demo
|
|
13
|
+
methods: [GET, HEAD, POST]
|
|
14
|
+
/private:
|
|
15
|
+
respond:
|
|
16
|
+
text: private
|
|
17
|
+
policies:
|
|
18
|
+
extensions:
|
|
19
|
+
demo:
|
|
20
|
+
role: member
|
|
21
|
+
/account:
|
|
22
|
+
respond:
|
|
23
|
+
text: account
|
|
24
|
+
auth:
|
|
25
|
+
role: member
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
id: live-links
|
|
2
|
+
description: Stored links served from an external SQLite store without a route reload, with dynamicLinks enabled in the entry file.
|
|
3
|
+
tags: [links, live, dynamic, sqlite, store, short-links, link, redirect]
|
|
4
|
+
complexity: intermediate
|
|
5
|
+
capabilities: [dynamicLinks, enabled, link, methods, parameters, respond]
|
|
6
|
+
targets: {self-hosted: compatible, aws: refused, vercel: refused, cloudflare: refused}
|
|
7
|
+
routes: 2
|
|
8
|
+
services:
|
|
9
|
+
- name: link store
|
|
10
|
+
description: An operator-owned SQLite store passed as --link-store, seeded with demo -> https://example.com/demo.
|
|
11
|
+
grants:
|
|
12
|
+
- kind: link-store
|
|
13
|
+
description: The store binding is an operator flag, never a project file.
|
|
14
|
+
files: [urlcode.yaml, tests/requests.json, README.md]
|
|
15
|
+
tests:
|
|
16
|
+
fixtures: tests/requests.json
|
|
17
|
+
commands:
|
|
18
|
+
- node src/cli.ts links init --store /absolute/links.sqlite
|
|
19
|
+
- node src/cli.ts test --project examples/live-links --link-store links=/absolute/links.sqlite
|
|
20
|
+
behavior:
|
|
21
|
+
- "/r/{code} answers the stored destination for a seeded code and 404 for one that was never created"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
id: monitoring
|
|
2
|
+
description: Prometheus scrape jobs, blackbox probes, alert rules and a Vector pipeline for a running URLCode deployment.
|
|
3
|
+
tags: [monitoring, prometheus, alerts, blackbox, vector, metrics, health, ready, observability, logs]
|
|
4
|
+
complexity: intermediate
|
|
5
|
+
runnable: false
|
|
6
|
+
files: [prometheus-scrape.yaml, blackbox-jobs.yaml, prometheus-rules.yaml, vector.toml]
|
|
7
|
+
behavior:
|
|
8
|
+
- probes /_urlcode/health and /_urlcode/ready separately so a live but not ready process is visible
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
id: prerender
|
|
2
|
+
description: Pages rendered by a function and a template middleware, then prerendered at build time into native page routes.
|
|
3
|
+
tags: [prerender, build, static, pages, template, function, middleware, html, render]
|
|
4
|
+
complexity: advanced
|
|
5
|
+
capabilities: [enabled, function, methods, middleware]
|
|
6
|
+
targets: {self-hosted: compatible, aws: refused, vercel: refused, cloudflare: refused}
|
|
7
|
+
routes: 3
|
|
8
|
+
files: [urlcode.yaml, functions/page.mjs, middleware/template.mjs, prerender.mjs, tests/requests.json, README.md]
|
|
9
|
+
tests:
|
|
10
|
+
fixtures: tests/requests.json
|
|
11
|
+
commands:
|
|
12
|
+
- node src/cli.ts test --project examples/prerender
|
|
13
|
+
- node examples/prerender/prerender.mjs examples/prerender /absolute/out
|
|
14
|
+
- node src/cli.ts audit --project /absolute/out --expect-routes 3
|
|
15
|
+
behavior:
|
|
16
|
+
- the rendered project serves the same bytes from native page routes with no sandbox on the request path
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Provider conformance fixture
|
|
2
|
+
|
|
3
|
+
Deploy only this synthetic project to a disposable, operator-owned environment
|
|
4
|
+
using the documented self-hosted, AWS, Vercel or Cloudflare runtime adapter.
|
|
5
|
+
Never install it into a project containing private/customer routes or credentials.
|
|
6
|
+
The fixture has no function code, bindings, assets, policies or provider settings.
|
|
7
|
+
All redirect destinations use the reserved `example.test` domain; the verifier
|
|
8
|
+
never follows them. POST requests return constants and have no side effects.
|
|
9
|
+
|
|
10
|
+
See [provider verification](../../docs/PROVIDER-VERIFICATION.md) for the runner,
|
|
11
|
+
evidence format and limitations. CI replays the fixture through local adapters;
|
|
12
|
+
that does not establish that any provider deployment has been verified.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
id: provider-conformance
|
|
2
|
+
description: Synthetic redirect and respond fixture deployed to a disposable environment so urlcode verify-provider can observe a real adapter.
|
|
3
|
+
tags: [provider, conformance, verify, deployment, fixture, aws, vercel, cloudflare, self-hosted, probes]
|
|
4
|
+
complexity: intermediate
|
|
5
|
+
capabilities: [enabled, methods, parameters, redirect, request.body, respond, response.headers]
|
|
6
|
+
targets: {self-hosted: compatible, aws: compatible, vercel: compatible, cloudflare: compatible}
|
|
7
|
+
routes: 5
|
|
8
|
+
files: [urlcode.yaml, README.md]
|
|
9
|
+
tests:
|
|
10
|
+
commands:
|
|
11
|
+
- node src/cli.ts validate --local --project examples/provider-conformance
|
|
12
|
+
- node src/cli.ts verify-provider --target self-hosted --origin https://owned-fixture.example
|
|
13
|
+
behavior:
|
|
14
|
+
- no functions, bindings, assets or policies, so every target activates it; never mix it into a real project
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
version: "1"
|
|
2
|
+
routes:
|
|
3
|
+
/urlcode-conformance/redirect:
|
|
4
|
+
redirect:
|
|
5
|
+
url: https://example.test/destination
|
|
6
|
+
/urlcode-conformance/people/{name}:
|
|
7
|
+
parameters:
|
|
8
|
+
- name: name
|
|
9
|
+
in: path
|
|
10
|
+
required: true
|
|
11
|
+
schema: {type: string}
|
|
12
|
+
redirect:
|
|
13
|
+
url: https://example.test/people/{name}
|
|
14
|
+
status: 307
|
|
15
|
+
/urlcode-conformance/query:
|
|
16
|
+
parameters:
|
|
17
|
+
- name: n
|
|
18
|
+
in: query
|
|
19
|
+
required: true
|
|
20
|
+
schema: {type: integer}
|
|
21
|
+
redirect:
|
|
22
|
+
url: https://example.test/query
|
|
23
|
+
query:
|
|
24
|
+
map:
|
|
25
|
+
n: {from: query, name: n}
|
|
26
|
+
/urlcode-conformance/hello:
|
|
27
|
+
respond: {text: provider conformance v1}
|
|
28
|
+
response:
|
|
29
|
+
headers: {x-conformance: v1}
|
|
30
|
+
/urlcode-conformance/body:
|
|
31
|
+
methods: [POST]
|
|
32
|
+
request:
|
|
33
|
+
body: {maxBytes: 32}
|
|
34
|
+
respond: {text: accepted}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
id: tunnel
|
|
2
|
+
description: Shell script starting urlcode dev with the public origin of a running ngrok tunnel.
|
|
3
|
+
tags: [tunnel, ngrok, dev, origin, local, script, public-url]
|
|
4
|
+
complexity: starter
|
|
5
|
+
runnable: false
|
|
6
|
+
files: [dev-with-ngrok.sh]
|
|
7
|
+
behavior:
|
|
8
|
+
- functions, redirects and absolute URLs see the address a visitor used rather than 127.0.0.1
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id: vercel
|
|
2
|
+
description: Native-handler project deployed as a Vercel Node function through the vercel adapter.
|
|
3
|
+
tags: [vercel, serverless, deploy, adapter, native, page, static, redirect, respond]
|
|
4
|
+
complexity: intermediate
|
|
5
|
+
capabilities: [enabled, methods, page, parameters, redirect, respond, static]
|
|
6
|
+
targets: {self-hosted: compatible, aws: compatible, vercel: compatible, cloudflare: refused}
|
|
7
|
+
routes: 5
|
|
8
|
+
services:
|
|
9
|
+
- name: Vercel
|
|
10
|
+
description: api/index.js and vercel.json deploy the project; local tests replay the adapter without an account.
|
|
11
|
+
files: [urlcode.yaml, api/index.js, vercel.json, public/index.html, public/notes.txt, tests/requests.json, README.md]
|
|
12
|
+
tests:
|
|
13
|
+
fixtures: tests/requests.json
|
|
14
|
+
commands:
|
|
15
|
+
- node src/cli.ts validate --local --project examples/vercel
|
|
16
|
+
- node src/cli.ts test --project examples/vercel
|
|
17
|
+
- node src/cli.ts audit --project examples/vercel --expect-routes 5
|
|
18
|
+
behavior:
|
|
19
|
+
- every route is native, so the project activates on Vercel without the sandbox
|