appwrite-utils-cli 0.9.59 → 0.9.61

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/README.md CHANGED
@@ -124,6 +124,8 @@ This updated CLI ensures that developers have robust tools at their fingertips t
124
124
 
125
125
  ## Changelog
126
126
 
127
+ - 0.9.61: Remove fileURLToPath -- should hopefully fix windows
128
+ - 0.9.60: Fix init command to repository URL
127
129
  - 0.9.59: Fix to Windows path names for loading config
128
130
  - 0.9.58: The same as before, I just missed it hah
129
131
  - 0.9.57: Changed generated schema type of `$createdAt` and `$updatedAt` to string from `string | Date` cause honestly if you want a date just parse it
@@ -29,7 +29,7 @@ export class InteractiveCLI {
29
29
  }
30
30
  async run() {
31
31
  console.log("Welcome to Appwrite Utils CLI Tool by Zach Handley");
32
- console.log("For more information, visit https://github.com/zachhandley/appwrite-utils");
32
+ console.log("For more information, visit https://github.com/zachhandley/AppwriteUtils");
33
33
  while (true) {
34
34
  const { action } = await inquirer.prompt([
35
35
  {
@@ -35,15 +35,13 @@ export const loadConfig = async (configDir) => {
35
35
  try {
36
36
  const configPath = path.join(configDir, "appwriteConfig.ts");
37
37
  console.log(`Loading config from: ${configPath}`);
38
- const configUrl = fileURLToPath(new URL(configPath, import.meta.url));
39
- const config = (await import(configUrl)).default;
38
+ const config = (await import(configPath)).default;
40
39
  const collectionsDir = path.join(configDir, "collections");
41
40
  const collectionFiles = fs.readdirSync(collectionsDir);
42
41
  config.collections = [];
43
42
  for (const file of collectionFiles) {
44
43
  const filePath = path.join(collectionsDir, file);
45
- const fileUrl = fileURLToPath(new URL(filePath, import.meta.url));
46
- const collectionModule = (await import(fileUrl)).default;
44
+ const collectionModule = (await import(filePath)).default;
47
45
  config.collections.push(collectionModule);
48
46
  }
49
47
  return config;
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": "0.9.59",
4
+ "version": "0.9.61",
5
5
  "main": "src/main.ts",
6
6
  "type": "module",
7
7
  "repository": {
@@ -38,7 +38,7 @@ export class InteractiveCLI {
38
38
  async run(): Promise<void> {
39
39
  console.log("Welcome to Appwrite Utils CLI Tool by Zach Handley");
40
40
  console.log(
41
- "For more information, visit https://github.com/zachhandley/appwrite-utils"
41
+ "For more information, visit https://github.com/zachhandley/AppwriteUtils"
42
42
  );
43
43
 
44
44
  while (true) {
@@ -40,8 +40,7 @@ export const loadConfig = async (
40
40
  try {
41
41
  const configPath = path.join(configDir, "appwriteConfig.ts");
42
42
  console.log(`Loading config from: ${configPath}`);
43
- const configUrl = fileURLToPath(new URL(configPath, import.meta.url));
44
- const config = (await import(configUrl)).default as AppwriteConfig;
43
+ const config = (await import(configPath)).default as AppwriteConfig;
45
44
 
46
45
  const collectionsDir = path.join(configDir, "collections");
47
46
  const collectionFiles = fs.readdirSync(collectionsDir);
@@ -50,8 +49,7 @@ export const loadConfig = async (
50
49
 
51
50
  for (const file of collectionFiles) {
52
51
  const filePath = path.join(collectionsDir, file);
53
- const fileUrl = fileURLToPath(new URL(filePath, import.meta.url));
54
- const collectionModule = (await import(fileUrl)).default as Collection;
52
+ const collectionModule = (await import(filePath)).default as Collection;
55
53
  config.collections.push(collectionModule);
56
54
  }
57
55