@absolutejs/absolute 0.19.0-beta.768 → 0.19.0-beta.769

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/index.js CHANGED
@@ -41648,7 +41648,7 @@ ${t.join(`
41648
41648
  import { mkdir as mkdir2, rm as rm2 } from "fs/promises";
41649
41649
  import { dirname as dirname6, join as join7 } from "path";
41650
41650
  var {build: bunBuild } = globalThis.Bun;
41651
- var TAILWIND_NATIVE_TEMP_DIR = ".absolute-tailwind-native", postprocessTailwindCss = async (css, outputPath, styleTransformConfig) => compileStyleSource(outputPath, css, "css", styleTransformConfig), compileTailwind = async (input, output, buildPath, styleTransformConfig) => {
41651
+ var TAILWIND_NATIVE_TEMP_DIR = ".absolute-tailwind-native", TAILWIND_CANDIDATE_EXTENSION_PATTERN, isTailwindCandidate = (filePath) => TAILWIND_CANDIDATE_EXTENSION_PATTERN.test(filePath), postprocessTailwindCss = async (css, outputPath, styleTransformConfig) => compileStyleSource(outputPath, css, "css", styleTransformConfig), compileTailwind = async (input, output, buildPath, styleTransformConfig) => {
41652
41652
  const outputPath = join7(buildPath, output);
41653
41653
  const tempDir = join7(buildPath, TAILWIND_NATIVE_TEMP_DIR);
41654
41654
  await mkdir2(dirname6(outputPath), { recursive: true });
@@ -41682,6 +41682,7 @@ ${details}` : ""}`);
41682
41682
  }, compileTailwindConfig = async (tailwind, buildPath, styleTransformConfig) => compileTailwind(tailwind.input, tailwind.output, buildPath, styleTransformConfig);
41683
41683
  var init_compileTailwind = __esm(() => {
41684
41684
  init_stylePreprocessor();
41685
+ TAILWIND_CANDIDATE_EXTENSION_PATTERN = /\.(html?|m?[jt]sx?|cjs|vue|svelte|astro|mdx?|css|s[ac]ss|less|styl(?:us)?)$/i;
41685
41686
  });
41686
41687
 
41687
41688
  // src/utils/imageProcessing.ts
@@ -45949,7 +45950,7 @@ ${content.slice(firstUseIdx)}`;
45949
45950
  recursive: true
45950
45951
  }));
45951
45952
  }
45952
- const tailwindPromise = tailwind && (!isIncremental || normalizedIncrementalFiles?.some(isStylePath)) ? tracePhase("tailwind/build", () => compileTailwindConfig(tailwind, buildPath, styleTransformConfig)) : undefined;
45953
+ const tailwindPromise = tailwind && (!isIncremental || normalizedIncrementalFiles?.some(isTailwindCandidate)) ? tracePhase("tailwind/build", () => compileTailwindConfig(tailwind, buildPath, styleTransformConfig)) : undefined;
45953
45954
  const emptyConventionResult = {
45954
45955
  conventions: undefined,
45955
45956
  pageFiles: []
@@ -46133,20 +46134,42 @@ ${content.slice(firstUseIdx)}`;
46133
46134
  vueConventionSources.length > 0 && vueDir ? tracePhase("compile/convention-vue", () => Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(vueConventionSources, vueDir, false, styleTransformConfig))) : { vueServerPaths: emptyStringArray },
46134
46135
  angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(angularConventionSources, angularDir, hmr, styleTransformConfig))) : { serverPaths: emptyStringArray }
46135
46136
  ]);
46136
- const copyConventionFiles = (framework, sources, compiledPaths) => {
46137
+ const bundleConventionFiles = async (framework, compiledPaths) => {
46137
46138
  const destDir = join20(buildPath, "conventions", framework);
46139
+ rmSync2(destDir, { force: true, recursive: true });
46138
46140
  mkdirSync10(destDir, { recursive: true });
46139
46141
  const destPaths = [];
46140
- for (const compiledPath of compiledPaths) {
46141
- const dest = join20(destDir, basename8(compiledPath));
46142
- copyFileSync(compiledPath, dest);
46143
- destPaths.push(dest);
46142
+ for (let idx = 0;idx < compiledPaths.length; idx++) {
46143
+ const compiledPath = compiledPaths[idx];
46144
+ if (!compiledPath)
46145
+ continue;
46146
+ const name = basename8(compiledPath).replace(/\.[^.]+$/, "");
46147
+ const result = await bunBuild7({
46148
+ entrypoints: [compiledPath],
46149
+ format: "esm",
46150
+ minify: !isDev2,
46151
+ naming: `${idx}-${name}.[ext]`,
46152
+ outdir: destDir,
46153
+ splitting: false,
46154
+ target: "bun",
46155
+ throw: false
46156
+ });
46157
+ if (!result.success) {
46158
+ outputLogs(result.logs);
46159
+ throw new Error(`Failed to bundle ${framework} convention: ${compiledPath}`);
46160
+ }
46161
+ const output = result.outputs.find((artifact) => artifact.path.endsWith(".js"));
46162
+ if (!output)
46163
+ throw new Error(`${framework} convention did not emit JavaScript: ${compiledPath}`);
46164
+ destPaths.push(output.path);
46144
46165
  }
46145
46166
  return destPaths;
46146
46167
  };
46147
- const svelteDests = copyConventionFiles("svelte", svelteConventionSources, svelteConvResult.svelteServerPaths);
46148
- const vueDests = copyConventionFiles("vue", vueConventionSources, vueConvResult.vueServerPaths);
46149
- const angularDests = copyConventionFiles("angular", angularConventionSources, angularConvResult.serverPaths);
46168
+ const [svelteDests, vueDests, angularDests] = await Promise.all([
46169
+ tracePhase("bundle/convention-svelte", () => bundleConventionFiles("svelte", svelteConvResult.svelteServerPaths)),
46170
+ tracePhase("bundle/convention-vue", () => bundleConventionFiles("vue", vueConvResult.vueServerPaths)),
46171
+ tracePhase("bundle/convention-angular", () => bundleConventionFiles("angular", angularConvResult.serverPaths))
46172
+ ]);
46150
46173
  conventionOutputPaths = [
46151
46174
  ...reactConvPaths,
46152
46175
  ...svelteDests,
@@ -58920,5 +58943,5 @@ export {
58920
58943
  ANGULAR_INIT_TIMEOUT_MS
58921
58944
  };
58922
58945
 
58923
- //# debugId=14CA0A980231DD4B64756E2164756E21
58946
+ //# debugId=458E7AFD69A7A1FD64756E2164756E21
58924
58947
  //# sourceMappingURL=index.js.map