appwrite-utils-cli 0.10.70 → 0.10.71

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
@@ -148,6 +148,7 @@ This updated CLI ensures that developers have robust tools at their fingertips t
148
148
 
149
149
  ## Changelog
150
150
 
151
+ - 0.10.71: Fix create template function `__dirname`
151
152
  - 0.10.70: Fixed `--transfer-users` phones
152
153
  - 0.10.67: Added `--transfer-users` boolean flag to also transfer users between projects
153
154
  - 0.10.66: Fixed `ignore` always being an empty array, if not set, so it properly ignores the defaults
@@ -1,9 +1,12 @@
1
1
  import { AppwriteException, Client, Functions, Query, Runtime, } from "node-appwrite";
2
- import { join } from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+ import { join, dirname } from "node:path";
3
4
  import fs from "node:fs";
4
5
  import {} from "appwrite-utils";
5
6
  import chalk from "chalk";
6
7
  import { extract as extractTar } from "tar";
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = dirname(__filename);
7
10
  export const listFunctions = async (client, queries, search) => {
8
11
  const functions = new Functions(client);
9
12
  const functionsList = await functions.list(queries, search);
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.10.70",
4
+ "version": "0.10.71",
5
5
  "main": "src/main.ts",
6
6
  "type": "module",
7
7
  "repository": {
@@ -5,7 +5,8 @@ import {
5
5
  Query,
6
6
  Runtime,
7
7
  } from "node-appwrite";
8
- import { join } from "node:path";
8
+ import { fileURLToPath } from "node:url";
9
+ import { join, dirname } from "node:path";
9
10
  import fs from "node:fs";
10
11
  import {
11
12
  type AppwriteFunction,
@@ -15,6 +16,9 @@ import {
15
16
  import chalk from "chalk";
16
17
  import { extract as extractTar } from "tar";
17
18
 
19
+ const __filename = fileURLToPath(import.meta.url);
20
+ const __dirname = dirname(__filename);
21
+
18
22
  export const listFunctions = async (
19
23
  client: Client,
20
24
  queries?: string[],