Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ignoreModule from "ignore";
const ignore: typeof ignoreModule =
(ignoreModule as unknown as { default?: typeof ignoreModule }).default ??
ignoreModule;
import tar from "tar";
import { create, extract } from "tar";
import fs from "fs";
import chokidar from "chokidar";
import inquirer from "inquirer";
Expand Down Expand Up @@ -323,7 +323,7 @@ const runFunction = async ({
fs.mkdirSync(hotSwapPath, { recursive: true });
}

await tar.extract({
await extract({
keep: true,
sync: true,
cwd: hotSwapPath,
Expand Down Expand Up @@ -358,7 +358,7 @@ const runFunction = async ({
fs.copyFileSync(sourcePath, filePath);
}

await tar.create(
await create(
{
gzip: true,
sync: true,
Expand Down
3 changes: 2 additions & 1 deletion lib/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const isInstalledViaNpm = (): boolean => {
scriptPath.includes("/usr/local/lib/node_modules/") ||
scriptPath.includes("/opt/homebrew/lib/node_modules/") ||
scriptPath.includes("/.npm-global/") ||
scriptPath.includes("/node_modules/.bin/")
scriptPath.includes("/node_modules/.bin/") ||
scriptPath.includes("/.nvm/versions/node/")
) {
return true;
}
Expand Down
4 changes: 4 additions & 0 deletions lib/commands/utils/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ export class Attributes {
required: attribute.required,
xdefault: attribute.default,
array: attribute.array,
encrypt: attribute.encrypt,
});
case "text":
return databasesService.createTextAttribute({
Expand All @@ -271,6 +272,7 @@ export class Attributes {
required: attribute.required,
xdefault: attribute.default,
array: attribute.array,
encrypt: attribute.encrypt,
});
case "mediumtext":
return databasesService.createMediumtextAttribute({
Expand All @@ -280,6 +282,7 @@ export class Attributes {
required: attribute.required,
xdefault: attribute.default,
array: attribute.array,
encrypt: attribute.encrypt,
});
case "longtext":
return databasesService.createLongtextAttribute({
Expand All @@ -289,6 +292,7 @@ export class Attributes {
required: attribute.required,
xdefault: attribute.default,
array: attribute.array,
encrypt: attribute.encrypt,
});
case "integer":
return databasesService.createIntegerAttribute({
Expand Down
6 changes: 3 additions & 3 deletions lib/commands/utils/deployment.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from "fs";
import path from "path";
import tar from "tar";
import { create, extract } from "tar";
import { Client, AppwriteException } from "@appwrite.io/console";
import { error } from "../../parser.js";

Expand All @@ -26,7 +26,7 @@ interface DeploymentDetails {
async function packageDirectory(dirPath: string): Promise<File> {
const tempFile = `${dirPath.replace(/[^a-zA-Z0-9]/g, "_")}-${Date.now()}.tar.gz`;

await tar.create(
await create(
{
gzip: true,
file: tempFile,
Expand Down Expand Up @@ -111,7 +111,7 @@ export async function downloadDeploymentCode(params: {
);
}

tar.extract({
extract({
sync: true,
cwd: resourcePath,
file: compressedFileName,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"inquirer-search-list": "^1.2.6",
"json-bigint": "^1.0.0",
"tail": "^2.2.6",
"tar": "^6.1.11",
"tar": "^7.4.3",
"undici": "^5.28.2",
"zod": "^4.3.5"
},
Expand All @@ -76,7 +76,7 @@
"@types/inquirer": "^8.2.10",
"@types/json-bigint": "^1.0.4",
"@types/node": "^18.19.0",
"@types/tar": "^6.1.11",
"@types/tar": "^6.1.13",
"@yao-pkg/pkg": "^6.11.0",
"esbuild": "^0.27.2",
"prettier": "^3.7.4",
Expand Down