@construct-space/cli 1.7.5 → 1.7.6

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 (2) hide show
  1. package/dist/index.js +15 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10324,7 +10324,14 @@ async function uploadSource(portalURL, identityToken, publisherKey, tarballPath,
10324
10324
  }
10325
10325
  if (resp.status === 403) {
10326
10326
  let msg = result.error || "You are not the owner of this space";
10327
- if (result.owner_user_id) {
10327
+ if (result.owner_kind === "org") {
10328
+ const label = result.owner_name ? `${result.owner_name} (org${result.owner_org_id ? `: ${result.owner_org_id}` : ""})` : result.owner_org_id || "unknown org";
10329
+ msg += `
10330
+ Owned by: ${label}`;
10331
+ } else if (result.owner_name) {
10332
+ msg += `
10333
+ Owned by: ${result.owner_name}${result.owner_user_id ? ` (${result.owner_user_id})` : ""}`;
10334
+ } else if (result.owner_user_id) {
10328
10335
  msg += `
10329
10336
  Current owner: ${result.owner_user_id}`;
10330
10337
  }
@@ -11145,7 +11152,12 @@ async function graphPush() {
11145
11152
  try {
11146
11153
  const errBody = await resp.json();
11147
11154
  console.error(source_default.red(` ${errBody.error || "You are not the owner of this space"}`));
11148
- if (errBody.owner_user_id) {
11155
+ if (errBody.owner_kind === "org") {
11156
+ const label = errBody.owner_name ? `${errBody.owner_name} (org${errBody.owner_org_id ? `: ${errBody.owner_org_id}` : ""})` : errBody.owner_org_id || "unknown org";
11157
+ console.error(source_default.dim(` Owned by: ${label}`));
11158
+ } else if (errBody.owner_name) {
11159
+ console.error(source_default.dim(` Owned by: ${errBody.owner_name}${errBody.owner_user_id ? ` (${errBody.owner_user_id})` : ""}`));
11160
+ } else if (errBody.owner_user_id) {
11149
11161
  console.error(source_default.dim(` Current owner: ${errBody.owner_user_id}`));
11150
11162
  }
11151
11163
  console.error(source_default.dim(" Fork to a new space_id to publish your own version."));
@@ -11445,7 +11457,7 @@ function graphFork(newSpaceID) {
11445
11457
  // package.json
11446
11458
  var package_default = {
11447
11459
  name: "@construct-space/cli",
11448
- version: "1.7.5",
11460
+ version: "1.7.6",
11449
11461
  description: "Construct CLI \u2014 scaffold, build, develop, and publish spaces",
11450
11462
  type: "module",
11451
11463
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@construct-space/cli",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "description": "Construct CLI — scaffold, build, develop, and publish spaces",
5
5
  "type": "module",
6
6
  "bin": {