@construct-space/cli 1.3.1 → 1.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.
Files changed (3) hide show
  1. package/README.md +56 -0
  2. package/dist/index.js +957 -492
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -29,8 +29,64 @@ construct clean # Remove build artifacts
29
29
  construct graph init # Add Graph to your space
30
30
  construct graph g User name:string email:string # Generate a model
31
31
  construct graph push # Register models with Graph
32
+ construct graph migrate # Diff + apply schema changes
32
33
  ```
33
34
 
35
+ #### Publisher commands
36
+
37
+ Group related spaces under a **bundle**, control distribution, and see who's installed your space. All of these need an org context — pass `--org <id>` or export `CONSTRUCT_ORG_ID`.
38
+
39
+ ```bash
40
+ # Bundles (publisher-side grouping: kanban + kanban-admin)
41
+ construct graph bundles list
42
+ construct graph bundles create kanban-suite "Kanban Suite"
43
+ construct graph bundles show kanban-suite
44
+
45
+ # Spaces your org publishes (aliases: list, ls)
46
+ construct graph spaces # table: id, version, bundle, distribution, installs
47
+ construct graph spaces --bundle kanban-suite # filter
48
+ construct graph spaces --json # scriptable
49
+
50
+ # Distribution — who may install this space
51
+ construct graph distribution kanban-admin private
52
+ construct graph distribution kanban public
53
+ construct graph distribution kanban-pro org_allowlist
54
+
55
+ # Allowlist (for org_allowlist-mode spaces)
56
+ construct graph allowlist add kanban-pro org-basecode
57
+ construct graph allowlist rm kanban-pro org-basecode
58
+
59
+ # Install visibility — see who's installed your space
60
+ construct graph installs kanban
61
+ ```
62
+
63
+ #### Tenant commands
64
+
65
+ ```bash
66
+ # Install / uninstall a space for your org
67
+ construct graph install kanban
68
+ construct graph uninstall kanban # tenant data preserved
69
+ ```
70
+
71
+ #### Manifest fields for bundles
72
+
73
+ To attach a space to a bundle, add these to `data.manifest.json`:
74
+
75
+ ```json
76
+ {
77
+ "version": 1,
78
+ "bundle_id": "kanban-suite",
79
+ "imports": [
80
+ { "from": "kanban", "models": ["board", "card"] }
81
+ ],
82
+ "models": [ ... ]
83
+ }
84
+ ```
85
+
86
+ `imports` lets a sibling space (like `kanban-admin`) reuse models from another space in the same bundle. Cross-bundle imports are rejected at publish.
87
+
88
+ See [`@construct-space/graph` README](https://github.com/construct-space/graph-sdk#space-bundles) for the full bundles story.
89
+
34
90
  #### Field Types
35
91
 
36
92
  | Type | Example |