@happyvertical/smrt-cli 0.38.26 → 0.39.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.1",
|
|
4
4
|
"description": "Developer CLI for SMRT framework - introspection, testing, and project management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"acorn": "^8.17.0",
|
|
33
33
|
"fast-glob": "3.3.3",
|
|
34
34
|
"tar": "^7.5.19",
|
|
35
|
-
"@happyvertical/smrt-agents": "0.
|
|
36
|
-
"@happyvertical/smrt-
|
|
37
|
-
"@happyvertical/smrt-
|
|
38
|
-
"@happyvertical/smrt-
|
|
39
|
-
"@happyvertical/smrt-
|
|
40
|
-
"@happyvertical/smrt-
|
|
35
|
+
"@happyvertical/smrt-agents": "0.39.1",
|
|
36
|
+
"@happyvertical/smrt-core": "0.39.1",
|
|
37
|
+
"@happyvertical/smrt-dev-mcp": "0.39.1",
|
|
38
|
+
"@happyvertical/smrt-types": "0.39.1",
|
|
39
|
+
"@happyvertical/smrt-config": "0.39.1",
|
|
40
|
+
"@happyvertical/smrt-playground": "0.39.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "24.13.2",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"clean": "rm -rf dist",
|
|
73
73
|
"dev": "npm run build:watch",
|
|
74
74
|
"test": "vitest run",
|
|
75
|
+
"test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run src/commands/__tests__/db-migrate-uuid.test.ts",
|
|
75
76
|
"test:watch": "vitest",
|
|
76
77
|
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
77
78
|
"cli": "tsx src/index.ts"
|
|
@@ -464,7 +464,19 @@ function collectMissingTypeImports(packageRoot, typeEntryFiles) {
|
|
|
464
464
|
return missing;
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
const
|
|
467
|
+
const args = process.argv.slice(2);
|
|
468
|
+
const tarballFlagIndex = args.indexOf('--tarball');
|
|
469
|
+
const suppliedTarball =
|
|
470
|
+
tarballFlagIndex === -1 ? undefined : args[tarballFlagIndex + 1];
|
|
471
|
+
if (tarballFlagIndex !== -1 && !suppliedTarball) {
|
|
472
|
+
fail('--tarball requires a path');
|
|
473
|
+
}
|
|
474
|
+
const packageArgument = args.find(
|
|
475
|
+
(arg, index) =>
|
|
476
|
+
!arg.startsWith('-') &&
|
|
477
|
+
(tarballFlagIndex === -1 || index !== tarballFlagIndex + 1),
|
|
478
|
+
);
|
|
479
|
+
const packageDir = resolve(process.cwd(), packageArgument ?? '.');
|
|
468
480
|
const packageJsonPath = join(packageDir, 'package.json');
|
|
469
481
|
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
470
482
|
const typePaths = collectTypePaths(packageJson);
|
|
@@ -482,26 +494,36 @@ if (typePaths.length === 0 && runtimePaths.length === 0) {
|
|
|
482
494
|
const tempDir = mkdtempSync(join(tmpdir(), 'smrt-pack-'));
|
|
483
495
|
|
|
484
496
|
try {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
{
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
497
|
+
let tarballPath;
|
|
498
|
+
if (suppliedTarball) {
|
|
499
|
+
tarballPath = resolve(process.cwd(), suppliedTarball);
|
|
500
|
+
if (!existsSync(tarballPath)) {
|
|
501
|
+
fail(`Supplied tarball does not exist: ${tarballPath}`);
|
|
502
|
+
}
|
|
503
|
+
} else {
|
|
504
|
+
const packOutput = run(
|
|
505
|
+
'npm',
|
|
506
|
+
['pack', '--json', '--ignore-scripts', '--pack-destination', tempDir],
|
|
507
|
+
{
|
|
508
|
+
cwd: packageDir,
|
|
509
|
+
env: {
|
|
510
|
+
...process.env,
|
|
511
|
+
[npmConfigDryRunKey]: 'false',
|
|
512
|
+
[npmConfigDryRunUpperKey]: 'false',
|
|
513
|
+
},
|
|
494
514
|
},
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
const tarballName = packResult[0]?.filename;
|
|
515
|
+
);
|
|
516
|
+
const packResult = JSON.parse(packOutput);
|
|
517
|
+
const tarballName = packResult[0]?.filename;
|
|
499
518
|
|
|
500
|
-
|
|
501
|
-
|
|
519
|
+
if (!tarballName) {
|
|
520
|
+
fail(
|
|
521
|
+
`npm pack did not return a tarball filename for ${packageJson.name}`,
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
tarballPath = join(tempDir, tarballName);
|
|
502
525
|
}
|
|
503
526
|
|
|
504
|
-
const tarballPath = join(tempDir, tarballName);
|
|
505
527
|
const archiveListing = run('tar', ['-tf', tarballPath]);
|
|
506
528
|
const archiveEntries = new Set(
|
|
507
529
|
archiveListing
|