@jimhoyd/urlcode 0.5.5 → 0.5.6
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 +1 -1
- package/.claude/skills/urlcode-operations/SKILL.md +1 -1
- package/README.md +1 -1
- package/dist/BUILD-MANIFEST.json +9 -9
- package/dist/agents-guide.js +1 -1
- package/dist/capabilities.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/mcp.js +1 -1
- package/dist/policies/agents.js +1 -1
- package/dist/policies/security.js +1 -1
- package/dist/policies.js +1 -1
- package/dist/scripts/operational-drills.js +1 -1
- package/dist/types.js +1 -1
- package/docs/AI-AUTHORING.md +1 -1
- package/examples/assets/example.yaml +3 -3
- package/examples/aws/example.yaml +3 -3
- package/examples/cloudflare/example.yaml +3 -3
- package/examples/compliance/README.md +1 -1
- package/examples/compliance/example.yaml +1 -1
- package/examples/conditions/example.yaml +3 -3
- package/examples/cookbook/README.md +4 -4
- package/examples/cookbook/example.yaml +3 -3
- package/examples/coverage-waiver/example.yaml +3 -3
- package/examples/egress/example.yaml +2 -2
- package/examples/extensions/example.yaml +1 -1
- package/examples/lifecycle/example.yaml +2 -2
- package/examples/not-found/README.md +2 -2
- package/examples/not-found/example.yaml +3 -3
- package/examples/prerender/README.md +4 -4
- package/examples/prerender/example.yaml +2 -2
- package/examples/provider-conformance/example.yaml +2 -2
- package/examples/shared-blocks/example.yaml +3 -3
- package/examples/vercel/example.yaml +3 -3
- package/llms-full.txt +8 -8
- package/llms.txt +1 -1
- package/package.json +11 -11
- package/skills/urlcode/SKILL.md +1 -1
- package/starters/default/AGENTS.md +1 -1
- package/starters/default/README.md +2 -2
|
@@ -145,7 +145,7 @@ urlcode audit --project ./my-links --expect-routes <actual intended count>
|
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
Use the real intended route count, including any `site`-generated routes. In a
|
|
148
|
-
runtime checkout, substitute `node src/cli.ts` for `urlcode`; in a project made
|
|
148
|
+
runtime checkout, substitute `node packages/core/src/cli.ts` for `urlcode`; in a project made
|
|
149
149
|
from `urlcode-template`, the equivalent npm scripts work. External bindings
|
|
150
150
|
require an already reviewed policy — add `--policy` where needed.
|
|
151
151
|
|
|
@@ -72,7 +72,7 @@ urlcode verify-deployment --project ./my-links --target https://links.example \
|
|
|
72
72
|
|
|
73
73
|
Run the actual commands and report actual results, never "should work" or
|
|
74
74
|
"should be reachable". `verify-deployment` needs a real target; do not
|
|
75
|
-
simulate its output. In a runtime checkout, substitute `node src/cli.ts` for
|
|
75
|
+
simulate its output. In a runtime checkout, substitute `node packages/core/src/cli.ts` for
|
|
76
76
|
`urlcode`. Pass `--policy` where a snapshot needs bindings already reviewed
|
|
77
77
|
by the operator.
|
|
78
78
|
|
package/README.md
CHANGED
|
@@ -107,7 +107,7 @@ it. Cross-repository acceptance is tracked in
|
|
|
107
107
|
## Status
|
|
108
108
|
|
|
109
109
|
<!-- urlcode-current-version:start -->
|
|
110
|
-
This checkout prepares the coordinated `0.5.
|
|
110
|
+
This checkout prepares the coordinated `0.5.6` core, UI, auth, admin and store
|
|
111
111
|
release. Package availability remains a live registry fact: use `npm run
|
|
112
112
|
release:status` or the release's signed `train.json` before selecting an
|
|
113
113
|
install combination. Independent package versioning remains enabled, and a
|
package/dist/BUILD-MANIFEST.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"dist/adapters.js": "a7153ec52f2ed7e0cdd8ed7d433504815f402ec53b2b1c3d38d0cf0e2fcf6509",
|
|
5
5
|
"dist/agent-context.js": "1e4e9c7b85d155c06d99d8b70f625bd7ab31330a0207aef6ed1803243b759611",
|
|
6
6
|
"dist/agent-lists.js": "35ab484198897501d011cb6cc00b5a6787192e19df29c97646e8c118fcc19eef",
|
|
7
|
-
"dist/agents-guide.js": "
|
|
7
|
+
"dist/agents-guide.js": "8f513332f6f54b3fe04c29512d7e51ac354456c8b096e213e34afce9fb4381ce",
|
|
8
8
|
"dist/assets.js": "0833b093d2fe457ce68281110dc07d47914992753607741c13b339d92c76cf5c",
|
|
9
9
|
"dist/authoring-files.js": "ad32814f9ae9c549c6247396f982aa700d13a293cc0a589609eccc68f8965550",
|
|
10
10
|
"dist/authoring.js": "a52d289c67043cad170babb6adab7ca23be1d7c7e5a67e43eaadfa73d2fe7665",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"dist/build-cloudflare.js": "ff92e72d0a63d70dd8c28b52978edd9fb23cb16601e4dfebd07c2cef7bd73661",
|
|
14
14
|
"dist/build-static.js": "3920b54bad9a44c75de79f0bef2b2a919bfb3e20a8619eaf8d48cad2856978ac",
|
|
15
15
|
"dist/bulk.js": "aac88d422bd9a7a341a421fb4e29ff5580b28d39250b7f1f5315ba20ae92da8a",
|
|
16
|
-
"dist/capabilities.js": "
|
|
16
|
+
"dist/capabilities.js": "f14c17de63764f6f4686fc1404bf21aa5cf56125ad81e6d6157a429438fc0cbf",
|
|
17
17
|
"dist/capability-query.js": "9f68bc94901451d7b9ecdd3aee8c3376dca7f0b890e31d8205306cf8120dea86",
|
|
18
18
|
"dist/catalog.js": "c378ef9bfd63b940790f6975f7db54557c2459722b65a7c170b97df24184bc52",
|
|
19
|
-
"dist/cli.js": "
|
|
19
|
+
"dist/cli.js": "3343b0dc534b4518a6bff14786c480f50bb6941e188be61f962c43e0ccec84f5",
|
|
20
20
|
"dist/client-address.js": "9d0d01466aab23124330605c5a0e0f981f87c897858acfad909f546a63df165b",
|
|
21
21
|
"dist/cloudflare.js": "31da478a6b851b5923c14dbd11885684cecec51cc7e0a5d6031d8512f3ecc040",
|
|
22
22
|
"dist/compliance-rules/baseline.js": "6296dea6bcb9f9bb80ed6ed5ab2f456e7f74e6de2be5d2d98ca8c983fb4df3ab",
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
"dist/manifest.js": "83eed0d59621039ef364cf6e7b54c5bd47e0d8cf0a5abe7b07344bfc1db56ed8",
|
|
55
55
|
"dist/match.js": "2299245c0ba85481afe470c95f0f79502b6310b6870f776d16d88525a5e5da63",
|
|
56
56
|
"dist/mcp-authoring.js": "1183a56c5decb99ecb67a5da7bd91d1b494bc17a2965051aa63c4a7e291462b5",
|
|
57
|
-
"dist/mcp.js": "
|
|
57
|
+
"dist/mcp.js": "c835bbfda949a4e3ae0a3143a207a5bc3ebadc8e1ca5211668db1e8afc4ea1c1",
|
|
58
58
|
"dist/observability.js": "f4b1ab496f051fe3ef2ed36b2b2e469c63a8940700e2df852e6ff2d9cccdd5ae",
|
|
59
59
|
"dist/operator-host.js": "e3dac9d43a83beb775202b4ab9eeeba7ac63cebfc5dcc669be38d825be587bd0",
|
|
60
60
|
"dist/pattern-guard.js": "6f157ced99666a89ca5af1418f5a14568d850985042dea309bf9ec0c19dbaca5",
|
|
61
61
|
"dist/plugins.js": "a61aa933cd9e1b41020b86fae78aa3a7f45f5313124aa11b50cb57898722385e",
|
|
62
|
-
"dist/policies/agents.js": "
|
|
62
|
+
"dist/policies/agents.js": "b07f162fa8bfadf8866c09f9499a84c01740834703085e9ccf5a8cd1e02f6113",
|
|
63
63
|
"dist/policies/cache.js": "d08184e50b0ecb7331b29e4145aaefacb23b64ddaf3555d579743762f90c1629",
|
|
64
64
|
"dist/policies/compression.js": "800f3ae3b1a4c1fe58c3d9908364ea9d78f655ff50c7f7589f584378e7f194b0",
|
|
65
|
-
"dist/policies/security.js": "
|
|
65
|
+
"dist/policies/security.js": "56dae854eb612cb83f3f81b144dd54034d45fefe7801afbfa4129b1e1609f1c0",
|
|
66
66
|
"dist/policies/throttle.js": "bbb0cb1c24cf70d0a1ac32fc0618efb6c44e5b5d42564842f9c585ff7e501603",
|
|
67
|
-
"dist/policies.js": "
|
|
67
|
+
"dist/policies.js": "790694d06edb0a986a8a95e4eb6dcad0dc006cc53d84d4511b9e125a9b09a563",
|
|
68
68
|
"dist/policy.js": "2da95b3f1f77249b1e9f399a06b88909b68594fdbc958176075e91ff23104a7c",
|
|
69
69
|
"dist/prerender.js": "6210999e848ab86c87f265943960ef63716896da7a40e248221a6a30425c56b8",
|
|
70
70
|
"dist/project-dependencies.js": "b43a8f3125f62d38f0e71237b7813a785ef0613a83fcdec3fa8314f33758a534",
|
|
@@ -85,10 +85,10 @@
|
|
|
85
85
|
"dist/site.js": "9f8154d0a62ed1b650c064a24e609d50dd370f0ff2cee2567628029e30855616",
|
|
86
86
|
"dist/tooling.js": "9fa72ac5fdcdb56c9e17ee5d8efae83e100d3ad862f90e855dd5766424830b57",
|
|
87
87
|
"dist/trusted-functions.js": "f3800c75f45ce90faf85ba6664398ad9031c5a9ac51d5ce42bdcff08a497d48e",
|
|
88
|
-
"dist/types.js": "
|
|
88
|
+
"dist/types.js": "63c84f6eb1f7157858435739105249219dcbfb3d65189065aa7444370af51755",
|
|
89
89
|
"dist/typescript-authoring.js": "df3d9c82e6b545cae5caae04c443ed4d2feae96def5e5cde250c0a90d83ae98c",
|
|
90
90
|
"dist/vercel.js": "a0da20c095d0c7fa8f579ed4dd5951e7a34191f8a72a57c5e782c9eab39f6f08",
|
|
91
91
|
"dist/verify-deployment.js": "2d3b6301b70684abfccea669f7901afda7fae9d9d66902809ecdef65f22aea16",
|
|
92
|
-
"dist/scripts/operational-drills.js": "
|
|
92
|
+
"dist/scripts/operational-drills.js": "26f487454f7602b26d17c28eccd78aa59954cd7975791ac140092c614b36bc19"
|
|
93
93
|
}
|
|
94
94
|
}
|
package/dist/agents-guide.js
CHANGED
|
@@ -95,7 +95,7 @@ urlcode test
|
|
|
95
95
|
urlcode audit --expect-routes ${routes}
|
|
96
96
|
\`\`\`
|
|
97
97
|
|
|
98
|
-
Run all three after every change, updating the route count deliberately and adding \`tests/requests.json\` fixtures for every new route (positive/negative, every active method, HEAD). No global install: use \`node /path/to/urlcode/src/cli.ts\`.
|
|
98
|
+
Run all three after every change, updating the route count deliberately and adding \`tests/requests.json\` fixtures for every new route (positive/negative, every active method, HEAD). No global install: use \`node /path/to/urlcode/packages/core/src/cli.ts\`.
|
|
99
99
|
|
|
100
100
|
## Feedback
|
|
101
101
|
|
package/dist/capabilities.js
CHANGED
|
@@ -6,7 +6,7 @@ import { effectivePolicies, registry } from './policies.js';
|
|
|
6
6
|
|
|
7
7
|
export const capabilityTargets = ['self-hosted', 'cloudflare', 'aws', 'vercel', 'static'] ;
|
|
8
8
|
|
|
9
|
-
/** `static` never reaches the policy-module handshake (src/types.ts `TargetName`): it refuses every
|
|
9
|
+
/** `static` never reaches the policy-module handshake (packages/core/src/types.ts `TargetName`): it refuses every
|
|
10
10
|
* runtime policy outright, so it needs no entry in that exhaustive per-target record. */
|
|
11
11
|
|
|
12
12
|
|
package/dist/cli.js
CHANGED
|
@@ -30,7 +30,7 @@ import { readFile } from 'node:fs/promises';
|
|
|
30
30
|
import { installArtifact, inspectArtifacts } from './extension-artifacts.js';
|
|
31
31
|
import { installBundle, readBundleLock } from './extension-bundles.js';
|
|
32
32
|
|
|
33
|
-
const usage = `URLCode 0.5.
|
|
33
|
+
const usage = `URLCode 0.5.6 — local/self-hosted runtime
|
|
34
34
|
urlcode init <directory> [--template page|redirects] [--with ui,auth,admin] [--bundle-release extension-bundles@vX.Y.Z] [--ack extension:id] [--manifest|--no-manifest] [--pin @scope/pkg=specifier]
|
|
35
35
|
# --template redirects: the tested redirect starter from 'urlcode context --task redirects' (urlcode.yaml, 404.html, package.json with a PORT-aware start script, tests, AGENTS.md, .mcp.json); not combinable with --with
|
|
36
36
|
# init works in place in a directory holding only package.json, package-lock.json, node_modules or .git: package.json is merged (scripts.start added, an existing pin kept), any other existing file is refused
|
package/dist/mcp.js
CHANGED
|
@@ -102,7 +102,7 @@ export async function serveMcp(options ) {
|
|
|
102
102
|
if(message.method==='initialize') {
|
|
103
103
|
if(initialized){await error(id,-32600,'Already initialized');return;}
|
|
104
104
|
if(typeof params.protocolVersion!=='string'||!object(params.capabilities)||!object(params.clientInfo)||typeof params.clientInfo.name!=='string'||typeof params.clientInfo.version!=='string'){await error(id,-32602,'Invalid initialize params');return;}
|
|
105
|
-
initialized=true;await send({jsonrpc:'2.0',id,result:{protocolVersion,capabilities:{tools:{}},serverInfo:{name:'urlcode',version:'0.5.
|
|
105
|
+
initialized=true;await send({jsonrpc:'2.0',id,result:{protocolVersion,capabilities:{tools:{}},serverInfo:{name:'urlcode',version:'0.5.6'}}});return;
|
|
106
106
|
}
|
|
107
107
|
if(message.method==='ping'){await send({jsonrpc:'2.0',id,result:{}});return;}
|
|
108
108
|
if(!ready){await error(id,-32002,'Initialize first');return;}
|
package/dist/policies/agents.js
CHANGED
|
@@ -2,7 +2,7 @@ import { assert, ConfigError } from '../errors.js';
|
|
|
2
2
|
import { lists as bundled } from '../../data/agents/index.js';
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
// User-Agent policy. Contract in src/policies.ts. This module also runs inside
|
|
5
|
+
// User-Agent policy. Contract in packages/core/src/policies.ts. This module also runs inside
|
|
6
6
|
// the Cloudflare Worker, so it has no Node imports and never touches the
|
|
7
7
|
// filesystem: bundled lists arrive through the generated data/agents/index.js
|
|
8
8
|
// and project-relative list files arrive already loaded (src/agent-lists.ts
|
|
@@ -43,7 +43,7 @@ export const profiles
|
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
// Headers the runtime or a handler owns; `set` may not claim them. Mirrors
|
|
46
|
-
// the set in src/http-policy.ts (that file uses the Node Buffer global, so the
|
|
46
|
+
// the set in packages/core/src/http-policy.ts (that file uses the Node Buffer global, so the
|
|
47
47
|
// list is reproduced rather than imported).
|
|
48
48
|
export const reservedHeaders = Object.freeze(new Set(['connection','keep-alive','transfer-encoding','content-length','upgrade','trailer','proxy-authenticate','proxy-authorization','te','location','allow','content-range','accept-ranges','etag','last-modified','content-encoding','x-request-id','x-content-type-options','content-type','set-cookie','cache-control','vary','ratelimit','ratelimit-policy','retry-after','age']));
|
|
49
49
|
|
package/dist/policies.js
CHANGED
|
@@ -13,7 +13,7 @@ import { assert, ConfigError } from './errors.js';
|
|
|
13
13
|
// function/middleware execution entirely -- trusted routes and sandbox: true
|
|
14
14
|
// routes alike. Every
|
|
15
15
|
// module here follows one contract so a first-party policy and an operator
|
|
16
|
-
// plugin share a code path (PolicyModule in src/types.ts):
|
|
16
|
+
// plugin share a code path (PolicyModule in packages/core/src/types.ts):
|
|
17
17
|
//
|
|
18
18
|
// name the YAML key under `policies`
|
|
19
19
|
// phases 'request' | 'response' | both; fixed order below
|
|
@@ -4,7 +4,7 @@ import {mkdtemp,mkdir,writeFile,rm} from 'node:fs/promises';
|
|
|
4
4
|
import {tmpdir} from 'node:os';
|
|
5
5
|
import {join} from 'node:path';
|
|
6
6
|
import {startServer} from '../server.js';
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
|
|
9
9
|
const seconds=Number(process.env.URLCODE_SOAK_SECONDS||5);
|
|
10
10
|
assert(Number.isInteger(seconds)&&seconds>=1&&seconds<=3600,'Soak must be 1–3600 seconds');
|
package/dist/types.js
CHANGED
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
// ---------------------------------------------------------------------------
|
|
157
|
-
// The host-side policy contract (src/policies.ts documents the phases).
|
|
157
|
+
// The host-side policy contract (packages/core/src/policies.ts documents the phases).
|
|
158
158
|
|
|
159
159
|
|
|
160
160
|
|
package/docs/AI-AUTHORING.md
CHANGED
|
@@ -138,7 +138,7 @@ urlcode benchmark --project ./my-links --requests 100 --concurrency 2
|
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
Use the intentional actual count, not always 2. Runtime checkout users can replace
|
|
141
|
-
`urlcode` with `node src/cli.ts`. Template users can use the equivalent npm scripts.
|
|
141
|
+
`urlcode` with `node packages/core/src/cli.ts`. Template users can use the equivalent npm scripts.
|
|
142
142
|
External bindings require an already reviewed policy; add `--policy` where needed.
|
|
143
143
|
The benchmark operates locally; it is not a load test of an external deployment.
|
|
144
144
|
|
|
@@ -9,9 +9,9 @@ files: [urlcode.yaml, functions/hello.mjs, public/about.html, public/guide.txt,
|
|
|
9
9
|
tests:
|
|
10
10
|
fixtures: tests/requests.json
|
|
11
11
|
commands:
|
|
12
|
-
- node src/cli.ts validate --local --project examples/assets
|
|
13
|
-
- node src/cli.ts test --project examples/assets
|
|
14
|
-
- node src/cli.ts audit --project examples/assets --expect-routes 5
|
|
12
|
+
- node packages/core/src/cli.ts validate --local --project examples/assets
|
|
13
|
+
- node packages/core/src/cli.ts test --project examples/assets
|
|
14
|
+
- node packages/core/src/cli.ts audit --project examples/assets --expect-routes 5
|
|
15
15
|
behavior:
|
|
16
16
|
- native page, static and download routes serve snapshotted files with explicit caching
|
|
17
17
|
- one trusted function shows the two kinds of route side by side
|
|
@@ -12,9 +12,9 @@ files: [urlcode.yaml, handler.mjs, template.yaml, public/index.html, public/note
|
|
|
12
12
|
tests:
|
|
13
13
|
fixtures: tests/requests.json
|
|
14
14
|
commands:
|
|
15
|
-
- node src/cli.ts validate --local --project examples/aws
|
|
16
|
-
- node src/cli.ts test --project examples/aws
|
|
17
|
-
- node src/cli.ts audit --project examples/aws --expect-routes 5
|
|
15
|
+
- node packages/core/src/cli.ts validate --local --project examples/aws
|
|
16
|
+
- node packages/core/src/cli.ts test --project examples/aws
|
|
17
|
+
- node packages/core/src/cli.ts audit --project examples/aws --expect-routes 5
|
|
18
18
|
behavior:
|
|
19
19
|
- every route is native, so the project activates on Lambda without the sandbox
|
|
20
20
|
- handler.mjs wraps the project with createLambdaHandler; deployment itself is unverified evidence
|
|
@@ -12,8 +12,8 @@ files: [urlcode.yaml, wrangler.toml, tests/requests.json, README.md]
|
|
|
12
12
|
tests:
|
|
13
13
|
fixtures: tests/requests.json
|
|
14
14
|
commands:
|
|
15
|
-
- node src/cli.ts validate --local --project examples/cloudflare
|
|
16
|
-
- node src/cli.ts test --project examples/cloudflare
|
|
17
|
-
- node src/cli.ts audit --project examples/cloudflare --expect-routes 4
|
|
15
|
+
- node packages/core/src/cli.ts validate --local --project examples/cloudflare
|
|
16
|
+
- node packages/core/src/cli.ts test --project examples/cloudflare
|
|
17
|
+
- node packages/core/src/cli.ts audit --project examples/cloudflare --expect-routes 4
|
|
18
18
|
behavior:
|
|
19
19
|
- only capabilities the Worker lowering supports appear, so the build succeeds on every target
|
|
@@ -10,7 +10,7 @@ Run it against the cookbook from the runtime checkout. The module must be an
|
|
|
10
10
|
absolute path outside the audited project:
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
node src/cli.ts audit --project examples/cookbook \
|
|
13
|
+
node packages/core/src/cli.ts audit --project examples/cookbook \
|
|
14
14
|
--compliance baseline --compliance-rules "$PWD/examples/compliance/rules.mjs" --compliance-warn
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -6,6 +6,6 @@ runnable: false
|
|
|
6
6
|
files: [rules.mjs, README.md]
|
|
7
7
|
tests:
|
|
8
8
|
commands:
|
|
9
|
-
- node src/cli.ts audit --project examples/cookbook --compliance baseline --compliance-rules "$PWD/examples/compliance/rules.mjs" --compliance-warn
|
|
9
|
+
- node packages/core/src/cli.ts audit --project examples/cookbook --compliance baseline --compliance-rules "$PWD/examples/compliance/rules.mjs" --compliance-warn
|
|
10
10
|
behavior:
|
|
11
11
|
- three custom rules run alongside the built-in profile; one built-in notice is disabled and one severity raised
|
|
@@ -12,8 +12,8 @@ files: [urlcode.yaml, tests/requests.json, README.md]
|
|
|
12
12
|
tests:
|
|
13
13
|
fixtures: tests/requests.json
|
|
14
14
|
commands:
|
|
15
|
-
- node src/cli.ts validate --local --project examples/conditions --origin https://conditions.example.test
|
|
16
|
-
- node src/cli.ts test --project examples/conditions --origin https://conditions.example.test
|
|
17
|
-
- node src/cli.ts audit --project examples/conditions --expect-routes 4 --origin https://conditions.example.test
|
|
15
|
+
- node packages/core/src/cli.ts validate --local --project examples/conditions --origin https://conditions.example.test
|
|
16
|
+
- node packages/core/src/cli.ts test --project examples/conditions --origin https://conditions.example.test
|
|
17
|
+
- node packages/core/src/cli.ts audit --project examples/conditions --expect-routes 4 --origin https://conditions.example.test
|
|
18
18
|
behavior:
|
|
19
19
|
- cases are provably disjoint and every branch stays no-store; no branch is authentication
|
|
@@ -11,10 +11,10 @@ external services are required. Redirects target example.com; tests never follow
|
|
|
11
11
|
From the runtime checkout:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
node src/cli.ts validate --project examples/cookbook
|
|
15
|
-
node src/cli.ts test --project examples/cookbook
|
|
16
|
-
node src/cli.ts audit --project examples/cookbook --expect-routes 40
|
|
17
|
-
node src/cli.ts dev --project examples/cookbook
|
|
14
|
+
node packages/core/src/cli.ts validate --project examples/cookbook
|
|
15
|
+
node packages/core/src/cli.ts test --project examples/cookbook
|
|
16
|
+
node packages/core/src/cli.ts audit --project examples/cookbook --expect-routes 40
|
|
17
|
+
node packages/core/src/cli.ts dev --project examples/cookbook
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
The [YAML guide](../../docs/YAML-GUIDE.md) explains the recipes and binding policy.
|
|
@@ -9,9 +9,9 @@ files: [urlcode.yaml, routes/code.yaml, routes/redirects.yaml, routes/responses.
|
|
|
9
9
|
tests:
|
|
10
10
|
fixtures: tests/requests.json
|
|
11
11
|
commands:
|
|
12
|
-
- node src/cli.ts validate --local --project examples/cookbook
|
|
13
|
-
- node src/cli.ts test --project examples/cookbook
|
|
14
|
-
- node src/cli.ts audit --project examples/cookbook --expect-routes 40
|
|
12
|
+
- node packages/core/src/cli.ts validate --local --project examples/cookbook
|
|
13
|
+
- node packages/core/src/cli.ts test --project examples/cookbook
|
|
14
|
+
- node packages/core/src/cli.ts audit --project examples/cookbook --expect-routes 40
|
|
15
15
|
behavior:
|
|
16
16
|
- urlcode examples search finds single routes here through the generated route-index.json
|
|
17
17
|
- fifteen routes exercise the fourteen middleware modules that the middleware recipe copies
|
|
@@ -9,8 +9,8 @@ files: [urlcode.yaml, functions/notes.mjs, tests/requests.json, README.md]
|
|
|
9
9
|
tests:
|
|
10
10
|
fixtures: tests/requests.json
|
|
11
11
|
commands:
|
|
12
|
-
- node src/cli.ts validate --local --project examples/coverage-waiver
|
|
13
|
-
- node src/cli.ts test --project examples/coverage-waiver
|
|
14
|
-
- node src/cli.ts audit --project examples/coverage-waiver --expect-routes 1
|
|
12
|
+
- node packages/core/src/cli.ts validate --local --project examples/coverage-waiver
|
|
13
|
+
- node packages/core/src/cli.ts test --project examples/coverage-waiver
|
|
14
|
+
- node packages/core/src/cli.ts audit --project examples/coverage-waiver --expect-routes 1
|
|
15
15
|
behavior:
|
|
16
16
|
- POST /notes is waived from coverage with a reason; GET is asserted by a fixture; the waiver is listed by audit, not hidden
|
|
@@ -13,7 +13,7 @@ grants:
|
|
|
13
13
|
files: [urlcode.yaml, README.md]
|
|
14
14
|
tests:
|
|
15
15
|
commands:
|
|
16
|
-
- node src/cli.ts permissions --project examples/egress
|
|
17
|
-
- node src/cli.ts validate --local --project examples/egress --policy /operator/egress-policy.json
|
|
16
|
+
- node packages/core/src/cli.ts permissions --project examples/egress
|
|
17
|
+
- node packages/core/src/cli.ts validate --local --project examples/egress --policy /operator/egress-policy.json
|
|
18
18
|
behavior:
|
|
19
19
|
- without the policy the project refuses to activate; nothing here reaches the network during authoring inspection
|
|
@@ -16,6 +16,6 @@ grants:
|
|
|
16
16
|
files: [urlcode.yaml, README.md]
|
|
17
17
|
tests:
|
|
18
18
|
commands:
|
|
19
|
-
- node src/cli.ts validate --local --project examples/extensions --host-file /operator/host.mjs --origin https://extensions.example.test
|
|
19
|
+
- node packages/core/src/cli.ts validate --local --project examples/extensions --host-file /operator/host.mjs --origin https://extensions.example.test
|
|
20
20
|
behavior:
|
|
21
21
|
- "/account uses auth: {role: member}; routes and audit show the expanded policies.extensions.auth form"
|
|
@@ -12,8 +12,8 @@ files: [urlcode.yaml, functions/notes.mjs, tests/requests.json, README.md]
|
|
|
12
12
|
tests:
|
|
13
13
|
fixtures: tests/requests.json
|
|
14
14
|
commands:
|
|
15
|
-
- node src/cli.ts test --project examples/lifecycle
|
|
16
|
-
- node src/cli.ts audit --project examples/lifecycle --expect-routes 2
|
|
15
|
+
- node packages/core/src/cli.ts test --project examples/lifecycle
|
|
16
|
+
- node packages/core/src/cli.ts audit --project examples/lifecycle --expect-routes 2
|
|
17
17
|
behavior:
|
|
18
18
|
- a note created by POST /notes is readable, replaceable and still present after the runtime restarts on the same data directory
|
|
19
19
|
- the id and Location the create response returns are captured and substituted into later steps as {{id}} and {{where}}
|
|
@@ -5,6 +5,6 @@ route, with status 404 and `text/html`. See
|
|
|
5
5
|
[site conventions](../../docs/SITE.md#notfound--404html).
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
node src/cli.ts test --project examples/not-found
|
|
9
|
-
node src/cli.ts build --target static --project examples/not-found # writes 404.html
|
|
8
|
+
node packages/core/src/cli.ts test --project examples/not-found
|
|
9
|
+
node packages/core/src/cli.ts build --target static --project examples/not-found # writes 404.html
|
|
10
10
|
```
|
|
@@ -9,9 +9,9 @@ files: [urlcode.yaml, public/index.html, public/404.html, tests/requests.json, R
|
|
|
9
9
|
tests:
|
|
10
10
|
fixtures: tests/requests.json
|
|
11
11
|
commands:
|
|
12
|
-
- node src/cli.ts validate --local --project examples/not-found
|
|
13
|
-
- node src/cli.ts test --project examples/not-found
|
|
14
|
-
- node src/cli.ts audit --project examples/not-found --expect-routes 2
|
|
12
|
+
- node packages/core/src/cli.ts validate --local --project examples/not-found
|
|
13
|
+
- node packages/core/src/cli.ts test --project examples/not-found
|
|
14
|
+
- node packages/core/src/cli.ts audit --project examples/not-found --expect-routes 2
|
|
15
15
|
behavior:
|
|
16
16
|
- an unmatched GET or HEAD is answered with the page and status 404
|
|
17
17
|
- other methods keep the plain-text 404
|
|
@@ -14,11 +14,11 @@ runs no code at all.
|
|
|
14
14
|
From the runtime checkout:
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
|
-
node src/cli.ts dev --project examples/prerender # the dynamic source, live
|
|
18
|
-
node src/cli.ts test --project examples/prerender # 7 fixtures
|
|
17
|
+
node packages/core/src/cli.ts dev --project examples/prerender # the dynamic source, live
|
|
18
|
+
node packages/core/src/cli.ts test --project examples/prerender # 7 fixtures
|
|
19
19
|
node examples/prerender/prerender.mjs examples/prerender /absolute/out
|
|
20
|
-
node src/cli.ts test --project /absolute/out # fixtures the build wrote
|
|
21
|
-
node src/cli.ts audit --project /absolute/out --expect-routes 3
|
|
20
|
+
node packages/core/src/cli.ts test --project /absolute/out # fixtures the build wrote
|
|
21
|
+
node packages/core/src/cli.ts audit --project /absolute/out --expect-routes 3
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
The same three URLs answer identically before and after. The difference is what
|
|
@@ -9,8 +9,8 @@ files: [urlcode.yaml, functions/page.mjs, middleware/template.mjs, prerender.mjs
|
|
|
9
9
|
tests:
|
|
10
10
|
fixtures: tests/requests.json
|
|
11
11
|
commands:
|
|
12
|
-
- node src/cli.ts test --project examples/prerender
|
|
12
|
+
- node packages/core/src/cli.ts test --project examples/prerender
|
|
13
13
|
- node examples/prerender/prerender.mjs examples/prerender /absolute/out
|
|
14
|
-
- node src/cli.ts audit --project /absolute/out --expect-routes 3
|
|
14
|
+
- node packages/core/src/cli.ts audit --project /absolute/out --expect-routes 3
|
|
15
15
|
behavior:
|
|
16
16
|
- the rendered project serves the same bytes from native page routes with no sandbox on the request path
|
|
@@ -8,7 +8,7 @@ routes: 5
|
|
|
8
8
|
files: [urlcode.yaml, README.md]
|
|
9
9
|
tests:
|
|
10
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
|
|
11
|
+
- node packages/core/src/cli.ts validate --local --project examples/provider-conformance
|
|
12
|
+
- node packages/core/src/cli.ts verify-provider --target self-hosted --origin https://owned-fixture.example
|
|
13
13
|
behavior:
|
|
14
14
|
- no functions, bindings, assets or policies, so every target activates it; never mix it into a real project
|
|
@@ -10,8 +10,8 @@ files: [urlcode.yaml, tests/requests.json, README.md]
|
|
|
10
10
|
tests:
|
|
11
11
|
fixtures: tests/requests.json
|
|
12
12
|
commands:
|
|
13
|
-
- node src/cli.ts validate --local --project examples/shared-blocks
|
|
14
|
-
- node src/cli.ts test --project examples/shared-blocks
|
|
15
|
-
- node src/cli.ts audit --project examples/shared-blocks --expect-routes 4
|
|
13
|
+
- node packages/core/src/cli.ts validate --local --project examples/shared-blocks
|
|
14
|
+
- node packages/core/src/cli.ts test --project examples/shared-blocks
|
|
15
|
+
- node packages/core/src/cli.ts audit --project examples/shared-blocks --expect-routes 4
|
|
16
16
|
behavior:
|
|
17
17
|
- a route's own request or response key replaces the shared block whole; nothing is deep merged
|
|
@@ -12,8 +12,8 @@ files: [urlcode.yaml, api/index.js, vercel.json, public/index.html, public/notes
|
|
|
12
12
|
tests:
|
|
13
13
|
fixtures: tests/requests.json
|
|
14
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
|
|
15
|
+
- node packages/core/src/cli.ts validate --local --project examples/vercel
|
|
16
|
+
- node packages/core/src/cli.ts test --project examples/vercel
|
|
17
|
+
- node packages/core/src/cli.ts audit --project examples/vercel --expect-routes 5
|
|
18
18
|
behavior:
|
|
19
19
|
- every route is native, so the project activates on Vercel without the sandbox
|
package/llms-full.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- Generated by scripts/build-llms-full.ts (npm run docs:llms). Do not edit; edit the source documents. -->
|
|
2
|
-
<!-- Consolidated URLCode authoring reference: 16 documents, about 61,
|
|
2
|
+
<!-- Consolidated URLCode authoring reference: 16 documents, about 61,257 tokens (estimate: characters / 4). -->
|
|
3
3
|
|
|
4
4
|
<!-- urlcode-current-version:start -->
|
|
5
5
|
# URLCode
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
> A portable runtime for programmable URL behavior, and the framework that grows
|
|
8
8
|
> from it: routes in YAML, functions and middleware, then accounts, administration and
|
|
9
9
|
> stored links as operator-installed extensions. Stable project format
|
|
10
|
-
> `version: "1"`. Core is Apache-2.0; this revision is `0.5.
|
|
10
|
+
> `version: "1"`. Core is Apache-2.0; this revision is `0.5.6`. `function`/`middleware`
|
|
11
11
|
> routes are trusted by default with `sandbox: true` as the per-route opt-in. The
|
|
12
12
|
> auth, admin, ui and store workspace packages are bundle sources. New sites install
|
|
13
13
|
> core from npm and verified executable extensions from an immutable GitHub Release;
|
|
@@ -439,7 +439,7 @@ urlcode benchmark --project ./my-links --requests 100 --concurrency 2
|
|
|
439
439
|
```
|
|
440
440
|
|
|
441
441
|
Use the intentional actual count, not always 2. Runtime checkout users can replace
|
|
442
|
-
`urlcode` with `node src/cli.ts`. Template users can use the equivalent npm scripts.
|
|
442
|
+
`urlcode` with `node packages/core/src/cli.ts`. Template users can use the equivalent npm scripts.
|
|
443
443
|
External bindings require an already reviewed policy; add `--policy` where needed.
|
|
444
444
|
The benchmark operates locally; it is not a load test of an external deployment.
|
|
445
445
|
|
|
@@ -773,7 +773,7 @@ programmatic compatibility analysis and provider verification limits.
|
|
|
773
773
|
Source: https://github.com/jimhoyd-com/urlcode/blob/main/docs/YAML-GUIDE.md
|
|
774
774
|
|
|
775
775
|
<!-- urlcode-current-version:start -->
|
|
776
|
-
This guide targets URLCode 0.5.
|
|
776
|
+
This guide targets URLCode 0.5.6. Start with the function example below,
|
|
777
777
|
then add only the fields your route needs. The authoritative machine-readable
|
|
778
778
|
shape is [JSON Schema](https://github.com/jimhoyd-com/urlcode/blob/main/schemas/urlcode.schema.json); semantic rules are in the
|
|
779
779
|
[specification](https://github.com/jimhoyd-com/urlcode/blob/main/docs/SPECIFICATION.md). Unsupported fields fail validation.
|
|
@@ -788,10 +788,10 @@ From the runtime checkout:
|
|
|
788
788
|
|
|
789
789
|
```sh
|
|
790
790
|
npm ci
|
|
791
|
-
node src/cli.ts validate --project examples/cookbook
|
|
792
|
-
node src/cli.ts test --project examples/cookbook
|
|
793
|
-
node src/cli.ts audit --project examples/cookbook --expect-routes 40
|
|
794
|
-
node src/cli.ts dev --project examples/cookbook
|
|
791
|
+
node packages/core/src/cli.ts validate --project examples/cookbook
|
|
792
|
+
node packages/core/src/cli.ts test --project examples/cookbook
|
|
793
|
+
node packages/core/src/cli.ts audit --project examples/cookbook --expect-routes 40
|
|
794
|
+
node packages/core/src/cli.ts dev --project examples/cookbook
|
|
795
795
|
```
|
|
796
796
|
|
|
797
797
|
The cookbook is a larger learning project. The normal `urlcode init ../my-links`
|
package/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
> A portable runtime for programmable URL behavior, and the framework that grows
|
|
5
5
|
> from it: routes in YAML, functions and middleware, then accounts, administration and
|
|
6
6
|
> stored links as operator-installed extensions. Stable project format
|
|
7
|
-
> `version: "1"`. Core is Apache-2.0; this revision is `0.5.
|
|
7
|
+
> `version: "1"`. Core is Apache-2.0; this revision is `0.5.6`. `function`/`middleware`
|
|
8
8
|
> routes are trusted by default with `sandbox: true` as the per-route opt-in. The
|
|
9
9
|
> auth, admin, ui and store workspace packages are bundle sources. New sites install
|
|
10
10
|
> core from npm and verified executable extensions from an immutable GitHub Release;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimhoyd/urlcode",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"description": "Portable runtime for programmable URL behavior",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -99,22 +99,22 @@
|
|
|
99
99
|
"test:shard": "node --conditions=development --test",
|
|
100
100
|
"lint": "eslint .",
|
|
101
101
|
"check": "npm run check:code && npm run check:docs",
|
|
102
|
-
"check:code": "node scripts/check.ts && node scripts/check-release-tags.ts && node scripts/check-workspace-links.ts && node scripts/check-issue-labels.ts && npm run release:check",
|
|
102
|
+
"check:code": "node scripts/check.ts && node scripts/check-core-boundaries.ts && node scripts/check-release-tags.ts && node scripts/check-workspace-links.ts && node scripts/check-issue-labels.ts && npm run release:check",
|
|
103
103
|
"test:workerd": "node scripts/workerd-parity.ts",
|
|
104
104
|
"verify": "npm run lint && npm run typecheck && npm run check && npm run build && npm test && npm run verify:workspaces",
|
|
105
105
|
"workspace:styles": "npm run styles --workspace @jimhoyd/urlcode-ui",
|
|
106
106
|
"verify:workspaces": "npm run verify --workspace @jimhoyd/urlcode-ui && npm run verify --workspace @jimhoyd/urlcode-auth && npm run verify --workspace @jimhoyd/urlcode-admin && npm run verify --workspace @jimhoyd/urlcode-store && npm run verify --workspace @jimhoyd/urlcode-forms && npm run audit:packages && npm run test:workspace-integration",
|
|
107
107
|
"audit:packages": "node scripts/package-audit.ts --all",
|
|
108
108
|
"test:package": "npm run build && npm run test:package:built",
|
|
109
|
-
"dev": "node src/cli.ts dev --project starters/default",
|
|
110
|
-
"serve": "node src/cli.ts serve --project starters/default",
|
|
111
|
-
"validate": "node src/cli.ts validate --local --project starters/default",
|
|
112
|
-
"test:project": "node src/cli.ts test --project starters/default",
|
|
113
|
-
"init": "node src/cli.ts init",
|
|
114
|
-
"doctor": "node src/cli.ts doctor",
|
|
115
|
-
"routes": "node src/cli.ts routes --project starters/default",
|
|
116
|
-
"audit:routes": "node src/cli.ts audit --project starters/default",
|
|
117
|
-
"benchmark:project": "node src/cli.ts benchmark --project starters/default",
|
|
109
|
+
"dev": "node packages/core/src/cli.ts dev --project starters/default",
|
|
110
|
+
"serve": "node packages/core/src/cli.ts serve --project starters/default",
|
|
111
|
+
"validate": "node packages/core/src/cli.ts validate --local --project starters/default",
|
|
112
|
+
"test:project": "node packages/core/src/cli.ts test --project starters/default",
|
|
113
|
+
"init": "node packages/core/src/cli.ts init",
|
|
114
|
+
"doctor": "node packages/core/src/cli.ts doctor",
|
|
115
|
+
"routes": "node packages/core/src/cli.ts routes --project starters/default",
|
|
116
|
+
"audit:routes": "node packages/core/src/cli.ts audit --project starters/default",
|
|
117
|
+
"benchmark:project": "node packages/core/src/cli.ts benchmark --project starters/default",
|
|
118
118
|
"docs:reference": "node scripts/generate-yaml-reference.ts",
|
|
119
119
|
"docs:plugin": "node scripts/generate-claude-plugin.ts",
|
|
120
120
|
"docs:llms": "node scripts/build-llms-full.ts",
|
package/skills/urlcode/SKILL.md
CHANGED
|
@@ -22,7 +22,7 @@ Check installed primitives, YAML configuration, policies, extensions and recipes
|
|
|
22
22
|
policies and commands this runtime version supports.
|
|
23
23
|
- Find the runtime: `urlcode` on the PATH, or
|
|
24
24
|
`node node_modules/@jimhoyd/urlcode/dist/cli.js`, or
|
|
25
|
-
`node /path/to/urlcode/src/cli.ts` for a source checkout. Use one form for
|
|
25
|
+
`node /path/to/urlcode/packages/core/src/cli.ts` for a source checkout. Use one form for
|
|
26
26
|
every command below.
|
|
27
27
|
|
|
28
28
|
## 2. Retrieve the minimum, do not read everything
|
|
@@ -59,7 +59,7 @@ urlcode test
|
|
|
59
59
|
urlcode audit --expect-routes 2
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
Run all three after every change, updating the route count deliberately and adding `tests/requests.json` fixtures for every new route (positive/negative, every active method, HEAD). No global install: use `node /path/to/urlcode/src/cli.ts`.
|
|
62
|
+
Run all three after every change, updating the route count deliberately and adding `tests/requests.json` fixtures for every new route (positive/negative, every active method, HEAD). No global install: use `node /path/to/urlcode/packages/core/src/cli.ts`.
|
|
63
63
|
|
|
64
64
|
## Feedback
|
|
65
65
|
|
|
@@ -19,8 +19,8 @@ The function route uses `middleware/headers.mjs` to add a response header around
|
|
|
19
19
|
GET/HEAD, redirect 302 and no-store defaults keep YAML short. Valid edits reload.
|
|
20
20
|
|
|
21
21
|
This app uses the runtime you installed separately (compatible with 0.1.0).
|
|
22
|
-
Without a global install, invoke `node /path/to/urlcode/src/cli.ts` instead of
|
|
23
|
-
`urlcode`. Optional Make shortcuts accept `URLCODE='node /path/to/urlcode/src/cli.ts'`.
|
|
22
|
+
Without a global install, invoke `node /path/to/urlcode/packages/core/src/cli.ts` instead of
|
|
23
|
+
`urlcode`. Optional Make shortcuts accept `URLCODE='node /path/to/urlcode/packages/core/src/cli.ts'`.
|
|
24
24
|
For a cloneable project with a pinned npm runtime dependency, use
|
|
25
25
|
[urlcode-template](https://github.com/jimhoyd-com/urlcode-template). Both start
|
|
26
26
|
with the same two route examples. No runtime fork or provider account is needed.
|