@nuasite/cli 0.64.2 → 0.65.0

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();
@@ -49027,7 +49046,7 @@ var require_memoize = __commonJS((exports, module) => {
49027
49046
  // ../../node_modules/enhanced-resolve/lib/CachedInputFileSystem.js
49028
49047
  var require_CachedInputFileSystem = __commonJS((exports, module) => {
49029
49048
  var { nextTick } = __require("process");
49030
- var dirname = (path30) => {
49049
+ var dirname2 = (path30) => {
49031
49050
  let idx = path30.length - 1;
49032
49051
  while (idx >= 0) {
49033
49052
  const char = path30.charCodeAt(idx);
@@ -49231,12 +49250,12 @@ var require_CachedInputFileSystem = __commonJS((exports, module) => {
49231
49250
  this.purge();
49232
49251
  } else if (typeof what === "string" || Buffer.isBuffer(what) || what instanceof URL || typeof what === "number") {
49233
49252
  const strWhat = typeof what !== "string" ? what.toString() : what;
49234
- this.purge(dirname(strWhat));
49253
+ this.purge(dirname2(strWhat));
49235
49254
  } else {
49236
49255
  const set = new Set;
49237
49256
  for (const item of what) {
49238
49257
  const strItem = typeof item !== "string" ? item.toString() : item;
49239
- set.add(dirname(strItem));
49258
+ set.add(dirname2(strItem));
49240
49259
  }
49241
49260
  this.purge(set);
49242
49261
  }
@@ -50486,7 +50505,7 @@ var require_path = __commonJS((exports, module) => {
50486
50505
  }
50487
50506
  return posixNormalize(maybePath);
50488
50507
  };
50489
- var join4 = (rootPath, request) => {
50508
+ var join5 = (rootPath, request) => {
50490
50509
  if (!request)
50491
50510
  return normalize(rootPath);
50492
50511
  const requestType = getType(request);
@@ -50514,7 +50533,7 @@ var require_path = __commonJS((exports, module) => {
50514
50533
  }
50515
50534
  return posixNormalize(rootPath);
50516
50535
  };
50517
- var dirname = (maybePath) => {
50536
+ var dirname2 = (maybePath) => {
50518
50537
  switch (getType(maybePath)) {
50519
50538
  case PathType.AbsoluteWin:
50520
50539
  return path30.win32.dirname(maybePath);
@@ -50532,7 +50551,7 @@ var require_path = __commonJS((exports, module) => {
50532
50551
  if (cacheEntry !== undefined)
50533
50552
  return cacheEntry;
50534
50553
  }
50535
- cacheEntry = join4(rootPath, request);
50554
+ cacheEntry = join5(rootPath, request);
50536
50555
  cache.set(request, cacheEntry);
50537
50556
  return cacheEntry;
50538
50557
  };
@@ -50541,7 +50560,7 @@ var require_path = __commonJS((exports, module) => {
50541
50560
  const cacheEntry = dirnameCache.get(maybePath);
50542
50561
  if (cacheEntry !== undefined)
50543
50562
  return cacheEntry;
50544
- const result = dirname(maybePath);
50563
+ const result = dirname2(maybePath);
50545
50564
  dirnameCache.set(maybePath, result);
50546
50565
  return result;
50547
50566
  };
@@ -50553,11 +50572,11 @@ var require_path = __commonJS((exports, module) => {
50553
50572
  exports.cachedDirname = cachedDirname;
50554
50573
  exports.cachedJoin = cachedJoin;
50555
50574
  exports.deprecatedInvalidSegmentRegEx = deprecatedInvalidSegmentRegEx;
50556
- exports.dirname = dirname;
50575
+ exports.dirname = dirname2;
50557
50576
  exports.getType = getType;
50558
50577
  exports.invalidSegmentRegEx = invalidSegmentRegEx;
50559
50578
  exports.isSubPath = isSubPath;
50560
- exports.join = join4;
50579
+ exports.join = join5;
50561
50580
  exports.normalize = normalize;
50562
50581
  });
50563
50582
 
@@ -52989,7 +53008,7 @@ var require_Resolver = __commonJS((exports, module) => {
52989
53008
  var { parseIdentifier } = require_identifier();
52990
53009
  var {
52991
53010
  PathType,
52992
- cachedJoin: join4,
53011
+ cachedJoin: join5,
52993
53012
  getType,
52994
53013
  normalize
52995
53014
  } = require_path();
@@ -53244,7 +53263,7 @@ Stack:
53244
53263
  return path30.endsWith("/");
53245
53264
  }
53246
53265
  join(path30, request) {
53247
- return join4(path30, request);
53266
+ return join5(path30, request);
53248
53267
  }
53249
53268
  normalize(path30) {
53250
53269
  return normalize(path30);
@@ -53691,8 +53710,8 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53691
53710
  var { readJson } = require_fs();
53692
53711
  var {
53693
53712
  PathType: _PathType,
53694
- cachedDirname: dirname,
53695
- cachedJoin: join4,
53713
+ cachedDirname: dirname2,
53714
+ cachedJoin: join5,
53696
53715
  isSubPath,
53697
53716
  normalize
53698
53717
  } = require_path();
@@ -53723,7 +53742,7 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53723
53742
  return pathValue.replace(/\$\{configDir\}/g, configDir);
53724
53743
  }
53725
53744
  function tsconfigPathsToResolveOptions(configDir, paths, baseUrl) {
53726
- const absoluteBaseUrl = !baseUrl ? configDir : join4(configDir, baseUrl);
53745
+ const absoluteBaseUrl = !baseUrl ? configDir : join5(configDir, baseUrl);
53727
53746
  const sortedKeys = sortByLongestPrefix(Object.keys(paths));
53728
53747
  const alias = [];
53729
53748
  const modules = [];
@@ -53731,7 +53750,7 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53731
53750
  const mappings = paths[pattern];
53732
53751
  const absolutePaths = mappings.map((mapping) => {
53733
53752
  const substituted = substituteConfigDir(mapping, configDir);
53734
- return join4(absoluteBaseUrl, substituted);
53753
+ return join5(absoluteBaseUrl, substituted);
53735
53754
  });
53736
53755
  if (absolutePaths.length > 0) {
53737
53756
  if (pattern === "*") {
@@ -53755,7 +53774,7 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53755
53774
  };
53756
53775
  }
53757
53776
  function getAbsoluteBaseUrl(context2, baseUrl) {
53758
- return !baseUrl ? context2 : join4(context2, baseUrl);
53777
+ return !baseUrl ? context2 : join5(context2, baseUrl);
53759
53778
  }
53760
53779
  module.exports = class TsconfigPathsPlugin {
53761
53780
  constructor(configFileOrOptions) {
@@ -53810,7 +53829,7 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53810
53829
  async _getTsconfigPathsMap(resolver2, request, resolveContext) {
53811
53830
  if (typeof request.tsconfigPathsMap === "undefined") {
53812
53831
  try {
53813
- const absTsconfigPath = join4(request.path || process.cwd(), this.configFile);
53832
+ const absTsconfigPath = join5(request.path || process.cwd(), this.configFile);
53814
53833
  const result = await this._loadTsconfigPathsMap(resolver2.fileSystem, absTsconfigPath);
53815
53834
  request.tsconfigPathsMap = result;
53816
53835
  } catch (err) {
@@ -53832,7 +53851,7 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53832
53851
  const fileDependencies = new Set;
53833
53852
  const config = await this._loadTsconfig(fileSystem, absTsconfigPath, fileDependencies);
53834
53853
  const compilerOptions = config.compilerOptions || {};
53835
- const mainContext = dirname(absTsconfigPath);
53854
+ const mainContext = dirname2(absTsconfigPath);
53836
53855
  const baseUrl = this.baseUrl !== undefined ? this.baseUrl : compilerOptions.baseUrl;
53837
53856
  const main = tsconfigPathsToResolveOptions(mainContext, compilerOptions.paths || {}, baseUrl);
53838
53857
  const refs = {};
@@ -53873,24 +53892,24 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53873
53892
  return null;
53874
53893
  }
53875
53894
  async _loadTsconfigFromExtends(fileSystem, configFilePath, extendedConfigValue, fileDependencies, visitedConfigPaths) {
53876
- const currentDir = dirname(configFilePath);
53895
+ const currentDir = dirname2(configFilePath);
53877
53896
  extendedConfigValue = substituteConfigDir(extendedConfigValue, currentDir);
53878
53897
  if (typeof extendedConfigValue === "string" && !extendedConfigValue.includes(".json")) {
53879
53898
  extendedConfigValue += ".json";
53880
53899
  }
53881
- let extendedConfigPath = join4(currentDir, extendedConfigValue);
53900
+ let extendedConfigPath = join5(currentDir, extendedConfigValue);
53882
53901
  const exists = await new Promise((resolve2) => {
53883
53902
  fileSystem.readFile(extendedConfigPath, (err) => {
53884
53903
  resolve2(!err);
53885
53904
  });
53886
53905
  });
53887
53906
  if (!exists && extendedConfigValue.includes("/")) {
53888
- extendedConfigPath = join4(currentDir, normalize(`node_modules/${extendedConfigValue}`));
53907
+ extendedConfigPath = join5(currentDir, normalize(`node_modules/${extendedConfigValue}`));
53889
53908
  }
53890
53909
  const config = await this._loadTsconfig(fileSystem, extendedConfigPath, fileDependencies, visitedConfigPaths);
53891
53910
  const compilerOptions = config.compilerOptions || { baseUrl: undefined };
53892
53911
  if (compilerOptions.baseUrl) {
53893
- const extendsDir = dirname(extendedConfigValue);
53912
+ const extendsDir = dirname2(extendedConfigValue);
53894
53913
  compilerOptions.baseUrl = getAbsoluteBaseUrl(extendsDir, compilerOptions.baseUrl);
53895
53914
  }
53896
53915
  delete config.references;
@@ -53899,15 +53918,15 @@ var require_TsconfigPathsPlugin = __commonJS((exports, module) => {
53899
53918
  async _loadTsconfigReferences(fileSystem, context2, references, fileDependencies, referenceMatchMap) {
53900
53919
  for (const ref of references) {
53901
53920
  const refPath = substituteConfigDir(ref.path, context2);
53902
- const refConfigPath = join4(join4(context2, refPath), DEFAULT_CONFIG_FILE);
53921
+ const refConfigPath = join5(join5(context2, refPath), DEFAULT_CONFIG_FILE);
53903
53922
  try {
53904
53923
  const refConfig = await this._loadTsconfig(fileSystem, refConfigPath, fileDependencies);
53905
53924
  if (refConfig.compilerOptions && refConfig.compilerOptions.paths) {
53906
- const refContext = dirname(refConfigPath);
53925
+ const refContext = dirname2(refConfigPath);
53907
53926
  referenceMatchMap[refContext] = tsconfigPathsToResolveOptions(refContext, refConfig.compilerOptions.paths || {}, refConfig.compilerOptions.baseUrl);
53908
53927
  }
53909
53928
  if (this.references === "auto" && Array.isArray(refConfig.references)) {
53910
- await this._loadTsconfigReferences(fileSystem, dirname(refConfigPath), refConfig.references, fileDependencies, referenceMatchMap);
53929
+ await this._loadTsconfigReferences(fileSystem, dirname2(refConfigPath), refConfig.references, fileDependencies, referenceMatchMap);
53911
53930
  }
53912
53931
  } catch (_err) {
53913
53932
  continue;
@@ -57441,11 +57460,11 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
57441
57460
  return e4;
57442
57461
  }(a2, t3);
57443
57462
  }
57444
- function fileURLToPath(e3) {
57463
+ function fileURLToPath2(e3) {
57445
57464
  return typeof e3 != "string" || e3.startsWith("file://") ? normalizeSlash((0, _e.fileURLToPath)(e3)) : normalizeSlash(e3);
57446
57465
  }
57447
57466
  function pathToFileURL(e3) {
57448
- return (0, _e.pathToFileURL)(fileURLToPath(e3)).toString();
57467
+ return (0, _e.pathToFileURL)(fileURLToPath2(e3)).toString();
57449
57468
  }
57450
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"]);
57451
57470
  function _tryModuleResolve(e3, t3, i3) {
@@ -57460,13 +57479,13 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
57460
57479
  if (typeof e3 != "string") {
57461
57480
  if (!(e3 instanceof URL))
57462
57481
  throw new TypeError("input must be a `string` or `URL`");
57463
- e3 = fileURLToPath(e3);
57482
+ e3 = fileURLToPath2(e3);
57464
57483
  }
57465
57484
  if (/(?:node|data|http|https):/.test(e3))
57466
57485
  return e3;
57467
57486
  if (Ie.has(e3))
57468
57487
  return "node:" + e3;
57469
- if (e3.startsWith("file://") && (e3 = fileURLToPath(e3)), isAbsolute(e3))
57488
+ if (e3.startsWith("file://") && (e3 = fileURLToPath2(e3)), isAbsolute(e3))
57470
57489
  try {
57471
57490
  if ((0, ue.statSync)(e3).isFile())
57472
57491
  return pathToFileURL(e3);
@@ -57505,7 +57524,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
57505
57524
  return _resolve(e3, t3);
57506
57525
  }
57507
57526
  function resolvePathSync(e3, t3) {
57508
- return fileURLToPath(resolveSync(e3, t3));
57527
+ return fileURLToPath2(resolveSync(e3, t3));
57509
57528
  }
57510
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;
57511
57530
  function hasESMSyntax(e3, t3 = {}) {
@@ -57688,7 +57707,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
57688
57707
  }
57689
57708
  function tryNativeRequireResolve(e3, t3, i3, s2) {
57690
57709
  try {
57691
- 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 || []] });
57692
57711
  } catch {}
57693
57712
  }
57694
57713
  const Gt = __require("perf_hooks"), Ht = __require("vm");
@@ -65744,7 +65763,7 @@ var require_util = __commonJS((exports) => {
65744
65763
  return path30;
65745
65764
  });
65746
65765
  exports.normalize = normalize;
65747
- function join4(aRoot, aPath) {
65766
+ function join5(aRoot, aPath) {
65748
65767
  if (aRoot === "") {
65749
65768
  aRoot = ".";
65750
65769
  }
@@ -65776,7 +65795,7 @@ var require_util = __commonJS((exports) => {
65776
65795
  }
65777
65796
  return joined;
65778
65797
  }
65779
- exports.join = join4;
65798
+ exports.join = join5;
65780
65799
  exports.isAbsolute = function(aPath) {
65781
65800
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
65782
65801
  };
@@ -65990,7 +66009,7 @@ var require_util = __commonJS((exports) => {
65990
66009
  parsed.path = parsed.path.substring(0, index + 1);
65991
66010
  }
65992
66011
  }
65993
- sourceURL = join4(urlGenerate(parsed), sourceURL);
66012
+ sourceURL = join5(urlGenerate(parsed), sourceURL);
65994
66013
  }
65995
66014
  return normalize(sourceURL);
65996
66015
  }
@@ -90457,7 +90476,7 @@ var require_util3 = __commonJS((exports) => {
90457
90476
  return path32;
90458
90477
  });
90459
90478
  exports.normalize = normalize;
90460
- function join4(aRoot, aPath) {
90479
+ function join5(aRoot, aPath) {
90461
90480
  if (aRoot === "") {
90462
90481
  aRoot = ".";
90463
90482
  }
@@ -90489,7 +90508,7 @@ var require_util3 = __commonJS((exports) => {
90489
90508
  }
90490
90509
  return joined;
90491
90510
  }
90492
- exports.join = join4;
90511
+ exports.join = join5;
90493
90512
  exports.isAbsolute = function(aPath) {
90494
90513
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
90495
90514
  };
@@ -90703,7 +90722,7 @@ var require_util3 = __commonJS((exports) => {
90703
90722
  parsed.path = parsed.path.substring(0, index + 1);
90704
90723
  }
90705
90724
  }
90706
- sourceURL = join4(urlGenerate(parsed), sourceURL);
90725
+ sourceURL = join5(urlGenerate(parsed), sourceURL);
90707
90726
  }
90708
90727
  return normalize(sourceURL);
90709
90728
  }
@@ -92108,8 +92127,8 @@ var require_source_map = __commonJS((exports) => {
92108
92127
 
92109
92128
  // ../../node_modules/postcss/lib/previous-map.js
92110
92129
  var require_previous_map = __commonJS((exports, module) => {
92111
- var { existsSync: existsSync6, readFileSync: readFileSync3, realpathSync: realpathSync2 } = __require("fs");
92112
- 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");
92113
92132
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
92114
92133
  function realPath(path32) {
92115
92134
  try {
@@ -92140,7 +92159,7 @@ var require_previous_map = __commonJS((exports, module) => {
92140
92159
  this.mapFile = opts.from;
92141
92160
  }
92142
92161
  if (this.mapFile)
92143
- this.root = dirname(this.mapFile);
92162
+ this.root = dirname2(this.mapFile);
92144
92163
  if (text2)
92145
92164
  this.text = text2;
92146
92165
  }
@@ -92191,13 +92210,13 @@ var require_previous_map = __commonJS((exports, module) => {
92191
92210
  return;
92192
92211
  if (!cssFile)
92193
92212
  return;
92194
- let rel = relative(realPath(dirname(cssFile)), realPath(path32));
92213
+ let rel = relative(realPath(dirname2(cssFile)), realPath(path32));
92195
92214
  if (rel === ".." || rel.startsWith(".." + sep2) || isAbsolute(rel)) {
92196
92215
  return;
92197
92216
  }
92198
92217
  }
92199
- this.root = dirname(path32);
92200
- if (existsSync6(path32)) {
92218
+ this.root = dirname2(path32);
92219
+ if (existsSync7(path32)) {
92201
92220
  this.mapFile = path32;
92202
92221
  return readFileSync3(path32, "utf-8").toString().trim();
92203
92222
  }
@@ -92231,7 +92250,7 @@ var require_previous_map = __commonJS((exports, module) => {
92231
92250
  } else if (this.annotation) {
92232
92251
  let map = this.annotation;
92233
92252
  if (file)
92234
- map = join4(dirname(file), map);
92253
+ map = join5(dirname2(file), map);
92235
92254
  let unknown = this.loadFile(map, file, false);
92236
92255
  if (unknown) {
92237
92256
  try {
@@ -92261,7 +92280,7 @@ var require_input = __commonJS((exports, module) => {
92261
92280
  var { nanoid } = require_non_secure();
92262
92281
  var { isAbsolute, resolve: resolve2 } = __require("path");
92263
92282
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
92264
- var { fileURLToPath, pathToFileURL } = __require("url");
92283
+ var { fileURLToPath: fileURLToPath2, pathToFileURL } = __require("url");
92265
92284
  var CssSyntaxError = require_css_syntax_error();
92266
92285
  var PreviousMap = require_previous_map();
92267
92286
  var terminalHighlight = require_terminal_highlight();
@@ -92446,8 +92465,8 @@ var require_input = __commonJS((exports, module) => {
92446
92465
  url: fromUrl.toString()
92447
92466
  };
92448
92467
  if (fromUrl.protocol === "file:") {
92449
- if (fileURLToPath) {
92450
- result.file = fileURLToPath(fromUrl);
92468
+ if (fileURLToPath2) {
92469
+ result.file = fileURLToPath2(fromUrl);
92451
92470
  } else {
92452
92471
  throw new Error(`file: protocol is not available in this PostCSS build`);
92453
92472
  }
@@ -92737,12 +92756,12 @@ var require_fromJSON = __commonJS((exports, module) => {
92737
92756
 
92738
92757
  // ../../node_modules/postcss/lib/map-generator.js
92739
92758
  var require_map_generator = __commonJS((exports, module) => {
92740
- var { dirname, relative, resolve: resolve2, sep: sep2 } = __require("path");
92759
+ var { dirname: dirname2, relative, resolve: resolve2, sep: sep2 } = __require("path");
92741
92760
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
92742
92761
  var { pathToFileURL } = __require("url");
92743
92762
  var Input = require_input();
92744
92763
  var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
92745
- var pathAvailable = Boolean(dirname && resolve2 && relative && sep2);
92764
+ var pathAvailable = Boolean(dirname2 && resolve2 && relative && sep2);
92746
92765
 
92747
92766
  class MapGenerator {
92748
92767
  constructor(stringify, root, opts, cssString) {
@@ -92779,7 +92798,7 @@ var require_map_generator = __commonJS((exports, module) => {
92779
92798
  applyPrevMaps() {
92780
92799
  for (let prev of this.previous()) {
92781
92800
  let from = this.toUrl(this.path(prev.file));
92782
- let root = prev.root || dirname(prev.file);
92801
+ let root = prev.root || dirname2(prev.file);
92783
92802
  let map;
92784
92803
  if (this.mapOpts.sourcesContent === false) {
92785
92804
  map = new SourceMapConsumer(prev.text);
@@ -92992,9 +93011,9 @@ var require_map_generator = __commonJS((exports, module) => {
92992
93011
  let cached = this.memoizedPaths.get(file);
92993
93012
  if (cached)
92994
93013
  return cached;
92995
- let from = this.opts.to ? dirname(this.opts.to) : ".";
93014
+ let from = this.opts.to ? dirname2(this.opts.to) : ".";
92996
93015
  if (typeof this.mapOpts.annotation === "string") {
92997
- from = dirname(resolve2(from, this.mapOpts.annotation));
93016
+ from = dirname2(resolve2(from, this.mapOpts.annotation));
92998
93017
  }
92999
93018
  let path32 = relative(from, file);
93000
93019
  this.memoizedPaths.set(file, path32);
@@ -94581,11 +94600,11 @@ var init_postcss = __esm(() => {
94581
94600
 
94582
94601
  // ../../node_modules/vite/dist/node/chunks/node.js
94583
94602
  import { Module, builtinModules, createRequire as createRequire4 } from "module";
94584
- 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";
94585
94604
  import fsp2, { constants as constants2 } from "fs/promises";
94586
- 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";
94587
94606
  import { performance as performance$1 } from "perf_hooks";
94588
- import { URL as URL$1, fileURLToPath, pathToFileURL } from "url";
94607
+ import { URL as URL$1, fileURLToPath as fileURLToPath2, pathToFileURL } from "url";
94589
94608
  import { format, formatWithOptions as formatWithOptions2, inspect, isDeepStrictEqual, parseEnv, promisify, stripVTControlCharacters } from "util";
94590
94609
  import childProcess, { exec, execFile, execSync, spawn } from "child_process";
94591
94610
  import { promises } from "dns";
@@ -96543,7 +96562,7 @@ async function getHmrImplementation(config) {
96543
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}`);
96544
96563
  }
96545
96564
  function rolldownDevRuntimeEntryPath() {
96546
- return fileURLToPath(import.meta.resolve(ROLLDOWN_DEV_RUNTIME_ENTRY));
96565
+ return fileURLToPath2(import.meta.resolve(ROLLDOWN_DEV_RUNTIME_ENTRY));
96547
96566
  }
96548
96567
  function getRolldownDevRuntimeFiles() {
96549
96568
  const entry = rolldownDevRuntimeEntryPath();
@@ -99151,7 +99170,7 @@ var import_picomatch, __create3, __defProp3, __getOwnPropDesc2, __getOwnPropName
99151
99170
  await this._buildStartPromise;
99152
99171
  this._buildStartPromise = undefined;
99153
99172
  }
99154
- 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) {
99155
99174
  if (!this._started) {
99156
99175
  this.buildStart();
99157
99176
  await this._buildStartPromise;
@@ -100359,7 +100378,7 @@ export async function resolve(specifier, context, nextResolve) {
100359
100378
  CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
100360
100379
  OPTIMIZABLE_ENTRY_RE = /\.[cm]?[jt]s$/;
100361
100380
  SPECIAL_QUERY_RE = /[?&](?:worker|sharedworker|raw|url)\b/;
100362
- 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)), "../../..");
100363
100382
  CLIENT_ENTRY = resolve2(VITE_PACKAGE_DIR, "dist/client/client.mjs");
100364
100383
  BUNDLED_DEV_CLIENT_ENTRY = resolve2(VITE_PACKAGE_DIR, "dist/client/bundledDevClient.mjs");
100365
100384
  ENV_ENTRY = resolve2(VITE_PACKAGE_DIR, "dist/client/env.mjs");
@@ -100595,7 +100614,7 @@ export async function resolve(specifier, context, nextResolve) {
100595
100614
  inNodeModulesRE = /(?:^|[\\/])node_modules(?:[\\/]|$)/;
100596
100615
  bareImportRE = /^(?![a-zA-Z]:)[\w@](?!.*:\/\/)/;
100597
100616
  deepImportRE = /^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\//;
100598
- _dirname = path32.dirname(fileURLToPath(import.meta.url));
100617
+ _dirname = path32.dirname(fileURLToPath2(import.meta.url));
100599
100618
  filter = process.env.VITE_DEBUG_FILTER;
100600
100619
  DEBUG = process.env.DEBUG;
100601
100620
  isCaseInsensitiveFS = testCaseInsensitiveFS();
@@ -101490,12 +101509,12 @@ export async function resolve(specifier, context, nextResolve) {
101490
101509
  });
101491
101510
  require_req = /* @__PURE__ */ __commonJSMin2((exports, module) => {
101492
101511
  const { createRequire: createRequire5 } = __require3("node:module");
101493
- const { fileURLToPath: fileURLToPath2, pathToFileURL: pathToFileURL2 } = __require3("node:url");
101512
+ const { fileURLToPath: fileURLToPath3, pathToFileURL: pathToFileURL2 } = __require3("node:url");
101494
101513
  const TS_EXT_RE = /\.[mc]?ts$/;
101495
101514
  let tsx;
101496
101515
  let jiti;
101497
101516
  let importError = [];
101498
- async function req(name, rootFile = fileURLToPath2(import.meta.url)) {
101517
+ async function req(name, rootFile = fileURLToPath3(import.meta.url)) {
101499
101518
  let url = createRequire5(rootFile).resolve(name);
101500
101519
  try {
101501
101520
  return (await import(`${pathToFileURL2(url)}?t=${Date.now()}`)).default;
@@ -104169,9 +104188,9 @@ ${err2.stack || err2.message}
104169
104188
  _handleFile(file, stats, initialAdd) {
104170
104189
  if (this.fsw.closed)
104171
104190
  return;
104172
- const dirname2 = sysPath.dirname(file);
104191
+ const dirname3 = sysPath.dirname(file);
104173
104192
  const basename4 = sysPath.basename(file);
104174
- const parent = this.fsw._getWatchedDir(dirname2);
104193
+ const parent = this.fsw._getWatchedDir(dirname3);
104175
104194
  let prevStats = stats;
104176
104195
  if (parent.has(basename4))
104177
104196
  return;
@@ -104194,7 +104213,7 @@ ${err2.stack || err2.message}
104194
104213
  } else
104195
104214
  prevStats = newStats2;
104196
104215
  } catch (error2) {
104197
- this.fsw._remove(dirname2, basename4);
104216
+ this.fsw._remove(dirname3, basename4);
104198
104217
  }
104199
104218
  else if (parent.has(basename4)) {
104200
104219
  const at2 = newStats.atimeMs;
@@ -107218,7 +107237,7 @@ ${err2.stack || err2.message}
107218
107237
  new Map(Object.entries(windowsBrowserProgIds));
107219
107238
  execFileAsync = promisify(execFile);
107220
107239
  execFile$1 = promisify(childProcess.execFile);
107221
- __dirname2 = path32.dirname(fileURLToPath(import.meta.url));
107240
+ __dirname2 = path32.dirname(fileURLToPath2(import.meta.url));
107222
107241
  localXdgOpenPath = path32.join(__dirname2, "xdg-open");
107223
107242
  ({ platform: platform2, arch } = process$12);
107224
107243
  apps = {};
@@ -112380,10 +112399,9 @@ var init_dist5 = __esm(() => {
112380
112399
  });
112381
112400
 
112382
112401
  // ../cms/src/index.ts
112383
- import { existsSync as existsSync7 } from "fs";
112384
- import { dirname as dirname2, join as join5 } from "path";
112385
- import { fileURLToPath as fileURLToPath2 } from "url";
112386
- 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;
112387
112405
  var init_src3 = __esm(async () => {
112388
112406
  init_src2();
112389
112407
  init_component_registry2();
@@ -112393,8 +112411,10 @@ var init_src3 = __esm(async () => {
112393
112411
  init_manifest_writer();
112394
112412
  init_rehype();
112395
112413
  init_mode();
112414
+ init_package_root();
112396
112415
  init_redirects2();
112397
112416
  init_scan_cache();
112417
+ init_vite_plugin_inline_nuasite();
112398
112418
  init_vite_plugin();
112399
112419
  init_remark();
112400
112420
  init_src2();
@@ -112408,10 +112428,12 @@ var init_src3 = __esm(async () => {
112408
112428
  init_migrate_astro_image();
112409
112429
  init_at_root();
112410
112430
  init_redirects2();
112431
+ init_vite_plugin_inline_nuasite();
112411
112432
  init_scan_cache();
112412
112433
  init_source_finder();
112413
112434
  DEFAULT_MAX_UPLOAD_SIZE = 20 * 1024 * 1024;
112414
- 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(() => {
112415
112437
  return;
112416
112438
  }))?.default;
112417
112439
  });