@reventlessdev/reventless-spec 3.0.0-alpha.148 → 3.0.0-alpha.149

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/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 3.0.0-alpha.149 (2026-09-25)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **spec:** the lifecycle harvest reads an app that installs at its root ([977b368](https://github.com/ReventlessDev/reventless-core/commit/977b3681c6acde78ae05b18ca72935c10e6a5154))
11
+
12
+
6
13
  # 3.0.0-alpha.148 (2026-09-25)
7
14
 
8
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-spec",
3
- "version": "3.0.0-alpha.148",
3
+ "version": "3.0.0-alpha.149",
4
4
  "description": "Specifications for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -18,13 +18,30 @@
18
18
  // schema describes the wire form, so validating an in-memory structure against
19
19
  // it fails on every optional that happens to be empty.
20
20
  import { existsSync } from "node:fs";
21
- import { join } from "node:path";
21
+ import { dirname, join, resolve } from "node:path";
22
22
 
23
- const localPlatformPath = (pluginDir) =>
24
- join(
25
- pluginDir,
26
- "node_modules/@reventlessdev/reventless-local/src/Platform.res.mjs",
27
- );
23
+ const localPlatformModule = "node_modules/@reventlessdev/reventless-local/src/Platform.res.mjs";
24
+
25
+ /**
26
+ * Where the local platform is installed for this plugin: the nearest
27
+ * `node_modules` from the plugin directory up, the way Node resolves a package.
28
+ * A monorepo member has its own copy; an app that installs its dependencies at
29
+ * its root (`node-linker=hoisted`) has one only there. Walked rather than
30
+ * resolved through the package, so its `exports` map does not decide what can be
31
+ * reached.
32
+ *
33
+ * @returns {string | undefined}
34
+ */
35
+ export const localPlatformPath = (pluginDir) => {
36
+ let dir = resolve(pluginDir);
37
+ for (;;) {
38
+ const candidate = join(dir, localPlatformModule);
39
+ if (existsSync(candidate)) return candidate;
40
+ const parent = dirname(dir);
41
+ if (parent === dir) return undefined;
42
+ dir = parent;
43
+ }
44
+ };
28
45
 
29
46
  const pluginEntryPath = (pluginDir) => join(pluginDir, "src/Plugin.res.mjs");
30
47
 
@@ -40,10 +57,10 @@ export const loadPluginStructure = async (pluginDir) => {
40
57
  error: `no compiled plugin at ${entry} — build the plugin first`,
41
58
  };
42
59
  }
43
- if (!existsSync(local)) {
60
+ if (local === undefined) {
44
61
  return {
45
62
  ok: false,
46
- error: `no local platform installed at ${local}`,
63
+ error: `no local platform installed for ${pluginDir} — none in any node_modules from there up`,
47
64
  };
48
65
  }
49
66
  try {