appwrite-cli 13.0.0-rc.3 → 13.0.0-rc.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 13.0.0-rc.4
4
+
5
+ - Fix CLI ES module import issues
6
+
3
7
  ## 13.0.0-rc.3
4
8
 
5
9
  - Add `Schema` class for programmatically pushing and pulling appwrite config
package/README.md CHANGED
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
29
29
 
30
30
  ```sh
31
31
  $ appwrite -v
32
- 13.0.0-rc.3
32
+ 13.0.0-rc.4
33
33
  ```
34
34
 
35
35
  ### Install using prebuilt binaries
@@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
60
60
  Once the installation completes, you can verify your install using
61
61
  ```
62
62
  $ appwrite -v
63
- 13.0.0-rc.3
63
+ 13.0.0-rc.4
64
64
  ```
65
65
 
66
66
  ## Getting Started
package/cli.ts CHANGED
@@ -5,13 +5,16 @@ const oldWidth = process.stdout.columns;
5
5
  process.stdout.columns = 100;
6
6
  /** ---------------------------------------------- */
7
7
 
8
+ import { createRequire } from 'module';
8
9
  import { program } from 'commander';
9
- import chalk = require('chalk');
10
- const { version } = require('../package.json');
10
+ import chalk from 'chalk';
11
+ import inquirer from 'inquirer';
12
+
13
+ import packageJson from './package.json' with { type: 'json' };
11
14
  import { commandDescriptions, cliConfig } from './lib/parser.js';
12
- import { client } from './lib/commands/generic.js';
13
15
  import { getLatestVersion, compareVersions } from './lib/utils.js';
14
- import inquirer = require('inquirer');
16
+
17
+ import { client } from './lib/commands/generic.js';
15
18
  import { login, logout, whoami, migrate, register } from './lib/commands/generic.js';
16
19
  import { init } from './lib/commands/init.js';
17
20
  import { types } from './lib/commands/types.js';
@@ -19,6 +22,7 @@ import { pull } from './lib/commands/pull.js';
19
22
  import { run } from './lib/commands/run.js';
20
23
  import { push, deploy } from './lib/commands/push.js';
21
24
  import { update } from './lib/commands/update.js';
25
+
22
26
  import { account } from './lib/commands/services/account.js';
23
27
  import { console } from './lib/commands/services/console.js';
24
28
  import { databases } from './lib/commands/services/databases.js';
@@ -39,7 +43,11 @@ import { tokens } from './lib/commands/services/tokens.js';
39
43
  import { users } from './lib/commands/services/users.js';
40
44
  import { vcs } from './lib/commands/services/vcs.js';
41
45
 
42
- inquirer.registerPrompt('search-list', require('inquirer-search-list'));
46
+ const require = createRequire(import.meta.url);
47
+ const inquirerSearchList = require('inquirer-search-list');
48
+
49
+ const { version } = packageJson;
50
+ inquirer.registerPrompt('search-list', inquirerSearchList);
43
51
 
44
52
  /**
45
53
  * Check for updates and show version information