@powerhousedao/ph-clint-cli 0.1.0-dev.30 → 0.1.0-dev.32
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,13 @@ export function buildCliPackageJson(spec) {
|
|
|
83
83
|
scripts['mastra:build'] = 'mastra build';
|
|
84
84
|
scripts['mastra:start'] = 'mastra start';
|
|
85
85
|
}
|
|
86
|
+
// Single-layout: publish scripts live in the CLI package.json (which IS the
|
|
87
|
+
// root). Split-layout gets these from root-package-json.ts instead.
|
|
88
|
+
if (!phAtLeast(powerhouse, 'Reactor')) {
|
|
89
|
+
scripts['publish:dev'] = 'ph-publish dev -c ./publish.config.ts';
|
|
90
|
+
scripts['publish:staging'] = 'ph-publish staging -c ./publish.config.ts';
|
|
91
|
+
scripts['publish:production'] = 'ph-publish production -c ./publish.config.ts';
|
|
92
|
+
}
|
|
86
93
|
const pkg = {
|
|
87
94
|
name: pkgName,
|
|
88
95
|
version: spec.version,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Builds the root `publish.config.ts
|
|
3
|
-
*
|
|
2
|
+
* Builds the root `publish.config.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Split-layout: a lockstep group with both app and cli packages.
|
|
5
|
+
* Single-layout: a single-package group at `.`.
|
|
4
6
|
*/
|
|
5
7
|
import { type ClintProjectSpec } from '../../spec/types.js';
|
|
6
8
|
export declare function buildPublishConfigTs(spec: ClintProjectSpec): string;
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the root `publish.config.ts`.
|
|
3
|
+
*
|
|
4
|
+
* Split-layout: a lockstep group with both app and cli packages.
|
|
5
|
+
* Single-layout: a single-package group at `.`.
|
|
6
|
+
*/
|
|
7
|
+
import { phAtLeast } from '../../spec/types.js';
|
|
1
8
|
export function buildPublishConfigTs(spec) {
|
|
2
|
-
const
|
|
3
|
-
const cli = `${spec.name}-cli`;
|
|
9
|
+
const split = phAtLeast(spec.features.powerhouse, 'Reactor');
|
|
4
10
|
// The publish pipeline appends the prerelease suffix (e.g. -dev.0), so we
|
|
5
11
|
// only store the base semver (M.m.p) here.
|
|
6
12
|
const baseVersion = spec.version.replace(/-.*$/, '');
|
|
13
|
+
const packages = split
|
|
14
|
+
? `[
|
|
15
|
+
{ path: '${spec.name}-app', category: 'app' },
|
|
16
|
+
{ path: '${spec.name}-cli', category: 'cli' },
|
|
17
|
+
]`
|
|
18
|
+
: `[
|
|
19
|
+
{ path: '.', category: 'cli' },
|
|
20
|
+
]`;
|
|
7
21
|
return `// Publish config — loaded by ph-clint's publish pipeline.
|
|
8
22
|
// definePublishConfig is an identity function; a plain export is equivalent.
|
|
9
23
|
export default {
|
|
10
24
|
groups: {
|
|
11
25
|
'${spec.name}': {
|
|
12
26
|
version: '${baseVersion}',
|
|
13
|
-
packages:
|
|
14
|
-
{ path: '${app}', category: 'app' },
|
|
15
|
-
{ path: '${cli}', category: 'cli' },
|
|
16
|
-
],
|
|
27
|
+
packages: ${packages},
|
|
17
28
|
},
|
|
18
29
|
},
|
|
19
30
|
};
|
|
@@ -25,9 +25,9 @@ export function buildRootPackageJson(spec) {
|
|
|
25
25
|
lint: prefix(cli, 'lint'),
|
|
26
26
|
'app:dev': prefix(app, 'dev'),
|
|
27
27
|
'cli:dev': prefix(cli, 'dev'),
|
|
28
|
-
'publish:dev': `${prefix(cli, 'exec ph-publish')} dev -c
|
|
29
|
-
'publish:staging': `${prefix(cli, 'exec ph-publish')} staging -c
|
|
30
|
-
'publish:production': `${prefix(cli, 'exec ph-publish')} production -c
|
|
28
|
+
'publish:dev': `${prefix(cli, 'exec ph-publish')} dev -c ../publish.config.ts`,
|
|
29
|
+
'publish:staging': `${prefix(cli, 'exec ph-publish')} staging -c ../publish.config.ts`,
|
|
30
|
+
'publish:production': `${prefix(cli, 'exec ph-publish')} production -c ../publish.config.ts`,
|
|
31
31
|
};
|
|
32
32
|
const pkg = {
|
|
33
33
|
name: getPackageName(spec),
|
package/dist/codegen/index.js
CHANGED
|
@@ -99,6 +99,13 @@ function planFiles(spec, targetDir) {
|
|
|
99
99
|
absolutePath: readmeAbs,
|
|
100
100
|
content: buildReadme(spec),
|
|
101
101
|
});
|
|
102
|
+
// Publish config — always at the project root (both layouts).
|
|
103
|
+
const publishConfig = path.join(targetDir, 'publish.config.ts');
|
|
104
|
+
planned.push({
|
|
105
|
+
relativePath: 'publish.config.ts',
|
|
106
|
+
absolutePath: publishConfig,
|
|
107
|
+
content: buildPublishConfigTs(spec),
|
|
108
|
+
});
|
|
102
109
|
// Split-layout only: root package.json + app placeholder files.
|
|
103
110
|
if (split && appDir) {
|
|
104
111
|
const rootPkg = path.join(targetDir, 'package.json');
|
|
@@ -107,12 +114,6 @@ function planFiles(spec, targetDir) {
|
|
|
107
114
|
absolutePath: rootPkg,
|
|
108
115
|
content: buildRootPackageJson(spec),
|
|
109
116
|
});
|
|
110
|
-
const publishConfig = path.join(targetDir, 'publish.config.ts');
|
|
111
|
-
planned.push({
|
|
112
|
-
relativePath: 'publish.config.ts',
|
|
113
|
-
absolutePath: publishConfig,
|
|
114
|
-
content: buildPublishConfigTs(spec),
|
|
115
|
-
});
|
|
116
117
|
const appGitkeep = path.join(appDir, '.gitkeep');
|
|
117
118
|
planned.push({
|
|
118
119
|
relativePath: path.relative(targetDir, appGitkeep),
|
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.32",
|
|
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.32",
|
|
33
|
+
"@powerhousedao/ph-clint-app": "^0.1.0-dev.32",
|
|
34
|
+
"@powerhousedao/ph-clint-dev": "^0.1.0-dev.32",
|
|
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",
|