Skip to content

Commit 61a1760

Browse files
committed
wip
1 parent e9708be commit 61a1760

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

lib/commands/generic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const loginCommand = async ({
8484
globalConfig.setEmail(answers.email);
8585

8686
let client = await sdkForConsole(false);
87-
let accountClient = new Account(client as unknown as ConsoleClient);
87+
let accountClient = new Account(client);
8888

8989
let account;
9090

lib/commands/pull.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
success,
2929
log,
3030
warn,
31+
error,
3132
actionRunner,
3233
commandDescriptions,
3334
} from "../parser.js";
@@ -49,6 +50,14 @@ interface PullSitesOptions {
4950
export const pullResources = async ({
5051
skipDeprecated = false,
5152
}: PullResourcesOptions = {}): Promise<void> => {
53+
const project = localConfig.getProject();
54+
if (!project.projectId) {
55+
error(
56+
"Project configuration not found. Please run 'appwrite init project' to initialize your project first.",
57+
);
58+
process.exit(1);
59+
}
60+
5261
const actions: Record<string, (options?: any) => Promise<void>> = {
5362
settings: pullSettings,
5463
functions: pullFunctions,

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"generate": "tsx scripts/generate-commands.ts",
2121
"prepublishOnly": "npm run build",
2222
"test": "echo \"Error: no test specified\" && exit 1",
23-
"linux-x64": "bun run build && bun build ./dist/index.js --compile --target=bun-linux-x64 --outfile build/appwrite-cli-linux-x64",
24-
"linux-arm64": "bun run build && bun build ./dist/index.js --compile --target=bun-linux-arm64 --outfile build/appwrite-cli-linux-arm64",
25-
"mac-x64": "bun run build && bun build ./dist/index.js --compile --target=bun-darwin-x64 --outfile build/appwrite-cli-darwin-x64",
26-
"mac-arm64": "bun run build && bun build ./dist/index.js --compile --target=bun-darwin-arm64 --outfile build/appwrite-cli-darwin-arm64",
27-
"windows-x64": "bun run build && bun build ./dist/index.js --compile --target=bun-windows-x64 --outfile build/appwrite-cli-win-x64.exe",
28-
"windows-arm64": "bun run build && bun build ./dist/index.js --compile --target=bun-windows-arm64 --outfile build/appwrite-cli-win-arm64.exe"
23+
"linux-x64": "bun run build && bun build ./dist/index.js --compile --sourcemap=inline --target=bun-linux-x64 --outfile build/appwrite-cli-linux-x64",
24+
"linux-arm64": "bun run build && bun build ./dist/index.js --compile --sourcemap=inline --target=bun-linux-arm64 --outfile build/appwrite-cli-linux-arm64",
25+
"mac-x64": "bun run build && bun build ./dist/index.js --compile --sourcemap=inline --target=bun-darwin-x64 --outfile build/appwrite-cli-darwin-x64",
26+
"mac-arm64": "bun run build && bun build ./dist/index.js --compile --sourcemap=inline --target=bun-darwin-arm64 --outfile build/appwrite-cli-darwin-arm64",
27+
"windows-x64": "bun run build && bun build ./dist/index.js --compile --sourcemap=inline --target=bun-windows-x64 --outfile build/appwrite-cli-win-x64.exe",
28+
"windows-arm64": "bun run build && bun build ./dist/index.js --compile --sourcemap=inline --target=bun-windows-arm64 --outfile build/appwrite-cli-win-arm64.exe"
2929
},
3030
"dependencies": {
3131
"@appwrite.io/console": "^2.1.0",

0 commit comments

Comments
 (0)