@construct-space/cli 1.4.3 → 1.4.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.
Files changed (2) hide show
  1. package/dist/index.js +131 -109
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5,25 +5,43 @@ var __getProtoOf = Object.getPrototypeOf;
5
5
  var __defProp = Object.defineProperty;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ function __accessProp(key) {
9
+ return this[key];
10
+ }
11
+ var __toESMCache_node;
12
+ var __toESMCache_esm;
8
13
  var __toESM = (mod, isNodeMode, target) => {
14
+ var canCache = mod != null && typeof mod === "object";
15
+ if (canCache) {
16
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
17
+ var cached = cache.get(mod);
18
+ if (cached)
19
+ return cached;
20
+ }
9
21
  target = mod != null ? __create(__getProtoOf(mod)) : {};
10
22
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
11
23
  for (let key of __getOwnPropNames(mod))
12
24
  if (!__hasOwnProp.call(to, key))
13
25
  __defProp(to, key, {
14
- get: () => mod[key],
26
+ get: __accessProp.bind(mod, key),
15
27
  enumerable: true
16
28
  });
29
+ if (canCache)
30
+ cache.set(mod, to);
17
31
  return to;
18
32
  };
19
33
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
34
+ var __returnValue = (v) => v;
35
+ function __exportSetter(name, newValue) {
36
+ this[name] = __returnValue.bind(null, newValue);
37
+ }
20
38
  var __export = (target, all) => {
21
39
  for (var name in all)
22
40
  __defProp(target, name, {
23
41
  get: all[name],
24
42
  enumerable: true,
25
43
  configurable: true,
26
- set: (newValue) => all[name] = () => newValue
44
+ set: __exportSetter.bind(all, name)
27
45
  });
28
46
  };
29
47
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
@@ -3364,7 +3382,6 @@ var {
3364
3382
  init_source();
3365
3383
  import { mkdirSync, writeFileSync, existsSync as existsSync2, readFileSync } from "fs";
3366
3384
  import { join as join2, dirname } from "path";
3367
-
3368
3385
  // node_modules/@inquirer/core/dist/lib/key.js
3369
3386
  var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
3370
3387
  var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
@@ -3509,7 +3526,7 @@ var effectScheduler = {
3509
3526
  // node_modules/@inquirer/core/dist/lib/use-state.js
3510
3527
  function useState(defaultValue) {
3511
3528
  return withPointer((pointer) => {
3512
- const setState = AsyncResource2.bind(function setState(newValue) {
3529
+ const setState = AsyncResource2.bind(function setState2(newValue) {
3513
3530
  if (pointer.get() !== newValue) {
3514
3531
  pointer.set(newValue);
3515
3532
  handleChange();
@@ -8265,16 +8282,16 @@ import { existsSync as existsSync7, readFileSync as readFileSync5 } from "fs";
8265
8282
  import { join as join9 } from "path";
8266
8283
  import { createHash as createHash2 } from "crypto";
8267
8284
 
8268
- // node_modules/chokidar/index.js
8285
+ // node_modules/chokidar/esm/index.js
8286
+ import { stat as statcb } from "fs";
8287
+ import { stat as stat3, readdir as readdir2 } from "fs/promises";
8269
8288
  import { EventEmitter } from "events";
8270
- import { stat as statcb, Stats } from "fs";
8271
- import { readdir as readdir2, stat as stat3 } from "fs/promises";
8272
- import * as sp2 from "path";
8289
+ import * as sysPath2 from "path";
8273
8290
 
8274
- // node_modules/readdirp/index.js
8275
- import { lstat, readdir, realpath, stat } from "fs/promises";
8276
- import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "path";
8291
+ // node_modules/readdirp/esm/index.js
8292
+ import { stat, lstat, readdir, realpath } from "fs/promises";
8277
8293
  import { Readable } from "stream";
8294
+ import { resolve as presolve, relative as prelative, join as pjoin, sep as psep } from "path";
8278
8295
  var EntryTypes = {
8279
8296
  FILE_TYPE: "files",
8280
8297
  DIR_TYPE: "directories",
@@ -8330,20 +8347,6 @@ var normalizeFilter = (filter) => {
8330
8347
  };
8331
8348
 
8332
8349
  class ReaddirpStream extends Readable {
8333
- parents;
8334
- reading;
8335
- parent;
8336
- _stat;
8337
- _maxDepth;
8338
- _wantsDir;
8339
- _wantsFile;
8340
- _wantsEverything;
8341
- _root;
8342
- _isDirent;
8343
- _statsProp;
8344
- _rdOptions;
8345
- _fileFilter;
8346
- _directoryFilter;
8347
8350
  constructor(options = {}) {
8348
8351
  super({
8349
8352
  objectMode: true,
@@ -8360,7 +8363,7 @@ class ReaddirpStream extends Readable {
8360
8363
  } else {
8361
8364
  this._stat = statMethod;
8362
8365
  }
8363
- this._maxDepth = opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
8366
+ this._maxDepth = opts.depth ?? defaultOptions.depth;
8364
8367
  this._wantsDir = type ? DIR_TYPES.has(type) : false;
8365
8368
  this._wantsFile = type ? FILE_TYPES.has(type) : false;
8366
8369
  this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
@@ -8505,11 +8508,11 @@ function readdirp(root, options = {}) {
8505
8508
  return new ReaddirpStream(options);
8506
8509
  }
8507
8510
 
8508
- // node_modules/chokidar/handler.js
8509
- import { watch as fs_watch, unwatchFile, watchFile } from "fs";
8510
- import { realpath as fsrealpath, lstat as lstat2, open, stat as stat2 } from "fs/promises";
8511
+ // node_modules/chokidar/esm/handler.js
8512
+ import { watchFile, unwatchFile, watch as fs_watch } from "fs";
8513
+ import { open, stat as stat2, lstat as lstat2, realpath as fsrealpath } from "fs/promises";
8514
+ import * as sysPath from "path";
8511
8515
  import { type as osType } from "os";
8512
- import * as sp from "path";
8513
8516
  var STR_DATA = "data";
8514
8517
  var STR_END = "end";
8515
8518
  var STR_CLOSE = "close";
@@ -8801,7 +8804,7 @@ var binaryExtensions = new Set([
8801
8804
  "zip",
8802
8805
  "zipx"
8803
8806
  ]);
8804
- var isBinaryPath = (filePath) => binaryExtensions.has(sp.extname(filePath).slice(1).toLowerCase());
8807
+ var isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
8805
8808
  var foreach = (val, fn) => {
8806
8809
  if (val instanceof Set) {
8807
8810
  val.forEach(fn);
@@ -8839,7 +8842,7 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
8839
8842
  listener(path);
8840
8843
  emitRaw(rawEvent, evPath, { watchedPath: path });
8841
8844
  if (evPath && path !== evPath) {
8842
- fsWatchBroadcast(sp.resolve(path, evPath), KEY_LISTENERS, sp.join(path, evPath));
8845
+ fsWatchBroadcast(sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath));
8843
8846
  }
8844
8847
  };
8845
8848
  try {
@@ -8954,19 +8957,17 @@ var setFsWatchFileListener = (path, fullPath, options, handlers) => {
8954
8957
  };
8955
8958
 
8956
8959
  class NodeFsHandler {
8957
- fsw;
8958
- _boundHandleError;
8959
8960
  constructor(fsW) {
8960
8961
  this.fsw = fsW;
8961
8962
  this._boundHandleError = (error2) => fsW._handleError(error2);
8962
8963
  }
8963
8964
  _watchWithNodeFs(path, listener) {
8964
8965
  const opts = this.fsw.options;
8965
- const directory = sp.dirname(path);
8966
- const basename4 = sp.basename(path);
8966
+ const directory = sysPath.dirname(path);
8967
+ const basename4 = sysPath.basename(path);
8967
8968
  const parent = this.fsw._getWatchedDir(directory);
8968
8969
  parent.add(basename4);
8969
- const absolutePath = sp.resolve(path);
8970
+ const absolutePath = sysPath.resolve(path);
8970
8971
  const options = {
8971
8972
  persistent: opts.persistent
8972
8973
  };
@@ -8993,8 +8994,8 @@ class NodeFsHandler {
8993
8994
  if (this.fsw.closed) {
8994
8995
  return;
8995
8996
  }
8996
- const dirname3 = sp.dirname(file);
8997
- const basename4 = sp.basename(file);
8997
+ const dirname3 = sysPath.dirname(file);
8998
+ const basename4 = sysPath.basename(file);
8998
8999
  const parent = this.fsw._getWatchedDir(dirname3);
8999
9000
  let prevStats = stats;
9000
9001
  if (parent.has(basename4))
@@ -9077,9 +9078,8 @@ class NodeFsHandler {
9077
9078
  this.fsw._symlinkPaths.set(full, true);
9078
9079
  }
9079
9080
  _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
9080
- directory = sp.join(directory, "");
9081
- const throttleKey = target ? `${directory}:${target}` : directory;
9082
- throttler = this.fsw._throttle("readdir", throttleKey, 1000);
9081
+ directory = sysPath.join(directory, "");
9082
+ throttler = this.fsw._throttle("readdir", directory, 1000);
9083
9083
  if (!throttler)
9084
9084
  return;
9085
9085
  const previous = this.fsw._getWatchedDir(wh.path);
@@ -9096,7 +9096,7 @@ class NodeFsHandler {
9096
9096
  return;
9097
9097
  }
9098
9098
  const item = entry.path;
9099
- let path = sp.join(directory, item);
9099
+ let path = sysPath.join(directory, item);
9100
9100
  current.add(item);
9101
9101
  if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {
9102
9102
  return;
@@ -9107,7 +9107,7 @@ class NodeFsHandler {
9107
9107
  }
9108
9108
  if (item === target || !target && !previous.has(item)) {
9109
9109
  this.fsw._incrReadyCount();
9110
- path = sp.join(dir, sp.relative(dir, path));
9110
+ path = sysPath.join(dir, sysPath.relative(dir, path));
9111
9111
  this._addToNodeFs(path, initialAdd, wh, depth + 1);
9112
9112
  }
9113
9113
  }).on(EV.ERROR, this._boundHandleError);
@@ -9133,12 +9133,12 @@ class NodeFsHandler {
9133
9133
  });
9134
9134
  }
9135
9135
  async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath2) {
9136
- const parentDir = this.fsw._getWatchedDir(sp.dirname(dir));
9137
- const tracked = parentDir.has(sp.basename(dir));
9136
+ const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
9137
+ const tracked = parentDir.has(sysPath.basename(dir));
9138
9138
  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
9139
9139
  this.fsw._emit(EV.ADD_DIR, dir, stats);
9140
9140
  }
9141
- parentDir.add(sp.basename(dir));
9141
+ parentDir.add(sysPath.basename(dir));
9142
9142
  this.fsw._getWatchedDir(dir);
9143
9143
  let throttler;
9144
9144
  let closer;
@@ -9179,7 +9179,7 @@ class NodeFsHandler {
9179
9179
  const follow = this.fsw.options.followSymlinks;
9180
9180
  let closer;
9181
9181
  if (stats.isDirectory()) {
9182
- const absPath = sp.resolve(path);
9182
+ const absPath = sysPath.resolve(path);
9183
9183
  const targetPath = follow ? await fsrealpath(path) : path;
9184
9184
  if (this.fsw.closed)
9185
9185
  return;
@@ -9193,14 +9193,14 @@ class NodeFsHandler {
9193
9193
  const targetPath = follow ? await fsrealpath(path) : path;
9194
9194
  if (this.fsw.closed)
9195
9195
  return;
9196
- const parent = sp.dirname(wh.watchPath);
9196
+ const parent = sysPath.dirname(wh.watchPath);
9197
9197
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
9198
9198
  this.fsw._emit(EV.ADD, wh.watchPath, stats);
9199
9199
  closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
9200
9200
  if (this.fsw.closed)
9201
9201
  return;
9202
9202
  if (targetPath !== undefined) {
9203
- this.fsw._symlinkPaths.set(sp.resolve(path), targetPath);
9203
+ this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
9204
9204
  }
9205
9205
  } else {
9206
9206
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
@@ -9218,7 +9218,7 @@ class NodeFsHandler {
9218
9218
  }
9219
9219
  }
9220
9220
 
9221
- // node_modules/chokidar/index.js
9221
+ // node_modules/chokidar/esm/index.js
9222
9222
  /*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
9223
9223
  var SLASH = "/";
9224
9224
  var SLASH_SLASH = "//";
@@ -9226,7 +9226,7 @@ var ONE_DOT = ".";
9226
9226
  var TWO_DOTS = "..";
9227
9227
  var STRING_TYPE = "string";
9228
9228
  var BACK_SLASH_RE = /\\/g;
9229
- var DOUBLE_SLASH_RE = /\/\//g;
9229
+ var DOUBLE_SLASH_RE = /\/\//;
9230
9230
  var DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
9231
9231
  var REPLACER_RE = /^\.[/\\]/;
9232
9232
  function arrify(item) {
@@ -9245,11 +9245,11 @@ function createPattern(matcher) {
9245
9245
  if (matcher.path === string)
9246
9246
  return true;
9247
9247
  if (matcher.recursive) {
9248
- const relative4 = sp2.relative(matcher.path, string);
9248
+ const relative4 = sysPath2.relative(matcher.path, string);
9249
9249
  if (!relative4) {
9250
9250
  return false;
9251
9251
  }
9252
- return !relative4.startsWith("..") && !sp2.isAbsolute(relative4);
9252
+ return !relative4.startsWith("..") && !sysPath2.isAbsolute(relative4);
9253
9253
  }
9254
9254
  return false;
9255
9255
  };
@@ -9259,12 +9259,14 @@ function createPattern(matcher) {
9259
9259
  function normalizePath(path) {
9260
9260
  if (typeof path !== "string")
9261
9261
  throw new Error("string expected");
9262
- path = sp2.normalize(path);
9262
+ path = sysPath2.normalize(path);
9263
9263
  path = path.replace(/\\/g, "/");
9264
9264
  let prepend = false;
9265
9265
  if (path.startsWith("//"))
9266
9266
  prepend = true;
9267
- path = path.replace(DOUBLE_SLASH_RE, "/");
9267
+ const DOUBLE_SLASH_RE2 = /\/\//;
9268
+ while (path.match(DOUBLE_SLASH_RE2))
9269
+ path = path.replace(DOUBLE_SLASH_RE2, "/");
9268
9270
  if (prepend)
9269
9271
  path = "/" + path;
9270
9272
  return path;
@@ -9305,32 +9307,31 @@ var toUnix = (string) => {
9305
9307
  if (str.startsWith(SLASH_SLASH)) {
9306
9308
  prepend = true;
9307
9309
  }
9308
- str = str.replace(DOUBLE_SLASH_RE, SLASH);
9310
+ while (str.match(DOUBLE_SLASH_RE)) {
9311
+ str = str.replace(DOUBLE_SLASH_RE, SLASH);
9312
+ }
9309
9313
  if (prepend) {
9310
9314
  str = SLASH + str;
9311
9315
  }
9312
9316
  return str;
9313
9317
  };
9314
- var normalizePathToUnix = (path) => toUnix(sp2.normalize(toUnix(path)));
9318
+ var normalizePathToUnix = (path) => toUnix(sysPath2.normalize(toUnix(path)));
9315
9319
  var normalizeIgnored = (cwd = "") => (path) => {
9316
9320
  if (typeof path === "string") {
9317
- return normalizePathToUnix(sp2.isAbsolute(path) ? path : sp2.join(cwd, path));
9321
+ return normalizePathToUnix(sysPath2.isAbsolute(path) ? path : sysPath2.join(cwd, path));
9318
9322
  } else {
9319
9323
  return path;
9320
9324
  }
9321
9325
  };
9322
9326
  var getAbsolutePath = (path, cwd) => {
9323
- if (sp2.isAbsolute(path)) {
9327
+ if (sysPath2.isAbsolute(path)) {
9324
9328
  return path;
9325
9329
  }
9326
- return sp2.join(cwd, path);
9330
+ return sysPath2.join(cwd, path);
9327
9331
  };
9328
9332
  var EMPTY_SET = Object.freeze(new Set);
9329
9333
 
9330
9334
  class DirEntry {
9331
- path;
9332
- _removeWatcher;
9333
- items;
9334
9335
  constructor(dir, removeWatcher) {
9335
9336
  this.path = dir;
9336
9337
  this._removeWatcher = removeWatcher;
@@ -9355,7 +9356,7 @@ class DirEntry {
9355
9356
  await readdir2(dir);
9356
9357
  } catch (err) {
9357
9358
  if (this._removeWatcher) {
9358
- this._removeWatcher(sp2.dirname(dir), sp2.basename(dir));
9359
+ this._removeWatcher(sysPath2.dirname(dir), sysPath2.basename(dir));
9359
9360
  }
9360
9361
  }
9361
9362
  }
@@ -9383,19 +9384,12 @@ var STAT_METHOD_F = "stat";
9383
9384
  var STAT_METHOD_L = "lstat";
9384
9385
 
9385
9386
  class WatchHelper {
9386
- fsw;
9387
- path;
9388
- watchPath;
9389
- fullWatchPath;
9390
- dirParts;
9391
- followSymlinks;
9392
- statMethod;
9393
9387
  constructor(path, follow, fsw) {
9394
9388
  this.fsw = fsw;
9395
9389
  const watchPath = path;
9396
9390
  this.path = path = path.replace(REPLACER_RE, "");
9397
9391
  this.watchPath = watchPath;
9398
- this.fullWatchPath = sp2.resolve(watchPath);
9392
+ this.fullWatchPath = sysPath2.resolve(watchPath);
9399
9393
  this.dirParts = [];
9400
9394
  this.dirParts.forEach((parts) => {
9401
9395
  if (parts.length > 1)
@@ -9405,7 +9399,7 @@ class WatchHelper {
9405
9399
  this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
9406
9400
  }
9407
9401
  entryPath(entry) {
9408
- return sp2.join(this.watchPath, sp2.relative(this.watchPath, entry.fullPath));
9402
+ return sysPath2.join(this.watchPath, sysPath2.relative(this.watchPath, entry.fullPath));
9409
9403
  }
9410
9404
  filterPath(entry) {
9411
9405
  const { stats } = entry;
@@ -9420,24 +9414,6 @@ class WatchHelper {
9420
9414
  }
9421
9415
 
9422
9416
  class FSWatcher extends EventEmitter {
9423
- closed;
9424
- options;
9425
- _closers;
9426
- _ignoredPaths;
9427
- _throttled;
9428
- _streams;
9429
- _symlinkPaths;
9430
- _watched;
9431
- _pendingWrites;
9432
- _pendingUnlinks;
9433
- _readyCount;
9434
- _emitReady;
9435
- _closePromise;
9436
- _userIgnored;
9437
- _readyEmitted;
9438
- _emitRaw;
9439
- _boundRemove;
9440
- _nodeFsHandler;
9441
9417
  constructor(_opts = {}) {
9442
9418
  super();
9443
9419
  this.closed = false;
@@ -9546,7 +9522,7 @@ class FSWatcher extends EventEmitter {
9546
9522
  return;
9547
9523
  results.forEach((item) => {
9548
9524
  if (item)
9549
- this.add(sp2.dirname(item), sp2.basename(_origAdd || item));
9525
+ this.add(sysPath2.dirname(item), sysPath2.basename(_origAdd || item));
9550
9526
  });
9551
9527
  });
9552
9528
  return this;
@@ -9557,10 +9533,10 @@ class FSWatcher extends EventEmitter {
9557
9533
  const paths = unifyPaths(paths_);
9558
9534
  const { cwd } = this.options;
9559
9535
  paths.forEach((path) => {
9560
- if (!sp2.isAbsolute(path) && !this._closers.has(path)) {
9536
+ if (!sysPath2.isAbsolute(path) && !this._closers.has(path)) {
9561
9537
  if (cwd)
9562
- path = sp2.join(cwd, path);
9563
- path = sp2.resolve(path);
9538
+ path = sysPath2.join(cwd, path);
9539
+ path = sysPath2.resolve(path);
9564
9540
  }
9565
9541
  this._closePath(path);
9566
9542
  this._addIgnoredPath(path);
@@ -9604,7 +9580,7 @@ class FSWatcher extends EventEmitter {
9604
9580
  getWatched() {
9605
9581
  const watchList = {};
9606
9582
  this._watched.forEach((entry, dir) => {
9607
- const key = this.options.cwd ? sp2.relative(this.options.cwd, dir) : dir;
9583
+ const key = this.options.cwd ? sysPath2.relative(this.options.cwd, dir) : dir;
9608
9584
  const index = key || ONE_DOT;
9609
9585
  watchList[index] = entry.getChildren().sort();
9610
9586
  });
@@ -9620,9 +9596,9 @@ class FSWatcher extends EventEmitter {
9620
9596
  return;
9621
9597
  const opts = this.options;
9622
9598
  if (isWindows)
9623
- path = sp2.normalize(path);
9599
+ path = sysPath2.normalize(path);
9624
9600
  if (opts.cwd)
9625
- path = sp2.relative(opts.cwd, path);
9601
+ path = sysPath2.relative(opts.cwd, path);
9626
9602
  const args = [path];
9627
9603
  if (stats != null)
9628
9604
  args.push(stats);
@@ -9673,7 +9649,7 @@ class FSWatcher extends EventEmitter {
9673
9649
  return this;
9674
9650
  }
9675
9651
  if (opts.alwaysStat && stats === undefined && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
9676
- const fullPath = opts.cwd ? sp2.join(opts.cwd, path) : path;
9652
+ const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path) : path;
9677
9653
  let stats2;
9678
9654
  try {
9679
9655
  stats2 = await stat3(fullPath);
@@ -9729,8 +9705,8 @@ class FSWatcher extends EventEmitter {
9729
9705
  const pollInterval = awf.pollInterval;
9730
9706
  let timeoutHandler;
9731
9707
  let fullPath = path;
9732
- if (this.options.cwd && !sp2.isAbsolute(path)) {
9733
- fullPath = sp2.join(this.options.cwd, path);
9708
+ if (this.options.cwd && !sysPath2.isAbsolute(path)) {
9709
+ fullPath = sysPath2.join(this.options.cwd, path);
9734
9710
  }
9735
9711
  const now = new Date;
9736
9712
  const writes = this._pendingWrites;
@@ -9787,7 +9763,7 @@ class FSWatcher extends EventEmitter {
9787
9763
  return new WatchHelper(path, this.options.followSymlinks, this);
9788
9764
  }
9789
9765
  _getWatchedDir(directory) {
9790
- const dir = sp2.resolve(directory);
9766
+ const dir = sysPath2.resolve(directory);
9791
9767
  if (!this._watched.has(dir))
9792
9768
  this._watched.set(dir, new DirEntry(dir, this._boundRemove));
9793
9769
  return this._watched.get(dir);
@@ -9798,8 +9774,8 @@ class FSWatcher extends EventEmitter {
9798
9774
  return Boolean(Number(stats.mode) & 256);
9799
9775
  }
9800
9776
  _remove(directory, item, isDirectory) {
9801
- const path = sp2.join(directory, item);
9802
- const fullPath = sp2.resolve(path);
9777
+ const path = sysPath2.join(directory, item);
9778
+ const fullPath = sysPath2.resolve(path);
9803
9779
  isDirectory = isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath);
9804
9780
  if (!this._throttle("remove", path, 100))
9805
9781
  return;
@@ -9817,7 +9793,7 @@ class FSWatcher extends EventEmitter {
9817
9793
  }
9818
9794
  let relPath = path;
9819
9795
  if (this.options.cwd)
9820
- relPath = sp2.relative(this.options.cwd, path);
9796
+ relPath = sysPath2.relative(this.options.cwd, path);
9821
9797
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
9822
9798
  const event = this._pendingWrites.get(relPath).cancelWait();
9823
9799
  if (event === EVENTS.ADD)
@@ -9832,8 +9808,8 @@ class FSWatcher extends EventEmitter {
9832
9808
  }
9833
9809
  _closePath(path) {
9834
9810
  this._closeFile(path);
9835
- const dir = sp2.dirname(path);
9836
- this._getWatchedDir(dir).remove(sp2.basename(path));
9811
+ const dir = sysPath2.dirname(path);
9812
+ this._getWatchedDir(dir).remove(sysPath2.basename(path));
9837
9813
  }
9838
9814
  _closeFile(path) {
9839
9815
  const closers = this._closers.get(path);
@@ -11067,9 +11043,55 @@ function parseModelFields(content, fileName) {
11067
11043
  }
11068
11044
  return { name: modelMatch[1], fields };
11069
11045
  }
11046
+ // package.json
11047
+ var package_default = {
11048
+ name: "@construct-space/cli",
11049
+ version: "1.4.5",
11050
+ description: "Construct CLI \u2014 scaffold, build, develop, and publish spaces",
11051
+ type: "module",
11052
+ bin: {
11053
+ construct: "dist/index.js"
11054
+ },
11055
+ exports: {
11056
+ ".": {
11057
+ import: "./dist/index.js"
11058
+ }
11059
+ },
11060
+ files: [
11061
+ "dist",
11062
+ "templates"
11063
+ ],
11064
+ scripts: {
11065
+ build: "bun build src/index.ts --outdir dist --target bun --format esm && cp -r templates dist/",
11066
+ dev: "bun run src/index.ts",
11067
+ test: "bun test",
11068
+ typecheck: "tsc --noEmit"
11069
+ },
11070
+ dependencies: {
11071
+ commander: "^14.0.3",
11072
+ "@inquirer/prompts": "^8.3.2",
11073
+ chalk: "^5.6.2",
11074
+ ora: "^9.3.0",
11075
+ chokidar: "^5.0.0"
11076
+ },
11077
+ devDependencies: {
11078
+ "@types/bun": "latest",
11079
+ typescript: "^6.0.2"
11080
+ },
11081
+ keywords: [
11082
+ "construct",
11083
+ "cli",
11084
+ "space",
11085
+ "graph"
11086
+ ],
11087
+ author: {
11088
+ name: "Construct Team"
11089
+ },
11090
+ license: "MIT"
11091
+ };
11070
11092
 
11071
11093
  // src/index.ts
11072
- var VERSION = "1.3.1";
11094
+ var VERSION = package_default.version;
11073
11095
  var program2 = new Command;
11074
11096
  program2.name("construct").description("Construct CLI \u2014 scaffold, build, develop, and publish spaces").version(VERSION);
11075
11097
  program2.command("scaffold [name]").alias("new").alias("create").description("Create a new Construct space project").option("--with-tests", "Include E2E testing boilerplate").option("--full", "Full preset: multiple pages, extra skills, widget templates").action(async (name, opts) => scaffold(name, opts));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@construct-space/cli",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "Construct CLI — scaffold, build, develop, and publish spaces",
5
5
  "type": "module",
6
6
  "bin": {