soma-core 2.2.0 → 2.2.1

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.
@@ -83,6 +83,7 @@ export function resolveHostServiceCandidate(
83
83
 
84
84
  const candidateBases = [
85
85
  join(normalizedApiRoot, "api", "service"),
86
+ join(normalizedApiRoot, "..", "api", "service"),
86
87
  join(normalizedApiRoot, "service"),
87
88
  ...(options?.allowDirectRoot ? [normalizedApiRoot] : []),
88
89
  ];
@@ -127,13 +127,15 @@ function toPackageSource(packageName, packageRoot) {
127
127
  const packageJson = readJson(path.join(packageRoot, "package.json"));
128
128
  const codeRoot = resolveSafeChildRoot(packageRoot, packageJson?.soma?.hostRoot);
129
129
  const configRoot = resolveSafeChildRoot(packageRoot, packageJson?.soma?.configRoot);
130
+ const hasRootApiService = fs.existsSync(path.join(packageRoot, "api", "service"));
131
+ const apiRoot = hasRootApiService ? packageRoot : codeRoot;
130
132
  return {
131
133
  type: "package",
132
134
  name: packageName,
133
135
  packageName,
134
136
  assetRoot: codeRoot,
135
137
  codeRoot,
136
- apiRoot: codeRoot,
138
+ apiRoot,
137
139
  configRoot,
138
140
  };
139
141
  }
@@ -356,13 +356,15 @@ var require_source_packages = __commonJS({
356
356
  const packageJson = readJson(path2.join(packageRoot, "package.json"));
357
357
  const codeRoot = resolveSafeChildRoot(packageRoot, packageJson?.soma?.hostRoot);
358
358
  const configRoot = resolveSafeChildRoot(packageRoot, packageJson?.soma?.configRoot);
359
+ const hasRootApiService = fs2.existsSync(path2.join(packageRoot, "api", "service"));
360
+ const apiRoot = hasRootApiService ? packageRoot : codeRoot;
359
361
  return {
360
362
  type: "package",
361
363
  name: packageName,
362
364
  packageName,
363
365
  assetRoot: codeRoot,
364
366
  codeRoot,
365
- apiRoot: codeRoot,
367
+ apiRoot,
366
368
  configRoot
367
369
  };
368
370
  }
@@ -219,13 +219,15 @@ var require_source_packages = __commonJS({
219
219
  const packageJson = readJson2(path17.join(packageRoot, "package.json"));
220
220
  const codeRoot = resolveSafeChildRoot2(packageRoot, packageJson?.soma?.hostRoot);
221
221
  const configRoot = resolveSafeChildRoot2(packageRoot, packageJson?.soma?.configRoot);
222
+ const hasRootApiService = fs15.existsSync(path17.join(packageRoot, "api", "service"));
223
+ const apiRoot = hasRootApiService ? packageRoot : codeRoot;
222
224
  return {
223
225
  type: "package",
224
226
  name: packageName,
225
227
  packageName,
226
228
  assetRoot: codeRoot,
227
229
  codeRoot,
228
- apiRoot: codeRoot,
230
+ apiRoot,
229
231
  configRoot
230
232
  };
231
233
  }
@@ -13743,6 +13745,7 @@ function resolveHostServiceCandidate(apiRoot, segments, options) {
13743
13745
  const { dirSegments, className } = validated;
13744
13746
  const candidateBases = [
13745
13747
  (0, import_node_path14.join)(normalizedApiRoot, "api", "service"),
13748
+ (0, import_node_path14.join)(normalizedApiRoot, "..", "api", "service"),
13746
13749
  (0, import_node_path14.join)(normalizedApiRoot, "service"),
13747
13750
  ...options?.allowDirectRoot ? [normalizedApiRoot] : []
13748
13751
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soma-core",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "SOMA — Semantic Oriented Modular Architecture. A declarative frontend framework runtime with no UI framework dependency; native host shell ships in host-native/.",
5
5
  "keywords": [
6
6
  "soma",