@cpmai/cli 0.3.0-beta.2 → 0.3.0-beta.4

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -7
  2. package/package.json +5 -2
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  // src/index.ts
4
4
  import { Command } from "commander";
5
5
  import chalk5 from "chalk";
6
+ import { createRequire } from "module";
6
7
 
7
8
  // src/constants.ts
8
9
  var TIMEOUTS = {
@@ -698,7 +699,7 @@ ${rulesContent.trim()}
698
699
  * @returns The rules content string, or undefined if none exists
699
700
  */
700
701
  getRulesContent(manifest) {
701
- if (isRulesManifest(manifest)) {
702
+ if (isRulesManifest(manifest) && manifest.universal) {
702
703
  return manifest.universal.rules || manifest.universal.prompt;
703
704
  }
704
705
  return void 0;
@@ -1178,7 +1179,7 @@ var CursorRulesHandler = class {
1178
1179
  return filesRemoved;
1179
1180
  }
1180
1181
  getRulesContent(manifest) {
1181
- if (isRulesManifest(manifest)) {
1182
+ if (isRulesManifest(manifest) && manifest.universal) {
1182
1183
  return manifest.universal.rules || manifest.universal.prompt;
1183
1184
  }
1184
1185
  return void 0;
@@ -2650,8 +2651,8 @@ function createSpinner(initialText) {
2650
2651
  function spinnerText(action, packageName) {
2651
2652
  return `${action} ${chalk3.cyan(packageName)}...`;
2652
2653
  }
2653
- function successText(action, packageName, version) {
2654
- const versionStr = version ? `@${chalk3.dim(version)}` : "";
2654
+ function successText(action, packageName, version2) {
2655
+ const versionStr = version2 ? `@${chalk3.dim(version2)}` : "";
2655
2656
  return `${action} ${chalk3.green(packageName)}${versionStr}`;
2656
2657
  }
2657
2658
  function failText(action, packageName, error) {
@@ -2946,10 +2947,10 @@ function groupByType(packages) {
2946
2947
  );
2947
2948
  }
2948
2949
  function displayPackage(pkg) {
2949
- const version = pkg.version ? SEMANTIC_COLORS.dim(` v${pkg.version}`) : "";
2950
+ const version2 = pkg.version ? SEMANTIC_COLORS.dim(` v${pkg.version}`) : "";
2950
2951
  const platform = pkg.platform ? SEMANTIC_COLORS.dim(` [${pkg.platform}]`) : "";
2951
2952
  logger.log(
2952
- ` ${SEMANTIC_COLORS.success("\u25C9")} ${chalk4.bold(pkg.name)}${version}${platform}`
2953
+ ` ${SEMANTIC_COLORS.success("\u25C9")} ${chalk4.bold(pkg.name)}${version2}${platform}`
2953
2954
  );
2954
2955
  }
2955
2956
  function displayByType(byType) {
@@ -3036,6 +3037,8 @@ async function uninstallCommand(packageName) {
3036
3037
  }
3037
3038
 
3038
3039
  // src/index.ts
3040
+ var require2 = createRequire(import.meta.url);
3041
+ var { version } = require2("../package.json");
3039
3042
  var program = new Command();
3040
3043
  var logo = `
3041
3044
  ${chalk5.hex("#22d3ee")("\u2591\u2588\u2588\u2588\u2588\u2588\u2557\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2591\u2588\u2588\u2588\u2557\u2591\u2591\u2591\u2588\u2588\u2588\u2557")}
@@ -3049,7 +3052,7 @@ program.name("cpm").description(
3049
3052
  `${logo}
3050
3053
  ${chalk5.dim("Package manager for AI coding assistants")}
3051
3054
  `
3052
- ).version("0.2.0-beta.1").option("-q, --quiet", "Suppress all output except errors").option("-v, --verbose", "Enable verbose output for debugging").hook("preAction", (thisCommand) => {
3055
+ ).version(version).option("-q, --quiet", "Suppress all output except errors").option("-v, --verbose", "Enable verbose output for debugging").hook("preAction", (thisCommand) => {
3053
3056
  const opts = thisCommand.optsWithGlobals();
3054
3057
  configureLogger({
3055
3058
  quiet: opts.quiet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpmai/cli",
3
- "version": "0.3.0-beta.2",
3
+ "version": "0.3.0-beta.4",
4
4
  "description": "CPM CLI - cpm-ai.dev",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -29,14 +29,16 @@
29
29
  ],
30
30
  "scripts": {
31
31
  "dev": "tsx src/index.ts",
32
+ "clean": "rimraf dist",
32
33
  "build": "tsup",
34
+ "build:clean": "pnpm run clean && pnpm run build",
33
35
  "start": "node dist/index.js",
34
36
  "lint": "eslint src/",
35
37
  "typecheck": "tsc --noEmit",
36
38
  "test": "vitest run",
37
39
  "test:watch": "vitest",
38
40
  "test:coverage": "vitest run --coverage",
39
- "prepublishOnly": "npm run build"
41
+ "prepublishOnly": "pnpm run build:clean"
40
42
  },
41
43
  "dependencies": {
42
44
  "chalk": "^5.4.1",
@@ -52,6 +54,7 @@
52
54
  "@types/fs-extra": "^11.0.4",
53
55
  "@types/node": "^22.10.0",
54
56
  "@types/tar": "^6.1.13",
57
+ "rimraf": "^6.1.2",
55
58
  "tsup": "^8.3.5",
56
59
  "tsx": "^4.19.2",
57
60
  "typescript": "^5.7.0",