@absolutejs/absolute 0.19.0-beta.1124 → 0.19.0-beta.1126

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
@@ -1613,7 +1613,7 @@ var stripStringsAndComments = (source) => {
1613
1613
 
1614
1614
  // node_modules/typescript/lib/typescript.js
1615
1615
  var require_typescript = __commonJS((exports, module) => {
1616
- var __dirname = "/tmp/absolutejs-1124-gate.HCTVoE/node_modules/typescript/lib", __filename = "/tmp/absolutejs-1124-gate.HCTVoE/node_modules/typescript/lib/typescript.js";
1616
+ var __dirname = "/home/alexkahn/abs/absolutejs/node_modules/typescript/lib", __filename = "/home/alexkahn/abs/absolutejs/node_modules/typescript/lib/typescript.js";
1617
1617
  /*! *****************************************************************************
1618
1618
  Copyright (c) Microsoft Corporation. All rights reserved.
1619
1619
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -170811,6 +170811,49 @@ var init_bunStringRawUnicodePlugin = __esm(() => {
170811
170811
  NON_ASCII = /[^\x00-\x7f]/;
170812
170812
  });
170813
170813
 
170814
+ // src/cli/serverBundleExternals.ts
170815
+ var FRAMEWORK_EXTERNALS, collectUserServerExternals = (buildConfig) => {
170816
+ const { bunBuild } = buildConfig;
170817
+ if (!bunBuild)
170818
+ return [];
170819
+ const override = "external" in bunBuild && Array.isArray(bunBuild.external) ? bunBuild.external : [];
170820
+ const defaultBuild = "default" in bunBuild ? bunBuild.default : undefined;
170821
+ const fromDefault = Array.isArray(defaultBuild?.external) ? defaultBuild.external : [];
170822
+ return [...override, ...fromDefault];
170823
+ }, resolveServerBundleExternals = (buildConfig) => [
170824
+ ...FRAMEWORK_EXTERNALS.filter((specifier) => {
170825
+ if (buildConfig.reactDirectory && (specifier === "react" || specifier.startsWith("react/") || specifier.startsWith("react-dom")))
170826
+ return false;
170827
+ if (buildConfig.vueDirectory && (specifier === "vue" || specifier.startsWith("vue/") || specifier === "@vue/server-renderer"))
170828
+ return false;
170829
+ if (buildConfig.svelteDirectory && (specifier === "svelte" || specifier.startsWith("svelte/")))
170830
+ return false;
170831
+ return true;
170832
+ }),
170833
+ ...collectUserServerExternals(buildConfig)
170834
+ ];
170835
+ var init_serverBundleExternals = __esm(() => {
170836
+ FRAMEWORK_EXTERNALS = [
170837
+ "react",
170838
+ "react/jsx-runtime",
170839
+ "react-dom",
170840
+ "react-dom/*",
170841
+ "vue",
170842
+ "vue/*",
170843
+ "@vue/compiler-sfc",
170844
+ "@vue/server-renderer",
170845
+ "svelte",
170846
+ "svelte/*",
170847
+ "@angular/compiler",
170848
+ "@angular/compiler-cli",
170849
+ "@angular/core",
170850
+ "@angular/common",
170851
+ "@angular/platform-browser",
170852
+ "@angular/platform-server",
170853
+ "typescript"
170854
+ ];
170855
+ });
170856
+
170814
170857
  // src/core/prerender.ts
170815
170858
  var exports_prerender = {};
170816
170859
  __export(exports_prerender, {
@@ -178799,26 +178842,7 @@ console.log(\`
178799
178842
  return;
178800
178843
  });
178801
178844
  }
178802
- }), FRAMEWORK_EXTERNALS, collectUserServerExternals = (buildConfig) => {
178803
- const { bunBuild } = buildConfig;
178804
- if (!bunBuild)
178805
- return [];
178806
- const override = "external" in bunBuild && Array.isArray(bunBuild.external) ? bunBuild.external : [];
178807
- const defaultBuild = "default" in bunBuild ? bunBuild.default : undefined;
178808
- const fromDefault = Array.isArray(defaultBuild?.external) ? defaultBuild.external : [];
178809
- return [...override, ...fromDefault];
178810
- }, resolveServerBundleExternals = (buildConfig) => [
178811
- ...FRAMEWORK_EXTERNALS.filter((specifier) => {
178812
- if (buildConfig.reactDirectory && (specifier === "react" || specifier.startsWith("react/") || specifier.startsWith("react-dom")))
178813
- return false;
178814
- if (buildConfig.vueDirectory && (specifier === "vue" || specifier.startsWith("vue/") || specifier === "@vue/server-renderer"))
178815
- return false;
178816
- if (buildConfig.svelteDirectory && (specifier === "svelte" || specifier.startsWith("svelte/")))
178817
- return false;
178818
- return true;
178819
- }),
178820
- ...collectUserServerExternals(buildConfig)
178821
- ], compile = async (serverEntry, outdir, outfile, configPath2) => {
178845
+ }), compile = async (serverEntry, outdir, outfile, configPath2) => {
178822
178846
  const resolvedOutdir = resolve23(outdir ?? "dist");
178823
178847
  await withBuildDirectoryLock(resolvedOutdir, () => compileUnlocked(serverEntry, resolvedOutdir, outfile, configPath2));
178824
178848
  }, compileUnlocked = async (serverEntry, resolvedOutdir, outfile, configPath2) => {
@@ -178988,6 +179012,7 @@ var init_compile = __esm(() => {
178988
179012
  init_loadConfig();
178989
179013
  init_startupBanner();
178990
179014
  init_telemetryEvent();
179015
+ init_serverBundleExternals();
178991
179016
  init_utils();
178992
179017
  INLINE_SOURCE_MAP_RE = /sourceMappingURL=data:application\/json(?:;[^,]+)?;base64,([A-Za-z0-9+/=]+)\s*$/;
178993
179018
  SERVER_RUNTIME_ASSET_RE = /new\s+URL\(\s*["'](\.\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
@@ -179013,25 +179038,6 @@ var init_compile = __esm(() => {
179013
179038
  requireForCompile = createRequire3(import.meta.url);
179014
179039
  RUNTIME_JS_EXTENSIONS = [".js", ".mjs", ".cjs"];
179015
179040
  MODULE_SPECIFIER_RE = /(from\s*|import\s*|import\(\s*|require\(\s*)(["'])([^"']+)\2/g;
179016
- FRAMEWORK_EXTERNALS = [
179017
- "react",
179018
- "react/jsx-runtime",
179019
- "react-dom",
179020
- "react-dom/*",
179021
- "vue",
179022
- "vue/*",
179023
- "@vue/compiler-sfc",
179024
- "@vue/server-renderer",
179025
- "svelte",
179026
- "svelte/*",
179027
- "@angular/compiler",
179028
- "@angular/compiler-cli",
179029
- "@angular/core",
179030
- "@angular/common",
179031
- "@angular/platform-browser",
179032
- "@angular/platform-server",
179033
- "typescript"
179034
- ];
179035
179041
  });
179036
179042
 
179037
179043
  // src/cli/scripts/typecheck.ts
@@ -181063,6 +181069,7 @@ init_bunStringRawUnicodePlugin();
181063
181069
  init_loadConfig();
181064
181070
  init_startupBanner();
181065
181071
  init_telemetryEvent();
181072
+ init_serverBundleExternals();
181066
181073
  init_utils();
181067
181074
  var {env: env2 } = globalThis.Bun;
181068
181075
  import { existsSync as existsSync8, readFileSync as readFileSync11, rmSync as rmSync4 } from "fs";
@@ -181267,25 +181274,7 @@ var start = async (serverEntry, outdir, configPath2) => {
181267
181274
  const serverBundle = await Bun.build({
181268
181275
  define: { "process.env.NODE_ENV": '"production"' },
181269
181276
  entrypoints: [resolve8(serverEntry)],
181270
- external: [
181271
- "react",
181272
- "react/jsx-runtime",
181273
- "react-dom",
181274
- "react-dom/*",
181275
- "vue",
181276
- "vue/*",
181277
- "@vue/compiler-sfc",
181278
- "@vue/server-renderer",
181279
- "svelte",
181280
- "svelte/*",
181281
- "@angular/compiler",
181282
- "@angular/compiler-cli",
181283
- "@angular/core",
181284
- "@angular/common",
181285
- "@angular/platform-browser",
181286
- "@angular/platform-server",
181287
- "typescript"
181288
- ],
181277
+ external: resolveServerBundleExternals(buildConfig),
181289
181278
  outdir: resolvedOutdir,
181290
181279
  plugins: [
181291
181280
  ...islandRegistryPlugin ? [islandRegistryPlugin] : [],
package/dist/index.js CHANGED
@@ -29543,7 +29543,7 @@ var init_fastHmrCompiler = __esm(() => {
29543
29543
 
29544
29544
  // node_modules/content-tag/pkg/node/content_tag.cjs
29545
29545
  var require_content_tag = __commonJS((exports, module) => {
29546
- var __dirname = "/tmp/absolutejs-1124-gate.HCTVoE/node_modules/content-tag/pkg/node";
29546
+ var __dirname = "/home/alexkahn/abs/absolutejs/node_modules/content-tag/pkg/node";
29547
29547
  var imports = {};
29548
29548
  imports["__wbindgen_placeholder__"] = exports;
29549
29549
  var wasm;
@@ -31805,9 +31805,10 @@ ${content.slice(firstUseIdx)}`;
31805
31805
  ...vueIndexPaths,
31806
31806
  ...vueClientPaths,
31807
31807
  ...skipAngularClientBundle ? [] : angularClientPaths,
31808
- ...islandBootstrapPath ? [islandBootstrapPath] : [],
31809
- ...urlReferencedFiles
31808
+ ...islandBootstrapPath ? [islandBootstrapPath] : []
31810
31809
  ];
31810
+ const [onlyWorkerClientEntry] = urlReferencedFiles;
31811
+ const workerClientRoot = urlReferencedFiles.length === 1 && onlyWorkerClientEntry ? dirname21(onlyWorkerClientEntry) : commonAncestor(urlReferencedFiles.map((file5) => dirname21(file5)), projectRoot);
31811
31812
  const islandEntryResult = islandBuildInfo ? await tracePhase("islands/client-entry-generation", () => generateIslandEntryPoints({
31812
31813
  buildInfo: islandBuildInfo,
31813
31814
  buildPath,
@@ -31821,7 +31822,7 @@ ${content.slice(firstUseIdx)}`;
31821
31822
  generatedRoot: join40(buildPath, "_island_entries")
31822
31823
  };
31823
31824
  const islandClientEntryPoints = islandEntryResult.entries.map((entry) => entry.entryPath);
31824
- if (serverEntryPoints.length === 0 && reactClientEntryPoints.length === 0 && nonReactClientEntryPoints.length === 0 && islandClientEntryPoints.length === 0 && htmxDir === undefined && htmlDir === undefined) {
31825
+ if (serverEntryPoints.length === 0 && reactClientEntryPoints.length === 0 && nonReactClientEntryPoints.length === 0 && urlReferencedFiles.length === 0 && islandClientEntryPoints.length === 0 && htmxDir === undefined && htmlDir === undefined) {
31825
31826
  logWarn("No entry points found, manifest will be empty");
31826
31827
  sendTelemetryEvent("build:empty", {
31827
31828
  configuredDirs: {
@@ -31985,6 +31986,7 @@ ${content.slice(firstUseIdx)}`;
31985
31986
  serverResult,
31986
31987
  reactClientResult,
31987
31988
  nonReactClientResult,
31989
+ workerClientResult,
31988
31990
  islandClientResult,
31989
31991
  globalCssResult,
31990
31992
  vueCssResult
@@ -32040,6 +32042,22 @@ ${content.slice(firstUseIdx)}`;
32040
32042
  throw: false,
32041
32043
  tsconfig: "./tsconfig.json"
32042
32044
  }, resolveBunBuildOverride(bunBuildConfig, "nonReactClient")))) : undefined,
32045
+ urlReferencedFiles.length > 0 ? tracePhase("bun/worker-client", () => bunBuild7(mergeBunBuildConfig({
32046
+ conditions: svelteResolveConditions,
32047
+ entrypoints: urlReferencedFiles,
32048
+ external: Object.keys(nonReactExternalPaths),
32049
+ format: "esm",
32050
+ minify: !isDev2,
32051
+ naming: `[dir]/[name].[hash].[ext]`,
32052
+ outdir: buildPath,
32053
+ plugins: [stylePreprocessorPlugin2],
32054
+ root: workerClientRoot,
32055
+ sourcemap: resolveClientSourcemap(sourcemaps, isDev2),
32056
+ splitting: !isDev2,
32057
+ target: "browser",
32058
+ throw: false,
32059
+ tsconfig: "./tsconfig.json"
32060
+ }, resolveBunBuildOverride(bunBuildConfig, "nonReactClient")))) : undefined,
32043
32061
  islandClientEntryPoints.length > 0 ? tracePhase("bun/island-client", () => bunBuild7(mergeBunBuildConfig({
32044
32062
  conditions: svelteResolveConditions,
32045
32063
  define: vueDirectory ? vueFeatureFlags : undefined,
@@ -32137,8 +32155,14 @@ ${content.slice(firstUseIdx)}`;
32137
32155
  if (hmr && reactClientOutputPaths.length > 0) {
32138
32156
  await tracePhase("postprocess/react-refresh-globals", () => patchRefreshGlobals(reactClientOutputPaths));
32139
32157
  }
32140
- const nonReactClientLogs = nonReactClientResult?.logs ?? [];
32141
- const nonReactClientOutputs = nonReactClientResult?.outputs ?? [];
32158
+ const nonReactClientLogs = [
32159
+ ...nonReactClientResult?.logs ?? [],
32160
+ ...workerClientResult?.logs ?? []
32161
+ ];
32162
+ const nonReactClientOutputs = [
32163
+ ...nonReactClientResult?.outputs ?? [],
32164
+ ...workerClientResult?.outputs ?? []
32165
+ ];
32142
32166
  const nonReactClientOutputPaths = nonReactClientOutputs.map((artifact) => artifact.path);
32143
32167
  const islandClientLogs = islandClientResult?.logs ?? [];
32144
32168
  const islandClientOutputs = islandClientResult?.outputs ?? [];
@@ -32155,7 +32179,7 @@ ${content.slice(firstUseIdx)}`;
32155
32179
  if (hmr && islandClientOutputPaths.length > 0) {
32156
32180
  await tracePhase("postprocess/island-refresh-globals", () => patchRefreshGlobals(islandClientOutputPaths));
32157
32181
  }
32158
- if (nonReactClientResult && !nonReactClientResult.success && nonReactClientLogs.length > 0) {
32182
+ if ((nonReactClientResult && !nonReactClientResult.success || workerClientResult && !workerClientResult.success) && nonReactClientLogs.length > 0) {
32159
32183
  handlePassFailure(nonReactClientLogs, "non-react-client", "Non-React client");
32160
32184
  }
32161
32185
  if (islandClientResult && !islandClientResult.success && islandClientLogs.length > 0) {
@@ -48019,5 +48043,5 @@ export {
48019
48043
  ANGULAR_INIT_TIMEOUT_MS
48020
48044
  };
48021
48045
 
48022
- //# debugId=A11F19DBE02F4F5964756E2164756E21
48046
+ //# debugId=84966EED2C28538064756E2164756E21
48023
48047
  //# sourceMappingURL=index.js.map