From 67ebc75180bdc5b3d939463a346f334f35a85b72 Mon Sep 17 00:00:00 2001 From: Carson Holgate Date: Sun, 2 Aug 2026 11:16:09 -0700 Subject: [PATCH] Fix inspect command packaging --- npm_modules/cli/package.json | 2 +- npm_modules/cli/scripts/clean-dist.js | 7 +++++++ .../commands/inspect_commands/snapshot.spec.ts | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 npm_modules/cli/scripts/clean-dist.js rename npm_modules/cli/{src => test}/commands/inspect_commands/snapshot.spec.ts (97%) diff --git a/npm_modules/cli/package.json b/npm_modules/cli/package.json index d9e94fd1a..1525b5113 100644 --- a/npm_modules/cli/package.json +++ b/npm_modules/cli/package.json @@ -22,7 +22,7 @@ ], "scripts": { "prepare": "npm run build", - "prebuild": "node scripts/bundle-skills.js", + "prebuild": "node scripts/clean-dist.js && node scripts/bundle-skills.js", "build": "npm exec --package=typescript@5.9.2 tsc -- --project ./tsconfig.dist.json", "test": "tsx node_modules/jasmine/bin/jasmine", "watch": "tsc --watch", diff --git a/npm_modules/cli/scripts/clean-dist.js b/npm_modules/cli/scripts/clean-dist.js new file mode 100644 index 000000000..c09df32d5 --- /dev/null +++ b/npm_modules/cli/scripts/clean-dist.js @@ -0,0 +1,7 @@ +const fs = require('fs'); +const path = require('path'); + +fs.rmSync(path.join(__dirname, '..', 'dist'), { + recursive: true, + force: true, +}); diff --git a/npm_modules/cli/src/commands/inspect_commands/snapshot.spec.ts b/npm_modules/cli/test/commands/inspect_commands/snapshot.spec.ts similarity index 97% rename from npm_modules/cli/src/commands/inspect_commands/snapshot.spec.ts rename to npm_modules/cli/test/commands/inspect_commands/snapshot.spec.ts index f1179c16c..4dde48fa9 100644 --- a/npm_modules/cli/src/commands/inspect_commands/snapshot.spec.ts +++ b/npm_modules/cli/test/commands/inspect_commands/snapshot.spec.ts @@ -1,5 +1,5 @@ import 'jasmine'; -import { firstElementId, findElementByKey } from './snapshot'; +import { findElementByKey, firstElementId } from '../../../src/commands/inspect_commands/snapshot'; describe('snapshot tree helpers', () => { describe('firstElementId', () => {