@salty-css/core 0.0.1-alpha.324 → 0.0.1-alpha.325
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.
|
@@ -7,7 +7,7 @@ const resolveDynamicConfigCache = async () => {
|
|
|
7
7
|
const corePackageRoot = compiler_helpers.getCorePackageRoot();
|
|
8
8
|
const coreConfigDest = path.join(corePackageRoot, "cache/config-cache.json");
|
|
9
9
|
const contents = await promises.readFile(coreConfigDest, "utf8");
|
|
10
|
-
if (!contents) throw new Error(
|
|
10
|
+
if (!contents) throw new Error(`Could not find config cache file at ${coreConfigDest}`);
|
|
11
11
|
return JSON.parse(contents);
|
|
12
12
|
};
|
|
13
13
|
exports.resolveDynamicConfigCache = resolveDynamicConfigCache;
|
|
@@ -5,7 +5,7 @@ const resolveDynamicConfigCache = async () => {
|
|
|
5
5
|
const corePackageRoot = getCorePackageRoot();
|
|
6
6
|
const coreConfigDest = join(corePackageRoot, "cache/config-cache.json");
|
|
7
7
|
const contents = await readFile(coreConfigDest, "utf8");
|
|
8
|
-
if (!contents) throw new Error(
|
|
8
|
+
if (!contents) throw new Error(`Could not find config cache file at ${coreConfigDest}`);
|
|
9
9
|
return JSON.parse(contents);
|
|
10
10
|
};
|
|
11
11
|
export {
|
package/compiler/helpers.cjs
CHANGED
|
@@ -4,6 +4,7 @@ const path = require("path");
|
|
|
4
4
|
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
5
5
|
const getCorePackageRoot = () => {
|
|
6
6
|
let { pathname } = new URL(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("compiler/helpers.cjs", document.baseURI).href);
|
|
7
|
+
console.log("getCorePackageRoot pathname start:", pathname);
|
|
7
8
|
while (/core\/?(src\/)?$/.test(pathname) === false) {
|
|
8
9
|
pathname = path.join(pathname, "../");
|
|
9
10
|
}
|
package/compiler/helpers.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { join } from "path";
|
|
2
2
|
const getCorePackageRoot = () => {
|
|
3
3
|
let { pathname } = new URL(import.meta.url);
|
|
4
|
+
console.log("getCorePackageRoot pathname start:", pathname);
|
|
4
5
|
while (/core\/?(src\/)?$/.test(pathname) === false) {
|
|
5
6
|
pathname = join(pathname, "../");
|
|
6
7
|
}
|