obsidian-plugin-config 1.6.15 → 1.6.17

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.
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Obsidian Plugin Config - CLI Entry Point
5
5
  * Global command: obsidian-inject
6
- * Version: 1.6.15
6
+ * Version: 1.6.17
7
7
  */
8
8
 
9
9
  import { execSync } from 'child_process';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-plugin-config",
3
- "version": "1.6.15",
3
+ "version": "1.6.17",
4
4
  "description": "Global CLI injection tool for Obsidian plugins",
5
5
  "type": "module",
6
6
  "bin": {
@@ -317,6 +317,18 @@ async function buildAndPublishNpm(): Promise<void> {
317
317
  }
318
318
  console.log(`\nšŸŽ‰ Complete workflow successful!`);
319
319
  console.log(` Test: cd any-plugin && obsidian-inject`);
320
+ console.log(`\nāœ… Press any key to exit...`);
321
+
322
+ // Wait for user to press any key
323
+ process.stdin.setRawMode(true);
324
+ process.stdin.resume();
325
+ await new Promise<void>((resolve) => {
326
+ process.stdin.once('data', () => {
327
+ process.stdin.setRawMode(false);
328
+ process.stdin.pause();
329
+ resolve();
330
+ });
331
+ });
320
332
  } catch (error) {
321
333
  console.error(
322
334
  `\nāŒ Workflow failed: ${error instanceof Error ? error.message : String(error)}`
@@ -181,14 +181,14 @@ export async function showInjectionPlan(
181
181
  console.log(` šŸ” Analyze centralized imports (manual commenting may be needed)`);
182
182
 
183
183
  if (autoConfirm) {
184
- console.log(`\nāœ… Auto-confirming injection...`);
184
+ console.log(`\nāœ… Auto-confirming all file replacements...`);
185
185
  rl.close();
186
186
  return true;
187
187
  }
188
188
 
189
- const result = await askConfirmation(`\nProceed with injection?`, rl);
189
+ // No global confirmation needed - file-by-file confirmation will happen in diffAndPromptFiles
190
190
  rl.close();
191
- return result;
191
+ return true;
192
192
  }
193
193
 
194
194
  /**
@@ -522,7 +522,6 @@ export async function injectScripts(
522
522
  }
523
523
 
524
524
  try {
525
- const targetFile = path.join(targetPath, destName);
526
525
  const templateContent = copyFromLocal(src);
527
526
 
528
527
  // For .env: merge existing values into the template