@absolutejs/absolute 0.19.0-beta.690 → 0.19.0-beta.692

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/vue/index.js CHANGED
@@ -2566,10 +2566,10 @@ var init_lowerAwaitSlotSyntax = __esm(() => {
2566
2566
  });
2567
2567
 
2568
2568
  // src/build/stylePreprocessor.ts
2569
- import { readFileSync as readFileSync3 } from "fs";
2570
2569
  import { readFile } from "fs/promises";
2571
- import { dirname as dirname3, extname } from "path";
2572
- var STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATTERN, importOptionalPeer, requireOptionalPeer, isPreprocessableStylePath = (filePath) => STYLE_EXTENSION_PATTERN.test(filePath), isStyleModulePath = (filePath) => STYLE_MODULE_EXTENSION_PATTERN.test(filePath), isStylePath = (filePath) => /\.(css|s[ac]ss|less)$/i.test(filePath), getStyleBaseName = (filePath) => filePath.replace(/\.(css|s[ac]ss|less)$/i, ""), getStyleLanguage = (filePathOrLanguage) => {
2570
+ import { createRequire } from "module";
2571
+ import { dirname as dirname3, extname, join as join3 } from "path";
2572
+ var STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATTERN, importOptionalPeer, requireOptionalPeer, requireFromCwd, isPreprocessableStylePath = (filePath) => STYLE_EXTENSION_PATTERN.test(filePath), isStyleModulePath = (filePath) => STYLE_MODULE_EXTENSION_PATTERN.test(filePath), isStylePath = (filePath) => /\.(css|s[ac]ss|less)$/i.test(filePath), getStyleBaseName = (filePath) => filePath.replace(/\.(css|s[ac]ss|less)$/i, ""), getStyleLanguage = (filePathOrLanguage) => {
2573
2573
  const normalized = filePathOrLanguage.toLowerCase();
2574
2574
  if (normalized === "scss" || normalized.endsWith(".scss"))
2575
2575
  return "scss";
@@ -2633,27 +2633,6 @@ var STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATT
2633
2633
  return readFile(filePath, "utf-8");
2634
2634
  }
2635
2635
  return compileStyleSource(filePath);
2636
- }, compileStyleFileIfNeededSync = (filePath) => {
2637
- const contents = readFileSync3(filePath, "utf-8");
2638
- const language = getStyleLanguage(filePath);
2639
- if (language === "scss" || language === "sass") {
2640
- let sass;
2641
- try {
2642
- sass = requireOptionalPeer("sass");
2643
- } catch {
2644
- throw missingDependencyError("sass", filePath);
2645
- }
2646
- return sass.compileString(contents, {
2647
- loadPaths: [dirname3(filePath), process.cwd()],
2648
- style: "expanded",
2649
- syntax: language === "sass" ? "indented" : "scss",
2650
- url: new URL(`file://${filePath}`)
2651
- }).css;
2652
- }
2653
- if (language === "less") {
2654
- throw new Error(`Unable to compile ${filePath}: Less styleUrl preprocessing is async-only. Import the Less file from a bundled entrypoint or use SCSS/CSS for Angular styleUrl.`);
2655
- }
2656
- return contents;
2657
2636
  };
2658
2637
  var init_stylePreprocessor = __esm(() => {
2659
2638
  STYLE_EXTENSION_PATTERN = /\.(s[ac]ss|less)$/i;
@@ -2661,6 +2640,7 @@ var init_stylePreprocessor = __esm(() => {
2661
2640
  STYLE_LANGUAGE_PATTERN = /^(s[ac]ss|less)$/i;
2662
2641
  importOptionalPeer = new Function("specifier", "return import(specifier)");
2663
2642
  requireOptionalPeer = new Function("specifier", "return require(specifier)");
2643
+ requireFromCwd = createRequire(join3(process.cwd(), "package.json"));
2664
2644
  stylePreprocessorPlugin = {
2665
2645
  name: "absolute-style-preprocessor",
2666
2646
  setup(build) {
@@ -2699,13 +2679,13 @@ var init_stylePreprocessor = __esm(() => {
2699
2679
 
2700
2680
  // src/core/svelteServerModule.ts
2701
2681
  import { mkdir, readdir as readdir2 } from "fs/promises";
2702
- import { basename as basename3, dirname as dirname4, extname as extname2, join as join3, relative, resolve as resolve4 } from "path";
2682
+ import { basename as basename3, dirname as dirname4, extname as extname2, join as join4, relative, resolve as resolve4 } from "path";
2703
2683
  var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
2704
2684
  const importPath = relative(dirname4(from), target).replace(/\\/g, "/");
2705
2685
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
2706
2686
  }, processDirectoryEntries = (entries, dir, targetFileName, stack) => {
2707
2687
  for (const entry of entries) {
2708
- const entryPath = join3(dir, entry.name);
2688
+ const entryPath = join4(dir, entry.name);
2709
2689
  if (entry.isDirectory())
2710
2690
  stack.push(entryPath);
2711
2691
  if (entry.isFile() && entry.name === targetFileName) {
@@ -2735,11 +2715,11 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
2735
2715
  if (cachedPath !== undefined) {
2736
2716
  return cachedPath;
2737
2717
  }
2738
- if (!sourcePath.includes(`${join3(process.cwd(), "build")}${process.platform === "win32" ? "" : "/"}`) && !sourcePath.includes("/build/")) {
2718
+ if (!sourcePath.includes(`${join4(process.cwd(), "build")}${process.platform === "win32" ? "" : "/"}`) && !sourcePath.includes("/build/")) {
2739
2719
  originalSourcePathCache.set(sourcePath, sourcePath);
2740
2720
  return sourcePath;
2741
2721
  }
2742
- const resolvedSourcePath = await findSourceFileByBasename(join3(process.cwd(), "src"), normalizeBuiltSvelteFileName(sourcePath));
2722
+ const resolvedSourcePath = await findSourceFileByBasename(join4(process.cwd(), "src"), normalizeBuiltSvelteFileName(sourcePath));
2743
2723
  const nextPath = resolvedSourcePath ?? sourcePath;
2744
2724
  originalSourcePathCache.set(sourcePath, nextPath);
2745
2725
  return nextPath;
@@ -2755,11 +2735,11 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
2755
2735
  `${basePath}.mjs`,
2756
2736
  `${basePath}.cjs`,
2757
2737
  `${basePath}.json`,
2758
- join3(basePath, "index.ts"),
2759
- join3(basePath, "index.js"),
2760
- join3(basePath, "index.mjs"),
2761
- join3(basePath, "index.cjs"),
2762
- join3(basePath, "index.json")
2738
+ join4(basePath, "index.ts"),
2739
+ join4(basePath, "index.js"),
2740
+ join4(basePath, "index.mjs"),
2741
+ join4(basePath, "index.cjs"),
2742
+ join4(basePath, "index.json")
2763
2743
  ];
2764
2744
  const existResults = await Promise.all(candidates.map((candidate) => Bun.file(candidate).exists()));
2765
2745
  const foundIndex = existResults.indexOf(true);
@@ -2767,7 +2747,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
2767
2747
  }, getCachedModulePath = (sourcePath) => {
2768
2748
  const relativeSourcePath = relative(process.cwd(), sourcePath).replace(/\\/g, "/");
2769
2749
  const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
2770
- return join3(serverCacheRoot, `${normalizedSourcePath}.server.js`);
2750
+ return join4(serverCacheRoot, `${normalizedSourcePath}.server.js`);
2771
2751
  }, resolveSvelteImport = async (spec, from) => {
2772
2752
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
2773
2753
  const resolved = resolvePackageImport(spec);
@@ -2868,7 +2848,7 @@ var init_svelteServerModule = __esm(() => {
2868
2848
  init_lowerIslandSyntax();
2869
2849
  init_lowerAwaitSlotSyntax();
2870
2850
  init_stylePreprocessor();
2871
- serverCacheRoot = join3(process.cwd(), ".absolutejs", "islands", "svelte");
2851
+ serverCacheRoot = join4(process.cwd(), ".absolutejs", "islands", "svelte");
2872
2852
  compiledModuleCache = new Map;
2873
2853
  originalSourcePathCache = new Map;
2874
2854
  transpiler = new Bun.Transpiler({
@@ -3736,5 +3716,5 @@ export {
3736
3716
  Image_default as Image
3737
3717
  };
3738
3718
 
3739
- //# debugId=8E4E80B5A66DAE2664756E2164756E21
3719
+ //# debugId=8D02379722610F0664756E2164756E21
3740
3720
  //# sourceMappingURL=index.js.map