appwrite-utils-cli 0.9.60 → 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,7 @@ 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
127
128
  - 0.9.60: Fix init command to repository URL
128
129
  - 0.9.59: Fix to Windows path names for loading config
129
130
  - 0.9.58: The same as before, I just missed it hah
@@ -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.60",
4
+ "version": "0.9.61",
5
5
  "main": "src/main.ts",
6
6
  "type": "module",
7
7
  "repository": {
@@ -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