@construct-space/cli 1.7.6 → 1.7.7

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 CHANGED
@@ -5312,6 +5312,7 @@ async function scaffold(nameArg, options) {
5312
5312
  const files = {
5313
5313
  "package.json.tmpl": join2(name, "package.json"),
5314
5314
  "vite.config.ts.tmpl": join2(name, "vite.config.ts"),
5315
+ "style.css.tmpl": join2(name, "src", "style.css"),
5315
5316
  "index.vue.tmpl": join2(name, "src", "pages", "index.vue"),
5316
5317
  "config.md.tmpl": join2(name, "agent", "config.md"),
5317
5318
  "skill.md.tmpl": join2(name, "agent", "skills", "default.md"),
@@ -8154,6 +8155,9 @@ function generate(root, m) {
8154
8155
  "// Auto-generated entry \u2014 do not edit manually",
8155
8156
  "// Generated from space.manifest.json"
8156
8157
  ];
8158
+ if (existsSync4(join4(root, "src", "style.css"))) {
8159
+ lines.push("import './style.css'");
8160
+ }
8157
8161
  for (const p of pages)
8158
8162
  lines.push(`import ${p.varName} from '${p.importPath}'`);
8159
8163
  for (const w of widgets)
@@ -8490,6 +8494,13 @@ async function build(options) {
8490
8494
  renameSync(oldCSS, newCSS);
8491
8495
  }
8492
8496
  }
8497
+ const expectedCSS = join6(distDir, `space-${m.id}.css`);
8498
+ if (!existsSync6(expectedCSS)) {
8499
+ const cssMatches = readdirSync3(distDir).filter((f) => f.endsWith(".css"));
8500
+ const renamedCSS = cssMatches.find((f) => f.startsWith("space-")) || (cssMatches.length === 1 ? cssMatches[0] : undefined);
8501
+ if (renamedCSS)
8502
+ renameSync(join6(distDir, renamedCSS), expectedCSS);
8503
+ }
8493
8504
  const bundleData = readFileSync4(bundlePath);
8494
8505
  const checksum = createHash("sha256").update(bundleData).digest("hex");
8495
8506
  const raw = readRaw(root);
@@ -8516,16 +8527,16 @@ import { existsSync as existsSync7, readFileSync as readFileSync5 } from "fs";
8516
8527
  import { join as join9 } from "path";
8517
8528
  import { createHash as createHash2 } from "crypto";
8518
8529
 
8519
- // node_modules/chokidar/esm/index.js
8520
- import { stat as statcb } from "fs";
8521
- import { stat as stat3, readdir as readdir2 } from "fs/promises";
8530
+ // node_modules/chokidar/index.js
8522
8531
  import { EventEmitter } from "events";
8523
- import * as sysPath2 from "path";
8532
+ import { stat as statcb, Stats } from "fs";
8533
+ import { readdir as readdir2, stat as stat3 } from "fs/promises";
8534
+ import * as sp2 from "path";
8524
8535
 
8525
- // node_modules/readdirp/esm/index.js
8526
- import { stat, lstat, readdir, realpath } from "fs/promises";
8536
+ // node_modules/readdirp/index.js
8537
+ import { lstat, readdir, realpath, stat } from "fs/promises";
8538
+ import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "path";
8527
8539
  import { Readable } from "stream";
8528
- import { resolve as presolve, relative as prelative, join as pjoin, sep as psep } from "path";
8529
8540
  var EntryTypes = {
8530
8541
  FILE_TYPE: "files",
8531
8542
  DIR_TYPE: "directories",
@@ -8581,6 +8592,20 @@ var normalizeFilter = (filter) => {
8581
8592
  };
8582
8593
 
8583
8594
  class ReaddirpStream extends Readable {
8595
+ parents;
8596
+ reading;
8597
+ parent;
8598
+ _stat;
8599
+ _maxDepth;
8600
+ _wantsDir;
8601
+ _wantsFile;
8602
+ _wantsEverything;
8603
+ _root;
8604
+ _isDirent;
8605
+ _statsProp;
8606
+ _rdOptions;
8607
+ _fileFilter;
8608
+ _directoryFilter;
8584
8609
  constructor(options = {}) {
8585
8610
  super({
8586
8611
  objectMode: true,
@@ -8597,7 +8622,7 @@ class ReaddirpStream extends Readable {
8597
8622
  } else {
8598
8623
  this._stat = statMethod;
8599
8624
  }
8600
- this._maxDepth = opts.depth ?? defaultOptions.depth;
8625
+ this._maxDepth = opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
8601
8626
  this._wantsDir = type ? DIR_TYPES.has(type) : false;
8602
8627
  this._wantsFile = type ? FILE_TYPES.has(type) : false;
8603
8628
  this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
@@ -8742,11 +8767,11 @@ function readdirp(root, options = {}) {
8742
8767
  return new ReaddirpStream(options);
8743
8768
  }
8744
8769
 
8745
- // node_modules/chokidar/esm/handler.js
8746
- import { watchFile, unwatchFile, watch as fs_watch } from "fs";
8747
- import { open, stat as stat2, lstat as lstat2, realpath as fsrealpath } from "fs/promises";
8748
- import * as sysPath from "path";
8770
+ // node_modules/chokidar/handler.js
8771
+ import { watch as fs_watch, unwatchFile, watchFile } from "fs";
8772
+ import { realpath as fsrealpath, lstat as lstat2, open, stat as stat2 } from "fs/promises";
8749
8773
  import { type as osType } from "os";
8774
+ import * as sp from "path";
8750
8775
  var STR_DATA = "data";
8751
8776
  var STR_END = "end";
8752
8777
  var STR_CLOSE = "close";
@@ -9038,7 +9063,7 @@ var binaryExtensions = new Set([
9038
9063
  "zip",
9039
9064
  "zipx"
9040
9065
  ]);
9041
- var isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
9066
+ var isBinaryPath = (filePath) => binaryExtensions.has(sp.extname(filePath).slice(1).toLowerCase());
9042
9067
  var foreach = (val, fn) => {
9043
9068
  if (val instanceof Set) {
9044
9069
  val.forEach(fn);
@@ -9076,7 +9101,7 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
9076
9101
  listener(path);
9077
9102
  emitRaw(rawEvent, evPath, { watchedPath: path });
9078
9103
  if (evPath && path !== evPath) {
9079
- fsWatchBroadcast(sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath));
9104
+ fsWatchBroadcast(sp.resolve(path, evPath), KEY_LISTENERS, sp.join(path, evPath));
9080
9105
  }
9081
9106
  };
9082
9107
  try {
@@ -9191,17 +9216,19 @@ var setFsWatchFileListener = (path, fullPath, options, handlers) => {
9191
9216
  };
9192
9217
 
9193
9218
  class NodeFsHandler {
9219
+ fsw;
9220
+ _boundHandleError;
9194
9221
  constructor(fsW) {
9195
9222
  this.fsw = fsW;
9196
9223
  this._boundHandleError = (error2) => fsW._handleError(error2);
9197
9224
  }
9198
9225
  _watchWithNodeFs(path, listener) {
9199
9226
  const opts = this.fsw.options;
9200
- const directory = sysPath.dirname(path);
9201
- const basename4 = sysPath.basename(path);
9227
+ const directory = sp.dirname(path);
9228
+ const basename4 = sp.basename(path);
9202
9229
  const parent = this.fsw._getWatchedDir(directory);
9203
9230
  parent.add(basename4);
9204
- const absolutePath = sysPath.resolve(path);
9231
+ const absolutePath = sp.resolve(path);
9205
9232
  const options = {
9206
9233
  persistent: opts.persistent
9207
9234
  };
@@ -9228,8 +9255,8 @@ class NodeFsHandler {
9228
9255
  if (this.fsw.closed) {
9229
9256
  return;
9230
9257
  }
9231
- const dirname3 = sysPath.dirname(file);
9232
- const basename4 = sysPath.basename(file);
9258
+ const dirname3 = sp.dirname(file);
9259
+ const basename4 = sp.basename(file);
9233
9260
  const parent = this.fsw._getWatchedDir(dirname3);
9234
9261
  let prevStats = stats;
9235
9262
  if (parent.has(basename4))
@@ -9312,8 +9339,9 @@ class NodeFsHandler {
9312
9339
  this.fsw._symlinkPaths.set(full, true);
9313
9340
  }
9314
9341
  _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
9315
- directory = sysPath.join(directory, "");
9316
- throttler = this.fsw._throttle("readdir", directory, 1000);
9342
+ directory = sp.join(directory, "");
9343
+ const throttleKey = target ? `${directory}:${target}` : directory;
9344
+ throttler = this.fsw._throttle("readdir", throttleKey, 1000);
9317
9345
  if (!throttler)
9318
9346
  return;
9319
9347
  const previous = this.fsw._getWatchedDir(wh.path);
@@ -9330,7 +9358,7 @@ class NodeFsHandler {
9330
9358
  return;
9331
9359
  }
9332
9360
  const item = entry.path;
9333
- let path = sysPath.join(directory, item);
9361
+ let path = sp.join(directory, item);
9334
9362
  current.add(item);
9335
9363
  if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {
9336
9364
  return;
@@ -9341,7 +9369,7 @@ class NodeFsHandler {
9341
9369
  }
9342
9370
  if (item === target || !target && !previous.has(item)) {
9343
9371
  this.fsw._incrReadyCount();
9344
- path = sysPath.join(dir, sysPath.relative(dir, path));
9372
+ path = sp.join(dir, sp.relative(dir, path));
9345
9373
  this._addToNodeFs(path, initialAdd, wh, depth + 1);
9346
9374
  }
9347
9375
  }).on(EV.ERROR, this._boundHandleError);
@@ -9367,12 +9395,12 @@ class NodeFsHandler {
9367
9395
  });
9368
9396
  }
9369
9397
  async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath2) {
9370
- const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
9371
- const tracked = parentDir.has(sysPath.basename(dir));
9398
+ const parentDir = this.fsw._getWatchedDir(sp.dirname(dir));
9399
+ const tracked = parentDir.has(sp.basename(dir));
9372
9400
  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
9373
9401
  this.fsw._emit(EV.ADD_DIR, dir, stats);
9374
9402
  }
9375
- parentDir.add(sysPath.basename(dir));
9403
+ parentDir.add(sp.basename(dir));
9376
9404
  this.fsw._getWatchedDir(dir);
9377
9405
  let throttler;
9378
9406
  let closer;
@@ -9413,7 +9441,7 @@ class NodeFsHandler {
9413
9441
  const follow = this.fsw.options.followSymlinks;
9414
9442
  let closer;
9415
9443
  if (stats.isDirectory()) {
9416
- const absPath = sysPath.resolve(path);
9444
+ const absPath = sp.resolve(path);
9417
9445
  const targetPath = follow ? await fsrealpath(path) : path;
9418
9446
  if (this.fsw.closed)
9419
9447
  return;
@@ -9427,14 +9455,14 @@ class NodeFsHandler {
9427
9455
  const targetPath = follow ? await fsrealpath(path) : path;
9428
9456
  if (this.fsw.closed)
9429
9457
  return;
9430
- const parent = sysPath.dirname(wh.watchPath);
9458
+ const parent = sp.dirname(wh.watchPath);
9431
9459
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
9432
9460
  this.fsw._emit(EV.ADD, wh.watchPath, stats);
9433
9461
  closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
9434
9462
  if (this.fsw.closed)
9435
9463
  return;
9436
9464
  if (targetPath !== undefined) {
9437
- this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
9465
+ this.fsw._symlinkPaths.set(sp.resolve(path), targetPath);
9438
9466
  }
9439
9467
  } else {
9440
9468
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
@@ -9452,7 +9480,7 @@ class NodeFsHandler {
9452
9480
  }
9453
9481
  }
9454
9482
 
9455
- // node_modules/chokidar/esm/index.js
9483
+ // node_modules/chokidar/index.js
9456
9484
  /*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
9457
9485
  var SLASH = "/";
9458
9486
  var SLASH_SLASH = "//";
@@ -9460,7 +9488,7 @@ var ONE_DOT = ".";
9460
9488
  var TWO_DOTS = "..";
9461
9489
  var STRING_TYPE = "string";
9462
9490
  var BACK_SLASH_RE = /\\/g;
9463
- var DOUBLE_SLASH_RE = /\/\//;
9491
+ var DOUBLE_SLASH_RE = /\/\//g;
9464
9492
  var DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
9465
9493
  var REPLACER_RE = /^\.[/\\]/;
9466
9494
  function arrify(item) {
@@ -9479,11 +9507,11 @@ function createPattern(matcher) {
9479
9507
  if (matcher.path === string)
9480
9508
  return true;
9481
9509
  if (matcher.recursive) {
9482
- const relative4 = sysPath2.relative(matcher.path, string);
9510
+ const relative4 = sp2.relative(matcher.path, string);
9483
9511
  if (!relative4) {
9484
9512
  return false;
9485
9513
  }
9486
- return !relative4.startsWith("..") && !sysPath2.isAbsolute(relative4);
9514
+ return !relative4.startsWith("..") && !sp2.isAbsolute(relative4);
9487
9515
  }
9488
9516
  return false;
9489
9517
  };
@@ -9493,14 +9521,12 @@ function createPattern(matcher) {
9493
9521
  function normalizePath(path) {
9494
9522
  if (typeof path !== "string")
9495
9523
  throw new Error("string expected");
9496
- path = sysPath2.normalize(path);
9524
+ path = sp2.normalize(path);
9497
9525
  path = path.replace(/\\/g, "/");
9498
9526
  let prepend = false;
9499
9527
  if (path.startsWith("//"))
9500
9528
  prepend = true;
9501
- const DOUBLE_SLASH_RE2 = /\/\//;
9502
- while (path.match(DOUBLE_SLASH_RE2))
9503
- path = path.replace(DOUBLE_SLASH_RE2, "/");
9529
+ path = path.replace(DOUBLE_SLASH_RE, "/");
9504
9530
  if (prepend)
9505
9531
  path = "/" + path;
9506
9532
  return path;
@@ -9541,31 +9567,32 @@ var toUnix = (string) => {
9541
9567
  if (str.startsWith(SLASH_SLASH)) {
9542
9568
  prepend = true;
9543
9569
  }
9544
- while (str.match(DOUBLE_SLASH_RE)) {
9545
- str = str.replace(DOUBLE_SLASH_RE, SLASH);
9546
- }
9570
+ str = str.replace(DOUBLE_SLASH_RE, SLASH);
9547
9571
  if (prepend) {
9548
9572
  str = SLASH + str;
9549
9573
  }
9550
9574
  return str;
9551
9575
  };
9552
- var normalizePathToUnix = (path) => toUnix(sysPath2.normalize(toUnix(path)));
9576
+ var normalizePathToUnix = (path) => toUnix(sp2.normalize(toUnix(path)));
9553
9577
  var normalizeIgnored = (cwd = "") => (path) => {
9554
9578
  if (typeof path === "string") {
9555
- return normalizePathToUnix(sysPath2.isAbsolute(path) ? path : sysPath2.join(cwd, path));
9579
+ return normalizePathToUnix(sp2.isAbsolute(path) ? path : sp2.join(cwd, path));
9556
9580
  } else {
9557
9581
  return path;
9558
9582
  }
9559
9583
  };
9560
9584
  var getAbsolutePath = (path, cwd) => {
9561
- if (sysPath2.isAbsolute(path)) {
9585
+ if (sp2.isAbsolute(path)) {
9562
9586
  return path;
9563
9587
  }
9564
- return sysPath2.join(cwd, path);
9588
+ return sp2.join(cwd, path);
9565
9589
  };
9566
9590
  var EMPTY_SET = Object.freeze(new Set);
9567
9591
 
9568
9592
  class DirEntry {
9593
+ path;
9594
+ _removeWatcher;
9595
+ items;
9569
9596
  constructor(dir, removeWatcher) {
9570
9597
  this.path = dir;
9571
9598
  this._removeWatcher = removeWatcher;
@@ -9590,7 +9617,7 @@ class DirEntry {
9590
9617
  await readdir2(dir);
9591
9618
  } catch (err) {
9592
9619
  if (this._removeWatcher) {
9593
- this._removeWatcher(sysPath2.dirname(dir), sysPath2.basename(dir));
9620
+ this._removeWatcher(sp2.dirname(dir), sp2.basename(dir));
9594
9621
  }
9595
9622
  }
9596
9623
  }
@@ -9618,12 +9645,19 @@ var STAT_METHOD_F = "stat";
9618
9645
  var STAT_METHOD_L = "lstat";
9619
9646
 
9620
9647
  class WatchHelper {
9648
+ fsw;
9649
+ path;
9650
+ watchPath;
9651
+ fullWatchPath;
9652
+ dirParts;
9653
+ followSymlinks;
9654
+ statMethod;
9621
9655
  constructor(path, follow, fsw) {
9622
9656
  this.fsw = fsw;
9623
9657
  const watchPath = path;
9624
9658
  this.path = path = path.replace(REPLACER_RE, "");
9625
9659
  this.watchPath = watchPath;
9626
- this.fullWatchPath = sysPath2.resolve(watchPath);
9660
+ this.fullWatchPath = sp2.resolve(watchPath);
9627
9661
  this.dirParts = [];
9628
9662
  this.dirParts.forEach((parts) => {
9629
9663
  if (parts.length > 1)
@@ -9633,7 +9667,7 @@ class WatchHelper {
9633
9667
  this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
9634
9668
  }
9635
9669
  entryPath(entry) {
9636
- return sysPath2.join(this.watchPath, sysPath2.relative(this.watchPath, entry.fullPath));
9670
+ return sp2.join(this.watchPath, sp2.relative(this.watchPath, entry.fullPath));
9637
9671
  }
9638
9672
  filterPath(entry) {
9639
9673
  const { stats } = entry;
@@ -9648,6 +9682,24 @@ class WatchHelper {
9648
9682
  }
9649
9683
 
9650
9684
  class FSWatcher extends EventEmitter {
9685
+ closed;
9686
+ options;
9687
+ _closers;
9688
+ _ignoredPaths;
9689
+ _throttled;
9690
+ _streams;
9691
+ _symlinkPaths;
9692
+ _watched;
9693
+ _pendingWrites;
9694
+ _pendingUnlinks;
9695
+ _readyCount;
9696
+ _emitReady;
9697
+ _closePromise;
9698
+ _userIgnored;
9699
+ _readyEmitted;
9700
+ _emitRaw;
9701
+ _boundRemove;
9702
+ _nodeFsHandler;
9651
9703
  constructor(_opts = {}) {
9652
9704
  super();
9653
9705
  this.closed = false;
@@ -9756,7 +9808,7 @@ class FSWatcher extends EventEmitter {
9756
9808
  return;
9757
9809
  results.forEach((item) => {
9758
9810
  if (item)
9759
- this.add(sysPath2.dirname(item), sysPath2.basename(_origAdd || item));
9811
+ this.add(sp2.dirname(item), sp2.basename(_origAdd || item));
9760
9812
  });
9761
9813
  });
9762
9814
  return this;
@@ -9767,10 +9819,10 @@ class FSWatcher extends EventEmitter {
9767
9819
  const paths = unifyPaths(paths_);
9768
9820
  const { cwd } = this.options;
9769
9821
  paths.forEach((path) => {
9770
- if (!sysPath2.isAbsolute(path) && !this._closers.has(path)) {
9822
+ if (!sp2.isAbsolute(path) && !this._closers.has(path)) {
9771
9823
  if (cwd)
9772
- path = sysPath2.join(cwd, path);
9773
- path = sysPath2.resolve(path);
9824
+ path = sp2.join(cwd, path);
9825
+ path = sp2.resolve(path);
9774
9826
  }
9775
9827
  this._closePath(path);
9776
9828
  this._addIgnoredPath(path);
@@ -9814,7 +9866,7 @@ class FSWatcher extends EventEmitter {
9814
9866
  getWatched() {
9815
9867
  const watchList = {};
9816
9868
  this._watched.forEach((entry, dir) => {
9817
- const key = this.options.cwd ? sysPath2.relative(this.options.cwd, dir) : dir;
9869
+ const key = this.options.cwd ? sp2.relative(this.options.cwd, dir) : dir;
9818
9870
  const index = key || ONE_DOT;
9819
9871
  watchList[index] = entry.getChildren().sort();
9820
9872
  });
@@ -9830,9 +9882,9 @@ class FSWatcher extends EventEmitter {
9830
9882
  return;
9831
9883
  const opts = this.options;
9832
9884
  if (isWindows)
9833
- path = sysPath2.normalize(path);
9885
+ path = sp2.normalize(path);
9834
9886
  if (opts.cwd)
9835
- path = sysPath2.relative(opts.cwd, path);
9887
+ path = sp2.relative(opts.cwd, path);
9836
9888
  const args = [path];
9837
9889
  if (stats != null)
9838
9890
  args.push(stats);
@@ -9883,7 +9935,7 @@ class FSWatcher extends EventEmitter {
9883
9935
  return this;
9884
9936
  }
9885
9937
  if (opts.alwaysStat && stats === undefined && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
9886
- const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path) : path;
9938
+ const fullPath = opts.cwd ? sp2.join(opts.cwd, path) : path;
9887
9939
  let stats2;
9888
9940
  try {
9889
9941
  stats2 = await stat3(fullPath);
@@ -9939,8 +9991,8 @@ class FSWatcher extends EventEmitter {
9939
9991
  const pollInterval = awf.pollInterval;
9940
9992
  let timeoutHandler;
9941
9993
  let fullPath = path;
9942
- if (this.options.cwd && !sysPath2.isAbsolute(path)) {
9943
- fullPath = sysPath2.join(this.options.cwd, path);
9994
+ if (this.options.cwd && !sp2.isAbsolute(path)) {
9995
+ fullPath = sp2.join(this.options.cwd, path);
9944
9996
  }
9945
9997
  const now = new Date;
9946
9998
  const writes = this._pendingWrites;
@@ -9997,7 +10049,7 @@ class FSWatcher extends EventEmitter {
9997
10049
  return new WatchHelper(path, this.options.followSymlinks, this);
9998
10050
  }
9999
10051
  _getWatchedDir(directory) {
10000
- const dir = sysPath2.resolve(directory);
10052
+ const dir = sp2.resolve(directory);
10001
10053
  if (!this._watched.has(dir))
10002
10054
  this._watched.set(dir, new DirEntry(dir, this._boundRemove));
10003
10055
  return this._watched.get(dir);
@@ -10008,8 +10060,8 @@ class FSWatcher extends EventEmitter {
10008
10060
  return Boolean(Number(stats.mode) & 256);
10009
10061
  }
10010
10062
  _remove(directory, item, isDirectory) {
10011
- const path = sysPath2.join(directory, item);
10012
- const fullPath = sysPath2.resolve(path);
10063
+ const path = sp2.join(directory, item);
10064
+ const fullPath = sp2.resolve(path);
10013
10065
  isDirectory = isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath);
10014
10066
  if (!this._throttle("remove", path, 100))
10015
10067
  return;
@@ -10027,7 +10079,7 @@ class FSWatcher extends EventEmitter {
10027
10079
  }
10028
10080
  let relPath = path;
10029
10081
  if (this.options.cwd)
10030
- relPath = sysPath2.relative(this.options.cwd, path);
10082
+ relPath = sp2.relative(this.options.cwd, path);
10031
10083
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
10032
10084
  const event = this._pendingWrites.get(relPath).cancelWait();
10033
10085
  if (event === EVENTS.ADD)
@@ -10042,8 +10094,8 @@ class FSWatcher extends EventEmitter {
10042
10094
  }
10043
10095
  _closePath(path) {
10044
10096
  this._closeFile(path);
10045
- const dir = sysPath2.dirname(path);
10046
- this._getWatchedDir(dir).remove(sysPath2.basename(path));
10097
+ const dir = sp2.dirname(path);
10098
+ this._getWatchedDir(dir).remove(sp2.basename(path));
10047
10099
  }
10048
10100
  _closeFile(path) {
10049
10101
  const closers = this._closers.get(path);
@@ -11457,7 +11509,7 @@ function graphFork(newSpaceID) {
11457
11509
  // package.json
11458
11510
  var package_default = {
11459
11511
  name: "@construct-space/cli",
11460
- version: "1.7.6",
11512
+ version: "1.7.7",
11461
11513
  description: "Construct CLI \u2014 scaffold, build, develop, and publish spaces",
11462
11514
  type: "module",
11463
11515
  bin: {
@@ -1,5 +1,6 @@
1
1
  // Space entry — exports pages, widgets, and actions for the host loader.
2
2
  // `construct dev` regenerates this from space.manifest.json on changes.
3
+ import './style.css'
3
4
  import IndexPage from './pages/index.vue'
4
5
  import { actions } from './actions'
5
6
 
@@ -1,5 +1,6 @@
1
1
  // Space entry — exports pages, widgets, and actions for the host loader.
2
2
  // `construct dev` regenerates this from space.manifest.json on changes.
3
+ import './style.css'
3
4
  import IndexPage from './pages/index.vue'
4
5
  import SettingsPage from './pages/settings.vue'
5
6
  import { actions } from './actions'
@@ -20,10 +20,12 @@
20
20
  "@construct-space/cli": "latest",
21
21
  "@construct-space/sdk": "latest",
22
22
  "@eslint/js": "^10.0.1",
23
+ "@tailwindcss/vite": "^4.1.17",
23
24
  "@vitejs/plugin-vue": "^6.0.6",
24
25
  "eslint": "^10.2.1",
25
26
  "eslint-plugin-vue": "^10.0.0",
26
27
  "lucide-vue-next": "^1.0.0",
28
+ "tailwindcss": "^4.1.17",
27
29
  "typescript": "^5.9.3",
28
30
  "typescript-eslint": "^8.0.0",
29
31
  "vite": "^8.0.12",
@@ -0,0 +1,5 @@
1
+ @import "tailwindcss";
2
+
3
+ @source "./**/*.{vue,ts,js}";
4
+ @source "../widgets/**/*.{vue,ts,js}";
5
+ @source "../node_modules/@construct-space/ui/dist/**/*.{js,vue}";
@@ -1,4 +1,5 @@
1
1
  import { defineConfig } from 'vite'
2
+ import tailwindcss from '@tailwindcss/vite'
2
3
  import vue from '@vitejs/plugin-vue'
3
4
  import { resolve } from 'path'
4
5
 
@@ -37,7 +38,7 @@ function makeGlobals(externals: string[]): Record<string, string> {
37
38
  }
38
39
 
39
40
  export default defineConfig({
40
- plugins: [vue()],
41
+ plugins: [tailwindcss(), vue()],
41
42
  build: {
42
43
  lib: {
43
44
  entry: resolve(__dirname, 'src/entry.ts'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@construct-space/cli",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "Construct CLI — scaffold, build, develop, and publish spaces",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,5 +1,6 @@
1
1
  // Space entry — exports pages, widgets, and actions for the host loader.
2
2
  // `construct dev` regenerates this from space.manifest.json on changes.
3
+ import './style.css'
3
4
  import IndexPage from './pages/index.vue'
4
5
  import { actions } from './actions'
5
6
 
@@ -1,5 +1,6 @@
1
1
  // Space entry — exports pages, widgets, and actions for the host loader.
2
2
  // `construct dev` regenerates this from space.manifest.json on changes.
3
+ import './style.css'
3
4
  import IndexPage from './pages/index.vue'
4
5
  import SettingsPage from './pages/settings.vue'
5
6
  import { actions } from './actions'
@@ -20,10 +20,12 @@
20
20
  "@construct-space/cli": "latest",
21
21
  "@construct-space/sdk": "latest",
22
22
  "@eslint/js": "^10.0.1",
23
+ "@tailwindcss/vite": "^4.1.17",
23
24
  "@vitejs/plugin-vue": "^6.0.6",
24
25
  "eslint": "^10.2.1",
25
26
  "eslint-plugin-vue": "^10.0.0",
26
27
  "lucide-vue-next": "^1.0.0",
28
+ "tailwindcss": "^4.1.17",
27
29
  "typescript": "^5.9.3",
28
30
  "typescript-eslint": "^8.0.0",
29
31
  "vite": "^8.0.12",
@@ -0,0 +1,5 @@
1
+ @import "tailwindcss";
2
+
3
+ @source "./**/*.{vue,ts,js}";
4
+ @source "../widgets/**/*.{vue,ts,js}";
5
+ @source "../node_modules/@construct-space/ui/dist/**/*.{js,vue}";
@@ -1,4 +1,5 @@
1
1
  import { defineConfig } from 'vite'
2
+ import tailwindcss from '@tailwindcss/vite'
2
3
  import vue from '@vitejs/plugin-vue'
3
4
  import { resolve } from 'path'
4
5
 
@@ -37,7 +38,7 @@ function makeGlobals(externals: string[]): Record<string, string> {
37
38
  }
38
39
 
39
40
  export default defineConfig({
40
- plugins: [vue()],
41
+ plugins: [tailwindcss(), vue()],
41
42
  build: {
42
43
  lib: {
43
44
  entry: resolve(__dirname, 'src/entry.ts'),