@construct-space/cli 1.9.3 → 1.9.4

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 +20 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2845,7 +2845,7 @@ function spaceDir(spaceId) {
2845
2845
  var init_appdir = () => {};
2846
2846
 
2847
2847
  // src/lib/auth.ts
2848
- import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, unlinkSync, existsSync as existsSync10, readdirSync as readdirSync5, statSync as statSync4 } from "fs";
2848
+ import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, unlinkSync, existsSync as existsSync10, readdirSync as readdirSync5, statSync as statSync3 } from "fs";
2849
2849
  import { join as join12, dirname as dirname4 } from "path";
2850
2850
  function listDesktopProfiles() {
2851
2851
  const dir = profilesDir();
@@ -2855,7 +2855,7 @@ function listDesktopProfiles() {
2855
2855
  for (const entry of readdirSync5(dir)) {
2856
2856
  const full = join12(dir, entry);
2857
2857
  try {
2858
- if (!statSync4(full).isDirectory())
2858
+ if (!statSync3(full).isDirectory())
2859
2859
  continue;
2860
2860
  const authPath = join12(full, "auth.json");
2861
2861
  if (!existsSync10(authPath))
@@ -5516,7 +5516,7 @@ async function scaffold(nameArg, options) {
5516
5516
 
5517
5517
  // src/commands/build.ts
5518
5518
  init_source();
5519
- import { cpSync, existsSync as existsSync6, readFileSync as readFileSync4, readdirSync as readdirSync3, renameSync, statSync as statSync3 } from "fs";
5519
+ import { cpSync, existsSync as existsSync6, readFileSync as readFileSync4, readdirSync as readdirSync3, renameSync, statSync as statSync2 } from "fs";
5520
5520
  import { join as join6 } from "path";
5521
5521
  import { createHash } from "crypto";
5522
5522
 
@@ -8423,7 +8423,7 @@ function copyAssetDirs(root, distDir) {
8423
8423
  const copied = [];
8424
8424
  for (const name of ASSET_DIRS) {
8425
8425
  const src = join6(root, name);
8426
- if (!existsSync6(src) || !statSync3(src).isDirectory())
8426
+ if (!existsSync6(src) || !statSync2(src).isDirectory())
8427
8427
  continue;
8428
8428
  cpSync(src, join6(distDir, name), { recursive: true, verbatimSymlinks: true });
8429
8429
  copied.push(name);
@@ -8630,7 +8630,7 @@ async function build(options) {
8630
8630
  }
8631
8631
  runHook(m.hooks, "postBuild", root);
8632
8632
  const agentDir = join6(root, "agent");
8633
- if (existsSync6(agentDir) && statSync3(agentDir).isDirectory()) {
8633
+ if (existsSync6(agentDir) && statSync2(agentDir).isDirectory()) {
8634
8634
  const distDir2 = join6(root, "dist");
8635
8635
  bundleAgentDir(agentDir, distDir2);
8636
8636
  bundleAgentDir(agentDir, root);
@@ -10377,12 +10377,12 @@ function install() {
10377
10377
 
10378
10378
  // src/commands/publish.ts
10379
10379
  init_source();
10380
- import { readFileSync as readFileSync8, writeFileSync as writeFileSync6, statSync as statSync6, unlinkSync as unlinkSync2 } from "fs";
10381
- import { join as join14, basename as basename6 } from "path";
10380
+ import { readFileSync as readFileSync8, writeFileSync as writeFileSync6, statSync as statSync5, unlinkSync as unlinkSync2 } from "fs";
10381
+ import { join as join14, basename as basename5 } from "path";
10382
10382
  init_auth();
10383
10383
 
10384
10384
  // src/lib/pack.ts
10385
- import { readdirSync as readdirSync6, statSync as statSync5, existsSync as existsSync11 } from "fs";
10385
+ import { readdirSync as readdirSync6, statSync as statSync4, existsSync as existsSync11 } from "fs";
10386
10386
  import { join as join13 } from "path";
10387
10387
  import { tmpdir } from "os";
10388
10388
  import { execFileSync as execFileSync2 } from "child_process";
@@ -10429,7 +10429,7 @@ async function packSource(root) {
10429
10429
  entries.push(name);
10430
10430
  }
10431
10431
  for (const entry of readdirSync6(root)) {
10432
- if (statSync5(join13(root, entry)).isDirectory())
10432
+ if (statSync4(join13(root, entry)).isDirectory())
10433
10433
  continue;
10434
10434
  if (allowedRootFiles.includes(entry))
10435
10435
  continue;
@@ -10456,7 +10456,7 @@ async function packSource(root) {
10456
10456
  "--exclude=*.lockb"
10457
10457
  ];
10458
10458
  execFileSync2("tar", ["czf", tarballPath, ...excludes, ...validEntries], { cwd: root });
10459
- const size = statSync5(tarballPath).size;
10459
+ const size = statSync4(tarballPath).size;
10460
10460
  if (size > MAX_SIZE) {
10461
10461
  throw new Error(`Source exceeds maximum size of ${MAX_SIZE / 1024 / 1024}MB`);
10462
10462
  }
@@ -10469,7 +10469,7 @@ async function uploadSource(portalURL, identityToken, publisherKey, tarballPath,
10469
10469
  formData.append("manifest", JSON.stringify(m));
10470
10470
  const fileData = readFileSync8(tarballPath);
10471
10471
  const blob = new Blob([fileData]);
10472
- formData.append("source", blob, basename6(tarballPath));
10472
+ formData.append("source", blob, basename5(tarballPath));
10473
10473
  if (opts.private) {
10474
10474
  formData.append("private", "true");
10475
10475
  }
@@ -10694,7 +10694,7 @@ async function publish(options) {
10694
10694
  let tarballPath;
10695
10695
  try {
10696
10696
  tarballPath = await packSource(root);
10697
- const size = statSync6(tarballPath).size;
10697
+ const size = statSync5(tarballPath).size;
10698
10698
  spinner.succeed(`Source packed (${formatBytes(size)})`);
10699
10699
  } catch (err) {
10700
10700
  spinner.fail("Pack failed");
@@ -11317,7 +11317,7 @@ function updateBarrel(modelsDir, modelName) {
11317
11317
  // src/commands/graph/push.ts
11318
11318
  init_source();
11319
11319
  import { existsSync as existsSync17, readdirSync as readdirSync7, readFileSync as readFileSync13 } from "fs";
11320
- import { join as join20, basename as basename7 } from "path";
11320
+ import { join as join20 } from "path";
11321
11321
  init_auth();
11322
11322
  async function graphPush() {
11323
11323
  const root = process.cwd();
@@ -11341,7 +11341,7 @@ async function graphPush() {
11341
11341
  const models = [];
11342
11342
  for (const file of modelFiles) {
11343
11343
  const content = readFileSync13(join20(modelsDir, file), "utf-8");
11344
- const model = parseModelFile(content, basename7(file, ".ts"));
11344
+ const model = parseModelFile(content);
11345
11345
  if (model)
11346
11346
  models.push(model);
11347
11347
  }
@@ -11415,7 +11415,7 @@ async function graphPush() {
11415
11415
  console.error(source_default.red(` ${resp.status}: ${body}`));
11416
11416
  process.exit(1);
11417
11417
  }
11418
- const result = await resp.json();
11418
+ await resp.json();
11419
11419
  spinner.succeed("Models registered");
11420
11420
  console.log();
11421
11421
  for (const model of models) {
@@ -11457,7 +11457,7 @@ function parseDefaultValue(raw) {
11457
11457
  }
11458
11458
  return value;
11459
11459
  }
11460
- function parseModelFile(content, fileName) {
11460
+ function parseModelFile(content) {
11461
11461
  const modelMatch = content.match(/defineModel\s*\(\s*['"](\w+)['"]/);
11462
11462
  if (!modelMatch)
11463
11463
  return null;
@@ -11524,7 +11524,7 @@ function parseModelFile(content, fileName) {
11524
11524
  // src/commands/graph/migrate.ts
11525
11525
  init_source();
11526
11526
  import { existsSync as existsSync18, readdirSync as readdirSync8, readFileSync as readFileSync14 } from "fs";
11527
- import { join as join21, basename as basename8 } from "path";
11527
+ import { join as join21 } from "path";
11528
11528
  init_auth();
11529
11529
  async function graphMigrate(options) {
11530
11530
  const root = process.cwd();
@@ -11565,7 +11565,7 @@ async function graphMigrate(options) {
11565
11565
  const localModels = [];
11566
11566
  for (const file of modelFiles) {
11567
11567
  const content = readFileSync14(join21(modelsDir, file), "utf-8");
11568
- const model = parseModelFields(content, basename8(file, ".ts"));
11568
+ const model = parseModelFields(content);
11569
11569
  if (model)
11570
11570
  localModels.push(model);
11571
11571
  }
@@ -11653,7 +11653,7 @@ async function graphMigrate(options) {
11653
11653
  process.exit(1);
11654
11654
  }
11655
11655
  }
11656
- function parseModelFields(content, fileName) {
11656
+ function parseModelFields(content) {
11657
11657
  const modelMatch = content.match(/defineModel\s*\(\s*['"](\w+)['"]/);
11658
11658
  if (!modelMatch)
11659
11659
  return null;
@@ -11700,7 +11700,7 @@ function graphFork(newSpaceID) {
11700
11700
  // package.json
11701
11701
  var package_default = {
11702
11702
  name: "@construct-space/cli",
11703
- version: "1.9.3",
11703
+ version: "1.9.4",
11704
11704
  description: "Construct CLI \u2014 scaffold, build, develop, and publish spaces",
11705
11705
  type: "module",
11706
11706
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@construct-space/cli",
3
- "version": "1.9.3",
3
+ "version": "1.9.4",
4
4
  "description": "Construct CLI — scaffold, build, develop, and publish spaces",
5
5
  "type": "module",
6
6
  "bin": {