@riebeckite/core 0.0.6 → 0.0.8

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
@@ -799,6 +799,9 @@ async function saveContentBuildState(statePath, state) {
799
799
  }
800
800
  }
801
801
  function resolveContentBuildStatePath(config, contentDirectory) {
802
+ if (config?.buildDirectory) {
803
+ return path.join(config.buildDirectory, "build", "content-state.json");
804
+ }
802
805
  const directory = config?.content.directory ?? contentDirectory ?? process.cwd();
803
806
  return path.resolve(
804
807
  directory,
@@ -1459,6 +1462,7 @@ async function writeAtomically(targetPath, versionDirectory, serialized) {
1459
1462
  }
1460
1463
  function resolvePluginCacheDirectory(config) {
1461
1464
  if (!config) return path2.resolve(process.cwd(), ".riebeckite", "cache");
1465
+ if (config.buildDirectory) return path2.join(config.buildDirectory, "cache");
1462
1466
  return path2.resolve(config.content.directory, "..", ".riebeckite", "cache");
1463
1467
  }
1464
1468
  function cachePath(versionDirectory, key) {
@@ -4,6 +4,11 @@ import type { PublishStrategy } from "./publish_strategy.js";
4
4
  import type { SiteConfig } from "./site_config.js";
5
5
  import type { ThemeConfig, ThemeStyle } from "./theme_config.js";
6
6
  export type ResolvedRiebeckiteConfig = {
7
+ /**
8
+ * Directory for build-time cache and state. Host integrations resolve this
9
+ * relative to their application root.
10
+ */
11
+ buildDirectory?: string;
7
12
  site: Required<SiteConfig>;
8
13
  content: {
9
14
  directory: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/core",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "tsx": "^4.22.4",
46
- "@riebeckite/test": "0.0.6"
46
+ "@riebeckite/test": "0.0.8"
47
47
  },
48
48
  "repository": {
49
49
  "type": "git",