@nuasite/cli 0.64.3 → 0.65.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.
package/dist/index.js CHANGED
@@ -26203,11 +26203,11 @@ var init_route_scan = __esm(() => {
26203
26203
  // ../cms-core/src/portable.ts
26204
26204
  var init_portable = __esm(() => {
26205
26205
  init_astro_source_analysis();
26206
- init_check();
26207
26206
  init_check_entries();
26208
26207
  init_check_live();
26209
26208
  init_check_shape();
26210
26209
  init_check_write();
26210
+ init_check();
26211
26211
  init_collection_scanner();
26212
26212
  init_component_registry();
26213
26213
  init_content_config_ast();
@@ -44283,12 +44283,31 @@ var init_rehype = __esm(() => {
44283
44283
  // ../cms/src/mode.ts
44284
44284
  var init_mode = () => {};
44285
44285
 
44286
+ // ../cms/src/package-root.ts
44287
+ import { existsSync as existsSync6 } from "fs";
44288
+ import { dirname, join as join4 } from "path";
44289
+ import { fileURLToPath } from "url";
44290
+ function packageRoot(moduleUrl) {
44291
+ let dir = dirname(fileURLToPath(moduleUrl));
44292
+ while (!existsSync6(join4(dir, "package.json"))) {
44293
+ const parent = dirname(dir);
44294
+ if (parent === dir)
44295
+ throw new Error(`No package.json above ${fileURLToPath(moduleUrl)}`);
44296
+ dir = parent;
44297
+ }
44298
+ return dir;
44299
+ }
44300
+ var init_package_root = () => {};
44301
+
44286
44302
  // ../cms/src/redirects.ts
44287
44303
  var init_redirects2 = __esm(() => {
44288
44304
  init_src2();
44289
44305
  init_utils2();
44290
44306
  });
44291
44307
 
44308
+ // ../cms/src/vite-plugin-inline-nuasite.ts
44309
+ var init_vite_plugin_inline_nuasite = () => {};
44310
+
44292
44311
  // ../cms/src/vite-plugin-array-transform.ts
44293
44312
  var init_vite_plugin_array_transform = __esm(() => {
44294
44313
  init_array_ops();
@@ -44303,9 +44322,6 @@ var init_vite_plugin = __esm(() => {
44303
44322
  init_vite_plugin_array_transform();
44304
44323
  });
44305
44324
 
44306
- // ../cms/src/vite-plugin-inline-nuasite.ts
44307
- var init_vite_plugin_inline_nuasite = () => {};
44308
-
44309
44325
  // ../../node_modules/ccount/index.js
44310
44326
  function ccount(value2, character) {
44311
44327
  const source = String(value2);
@@ -49030,7 +49046,7 @@ var require_memoize = __commonJS((exports, module) => {
49030
49046
  // ../../node_modules/enhanced-resolve/lib/CachedInputFileSystem.js
49031
49047
  var require_CachedInputFileSystem = __commonJS((exports, module) => {
49032
49048
  var { nextTick } = __require("process");
49033
- var dirname = (path30) => {
49049
+ var dirname2 = (path30) => {
49034
49050
  let idx = path30.length - 1;
49035
49051
  while (idx >= 0) {
49036
49052
  const char = path30.charCodeAt(idx);
@@ -49234,12 +49250,12 @@ var require_CachedInputFileSystem = __commonJS((exports, module) => {
49234
49250
  this.purge();
49235
49251
  } else if (typeof what === "string" || Buffer.isBuffer(what) || what instanceof URL || typeof what === "number") {
49236
49252
  const strWhat = typeof what !== "string" ? what.toString() : what;
49237
- this.purge(dirname(strWhat));
49253
+ this.purge(dirname2(strWhat));
49238
49254
  } else {
49239
49255
  const set = new Set;
49240
49256
  for (const item of what) {
49241
49257
  const strItem = typeof item !== "string" ? item.toString() : item;
49242
- set.add(dirname(strItem));
49258
+ set.add(dirname2(strItem));
49243
49259
  }
49244
49260
  this.purge(set);
49245
49261
  }
@@ -50489,7 +50505,7 @@ var require_path = __commonJS((exports, module) => {
50489
50505
  }
50490
50506
  return posixNormalize(maybePath);
50491
50507
  };
50492
- var join4 = (rootPath, request) => {
50508
+ var join5 = (rootPath, request) => {
50493
50509
  if (!request)
50494
50510
  return normalize(rootPath);
50495
50511
  const requestType = getType(request);
@@ -50517,7 +50533,7 @@ var require_path = __commonJS((exports, module) => {
50517
50533
  }
50518
50534
  return posixNormalize(rootPath);
50519
50535
  };
50520
- var dirname = (maybePath) => {
50536
+ var dirname2 = (maybePath) => {
50521
50537
  switch (getType(maybePath)) {
50522
50538
  case PathType.AbsoluteWin:
50523
50539
  return path30.win32.dirname(maybePath);
@@ -50535,7 +50551,7 @@ var require_path = __commonJS((exports, module) => {
50535
50551
  if (cacheEntry !== undefined)
50536
50552
  return cacheEntry;
50537
50553
  }
50538
- cacheEntry = join4(rootPath, request);
50554
+ cacheEntry = join5(rootPath, request);
50539
50555
  cache.set(request, cacheEntry);
50540
50556
  return cacheEntry;
50541
50557
  };
@@ -50544,7 +50560,7 @@ var require_path = __commonJS((exports, module) => {
50544
50560
  const cacheEntry = dirnameCache.get(maybePath);
50545
50561
  if (cacheEntry !== undefined)
50546
50562
  return cacheEntry;
50547
- const result = dirname(maybePath);
50563
+ const result = dirname2(maybePath);
50548
50564
  dirnameCache.set(maybePath, result);
50549
50565
  return result;
50550
50566
  };
@@ -50556,11 +50572,11 @@ var require_path = __commonJS((exports, module) => {
50556
50572
  exports.cachedDirname = cachedDirname;
50557
50573
  exports.cachedJoin = cachedJoin;
50558
50574
  exports.deprecatedInvalidSegmentRegEx = deprecatedInvalidSegmentRegEx;
50559
- exports.dirname = dirname;
50575
+ exports.dirname = dirname2;
50560
50576
  exports.getType = getType;
50561
50577
  exports.invalidSegmentRegEx = invalidSegmentRegEx;
50562
50578
  exports.isSubPath = isSubPath;
50563
- exports.join = join4;
50579
+ exports.join = join5;
50564
50580
  exports.normalize = normalize;
50565
50581
  });
50566
50582
 
@@ -52992,7 +53008,7 @@ var require_Resolver = __commonJS((exports, module) => {
52992
53008
  var { parseIdentifier } = require_identifier();
52993
53009
  var {
52994
53010
  PathType,
52995
- cachedJoin: join4,
53011
+ cachedJoin: join5,
52996
53012
  getType,
52997
53013
  normalize
52998
53014
  } = require_path();
@@ -53247,7 +53263,7 @@ Stack:
53247
53263
  return path30.endsWith("/");
53248
53264
  }
53249
53265
  join(path30, request) {
53250
- return join4(path30, request);
53266
+ return join5(path30, request);
53251
53267
  }
53252
53268
  normalize(path30) {
53253
53269
  return normalize(path30);
@@ -53694,8 +53710,8 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53694
53710
  var { readJson } = require_fs();
53695
53711
  var {
53696
53712
  PathType: _PathType,
53697
- cachedDirname: dirname,
53698
- cachedJoin: join4,
53713
+ cachedDirname: dirname2,
53714
+ cachedJoin: join5,
53699
53715
  isSubPath,
53700
53716
  normalize
53701
53717
  } = require_path();
@@ -53726,7 +53742,7 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53726
53742
  return pathValue.replace(/\$\{configDir\}/g, configDir);
53727
53743
  }
53728
53744
  function tsconfigPathsToResolveOptions(configDir, paths, baseUrl) {
53729
- const absoluteBaseUrl = !baseUrl ? configDir : join4(configDir, baseUrl);
53745
+ const absoluteBaseUrl = !baseUrl ? configDir : join5(configDir, baseUrl);
53730
53746
  const sortedKeys = sortByLongestPrefix(Object.keys(paths));
53731
53747
  const alias = [];
53732
53748
  const modules = [];
@@ -53734,7 +53750,7 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53734
53750
  const mappings = paths[pattern];
53735
53751
  const absolutePaths = mappings.map((mapping) => {
53736
53752
  const substituted = substituteConfigDir(mapping, configDir);
53737
- return join4(absoluteBaseUrl, substituted);
53753
+ return join5(absoluteBaseUrl, substituted);
53738
53754
  });
53739
53755
  if (absolutePaths.length > 0) {
53740
53756
  if (pattern === "*") {
@@ -53758,7 +53774,7 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53758
53774
  };
53759
53775
  }
53760
53776
  function getAbsoluteBaseUrl(context2, baseUrl) {
53761
- return !baseUrl ? context2 : join4(context2, baseUrl);
53777
+ return !baseUrl ? context2 : join5(context2, baseUrl);
53762
53778
  }
53763
53779
  module.exports = class TsconfigPathsPlugin {
53764
53780
  constructor(configFileOrOptions) {
@@ -53813,7 +53829,7 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53813
53829
  async _getTsconfigPathsMap(resolver2, request, resolveContext) {
53814
53830
  if (typeof request.tsconfigPathsMap === "undefined") {
53815
53831
  try {
53816
- const absTsconfigPath = join4(request.path || process.cwd(), this.configFile);
53832
+ const absTsconfigPath = join5(request.path || process.cwd(), this.configFile);
53817
53833
  const result = await this._loadTsconfigPathsMap(resolver2.fileSystem, absTsconfigPath);
53818
53834
  request.tsconfigPathsMap = result;
53819
53835
  } catch (err) {
@@ -53835,7 +53851,7 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53835
53851
  const fileDependencies = new Set;
53836
53852
  const config = await this._loadTsconfig(fileSystem, absTsconfigPath, fileDependencies);
53837
53853
  const compilerOptions = config.compilerOptions || {};
53838
- const mainContext = dirname(absTsconfigPath);
53854
+ const mainContext = dirname2(absTsconfigPath);
53839
53855
  const baseUrl = this.baseUrl !== undefined ? this.baseUrl : compilerOptions.baseUrl;
53840
53856
  const main = tsconfigPathsToResolveOptions(mainContext, compilerOptions.paths || {}, baseUrl);
53841
53857
  const refs = {};
@@ -53876,24 +53892,24 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53876
53892
  return null;
53877
53893
  }
53878
53894
  async _loadTsconfigFromExtends(fileSystem, configFilePath, extendedConfigValue, fileDependencies, visitedConfigPaths) {
53879
- const currentDir = dirname(configFilePath);
53895
+ const currentDir = dirname2(configFilePath);
53880
53896
  extendedConfigValue = substituteConfigDir(extendedConfigValue, currentDir);
53881
53897
  if (typeof extendedConfigValue === "string" && !extendedConfigValue.includes(".json")) {
53882
53898
  extendedConfigValue += ".json";
53883
53899
  }
53884
- let extendedConfigPath = join4(currentDir, extendedConfigValue);
53900
+ let extendedConfigPath = join5(currentDir, extendedConfigValue);
53885
53901
  const exists = await new Promise((resolve2) => {
53886
53902
  fileSystem.readFile(extendedConfigPath, (err) => {
53887
53903
  resolve2(!err);
53888
53904
  });
53889
53905
  });
53890
53906
  if (!exists && extendedConfigValue.includes("/")) {
53891
- extendedConfigPath = join4(currentDir, normalize(`node_modules/${extendedConfigValue}`));
53907
+ extendedConfigPath = join5(currentDir, normalize(`node_modules/${extendedConfigValue}`));
53892
53908
  }
53893
53909
  const config = await this._loadTsconfig(fileSystem, extendedConfigPath, fileDependencies, visitedConfigPaths);
53894
53910
  const compilerOptions = config.compilerOptions || { baseUrl: undefined };
53895
53911
  if (compilerOptions.baseUrl) {
53896
- const extendsDir = dirname(extendedConfigValue);
53912
+ const extendsDir = dirname2(extendedConfigValue);
53897
53913
  compilerOptions.baseUrl = getAbsoluteBaseUrl(extendsDir, compilerOptions.baseUrl);
53898
53914
  }
53899
53915
  delete config.references;
@@ -53902,15 +53918,15 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53902
53918
  async _loadTsconfigReferences(fileSystem, context2, references, fileDependencies, referenceMatchMap) {
53903
53919
  for (const ref of references) {
53904
53920
  const refPath = substituteConfigDir(ref.path, context2);
53905
- const refConfigPath = join4(join4(context2, refPath), DEFAULT_CONFIG_FILE);
53921
+ const refConfigPath = join5(join5(context2, refPath), DEFAULT_CONFIG_FILE);
53906
53922
  try {
53907
53923
  const refConfig = await this._loadTsconfig(fileSystem, refConfigPath, fileDependencies);
53908
53924
  if (refConfig.compilerOptions && refConfig.compilerOptions.paths) {
53909
- const refContext = dirname(refConfigPath);
53925
+ const refContext = dirname2(refConfigPath);
53910
53926
  referenceMatchMap[refContext] = tsconfigPathsToResolveOptions(refContext, refConfig.compilerOptions.paths || {}, refConfig.compilerOptions.baseUrl);
53911
53927
  }
53912
53928
  if (this.references === "auto" && Array.isArray(refConfig.references)) {
53913
- await this._loadTsconfigReferences(fileSystem, dirname(refConfigPath), refConfig.references, fileDependencies, referenceMatchMap);
53929
+ await this._loadTsconfigReferences(fileSystem, dirname2(refConfigPath), refConfig.references, fileDependencies, referenceMatchMap);
53914
53930
  }
53915
53931
  } catch (_err) {
53916
53932
  continue;
@@ -57444,11 +57460,11 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
57444
57460
  return e4;
57445
57461
  }(a2, t3);
57446
57462
  }
57447
- function fileURLToPath(e3) {
57463
+ function fileURLToPath2(e3) {
57448
57464
  return typeof e3 != "string" || e3.startsWith("file://") ? normalizeSlash((0, _e.fileURLToPath)(e3)) : normalizeSlash(e3);
57449
57465
  }
57450
57466
  function pathToFileURL(e3) {
57451
- return (0, _e.pathToFileURL)(fileURLToPath(e3)).toString();
57467
+ return (0, _e.pathToFileURL)(fileURLToPath2(e3)).toString();
57452
57468
  }
57453
57469
  const rt = new Set(["node", "import"]), nt = [".mjs", ".cjs", ".js", ".json"], at = new Set(["ERR_MODULE_NOT_FOUND", "ERR_UNSUPPORTED_DIR_IMPORT", "MODULE_NOT_FOUND", "ERR_PACKAGE_PATH_NOT_EXPORTED"]);
57454
57470
  function _tryModuleResolve(e3, t3, i3) {
@@ -57463,13 +57479,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
57463
57479
  if (typeof e3 != "string") {
57464
57480
  if (!(e3 instanceof URL))
57465
57481
  throw new TypeError("input must be a `string` or `URL`");
57466
- e3 = fileURLToPath(e3);
57482
+ e3 = fileURLToPath2(e3);
57467
57483
  }
57468
57484
  if (/(?:node|data|http|https):/.test(e3))
57469
57485
  return e3;
57470
57486
  if (Ie.has(e3))
57471
57487
  return "node:" + e3;
57472
- if (e3.startsWith("file://") && (e3 = fileURLToPath(e3)), isAbsolute(e3))
57488
+ if (e3.startsWith("file://") && (e3 = fileURLToPath2(e3)), isAbsolute(e3))
57473
57489
  try {
57474
57490
  if ((0, ue.statSync)(e3).isFile())
57475
57491
  return pathToFileURL(e3);
@@ -57508,7 +57524,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
57508
57524
  return _resolve(e3, t3);
57509
57525
  }
57510
57526
  function resolvePathSync(e3, t3) {
57511
- return fileURLToPath(resolveSync(e3, t3));
57527
+ return fileURLToPath2(resolveSync(e3, t3));
57512
57528
  }
57513
57529
  const ot = /(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m, ht = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
57514
57530
  function hasESMSyntax(e3, t3 = {}) {
@@ -57691,7 +57707,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
57691
57707
  }
57692
57708
  function tryNativeRequireResolve(e3, t3, i3, s2) {
57693
57709
  try {
57694
- return e3.nativeRequire.resolve(t3, { ...s2, paths: [pathe_M_eThtNZ_dirname(fileURLToPath(i3)), ...s2?.paths || []] });
57710
+ return e3.nativeRequire.resolve(t3, { ...s2, paths: [pathe_M_eThtNZ_dirname(fileURLToPath2(i3)), ...s2?.paths || []] });
57695
57711
  } catch {}
57696
57712
  }
57697
57713
  const Gt = __require("perf_hooks"), Ht = __require("vm");
@@ -65747,7 +65763,7 @@ var require_util = __commonJS((exports) => {
65747
65763
  return path30;
65748
65764
  });
65749
65765
  exports.normalize = normalize;
65750
- function join4(aRoot, aPath) {
65766
+ function join5(aRoot, aPath) {
65751
65767
  if (aRoot === "") {
65752
65768
  aRoot = ".";
65753
65769
  }
@@ -65779,7 +65795,7 @@ var require_util = __commonJS((exports) => {
65779
65795
  }
65780
65796
  return joined;
65781
65797
  }
65782
- exports.join = join4;
65798
+ exports.join = join5;
65783
65799
  exports.isAbsolute = function(aPath) {
65784
65800
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
65785
65801
  };
@@ -65993,7 +66009,7 @@ var require_util = __commonJS((exports) => {
65993
66009
  parsed.path = parsed.path.substring(0, index + 1);
65994
66010
  }
65995
66011
  }
65996
- sourceURL = join4(urlGenerate(parsed), sourceURL);
66012
+ sourceURL = join5(urlGenerate(parsed), sourceURL);
65997
66013
  }
65998
66014
  return normalize(sourceURL);
65999
66015
  }
@@ -90460,7 +90476,7 @@ var require_util3 = __commonJS((exports) => {
90460
90476
  return path32;
90461
90477
  });
90462
90478
  exports.normalize = normalize;
90463
- function join4(aRoot, aPath) {
90479
+ function join5(aRoot, aPath) {
90464
90480
  if (aRoot === "") {
90465
90481
  aRoot = ".";
90466
90482
  }
@@ -90492,7 +90508,7 @@ var require_util3 = __commonJS((exports) => {
90492
90508
  }
90493
90509
  return joined;
90494
90510
  }
90495
- exports.join = join4;
90511
+ exports.join = join5;
90496
90512
  exports.isAbsolute = function(aPath) {
90497
90513
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
90498
90514
  };
@@ -90706,7 +90722,7 @@ var require_util3 = __commonJS((exports) => {
90706
90722
  parsed.path = parsed.path.substring(0, index + 1);
90707
90723
  }
90708
90724
  }
90709
- sourceURL = join4(urlGenerate(parsed), sourceURL);
90725
+ sourceURL = join5(urlGenerate(parsed), sourceURL);
90710
90726
  }
90711
90727
  return normalize(sourceURL);
90712
90728
  }
@@ -92111,8 +92127,8 @@ var require_source_map = __commonJS((exports) => {
92111
92127
 
92112
92128
  // ../../node_modules/postcss/lib/previous-map.js
92113
92129
  var require_previous_map = __commonJS((exports, module) => {
92114
- var { existsSync: existsSync6, readFileSync: readFileSync3, realpathSync: realpathSync2 } = __require("fs");
92115
- var { dirname, isAbsolute, join: join4, relative, sep: sep2 } = __require("path");
92130
+ var { existsSync: existsSync7, readFileSync: readFileSync3, realpathSync: realpathSync2 } = __require("fs");
92131
+ var { dirname: dirname2, isAbsolute, join: join5, relative, sep: sep2 } = __require("path");
92116
92132
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
92117
92133
  function realPath(path32) {
92118
92134
  try {
@@ -92143,7 +92159,7 @@ var require_previous_map = __commonJS((exports, module) => {
92143
92159
  this.mapFile = opts.from;
92144
92160
  }
92145
92161
  if (this.mapFile)
92146
- this.root = dirname(this.mapFile);
92162
+ this.root = dirname2(this.mapFile);
92147
92163
  if (text2)
92148
92164
  this.text = text2;
92149
92165
  }
@@ -92194,13 +92210,13 @@ var require_previous_map = __commonJS((exports, module) => {
92194
92210
  return;
92195
92211
  if (!cssFile)
92196
92212
  return;
92197
- let rel = relative(realPath(dirname(cssFile)), realPath(path32));
92213
+ let rel = relative(realPath(dirname2(cssFile)), realPath(path32));
92198
92214
  if (rel === ".." || rel.startsWith(".." + sep2) || isAbsolute(rel)) {
92199
92215
  return;
92200
92216
  }
92201
92217
  }
92202
- this.root = dirname(path32);
92203
- if (existsSync6(path32)) {
92218
+ this.root = dirname2(path32);
92219
+ if (existsSync7(path32)) {
92204
92220
  this.mapFile = path32;
92205
92221
  return readFileSync3(path32, "utf-8").toString().trim();
92206
92222
  }
@@ -92234,7 +92250,7 @@ var require_previous_map = __commonJS((exports, module) => {
92234
92250
  } else if (this.annotation) {
92235
92251
  let map = this.annotation;
92236
92252
  if (file)
92237
- map = join4(dirname(file), map);
92253
+ map = join5(dirname2(file), map);
92238
92254
  let unknown = this.loadFile(map, file, false);
92239
92255
  if (unknown) {
92240
92256
  try {
@@ -92264,7 +92280,7 @@ var require_input = __commonJS((exports, module) => {
92264
92280
  var { nanoid } = require_non_secure();
92265
92281
  var { isAbsolute, resolve: resolve2 } = __require("path");
92266
92282
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
92267
- var { fileURLToPath, pathToFileURL } = __require("url");
92283
+ var { fileURLToPath: fileURLToPath2, pathToFileURL } = __require("url");
92268
92284
  var CssSyntaxError = require_css_syntax_error();
92269
92285
  var PreviousMap = require_previous_map();
92270
92286
  var terminalHighlight = require_terminal_highlight();
@@ -92449,8 +92465,8 @@ var require_input = __commonJS((exports, module) => {
92449
92465
  url: fromUrl.toString()
92450
92466
  };
92451
92467
  if (fromUrl.protocol === "file:") {
92452
- if (fileURLToPath) {
92453
- result.file = fileURLToPath(fromUrl);
92468
+ if (fileURLToPath2) {
92469
+ result.file = fileURLToPath2(fromUrl);
92454
92470
  } else {
92455
92471
  throw new Error(`file: protocol is not available in this PostCSS build`);
92456
92472
  }
@@ -92740,12 +92756,12 @@ var require_fromJSON = __commonJS((exports, module) => {
92740
92756
 
92741
92757
  // ../../node_modules/postcss/lib/map-generator.js
92742
92758
  var require_map_generator = __commonJS((exports, module) => {
92743
- var { dirname, relative, resolve: resolve2, sep: sep2 } = __require("path");
92759
+ var { dirname: dirname2, relative, resolve: resolve2, sep: sep2 } = __require("path");
92744
92760
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
92745
92761
  var { pathToFileURL } = __require("url");
92746
92762
  var Input = require_input();
92747
92763
  var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
92748
- var pathAvailable = Boolean(dirname && resolve2 && relative && sep2);
92764
+ var pathAvailable = Boolean(dirname2 && resolve2 && relative && sep2);
92749
92765
 
92750
92766
  class MapGenerator {
92751
92767
  constructor(stringify, root, opts, cssString) {
@@ -92782,7 +92798,7 @@ var require_map_generator = __commonJS((exports, module) => {
92782
92798
  applyPrevMaps() {
92783
92799
  for (let prev of this.previous()) {
92784
92800
  let from = this.toUrl(this.path(prev.file));
92785
- let root = prev.root || dirname(prev.file);
92801
+ let root = prev.root || dirname2(prev.file);
92786
92802
  let map;
92787
92803
  if (this.mapOpts.sourcesContent === false) {
92788
92804
  map = new SourceMapConsumer(prev.text);
@@ -92995,9 +93011,9 @@ var require_map_generator = __commonJS((exports, module) => {
92995
93011
  let cached = this.memoizedPaths.get(file);
92996
93012
  if (cached)
92997
93013
  return cached;
92998
- let from = this.opts.to ? dirname(this.opts.to) : ".";
93014
+ let from = this.opts.to ? dirname2(this.opts.to) : ".";
92999
93015
  if (typeof this.mapOpts.annotation === "string") {
93000
- from = dirname(resolve2(from, this.mapOpts.annotation));
93016
+ from = dirname2(resolve2(from, this.mapOpts.annotation));
93001
93017
  }
93002
93018
  let path32 = relative(from, file);
93003
93019
  this.memoizedPaths.set(file, path32);
@@ -94584,11 +94600,11 @@ var init_postcss = __esm(() => {
94584
94600
 
94585
94601
  // ../../node_modules/vite/dist/node/chunks/node.js
94586
94602
  import { Module, builtinModules, createRequire as createRequire4 } from "module";
94587
- import fs4, { closeSync, existsSync as existsSync6, openSync, readFileSync as readFileSync3, readSync, statSync } from "fs";
94603
+ import fs4, { closeSync, existsSync as existsSync7, openSync, readFileSync as readFileSync3, readSync, statSync } from "fs";
94588
94604
  import fsp2, { constants as constants2 } from "fs/promises";
94589
- import path32, { basename as basename3, delimiter, dirname, extname, isAbsolute, join as join4, normalize, posix as posix2, relative, resolve as resolve2, sep as sep2 } from "path";
94605
+ import path32, { basename as basename3, delimiter, dirname as dirname2, extname, isAbsolute, join as join5, normalize, posix as posix2, relative, resolve as resolve2, sep as sep2 } from "path";
94590
94606
  import { performance as performance$1 } from "perf_hooks";
94591
- import { URL as URL$1, fileURLToPath, pathToFileURL } from "url";
94607
+ import { URL as URL$1, fileURLToPath as fileURLToPath2, pathToFileURL } from "url";
94592
94608
  import { format, formatWithOptions as formatWithOptions2, inspect, isDeepStrictEqual, parseEnv, promisify, stripVTControlCharacters } from "util";
94593
94609
  import childProcess, { exec, execFile, execSync, spawn } from "child_process";
94594
94610
  import { promises } from "dns";
@@ -96546,7 +96562,7 @@ async function getHmrImplementation(config) {
96546
96562
  return (await createClientConfigValueReplacer(config))(content).replace(/import\s*['"]@vite\/env['"]/, "").replace(new RegExp(`(from\\s*['"])${ROLLDOWN_DEV_RUNTIME_ENTRY}(['"])`), (_7, before, after) => `${before}${path32.posix.join(config.base, BUNDLED_DEV_ROLLDOWN_RUNTIME_DIR, path32.basename(rolldownDevRuntimeEntryPath()))}${after}`);
96547
96563
  }
96548
96564
  function rolldownDevRuntimeEntryPath() {
96549
- return fileURLToPath(import.meta.resolve(ROLLDOWN_DEV_RUNTIME_ENTRY));
96565
+ return fileURLToPath2(import.meta.resolve(ROLLDOWN_DEV_RUNTIME_ENTRY));
96550
96566
  }
96551
96567
  function getRolldownDevRuntimeFiles() {
96552
96568
  const entry = rolldownDevRuntimeEntryPath();
@@ -99154,7 +99170,7 @@ var import_picomatch, __create3, __defProp3, __getOwnPropDesc2, __getOwnPropName
99154
99170
  await this._buildStartPromise;
99155
99171
  this._buildStartPromise = undefined;
99156
99172
  }
99157
- async resolveId(rawId, importer = join4(this.environment.config.root, "index.html"), options) {
99173
+ async resolveId(rawId, importer = join5(this.environment.config.root, "index.html"), options) {
99158
99174
  if (!this._started) {
99159
99175
  this.buildStart();
99160
99176
  await this._buildStartPromise;
@@ -100362,7 +100378,7 @@ export async function resolve(specifier, context, nextResolve) {
100362
100378
  CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
100363
100379
  OPTIMIZABLE_ENTRY_RE = /\.[cm]?[jt]s$/;
100364
100380
  SPECIAL_QUERY_RE = /[?&](?:worker|sharedworker|raw|url)\b/;
100365
- VITE_PACKAGE_DIR = resolve2(fileURLToPath(new URL("../../../src/node/constants.ts", import.meta.url)), "../../..");
100381
+ VITE_PACKAGE_DIR = resolve2(fileURLToPath2(new URL("../../../src/node/constants.ts", import.meta.url)), "../../..");
100366
100382
  CLIENT_ENTRY = resolve2(VITE_PACKAGE_DIR, "dist/client/client.mjs");
100367
100383
  BUNDLED_DEV_CLIENT_ENTRY = resolve2(VITE_PACKAGE_DIR, "dist/client/bundledDevClient.mjs");
100368
100384
  ENV_ENTRY = resolve2(VITE_PACKAGE_DIR, "dist/client/env.mjs");
@@ -100598,7 +100614,7 @@ export async function resolve(specifier, context, nextResolve) {
100598
100614
  inNodeModulesRE = /(?:^|[\\/])node_modules(?:[\\/]|$)/;
100599
100615
  bareImportRE = /^(?![a-zA-Z]:)[\w@](?!.*:\/\/)/;
100600
100616
  deepImportRE = /^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\//;
100601
- _dirname = path32.dirname(fileURLToPath(import.meta.url));
100617
+ _dirname = path32.dirname(fileURLToPath2(import.meta.url));
100602
100618
  filter = process.env.VITE_DEBUG_FILTER;
100603
100619
  DEBUG = process.env.DEBUG;
100604
100620
  isCaseInsensitiveFS = testCaseInsensitiveFS();
@@ -101493,12 +101509,12 @@ export async function resolve(specifier, context, nextResolve) {
101493
101509
  });
101494
101510
  require_req = /* @__PURE__ */ __commonJSMin2((exports, module) => {
101495
101511
  const { createRequire: createRequire5 } = __require3("node:module");
101496
- const { fileURLToPath: fileURLToPath2, pathToFileURL: pathToFileURL2 } = __require3("node:url");
101512
+ const { fileURLToPath: fileURLToPath3, pathToFileURL: pathToFileURL2 } = __require3("node:url");
101497
101513
  const TS_EXT_RE = /\.[mc]?ts$/;
101498
101514
  let tsx;
101499
101515
  let jiti;
101500
101516
  let importError = [];
101501
- async function req(name, rootFile = fileURLToPath2(import.meta.url)) {
101517
+ async function req(name, rootFile = fileURLToPath3(import.meta.url)) {
101502
101518
  let url = createRequire5(rootFile).resolve(name);
101503
101519
  try {
101504
101520
  return (await import(`${pathToFileURL2(url)}?t=${Date.now()}`)).default;
@@ -104172,9 +104188,9 @@ ${err2.stack || err2.message}
104172
104188
  _handleFile(file, stats, initialAdd) {
104173
104189
  if (this.fsw.closed)
104174
104190
  return;
104175
- const dirname2 = sysPath.dirname(file);
104191
+ const dirname3 = sysPath.dirname(file);
104176
104192
  const basename4 = sysPath.basename(file);
104177
- const parent = this.fsw._getWatchedDir(dirname2);
104193
+ const parent = this.fsw._getWatchedDir(dirname3);
104178
104194
  let prevStats = stats;
104179
104195
  if (parent.has(basename4))
104180
104196
  return;
@@ -104197,7 +104213,7 @@ ${err2.stack || err2.message}
104197
104213
  } else
104198
104214
  prevStats = newStats2;
104199
104215
  } catch (error2) {
104200
- this.fsw._remove(dirname2, basename4);
104216
+ this.fsw._remove(dirname3, basename4);
104201
104217
  }
104202
104218
  else if (parent.has(basename4)) {
104203
104219
  const at2 = newStats.atimeMs;
@@ -107221,7 +107237,7 @@ ${err2.stack || err2.message}
107221
107237
  new Map(Object.entries(windowsBrowserProgIds));
107222
107238
  execFileAsync = promisify(execFile);
107223
107239
  execFile$1 = promisify(childProcess.execFile);
107224
- __dirname2 = path32.dirname(fileURLToPath(import.meta.url));
107240
+ __dirname2 = path32.dirname(fileURLToPath2(import.meta.url));
107225
107241
  localXdgOpenPath = path32.join(__dirname2, "xdg-open");
107226
107242
  ({ platform: platform2, arch } = process$12);
107227
107243
  apps = {};
@@ -112383,10 +112399,9 @@ var init_dist5 = __esm(() => {
112383
112399
  });
112384
112400
 
112385
112401
  // ../cms/src/index.ts
112386
- import { existsSync as existsSync7 } from "fs";
112387
- import { dirname as dirname2, join as join5 } from "path";
112388
- import { fileURLToPath as fileURLToPath2 } from "url";
112389
- var DEFAULT_MAX_UPLOAD_SIZE, editorTailwind;
112402
+ import { existsSync as existsSync8 } from "fs";
112403
+ import { join as join6 } from "path";
112404
+ var DEFAULT_MAX_UPLOAD_SIZE, cmsRoot, editorTailwind;
112390
112405
  var init_src3 = __esm(async () => {
112391
112406
  init_src2();
112392
112407
  init_component_registry2();
@@ -112396,10 +112411,11 @@ var init_src3 = __esm(async () => {
112396
112411
  init_manifest_writer();
112397
112412
  init_rehype();
112398
112413
  init_mode();
112414
+ init_package_root();
112399
112415
  init_redirects2();
112400
112416
  init_scan_cache();
112401
- init_vite_plugin();
112402
112417
  init_vite_plugin_inline_nuasite();
112418
+ init_vite_plugin();
112403
112419
  init_remark();
112404
112420
  init_src2();
112405
112421
  init_fields();
@@ -112416,7 +112432,8 @@ var init_src3 = __esm(async () => {
112416
112432
  init_scan_cache();
112417
112433
  init_source_finder();
112418
112434
  DEFAULT_MAX_UPLOAD_SIZE = 20 * 1024 * 1024;
112419
- editorTailwind = existsSync7(join5(dirname2(fileURLToPath2(import.meta.url)), "../dist/editor.js")) ? undefined : (await Promise.resolve().then(() => (init_dist5(), exports_dist2)).catch(() => {
112435
+ cmsRoot = packageRoot(import.meta.url);
112436
+ editorTailwind = existsSync8(join6(cmsRoot, "dist/editor.js")) ? undefined : (await Promise.resolve().then(() => (init_dist5(), exports_dist2)).catch(() => {
112420
112437
  return;
112421
112438
  }))?.default;
112422
112439
  });