@grapity/grapity 0.2.0 → 0.4.0
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 +47 -14
- package/dist/assets/index-JAhtTTW2.js +336 -0
- package/dist/assets/index-JAhtTTW2.js.map +1 -0
- package/dist/assets/index-LDlidn22.css +1 -0
- package/dist/cli/index.js +1315 -181
- package/dist/core/index.d.ts +391 -23
- package/dist/hub/index.js +34 -7
- package/dist/hub/serve.d.ts +9 -1
- package/dist/hub/serve.js +34 -7
- package/dist/index.html +3 -2
- package/dist/registry/{index-Baj_sSgl.d.ts → index-Bx-7YlUF.d.ts} +18 -11
- package/dist/registry/index.d.ts +1 -1
- package/dist/registry/index.js +152 -6
- package/dist/registry/serve.d.ts +96 -5
- package/dist/registry/serve.js +714 -21
- package/package.json +13 -15
- package/dist/assets/index-Dq5tdnlb.js +0 -326
- package/dist/assets/index-Dq5tdnlb.js.map +0 -1
- package/dist/assets/index-NJpHAonA.css +0 -1
package/README.md
CHANGED
|
@@ -21,10 +21,24 @@ grapity init --local
|
|
|
21
21
|
grapity serve
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
For local development without Keycloak, use `--no-auth`:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
grapity serve --
|
|
27
|
+
grapity serve --no-auth
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Self-hosted (PostgreSQL + Keycloak)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
grapity init --local \
|
|
34
|
+
--db postgresql://user:pass@host:5432/grapity \
|
|
35
|
+
--auth keycloak \
|
|
36
|
+
--keycloak-server https://keycloak.example.com \
|
|
37
|
+
--keycloak-realm grapity \
|
|
38
|
+
--keycloak-client-id grapity-cli
|
|
39
|
+
|
|
40
|
+
export GRAPITY_CLIENT_SECRET="your-client-secret"
|
|
41
|
+
grapity serve
|
|
28
42
|
```
|
|
29
43
|
|
|
30
44
|
### Remote / SaaS
|
|
@@ -32,7 +46,13 @@ grapity serve --db postgresql://user:pass@host:5432/grapity --auth jwt
|
|
|
32
46
|
Connect to a hosted Grapity instance. No server to run.
|
|
33
47
|
|
|
34
48
|
```bash
|
|
35
|
-
grapity init --remote --url https://api.grapity.dev
|
|
49
|
+
grapity init --remote --url https://api.grapity.dev \
|
|
50
|
+
--auth keycloak \
|
|
51
|
+
--keycloak-server https://keycloak.example.com \
|
|
52
|
+
--keycloak-realm grapity \
|
|
53
|
+
--keycloak-client-id grapity-cli
|
|
54
|
+
|
|
55
|
+
export GRAPITY_CLIENT_SECRET="your-client-secret"
|
|
36
56
|
```
|
|
37
57
|
|
|
38
58
|
## Commands
|
|
@@ -42,12 +62,17 @@ grapity init --remote --url https://api.grapity.dev --api-key <key>
|
|
|
42
62
|
Configure the registry. Writes `~/.grapity/config.yaml`.
|
|
43
63
|
|
|
44
64
|
```
|
|
45
|
-
--local
|
|
46
|
-
--remote
|
|
47
|
-
--url <url>
|
|
48
|
-
--
|
|
49
|
-
--
|
|
50
|
-
--
|
|
65
|
+
--local Use local mode (SQLite or PostgreSQL)
|
|
66
|
+
--remote Use remote mode
|
|
67
|
+
--url <url> Registry URL (required for remote)
|
|
68
|
+
--port <port> Port for local server (default: 3750)
|
|
69
|
+
--db <path-or-url> SQLite path or postgresql:// URL (for local mode)
|
|
70
|
+
--auth <mode> Auth mode: none | keycloak (default: none)
|
|
71
|
+
--keycloak-server <url> Keycloak server URL
|
|
72
|
+
--keycloak-realm <realm> Keycloak realm
|
|
73
|
+
--keycloak-client-id <id> Keycloak client ID for CLI client credentials
|
|
74
|
+
--keycloak-audience <aud> Keycloak token audience to validate
|
|
75
|
+
--keycloak-role-source <s> Where to read roles from: scope | realm_access.roles
|
|
51
76
|
```
|
|
52
77
|
|
|
53
78
|
### `grapity serve`
|
|
@@ -55,14 +80,22 @@ Configure the registry. Writes `~/.grapity/config.yaml`.
|
|
|
55
80
|
Start the registry server and the Hub developer portal. Use `--no-hub` to skip the portal.
|
|
56
81
|
|
|
57
82
|
```
|
|
58
|
-
-p, --port <port>
|
|
59
|
-
--
|
|
60
|
-
--
|
|
83
|
+
-p, --port <port> Port to listen on (default: 3750)
|
|
84
|
+
--hub-port <port> Port for the developer portal (default: 3000)
|
|
85
|
+
--no-hub Skip starting the developer portal
|
|
86
|
+
--no-auth Start without authentication (local development only)
|
|
61
87
|
```
|
|
62
88
|
|
|
63
|
-
|
|
89
|
+
### `grapity auth`
|
|
90
|
+
|
|
91
|
+
Check or clear the cached Keycloak access token.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
grapity auth status # Show current authentication status
|
|
95
|
+
grapity auth clear # Clear the cached token
|
|
96
|
+
```
|
|
64
97
|
|
|
65
|
-
|
|
98
|
+
Client secrets are never written to `~/.grapity/config.yaml`. Set `GRAPITY_CLIENT_SECRET` (or `GRAPITY_TOKEN` for automation) before running commands.
|
|
66
99
|
|
|
67
100
|
Push a spec file to the registry. Validates structure, checks backward compatibility against the latest version, assigns a semver, and stores the result.
|
|
68
101
|
|