@absolutejs/absolute 0.20.0-beta.125 → 0.20.0-beta.126

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.
@@ -15,7 +15,7 @@ import {
15
15
  createIslandRegistryDefinitionPlugin,
16
16
  finalizeAbsoluteMobileCompatibilityBuild,
17
17
  resolveServerBundleExternals
18
- } from "./index-k8r00xh9.js";
18
+ } from "./index-q4gpm386.js";
19
19
  import {
20
20
  loadIslandRegistryBuildInfo
21
21
  } from "./index-bzs19w3r.js";
@@ -6,7 +6,7 @@ import {
6
6
  createIslandRegistryDefinitionPlugin,
7
7
  finalizeAbsoluteMobileCompatibilityBuild,
8
8
  resolveServerBundleExternals
9
- } from "./index-k8r00xh9.js";
9
+ } from "./index-q4gpm386.js";
10
10
  import {
11
11
  loadIslandRegistryBuildInfo
12
12
  } from "./index-bzs19w3r.js";
@@ -1999,6 +1999,8 @@ var createElysiaOpenApiTypeboxPlugin = () => ({
1999
1999
  });
2000
2000
 
2001
2001
  // src/cli/serverBundleExternals.ts
2002
+ import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
2003
+ import { join as join5 } from "path";
2002
2004
  var FRAMEWORK_EXTERNALS = [
2003
2005
  "react",
2004
2006
  "react/jsx-runtime",
@@ -2027,7 +2029,24 @@ var collectUserServerExternals = (buildConfig) => {
2027
2029
  const fromDefault = Array.isArray(defaultBuild?.external) ? defaultBuild.external : [];
2028
2030
  return [...override, ...fromDefault];
2029
2031
  };
2030
- var resolveServerBundleExternals = (buildConfig) => [
2032
+ var readManifest = (file) => {
2033
+ if (!existsSync3(file))
2034
+ return;
2035
+ try {
2036
+ const manifest = JSON.parse(readFileSync2(file, "utf-8"));
2037
+ return manifest;
2038
+ } catch {
2039
+ return;
2040
+ }
2041
+ };
2042
+ var isInstalled = (specifier, projectRoot) => existsSync3(join5(projectRoot, "node_modules", specifier, "package.json"));
2043
+ var collectMissingOptionalPeers = (projectRoot) => {
2044
+ const app = readManifest(join5(projectRoot, "package.json"));
2045
+ const optionalPeers = Object.keys(app?.dependencies ?? {}).flatMap((dependency) => Object.entries(readManifest(join5(projectRoot, "node_modules", dependency, "package.json"))?.peerDependenciesMeta ?? {}).filter(([, meta]) => meta.optional === true).map(([peer]) => peer));
2046
+ const missing = new Set(optionalPeers.filter((peer) => !isInstalled(peer, projectRoot)));
2047
+ return [...missing].flatMap((peer) => [peer, `${peer}/*`]);
2048
+ };
2049
+ var resolveServerBundleExternals = (buildConfig, projectRoot = process.cwd()) => [
2031
2050
  ...FRAMEWORK_EXTERNALS.filter((specifier) => {
2032
2051
  if (buildConfig.reactDirectory && (specifier === "react" || specifier.startsWith("react/") || specifier.startsWith("react-dom")))
2033
2052
  return false;
@@ -2037,7 +2056,8 @@ var resolveServerBundleExternals = (buildConfig) => [
2037
2056
  return false;
2038
2057
  return true;
2039
2058
  }),
2040
- ...collectUserServerExternals(buildConfig)
2059
+ ...collectUserServerExternals(buildConfig),
2060
+ ...collectMissingOptionalPeers(projectRoot)
2041
2061
  ];
2042
2062
 
2043
2063
  export { createIslandRegistryDefinitionPlugin, createBunStringRawUnicodePlugin, resolveAbsoluteMobileRoute, ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION, ABSOLUTE_MOBILE_CLIENT_MANIFEST_FORMAT, finalizeAbsoluteMobileCompatibilityBuild, createAbsoluteMobileRouteMetadataPlugin, createElysiaOpenApiTypeboxPlugin, resolveServerBundleExternals };
package/dist/cli/index.js CHANGED
@@ -74,7 +74,7 @@ if (command === "dev") {
74
74
  const configPath = parseNamedArg("--config");
75
75
  const positionalArgs = stripNamedArgs("--outdir", "--config").filter((arg) => arg !== "--prebuilt");
76
76
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
77
- const { start } = await import("./start-q08avhxg.js");
77
+ const { start } = await import("./start-pdacfgcc.js");
78
78
  await start(serverEntry, outdir, configPath, {
79
79
  prebuilt: args.includes("--prebuilt")
80
80
  });
@@ -84,7 +84,7 @@ if (command === "dev") {
84
84
  const configPath = parseNamedArg("--config");
85
85
  const positionalArgs = stripNamedArgs("--outdir", "--config");
86
86
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
87
- const { start } = await import("./start-q08avhxg.js");
87
+ const { start } = await import("./start-pdacfgcc.js");
88
88
  await start(serverEntry, outdir, configPath, { prepareOnly: true });
89
89
  } else if (command === "build") {
90
90
  sendTelemetryEvent("cli:command", { command });
@@ -205,13 +205,13 @@ if (command === "dev") {
205
205
  const configPath = parseNamedArg("--config");
206
206
  const positionalArgs = stripNamedArgs("--outdir", "--outfile", "--config");
207
207
  const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
208
- const { compile } = await import("./compile-hywymh6y.js");
208
+ const { compile } = await import("./compile-smcnjyhb.js");
209
209
  await compile(serverEntry, outdir, outfile, configPath);
210
210
  } else if (command === "mobile") {
211
211
  sendTelemetryEvent("cli:command", {
212
212
  command: `mobile:${workspaceCommand ?? "unknown"}`
213
213
  });
214
- const { runMobile } = await import("./mobile-6kdsrhxy.js");
214
+ const { runMobile } = await import("./mobile-50c5tahh.js");
215
215
  try {
216
216
  await runMobile(args);
217
217
  } catch (error) {
@@ -7,12 +7,12 @@ import {
7
7
  } from "./index-9r7n9dqp.js";
8
8
  import {
9
9
  start
10
- } from "./index-q3sq287p.js";
10
+ } from "./index-fx42yxhy.js";
11
11
  import {
12
12
  ABSOLUTE_MOBILE_CLIENT_MANIFEST_FORMAT,
13
13
  ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,
14
14
  resolveAbsoluteMobileRoute
15
- } from "./index-k8r00xh9.js";
15
+ } from "./index-q4gpm386.js";
16
16
  import"./index-bzs19w3r.js";
17
17
  import"./index-s2tazax7.js";
18
18
  import {
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  start
4
- } from "./index-q3sq287p.js";
5
- import"./index-k8r00xh9.js";
4
+ } from "./index-fx42yxhy.js";
5
+ import"./index-q4gpm386.js";
6
6
  import"./index-bzs19w3r.js";
7
7
  import"./index-s2tazax7.js";
8
8
  import"./index-fc9vxw56.js";
package/dist/index.js CHANGED
@@ -25899,7 +25899,7 @@ var init_compileAngular = __esm(() => {
25899
25899
 
25900
25900
  // node_modules/content-tag/pkg/node/content_tag.cjs
25901
25901
  var require_content_tag = __commonJS(function(exports, module) {
25902
- var __dirname = "/home/alexkahn/abs/absolutejs/.claude/worktrees/release/node_modules/content-tag/pkg/node";
25902
+ var __dirname = "/home/alexkahn/abs/absolutejs/.claude/worktrees/optional-peers/node_modules/content-tag/pkg/node";
25903
25903
  var imports = {};
25904
25904
  imports["__wbindgen_placeholder__"] = exports;
25905
25905
  var wasm;
@@ -45801,5 +45801,5 @@ export {
45801
45801
  wrapPageHandlerWithStreamingSlots
45802
45802
  };
45803
45803
 
45804
- //# debugId=105F7E3CA690A8B864756E2164756E21
45804
+ //# debugId=2B2220FD6E0738B064756E2164756E21
45805
45805
  //# sourceMappingURL=index.js.map