appwrite-cli 20.0.0 → 20.1.0
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 +2 -2
- package/dist/bundle-win-arm64.mjs +127 -43
- package/dist/cli.cjs +127 -43
- package/dist/index.cjs +18 -4
- package/dist/index.js +18 -4
- package/dist/lib/commands/generic.d.ts +3 -1
- package/dist/lib/commands/generic.d.ts.map +1 -1
- package/dist/lib/config.d.ts +1 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/questions.d.ts +1 -0
- package/dist/lib/questions.d.ts.map +1 -1
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
|
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
$ appwrite -v
|
|
32
|
-
20.
|
|
32
|
+
20.1.0
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Install using prebuilt binaries
|
|
@@ -83,7 +83,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
|
|
|
83
83
|
Once the installation completes, you can verify your install using
|
|
84
84
|
```
|
|
85
85
|
$ appwrite -v
|
|
86
|
-
20.
|
|
86
|
+
20.1.0
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
## Getting Started
|
|
@@ -87731,7 +87731,7 @@ var package_default = {
|
|
|
87731
87731
|
type: "module",
|
|
87732
87732
|
homepage: "https://appwrite.io/support",
|
|
87733
87733
|
description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
87734
|
-
version: "20.
|
|
87734
|
+
version: "20.1.0",
|
|
87735
87735
|
license: "BSD-3-Clause",
|
|
87736
87736
|
main: "dist/index.cjs",
|
|
87737
87737
|
module: "dist/index.js",
|
|
@@ -102468,7 +102468,7 @@ var validateCrossDatabase = (data, ctx) => {
|
|
|
102468
102468
|
// lib/constants.ts
|
|
102469
102469
|
var SDK_TITLE = "Appwrite";
|
|
102470
102470
|
var SDK_TITLE_LOWER = "appwrite";
|
|
102471
|
-
var SDK_VERSION = "20.
|
|
102471
|
+
var SDK_VERSION = "20.1.0";
|
|
102472
102472
|
var SDK_NAME = "Command Line";
|
|
102473
102473
|
var SDK_PLATFORM = "console";
|
|
102474
102474
|
var SDK_LANGUAGE = "cli";
|
|
@@ -103601,6 +103601,17 @@ var CONFIG_KEY_ORDER = [
|
|
|
103601
103601
|
function isRecord(value) {
|
|
103602
103602
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
103603
103603
|
}
|
|
103604
|
+
function normalizeCloudConsoleEndpoint(endpoint) {
|
|
103605
|
+
try {
|
|
103606
|
+
const url2 = new URL(endpoint);
|
|
103607
|
+
if (url2.hostname === "cloud.appwrite.io" || url2.hostname.endsWith(".cloud.appwrite.io")) {
|
|
103608
|
+
return "https://cloud.appwrite.io/v1";
|
|
103609
|
+
}
|
|
103610
|
+
} catch (_error) {
|
|
103611
|
+
return endpoint;
|
|
103612
|
+
}
|
|
103613
|
+
return endpoint;
|
|
103614
|
+
}
|
|
103604
103615
|
function ensureDirectoryForFile(filePath) {
|
|
103605
103616
|
const dir = _path.dirname(filePath);
|
|
103606
103617
|
if (!fs2.existsSync(dir)) {
|
|
@@ -104386,9 +104397,12 @@ var Global = class _Global extends Config {
|
|
|
104386
104397
|
sessions.forEach((sessionId) => {
|
|
104387
104398
|
const sessionData = this.data[sessionId];
|
|
104388
104399
|
const email3 = sessionData[_Global.PREFERENCE_EMAIL] ?? "";
|
|
104389
|
-
const endpoint =
|
|
104400
|
+
const endpoint = normalizeCloudConsoleEndpoint(
|
|
104401
|
+
sessionData[_Global.PREFERENCE_ENDPOINT] ?? ""
|
|
104402
|
+
);
|
|
104390
104403
|
const key = `${email3}|${endpoint}`;
|
|
104391
|
-
|
|
104404
|
+
const existingSession = sessionMap.get(key);
|
|
104405
|
+
if (!existingSession || sessionId === current || existingSession.id !== current) {
|
|
104392
104406
|
sessionMap.set(key, {
|
|
104393
104407
|
id: sessionId,
|
|
104394
104408
|
endpoint,
|
|
@@ -133773,16 +133787,6 @@ var questionsCreateMessagingTopic = [
|
|
|
133773
133787
|
}
|
|
133774
133788
|
];
|
|
133775
133789
|
var questionsLogin = [
|
|
133776
|
-
{
|
|
133777
|
-
type: "list",
|
|
133778
|
-
name: "method",
|
|
133779
|
-
message: "What would you like to do?",
|
|
133780
|
-
choices: [
|
|
133781
|
-
{ name: "Login to an account", value: "login" },
|
|
133782
|
-
{ name: "Switch to an account", value: "select" }
|
|
133783
|
-
],
|
|
133784
|
-
when: () => globalConfig2.getSessions().length >= 2
|
|
133785
|
-
},
|
|
133786
133790
|
{
|
|
133787
133791
|
type: "input",
|
|
133788
133792
|
name: "email",
|
|
@@ -133792,8 +133796,7 @@ var questionsLogin = [
|
|
|
133792
133796
|
return "Please enter your email";
|
|
133793
133797
|
}
|
|
133794
133798
|
return true;
|
|
133795
|
-
}
|
|
133796
|
-
when: (answers) => answers.method !== "select"
|
|
133799
|
+
}
|
|
133797
133800
|
},
|
|
133798
133801
|
{
|
|
133799
133802
|
type: "password",
|
|
@@ -133805,33 +133808,30 @@ var questionsLogin = [
|
|
|
133805
133808
|
return "Please enter your password";
|
|
133806
133809
|
}
|
|
133807
133810
|
return true;
|
|
133808
|
-
}
|
|
133809
|
-
|
|
133810
|
-
|
|
133811
|
+
}
|
|
133812
|
+
}
|
|
133813
|
+
];
|
|
133814
|
+
var questionsSwitchAccount = [
|
|
133811
133815
|
{
|
|
133812
133816
|
type: "list",
|
|
133813
133817
|
name: "accountId",
|
|
133814
|
-
message: "Select
|
|
133818
|
+
message: "Select account:",
|
|
133815
133819
|
choices() {
|
|
133816
133820
|
const sessions = globalConfig2.getSessions();
|
|
133817
133821
|
const current = globalConfig2.getCurrentSession();
|
|
133818
133822
|
const data = [];
|
|
133819
|
-
const longestEmail = sessions.reduce(
|
|
133820
|
-
(prev, current2) => prev && (prev.email ?? "").length > (current2.email ?? "").length ? prev : current2
|
|
133821
|
-
).email.length;
|
|
133822
133823
|
sessions.forEach((session) => {
|
|
133823
133824
|
if (session.email) {
|
|
133824
133825
|
data.push({
|
|
133825
133826
|
current: current === session.id,
|
|
133826
133827
|
value: session.id,
|
|
133827
|
-
short:
|
|
133828
|
-
name:
|
|
133828
|
+
short: session.email,
|
|
133829
|
+
name: session.endpoint === DEFAULT_ENDPOINT ? session.email : `${session.email} (${session.endpoint})`
|
|
133829
133830
|
});
|
|
133830
133831
|
}
|
|
133831
133832
|
});
|
|
133832
133833
|
return data.sort((a, b2) => Number(b2.current) - Number(a.current));
|
|
133833
|
-
}
|
|
133834
|
-
when: (answers) => answers.method === "select"
|
|
133834
|
+
}
|
|
133835
133835
|
}
|
|
133836
133836
|
];
|
|
133837
133837
|
var questionGetEndpoint = [
|
|
@@ -134525,6 +134525,46 @@ var client_default = Client3;
|
|
|
134525
134525
|
// lib/commands/generic.ts
|
|
134526
134526
|
var DEFAULT_ENDPOINT2 = "https://cloud.appwrite.io/v1";
|
|
134527
134527
|
var isMfaRequiredError = (err) => err?.type === "user_more_factors_required" || err?.response === "user_more_factors_required";
|
|
134528
|
+
var isGuestUnauthorizedError = (err) => err?.type === "general_unauthorized_scope" || err?.response === "general_unauthorized_scope";
|
|
134529
|
+
var isRegionalCloudEndpoint = (endpoint) => {
|
|
134530
|
+
try {
|
|
134531
|
+
const hostname3 = new URL(endpoint).hostname;
|
|
134532
|
+
return isCloudHostname(hostname3) && hostname3 !== "cloud.appwrite.io";
|
|
134533
|
+
} catch (_error) {
|
|
134534
|
+
return false;
|
|
134535
|
+
}
|
|
134536
|
+
};
|
|
134537
|
+
var restoreCurrentSession = (sessionId) => {
|
|
134538
|
+
globalConfig2.setCurrentSession(
|
|
134539
|
+
globalConfig2.getSessionIds().includes(sessionId) ? sessionId : ""
|
|
134540
|
+
);
|
|
134541
|
+
};
|
|
134542
|
+
var removeCurrentSession = () => {
|
|
134543
|
+
const current = globalConfig2.getCurrentSession();
|
|
134544
|
+
globalConfig2.setCurrentSession("");
|
|
134545
|
+
globalConfig2.removeSession(current);
|
|
134546
|
+
};
|
|
134547
|
+
var getCurrentAccount = async () => {
|
|
134548
|
+
if (globalConfig2.getEndpoint() === "" || globalConfig2.getCookie() === "") {
|
|
134549
|
+
return null;
|
|
134550
|
+
}
|
|
134551
|
+
const endpoint = normalizeCloudConsoleEndpoint(globalConfig2.getEndpoint());
|
|
134552
|
+
if (endpoint !== globalConfig2.getEndpoint()) {
|
|
134553
|
+
globalConfig2.setEndpoint(endpoint);
|
|
134554
|
+
}
|
|
134555
|
+
const client2 = await sdkForConsole(false);
|
|
134556
|
+
const accountClient2 = new Account(client2);
|
|
134557
|
+
try {
|
|
134558
|
+
const account2 = await accountClient2.get();
|
|
134559
|
+
globalConfig2.setEmail(account2.email);
|
|
134560
|
+
return account2;
|
|
134561
|
+
} catch (err) {
|
|
134562
|
+
if (isGuestUnauthorizedError(err)) {
|
|
134563
|
+
removeCurrentSession();
|
|
134564
|
+
}
|
|
134565
|
+
return null;
|
|
134566
|
+
}
|
|
134567
|
+
};
|
|
134528
134568
|
var createLegacyConsoleClient = (endpoint) => {
|
|
134529
134569
|
const legacyClient = new client_default();
|
|
134530
134570
|
legacyClient.setEndpoint(endpoint);
|
|
@@ -134583,7 +134623,9 @@ var deleteLocalSession = (accountId) => {
|
|
|
134583
134623
|
var getSessionAccountKey = (sessionId) => {
|
|
134584
134624
|
const session = globalConfig2.get(sessionId);
|
|
134585
134625
|
if (!session) return void 0;
|
|
134586
|
-
return `${session.email ?? ""}|${
|
|
134626
|
+
return `${session.email ?? ""}|${normalizeCloudConsoleEndpoint(
|
|
134627
|
+
session.endpoint ?? ""
|
|
134628
|
+
)}`;
|
|
134587
134629
|
};
|
|
134588
134630
|
var planSessionLogout = (selectedSessionIds) => {
|
|
134589
134631
|
const sessionIdsByAccount = /* @__PURE__ */ new Map();
|
|
@@ -134611,26 +134653,68 @@ var loginCommand = async ({
|
|
|
134611
134653
|
password,
|
|
134612
134654
|
endpoint,
|
|
134613
134655
|
mfa,
|
|
134614
|
-
code
|
|
134656
|
+
code,
|
|
134657
|
+
switch: switchAccount,
|
|
134658
|
+
new: newAccount
|
|
134615
134659
|
}) => {
|
|
134616
|
-
|
|
134617
|
-
|
|
134660
|
+
let oldCurrent = globalConfig2.getCurrentSession();
|
|
134661
|
+
if (switchAccount && newAccount) {
|
|
134662
|
+
throw new Error("Use either --switch or --new, not both.");
|
|
134663
|
+
}
|
|
134664
|
+
if (endpoint && isRegionalCloudEndpoint(endpoint)) {
|
|
134665
|
+
throw new Error(
|
|
134666
|
+
`Cloud login uses ${DEFAULT_ENDPOINT2}. Regional Cloud endpoints are for project API calls, not account login.`
|
|
134667
|
+
);
|
|
134668
|
+
}
|
|
134669
|
+
const configEndpoint = normalizeCloudConsoleEndpoint(
|
|
134670
|
+
(endpoint ?? globalConfig2.getEndpoint()) || DEFAULT_ENDPOINT2
|
|
134671
|
+
);
|
|
134618
134672
|
if (globalConfig2.getCurrentSession() !== "") {
|
|
134619
|
-
|
|
134620
|
-
|
|
134621
|
-
|
|
134673
|
+
const account3 = await getCurrentAccount();
|
|
134674
|
+
oldCurrent = globalConfig2.getCurrentSession();
|
|
134675
|
+
if (account3) {
|
|
134676
|
+
if (!email3 && !password && !endpoint && !switchAccount && !newAccount) {
|
|
134677
|
+
success2("Already logged in as " + account3.email);
|
|
134678
|
+
hint(`Use '${EXECUTABLE_NAME} login --new' to add another account`);
|
|
134679
|
+
return;
|
|
134680
|
+
}
|
|
134622
134681
|
}
|
|
134623
134682
|
}
|
|
134624
|
-
|
|
134683
|
+
let answers;
|
|
134684
|
+
if (switchAccount) {
|
|
134685
|
+
if (!globalConfig2.getSessions().some((session) => session.email)) {
|
|
134686
|
+
throw new Error(
|
|
134687
|
+
`No signed-in accounts found. Run '${EXECUTABLE_NAME} login' to sign in.`
|
|
134688
|
+
);
|
|
134689
|
+
}
|
|
134690
|
+
answers = await import_inquirer.default.prompt(questionsSwitchAccount);
|
|
134691
|
+
} else if (email3 && password) {
|
|
134692
|
+
answers = { email: email3, password };
|
|
134693
|
+
} else {
|
|
134694
|
+
answers = await import_inquirer.default.prompt(questionsLogin);
|
|
134695
|
+
}
|
|
134625
134696
|
if (!answers.method) {
|
|
134626
|
-
answers.method = "login";
|
|
134697
|
+
answers.method = switchAccount ? "select" : "login";
|
|
134627
134698
|
}
|
|
134628
134699
|
if (answers.method === "select") {
|
|
134629
134700
|
const accountId = answers.accountId;
|
|
134630
134701
|
if (!globalConfig2.getSessionIds().includes(accountId)) {
|
|
134631
134702
|
throw Error("Session ID not found");
|
|
134632
134703
|
}
|
|
134704
|
+
if (accountId === oldCurrent) {
|
|
134705
|
+
const account3 = await getCurrentAccount();
|
|
134706
|
+
if (account3) {
|
|
134707
|
+
success2(`Already using ${account3.email}`);
|
|
134708
|
+
return;
|
|
134709
|
+
}
|
|
134710
|
+
throw new Error(
|
|
134711
|
+
`Selected account session is no longer valid. Run '${EXECUTABLE_NAME} login --switch' again.`
|
|
134712
|
+
);
|
|
134713
|
+
}
|
|
134633
134714
|
globalConfig2.setCurrentSession(accountId);
|
|
134715
|
+
globalConfig2.setEndpoint(
|
|
134716
|
+
normalizeCloudConsoleEndpoint(globalConfig2.getEndpoint())
|
|
134717
|
+
);
|
|
134634
134718
|
const client3 = await sdkForConsole(false);
|
|
134635
134719
|
const accountClient3 = new Account(client3);
|
|
134636
134720
|
const legacyClient2 = createLegacyConsoleClient(
|
|
@@ -134640,6 +134724,10 @@ var loginCommand = async ({
|
|
|
134640
134724
|
await accountClient3.get();
|
|
134641
134725
|
} catch (err) {
|
|
134642
134726
|
if (!isMfaRequiredError(err)) {
|
|
134727
|
+
if (isGuestUnauthorizedError(err)) {
|
|
134728
|
+
globalConfig2.removeSession(accountId);
|
|
134729
|
+
}
|
|
134730
|
+
restoreCurrentSession(oldCurrent);
|
|
134643
134731
|
throw err;
|
|
134644
134732
|
}
|
|
134645
134733
|
await completeMfaLogin({
|
|
@@ -134708,12 +134796,8 @@ var whoami = new Command("whoami").description(commandDescriptions["whoami"]).ac
|
|
|
134708
134796
|
error51("No user is signed in. To sign in, run 'appwrite login'");
|
|
134709
134797
|
return;
|
|
134710
134798
|
}
|
|
134711
|
-
const
|
|
134712
|
-
|
|
134713
|
-
let account2;
|
|
134714
|
-
try {
|
|
134715
|
-
account2 = await accountClient2.get();
|
|
134716
|
-
} catch (_2) {
|
|
134799
|
+
const account2 = await getCurrentAccount();
|
|
134800
|
+
if (!account2) {
|
|
134717
134801
|
error51("No user is signed in. To sign in, run 'appwrite login'");
|
|
134718
134802
|
return;
|
|
134719
134803
|
}
|
|
@@ -134744,7 +134828,7 @@ var login = new Command("login").description(commandDescriptions["login"]).optio
|
|
|
134744
134828
|
).option(
|
|
134745
134829
|
`--mfa [factor]`,
|
|
134746
134830
|
`Multi-factor authentication login factor: totp, email, phone or recoveryCode`
|
|
134747
|
-
).option(`--code [code]`, `Multi-factor code`).configureHelp({
|
|
134831
|
+
).option(`--code [code]`, `Multi-factor code`).option(`--switch`, `Switch to another signed-in account`).option(`--new`, `Sign in to another account`).configureHelp({
|
|
134748
134832
|
helpWidth: process.stdout.columns || 80
|
|
134749
134833
|
}).action(actionRunner(loginCommand));
|
|
134750
134834
|
var logout = new Command("logout").description(commandDescriptions["logout"]).configureHelp({
|
package/dist/cli.cjs
CHANGED
|
@@ -87725,7 +87725,7 @@ var package_default = {
|
|
|
87725
87725
|
type: "module",
|
|
87726
87726
|
homepage: "https://appwrite.io/support",
|
|
87727
87727
|
description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
87728
|
-
version: "20.
|
|
87728
|
+
version: "20.1.0",
|
|
87729
87729
|
license: "BSD-3-Clause",
|
|
87730
87730
|
main: "dist/index.cjs",
|
|
87731
87731
|
module: "dist/index.js",
|
|
@@ -102462,7 +102462,7 @@ var validateCrossDatabase = (data, ctx) => {
|
|
|
102462
102462
|
// lib/constants.ts
|
|
102463
102463
|
var SDK_TITLE = "Appwrite";
|
|
102464
102464
|
var SDK_TITLE_LOWER = "appwrite";
|
|
102465
|
-
var SDK_VERSION = "20.
|
|
102465
|
+
var SDK_VERSION = "20.1.0";
|
|
102466
102466
|
var SDK_NAME = "Command Line";
|
|
102467
102467
|
var SDK_PLATFORM = "console";
|
|
102468
102468
|
var SDK_LANGUAGE = "cli";
|
|
@@ -103595,6 +103595,17 @@ var CONFIG_KEY_ORDER = [
|
|
|
103595
103595
|
function isRecord(value) {
|
|
103596
103596
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
103597
103597
|
}
|
|
103598
|
+
function normalizeCloudConsoleEndpoint(endpoint) {
|
|
103599
|
+
try {
|
|
103600
|
+
const url2 = new URL(endpoint);
|
|
103601
|
+
if (url2.hostname === "cloud.appwrite.io" || url2.hostname.endsWith(".cloud.appwrite.io")) {
|
|
103602
|
+
return "https://cloud.appwrite.io/v1";
|
|
103603
|
+
}
|
|
103604
|
+
} catch (_error) {
|
|
103605
|
+
return endpoint;
|
|
103606
|
+
}
|
|
103607
|
+
return endpoint;
|
|
103608
|
+
}
|
|
103598
103609
|
function ensureDirectoryForFile(filePath) {
|
|
103599
103610
|
const dir = import_path2.default.dirname(filePath);
|
|
103600
103611
|
if (!import_fs2.default.existsSync(dir)) {
|
|
@@ -104380,9 +104391,12 @@ var Global = class _Global extends Config {
|
|
|
104380
104391
|
sessions.forEach((sessionId) => {
|
|
104381
104392
|
const sessionData = this.data[sessionId];
|
|
104382
104393
|
const email3 = sessionData[_Global.PREFERENCE_EMAIL] ?? "";
|
|
104383
|
-
const endpoint =
|
|
104394
|
+
const endpoint = normalizeCloudConsoleEndpoint(
|
|
104395
|
+
sessionData[_Global.PREFERENCE_ENDPOINT] ?? ""
|
|
104396
|
+
);
|
|
104384
104397
|
const key = `${email3}|${endpoint}`;
|
|
104385
|
-
|
|
104398
|
+
const existingSession = sessionMap.get(key);
|
|
104399
|
+
if (!existingSession || sessionId === current || existingSession.id !== current) {
|
|
104386
104400
|
sessionMap.set(key, {
|
|
104387
104401
|
id: sessionId,
|
|
104388
104402
|
endpoint,
|
|
@@ -133767,16 +133781,6 @@ var questionsCreateMessagingTopic = [
|
|
|
133767
133781
|
}
|
|
133768
133782
|
];
|
|
133769
133783
|
var questionsLogin = [
|
|
133770
|
-
{
|
|
133771
|
-
type: "list",
|
|
133772
|
-
name: "method",
|
|
133773
|
-
message: "What would you like to do?",
|
|
133774
|
-
choices: [
|
|
133775
|
-
{ name: "Login to an account", value: "login" },
|
|
133776
|
-
{ name: "Switch to an account", value: "select" }
|
|
133777
|
-
],
|
|
133778
|
-
when: () => globalConfig2.getSessions().length >= 2
|
|
133779
|
-
},
|
|
133780
133784
|
{
|
|
133781
133785
|
type: "input",
|
|
133782
133786
|
name: "email",
|
|
@@ -133786,8 +133790,7 @@ var questionsLogin = [
|
|
|
133786
133790
|
return "Please enter your email";
|
|
133787
133791
|
}
|
|
133788
133792
|
return true;
|
|
133789
|
-
}
|
|
133790
|
-
when: (answers) => answers.method !== "select"
|
|
133793
|
+
}
|
|
133791
133794
|
},
|
|
133792
133795
|
{
|
|
133793
133796
|
type: "password",
|
|
@@ -133799,33 +133802,30 @@ var questionsLogin = [
|
|
|
133799
133802
|
return "Please enter your password";
|
|
133800
133803
|
}
|
|
133801
133804
|
return true;
|
|
133802
|
-
}
|
|
133803
|
-
|
|
133804
|
-
|
|
133805
|
+
}
|
|
133806
|
+
}
|
|
133807
|
+
];
|
|
133808
|
+
var questionsSwitchAccount = [
|
|
133805
133809
|
{
|
|
133806
133810
|
type: "list",
|
|
133807
133811
|
name: "accountId",
|
|
133808
|
-
message: "Select
|
|
133812
|
+
message: "Select account:",
|
|
133809
133813
|
choices() {
|
|
133810
133814
|
const sessions = globalConfig2.getSessions();
|
|
133811
133815
|
const current = globalConfig2.getCurrentSession();
|
|
133812
133816
|
const data = [];
|
|
133813
|
-
const longestEmail = sessions.reduce(
|
|
133814
|
-
(prev, current2) => prev && (prev.email ?? "").length > (current2.email ?? "").length ? prev : current2
|
|
133815
|
-
).email.length;
|
|
133816
133817
|
sessions.forEach((session) => {
|
|
133817
133818
|
if (session.email) {
|
|
133818
133819
|
data.push({
|
|
133819
133820
|
current: current === session.id,
|
|
133820
133821
|
value: session.id,
|
|
133821
|
-
short:
|
|
133822
|
-
name:
|
|
133822
|
+
short: session.email,
|
|
133823
|
+
name: session.endpoint === DEFAULT_ENDPOINT ? session.email : `${session.email} (${session.endpoint})`
|
|
133823
133824
|
});
|
|
133824
133825
|
}
|
|
133825
133826
|
});
|
|
133826
133827
|
return data.sort((a, b2) => Number(b2.current) - Number(a.current));
|
|
133827
|
-
}
|
|
133828
|
-
when: (answers) => answers.method === "select"
|
|
133828
|
+
}
|
|
133829
133829
|
}
|
|
133830
133830
|
];
|
|
133831
133831
|
var questionGetEndpoint = [
|
|
@@ -134519,6 +134519,46 @@ var client_default = Client3;
|
|
|
134519
134519
|
// lib/commands/generic.ts
|
|
134520
134520
|
var DEFAULT_ENDPOINT2 = "https://cloud.appwrite.io/v1";
|
|
134521
134521
|
var isMfaRequiredError = (err) => err?.type === "user_more_factors_required" || err?.response === "user_more_factors_required";
|
|
134522
|
+
var isGuestUnauthorizedError = (err) => err?.type === "general_unauthorized_scope" || err?.response === "general_unauthorized_scope";
|
|
134523
|
+
var isRegionalCloudEndpoint = (endpoint) => {
|
|
134524
|
+
try {
|
|
134525
|
+
const hostname3 = new URL(endpoint).hostname;
|
|
134526
|
+
return isCloudHostname(hostname3) && hostname3 !== "cloud.appwrite.io";
|
|
134527
|
+
} catch (_error) {
|
|
134528
|
+
return false;
|
|
134529
|
+
}
|
|
134530
|
+
};
|
|
134531
|
+
var restoreCurrentSession = (sessionId) => {
|
|
134532
|
+
globalConfig2.setCurrentSession(
|
|
134533
|
+
globalConfig2.getSessionIds().includes(sessionId) ? sessionId : ""
|
|
134534
|
+
);
|
|
134535
|
+
};
|
|
134536
|
+
var removeCurrentSession = () => {
|
|
134537
|
+
const current = globalConfig2.getCurrentSession();
|
|
134538
|
+
globalConfig2.setCurrentSession("");
|
|
134539
|
+
globalConfig2.removeSession(current);
|
|
134540
|
+
};
|
|
134541
|
+
var getCurrentAccount = async () => {
|
|
134542
|
+
if (globalConfig2.getEndpoint() === "" || globalConfig2.getCookie() === "") {
|
|
134543
|
+
return null;
|
|
134544
|
+
}
|
|
134545
|
+
const endpoint = normalizeCloudConsoleEndpoint(globalConfig2.getEndpoint());
|
|
134546
|
+
if (endpoint !== globalConfig2.getEndpoint()) {
|
|
134547
|
+
globalConfig2.setEndpoint(endpoint);
|
|
134548
|
+
}
|
|
134549
|
+
const client2 = await sdkForConsole(false);
|
|
134550
|
+
const accountClient2 = new Account(client2);
|
|
134551
|
+
try {
|
|
134552
|
+
const account2 = await accountClient2.get();
|
|
134553
|
+
globalConfig2.setEmail(account2.email);
|
|
134554
|
+
return account2;
|
|
134555
|
+
} catch (err) {
|
|
134556
|
+
if (isGuestUnauthorizedError(err)) {
|
|
134557
|
+
removeCurrentSession();
|
|
134558
|
+
}
|
|
134559
|
+
return null;
|
|
134560
|
+
}
|
|
134561
|
+
};
|
|
134522
134562
|
var createLegacyConsoleClient = (endpoint) => {
|
|
134523
134563
|
const legacyClient = new client_default();
|
|
134524
134564
|
legacyClient.setEndpoint(endpoint);
|
|
@@ -134577,7 +134617,9 @@ var deleteLocalSession = (accountId) => {
|
|
|
134577
134617
|
var getSessionAccountKey = (sessionId) => {
|
|
134578
134618
|
const session = globalConfig2.get(sessionId);
|
|
134579
134619
|
if (!session) return void 0;
|
|
134580
|
-
return `${session.email ?? ""}|${
|
|
134620
|
+
return `${session.email ?? ""}|${normalizeCloudConsoleEndpoint(
|
|
134621
|
+
session.endpoint ?? ""
|
|
134622
|
+
)}`;
|
|
134581
134623
|
};
|
|
134582
134624
|
var planSessionLogout = (selectedSessionIds) => {
|
|
134583
134625
|
const sessionIdsByAccount = /* @__PURE__ */ new Map();
|
|
@@ -134605,26 +134647,68 @@ var loginCommand = async ({
|
|
|
134605
134647
|
password,
|
|
134606
134648
|
endpoint,
|
|
134607
134649
|
mfa,
|
|
134608
|
-
code
|
|
134650
|
+
code,
|
|
134651
|
+
switch: switchAccount,
|
|
134652
|
+
new: newAccount
|
|
134609
134653
|
}) => {
|
|
134610
|
-
|
|
134611
|
-
|
|
134654
|
+
let oldCurrent = globalConfig2.getCurrentSession();
|
|
134655
|
+
if (switchAccount && newAccount) {
|
|
134656
|
+
throw new Error("Use either --switch or --new, not both.");
|
|
134657
|
+
}
|
|
134658
|
+
if (endpoint && isRegionalCloudEndpoint(endpoint)) {
|
|
134659
|
+
throw new Error(
|
|
134660
|
+
`Cloud login uses ${DEFAULT_ENDPOINT2}. Regional Cloud endpoints are for project API calls, not account login.`
|
|
134661
|
+
);
|
|
134662
|
+
}
|
|
134663
|
+
const configEndpoint = normalizeCloudConsoleEndpoint(
|
|
134664
|
+
(endpoint ?? globalConfig2.getEndpoint()) || DEFAULT_ENDPOINT2
|
|
134665
|
+
);
|
|
134612
134666
|
if (globalConfig2.getCurrentSession() !== "") {
|
|
134613
|
-
|
|
134614
|
-
|
|
134615
|
-
|
|
134667
|
+
const account3 = await getCurrentAccount();
|
|
134668
|
+
oldCurrent = globalConfig2.getCurrentSession();
|
|
134669
|
+
if (account3) {
|
|
134670
|
+
if (!email3 && !password && !endpoint && !switchAccount && !newAccount) {
|
|
134671
|
+
success2("Already logged in as " + account3.email);
|
|
134672
|
+
hint(`Use '${EXECUTABLE_NAME} login --new' to add another account`);
|
|
134673
|
+
return;
|
|
134674
|
+
}
|
|
134616
134675
|
}
|
|
134617
134676
|
}
|
|
134618
|
-
|
|
134677
|
+
let answers;
|
|
134678
|
+
if (switchAccount) {
|
|
134679
|
+
if (!globalConfig2.getSessions().some((session) => session.email)) {
|
|
134680
|
+
throw new Error(
|
|
134681
|
+
`No signed-in accounts found. Run '${EXECUTABLE_NAME} login' to sign in.`
|
|
134682
|
+
);
|
|
134683
|
+
}
|
|
134684
|
+
answers = await import_inquirer.default.prompt(questionsSwitchAccount);
|
|
134685
|
+
} else if (email3 && password) {
|
|
134686
|
+
answers = { email: email3, password };
|
|
134687
|
+
} else {
|
|
134688
|
+
answers = await import_inquirer.default.prompt(questionsLogin);
|
|
134689
|
+
}
|
|
134619
134690
|
if (!answers.method) {
|
|
134620
|
-
answers.method = "login";
|
|
134691
|
+
answers.method = switchAccount ? "select" : "login";
|
|
134621
134692
|
}
|
|
134622
134693
|
if (answers.method === "select") {
|
|
134623
134694
|
const accountId = answers.accountId;
|
|
134624
134695
|
if (!globalConfig2.getSessionIds().includes(accountId)) {
|
|
134625
134696
|
throw Error("Session ID not found");
|
|
134626
134697
|
}
|
|
134698
|
+
if (accountId === oldCurrent) {
|
|
134699
|
+
const account3 = await getCurrentAccount();
|
|
134700
|
+
if (account3) {
|
|
134701
|
+
success2(`Already using ${account3.email}`);
|
|
134702
|
+
return;
|
|
134703
|
+
}
|
|
134704
|
+
throw new Error(
|
|
134705
|
+
`Selected account session is no longer valid. Run '${EXECUTABLE_NAME} login --switch' again.`
|
|
134706
|
+
);
|
|
134707
|
+
}
|
|
134627
134708
|
globalConfig2.setCurrentSession(accountId);
|
|
134709
|
+
globalConfig2.setEndpoint(
|
|
134710
|
+
normalizeCloudConsoleEndpoint(globalConfig2.getEndpoint())
|
|
134711
|
+
);
|
|
134628
134712
|
const client3 = await sdkForConsole(false);
|
|
134629
134713
|
const accountClient3 = new Account(client3);
|
|
134630
134714
|
const legacyClient2 = createLegacyConsoleClient(
|
|
@@ -134634,6 +134718,10 @@ var loginCommand = async ({
|
|
|
134634
134718
|
await accountClient3.get();
|
|
134635
134719
|
} catch (err) {
|
|
134636
134720
|
if (!isMfaRequiredError(err)) {
|
|
134721
|
+
if (isGuestUnauthorizedError(err)) {
|
|
134722
|
+
globalConfig2.removeSession(accountId);
|
|
134723
|
+
}
|
|
134724
|
+
restoreCurrentSession(oldCurrent);
|
|
134637
134725
|
throw err;
|
|
134638
134726
|
}
|
|
134639
134727
|
await completeMfaLogin({
|
|
@@ -134702,12 +134790,8 @@ var whoami = new Command("whoami").description(commandDescriptions["whoami"]).ac
|
|
|
134702
134790
|
error51("No user is signed in. To sign in, run 'appwrite login'");
|
|
134703
134791
|
return;
|
|
134704
134792
|
}
|
|
134705
|
-
const
|
|
134706
|
-
|
|
134707
|
-
let account2;
|
|
134708
|
-
try {
|
|
134709
|
-
account2 = await accountClient2.get();
|
|
134710
|
-
} catch (_2) {
|
|
134793
|
+
const account2 = await getCurrentAccount();
|
|
134794
|
+
if (!account2) {
|
|
134711
134795
|
error51("No user is signed in. To sign in, run 'appwrite login'");
|
|
134712
134796
|
return;
|
|
134713
134797
|
}
|
|
@@ -134738,7 +134822,7 @@ var login = new Command("login").description(commandDescriptions["login"]).optio
|
|
|
134738
134822
|
).option(
|
|
134739
134823
|
`--mfa [factor]`,
|
|
134740
134824
|
`Multi-factor authentication login factor: totp, email, phone or recoveryCode`
|
|
134741
|
-
).option(`--code [code]`, `Multi-factor code`).configureHelp({
|
|
134825
|
+
).option(`--code [code]`, `Multi-factor code`).option(`--switch`, `Switch to another signed-in account`).option(`--new`, `Sign in to another account`).configureHelp({
|
|
134742
134826
|
helpWidth: process.stdout.columns || 80
|
|
134743
134827
|
}).action(actionRunner(loginCommand));
|
|
134744
134828
|
var logout = new Command("logout").description(commandDescriptions["logout"]).configureHelp({
|
package/dist/index.cjs
CHANGED
|
@@ -65008,7 +65008,7 @@ var id_default = ID;
|
|
|
65008
65008
|
// lib/constants.ts
|
|
65009
65009
|
var SDK_TITLE = "Appwrite";
|
|
65010
65010
|
var SDK_TITLE_LOWER = "appwrite";
|
|
65011
|
-
var SDK_VERSION = "20.
|
|
65011
|
+
var SDK_VERSION = "20.1.0";
|
|
65012
65012
|
var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
|
|
65013
65013
|
var EXECUTABLE_NAME = "appwrite";
|
|
65014
65014
|
var UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -80205,6 +80205,17 @@ var CONFIG_KEY_ORDER = [
|
|
|
80205
80205
|
function isRecord(value) {
|
|
80206
80206
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
80207
80207
|
}
|
|
80208
|
+
function normalizeCloudConsoleEndpoint(endpoint) {
|
|
80209
|
+
try {
|
|
80210
|
+
const url2 = new URL(endpoint);
|
|
80211
|
+
if (url2.hostname === "cloud.appwrite.io" || url2.hostname.endsWith(".cloud.appwrite.io")) {
|
|
80212
|
+
return "https://cloud.appwrite.io/v1";
|
|
80213
|
+
}
|
|
80214
|
+
} catch (_error) {
|
|
80215
|
+
return endpoint;
|
|
80216
|
+
}
|
|
80217
|
+
return endpoint;
|
|
80218
|
+
}
|
|
80208
80219
|
function ensureDirectoryForFile(filePath) {
|
|
80209
80220
|
const dir = import_path.default.dirname(filePath);
|
|
80210
80221
|
if (!import_fs.default.existsSync(dir)) {
|
|
@@ -81040,9 +81051,12 @@ var Global = class _Global extends Config {
|
|
|
81040
81051
|
sessions.forEach((sessionId) => {
|
|
81041
81052
|
const sessionData = this.data[sessionId];
|
|
81042
81053
|
const email3 = sessionData[_Global.PREFERENCE_EMAIL] ?? "";
|
|
81043
|
-
const endpoint =
|
|
81054
|
+
const endpoint = normalizeCloudConsoleEndpoint(
|
|
81055
|
+
sessionData[_Global.PREFERENCE_ENDPOINT] ?? ""
|
|
81056
|
+
);
|
|
81044
81057
|
const key = `${email3}|${endpoint}`;
|
|
81045
|
-
|
|
81058
|
+
const existingSession = sessionMap.get(key);
|
|
81059
|
+
if (!existingSession || sessionId === current || existingSession.id !== current) {
|
|
81046
81060
|
sessionMap.set(key, {
|
|
81047
81061
|
id: sessionId,
|
|
81048
81062
|
endpoint,
|
|
@@ -105723,7 +105737,7 @@ var package_default = {
|
|
|
105723
105737
|
type: "module",
|
|
105724
105738
|
homepage: "https://appwrite.io/support",
|
|
105725
105739
|
description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
105726
|
-
version: "20.
|
|
105740
|
+
version: "20.1.0",
|
|
105727
105741
|
license: "BSD-3-Clause",
|
|
105728
105742
|
main: "dist/index.cjs",
|
|
105729
105743
|
module: "dist/index.js",
|
package/dist/index.js
CHANGED
|
@@ -64988,7 +64988,7 @@ var id_default = ID;
|
|
|
64988
64988
|
// lib/constants.ts
|
|
64989
64989
|
var SDK_TITLE = "Appwrite";
|
|
64990
64990
|
var SDK_TITLE_LOWER = "appwrite";
|
|
64991
|
-
var SDK_VERSION = "20.
|
|
64991
|
+
var SDK_VERSION = "20.1.0";
|
|
64992
64992
|
var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
|
|
64993
64993
|
var EXECUTABLE_NAME = "appwrite";
|
|
64994
64994
|
var UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -80185,6 +80185,17 @@ var CONFIG_KEY_ORDER = [
|
|
|
80185
80185
|
function isRecord(value) {
|
|
80186
80186
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
80187
80187
|
}
|
|
80188
|
+
function normalizeCloudConsoleEndpoint(endpoint) {
|
|
80189
|
+
try {
|
|
80190
|
+
const url2 = new URL(endpoint);
|
|
80191
|
+
if (url2.hostname === "cloud.appwrite.io" || url2.hostname.endsWith(".cloud.appwrite.io")) {
|
|
80192
|
+
return "https://cloud.appwrite.io/v1";
|
|
80193
|
+
}
|
|
80194
|
+
} catch (_error) {
|
|
80195
|
+
return endpoint;
|
|
80196
|
+
}
|
|
80197
|
+
return endpoint;
|
|
80198
|
+
}
|
|
80188
80199
|
function ensureDirectoryForFile(filePath) {
|
|
80189
80200
|
const dir = _path.dirname(filePath);
|
|
80190
80201
|
if (!fs.existsSync(dir)) {
|
|
@@ -81020,9 +81031,12 @@ var Global = class _Global extends Config {
|
|
|
81020
81031
|
sessions.forEach((sessionId) => {
|
|
81021
81032
|
const sessionData = this.data[sessionId];
|
|
81022
81033
|
const email3 = sessionData[_Global.PREFERENCE_EMAIL] ?? "";
|
|
81023
|
-
const endpoint =
|
|
81034
|
+
const endpoint = normalizeCloudConsoleEndpoint(
|
|
81035
|
+
sessionData[_Global.PREFERENCE_ENDPOINT] ?? ""
|
|
81036
|
+
);
|
|
81024
81037
|
const key = `${email3}|${endpoint}`;
|
|
81025
|
-
|
|
81038
|
+
const existingSession = sessionMap.get(key);
|
|
81039
|
+
if (!existingSession || sessionId === current || existingSession.id !== current) {
|
|
81026
81040
|
sessionMap.set(key, {
|
|
81027
81041
|
id: sessionId,
|
|
81028
81042
|
endpoint,
|
|
@@ -105703,7 +105717,7 @@ var package_default = {
|
|
|
105703
105717
|
type: "module",
|
|
105704
105718
|
homepage: "https://appwrite.io/support",
|
|
105705
105719
|
description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
105706
|
-
version: "20.
|
|
105720
|
+
version: "20.1.0",
|
|
105707
105721
|
license: "BSD-3-Clause",
|
|
105708
105722
|
main: "dist/index.cjs",
|
|
105709
105723
|
module: "dist/index.js",
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
export declare const loginCommand: ({ email, password, endpoint, mfa, code, }: {
|
|
2
|
+
export declare const loginCommand: ({ email, password, endpoint, mfa, code, switch: switchAccount, new: newAccount, }: {
|
|
3
3
|
email?: string;
|
|
4
4
|
password?: string;
|
|
5
5
|
endpoint?: string;
|
|
6
6
|
mfa?: string;
|
|
7
7
|
code?: string;
|
|
8
|
+
switch?: boolean;
|
|
9
|
+
new?: boolean;
|
|
8
10
|
}) => Promise<void>;
|
|
9
11
|
export declare const whoami: Command;
|
|
10
12
|
export declare const register: Command;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../../lib/commands/generic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../../lib/commands/generic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8NpC,eAAO,MAAM,YAAY,GAAU,mFAQhC;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,KAAG,OAAO,CAAC,IAAI,CAoKf,CAAC;AAEF,eAAO,MAAM,MAAM,SAmChB,CAAC;AAEJ,eAAO,MAAM,QAAQ,SAMlB,CAAC;AAEJ,eAAO,MAAM,KAAK,SAkBmB,CAAC;AAEtC,eAAO,MAAM,MAAM,SAyEhB,CAAC;AAWJ,eAAO,MAAM,MAAM,SA8IhB,CAAC;AAEJ,eAAO,MAAM,OAAO,QAAa,OAAO,CAAC,IAAI,CAmB5C,CAAC"}
|
package/dist/lib/config.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ declare const KeysTopics: Set<string>;
|
|
|
12
12
|
declare const KeysTeams: Set<string>;
|
|
13
13
|
declare const KeysWebhooks: Set<string>;
|
|
14
14
|
declare const KeysAttributes: Set<string>;
|
|
15
|
+
export declare function normalizeCloudConsoleEndpoint(endpoint: string): string;
|
|
15
16
|
export declare function readLocalConfigFile(filePath: string): ConfigType;
|
|
16
17
|
export declare function getLocalConfigResourceDirname(filePath: string, resource: "functions" | "sites"): string;
|
|
17
18
|
export declare function getLocalConfigResourceDirnames(filePath: string): Record<"functions" | "sites", string>;
|
package/dist/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAgB9B,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,MAAM,EACN,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,oBAAoB,EAGrB,MAAM,gBAAgB,CAAC;AAGxB,KAAK,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAqB/D,QAAA,MAAM,QAAQ,aAA4B,CAAC;AAC3C,QAAA,MAAM,YAAY,aAAgC,CAAC;AAEnD,QAAA,MAAM,cAAc,aAAkC,CAAC;AACvD,QAAA,MAAM,SAAS,aAA6B,CAAC;AAC7C,QAAA,MAAM,WAAW,aAA8B,CAAC;AAChD,QAAA,MAAM,UAAU,aAA6B,CAAC;AAC9C,QAAA,MAAM,SAAS,aAA4B,CAAC;AAC5C,QAAA,MAAM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M,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAoCrE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI;IAIpD,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIpC,QAAQ,IAAI,MAAM;IAQlB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7B,WAAW,IAAI,MAAM;IAQrB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC,aAAa,IAAI,OAAO;IAOxB,aAAa,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;IAIxC,SAAS,IAAI,MAAM;IAOnB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B,UAAU,IAAI,MAAM;IAOpB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC,MAAM,IAAI,MAAM;IAOhB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIzB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAW7B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IAUzB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;CAUrC;AAED,eAAO,MAAM,WAAW,OAAc,CAAC;AACvC,eAAO,MAAM,YAAY,QAAe,CAAC;AACzC,OAAO,EACL,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,YAAY,EACZ,cAAc,EACd,SAAS,EACT,aAAa,GACd,CAAC"}
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const SDK_TITLE = "Appwrite";
|
|
2
2
|
export declare const SDK_TITLE_LOWER = "appwrite";
|
|
3
|
-
export declare const SDK_VERSION = "20.
|
|
3
|
+
export declare const SDK_VERSION = "20.1.0";
|
|
4
4
|
export declare const SDK_NAME = "Command Line";
|
|
5
5
|
export declare const SDK_PLATFORM = "console";
|
|
6
6
|
export declare const SDK_LANGUAGE = "cli";
|
package/dist/lib/questions.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare const questionsCreateTable: Question[];
|
|
|
42
42
|
export declare const questionsCreateMessagingTopic: Question[];
|
|
43
43
|
export declare const questionsPullCollection: Question[];
|
|
44
44
|
export declare const questionsLogin: Question[];
|
|
45
|
+
export declare const questionsSwitchAccount: Question[];
|
|
45
46
|
export declare const questionGetEndpoint: Question[];
|
|
46
47
|
export declare const questionsLogout: Question[];
|
|
47
48
|
export declare const questionsPushResources: Question[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../lib/questions.ts"],"names":[],"mappings":"AAuBA,UAAU,OAAO;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,UAAU,MAAM;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC;IACpE,OAAO,CAAC,EACJ,CAAC,CAAC,OAAO,EAAE,OA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s?: number;
|
|
20
20
|
}) => string | null;
|
|
21
|
+
export declare const isCloudHostname: (hostname: string) => boolean;
|
|
21
22
|
export declare const getConsoleBaseUrl: (endpoint: string) => string;
|
|
22
23
|
export declare const getConsoleProjectSlug: (endpoint: string, projectId: string) => string;
|
|
23
24
|
export declare const getFunctionDeploymentConsoleUrl: (endpoint: string, projectId: string, functionId: string, deploymentId: string) => string;
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAUzD,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,CAAC,OAAO,KAAG,YA8C9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,EACb,UAAU,MAAM,KACf,MASF,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,MAAM,eAAe,KAAG,OAEhE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,MAMhD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,UAAU,GAAG,YAAY,CAAC;AAEnE,KAAK,oBAAoB,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAuGF,eAAO,MAAM,wBAAwB,QAAO,kBAAkB,GAAG,IAchE,CAAC;AAcF,eAAO,MAAM,2BAA2B,GACtC,UAAS;IAAE,SAAS,CAAC,EAAE,M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Aa,iBAAiB,KAAG,IAMtE,CAAC;AAEF,wBAAgB,OAAO,IAAI,OAAO,CAIjC;AAwBD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAkBD,wBAAgB,kBAAkB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAWvE;AAED,wBAAgB,oBAAoB,IAAI;IACtC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAgEA;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,SAAS,EAAE,GAClB,SAAS,EAAE,CA6Bb;AAED,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,EAAE,EAC1B,cAAc,EAAE,MAAM,EAAE,EACxB,WAAW,EAAE,OAAO,GACnB,IAAI,CAiEN;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAa3E;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,EACjE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,CAAC,GACR,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAWZ"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"homepage": "https://appwrite.io/support",
|
|
5
5
|
"description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
6
|
-
"version": "20.
|
|
6
|
+
"version": "20.1.0",
|
|
7
7
|
"license": "BSD-3-Clause",
|
|
8
8
|
"main": "dist/index.cjs",
|
|
9
9
|
"module": "dist/index.js",
|