@obsidiane/meridiane 3.0.0 → 3.0.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/README.md +14 -9
- package/package.json +1 -1
- package/src/README.md +0 -9
package/README.md
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
# @obsidiane/meridiane
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Connecte une application Angular à une API API Platform, en HTTP et en temps réel (Mercure 1.0).
|
|
4
|
+
|
|
5
|
+
Le CLI lit le contrat OpenAPI de l'API et génère une librairie Angular, **le bridge** :
|
|
4
6
|
|
|
5
7
|
- les **modèles TypeScript** de vos ressources ;
|
|
6
|
-
-
|
|
8
|
+
- une **façade HTTP** par ressource, aux conventions d'API Platform (JSON-LD, Hydra, merge-patch) ;
|
|
7
9
|
- le **temps réel Mercure 1.0** : abonnement à une ressource ou à un item, connexions partagées, autorisation par cookie.
|
|
8
10
|
|
|
9
|
-
Le bridge gère la
|
|
11
|
+
Le bridge gère la communication avec l'API ; la gestion des données reste dans votre application. Il est compatible avec Angular 20, 21 et 22, API Platform 5 et un hub Mercure 1.x.
|
|
10
12
|
|
|
11
13
|
## En bref
|
|
12
14
|
|
|
13
15
|
```bash
|
|
14
|
-
|
|
16
|
+
# Contrat exporté par Symfony, puis génération dans l'application Angular
|
|
17
|
+
docker compose exec php bin/console api:openapi:export --output=openapi.json
|
|
18
|
+
npx @obsidiane/meridiane@3 generate @app/bridge --spec ../api/openapi.json --out bridge
|
|
15
19
|
```
|
|
16
20
|
|
|
17
21
|
```ts
|
|
@@ -28,6 +32,8 @@ list$ = this.projects.getCollection$({page: 1, itemsPerPage: 20}); // Collecti
|
|
|
28
32
|
changes$ = this.projects.watch$(); // Project | ResourceDeletion, en direct
|
|
29
33
|
```
|
|
30
34
|
|
|
35
|
+
Le backend publie ses entités sur Mercure (`#[ApiResource(mercure: true)]`) et sert le front, l'API et le hub sur la même origine : voir la [configuration de référence](https://github.com/obsidiane-lab/meridiane/blob/master/docs/backend.md).
|
|
36
|
+
|
|
31
37
|
## Commandes
|
|
32
38
|
|
|
33
39
|
| Commande | Produit |
|
|
@@ -40,8 +46,7 @@ Options : `--spec`, `--include`, `--exclude`, `--no-models`, `--version`, `--out
|
|
|
40
46
|
|
|
41
47
|
## Documentation
|
|
42
48
|
|
|
43
|
-
- [
|
|
44
|
-
- [
|
|
45
|
-
- [HTTP](https://github.com/obsidiane-lab/meridiane/blob/master/docs/http.md) · [Temps réel](https://github.com/obsidiane-lab/meridiane/blob/master/docs/temps-reel.md) · [
|
|
46
|
-
- [
|
|
47
|
-
- [Dépannage](https://github.com/obsidiane-lab/meridiane/blob/master/docs/depannage.md) · [Migration 2.x → 3.0](https://github.com/obsidiane-lab/meridiane/blob/master/docs/migration-3.0.md)
|
|
49
|
+
- [Backend](https://github.com/obsidiane-lab/meridiane/blob/master/docs/backend.md) : FrankenPHP, Mercure, Symfony et API Platform
|
|
50
|
+
- [Démarrage](https://github.com/obsidiane-lab/meridiane/blob/master/docs/demarrage.md) · [Configuration Angular](https://github.com/obsidiane-lab/meridiane/blob/master/docs/configuration.md)
|
|
51
|
+
- [HTTP](https://github.com/obsidiane-lab/meridiane/blob/master/docs/http.md) · [Temps réel](https://github.com/obsidiane-lab/meridiane/blob/master/docs/temps-reel.md) · [Recettes](https://github.com/obsidiane-lab/meridiane/blob/master/docs/recettes.md)
|
|
52
|
+
- [Référence](https://github.com/obsidiane-lab/meridiane/blob/master/docs/reference.md) · [CLI](https://github.com/obsidiane-lab/meridiane/blob/master/docs/cli.md) · [Dépannage](https://github.com/obsidiane-lab/meridiane/blob/master/docs/depannage.md) · [Migration 2.x → 3.0](https://github.com/obsidiane-lab/meridiane/blob/master/docs/migration-3.0.md)
|
package/package.json
CHANGED
package/src/README.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Sources internes du générateur
|
|
2
|
-
|
|
3
|
-
- `application/` orchestre les workflows du CLI ;
|
|
4
|
-
- `domain/` contient les règles et la normalisation des options ;
|
|
5
|
-
- `infrastructure/` gère fichiers, processus, specs, workspaces et installation locale ;
|
|
6
|
-
- `generators/bridge/` écrit les fichiers du runtime Angular ;
|
|
7
|
-
- `generators/models/` transforme OpenAPI et écrit les modèles TypeScript.
|
|
8
|
-
|
|
9
|
-
Le runtime Angular généré se trouve dans `../templates/angular-bridge/`.
|