@playcademy/vite-plugin 0.0.1-beta.16 → 0.0.1-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +111 -140
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -41068,8 +41068,6 @@ import * as crypto5 from "node:crypto";
41068
41068
  import { promisify } from "node:util";
41069
41069
  import { KeyObject as KeyObject4, createSecretKey } from "node:crypto";
41070
41070
  import crypto7 from "node:crypto";
41071
- import fs32 from "node:fs";
41072
- import path22 from "node:path";
41073
41071
  var __create2 = Object.create;
41074
41072
  var __getProtoOf2 = Object.getPrototypeOf;
41075
41073
  var __defProp2 = Object.defineProperty;
@@ -43841,7 +43839,7 @@ ${file}:${line2}:${column}: ERROR: ${pluginText}${e.text}`;
43841
43839
  result = `(?${regexp.flags})${result}`;
43842
43840
  return result;
43843
43841
  }
43844
- var fs33 = __require2("fs");
43842
+ var fs32 = __require2("fs");
43845
43843
  var os2 = __require2("os");
43846
43844
  var path3 = __require2("path");
43847
43845
  var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
@@ -43906,14 +43904,14 @@ ${file}:${line2}:${column}: ERROR: ${pluginText}${e.text}`;
43906
43904
  for (const unixKey in knownUnixlikePackages) {
43907
43905
  try {
43908
43906
  const pkg = knownUnixlikePackages[unixKey];
43909
- if (fs33.existsSync(path3.join(nodeModulesDirectory, pkg)))
43907
+ if (fs32.existsSync(path3.join(nodeModulesDirectory, pkg)))
43910
43908
  return pkg;
43911
43909
  } catch {}
43912
43910
  }
43913
43911
  for (const windowsKey in knownWindowsPackages) {
43914
43912
  try {
43915
43913
  const pkg = knownWindowsPackages[windowsKey];
43916
- if (fs33.existsSync(path3.join(nodeModulesDirectory, pkg)))
43914
+ if (fs32.existsSync(path3.join(nodeModulesDirectory, pkg)))
43917
43915
  return pkg;
43918
43916
  } catch {}
43919
43917
  }
@@ -43926,7 +43924,7 @@ ${file}:${line2}:${column}: ERROR: ${pluginText}${e.text}`;
43926
43924
  }
43927
43925
  function generateBinPath() {
43928
43926
  if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
43929
- if (!fs33.existsSync(ESBUILD_BINARY_PATH)) {
43927
+ if (!fs32.existsSync(ESBUILD_BINARY_PATH)) {
43930
43928
  console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
43931
43929
  } else {
43932
43930
  return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
@@ -43938,7 +43936,7 @@ ${file}:${line2}:${column}: ERROR: ${pluginText}${e.text}`;
43938
43936
  binPath = __require2.resolve(`${pkg}/${subpath}`);
43939
43937
  } catch (e) {
43940
43938
  binPath = downloadedBinPath(pkg, subpath);
43941
- if (!fs33.existsSync(binPath)) {
43939
+ if (!fs32.existsSync(binPath)) {
43942
43940
  try {
43943
43941
  __require2.resolve(pkg);
43944
43942
  } catch {
@@ -44014,10 +44012,10 @@ for your current platform.`);
44014
44012
  if (pnpapi) {
44015
44013
  const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
44016
44014
  const binTargetPath = path3.join(root, "node_modules", ".cache", "esbuild", `pnpapi-${pkg.replace("/", "-")}-0.25.5-${path3.basename(subpath)}`);
44017
- if (!fs33.existsSync(binTargetPath)) {
44018
- fs33.mkdirSync(path3.dirname(binTargetPath), { recursive: true });
44019
- fs33.copyFileSync(binPath, binTargetPath);
44020
- fs33.chmodSync(binTargetPath, 493);
44015
+ if (!fs32.existsSync(binTargetPath)) {
44016
+ fs32.mkdirSync(path3.dirname(binTargetPath), { recursive: true });
44017
+ fs32.copyFileSync(binPath, binTargetPath);
44018
+ fs32.chmodSync(binTargetPath, 493);
44021
44019
  }
44022
44020
  return { binPath: binTargetPath, isWASM };
44023
44021
  }
@@ -44026,7 +44024,7 @@ for your current platform.`);
44026
44024
  }
44027
44025
  var child_process = __require2("child_process");
44028
44026
  var crypto32 = __require2("crypto");
44029
- var path23 = __require2("path");
44027
+ var path22 = __require2("path");
44030
44028
  var fs222 = __require2("fs");
44031
44029
  var os22 = __require2("os");
44032
44030
  var tty2 = __require2("tty");
@@ -44043,7 +44041,7 @@ for your current platform.`);
44043
44041
  var _a;
44044
44042
  var isInternalWorkerThread = ((_a = worker_threads == null ? undefined : worker_threads.workerData) == null ? undefined : _a.esbuildVersion) === "0.25.5";
44045
44043
  var esbuildCommandAndArgs = () => {
44046
- if ((!ESBUILD_BINARY_PATH || false) && (path23.basename(__filename2) !== "main.js" || path23.basename(__dirname2) !== "lib")) {
44044
+ if ((!ESBUILD_BINARY_PATH || false) && (path22.basename(__filename2) !== "main.js" || path22.basename(__dirname2) !== "lib")) {
44047
44045
  throw new Error(`The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
44048
44046
 
44049
44047
  More information: The file containing the code for esbuild's JavaScript API (${__filename2}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.`);
@@ -44339,7 +44337,7 @@ More information: The file containing the code for esbuild's JavaScript API (${_
44339
44337
  afterClose(null);
44340
44338
  };
44341
44339
  var randomFileName = () => {
44342
- return path23.join(os22.tmpdir(), `esbuild-${crypto32.randomBytes(32).toString("hex")}`);
44340
+ return path22.join(os22.tmpdir(), `esbuild-${crypto32.randomBytes(32).toString("hex")}`);
44343
44341
  };
44344
44342
  var workerThreadService = null;
44345
44343
  var startWorkerThreadService = (worker_threads2) => {
@@ -46918,11 +46916,11 @@ var require_node22 = __commonJS2((exports) => {
46918
46916
  var require_source_map_support = __commonJS22((exports2, module22) => {
46919
46917
  var SourceMapConsumer = require_source_map().SourceMapConsumer;
46920
46918
  var path3 = __require2("path");
46921
- var fs33;
46919
+ var fs32;
46922
46920
  try {
46923
- fs33 = __require2("fs");
46924
- if (!fs33.existsSync || !fs33.readFileSync) {
46925
- fs33 = null;
46921
+ fs32 = __require2("fs");
46922
+ if (!fs32.existsSync || !fs32.readFileSync) {
46923
+ fs32 = null;
46926
46924
  }
46927
46925
  } catch (err2) {}
46928
46926
  var bufferFrom = require_buffer_from();
@@ -46960,30 +46958,30 @@ var require_node22 = __commonJS2((exports) => {
46960
46958
  };
46961
46959
  }
46962
46960
  var retrieveFile = handlerExec(retrieveFileHandlers);
46963
- retrieveFileHandlers.push(function(path23) {
46964
- path23 = path23.trim();
46965
- if (/^file:/.test(path23)) {
46966
- path23 = path23.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
46961
+ retrieveFileHandlers.push(function(path22) {
46962
+ path22 = path22.trim();
46963
+ if (/^file:/.test(path22)) {
46964
+ path22 = path22.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
46967
46965
  return drive ? "" : "/";
46968
46966
  });
46969
46967
  }
46970
- if (path23 in fileContentsCache) {
46971
- return fileContentsCache[path23];
46968
+ if (path22 in fileContentsCache) {
46969
+ return fileContentsCache[path22];
46972
46970
  }
46973
46971
  var contents = "";
46974
46972
  try {
46975
- if (!fs33) {
46973
+ if (!fs32) {
46976
46974
  var xhr = new XMLHttpRequest;
46977
- xhr.open("GET", path23, false);
46975
+ xhr.open("GET", path22, false);
46978
46976
  xhr.send(null);
46979
46977
  if (xhr.readyState === 4 && xhr.status === 200) {
46980
46978
  contents = xhr.responseText;
46981
46979
  }
46982
- } else if (fs33.existsSync(path23)) {
46983
- contents = fs33.readFileSync(path23, "utf8");
46980
+ } else if (fs32.existsSync(path22)) {
46981
+ contents = fs32.readFileSync(path22, "utf8");
46984
46982
  }
46985
46983
  } catch (er2) {}
46986
- return fileContentsCache[path23] = contents;
46984
+ return fileContentsCache[path22] = contents;
46987
46985
  });
46988
46986
  function supportRelativeURL(file, url) {
46989
46987
  if (!file)
@@ -47244,9 +47242,9 @@ var require_node22 = __commonJS2((exports) => {
47244
47242
  var line2 = +match[2];
47245
47243
  var column = +match[3];
47246
47244
  var contents = fileContentsCache[source];
47247
- if (!contents && fs33 && fs33.existsSync(source)) {
47245
+ if (!contents && fs32 && fs32.existsSync(source)) {
47248
47246
  try {
47249
- contents = fs33.readFileSync(source, "utf8");
47247
+ contents = fs32.readFileSync(source, "utf8");
47250
47248
  } catch (er2) {
47251
47249
  contents = "";
47252
47250
  }
@@ -47790,13 +47788,13 @@ If you have no idea what this means or what Pirates is, let me explain: Pirates
47790
47788
  var require_filesystem = __commonJS22((exports2) => {
47791
47789
  Object.defineProperty(exports2, "__esModule", { value: true });
47792
47790
  exports2.removeExtension = exports2.fileExistsAsync = exports2.readJsonFromDiskAsync = exports2.readJsonFromDiskSync = exports2.fileExistsSync = undefined;
47793
- var fs33 = __require2("fs");
47791
+ var fs32 = __require2("fs");
47794
47792
  function fileExistsSync(path3) {
47795
- if (!fs33.existsSync(path3)) {
47793
+ if (!fs32.existsSync(path3)) {
47796
47794
  return false;
47797
47795
  }
47798
47796
  try {
47799
- var stats = fs33.statSync(path3);
47797
+ var stats = fs32.statSync(path3);
47800
47798
  return stats.isFile();
47801
47799
  } catch (err2) {
47802
47800
  return false;
@@ -47804,14 +47802,14 @@ If you have no idea what this means or what Pirates is, let me explain: Pirates
47804
47802
  }
47805
47803
  exports2.fileExistsSync = fileExistsSync;
47806
47804
  function readJsonFromDiskSync(packageJsonPath) {
47807
- if (!fs33.existsSync(packageJsonPath)) {
47805
+ if (!fs32.existsSync(packageJsonPath)) {
47808
47806
  return;
47809
47807
  }
47810
47808
  return __require2(packageJsonPath);
47811
47809
  }
47812
47810
  exports2.readJsonFromDiskSync = readJsonFromDiskSync;
47813
47811
  function readJsonFromDiskAsync(path3, callback) {
47814
- fs33.readFile(path3, "utf8", function(err2, result) {
47812
+ fs32.readFile(path3, "utf8", function(err2, result) {
47815
47813
  if (err2 || !result) {
47816
47814
  return callback();
47817
47815
  }
@@ -47820,8 +47818,8 @@ If you have no idea what this means or what Pirates is, let me explain: Pirates
47820
47818
  });
47821
47819
  }
47822
47820
  exports2.readJsonFromDiskAsync = readJsonFromDiskAsync;
47823
- function fileExistsAsync(path23, callback2) {
47824
- fs33.stat(path23, function(err2, stats) {
47821
+ function fileExistsAsync(path22, callback2) {
47822
+ fs32.stat(path22, function(err2, stats) {
47825
47823
  if (err2) {
47826
47824
  return callback2(undefined, false);
47827
47825
  }
@@ -49264,7 +49262,7 @@ If you have no idea what this means or what Pirates is, let me explain: Pirates
49264
49262
  Object.defineProperty(exports2, "__esModule", { value: true });
49265
49263
  exports2.loadTsconfig = exports2.walkForTsConfig = exports2.tsConfigLoader = undefined;
49266
49264
  var path3 = __require2("path");
49267
- var fs33 = __require2("fs");
49265
+ var fs32 = __require2("fs");
49268
49266
  var JSON5 = require_lib3();
49269
49267
  var StripBom = require_strip_bom();
49270
49268
  function tsConfigLoader(_a) {
@@ -49293,10 +49291,10 @@ If you have no idea what this means or what Pirates is, let me explain: Pirates
49293
49291
  }
49294
49292
  function resolveConfigPath(cwd, filename) {
49295
49293
  if (filename) {
49296
- var absolutePath = fs33.lstatSync(filename).isDirectory() ? path3.resolve(filename, "./tsconfig.json") : path3.resolve(cwd, filename);
49294
+ var absolutePath = fs32.lstatSync(filename).isDirectory() ? path3.resolve(filename, "./tsconfig.json") : path3.resolve(cwd, filename);
49297
49295
  return absolutePath;
49298
49296
  }
49299
- if (fs33.statSync(cwd).isFile()) {
49297
+ if (fs32.statSync(cwd).isFile()) {
49300
49298
  return path3.resolve(cwd);
49301
49299
  }
49302
49300
  var configAbsolutePath = walkForTsConfig(cwd);
@@ -49304,7 +49302,7 @@ If you have no idea what this means or what Pirates is, let me explain: Pirates
49304
49302
  }
49305
49303
  function walkForTsConfig(directory, readdirSync) {
49306
49304
  if (readdirSync === undefined) {
49307
- readdirSync = fs33.readdirSync;
49305
+ readdirSync = fs32.readdirSync;
49308
49306
  }
49309
49307
  var files = readdirSync(directory);
49310
49308
  var filesToCheck = ["tsconfig.json", "jsconfig.json"];
@@ -49323,11 +49321,11 @@ If you have no idea what this means or what Pirates is, let me explain: Pirates
49323
49321
  exports2.walkForTsConfig = walkForTsConfig;
49324
49322
  function loadTsconfig(configFilePath, existsSync2, readFileSync2) {
49325
49323
  if (existsSync2 === undefined) {
49326
- existsSync2 = fs33.existsSync;
49324
+ existsSync2 = fs32.existsSync;
49327
49325
  }
49328
49326
  if (readFileSync2 === undefined) {
49329
49327
  readFileSync2 = function(filename) {
49330
- return fs33.readFileSync(filename, "utf8");
49328
+ return fs32.readFileSync(filename, "utf8");
49331
49329
  };
49332
49330
  }
49333
49331
  if (!existsSync2(configFilePath)) {
@@ -50957,7 +50955,7 @@ function mapColumnsInSQLToAlias2(query, alias) {
50957
50955
  }
50958
50956
  function mapResultRow2(columns, row, joinsNotNullableMap) {
50959
50957
  const nullifyMap = {};
50960
- const result = columns.reduce((result2, { path: path23, field }, columnIndex) => {
50958
+ const result = columns.reduce((result2, { path: path22, field }, columnIndex) => {
50961
50959
  let decoder;
50962
50960
  if (is2(field, Column2)) {
50963
50961
  decoder = field;
@@ -50967,8 +50965,8 @@ function mapResultRow2(columns, row, joinsNotNullableMap) {
50967
50965
  decoder = field.sql.decoder;
50968
50966
  }
50969
50967
  let node = result2;
50970
- for (const [pathChunkIndex, pathChunk] of path23.entries()) {
50971
- if (pathChunkIndex < path23.length - 1) {
50968
+ for (const [pathChunkIndex, pathChunk] of path22.entries()) {
50969
+ if (pathChunkIndex < path22.length - 1) {
50972
50970
  if (!(pathChunk in node)) {
50973
50971
  node[pathChunk] = {};
50974
50972
  }
@@ -50976,8 +50974,8 @@ function mapResultRow2(columns, row, joinsNotNullableMap) {
50976
50974
  } else {
50977
50975
  const rawValue = row[columnIndex];
50978
50976
  const value = node[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);
50979
- if (joinsNotNullableMap && is2(field, Column2) && path23.length === 2) {
50980
- const objectName = path23[0];
50977
+ if (joinsNotNullableMap && is2(field, Column2) && path22.length === 2) {
50978
+ const objectName = path22[0];
50981
50979
  if (!(objectName in nullifyMap)) {
50982
50980
  nullifyMap[objectName] = value === null ? getTableName2(field.table) : false;
50983
50981
  } else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName2(field.table)) {
@@ -55789,7 +55787,7 @@ var init_api = __esm(() => {
55789
55787
  "../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports) {
55790
55788
  var pathModule = __require22("path");
55791
55789
  var isWindows = process.platform === "win32";
55792
- var fs33 = __require22("fs");
55790
+ var fs32 = __require22("fs");
55793
55791
  var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
55794
55792
  function rethrow() {
55795
55793
  var callback;
@@ -55854,7 +55852,7 @@ var init_api = __esm(() => {
55854
55852
  base = m4[0];
55855
55853
  previous = "";
55856
55854
  if (isWindows && !knownHard[base]) {
55857
- fs33.lstatSync(base);
55855
+ fs32.lstatSync(base);
55858
55856
  knownHard[base] = true;
55859
55857
  }
55860
55858
  }
@@ -55872,7 +55870,7 @@ var init_api = __esm(() => {
55872
55870
  if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
55873
55871
  resolvedLink = cache[base];
55874
55872
  } else {
55875
- var stat = fs33.lstatSync(base);
55873
+ var stat = fs32.lstatSync(base);
55876
55874
  if (!stat.isSymbolicLink()) {
55877
55875
  knownHard[base] = true;
55878
55876
  if (cache)
@@ -55887,8 +55885,8 @@ var init_api = __esm(() => {
55887
55885
  }
55888
55886
  }
55889
55887
  if (linkTarget === null) {
55890
- fs33.statSync(base);
55891
- linkTarget = fs33.readlinkSync(base);
55888
+ fs32.statSync(base);
55889
+ linkTarget = fs32.readlinkSync(base);
55892
55890
  }
55893
55891
  resolvedLink = pathModule.resolve(previous, linkTarget);
55894
55892
  if (cache)
@@ -55925,7 +55923,7 @@ var init_api = __esm(() => {
55925
55923
  base = m4[0];
55926
55924
  previous = "";
55927
55925
  if (isWindows && !knownHard[base]) {
55928
- fs33.lstat(base, function(err2) {
55926
+ fs32.lstat(base, function(err2) {
55929
55927
  if (err2)
55930
55928
  return cb(err2);
55931
55929
  knownHard[base] = true;
@@ -55953,7 +55951,7 @@ var init_api = __esm(() => {
55953
55951
  if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
55954
55952
  return gotResolvedLink(cache[base]);
55955
55953
  }
55956
- return fs33.lstat(base, gotStat);
55954
+ return fs32.lstat(base, gotStat);
55957
55955
  }
55958
55956
  function gotStat(err2, stat) {
55959
55957
  if (err2)
@@ -55970,10 +55968,10 @@ var init_api = __esm(() => {
55970
55968
  return gotTarget(null, seenLinks[id], base);
55971
55969
  }
55972
55970
  }
55973
- fs33.stat(base, function(err22) {
55971
+ fs32.stat(base, function(err22) {
55974
55972
  if (err22)
55975
55973
  return cb(err22);
55976
- fs33.readlink(base, function(err3, target) {
55974
+ fs32.readlink(base, function(err3, target) {
55977
55975
  if (!isWindows)
55978
55976
  seenLinks[id] = target;
55979
55977
  gotTarget(err3, target);
@@ -56003,9 +56001,9 @@ var init_api = __esm(() => {
56003
56001
  realpath.realpathSync = realpathSync;
56004
56002
  realpath.monkeypatch = monkeypatch;
56005
56003
  realpath.unmonkeypatch = unmonkeypatch;
56006
- var fs33 = __require22("fs");
56007
- var origRealpath = fs33.realpath;
56008
- var origRealpathSync = fs33.realpathSync;
56004
+ var fs32 = __require22("fs");
56005
+ var origRealpath = fs32.realpath;
56006
+ var origRealpathSync = fs32.realpathSync;
56009
56007
  var version22 = process.version;
56010
56008
  var ok = /^v[0-5]\./.test(version22);
56011
56009
  var old = require_old();
@@ -56043,12 +56041,12 @@ var init_api = __esm(() => {
56043
56041
  }
56044
56042
  }
56045
56043
  function monkeypatch() {
56046
- fs33.realpath = realpath;
56047
- fs33.realpathSync = realpathSync;
56044
+ fs32.realpath = realpath;
56045
+ fs32.realpathSync = realpathSync;
56048
56046
  }
56049
56047
  function unmonkeypatch() {
56050
- fs33.realpath = origRealpath;
56051
- fs33.realpathSync = origRealpathSync;
56048
+ fs32.realpath = origRealpath;
56049
+ fs32.realpathSync = origRealpathSync;
56052
56050
  }
56053
56051
  }
56054
56052
  });
@@ -56274,8 +56272,8 @@ var init_api = __esm(() => {
56274
56272
  return new Minimatch2(pattern, options).match(p3);
56275
56273
  };
56276
56274
  module2.exports = minimatch2;
56277
- var path23 = require_path2();
56278
- minimatch2.sep = path23.sep;
56275
+ var path22 = require_path2();
56276
+ minimatch2.sep = path22.sep;
56279
56277
  var GLOBSTAR2 = Symbol("globstar **");
56280
56278
  minimatch2.GLOBSTAR = GLOBSTAR2;
56281
56279
  var expand2 = require_brace_expansion3();
@@ -56788,8 +56786,8 @@ globstar while`, file, fr, pattern, pr2, swallowee);
56788
56786
  if (f3 === "/" && partial)
56789
56787
  return true;
56790
56788
  const options = this.options;
56791
- if (path23.sep !== "/") {
56792
- f3 = f3.split(path23.sep).join("/");
56789
+ if (path22.sep !== "/") {
56790
+ f3 = f3.split(path22.sep).join("/");
56793
56791
  }
56794
56792
  f3 = f3.split(slashSplit);
56795
56793
  this.debug(this.pattern, "split", f3);
@@ -56879,8 +56877,8 @@ globstar while`, file, fr, pattern, pr2, swallowee);
56879
56877
  function ownProp(obj, field) {
56880
56878
  return Object.prototype.hasOwnProperty.call(obj, field);
56881
56879
  }
56882
- var fs33 = __require22("fs");
56883
- var path23 = __require22("path");
56880
+ var fs32 = __require22("fs");
56881
+ var path22 = __require22("path");
56884
56882
  var minimatch2 = require_minimatch2();
56885
56883
  var isAbsolute2 = __require22("path").isAbsolute;
56886
56884
  var Minimatch2 = minimatch2.Minimatch;
@@ -56938,7 +56936,7 @@ globstar while`, file, fr, pattern, pr2, swallowee);
56938
56936
  self2.stat = !!options.stat;
56939
56937
  self2.noprocess = !!options.noprocess;
56940
56938
  self2.absolute = !!options.absolute;
56941
- self2.fs = options.fs || fs33;
56939
+ self2.fs = options.fs || fs32;
56942
56940
  self2.maxLength = options.maxLength || Infinity;
56943
56941
  self2.cache = options.cache || /* @__PURE__ */ Object.create(null);
56944
56942
  self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
@@ -56947,13 +56945,13 @@ globstar while`, file, fr, pattern, pr2, swallowee);
56947
56945
  self2.changedCwd = false;
56948
56946
  var cwd = process.cwd();
56949
56947
  if (!ownProp(options, "cwd"))
56950
- self2.cwd = path23.resolve(cwd);
56948
+ self2.cwd = path22.resolve(cwd);
56951
56949
  else {
56952
- self2.cwd = path23.resolve(options.cwd);
56950
+ self2.cwd = path22.resolve(options.cwd);
56953
56951
  self2.changedCwd = self2.cwd !== cwd;
56954
56952
  }
56955
- self2.root = options.root || path23.resolve(self2.cwd, "/");
56956
- self2.root = path23.resolve(self2.root);
56953
+ self2.root = options.root || path22.resolve(self2.cwd, "/");
56954
+ self2.root = path22.resolve(self2.root);
56957
56955
  self2.cwdAbs = isAbsolute2(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
56958
56956
  self2.nomount = !!options.nomount;
56959
56957
  if (process.platform === "win32") {
@@ -57035,13 +57033,13 @@ globstar while`, file, fr, pattern, pr2, swallowee);
57035
57033
  function makeAbs(self2, f3) {
57036
57034
  var abs = f3;
57037
57035
  if (f3.charAt(0) === "/") {
57038
- abs = path23.join(self2.root, f3);
57036
+ abs = path22.join(self2.root, f3);
57039
57037
  } else if (isAbsolute2(f3) || f3 === "") {
57040
57038
  abs = f3;
57041
57039
  } else if (self2.changedCwd) {
57042
- abs = path23.resolve(self2.cwd, f3);
57040
+ abs = path22.resolve(self2.cwd, f3);
57043
57041
  } else {
57044
- abs = path23.resolve(f3);
57042
+ abs = path22.resolve(f3);
57045
57043
  }
57046
57044
  if (process.platform === "win32")
57047
57045
  abs = abs.replace(/\\/g, "/");
@@ -57072,7 +57070,7 @@ globstar while`, file, fr, pattern, pr2, swallowee);
57072
57070
  var Minimatch2 = minimatch2.Minimatch;
57073
57071
  var Glob = require_glob2().Glob;
57074
57072
  var util22 = __require22("util");
57075
- var path23 = __require22("path");
57073
+ var path22 = __require22("path");
57076
57074
  var assert2 = __require22("assert");
57077
57075
  var isAbsolute2 = __require22("path").isAbsolute;
57078
57076
  var common = require_common2();
@@ -57202,7 +57200,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
57202
57200
  e = prefix2 + e;
57203
57201
  }
57204
57202
  if (e.charAt(0) === "/" && !this.nomount) {
57205
- e = path23.join(this.root, e);
57203
+ e = path22.join(this.root, e);
57206
57204
  }
57207
57205
  this._emitMatch(index6, e);
57208
57206
  }
@@ -57351,9 +57349,9 @@ See: https://github.com/isaacs/node-glob/issues/167`);
57351
57349
  if (prefix2 && isAbsolute2(prefix2) && !this.nomount) {
57352
57350
  var trail = /[\/\\]$/.test(prefix2);
57353
57351
  if (prefix2.charAt(0) === "/") {
57354
- prefix2 = path23.join(this.root, prefix2);
57352
+ prefix2 = path22.join(this.root, prefix2);
57355
57353
  } else {
57356
- prefix2 = path23.resolve(this.root, prefix2);
57354
+ prefix2 = path22.resolve(this.root, prefix2);
57357
57355
  if (trail)
57358
57356
  prefix2 += "/";
57359
57357
  }
@@ -57540,7 +57538,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
57540
57538
  var Minimatch2 = minimatch2.Minimatch;
57541
57539
  var inherits = require_inherits2();
57542
57540
  var EE = __require22("events").EventEmitter;
57543
- var path23 = __require22("path");
57541
+ var path22 = __require22("path");
57544
57542
  var assert2 = __require22("assert");
57545
57543
  var isAbsolute2 = __require22("path").isAbsolute;
57546
57544
  var globSync = require_sync();
@@ -57823,7 +57821,7 @@ See: https://github.com/isaacs/node-glob/issues/167`);
57823
57821
  e = prefix2 + e;
57824
57822
  }
57825
57823
  if (e.charAt(0) === "/" && !this.nomount) {
57826
- e = path23.join(this.root, e);
57824
+ e = path22.join(this.root, e);
57827
57825
  }
57828
57826
  this._emitMatch(index6, e);
57829
57827
  }
@@ -58010,9 +58008,9 @@ See: https://github.com/isaacs/node-glob/issues/167`);
58010
58008
  if (prefix2 && isAbsolute2(prefix2) && !this.nomount) {
58011
58009
  var trail = /[\/\\]$/.test(prefix2);
58012
58010
  if (prefix2.charAt(0) === "/") {
58013
- prefix2 = path23.join(this.root, prefix2);
58011
+ prefix2 = path22.join(this.root, prefix2);
58014
58012
  } else {
58015
- prefix2 = path23.resolve(this.root, prefix2);
58013
+ prefix2 = path22.resolve(this.root, prefix2);
58016
58014
  if (trail)
58017
58015
  prefix2 += "/";
58018
58016
  }
@@ -58975,8 +58973,8 @@ See: https://github.com/isaacs/node-glob/issues/167`);
58975
58973
  };
58976
58974
  overrideErrorMap = errorMap;
58977
58975
  makeIssue = (params) => {
58978
- const { data, path: path23, errorMaps, issueData } = params;
58979
- const fullPath = [...path23, ...issueData.path || []];
58976
+ const { data, path: path22, errorMaps, issueData } = params;
58977
+ const fullPath = [...path22, ...issueData.path || []];
58980
58978
  const fullIssue = {
58981
58979
  ...issueData,
58982
58980
  path: fullPath
@@ -59067,11 +59065,11 @@ See: https://github.com/isaacs/node-glob/issues/167`);
59067
59065
  errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === undefined ? undefined : message.message;
59068
59066
  })(errorUtil || (errorUtil = {}));
59069
59067
  ParseInputLazyPath = class {
59070
- constructor(parent, value, path23, key) {
59068
+ constructor(parent, value, path22, key) {
59071
59069
  this._cachedPath = [];
59072
59070
  this.parent = parent;
59073
59071
  this.data = value;
59074
- this._path = path23;
59072
+ this._path = path22;
59075
59073
  this._key = key;
59076
59074
  }
59077
59075
  get path() {
@@ -94503,13 +94501,13 @@ var RegExpRouter = class {
94503
94501
  }
94504
94502
  const paths = checkOptionalParameter(path4) || [path4];
94505
94503
  for (let i22 = 0, len = paths.length;i22 < len; i22++) {
94506
- const path23 = paths[i22];
94504
+ const path22 = paths[i22];
94507
94505
  Object.keys(routes).forEach((m) => {
94508
94506
  if (method === METHOD_NAME_ALL || method === m) {
94509
- routes[m][path23] ||= [
94510
- ...findMiddleware(middleware[m], path23) || findMiddleware(middleware[METHOD_NAME_ALL], path23) || []
94507
+ routes[m][path22] ||= [
94508
+ ...findMiddleware(middleware[m], path22) || findMiddleware(middleware[METHOD_NAME_ALL], path22) || []
94511
94509
  ];
94512
- routes[m][path23].push([handler, paramCount - len + i22 + 1]);
94510
+ routes[m][path22].push([handler, paramCount - len + i22 + 1]);
94513
94511
  }
94514
94512
  });
94515
94513
  }
@@ -94517,13 +94515,13 @@ var RegExpRouter = class {
94517
94515
  match(method, path4) {
94518
94516
  clearWildcardRegExpCache();
94519
94517
  const matchers = this.#buildAllMatchers();
94520
- this.match = (method2, path23) => {
94518
+ this.match = (method2, path22) => {
94521
94519
  const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];
94522
- const staticMatch = matcher[2][path23];
94520
+ const staticMatch = matcher[2][path22];
94523
94521
  if (staticMatch) {
94524
94522
  return staticMatch;
94525
94523
  }
94526
- const match2 = path23.match(matcher[0]);
94524
+ const match2 = path22.match(matcher[0]);
94527
94525
  if (!match2) {
94528
94526
  return [[], emptyParam];
94529
94527
  }
@@ -94915,7 +94913,7 @@ var logger = (fn = console.log) => {
94915
94913
  };
94916
94914
  var package_default = {
94917
94915
  name: "@playcademy/sandbox",
94918
- version: "0.1.0-beta.12",
94916
+ version: "0.1.0-beta.13",
94919
94917
  description: "Local development server for Playcademy game development",
94920
94918
  type: "module",
94921
94919
  exports: {
@@ -108116,6 +108114,10 @@ async function startRealtimeServer(realtimeOptions, betterAuthSecret) {
108116
108114
  if (!realtimeOptions.enabled) {
108117
108115
  return null;
108118
108116
  }
108117
+ if (typeof Bun === "undefined") {
108118
+ console.warn("[sandbox] Bun runtime not detected – realtime server disabled.");
108119
+ return null;
108120
+ }
108119
108121
  try {
108120
108122
  return await createRealtimeServer({
108121
108123
  port: realtimeOptions.port,
@@ -108626,8 +108628,8 @@ function getErrorMap2() {
108626
108628
  return overrideErrorMap2;
108627
108629
  }
108628
108630
  var makeIssue2 = (params) => {
108629
- const { data, path: path23, errorMaps, issueData } = params;
108630
- const fullPath = [...path23, ...issueData.path || []];
108631
+ const { data, path: path22, errorMaps, issueData } = params;
108632
+ const fullPath = [...path22, ...issueData.path || []];
108631
108633
  const fullIssue = {
108632
108634
  ...issueData,
108633
108635
  path: fullPath
@@ -108737,11 +108739,11 @@ var errorUtil2;
108737
108739
  })(errorUtil2 || (errorUtil2 = {}));
108738
108740
 
108739
108741
  class ParseInputLazyPath2 {
108740
- constructor(parent, value, path23, key) {
108742
+ constructor(parent, value, path22, key) {
108741
108743
  this._cachedPath = [];
108742
108744
  this.parent = parent;
108743
108745
  this.data = value;
108744
- this._path = path23;
108746
+ this._path = path22;
108745
108747
  this._key = key;
108746
108748
  }
108747
108749
  get path() {
@@ -112420,10 +112422,10 @@ var CreateDeveloperKeyInputSchema = InsertDeveloperKeySchema.pick({
112420
112422
  });
112421
112423
  var safeRelativePathRegex = /^(?!.*\.\.)(?!\/)[\w\-./]+$/;
112422
112424
  var invalidPathMessage = "Path must be relative, contain only alphanumeric, -, _, ., / characters, and not contain .. segments.";
112423
- var validateRelativePath = (path23, fieldName) => {
112424
- if (path23 == null)
112425
+ var validateRelativePath = (path22, fieldName) => {
112426
+ if (path22 == null)
112425
112427
  return true;
112426
- if (typeof path23 !== "string" || !safeRelativePathRegex.test(path23)) {
112428
+ if (typeof path22 !== "string" || !safeRelativePathRegex.test(path22)) {
112427
112429
  throw new exports_external.ZodError([
112428
112430
  {
112429
112431
  code: exports_external.ZodIssueCode.custom,
@@ -112535,10 +112537,10 @@ var ManifestV1Schema = exports_external.object({
112535
112537
  });
112536
112538
  var safeRelativePathRegex2 = /^(?!.*\.\.)(?!\/)[\w\-./]+$/;
112537
112539
  var invalidPathMessage2 = "Path must be relative, contain only alphanumeric, -, _, ., / characters, and not contain .. segments.";
112538
- var validateRelativePath2 = (path23, fieldName) => {
112539
- if (path23 == null)
112540
+ var validateRelativePath2 = (path22, fieldName) => {
112541
+ if (path22 == null)
112540
112542
  return true;
112541
- if (typeof path23 !== "string" || !safeRelativePathRegex2.test(path23)) {
112543
+ if (typeof path22 !== "string" || !safeRelativePathRegex2.test(path22)) {
112542
112544
  throw new exports_external.ZodError([
112543
112545
  {
112544
112546
  code: exports_external.ZodIssueCode.custom,
@@ -114359,37 +114361,6 @@ async function saveGameState(ctx) {
114359
114361
  throw ApiError.internal("Internal server error", error2);
114360
114362
  }
114361
114363
  }
114362
- function findMonorepoRootInternal(startDir) {
114363
- let currentDir = startDir;
114364
- while (true) {
114365
- const packageJsonPath = path22.join(currentDir, "package.json");
114366
- if (fs32.existsSync(packageJsonPath)) {
114367
- try {
114368
- const packageJsonContent = fs32.readFileSync(packageJsonPath, "utf-8");
114369
- const packageJson = JSON.parse(packageJsonContent);
114370
- if (packageJson && typeof packageJson === "object" && "workspaces" in packageJson) {
114371
- return currentDir;
114372
- }
114373
- } catch (parseError) {
114374
- log2.warn(`[utils/paths] Error parsing ${packageJsonPath}:`, {
114375
- error: parseError
114376
- });
114377
- }
114378
- }
114379
- const parentDir = path22.dirname(currentDir);
114380
- if (parentDir === currentDir) {
114381
- throw new Error("Could not find monorepo root (package.json with workspaces) starting from " + startDir);
114382
- }
114383
- currentDir = parentDir;
114384
- }
114385
- }
114386
- var determinedRoot;
114387
- try {
114388
- determinedRoot = findMonorepoRootInternal(process.cwd());
114389
- } catch (error2) {
114390
- determinedRoot = process.cwd();
114391
- log2.warn("[utils/paths] Could not locate monorepo root via workspace package.json scan. Falling back to process.cwd() (", { root: determinedRoot, error: error2 });
114392
- }
114393
114364
  var UUID_REGEX = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
114394
114365
  function isValidUUID(value) {
114395
114366
  if (!value || typeof value !== "string") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcademy/vite-plugin",
3
- "version": "0.0.1-beta.16",
3
+ "version": "0.0.1-beta.17",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {