supaslidev 0.4.0 → 0.4.1

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/cli/index.js +178 -175
  2. package/package.json +10 -10
package/dist/cli/index.js CHANGED
@@ -20,7 +20,7 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
20
20
  var __getProtoOf = Object.getPrototypeOf;
21
21
  var __hasOwnProp = Object.prototype.hasOwnProperty;
22
22
  var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
23
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
23
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
24
24
  var __copyProps = (to, from, except, desc) => {
25
25
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
26
26
  key = keys[i];
@@ -1164,17 +1164,19 @@ let it$1 = class extends p {
1164
1164
  return this.options.filter((t) => t.disabled !== !0);
1165
1165
  }
1166
1166
  toggleAll() {
1167
- const t = this._enabledOptions;
1168
- this.value = this.value !== void 0 && this.value.length === t.length ? [] : t.map((s) => s.value);
1167
+ const t = this._enabledOptions, e = this.value !== void 0 && this.value.length === t.length;
1168
+ this.value = e ? [] : t.map((s) => s.value);
1169
1169
  }
1170
1170
  toggleInvert() {
1171
1171
  const t = this.value;
1172
1172
  if (!t) return;
1173
- this.value = this._enabledOptions.filter((s) => !t.includes(s.value)).map((s) => s.value);
1173
+ const e = this._enabledOptions.filter((s) => !t.includes(s.value));
1174
+ this.value = e.map((s) => s.value);
1174
1175
  }
1175
1176
  toggleValue() {
1176
1177
  this.value === void 0 && (this.value = []);
1177
- this.value = this.value.includes(this._value) ? this.value.filter((e) => e !== this._value) : [...this.value, this._value];
1178
+ const t = this.value.includes(this._value);
1179
+ this.value = t ? this.value.filter((e) => e !== this._value) : [...this.value, this._value];
1178
1180
  }
1179
1181
  constructor(t) {
1180
1182
  super(t, !1), this.options = t.options, this.value = [...t.initialValues ?? []];
@@ -1615,7 +1617,7 @@ ${i ? styleText("cyan", E) : ""}
1615
1617
  }
1616
1618
  }).prompt();
1617
1619
  //#endregion
1618
- //#region ../../node_modules/.pnpm/ejs@5.0.1/node_modules/ejs/lib/esm/utils.js
1620
+ //#region ../../node_modules/.pnpm/ejs@5.0.2/node_modules/ejs/lib/esm/utils.js
1619
1621
  /**
1620
1622
  * Private utility functions
1621
1623
  * @module utils
@@ -1627,6 +1629,7 @@ var hasOwnProperty = Object.prototype.hasOwnProperty;
1627
1629
  var hasOwn = function(obj, key) {
1628
1630
  return hasOwnProperty.apply(obj, [key]);
1629
1631
  };
1632
+ utils.hasOwn = hasOwn;
1630
1633
  /**
1631
1634
  * Escape characters reserved in regular expressions.
1632
1635
  *
@@ -1797,7 +1800,7 @@ utils.hasOwnOnlyObject = function(obj) {
1797
1800
  };
1798
1801
  if (typeof exports != "undefined") module.exports = utils;
1799
1802
  //#endregion
1800
- //#region ../../node_modules/.pnpm/ejs@5.0.1/node_modules/ejs/lib/esm/ejs.js
1803
+ //#region ../../node_modules/.pnpm/ejs@5.0.2/node_modules/ejs/lib/esm/ejs.js
1801
1804
  /**
1802
1805
  * @file Embedded JavaScript templating engine. {@link http://ejs.co}
1803
1806
  * @author Matthew Eernisse <mde@fleegix.org>
@@ -2124,7 +2127,7 @@ ejs.renderFile = function() {
2124
2127
  data = args.shift();
2125
2128
  if (args.length) utils.shallowCopy(opts, args.pop());
2126
2129
  else {
2127
- if (data.settings) {
2130
+ if (utils.hasOwn(data, "settings") && data.settings) {
2128
2131
  if (data.settings.views) opts.views = data.settings.views;
2129
2132
  if (data.settings["view cache"]) opts.cache = true;
2130
2133
  viewOpts = data.settings["view options"];
@@ -6387,6 +6390,7 @@ var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
6387
6390
  onError(token, "UNEXPECTED_TOKEN", token.message);
6388
6391
  length += token.source.length;
6389
6392
  break;
6393
+ /* istanbul ignore next should not happen */
6390
6394
  default: {
6391
6395
  onError(token, "UNEXPECTED_TOKEN", `Unexpected token in block scalar header: ${token.type}`);
6392
6396
  const ts = token.source;
@@ -6436,6 +6440,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
6436
6440
  _type = Scalar.Scalar.QUOTE_DOUBLE;
6437
6441
  value = doubleQuotedValue(source, _onError);
6438
6442
  break;
6443
+ /* istanbul ignore next should not happen */
6439
6444
  default:
6440
6445
  onError(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type}`);
6441
6446
  return {
@@ -6465,6 +6470,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
6465
6470
  function plainValue(source, onError) {
6466
6471
  let badChar = "";
6467
6472
  switch (source[0]) {
6473
+ /* istanbul ignore next should not happen */
6468
6474
  case " ":
6469
6475
  badChar = "a tab character";
6470
6476
  break;
@@ -8125,6 +8131,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
8125
8131
  return it.sep ?? it.start;
8126
8132
  }
8127
8133
  case "block-seq": return parent.items[parent.items.length - 1].start;
8134
+ /* istanbul ignore next should not happen */
8128
8135
  default: return [];
8129
8136
  }
8130
8137
  }
@@ -8377,6 +8384,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
8377
8384
  });
8378
8385
  return;
8379
8386
  }
8387
+ /* istanbul ignore next should not happen */
8380
8388
  default:
8381
8389
  yield* this.pop();
8382
8390
  yield* this.pop(token);
@@ -8494,6 +8502,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
8494
8502
  }
8495
8503
  yield* this.pop();
8496
8504
  break;
8505
+ /* istanbul ignore next should not happen */
8497
8506
  default:
8498
8507
  yield* this.pop();
8499
8508
  yield* this.step();
@@ -9080,7 +9089,7 @@ var require_dist$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
9080
9089
  exports.visitAsync = visit.visitAsync;
9081
9090
  }));
9082
9091
  //#endregion
9083
- //#region ../../node_modules/.pnpm/tsdown@0.21.7_oxc-resolver@11.19.1_typescript@6.0.2_vue-tsc@3.2.6_typescript@6.0.2_/node_modules/tsdown/esm-shims.js
9092
+ //#region ../../node_modules/.pnpm/tsdown@0.21.9_oxc-resolver@11.19.1_@emnapi+core@1.9.2_@emnapi+runtime@1.9.2__typescript_92be91b1b9812fa08a94dfb31a50e5d5/node_modules/tsdown/esm-shims.js
9084
9093
  var getFilename, getDirname, __dirname, __filename;
9085
9094
  var init_esm_shims = __esmMin((() => {
9086
9095
  getFilename = () => fileURLToPath(import.meta.url);
@@ -11105,7 +11114,7 @@ var require_buffer_from = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11105
11114
  //#region ../../node_modules/.pnpm/source-map-support@0.5.21/node_modules/source-map-support/source-map-support.js
11106
11115
  var require_source_map_support = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11107
11116
  var SourceMapConsumer = require_source_map().SourceMapConsumer;
11108
- var path$4 = __require("path");
11117
+ var path$3 = __require("path");
11109
11118
  var fs;
11110
11119
  try {
11111
11120
  fs = __require("fs");
@@ -11182,15 +11191,15 @@ var require_source_map_support = /* @__PURE__ */ __commonJSMin(((exports, module
11182
11191
  });
11183
11192
  function supportRelativeURL(file, url) {
11184
11193
  if (!file) return url;
11185
- var dir = path$4.dirname(file);
11194
+ var dir = path$3.dirname(file);
11186
11195
  var match = /^\w+:\/\/[^\/]*/.exec(dir);
11187
11196
  var protocol = match ? match[0] : "";
11188
11197
  var startPath = dir.slice(protocol.length);
11189
11198
  if (protocol && /^\/\w\:/.test(startPath)) {
11190
11199
  protocol += "/";
11191
- return protocol + path$4.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
11200
+ return protocol + path$3.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
11192
11201
  }
11193
- return protocol + path$4.resolve(dir.slice(protocol.length), url);
11202
+ return protocol + path$3.resolve(dir.slice(protocol.length), url);
11194
11203
  }
11195
11204
  function retrieveSourceMapURL(source) {
11196
11205
  var fileData;
@@ -144181,7 +144190,11 @@ ${options.prefix}` : "\n" : options.prefix
144181
144190
  return this.nextNodeAllOnSameLine;
144182
144191
  }
144183
144192
  TokensAreOnSameLine() {
144184
- if (this.tokensAreOnSameLine === void 0) this.tokensAreOnSameLine = this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line === this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;
144193
+ if (this.tokensAreOnSameLine === void 0) {
144194
+ const startLine = this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line;
144195
+ const endLine = this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;
144196
+ this.tokensAreOnSameLine = startLine === endLine;
144197
+ }
144185
144198
  return this.tokensAreOnSameLine;
144186
144199
  }
144187
144200
  ContextNodeBlockIsOnOneLine() {
@@ -155783,7 +155796,7 @@ ${json}${newLine}`;
155783
155796
  this.noGetErrOnBackgroundUpdate = opts.noGetErrOnBackgroundUpdate;
155784
155797
  const { throttleWaitMilliseconds } = opts;
155785
155798
  this.eventHandler = this.canUseEvents ? opts.eventHandler || ((event) => this.defaultEventHandler(event)) : void 0;
155786
- this.errorCheck = new MultistepOperation({
155799
+ const multistepOperationHost = {
155787
155800
  executeWithRequestId: (requestId, action, performanceData) => this.executeWithRequestId(requestId, action, performanceData),
155788
155801
  getCurrentRequestId: () => this.currentRequestId,
155789
155802
  getPerformanceData: () => this.performanceData,
@@ -155791,8 +155804,9 @@ ${json}${newLine}`;
155791
155804
  logError: (err, cmd) => this.logError(err, cmd),
155792
155805
  sendRequestCompletedEvent: (requestId, performanceData) => this.sendRequestCompletedEvent(requestId, performanceData),
155793
155806
  isCancellationRequested: () => this.cancellationToken.isCancellationRequested()
155794
- });
155795
- this.projectService = new ProjectService2({
155807
+ };
155808
+ this.errorCheck = new MultistepOperation(multistepOperationHost);
155809
+ const settings = {
155796
155810
  host: this.host,
155797
155811
  logger: this.logger,
155798
155812
  cancellationToken: this.cancellationToken,
@@ -155810,7 +155824,8 @@ ${json}${newLine}`;
155810
155824
  session: this,
155811
155825
  canUseWatchEvents: opts.canUseWatchEvents,
155812
155826
  incrementalVerifier: opts.incrementalVerifier
155813
- });
155827
+ };
155828
+ this.projectService = new ProjectService2(settings);
155814
155829
  this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this));
155815
155830
  this.gcTimer = new GcTimer(this.host, 7e3, this.logger);
155816
155831
  switch (this.projectService.serverMode) {
@@ -159691,7 +159706,8 @@ var require_commonjs = /* @__PURE__ */ __commonJSMin(((exports) => {
159691
159706
  this.pattern = pattern;
159692
159707
  this.platform = options.platform || defaultPlatform;
159693
159708
  this.isWindows = this.platform === "win32";
159694
- this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options["allowWindowsEscape"] === false;
159709
+ const awe = "allowWindowsEscape";
159710
+ this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === false;
159695
159711
  if (this.windowsPathsNoEscape) this.pattern = this.pattern.replace(/\\/g, "/");
159696
159712
  this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
159697
159713
  this.regexp = null;
@@ -162402,11 +162418,11 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
162402
162418
  value: mod,
162403
162419
  enumerable: true
162404
162420
  }) : target, mod));
162405
- const path$3 = __toESM(__require("path"));
162421
+ const path$4 = __toESM(__require("path"));
162406
162422
  const fs$3 = __toESM(__require("fs"));
162407
162423
  function cleanPath(path$1) {
162408
- let normalized = (0, path$3.normalize)(path$1);
162409
- if (normalized.length > 1 && normalized[normalized.length - 1] === path$3.sep) normalized = normalized.substring(0, normalized.length - 1);
162424
+ let normalized = (0, path$4.normalize)(path$1);
162425
+ if (normalized.length > 1 && normalized[normalized.length - 1] === path$4.sep) normalized = normalized.substring(0, normalized.length - 1);
162410
162426
  return normalized;
162411
162427
  }
162412
162428
  const SLASHES_REGEX = /[\\/]/g;
@@ -162420,7 +162436,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
162420
162436
  function normalizePath(path$1, options) {
162421
162437
  const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
162422
162438
  const pathNeedsCleaning = process.platform === "win32" && path$1.includes("/") || path$1.startsWith(".");
162423
- if (resolvePaths) path$1 = (0, path$3.resolve)(path$1);
162439
+ if (resolvePaths) path$1 = (0, path$4.resolve)(path$1);
162424
162440
  if (normalizePath$1 || pathNeedsCleaning) path$1 = cleanPath(path$1);
162425
162441
  if (path$1 === ".") return "";
162426
162442
  return convertSlashes(path$1[path$1.length - 1] !== pathSeparator ? path$1 + pathSeparator : path$1, pathSeparator);
@@ -162431,7 +162447,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
162431
162447
  function joinPathWithRelativePath(root, options) {
162432
162448
  return function(filename, directoryPath) {
162433
162449
  if (directoryPath.startsWith(root)) return directoryPath.slice(root.length) + filename;
162434
- else return convertSlashes((0, path$3.relative)(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
162450
+ else return convertSlashes((0, path$4.relative)(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
162435
162451
  };
162436
162452
  }
162437
162453
  function joinPath(filename) {
@@ -162540,12 +162556,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
162540
162556
  }
162541
162557
  function isRecursive(path$1, resolved, state) {
162542
162558
  if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
162543
- let parent = (0, path$3.dirname)(path$1);
162559
+ let parent = (0, path$4.dirname)(path$1);
162544
162560
  let depth = 1;
162545
162561
  while (parent !== state.root && depth < 2) {
162546
162562
  const resolvedPath = state.symlinks.get(parent);
162547
162563
  if (!!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath))) depth++;
162548
- else parent = (0, path$3.dirname)(parent);
162564
+ else parent = (0, path$4.dirname)(parent);
162549
162565
  }
162550
162566
  state.symlinks.set(path$1, resolved);
162551
162567
  return depth > 1;
@@ -162741,8 +162757,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
162741
162757
  this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$1 + pathSeparator, depth - 1, this.walk);
162742
162758
  } else {
162743
162759
  resolvedPath = useRealPaths ? resolvedPath : path$1;
162744
- const filename = (0, path$3.basename)(resolvedPath);
162745
- const directoryPath$1 = normalizePath((0, path$3.dirname)(resolvedPath), this.state.options);
162760
+ const filename = (0, path$4.basename)(resolvedPath);
162761
+ const directoryPath$1 = normalizePath((0, path$4.dirname)(resolvedPath), this.state.options);
162746
162762
  resolvedPath = this.joinPath(filename, directoryPath$1);
162747
162763
  this.pushFile(resolvedPath, files, this.state.counts, filters);
162748
162764
  }
@@ -162792,7 +162808,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
162792
162808
  options = {
162793
162809
  maxDepth: Infinity,
162794
162810
  suppressErrors: true,
162795
- pathSeparator: path$3.sep,
162811
+ pathSeparator: path$4.sep,
162796
162812
  filters: []
162797
162813
  };
162798
162814
  globFunction;
@@ -162912,8 +162928,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
162912
162928
  exports.fdir = Builder;
162913
162929
  }));
162914
162930
  //#endregion
162915
- //#region ../../node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.cjs
162931
+ //#region ../../node_modules/.pnpm/tinyglobby@0.2.16/node_modules/tinyglobby/dist/index.cjs
162916
162932
  var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
162933
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
162917
162934
  var __create = Object.create;
162918
162935
  var __defProp = Object.defineProperty;
162919
162936
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -162935,45 +162952,42 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
162935
162952
  enumerable: true
162936
162953
  }) : target, mod));
162937
162954
  let fs$2 = __require("fs");
162938
- fs$2 = __toESM(fs$2);
162939
- let path$1 = __require("path");
162940
- path$1 = __toESM(path$1);
162955
+ let path$6 = __require("path");
162941
162956
  let url = __require("url");
162942
- url = __toESM(url);
162943
162957
  let fdir = require_dist$1();
162944
- fdir = __toESM(fdir);
162945
162958
  let picomatch = require_picomatch();
162946
162959
  picomatch = __toESM(picomatch);
162947
162960
  const isReadonlyArray = Array.isArray;
162961
+ const BACKSLASHES = /\\/g;
162948
162962
  const isWin = process.platform === "win32";
162949
162963
  const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
162950
162964
  function getPartialMatcher(patterns, options = {}) {
162951
162965
  const patternsCount = patterns.length;
162952
162966
  const patternsParts = Array(patternsCount);
162953
162967
  const matchers = Array(patternsCount);
162954
- const globstarEnabled = !options.noglobstar;
162955
- for (let i = 0; i < patternsCount; i++) {
162968
+ let i, j;
162969
+ for (i = 0; i < patternsCount; i++) {
162956
162970
  const parts = splitPattern(patterns[i]);
162957
162971
  patternsParts[i] = parts;
162958
162972
  const partsCount = parts.length;
162959
162973
  const partMatchers = Array(partsCount);
162960
- for (let j = 0; j < partsCount; j++) partMatchers[j] = (0, picomatch.default)(parts[j], options);
162974
+ for (j = 0; j < partsCount; j++) partMatchers[j] = (0, picomatch.default)(parts[j], options);
162961
162975
  matchers[i] = partMatchers;
162962
162976
  }
162963
162977
  return (input) => {
162964
162978
  const inputParts = input.split("/");
162965
162979
  if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
162966
- for (let i = 0; i < patterns.length; i++) {
162980
+ for (i = 0; i < patternsCount; i++) {
162967
162981
  const patternParts = patternsParts[i];
162968
162982
  const matcher = matchers[i];
162969
162983
  const inputPatternCount = inputParts.length;
162970
162984
  const minParts = Math.min(inputPatternCount, patternParts.length);
162971
- let j = 0;
162985
+ j = 0;
162972
162986
  while (j < minParts) {
162973
162987
  const part = patternParts[j];
162974
162988
  if (part.includes("/")) return true;
162975
162989
  if (!matcher[j](inputParts[j])) break;
162976
- if (globstarEnabled && part === "**") return true;
162990
+ if (!options.noglobstar && part === "**") return true;
162977
162991
  j++;
162978
162992
  }
162979
162993
  if (j === inputPatternCount) return true;
@@ -162987,7 +163001,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
162987
163001
  function buildFormat(cwd, root, absolute) {
162988
163002
  if (cwd === root || root.startsWith(`${cwd}/`)) {
162989
163003
  if (absolute) {
162990
- const start = isRoot(cwd) ? cwd.length : cwd.length + 1;
163004
+ const start = cwd.length + +!isRoot(cwd);
162991
163005
  return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
162992
163006
  }
162993
163007
  const prefix = root.slice(cwd.length + 1);
@@ -162998,8 +163012,8 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
162998
163012
  };
162999
163013
  return (p, isDir) => isDir && p !== "." ? p.slice(0, -1) : p;
163000
163014
  }
163001
- if (absolute) return (p) => path$1.posix.relative(cwd, p) || ".";
163002
- return (p) => path$1.posix.relative(cwd, `${root}/${p}`) || ".";
163015
+ if (absolute) return (p) => path$6.posix.relative(cwd, p) || ".";
163016
+ return (p) => path$6.posix.relative(cwd, `${root}/${p}`) || ".";
163003
163017
  }
163004
163018
  function buildRelative(cwd, root) {
163005
163019
  if (root.startsWith(`${cwd}/`)) {
@@ -163007,23 +163021,22 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
163007
163021
  return (p) => `${prefix}/${p}`;
163008
163022
  }
163009
163023
  return (p) => {
163010
- const result = path$1.posix.relative(cwd, `${root}/${p}`);
163011
- if (p.endsWith("/") && result !== "") return `${result}/`;
163012
- return result || ".";
163024
+ const result = path$6.posix.relative(cwd, `${root}/${p}`);
163025
+ return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
163013
163026
  };
163014
163027
  }
163015
163028
  const splitPatternOptions = { parts: true };
163016
- function splitPattern(path$2) {
163029
+ function splitPattern(path$1) {
163017
163030
  var _result$parts;
163018
- const result = picomatch.default.scan(path$2, splitPatternOptions);
163019
- return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$2];
163031
+ const result = picomatch.default.scan(path$1, splitPatternOptions);
163032
+ return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1];
163020
163033
  }
163021
163034
  const ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g;
163022
163035
  function convertPosixPathToPattern(path$2) {
163023
163036
  return escapePosixPath(path$2);
163024
163037
  }
163025
- function convertWin32PathToPattern(path$2) {
163026
- return escapeWin32Path(path$2).replace(ESCAPED_WIN32_BACKSLASHES, "/");
163038
+ function convertWin32PathToPattern(path$3) {
163039
+ return escapeWin32Path(path$3).replace(ESCAPED_WIN32_BACKSLASHES, "/");
163027
163040
  }
163028
163041
  /**
163029
163042
  * Converts a path to a pattern depending on the platform.
@@ -163034,8 +163047,8 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
163034
163047
  const convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern;
163035
163048
  const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
163036
163049
  const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
163037
- const escapePosixPath = (path$2) => path$2.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
163038
- const escapeWin32Path = (path$2) => path$2.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
163050
+ const escapePosixPath = (path$4) => path$4.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
163051
+ const escapeWin32Path = (path$5) => path$5.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
163039
163052
  /**
163040
163053
  * Escapes a path's special characters depending on the platform.
163041
163054
  * @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
@@ -163062,28 +163075,31 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
163062
163075
  function log(...tasks) {
163063
163076
  console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
163064
163077
  }
163078
+ function ensureStringArray(value) {
163079
+ return typeof value === "string" ? [value] : value !== null && value !== void 0 ? value : [];
163080
+ }
163065
163081
  const PARENT_DIRECTORY = /^(\/?\.\.)+/;
163066
163082
  const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
163067
- const BACKSLASHES = /\\/g;
163068
- function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
163083
+ function normalizePattern(pattern, opts, props, isIgnore) {
163084
+ var _PARENT_DIRECTORY$exe;
163085
+ const cwd = opts.cwd;
163069
163086
  let result = pattern;
163070
- if (pattern.endsWith("/")) result = pattern.slice(0, -1);
163071
- if (!result.endsWith("*") && expandDirectories) result += "/**";
163087
+ if (pattern[pattern.length - 1] === "/") result = pattern.slice(0, -1);
163088
+ if (result[result.length - 1] !== "*" && opts.expandDirectories) result += "/**";
163072
163089
  const escapedCwd = escapePath(cwd);
163073
- if (path$1.default.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = path$1.posix.relative(escapedCwd, result);
163074
- else result = path$1.posix.normalize(result);
163075
- const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
163090
+ result = (0, path$6.isAbsolute)(result.replace(ESCAPING_BACKSLASHES, "")) ? path$6.posix.relative(escapedCwd, result) : path$6.posix.normalize(result);
163091
+ const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];
163076
163092
  const parts = splitPattern(result);
163077
- if (parentDirectoryMatch === null || parentDirectoryMatch === void 0 ? void 0 : parentDirectoryMatch[0]) {
163078
- const n = (parentDirectoryMatch[0].length + 1) / 3;
163093
+ if (parentDir) {
163094
+ const n = (parentDir.length + 1) / 3;
163079
163095
  let i = 0;
163080
163096
  const cwdParts = escapedCwd.split("/");
163081
163097
  while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
163082
163098
  result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
163083
163099
  i++;
163084
163100
  }
163085
- const potentialRoot = path$1.posix.join(cwd, parentDirectoryMatch[0].slice(i * 3));
163086
- if (!potentialRoot.startsWith(".") && props.root.length > potentialRoot.length) {
163101
+ const potentialRoot = path$6.posix.join(cwd, parentDir.slice(i * 3));
163102
+ if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
163087
163103
  props.root = potentialRoot;
163088
163104
  props.depthOffset = -n + i;
163089
163105
  }
@@ -163099,152 +163115,139 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
163099
163115
  newCommonPath.pop();
163100
163116
  break;
163101
163117
  }
163102
- if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) break;
163118
+ if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
163103
163119
  newCommonPath.push(part);
163104
163120
  }
163105
163121
  props.depthOffset = newCommonPath.length;
163106
163122
  props.commonPath = newCommonPath;
163107
- props.root = newCommonPath.length > 0 ? path$1.posix.join(cwd, ...newCommonPath) : cwd;
163123
+ props.root = newCommonPath.length > 0 ? path$6.posix.join(cwd, ...newCommonPath) : cwd;
163108
163124
  }
163109
163125
  return result;
163110
163126
  }
163111
- function processPatterns({ patterns = ["**/*"], ignore = [], expandDirectories = true }, cwd, props) {
163112
- if (typeof patterns === "string") patterns = [patterns];
163113
- if (typeof ignore === "string") ignore = [ignore];
163127
+ function processPatterns(options, patterns, props) {
163114
163128
  const matchPatterns = [];
163115
163129
  const ignorePatterns = [];
163116
- for (const pattern of ignore) {
163130
+ for (const pattern of options.ignore) {
163117
163131
  if (!pattern) continue;
163118
- if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, true));
163132
+ if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, options, props, true));
163119
163133
  }
163120
163134
  for (const pattern of patterns) {
163121
163135
  if (!pattern) continue;
163122
- if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, false));
163123
- else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, true));
163136
+ if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, options, props, false));
163137
+ else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
163124
163138
  }
163125
163139
  return {
163126
163140
  match: matchPatterns,
163127
163141
  ignore: ignorePatterns
163128
163142
  };
163129
163143
  }
163130
- function formatPaths(paths, relative) {
163131
- for (let i = paths.length - 1; i >= 0; i--) {
163132
- const path$2 = paths[i];
163133
- paths[i] = relative(path$2);
163134
- }
163135
- return paths;
163136
- }
163137
- function normalizeCwd(cwd) {
163138
- if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
163139
- if (cwd instanceof URL) return (0, url.fileURLToPath)(cwd).replace(BACKSLASHES, "/");
163140
- return path$1.default.resolve(cwd).replace(BACKSLASHES, "/");
163141
- }
163142
- function getCrawler(patterns, inputOptions = {}) {
163143
- const options = process.env.TINYGLOBBY_DEBUG ? {
163144
- ...inputOptions,
163145
- debug: true
163146
- } : inputOptions;
163147
- const cwd = normalizeCwd(options.cwd);
163148
- if (options.debug) log("globbing with:", {
163149
- patterns,
163150
- options,
163151
- cwd
163152
- });
163153
- if (Array.isArray(patterns) && patterns.length === 0) return [{
163154
- sync: () => [],
163155
- withPromise: async () => []
163156
- }, false];
163144
+ function buildCrawler(options, patterns) {
163145
+ const cwd = options.cwd;
163157
163146
  const props = {
163158
163147
  root: cwd,
163159
- commonPath: null,
163160
163148
  depthOffset: 0
163161
163149
  };
163162
- const processed = processPatterns({
163163
- ...options,
163164
- patterns
163165
- }, cwd, props);
163150
+ const processed = processPatterns(options, patterns, props);
163166
163151
  if (options.debug) log("internal processing patterns:", processed);
163152
+ const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
163153
+ const root = props.root.replace(BACKSLASHES, "");
163167
163154
  const matchOptions = {
163168
- dot: options.dot,
163155
+ dot,
163169
163156
  nobrace: options.braceExpansion === false,
163170
- nocase: options.caseSensitiveMatch === false,
163157
+ nocase: !caseSensitiveMatch,
163171
163158
  noextglob: options.extglob === false,
163172
163159
  noglobstar: options.globstar === false,
163173
163160
  posix: true
163174
163161
  };
163175
- const matcher = (0, picomatch.default)(processed.match, {
163176
- ...matchOptions,
163177
- ignore: processed.ignore
163178
- });
163162
+ const matcher = (0, picomatch.default)(processed.match, matchOptions);
163179
163163
  const ignore = (0, picomatch.default)(processed.ignore, matchOptions);
163180
163164
  const partialMatcher = getPartialMatcher(processed.match, matchOptions);
163181
- const format = buildFormat(cwd, props.root, options.absolute);
163182
- const formatExclude = options.absolute ? format : buildFormat(cwd, props.root, true);
163183
- const fdirOptions = {
163184
- filters: [options.debug ? (p, isDirectory) => {
163185
- const path$2 = format(p, isDirectory);
163186
- const matches = matcher(path$2);
163187
- if (matches) log(`matched ${path$2}`);
163165
+ const format = buildFormat(cwd, root, absolute);
163166
+ const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
163167
+ const excludePredicate = (_, p) => {
163168
+ const relativePath = excludeFormatter(p, true);
163169
+ return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
163170
+ };
163171
+ let maxDepth;
163172
+ if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
163173
+ const crawler = new fdir.fdir({
163174
+ filters: [debug ? (p, isDirectory) => {
163175
+ const path = format(p, isDirectory);
163176
+ const matches = matcher(path) && !ignore(path);
163177
+ if (matches) log(`matched ${path}`);
163188
163178
  return matches;
163189
- } : (p, isDirectory) => matcher(format(p, isDirectory))],
163190
- exclude: options.debug ? (_, p) => {
163191
- const relativePath = formatExclude(p, true);
163192
- const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
163193
- if (skipped) log(`skipped ${p}`);
163194
- else log(`crawling ${p}`);
163179
+ } : (p, isDirectory) => {
163180
+ const path = format(p, isDirectory);
163181
+ return matcher(path) && !ignore(path);
163182
+ }],
163183
+ exclude: debug ? (_, p) => {
163184
+ const skipped = excludePredicate(_, p);
163185
+ log(`${skipped ? "skipped" : "crawling"} ${p}`);
163195
163186
  return skipped;
163196
- } : (_, p) => {
163197
- const relativePath = formatExclude(p, true);
163198
- return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
163199
- },
163200
- fs: options.fs ? {
163201
- readdir: options.fs.readdir || fs$2.default.readdir,
163202
- readdirSync: options.fs.readdirSync || fs$2.default.readdirSync,
163203
- realpath: options.fs.realpath || fs$2.default.realpath,
163204
- realpathSync: options.fs.realpathSync || fs$2.default.realpathSync,
163205
- stat: options.fs.stat || fs$2.default.stat,
163206
- statSync: options.fs.statSync || fs$2.default.statSync
163207
- } : void 0,
163187
+ } : excludePredicate,
163188
+ fs: options.fs,
163208
163189
  pathSeparator: "/",
163209
- relativePaths: true,
163210
- resolveSymlinks: true,
163190
+ relativePaths: !absolute,
163191
+ resolvePaths: absolute,
163192
+ includeBasePath: absolute,
163193
+ resolveSymlinks: followSymbolicLinks,
163194
+ excludeSymlinks: !followSymbolicLinks,
163195
+ excludeFiles: onlyDirectories,
163196
+ includeDirs: onlyDirectories || !options.onlyFiles,
163197
+ maxDepth,
163211
163198
  signal: options.signal
163199
+ }).crawl(root);
163200
+ if (options.debug) log("internal properties:", {
163201
+ ...props,
163202
+ root
163203
+ });
163204
+ return [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];
163205
+ }
163206
+ function formatPaths(paths, mapper) {
163207
+ if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
163208
+ return paths;
163209
+ }
163210
+ const defaultOptions = {
163211
+ caseSensitiveMatch: true,
163212
+ cwd: process.cwd(),
163213
+ debug: !!process.env.TINYGLOBBY_DEBUG,
163214
+ expandDirectories: true,
163215
+ followSymbolicLinks: true,
163216
+ onlyFiles: true
163217
+ };
163218
+ function getOptions(options) {
163219
+ const opts = {
163220
+ ...defaultOptions,
163221
+ ...options
163212
163222
  };
163213
- if (options.deep !== void 0) fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset);
163214
- if (options.absolute) {
163215
- fdirOptions.relativePaths = false;
163216
- fdirOptions.resolvePaths = true;
163217
- fdirOptions.includeBasePath = true;
163218
- }
163219
- if (options.followSymbolicLinks === false) {
163220
- fdirOptions.resolveSymlinks = false;
163221
- fdirOptions.excludeSymlinks = true;
163222
- }
163223
- if (options.onlyDirectories) {
163224
- fdirOptions.excludeFiles = true;
163225
- fdirOptions.includeDirs = true;
163226
- } else if (options.onlyFiles === false) fdirOptions.includeDirs = true;
163227
- props.root = props.root.replace(BACKSLASHES, "");
163228
- const root = props.root;
163229
- if (options.debug) log("internal properties:", props);
163230
- const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root);
163231
- return [new fdir.fdir(fdirOptions).crawl(root), relative];
163232
- }
163233
- async function glob(patternsOrOptions, options) {
163234
- if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
163235
- const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string";
163236
- const opts = isModern ? options : patternsOrOptions;
163237
- const [crawler, relative] = getCrawler(isModern ? patternsOrOptions : patternsOrOptions.patterns, opts);
163238
- if (!relative) return crawler.withPromise();
163239
- return formatPaths(await crawler.withPromise(), relative);
163240
- }
163241
- function globSync(patternsOrOptions, options) {
163242
- if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
163243
- const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string";
163244
- const opts = isModern ? options : patternsOrOptions;
163245
- const [crawler, relative] = getCrawler(isModern ? patternsOrOptions : patternsOrOptions.patterns, opts);
163246
- if (!relative) return crawler.sync();
163247
- return formatPaths(crawler.sync(), relative);
163223
+ opts.cwd = (opts.cwd instanceof URL ? (0, url.fileURLToPath)(opts.cwd) : (0, path$6.resolve)(opts.cwd)).replace(BACKSLASHES, "/");
163224
+ opts.ignore = ensureStringArray(opts.ignore);
163225
+ opts.fs && (opts.fs = {
163226
+ readdir: opts.fs.readdir || fs$2.readdir,
163227
+ readdirSync: opts.fs.readdirSync || fs$2.readdirSync,
163228
+ realpath: opts.fs.realpath || fs$2.realpath,
163229
+ realpathSync: opts.fs.realpathSync || fs$2.realpathSync,
163230
+ stat: opts.fs.stat || fs$2.stat,
163231
+ statSync: opts.fs.statSync || fs$2.statSync
163232
+ });
163233
+ if (opts.debug) log("globbing with options:", opts);
163234
+ return opts;
163235
+ }
163236
+ function getCrawler(globInput, inputOptions = {}) {
163237
+ var _ref;
163238
+ if (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
163239
+ const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
163240
+ const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : "**/*");
163241
+ const options = getOptions(isModern ? inputOptions : globInput);
163242
+ return patterns.length > 0 ? buildCrawler(options, patterns) : [];
163243
+ }
163244
+ async function glob(globInput, options) {
163245
+ const [crawler, relative] = getCrawler(globInput, options);
163246
+ return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
163247
+ }
163248
+ function globSync(globInput, options) {
163249
+ const [crawler, relative] = getCrawler(globInput, options);
163250
+ return crawler ? formatPaths(crawler.sync(), relative) : [];
163248
163251
  }
163249
163252
  exports.convertPathToPattern = convertPathToPattern;
163250
163253
  exports.escapePath = escapePath;
@@ -186673,7 +186676,7 @@ var require_ts_morph = /* @__PURE__ */ __commonJSMin(((exports) => {
186673
186676
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
186674
186677
  require_dist$2();
186675
186678
  require_ts_morph();
186676
- const CLI_VERSION = "0.4.0";
186679
+ const CLI_VERSION = "0.4.1";
186677
186680
  const PACKAGE_NAME = "@supaslidev/cli";
186678
186681
  const CACHE_DIR = join(tmpdir(), "supaslidev-cli");
186679
186682
  const CACHE_FILE = join(CACHE_DIR, "version-cache.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supaslidev",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "CLI toolkit for managing Supaslidev presentations",
5
5
  "keywords": [
6
6
  "slidev",
@@ -47,25 +47,25 @@
47
47
  "access": "public"
48
48
  },
49
49
  "dependencies": {
50
- "@nuxt/ui": "^4.6.0",
50
+ "@nuxt/ui": "^4.6.1",
51
51
  "commander": "^14.0.3",
52
52
  "js-yaml": "^4.1.1",
53
53
  "nuxt": "^4.4.2",
54
54
  "sharp": "^0.34.5",
55
- "tailwindcss": "^4.2.2",
56
- "vue": "^3.5.31"
55
+ "tailwindcss": "^4.2.4",
56
+ "vue": "^3.5.33"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@nuxt/kit": "^4.4.2",
60
60
  "@nuxt/schema": "^4.4.2",
61
61
  "@types/js-yaml": "^4.0.9",
62
- "@types/node": "^24.12.0",
63
- "tsdown": "^0.21.7",
62
+ "@types/node": "^24.12.2",
63
+ "tsdown": "^0.21.9",
64
64
  "tsx": "^4.21.0",
65
- "typescript": "^6.0.0",
66
- "vitest": "^4.1.2",
67
- "vue-tsc": "^3.2.6",
68
- "create-supaslidev": "^0.4.0"
65
+ "typescript": "^6.0.3",
66
+ "vitest": "^4.1.5",
67
+ "vue-tsc": "^3.2.7",
68
+ "create-supaslidev": "^0.4.1"
69
69
  },
70
70
  "scripts": {
71
71
  "dev": "nuxt dev",