@owlmeans/route 0.1.6 → 0.1.8
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/README.md
CHANGED
|
@@ -73,3 +73,20 @@ enum RouteProtocols { WEB = 'http', SOCKET = 'ws' }
|
|
|
73
73
|
|
|
74
74
|
- [`@owlmeans/module`](../module) — `module()` takes a `CommonRouteModel` as first argument
|
|
75
75
|
- [`@owlmeans/server-app`](../server-app) — re-exports `route` as `broute` (backend) alongside `route`
|
|
76
|
+
|
|
77
|
+
<!-- owlmeans:agent-guidance:start -->
|
|
78
|
+
## Agent guidance
|
|
79
|
+
|
|
80
|
+
This package ships embedded Claude Code skills and GitHub Copilot instructions under
|
|
81
|
+
`agent-meta/`. After installing your `@owlmeans/*` packages, run the OwlMeans
|
|
82
|
+
agent-skills installer to place them into your project's native locations
|
|
83
|
+
(`.claude/skills/` and `.github/instructions/`):
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
npx @owlmeans/agent-skills
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The embedded files are version-matched to this package release. Do not edit them
|
|
90
|
+
directly — they are regenerated on each publish. To contribute guidance edits,
|
|
91
|
+
open a PR against the source monorepo.
|
|
92
|
+
<!-- owlmeans:agent-guidance:end -->
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "How to use @owlmeans/route — route() helper for declaring URL paths, frontend() marker for React routes, RouteMethod enum. Use when defining a module's URL path."
|
|
3
|
+
applyTo: "**/*.ts, **/*.tsx"
|
|
4
|
+
---
|
|
5
|
+
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
6
|
+
|
|
7
|
+
# @owlmeans/route
|
|
8
|
+
|
|
9
|
+
**Layer:** Core
|
|
10
|
+
**Install:** `"@owlmeans/route": "^0.1.8"` in `dependencies`
|
|
11
|
+
|
|
12
|
+
## Key Exports
|
|
13
|
+
|
|
14
|
+
| Export | Description |
|
|
15
|
+
|--------|-------------|
|
|
16
|
+
| `route(alias, path, options?)` | Define a route — path relative to `parent` |
|
|
17
|
+
| `frontend(options?)` | Mark a route as a React page |
|
|
18
|
+
| `RouteMethod` | enum: GET, POST, PUT, DELETE, PATCH |
|
|
19
|
+
| `Route` types | Resolved route shape |
|
|
20
|
+
| Constants | Default route aliases |
|
|
21
|
+
|
|
22
|
+
## Subpath Exports
|
|
23
|
+
|
|
24
|
+
- `./utils` — path manipulation helpers
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { route, frontend, RouteMethod } from '@owlmeans/route'
|
|
30
|
+
|
|
31
|
+
route(manager.back.project.create, '/create', {
|
|
32
|
+
parent: manager.back.project.base,
|
|
33
|
+
method: RouteMethod.POST,
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
route(HOME, '/', frontend({ default: true, parent: BASE }))
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Depends On
|
|
40
|
+
|
|
41
|
+
- `@owlmeans/error`, `@owlmeans/i18n`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"package": "@owlmeans/route",
|
|
4
|
+
"version": "0.1.8",
|
|
5
|
+
"generatedAt": "2026-06-11T16:30:27.177Z",
|
|
6
|
+
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
|
+
"entries": [
|
|
8
|
+
{
|
|
9
|
+
"kind": "skill",
|
|
10
|
+
"name": "route",
|
|
11
|
+
"category": "package-specific",
|
|
12
|
+
"file": "skills/route/SKILL.md",
|
|
13
|
+
"canonicalPath": ".claude/skills/route/SKILL.md"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"kind": "instruction",
|
|
17
|
+
"name": "route",
|
|
18
|
+
"category": "package-specific",
|
|
19
|
+
"file": "instructions/route.instructions.md",
|
|
20
|
+
"canonicalPath": ".github/instructions/route.instructions.md"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: route
|
|
3
|
+
description: How to use @owlmeans/route — route() helper for declaring URL paths, frontend() marker for React routes, RouteMethod enum, and route model types. Auto-invoked when importing route helpers or defining a module's URL path.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
7
|
+
|
|
8
|
+
# @owlmeans/route
|
|
9
|
+
|
|
10
|
+
**Layer:** Core
|
|
11
|
+
**Install:** `"@owlmeans/route": "^0.1.8"` in `dependencies`
|
|
12
|
+
|
|
13
|
+
## Key Exports
|
|
14
|
+
|
|
15
|
+
| Export | Description |
|
|
16
|
+
|--------|-------------|
|
|
17
|
+
| `route(alias, path, options?)` | Define a route — path is relative to `parent` |
|
|
18
|
+
| `frontend(options?)` | Mark a route as a React page (web only) |
|
|
19
|
+
| `RouteMethod` | enum of GET, POST, PUT, DELETE, PATCH |
|
|
20
|
+
| `Route` types | Resolved route shape |
|
|
21
|
+
| Constants | Default route aliases |
|
|
22
|
+
|
|
23
|
+
## Subpath Exports
|
|
24
|
+
|
|
25
|
+
- `./utils` — path manipulation helpers
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { route, frontend, RouteMethod } from '@owlmeans/route'
|
|
31
|
+
import { entrypoint } from '@owlmeans/entrypoint'
|
|
32
|
+
|
|
33
|
+
// Server route
|
|
34
|
+
entrypoint(
|
|
35
|
+
route(manager.back.project.create, '/create', {
|
|
36
|
+
parent: manager.back.project.base,
|
|
37
|
+
method: RouteMethod.POST,
|
|
38
|
+
})
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
// Web route — frontend() marks it as a React page
|
|
42
|
+
entrypoint(
|
|
43
|
+
route(HOME, '/', frontend({ default: true, parent: BASE }))
|
|
44
|
+
)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Depends On
|
|
48
|
+
|
|
49
|
+
- `@owlmeans/error` — route errors
|
|
50
|
+
- `@owlmeans/i18n` — translatable errors
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/route",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@owlmeans/context": "^0.1.
|
|
31
|
+
"@owlmeans/context": "^0.1.8"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@owlmeans/dep-config": "workspace:*",
|