Skip to content

Commit ab12231

Browse files
authored
Merge pull request #2413 from appwrite/multiple-terminologies
2 parents 94ba19f + 36e76a2 commit ab12231

110 files changed

Lines changed: 2947 additions & 1906 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"dependencies": {
2424
"@ai-sdk/svelte": "^1.1.24",
25-
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@9c55755",
25+
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@e621876",
2626
"@appwrite.io/pink-icons": "0.25.0",
2727
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@865e2fc",
2828
"@appwrite.io/pink-legacy": "^1.0.3",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/actions/analytics.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const analytics = Analytics({
5252
});
5353

5454
export function trackEvent(name: string, data: object = null): void {
55-
if (!isTrackingAllowed()) {
55+
if (!name || !isTrackingAllowed()) {
5656
return;
5757
}
5858

@@ -76,7 +76,7 @@ export function trackEvent(name: string, data: object = null): void {
7676
}
7777

7878
export function trackError(exception: Error, event: Submit): void {
79-
if (exception instanceof AppwriteException && exception.type) {
79+
if (exception instanceof AppwriteException && exception.type && event) {
8080
trackEvent(Submit.Error, {
8181
type: exception.type,
8282
form: event
@@ -148,11 +148,14 @@ export enum Click {
148148
ConnectRepositoryClick = 'click_connect_repository',
149149
CreditsRedeemClick = 'click_credits_redeem',
150150
CloudSignupClick = 'click_cloud_signup',
151+
151152
DatabaseColumnDelete = 'click_column_delete',
152153
DatabaseIndexDelete = 'click_index_delete',
153154
DatabaseTableDelete = 'click_table_delete',
155+
DatabaseRowDelete = 'click_row_delete',
154156
DatabaseDatabaseDelete = 'click_database_delete',
155157
DatabaseImportCsv = 'click_database_import_csv',
158+
156159
DomainCreateClick = 'click_domain_create',
157160
DomainDeleteClick = 'click_domain_delete',
158161
DomainRetryDomainVerificationClick = 'click_domain_retry_domain_verification',
@@ -289,15 +292,18 @@ export enum Submit {
289292
RowDelete = 'submit_row_delete',
290293
RowUpdate = 'submit_row_update',
291294
RowUpdatePermissions = 'submit_row_update_permissions',
295+
292296
IndexCreate = 'submit_index_create',
293297
IndexDelete = 'submit_index_delete',
294-
TableCreate = 'submit_row_create',
295-
TableDelete = 'submit_row_delete',
296-
TableUpdateName = 'submit_row_update_name',
297-
TableUpdatePermissions = 'submit_row_update_permissions',
298-
TableUpdateSecurity = 'submit_row_update_security',
299-
TableUpdateEnabled = 'submit_row_update_enabled',
300-
TableUpdateDisplayNames = 'submit_row_update_display_names',
298+
299+
TableCreate = 'submit_table_create',
300+
TableDelete = 'submit_table_delete',
301+
TableUpdateName = 'submit_table_update_name',
302+
TableUpdatePermissions = 'submit_table_update_permissions',
303+
TableUpdateSecurity = 'submit_table_update_security',
304+
TableUpdateEnabled = 'submit_table_update_enabled',
305+
TableUpdateDisplayNames = 'submit_table_update_display_names',
306+
301307
FunctionCreate = 'submit_function_create',
302308
FunctionDelete = 'submit_function_delete',
303309
FunctionUpdateName = 'submit_function_update_name',

src/lib/components/backupRestoreBox.svelte

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,22 @@
5757
}
5858
5959
function updateOrAddItem(payload: Payload) {
60-
// todo: @itznotabug - might need a change to $table?
61-
const { $id, status, $collection, policyId } = payload;
62-
if ($collection === 'archives' && policyId !== null) {
60+
// the internal structure still uses `$collection`,
61+
// and is basically an identifier of the op. type here!
62+
const { $id, status, $collection: type, policyId } = payload;
63+
if (type === 'archives' && policyId !== null) {
6364
return;
6465
}
6566
66-
if ($collection in backupRestoreItems) {
67-
const collectionMap = backupRestoreItems[$collection];
67+
if (type in backupRestoreItems) {
68+
const collectionMap = backupRestoreItems[type];
6869
6970
if (collectionMap.has($id)) {
7071
collectionMap.get($id).status = status;
7172
if (status === 'completed') {
7273
invalidate(Dependencies.BACKUPS);
7374
74-
if ($collection === 'restorations') {
75+
if (type === 'restorations') {
7576
const { newId, newName } =
7677
collectionMap.get($id).options?.['databases']?.['database'][0] || {};
7778
@@ -81,7 +82,7 @@
8182
} else if (status === 'pending' || status === 'processing' || status === 'uploading') {
8283
collectionMap.set($id, payload);
8384
}
84-
backupRestoreItems[$collection] = collectionMap;
85+
backupRestoreItems[type] = collectionMap;
8586
}
8687
}
8788

src/lib/helpers/buildTimeout.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,24 @@ function isBuildTimedOut(createdAt: string, status: string, timeoutSeconds: numb
2222
* Gets the effective status for a build, considering timeout
2323
*/
2424
export function getEffectiveBuildStatus(
25-
originalStatus: string,
26-
createdAt: string,
25+
deployment: Models.Deployment,
2726
consoleVariables: Models.ConsoleVariables | undefined
2827
): string {
28+
const originalStatus = deployment.status;
29+
const createdAt = deployment.$createdAt;
30+
2931
const timeoutSeconds = getBuildTimeoutSeconds(consoleVariables);
3032
if (isBuildTimedOut(createdAt, originalStatus, timeoutSeconds)) {
3133
return 'failed';
3234
}
35+
36+
const isReady = originalStatus === 'ready';
37+
const hasScreenshot = deployment.screenshotLight && deployment.screenshotDark;
38+
39+
if (isReady && !hasScreenshot) {
40+
return 'finalizing';
41+
}
42+
3343
return originalStatus;
3444
}
3545

0 commit comments

Comments
 (0)