From 731209dd71c13b14feeff105add902f808fe710a Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 19 Nov 2025 13:15:25 +0530 Subject: [PATCH 1/2] update: make `undefined` from `null`s. --- .github/workflows/dockerize-profiles.yml | 84 +++++++++---------- src/lib/sdk/billing.ts | 2 +- .../(console)/apply-credit/+page.svelte | 2 +- .../create-organization/+page.svelte | 3 +- .../create-organization/+page.svelte | 1 - .../onboarding/create-project/+page.ts | 1 - .../change-plan/+page.svelte | 3 +- src/routes/(public)/functions/deploy/+page.ts | 1 - .../(public)/template-[template]/+page.ts | 1 - 9 files changed, 46 insertions(+), 52 deletions(-) diff --git a/.github/workflows/dockerize-profiles.yml b/.github/workflows/dockerize-profiles.yml index 8e09a234a4..aafa95f324 100644 --- a/.github/workflows/dockerize-profiles.yml +++ b/.github/workflows/dockerize-profiles.yml @@ -1,49 +1,49 @@ name: Dockerize Profiles on: - push: - branches: [feat-profiles] - pull_request: - types: [opened, synchronize, reopened] - branches: [feat-profiles] - workflow_dispatch: + push: + branches: [feat-profiles] + pull_request: + types: [opened, synchronize, reopened] + branches: [feat-profiles] + workflow_dispatch: jobs: - dockerize-profiles: - runs-on: ubuntu-latest - - steps: - - name: Checkout the repo - uses: actions/checkout@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + dockerize-profiles: + runs-on: ubuntu-latest - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: appwrite/console-profiles - tags: | - type=ref,event=branch,prefix=branch- - type=ref,event=pr - type=sha,prefix=sha- - type=raw,value=gh-${{ github.run_id}} - flavor: | - latest=false + steps: + - name: Checkout the repo + uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push Docker image - id: push - uses: docker/build-push-action@v6 - with: - context: . - push: true - platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: appwrite/console-profiles + tags: | + type=ref,event=branch,prefix=branch- + type=ref,event=pr + type=sha,prefix=sha- + type=raw,value=gh-${{ github.run_id}} + flavor: | + latest=false + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@v6 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts index 0361f59101..bbbf79b16c 100644 --- a/src/lib/sdk/billing.ts +++ b/src/lib/sdk/billing.ts @@ -490,7 +490,7 @@ export class Billing { name: string, billingPlan: string, paymentMethodId: string, - billingAddressId: string = null, + billingAddressId: string = undefined, couponId: string = null, invites: Array = [], budget: number = undefined, diff --git a/src/routes/(console)/apply-credit/+page.svelte b/src/routes/(console)/apply-credit/+page.svelte index 61c770347b..64835fa0b6 100644 --- a/src/routes/(console)/apply-credit/+page.svelte +++ b/src/routes/(console)/apply-credit/+page.svelte @@ -134,7 +134,7 @@ name, billingPlan, paymentMethodId, - null, + undefined, couponData.code ? couponData.code : null, collaborators, billingBudget, diff --git a/src/routes/(console)/create-organization/+page.svelte b/src/routes/(console)/create-organization/+page.svelte index de2afad0fe..621536f254 100644 --- a/src/routes/(console)/create-organization/+page.svelte +++ b/src/routes/(console)/create-organization/+page.svelte @@ -112,7 +112,6 @@ ID.unique(), name, BillingPlan.FREE, - null, null ); } else { @@ -121,7 +120,7 @@ name, selectedPlan, paymentMethodId, - null, + undefined, selectedCoupon?.code, collaborators, billingBudget, diff --git a/src/routes/(console)/onboarding/create-organization/+page.svelte b/src/routes/(console)/onboarding/create-organization/+page.svelte index 3b563fd02e..6ed323c7a2 100644 --- a/src/routes/(console)/onboarding/create-organization/+page.svelte +++ b/src/routes/(console)/onboarding/create-organization/+page.svelte @@ -25,7 +25,6 @@ ID.unique(), organizationName, BillingPlan.FREE, - null, null ); diff --git a/src/routes/(console)/onboarding/create-project/+page.ts b/src/routes/(console)/onboarding/create-project/+page.ts index 6413f6e74f..1dc717add5 100644 --- a/src/routes/(console)/onboarding/create-project/+page.ts +++ b/src/routes/(console)/onboarding/create-project/+page.ts @@ -29,7 +29,6 @@ export const load: PageLoad = async ({ parent }) => { ID.unique(), 'Personal projects', BillingPlan.FREE, - null, null ); trackEvent(Submit.OrganizationCreate, { diff --git a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte index 153e85c5a5..a5293bdcfd 100644 --- a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte @@ -173,8 +173,7 @@ await sdk.forConsole.billing.updatePlan( data.organization.$id, selectedPlan, - paymentMethodId, - null + paymentMethodId ); // 2) If the target plan has a project limit, apply selected projects now diff --git a/src/routes/(public)/functions/deploy/+page.ts b/src/routes/(public)/functions/deploy/+page.ts index 978894e780..8701e23bf0 100644 --- a/src/routes/(public)/functions/deploy/+page.ts +++ b/src/routes/(public)/functions/deploy/+page.ts @@ -78,7 +78,6 @@ export const load: PageLoad = async ({ parent, url }) => { ID.unique(), 'Personal Projects', BillingPlan.FREE, - null, null ); } else { diff --git a/src/routes/(public)/template-[template]/+page.ts b/src/routes/(public)/template-[template]/+page.ts index 80f486c7f1..a1c759e214 100644 --- a/src/routes/(public)/template-[template]/+page.ts +++ b/src/routes/(public)/template-[template]/+page.ts @@ -49,7 +49,6 @@ export const load = async ({ parent, url, params }) => { ID.unique(), 'Personal project', BillingPlan.FREE, - null, null ); } From 2ed1d8cb3e85cbad171cd8d4bd603cec383c1f3f Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 19 Nov 2025 13:35:02 +0530 Subject: [PATCH 2/2] update: make `undefined` from `null`s. --- src/lib/sdk/billing.ts | 1 + src/routes/(console)/apply-credit/+page.svelte | 2 +- .../organization-[organization]/change-plan/+page.svelte | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts index bbbf79b16c..a2dcc6979b 100644 --- a/src/lib/sdk/billing.ts +++ b/src/lib/sdk/billing.ts @@ -628,6 +628,7 @@ export class Billing { budget, taxId }; + const uri = new URL(this.client.config.endpoint + path); return await this.client.call( 'patch', diff --git a/src/routes/(console)/apply-credit/+page.svelte b/src/routes/(console)/apply-credit/+page.svelte index 64835fa0b6..db9dbc0387 100644 --- a/src/routes/(console)/apply-credit/+page.svelte +++ b/src/routes/(console)/apply-credit/+page.svelte @@ -148,7 +148,7 @@ selectedOrg.$id, billingPlan, paymentMethodId, - null, + undefined, couponData.code ? couponData.code : null, collaborators ); diff --git a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte index a5293bdcfd..cc38a62528 100644 --- a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte @@ -253,7 +253,7 @@ data.organization.$id, selectedPlan, paymentMethodId, - null, + undefined, selectedCoupon?.code, newCollaborators, billingBudget,