@construct-space/cli 1.7.4 → 1.7.5
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/dist/index.js +19 -5
- package/dist/templates/space/construct.md.tmpl +3 -2
- package/dist/templates/space/full/space.manifest.json.tmpl +2 -1
- package/dist/templates/space/package.json.tmpl +4 -4
- package/dist/templates/space/space.manifest.json.tmpl +2 -1
- package/package.json +1 -1
- package/templates/space/construct.md.tmpl +3 -2
- package/templates/space/full/space.manifest.json.tmpl +2 -1
- package/templates/space/package.json.tmpl +4 -4
- package/templates/space/space.manifest.json.tmpl +2 -1
package/dist/index.js
CHANGED
|
@@ -10304,6 +10304,9 @@ async function uploadSource(portalURL, identityToken, publisherKey, tarballPath,
|
|
|
10304
10304
|
if (opts.private) {
|
|
10305
10305
|
formData.append("private", "true");
|
|
10306
10306
|
}
|
|
10307
|
+
if (opts.public) {
|
|
10308
|
+
formData.append("public", "true");
|
|
10309
|
+
}
|
|
10307
10310
|
const headers = {
|
|
10308
10311
|
Authorization: `Bearer ${identityToken}`
|
|
10309
10312
|
};
|
|
@@ -10350,6 +10353,11 @@ async function publish(options) {
|
|
|
10350
10353
|
const root = process.cwd();
|
|
10351
10354
|
const yes = options?.yes ?? false;
|
|
10352
10355
|
const wantPrivate = options?.private ?? false;
|
|
10356
|
+
const wantPublic = options?.public ?? false;
|
|
10357
|
+
if (wantPrivate && wantPublic) {
|
|
10358
|
+
console.error(source_default.red("Cannot combine --private and --public. Pick one."));
|
|
10359
|
+
process.exit(1);
|
|
10360
|
+
}
|
|
10353
10361
|
if (!exists(root)) {
|
|
10354
10362
|
console.error(source_default.red("No space.manifest.json found in current directory"));
|
|
10355
10363
|
process.exit(1);
|
|
@@ -10456,7 +10464,13 @@ async function publish(options) {
|
|
|
10456
10464
|
} else if (creds.user) {
|
|
10457
10465
|
console.log(` Author: ${source_default.dim(creds.user.name)}`);
|
|
10458
10466
|
}
|
|
10459
|
-
|
|
10467
|
+
if (wantPrivate) {
|
|
10468
|
+
console.log(` Audience: ${source_default.magenta("org-private")} ${source_default.dim("(--private)")}`);
|
|
10469
|
+
} else if (wantPublic) {
|
|
10470
|
+
console.log(` Audience: ${source_default.cyan("public")} ${source_default.dim("(--public; flips a previously-private space)")}`);
|
|
10471
|
+
} else {
|
|
10472
|
+
console.log(` Audience: ${source_default.dim("preserved (default public on first publish, sticky on update)")}`);
|
|
10473
|
+
}
|
|
10460
10474
|
console.log();
|
|
10461
10475
|
if (!yes) {
|
|
10462
10476
|
const proceed = await dist_default4({
|
|
@@ -10480,7 +10494,7 @@ async function publish(options) {
|
|
|
10480
10494
|
}
|
|
10481
10495
|
const uploadSpinner = ora("Uploading & building...").start();
|
|
10482
10496
|
try {
|
|
10483
|
-
const result = await uploadSource(creds.portal, creds.token, creds.publisherKey, tarballPath, m, { private: wantPrivate });
|
|
10497
|
+
const result = await uploadSource(creds.portal, creds.token, creds.publisherKey, tarballPath, m, { private: wantPrivate, public: wantPublic });
|
|
10484
10498
|
unlinkSync2(tarballPath);
|
|
10485
10499
|
gitSafe(root, "tag", `v${m.version}`);
|
|
10486
10500
|
gitSafe(root, "push", "origin", `v${m.version}`);
|
|
@@ -11431,7 +11445,7 @@ function graphFork(newSpaceID) {
|
|
|
11431
11445
|
// package.json
|
|
11432
11446
|
var package_default = {
|
|
11433
11447
|
name: "@construct-space/cli",
|
|
11434
|
-
version: "1.7.
|
|
11448
|
+
version: "1.7.5",
|
|
11435
11449
|
description: "Construct CLI \u2014 scaffold, build, develop, and publish spaces",
|
|
11436
11450
|
type: "module",
|
|
11437
11451
|
bin: {
|
|
@@ -11483,7 +11497,7 @@ program2.command("scaffold [name]").alias("new").alias("create").description("Cr
|
|
|
11483
11497
|
program2.command("build").description("Build the space (generate entry + run Vite)").option("--entry-only", "Only generate src/entry.ts").action(async (opts) => build(opts));
|
|
11484
11498
|
program2.command("dev").description("Start dev mode with file watching and live reload").action(async () => dev());
|
|
11485
11499
|
program2.command("install").alias("run").description("Install built space to Construct spaces directory").action(() => install());
|
|
11486
|
-
program2.command("publish").description("Publish a space to the Construct registry").option("-y, --yes", "Skip all confirmation prompts").option("--bump <type>", "Auto-bump version (patch, minor, major)").option("--private", "Publish as org-private (catalog-listed only inside the owning org). Requires an org publisher key.").action(async (opts) => publish(opts));
|
|
11500
|
+
program2.command("publish").description("Publish a space to the Construct registry").option("-y, --yes", "Skip all confirmation prompts").option("--bump <type>", "Auto-bump version (patch, minor, major)").option("--private", "Publish as org-private (catalog-listed only inside the owning org). Requires an org publisher key.").option("--public", "Flip a previously-private space back to the public catalog on this publish. Without --private or --public, visibility is preserved on update (and defaults to public on first publish).").action(async (opts) => publish(opts));
|
|
11487
11501
|
program2.command("validate").description("Validate space.manifest.json").action(() => validate3());
|
|
11488
11502
|
program2.command("check").description("Run type-check (vue-tsc) and linter (eslint)").action(() => check());
|
|
11489
11503
|
program2.command("clean").description("Remove build artifacts").option("--all", "Also remove node_modules and lockfiles").action((opts) => clean(opts));
|
|
@@ -11514,7 +11528,7 @@ space.command("scaffold [name]").alias("new").alias("create").option("--with-tes
|
|
|
11514
11528
|
space.command("build").option("--entry-only").action(async (opts) => build(opts));
|
|
11515
11529
|
space.command("dev").action(async () => dev());
|
|
11516
11530
|
space.command("install").alias("run").action(() => install());
|
|
11517
|
-
space.command("publish").option("-y, --yes").option("--bump <type>").option("--private").action(async (opts) => publish(opts));
|
|
11531
|
+
space.command("publish").option("-y, --yes").option("--bump <type>").option("--private").option("--public").action(async (opts) => publish(opts));
|
|
11518
11532
|
space.command("validate").action(() => validate3());
|
|
11519
11533
|
space.command("check").action(() => check());
|
|
11520
11534
|
space.command("clean").option("--all").action((opts) => clean(opts));
|
|
@@ -67,7 +67,8 @@ construct graph install <id> install a published space for current org
|
|
|
67
67
|
```jsonc
|
|
68
68
|
{
|
|
69
69
|
"id": "{{.ID}}",
|
|
70
|
-
"
|
|
70
|
+
"scopes": ["app"], // or ["org"], or ["app", "org"] for both
|
|
71
|
+
"projectAware": false, // true = also mounts inside projects
|
|
71
72
|
"minConstructVersion": "0.7.0",
|
|
72
73
|
"pages": [{ "path": "", "label": "Home", "default": true }],
|
|
73
74
|
"toolbar": [{ "id": "...", "icon": "...", "action": "createX" }],
|
|
@@ -78,7 +79,7 @@ construct graph install <id> install a published space for current org
|
|
|
78
79
|
}
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
`
|
|
82
|
+
`scopes: ['org']` makes everything multi-tenant — graph schemas auto-partition per org. Use `useOrg()` to read current org context. `projectAware: true` is the orthogonal flag for spaces that also live inside a project.
|
|
82
83
|
|
|
83
84
|
---
|
|
84
85
|
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"@construct-space/cli": "latest",
|
|
21
21
|
"@construct-space/sdk": "latest",
|
|
22
22
|
"@eslint/js": "^10.0.1",
|
|
23
|
-
"@vitejs/plugin-vue": "^
|
|
23
|
+
"@vitejs/plugin-vue": "^6.0.6",
|
|
24
24
|
"eslint": "^10.2.1",
|
|
25
25
|
"eslint-plugin-vue": "^10.0.0",
|
|
26
26
|
"lucide-vue-next": "^1.0.0",
|
|
27
27
|
"typescript": "^5.9.3",
|
|
28
28
|
"typescript-eslint": "^8.0.0",
|
|
29
|
-
"vite": "^
|
|
29
|
+
"vite": "^8.0.12",
|
|
30
30
|
"vue-tsc": "^3.2.5"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@construct-space/graph": "^0.
|
|
34
|
-
"@construct-space/ui": "^0.
|
|
33
|
+
"@construct-space/graph": "^0.7.1",
|
|
34
|
+
"@construct-space/ui": "^0.7.4"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -67,7 +67,8 @@ construct graph install <id> install a published space for current org
|
|
|
67
67
|
```jsonc
|
|
68
68
|
{
|
|
69
69
|
"id": "{{.ID}}",
|
|
70
|
-
"
|
|
70
|
+
"scopes": ["app"], // or ["org"], or ["app", "org"] for both
|
|
71
|
+
"projectAware": false, // true = also mounts inside projects
|
|
71
72
|
"minConstructVersion": "0.7.0",
|
|
72
73
|
"pages": [{ "path": "", "label": "Home", "default": true }],
|
|
73
74
|
"toolbar": [{ "id": "...", "icon": "...", "action": "createX" }],
|
|
@@ -78,7 +79,7 @@ construct graph install <id> install a published space for current org
|
|
|
78
79
|
}
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
`
|
|
82
|
+
`scopes: ['org']` makes everything multi-tenant — graph schemas auto-partition per org. Use `useOrg()` to read current org context. `projectAware: true` is the orthogonal flag for spaces that also live inside a project.
|
|
82
83
|
|
|
83
84
|
---
|
|
84
85
|
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"@construct-space/cli": "latest",
|
|
21
21
|
"@construct-space/sdk": "latest",
|
|
22
22
|
"@eslint/js": "^10.0.1",
|
|
23
|
-
"@vitejs/plugin-vue": "^
|
|
23
|
+
"@vitejs/plugin-vue": "^6.0.6",
|
|
24
24
|
"eslint": "^10.2.1",
|
|
25
25
|
"eslint-plugin-vue": "^10.0.0",
|
|
26
26
|
"lucide-vue-next": "^1.0.0",
|
|
27
27
|
"typescript": "^5.9.3",
|
|
28
28
|
"typescript-eslint": "^8.0.0",
|
|
29
|
-
"vite": "^
|
|
29
|
+
"vite": "^8.0.12",
|
|
30
30
|
"vue-tsc": "^3.2.5"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@construct-space/graph": "^0.
|
|
34
|
-
"@construct-space/ui": "^0.
|
|
33
|
+
"@construct-space/graph": "^0.7.1",
|
|
34
|
+
"@construct-space/ui": "^0.7.4"
|
|
35
35
|
}
|
|
36
36
|
}
|