@happyvertical/smrt-cli 0.51.7 → 0.51.9
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.
|
@@ -261,6 +261,15 @@ async function discoverManifests(projectRoot = process.cwd()) {
|
|
|
261
261
|
return discovered;
|
|
262
262
|
}
|
|
263
263
|
/**
|
|
264
|
+
* Read a manifest's declared SMRT dependencies, tolerating the untrusted
|
|
265
|
+
* shape of a file loaded from disk.
|
|
266
|
+
*/
|
|
267
|
+
function readSmrtDependencies(manifest) {
|
|
268
|
+
if (!Array.isArray(manifest.smrtDependencies)) return;
|
|
269
|
+
const dependencies = manifest.smrtDependencies.filter((dependency) => typeof dependency === "string");
|
|
270
|
+
return dependencies.length > 0 ? dependencies : void 0;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
264
273
|
* Find manifests in project root
|
|
265
274
|
*/
|
|
266
275
|
async function findProjectManifests(projectRoot) {
|
|
@@ -285,7 +294,8 @@ async function findProjectManifests(projectRoot) {
|
|
|
285
294
|
packageName: manifest.packageName,
|
|
286
295
|
packageVersion: manifest.version,
|
|
287
296
|
objectCount: objectNames.length,
|
|
288
|
-
objectNames
|
|
297
|
+
objectNames,
|
|
298
|
+
smrtDependencies: readSmrtDependencies(manifest)
|
|
289
299
|
});
|
|
290
300
|
break;
|
|
291
301
|
}
|
|
@@ -2649,8 +2659,24 @@ var SCHEMA_PROJECT_MANIFEST_SUFFIXES = [
|
|
|
2649
2659
|
"/dist/manifest.json",
|
|
2650
2660
|
"/src/manifest/manifest.json"
|
|
2651
2661
|
];
|
|
2662
|
+
/**
|
|
2663
|
+
* Decide whether a discovered manifest is the project-scoped build output
|
|
2664
|
+
* schema commands require.
|
|
2665
|
+
*
|
|
2666
|
+
* Object count alone is the wrong test. A pure-consumer project — 0 local
|
|
2667
|
+
* objects, every table coming from consumed package manifests, the shape
|
|
2668
|
+
* `template-sveltekit` documents — legitimately builds a manifest whose only
|
|
2669
|
+
* contribution is its `smrtDependencies` list, and the migration path creates
|
|
2670
|
+
* those packages' tables from `findPackageManifests()` regardless. Refusing it
|
|
2671
|
+
* with `missing_local_manifest` told the operator to define a local object,
|
|
2672
|
+
* which is the opposite of what such a project wants (issue #2925). What the
|
|
2673
|
+
* gate genuinely needs is evidence that the project itself was built: a
|
|
2674
|
+
* manifest at a current project-scoped path carrying either its own objects or
|
|
2675
|
+
* the consumed packages it aggregates.
|
|
2676
|
+
*/
|
|
2652
2677
|
function isSchemaProjectManifest(manifest) {
|
|
2653
|
-
if (manifest.source !== "project"
|
|
2678
|
+
if (manifest.source !== "project") return false;
|
|
2679
|
+
if (manifest.objectCount <= 0 && (manifest.smrtDependencies?.length ?? 0) === 0) return false;
|
|
2654
2680
|
const manifestPath = manifest.path.replace(/\\/g, "/");
|
|
2655
2681
|
return SCHEMA_PROJECT_MANIFEST_SUFFIXES.some((suffix) => manifestPath === suffix.slice(1) || manifestPath.endsWith(suffix));
|
|
2656
2682
|
}
|
|
@@ -2757,7 +2783,7 @@ async function evaluateSchemaContract(options) {
|
|
|
2757
2783
|
const inferredIndexes = /* @__PURE__ */ new Set();
|
|
2758
2784
|
if (projectManifests.length === 0) failures.push({
|
|
2759
2785
|
code: "missing_local_manifest",
|
|
2760
|
-
message: "No local SMRT project manifest was loaded from .smrt/manifest.json, dist/manifest.json, or src/manifest/manifest.json. Package manifests from node_modules and legacy project manifest locations are not sufficient for schema commands."
|
|
2786
|
+
message: "No local SMRT project manifest was loaded from .smrt/manifest.json, dist/manifest.json, or src/manifest/manifest.json. Package manifests from node_modules and legacy project manifest locations are not sufficient for schema commands. A project with no local objects still qualifies once its build records the SMRT packages it consumes, so build the project before running schema commands."
|
|
2761
2787
|
});
|
|
2762
2788
|
const requiredObjects = (schemaContract.requiredObjects ?? []).map((ref) => {
|
|
2763
2789
|
const entry = resolveClass(ref);
|
package/dist/index.js
CHANGED
|
@@ -49,63 +49,63 @@ var _playgroundCommands = null;
|
|
|
49
49
|
var _workbenchCommands = null;
|
|
50
50
|
async function getGnodeCommands() {
|
|
51
51
|
if (!_gnodeCommands) {
|
|
52
|
-
const { gnodeCommands } = await import("./commands-
|
|
52
|
+
const { gnodeCommands } = await import("./commands-D2o62iRL.js");
|
|
53
53
|
_gnodeCommands = gnodeCommands;
|
|
54
54
|
}
|
|
55
55
|
return _gnodeCommands;
|
|
56
56
|
}
|
|
57
57
|
async function getGitCommands() {
|
|
58
58
|
if (!_gitCommands) {
|
|
59
|
-
const { gitCommands } = await import("./commands-
|
|
59
|
+
const { gitCommands } = await import("./commands-D2o62iRL.js");
|
|
60
60
|
_gitCommands = gitCommands;
|
|
61
61
|
}
|
|
62
62
|
return _gitCommands;
|
|
63
63
|
}
|
|
64
64
|
async function getGenerateCommands() {
|
|
65
65
|
if (!_generateCommands) {
|
|
66
|
-
const { generateCommands } = await import("./commands-
|
|
66
|
+
const { generateCommands } = await import("./commands-D2o62iRL.js");
|
|
67
67
|
_generateCommands = generateCommands;
|
|
68
68
|
}
|
|
69
69
|
return _generateCommands;
|
|
70
70
|
}
|
|
71
71
|
async function getInitCommands() {
|
|
72
72
|
if (!_initCommands) {
|
|
73
|
-
const { initCommands } = await import("./commands-
|
|
73
|
+
const { initCommands } = await import("./commands-D2o62iRL.js");
|
|
74
74
|
_initCommands = initCommands;
|
|
75
75
|
}
|
|
76
76
|
return _initCommands;
|
|
77
77
|
}
|
|
78
78
|
async function getUtilityCommands() {
|
|
79
79
|
if (!_utilityCommands) {
|
|
80
|
-
const { utilityCommands } = await import("./commands-
|
|
80
|
+
const { utilityCommands } = await import("./commands-D2o62iRL.js");
|
|
81
81
|
_utilityCommands = utilityCommands;
|
|
82
82
|
}
|
|
83
83
|
return _utilityCommands;
|
|
84
84
|
}
|
|
85
85
|
async function getDispatchCommands() {
|
|
86
86
|
if (!_dispatchCommands) {
|
|
87
|
-
const { dispatchCommands } = await import("./commands-
|
|
87
|
+
const { dispatchCommands } = await import("./commands-D2o62iRL.js");
|
|
88
88
|
_dispatchCommands = dispatchCommands;
|
|
89
89
|
}
|
|
90
90
|
return _dispatchCommands;
|
|
91
91
|
}
|
|
92
92
|
async function getDocsCommands() {
|
|
93
93
|
if (!_docsCommands) {
|
|
94
|
-
const { docsCommands } = await import("./commands-
|
|
94
|
+
const { docsCommands } = await import("./commands-D2o62iRL.js");
|
|
95
95
|
_docsCommands = docsCommands;
|
|
96
96
|
}
|
|
97
97
|
return _docsCommands;
|
|
98
98
|
}
|
|
99
99
|
async function getPlaygroundCommands() {
|
|
100
100
|
if (!_playgroundCommands) {
|
|
101
|
-
const { playgroundCommands } = await import("./commands-
|
|
101
|
+
const { playgroundCommands } = await import("./commands-D2o62iRL.js");
|
|
102
102
|
_playgroundCommands = playgroundCommands;
|
|
103
103
|
}
|
|
104
104
|
return _playgroundCommands;
|
|
105
105
|
}
|
|
106
106
|
async function getWorkbenchCommands() {
|
|
107
107
|
if (!_workbenchCommands) {
|
|
108
|
-
const { workbenchCommands } = await import("./commands-
|
|
108
|
+
const { workbenchCommands } = await import("./commands-D2o62iRL.js");
|
|
109
109
|
_workbenchCommands = workbenchCommands;
|
|
110
110
|
}
|
|
111
111
|
return _workbenchCommands;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-cli",
|
|
3
|
-
"version": "0.51.
|
|
3
|
+
"version": "0.51.9",
|
|
4
4
|
"description": "Developer CLI for SMRT framework - introspection, testing, and project management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"@happyvertical/ai": "^0.89.11",
|
|
29
29
|
"@happyvertical/files": "^0.89.11",
|
|
30
30
|
"@happyvertical/logger": "^0.89.11",
|
|
31
|
-
"@happyvertical/smrt-agents": "0.51.
|
|
32
|
-
"@happyvertical/smrt-config": "0.51.
|
|
33
|
-
"@happyvertical/smrt-core": "0.51.
|
|
34
|
-
"@happyvertical/smrt-dev-mcp": "0.51.
|
|
35
|
-
"@happyvertical/smrt-playground": "0.51.
|
|
36
|
-
"@happyvertical/smrt-types": "0.51.
|
|
31
|
+
"@happyvertical/smrt-agents": "0.51.9",
|
|
32
|
+
"@happyvertical/smrt-config": "0.51.9",
|
|
33
|
+
"@happyvertical/smrt-core": "0.51.9",
|
|
34
|
+
"@happyvertical/smrt-dev-mcp": "0.51.9",
|
|
35
|
+
"@happyvertical/smrt-playground": "0.51.9",
|
|
36
|
+
"@happyvertical/smrt-types": "0.51.9",
|
|
37
37
|
"@happyvertical/sql": "^0.89.11",
|
|
38
38
|
"@happyvertical/utils": "^0.89.11",
|
|
39
39
|
"acorn": "^8.17.0",
|