@powerhousedao/ph-clint-cli 0.1.0-dev.46 → 0.1.0-dev.47
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.
|
@@ -15,20 +15,25 @@
|
|
|
15
15
|
* `import { registry } from './framework.gen.js'` keeps resolving across
|
|
16
16
|
* regens.
|
|
17
17
|
*/
|
|
18
|
-
import { getAppPackageName, getDocumentTypeModuleName, phAtLeast, } from '../../spec/types.js';
|
|
18
|
+
import { getAppPackageName, getDocumentTypeModuleName, getDocumentTypeSlug, phAtLeast, } from '../../spec/types.js';
|
|
19
19
|
export function buildFrameworkGenTs(spec) {
|
|
20
20
|
if (!phAtLeast(spec.features.powerhouse, 'Reactor'))
|
|
21
21
|
return null;
|
|
22
22
|
const appPkg = getAppPackageName(spec);
|
|
23
23
|
// Collect all (docType, moduleName, importFrom) tuples across packages.
|
|
24
|
+
// App-package modules are imported from the app barrel which re-exports
|
|
25
|
+
// bare PascalCase names. External packages use the per-slug deep subpath
|
|
26
|
+
// (`<pkg>/document-models/<slug>`) so TypeScript can resolve internal
|
|
27
|
+
// types (e.g. PHState) from stable import paths for declaration emit.
|
|
24
28
|
const entries = [];
|
|
25
29
|
for (const pkg of spec.packages) {
|
|
26
|
-
const
|
|
30
|
+
const isApp = pkg.packageName === appPkg;
|
|
27
31
|
for (const docType of pkg.documentTypes) {
|
|
32
|
+
const slug = getDocumentTypeSlug(docType);
|
|
28
33
|
entries.push({
|
|
29
34
|
docType,
|
|
30
35
|
name: getDocumentTypeModuleName(docType),
|
|
31
|
-
importFrom
|
|
36
|
+
importFrom: isApp ? appPkg : `${pkg.packageName}/document-models/${slug}`,
|
|
32
37
|
});
|
|
33
38
|
}
|
|
34
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/ph-clint-cli",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.47",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"@mastra/core": "^1.22.0",
|
|
30
30
|
"@mastra/libsql": "^1.7.4",
|
|
31
31
|
"@mastra/memory": "^1.13.1",
|
|
32
|
-
"@powerhousedao/ph-clint": "^0.1.0-dev.
|
|
33
|
-
"@powerhousedao/ph-clint-app": "^0.1.0-dev.
|
|
34
|
-
"@powerhousedao/ph-clint-dev": "^0.1.0-dev.
|
|
32
|
+
"@powerhousedao/ph-clint": "^0.1.0-dev.47",
|
|
33
|
+
"@powerhousedao/ph-clint-app": "^0.1.0-dev.47",
|
|
34
|
+
"@powerhousedao/ph-clint-dev": "^0.1.0-dev.47",
|
|
35
35
|
"@powerhousedao/reactor": "6.0.0-dev.170",
|
|
36
36
|
"@powerhousedao/reactor-api": "6.0.0-dev.170",
|
|
37
37
|
"@powerhousedao/shared": "6.0.0-dev.170",
|