@absolutejs/absolute 0.17.6 → 0.17.8

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/cli/index.js CHANGED
@@ -1006,8 +1006,20 @@ var start = async (serverEntry, outdir, configPath2) => {
1006
1006
  try {
1007
1007
  const buildConfig = await loadConfig(configPath2);
1008
1008
  buildConfig.buildDirectory = resolvedOutdir;
1009
- const buildModule = "../../core/build";
1010
- const { build } = await import(buildModule);
1009
+ const candidates = [
1010
+ resolve6(import.meta.dir, "..", "..", "core", "build"),
1011
+ resolve6(import.meta.dir, "..", "build")
1012
+ ];
1013
+ let build;
1014
+ for (const candidate of candidates) {
1015
+ try {
1016
+ const mod = await import(candidate);
1017
+ build = mod.build;
1018
+ break;
1019
+ } catch {}
1020
+ }
1021
+ if (!build)
1022
+ throw new Error("Could not locate build module");
1011
1023
  await build(buildConfig);
1012
1024
  } catch (err) {
1013
1025
  console.error(cliTag2("\x1B[31m", "Build step failed."));
package/dist/index.js CHANGED
@@ -4,25 +4,43 @@ var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
7
12
  var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
8
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
9
21
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
22
  for (let key of __getOwnPropNames(mod))
11
23
  if (!__hasOwnProp.call(to, key))
12
24
  __defProp(to, key, {
13
- get: () => mod[key],
25
+ get: __accessProp.bind(mod, key),
14
26
  enumerable: true
15
27
  });
28
+ if (canCache)
29
+ cache.set(mod, to);
16
30
  return to;
17
31
  };
18
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
+ var __returnValue = (v) => v;
34
+ function __exportSetter(name, newValue) {
35
+ this[name] = __returnValue.bind(null, newValue);
36
+ }
19
37
  var __export = (target, all) => {
20
38
  for (var name in all)
21
39
  __defProp(target, name, {
22
40
  get: all[name],
23
41
  enumerable: true,
24
42
  configurable: true,
25
- set: (newValue) => all[name] = () => newValue
43
+ set: __exportSetter.bind(all, name)
26
44
  });
27
45
  };
28
46
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
@@ -271314,7 +271332,8 @@ Expected: export default defineConfig({ ... })`);
271314
271332
  // src/core/prepare.ts
271315
271333
  var prepare = async (configOrPath) => {
271316
271334
  const config = await loadConfig(configOrPath);
271317
- const isDev2 = true;
271335
+ const nodeEnv = process.env["NODE_ENV"];
271336
+ const isDev2 = nodeEnv === "development";
271318
271337
  const buildDir = resolve25(isDev2 ? config.buildDirectory ?? "build" : process.env.ABSOLUTE_BUILD_DIR ?? config.buildDirectory ?? "build");
271319
271338
  if (isDev2) {
271320
271339
  const { devBuild: devBuild2 } = await Promise.resolve().then(() => (init_devBuild(), exports_devBuild));
@@ -271453,5 +271472,5 @@ export {
271453
271472
  BUN_BUILD_WARNING_SUPPRESSION
271454
271473
  };
271455
271474
 
271456
- //# debugId=6A55DE3F62E246D064756E2164756E21
271475
+ //# debugId=70DA2BD239688BB664756E2164756E21
271457
271476
  //# sourceMappingURL=index.js.map