@toon-protocol/townhouse 0.1.2 → 0.1.3

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.
@@ -18337,18 +18337,24 @@ function buildCorsOptions() {
18337
18337
  // src/api/build-app.ts
18338
18338
  var STARTED_AT = (/* @__PURE__ */ new Date()).toISOString();
18339
18339
  var _localRequire = nodeCreateRequire(import.meta.url);
18340
- function _loadPackageJson() {
18341
- for (const rel of ["../package.json", "../../package.json"]) {
18340
+ function _resolvePackageVersion(req = _localRequire, env = process.env) {
18341
+ for (const rel of [
18342
+ "../package.json",
18343
+ "../../package.json",
18344
+ "./package.json"
18345
+ ]) {
18342
18346
  try {
18343
- return _localRequire(rel);
18347
+ const pkg = req(rel);
18348
+ if (pkg && typeof pkg.version === "string") {
18349
+ return pkg.version;
18350
+ }
18344
18351
  } catch {
18345
18352
  }
18346
18353
  }
18347
- throw new Error(
18348
- "build-app.ts: could not resolve package.json from '../package.json' or '../../package.json'. Bundle layout may have changed \u2014 update the resolution ladder."
18349
- );
18354
+ const envVersion = env["TOWNHOUSE_VERSION"];
18355
+ return typeof envVersion === "string" && envVersion.length > 0 ? envVersion : "0.0.0-unknown";
18350
18356
  }
18351
- var _pkgVersion = _loadPackageJson()["version"];
18357
+ var _pkgVersion = _resolvePackageVersion();
18352
18358
  var LOOPBACK_HOSTS = ["127.0.0.1", "::1", "localhost"];
18353
18359
  async function buildFastifyApp(opts = {}) {
18354
18360
  const bindHost = opts.bindHost ?? "127.0.0.1";
@@ -22108,4 +22114,4 @@ export {
22108
22114
  @scure/bip32/index.js:
22109
22115
  (*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
22110
22116
  */
22111
- //# sourceMappingURL=chunk-W33MEOPM.js.map
22117
+ //# sourceMappingURL=chunk-QHFUIWEN.js.map