wp-typia 0.22.5 → 0.22.7
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/README.md +7 -0
- package/bin/wp-typia.js +83 -0
- package/dist-bunli/.bunli/commands.gen.js +2000 -1256
- package/dist-bunli/{cli-xbzfx7qz.js → cli-27v2qpjg.js} +4 -4
- package/dist-bunli/{cli-1sm60g1z.js → cli-2hsp17nd.js} +2 -2
- package/dist-bunli/{cli-hb9vpsev.js → cli-2rqf6t0b.js} +1 -1
- package/dist-bunli/{cli-6bhfzq5e.js → cli-52ke0ptp.js} +2 -2
- package/dist-bunli/{cli-ctddkm3n.js → cli-8snabymq.js} +405 -204
- package/dist-bunli/{cli-add-1gqgshf0.js → cli-add-8jpdnz1r.js} +85 -64
- package/dist-bunli/{cli-nzwpmw4y.js → cli-cjygr56g.js} +98 -32
- package/dist-bunli/{cli-doctor-w35s8y9w.js → cli-doctor-h5tq4ztr.js} +15 -18
- package/dist-bunli/cli-fys8vm2t.js +20 -0
- package/dist-bunli/{cli-btbpt84c.js → cli-hhp1d348.js} +1 -1
- package/dist-bunli/{cli-init-z8sjmkvc.js → cli-init-w9p558th.js} +414 -393
- package/dist-bunli/{cli-scaffold-ad3bd555.js → cli-scaffold-qve8rqja.js} +9 -8
- package/dist-bunli/{cli-j30rk466.js → cli-ta3y0hp2.js} +697 -298
- package/dist-bunli/cli.js +8 -6
- package/dist-bunli/{command-list-scd6zqp8.js → command-list-6zr1tj96.js} +16 -12
- package/dist-bunli/{migrations-skkzdvhm.js → migrations-v0avgyg6.js} +7 -6
- package/dist-bunli/node-cli.js +253 -97
- package/dist-bunli/{workspace-project-7826tewa.js → workspace-project-csnnggz6.js} +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -28,6 +28,13 @@ Extend an existing workspace with:
|
|
|
28
28
|
`wp-typia create <project-dir>` when `<project-dir>` is the only positional
|
|
29
29
|
argument.
|
|
30
30
|
|
|
31
|
+
Configuration files:
|
|
32
|
+
|
|
33
|
+
- `wp-typia` loads `~/.config/wp-typia/config.json`, `.wp-typiarc`, `.wp-typiarc.json`, then `package.json#wp-typia`; later sources override earlier sources
|
|
34
|
+
- `--config <path>` is an explicit override loaded after the default sources, relative to the current working directory unless absolute
|
|
35
|
+
- config files use a strict schema: unknown keys are errors rather than warnings or stripped values, so typos fail near the source config file
|
|
36
|
+
- object values are deep-merged, while arrays such as `mcp.schemaSources` replace earlier arrays instead of concatenating
|
|
37
|
+
|
|
31
38
|
Compatibility notes:
|
|
32
39
|
|
|
33
40
|
- `@wp-typia/project-tools` is the canonical programmatic project orchestration package
|
package/bin/wp-typia.js
CHANGED
|
@@ -35,6 +35,24 @@ const buildScriptEntrypoint = path.join(
|
|
|
35
35
|
'build-bunli-runtime.ts',
|
|
36
36
|
);
|
|
37
37
|
const sourceCliEntrypoint = path.join(packageRoot, 'src', 'cli.ts');
|
|
38
|
+
const sourceCheckoutRoot = path.resolve(packageRoot, '..', '..');
|
|
39
|
+
const sourceProjectToolsPackageRoot = path.resolve(
|
|
40
|
+
packageRoot,
|
|
41
|
+
'..',
|
|
42
|
+
'wp-typia-project-tools',
|
|
43
|
+
);
|
|
44
|
+
const sourceProjectToolsPackageManifest = path.join(
|
|
45
|
+
sourceProjectToolsPackageRoot,
|
|
46
|
+
'package.json',
|
|
47
|
+
);
|
|
48
|
+
const sourceProjectToolsRuntimeProbe = path.join(
|
|
49
|
+
sourceProjectToolsPackageRoot,
|
|
50
|
+
'dist',
|
|
51
|
+
'runtime',
|
|
52
|
+
'cli-diagnostics.js',
|
|
53
|
+
);
|
|
54
|
+
const sourceProjectToolsBuildCommand =
|
|
55
|
+
'bun run --filter @wp-typia/project-tools build';
|
|
38
56
|
const standaloneGuidance =
|
|
39
57
|
'Prefer not to install Bun? Use the standalone wp-typia binary from the GitHub release assets.';
|
|
40
58
|
|
|
@@ -67,7 +85,72 @@ function canAutobuildSourceCheckout() {
|
|
|
67
85
|
);
|
|
68
86
|
}
|
|
69
87
|
|
|
88
|
+
function hasMissingSourceProjectToolsRuntime() {
|
|
89
|
+
return (
|
|
90
|
+
canAutobuildSourceCheckout() &&
|
|
91
|
+
fs.existsSync(path.join(sourceCheckoutRoot, 'package.json')) &&
|
|
92
|
+
fs.existsSync(sourceProjectToolsPackageManifest) &&
|
|
93
|
+
!fs.existsSync(sourceProjectToolsRuntimeProbe)
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function ensureSourceProjectToolsRuntime() {
|
|
98
|
+
if (!hasMissingSourceProjectToolsRuntime()) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const relativeProbe = path.relative(
|
|
103
|
+
sourceCheckoutRoot,
|
|
104
|
+
sourceProjectToolsRuntimeProbe,
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
console.error(
|
|
108
|
+
`wp-typia source checkout is missing @wp-typia/project-tools build artifacts (${relativeProbe}).`,
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
if (!isWorkingBunBinary()) {
|
|
112
|
+
console.error(
|
|
113
|
+
`Error: wp-typia cannot rebuild @wp-typia/project-tools because no working Bun binary was found. Run \`${sourceProjectToolsBuildCommand}\` from the repository root after installing Bun, then rerun wp-typia.`,
|
|
114
|
+
);
|
|
115
|
+
process.exit(1);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
console.error(
|
|
119
|
+
`Running \`${sourceProjectToolsBuildCommand}\` from ${sourceCheckoutRoot} before rebuilding the CLI runtime...`,
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
const buildResult = spawnSync(
|
|
123
|
+
bunBinary,
|
|
124
|
+
['run', '--filter', '@wp-typia/project-tools', 'build'],
|
|
125
|
+
{
|
|
126
|
+
cwd: sourceCheckoutRoot,
|
|
127
|
+
env: process.env,
|
|
128
|
+
stdio: 'inherit',
|
|
129
|
+
},
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
if (buildResult.status !== 0) {
|
|
133
|
+
console.error(
|
|
134
|
+
`Error: @wp-typia/project-tools build failed. Run \`${sourceProjectToolsBuildCommand}\` from the repository root, then rerun wp-typia.`,
|
|
135
|
+
);
|
|
136
|
+
process.exit(buildResult.status ?? 1);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (fs.existsSync(sourceProjectToolsRuntimeProbe)) {
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
console.error(
|
|
144
|
+
`Error: @wp-typia/project-tools build completed but ${relativeProbe} is still missing. Run \`${sourceProjectToolsBuildCommand}\` from the repository root, then rerun wp-typia.`,
|
|
145
|
+
);
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
|
|
70
149
|
function ensureBuiltRuntime() {
|
|
150
|
+
if (!ensureSourceProjectToolsRuntime()) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
|
|
71
154
|
if (fs.existsSync(cliEntrypoint) && fs.existsSync(nodeCliEntrypoint)) {
|
|
72
155
|
return true;
|
|
73
156
|
}
|