@packmind/cli 0.14.0 → 0.14.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.
Files changed (2) hide show
  1. package/main.cjs +21 -6
  2. package/package.json +1 -1
package/main.cjs CHANGED
@@ -3852,7 +3852,7 @@ var require_package = __commonJS({
3852
3852
  "apps/cli/package.json"(exports2, module2) {
3853
3853
  module2.exports = {
3854
3854
  name: "@packmind/cli",
3855
- version: "0.14.0",
3855
+ version: "0.14.1",
3856
3856
  description: "A command-line interface for Packmind linting and code quality checks",
3857
3857
  private: false,
3858
3858
  bin: {
@@ -5318,6 +5318,23 @@ var LintFilesInDirectoryUseCase = class {
5318
5318
  this.repositories = repositories;
5319
5319
  this.logger = logger2;
5320
5320
  }
5321
+ /**
5322
+ * Parses a scope string from the API into an array of patterns.
5323
+ * Handles comma-separated patterns and various edge cases.
5324
+ *
5325
+ * @param scope - The scope string from API (can be null, empty, or comma-separated)
5326
+ * @returns Array of scope patterns, or empty array if no valid scope
5327
+ */
5328
+ parseScopeString(scope) {
5329
+ if (!scope) {
5330
+ return [];
5331
+ }
5332
+ const trimmedScope = scope.trim();
5333
+ if (trimmedScope === "") {
5334
+ return [];
5335
+ }
5336
+ return trimmedScope.split(",").map((pattern) => pattern.trim()).filter((pattern) => pattern.length > 0);
5337
+ }
5321
5338
  fileMatchesScope(filePath, scopePatterns) {
5322
5339
  if (!scopePatterns || scopePatterns.length === 0) {
5323
5340
  return true;
@@ -5487,7 +5504,7 @@ var LintFilesInDirectoryUseCase = class {
5487
5504
  {
5488
5505
  name: standardSlug,
5489
5506
  slug: standardSlug,
5490
- scope: draftProgramsResult.scope ? [draftProgramsResult.scope] : [],
5507
+ scope: this.parseScopeString(draftProgramsResult.scope),
5491
5508
  rules: [
5492
5509
  {
5493
5510
  content: draftProgramsResult.ruleContent || "Draft Rule",
@@ -5525,7 +5542,7 @@ var LintFilesInDirectoryUseCase = class {
5525
5542
  {
5526
5543
  name: standardSlug,
5527
5544
  slug: standardSlug,
5528
- scope: activeProgramsResult.scope ? [activeProgramsResult.scope] : [],
5545
+ scope: this.parseScopeString(activeProgramsResult.scope),
5529
5546
  rules: [
5530
5547
  {
5531
5548
  content: activeProgramsResult.ruleContent || "Active Rule",
@@ -10221,7 +10238,6 @@ var InstallDefaultSkillsUseCase = class {
10221
10238
  errors: []
10222
10239
  };
10223
10240
  const response = await this.packmindGateway.getDefaultSkills({});
10224
- console.log(JSON.stringify(response, null, 2));
10225
10241
  try {
10226
10242
  for (const file of response.fileUpdates.createOrUpdate) {
10227
10243
  try {
@@ -12912,7 +12928,6 @@ var installDefaultSkillsCommand = (0, import_cmd_ts9.command)({
12912
12928
  try {
12913
12929
  logInfoConsole("Installing default skills...");
12914
12930
  const result = await packmindCliHexa.installDefaultSkills({});
12915
- console.log(JSON.stringify(result, null, 2));
12916
12931
  if (result.errors.length > 0) {
12917
12932
  for (const error of result.errors) {
12918
12933
  logErrorConsole(`Error: ${error}`);
@@ -13062,7 +13077,7 @@ var CreateStandardFromPlaybookUseCase = class {
13062
13077
  name: playbook.name,
13063
13078
  description: playbook.description,
13064
13079
  scope: playbook.scope,
13065
- rules: playbook.rules.map((r) => ({ content: r.content }))
13080
+ rules: playbook.rules
13066
13081
  });
13067
13082
  const rulesWithExamples = playbook.rules.filter((r) => r.examples);
13068
13083
  if (rulesWithExamples.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@packmind/cli",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "A command-line interface for Packmind linting and code quality checks",
5
5
  "private": false,
6
6
  "bin": {