@happyvertical/smrt-cli 0.38.26 → 0.39.0

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.38.26",
3
+ "version": "0.39.0",
4
4
  "description": "Developer CLI for SMRT framework - introspection, testing, and project management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,21 +23,32 @@
23
23
  "import": "./dist/index.js"
24
24
  }
25
25
  },
26
+ "scripts": {
27
+ "build": "vite build",
28
+ "build:watch": "vite build --watch",
29
+ "clean": "rm -rf dist",
30
+ "dev": "npm run build:watch",
31
+ "test": "vitest run",
32
+ "test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run src/commands/__tests__/db-migrate-uuid.test.ts",
33
+ "test:watch": "vitest",
34
+ "typecheck": "tsc -p tsconfig.typecheck.json",
35
+ "cli": "tsx src/index.ts"
36
+ },
26
37
  "dependencies": {
27
- "@happyvertical/ai": "^0.78.0",
28
- "@happyvertical/files": "^0.78.0",
29
- "@happyvertical/logger": "^0.78.0",
30
- "@happyvertical/sql": "^0.78.0",
31
- "@happyvertical/utils": "^0.78.0",
38
+ "@happyvertical/ai": "catalog:",
39
+ "@happyvertical/files": "catalog:",
40
+ "@happyvertical/logger": "catalog:",
41
+ "@happyvertical/smrt-agents": "workspace:*",
42
+ "@happyvertical/smrt-config": "workspace:*",
43
+ "@happyvertical/smrt-core": "workspace:*",
44
+ "@happyvertical/smrt-dev-mcp": "workspace:*",
45
+ "@happyvertical/smrt-playground": "workspace:*",
46
+ "@happyvertical/smrt-types": "workspace:*",
47
+ "@happyvertical/sql": "catalog:",
48
+ "@happyvertical/utils": "catalog:",
32
49
  "acorn": "^8.17.0",
33
50
  "fast-glob": "3.3.3",
34
- "tar": "^7.5.19",
35
- "@happyvertical/smrt-agents": "0.38.26",
36
- "@happyvertical/smrt-config": "0.38.26",
37
- "@happyvertical/smrt-core": "0.38.26",
38
- "@happyvertical/smrt-dev-mcp": "0.38.26",
39
- "@happyvertical/smrt-playground": "0.38.26",
40
- "@happyvertical/smrt-types": "0.38.26"
51
+ "tar": "^7.5.19"
41
52
  },
42
53
  "devDependencies": {
43
54
  "@types/node": "24.13.2",
@@ -65,15 +76,5 @@
65
76
  "type": "git",
66
77
  "url": "https://github.com/happyvertical/smrt.git",
67
78
  "directory": "packages/cli"
68
- },
69
- "scripts": {
70
- "build": "vite build",
71
- "build:watch": "vite build --watch",
72
- "clean": "rm -rf dist",
73
- "dev": "npm run build:watch",
74
- "test": "vitest run",
75
- "test:watch": "vitest",
76
- "typecheck": "tsc -p tsconfig.typecheck.json",
77
- "cli": "tsx src/index.ts"
78
79
  }
79
- }
80
+ }
@@ -464,7 +464,19 @@ function collectMissingTypeImports(packageRoot, typeEntryFiles) {
464
464
  return missing;
465
465
  }
466
466
 
467
- const packageDir = resolve(process.cwd(), process.argv[2] ?? '.');
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
- const packOutput = run(
486
- 'npm',
487
- ['pack', '--json', '--ignore-scripts', '--pack-destination', tempDir],
488
- {
489
- cwd: packageDir,
490
- env: {
491
- ...process.env,
492
- [npmConfigDryRunKey]: 'false',
493
- [npmConfigDryRunUpperKey]: 'false',
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
- const packResult = JSON.parse(packOutput);
498
- const tarballName = packResult[0]?.filename;
515
+ );
516
+ const packResult = JSON.parse(packOutput);
517
+ const tarballName = packResult[0]?.filename;
499
518
 
500
- if (!tarballName) {
501
- fail(`npm pack did not return a tarball filename for ${packageJson.name}`);
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
package/LICENSE DELETED
@@ -1,7 +0,0 @@
1
- Copyright <2025> <Happy Vertical Corporation>
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
7
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.