appwrite-utils-cli 1.2.25 → 1.2.26

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.
@@ -473,6 +473,13 @@ export class InteractiveCLI {
473
473
  const functionNameLower = functionConfig.name
474
474
  .toLowerCase()
475
475
  .replace(/\s+/g, "-");
476
+ // Debug logging
477
+ console.log(chalk.blue(`🔍 Function deployment debug:`));
478
+ console.log(chalk.gray(` Function name: ${functionConfig.name}`));
479
+ console.log(chalk.gray(` Function ID: ${functionConfig.$id}`));
480
+ console.log(chalk.gray(` Config dirPath: ${functionConfig.dirPath || 'undefined'}`));
481
+ console.log(chalk.gray(` Appwrite folder: ${this.controller.getAppwriteFolderPath()}`));
482
+ console.log(chalk.gray(` Current working dir: ${process.cwd()}`));
476
483
  // Check locations in priority order:
477
484
  const priorityLocations = [
478
485
  // 1. Config dirPath if specified
@@ -484,11 +491,16 @@ export class InteractiveCLI {
484
491
  // 4. Current working directory/name
485
492
  join(process.cwd(), functionNameLower),
486
493
  ].filter((val) => val !== undefined); // Remove undefined entries (in case dirPath is undefined)
494
+ console.log(chalk.blue(`🔍 Priority locations to check:`));
495
+ priorityLocations.forEach((loc, i) => {
496
+ console.log(chalk.gray(` ${i + 1}. ${loc}`));
497
+ });
487
498
  let functionPath = null;
488
499
  // Check each priority location
489
500
  for (const location of priorityLocations) {
501
+ console.log(chalk.gray(` Checking: ${location} - ${fs.existsSync(location) ? 'EXISTS' : 'NOT FOUND'}`));
490
502
  if (fs.existsSync(location)) {
491
- console.log(chalk.green(`Found function at: ${location}`));
503
+ console.log(chalk.green(`✅ Found function at: ${location}`));
492
504
  functionPath = location;
493
505
  break;
494
506
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "appwrite-utils-cli",
3
3
  "description": "Appwrite Utility Functions to help with database management, data conversion, data import, migrations, and much more. Meant to be used as a CLI tool, I do not recommend installing this in frontend environments.",
4
- "version": "1.2.25",
4
+ "version": "1.2.26",
5
5
  "main": "src/main.ts",
6
6
  "type": "module",
7
7
  "repository": {
@@ -620,6 +620,14 @@ export class InteractiveCLI {
620
620
  .toLowerCase()
621
621
  .replace(/\s+/g, "-");
622
622
 
623
+ // Debug logging
624
+ console.log(chalk.blue(`🔍 Function deployment debug:`));
625
+ console.log(chalk.gray(` Function name: ${functionConfig.name}`));
626
+ console.log(chalk.gray(` Function ID: ${functionConfig.$id}`));
627
+ console.log(chalk.gray(` Config dirPath: ${functionConfig.dirPath || 'undefined'}`));
628
+ console.log(chalk.gray(` Appwrite folder: ${this.controller.getAppwriteFolderPath()}`));
629
+ console.log(chalk.gray(` Current working dir: ${process.cwd()}`));
630
+
623
631
  // Check locations in priority order:
624
632
  const priorityLocations = [
625
633
  // 1. Config dirPath if specified
@@ -636,12 +644,18 @@ export class InteractiveCLI {
636
644
  join(process.cwd(), functionNameLower),
637
645
  ].filter((val): val is string => val !== undefined); // Remove undefined entries (in case dirPath is undefined)
638
646
 
647
+ console.log(chalk.blue(`🔍 Priority locations to check:`));
648
+ priorityLocations.forEach((loc, i) => {
649
+ console.log(chalk.gray(` ${i + 1}. ${loc}`));
650
+ });
651
+
639
652
  let functionPath: string | null = null;
640
653
 
641
654
  // Check each priority location
642
655
  for (const location of priorityLocations) {
656
+ console.log(chalk.gray(` Checking: ${location} - ${fs.existsSync(location) ? 'EXISTS' : 'NOT FOUND'}`));
643
657
  if (fs.existsSync(location)) {
644
- console.log(chalk.green(`Found function at: ${location}`));
658
+ console.log(chalk.green(`✅ Found function at: ${location}`));
645
659
  functionPath = location;
646
660
  break;
647
661
  }