andesine 0.4.0 → 0.5.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/CHANGELOG.md +23 -0
- package/README.md +66 -0
- package/dist/cli.js +2533 -49
- package/dist/cli.js.map +1 -1
- package/dist/templates/extension/.env.example +5 -0
- package/dist/templates/extension/LICENSE +21 -0
- package/dist/templates/extension/README.md +33 -0
- package/dist/templates/extension/andesine.config.ts +79 -0
- package/dist/templates/extension/andesine.keys.json +4 -0
- package/dist/templates/extension/gitignore +4 -0
- package/dist/templates/extension/package.template.json +27 -0
- package/dist/templates/extension/src/backend/server.ts +85 -0
- package/dist/templates/extension/src/frontend/about-section.tsx +47 -0
- package/dist/templates/extension/src/frontend/bookmarks-panel.tsx +67 -0
- package/dist/templates/extension/src/frontend/hello-panel.tsx +61 -0
- package/dist/templates/extension/src/frontend/index.tsx +6 -0
- package/dist/templates/extension/src/frontend/note-view.tsx +54 -0
- package/dist/templates/extension/src/frontend/shout-action.tsx +57 -0
- package/dist/templates/extension/tsconfig.json +16 -0
- package/package.json +18 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
- Accept the `extensions` role permission (manage workspace extensions) in role commands.
|
|
6
|
+
- Add `andesine extensions init [directory]`, which creates an extension with a backend
|
|
7
|
+
from the template of the same release and generates its first backend key.
|
|
8
|
+
- Add `andesine extensions build`: manifest validation with the registry rules, the
|
|
9
|
+
frontend bundle with the generated `startExtension` call, view and icon CSS, and
|
|
10
|
+
`dist/extension.json` with the artifact digests and sizes.
|
|
11
|
+
- Add `andesine extensions keys generate`, `check`, and `revoke`. Private keys stay in
|
|
12
|
+
`.andesine/keys` and are never uploaded.
|
|
13
|
+
- Leave extension-only API operations (which need extension JWTs) out of the generated
|
|
14
|
+
command bindings.
|
|
15
|
+
- Add `andesine extensions dev`, which runs an extension on a local instance for the
|
|
16
|
+
signed-in member: it uploads each build with a development key, reloads it on changes,
|
|
17
|
+
writes the key and the instance URL to the backend's `.env`, and stops it on exit
|
|
18
|
+
(`--remove` uninstalls it; `--backend <url>` points it at a local backend). It refuses hosts
|
|
19
|
+
that are not local.
|
|
20
|
+
- Add `andesine extensions test-event <webhook> <type>` for sample events to the
|
|
21
|
+
development extension's webhooks.
|
|
22
|
+
- Add `andesine extensions registry check` and `registry build` for extension registry CI:
|
|
23
|
+
validation with the instance rules, new versions without overwriting published ones, and
|
|
24
|
+
the registry index.
|
|
25
|
+
|
|
3
26
|
## 0.4.0
|
|
4
27
|
|
|
5
28
|
- Add `andesine pages init [directory]`, which creates an Andesine Pages site from
|
package/README.md
CHANGED
|
@@ -32,6 +32,72 @@ template of this CLI release, with `@andesine/pages` and `@andesine/ui` pinned t
|
|
|
32
32
|
same version. Then run `npm install` and `npm run dev` in the directory. The command
|
|
33
33
|
needs no credentials.
|
|
34
34
|
|
|
35
|
+
## Extensions
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
npx andesine extensions init hello --name acme/hello
|
|
39
|
+
npx andesine extensions build
|
|
40
|
+
npx andesine extensions keys generate
|
|
41
|
+
npx andesine extensions keys check --registry https://registry.example.com/index.json
|
|
42
|
+
npx andesine extensions keys revoke key-2026-10-07
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`extensions init` creates an extension with a Solid frontend and a Node backend in a new or
|
|
46
|
+
empty directory (default `extension`), and generates its first backend key.
|
|
47
|
+
|
|
48
|
+
`extensions build` loads `andesine.config.ts`, validates the manifest with the same rules
|
|
49
|
+
as the extension registry, bundles the frontend into one script with a generated
|
|
50
|
+
`startExtension` call for the manifest's view entries, and generates the CSS of the views
|
|
51
|
+
and of the manifest icons. It writes `dist/frontend.js`, `dist/styles.css`,
|
|
52
|
+
`dist/icons.css`, and `dist/extension.json` (the manifest and the SHA-256 digest and size
|
|
53
|
+
of each file). Builds are deterministic.
|
|
54
|
+
|
|
55
|
+
`extensions keys generate` creates an Ed25519 key pair. The public key goes to
|
|
56
|
+
`andesine.keys.json`, which the manifest imports; the private key goes to
|
|
57
|
+
`.andesine/keys/<kid>.json` (mode 0600) and is never uploaded. `keys check` compares the
|
|
58
|
+
private key in `ANDESINE_EXTENSION_KEY` or `--key` with the manifest keys and, with
|
|
59
|
+
`--registry`, with the keys of the registry entry. `keys revoke` moves a key ID to
|
|
60
|
+
`revokedKeys`. Extension commands use `--root <directory>` (default: current directory);
|
|
61
|
+
only `dev` and `test-event` need credentials.
|
|
62
|
+
|
|
63
|
+
### Local development
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
npx andesine --base-url http://localhost:3333 --workspace ws_... extensions dev
|
|
67
|
+
npx andesine extensions test-event content entry.created
|
|
68
|
+
npx andesine extensions dev --remove
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`extensions dev` runs the extension on a local instance for the signed-in member only. It
|
|
72
|
+
needs `andesine auth login` against that instance (API keys cannot develop extensions), a
|
|
73
|
+
selected workspace, and `EXTENSIONS_DEVELOPMENT_ENABLED=true` on the local backend; it refuses
|
|
74
|
+
other hosts than `localhost`, `127.0.0.1`, `[::1]`, `*.localhost`, `*.local`, and `*.test`.
|
|
75
|
+
It creates a development key pair in `.andesine/keys/development.json`, uploads only its
|
|
76
|
+
public key with each build, and writes the private key and the instance URL to the backend's
|
|
77
|
+
environment file (`--env-file`, default `.env`). `--backend <url>` uses a local backend URL
|
|
78
|
+
in place of the manifest's, so the manifest can keep its HTTPS deployment URL. Each change rebuilds and reloads the
|
|
79
|
+
extension; a failed build waits for the next change. A build that asks for more permissions
|
|
80
|
+
waits for approval in Settings → Extensions. Ctrl+C stops the extension and keeps its
|
|
81
|
+
configuration and storage. `extensions test-event <webhook> <type>` sends a sample event to a
|
|
82
|
+
webhook and reports the first attempt; `extensions dev --remove` uninstalls the development
|
|
83
|
+
extension and deletes its state.
|
|
84
|
+
|
|
85
|
+
### Registry
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
npx andesine extensions registry check --published <site checkout>
|
|
89
|
+
npx andesine extensions registry build --published <site checkout> --site-url https://extensions.andesine.app
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
For the CI of an extension registry repository (projects under `extensions/<scope>/<name>`,
|
|
93
|
+
each with `andesine.registry.json` for the publisher, and `registry/revocations.json`).
|
|
94
|
+
`registry check` validates every project with the instance rules: manifests, keys (published
|
|
95
|
+
keys never change, revoked keys stay revoked), version order, published versions that cannot
|
|
96
|
+
change and must rebuild to the same styles, revocations, and no removed extensions.
|
|
97
|
+
`registry build` runs the check, writes each new version's files and `version.json` next to the
|
|
98
|
+
published ones without overwriting them, and writes `index.json` last. Dependencies of each
|
|
99
|
+
project must be installed.
|
|
100
|
+
|
|
35
101
|
## Project configuration
|
|
36
102
|
|
|
37
103
|
Run `andesine init` for guided setup. It uses Clack prompts and progress indicators
|