prpm 0.1.11 โ†’ 0.1.12

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.
@@ -87,7 +87,9 @@ async function handleCollectionsSearch(query, options) {
87
87
  if (c.description) {
88
88
  console.log(` ${c.description.substring(0, 70)}${c.description.length > 70 ? '...' : ''}`);
89
89
  }
90
- console.log(` ๐Ÿ‘ค by @${c.author}${c.verified ? ' โœ“' : ''}`);
90
+ if (c.author) {
91
+ console.log(` ๐Ÿ‘ค by @${c.author}${c.verified ? ' โœ“' : ''}`);
92
+ }
91
93
  console.log(` โฌ‡๏ธ ${c.downloads.toLocaleString()} installs ยท โญ ${c.stars.toLocaleString()} stars`);
92
94
  console.log('');
93
95
  });
@@ -101,7 +103,9 @@ async function handleCollectionsSearch(query, options) {
101
103
  if (c.description) {
102
104
  console.log(` ${c.description.substring(0, 70)}${c.description.length > 70 ? '...' : ''}`);
103
105
  }
104
- console.log(` ๐Ÿ‘ค by @${c.author}${c.verified ? ' โœ“' : ''}`);
106
+ if (c.author) {
107
+ console.log(` ๐Ÿ‘ค by @${c.author}${c.verified ? ' โœ“' : ''}`);
108
+ }
105
109
  console.log(` โฌ‡๏ธ ${c.downloads.toLocaleString()} installs ยท โญ ${c.stars.toLocaleString()} stars`);
106
110
  console.log('');
107
111
  });
@@ -169,7 +173,9 @@ async function handleCollectionsList(options) {
169
173
  if (c.description) {
170
174
  console.log(` ${c.description.substring(0, 70)}${c.description.length > 70 ? '...' : ''}`);
171
175
  }
172
- console.log(` ๐Ÿ‘ค by @${c.author}${c.verified ? ' โœ“' : ''}`);
176
+ if (c.author) {
177
+ console.log(` ๐Ÿ‘ค by @${c.author}${c.verified ? ' โœ“' : ''}`);
178
+ }
173
179
  console.log(` โฌ‡๏ธ ${c.downloads.toLocaleString()} installs ยท โญ ${c.stars.toLocaleString()} stars`);
174
180
  console.log('');
175
181
  });
@@ -183,7 +189,9 @@ async function handleCollectionsList(options) {
183
189
  if (c.description) {
184
190
  console.log(` ${c.description.substring(0, 70)}${c.description.length > 70 ? '...' : ''}`);
185
191
  }
186
- console.log(` ๐Ÿ‘ค by @${c.author}${c.verified ? ' โœ“' : ''}`);
192
+ if (c.author) {
193
+ console.log(` ๐Ÿ‘ค by @${c.author}${c.verified ? ' โœ“' : ''}`);
194
+ }
187
195
  console.log(` โฌ‡๏ธ ${c.downloads.toLocaleString()} installs ยท โญ ${c.stars.toLocaleString()} stars`);
188
196
  console.log('');
189
197
  });
@@ -265,7 +273,9 @@ async function handleCollectionInfo(collectionSpec) {
265
273
  console.log(` Stars: ${collection.stars.toLocaleString()}`);
266
274
  console.log(` Version: ${collection.version}`);
267
275
  console.log(` Packages: ${collection.packages.length}`);
268
- console.log(` Author: ${collection.author}${collection.verified ? ' โœ“' : ''}`);
276
+ if (collection.author) {
277
+ console.log(` Author: ${collection.author}${collection.verified ? ' โœ“' : ''}`);
278
+ }
269
279
  if (collection.category) {
270
280
  console.log(` Category: ${collection.category}`);
271
281
  }
@@ -503,8 +513,10 @@ async function handleCollectionInstall(collectionSpec, options) {
503
513
  try {
504
514
  console.log(`\n ${progress} Installing ${pkg.packageId}@${pkg.version}...`);
505
515
  // Only pass 'as' format if user explicitly requested it via --as flag
506
- // Otherwise, let handleInstall auto-detect the format based on existing directories
507
- // This ensures collections respect existing .claude or .cursor directories
516
+ // Otherwise, handleInstall will use this priority order:
517
+ // 1. defaultFormat from .prpmrc config
518
+ // 2. Auto-detection based on existing directories
519
+ // 3. Package native format
508
520
  const installOptions = {
509
521
  fromCollection: {
510
522
  scope,
@@ -224,18 +224,29 @@ async function handleInstall(packageSpec, options) {
224
224
  console.log(` ${pkg.name} ${pkg.official ? '๐Ÿ…' : ''}`);
225
225
  console.log(` ${pkg.description || 'No description'}`);
226
226
  console.log(` ${typeIcon} Type: ${typeLabel}`);
227
- // Determine format preference with auto-detection
227
+ // Determine format preference with priority order:
228
+ // 1. CLI --as flag (highest priority)
229
+ // 2. defaultFormat from .prpmrc config
230
+ // 3. Auto-detection based on existing directories
231
+ // 4. Package native format (fallback)
228
232
  let format = options.as;
229
- // Auto-detect format if not explicitly specified
230
233
  if (!format) {
231
- const detectedFormat = await (0, filesystem_1.autoDetectFormat)();
232
- if (detectedFormat) {
233
- format = detectedFormat;
234
- console.log(` ๐Ÿ” Auto-detected ${format} format (found .${format}/ directory)`);
234
+ // Check for config default format
235
+ if (config.defaultFormat) {
236
+ format = config.defaultFormat;
237
+ console.log(` โš™๏ธ Using default format from config: ${format}`);
235
238
  }
236
239
  else {
237
- // No existing directories found, use package's native format
238
- format = pkg.format;
240
+ // Auto-detect format based on existing directories
241
+ const detectedFormat = await (0, filesystem_1.autoDetectFormat)();
242
+ if (detectedFormat) {
243
+ format = detectedFormat;
244
+ console.log(` ๐Ÿ” Auto-detected ${format} format (found .${format}/ directory)`);
245
+ }
246
+ else {
247
+ // No config or detection, use package's native format
248
+ format = pkg.format;
249
+ }
239
250
  }
240
251
  }
241
252
  // Special handling for Claude packages: default to CLAUDE.md if it doesn't exist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prpm",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Prompt Package Manager CLI - Install and manage prompt-based files",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -45,8 +45,8 @@
45
45
  "license": "MIT",
46
46
  "dependencies": {
47
47
  "@octokit/rest": "^22.0.0",
48
- "@pr-pm/registry-client": "^1.3.9",
49
- "@pr-pm/types": "^0.2.10",
48
+ "@pr-pm/registry-client": "^1.3.10",
49
+ "@pr-pm/types": "^0.2.11",
50
50
  "ajv": "^8.17.1",
51
51
  "ajv-formats": "^3.0.1",
52
52
  "commander": "^11.1.0",