Skip to content

[codex] Upgrade CLI console dependency#1470

Merged
ChiragAgg5k merged 3 commits intomasterfrom
codex/upgrade-cli-console-11
Apr 23, 2026
Merged

[codex] Upgrade CLI console dependency#1470
ChiragAgg5k merged 3 commits intomasterfrom
codex/upgrade-cli-console-11

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

Summary

  • Upgrade the CLI SDK @appwrite.io/console dependency to 11.0.0.
  • Regenerate the CLI npm and Bun lockfile templates with ./scripts/update-lockfiles.sh cli.

Validation

  • ./scripts/update-lockfiles.sh cli
  • php example.php cli
  • composer lint-twig
  • git diff --check
  • Parsed templates/cli/package-lock.json.twig as JSON to confirm the restored Twig placeholders stayed valid.

@ChiragAgg5k ChiragAgg5k marked this pull request as ready for review April 23, 2026 08:44
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

This PR upgrades the CLI's @appwrite.io/console dependency from 9.1.0 to 11.0.0 and regenerates the npm/Bun lock file templates. The push.ts command correctly migrates most projectsService calls to the new projectService API (removing the explicit projectId argument and adopting the new method names), but two calls — updateMockNumbers and updateAuthStatus — were not updated and still target the old service with the deprecated signature.

Confidence Score: 4/5

Not safe to merge until updateMockNumbers and updateAuthStatus are migrated to the 11.0.0 projectService API.

Two P1 issues remain in push.ts where auth-related calls still use the old projectsService with the deprecated projectId parameter while the rest of the block was correctly migrated. These will cause runtime errors for users with mockNumbers or auth method settings configured.

templates/cli/lib/commands/push.ts — lines 1053–1056 and 1062–1066

Important Files Changed

Filename Overview
templates/cli/lib/commands/push.ts Migrated most auth/settings methods from projectsService (9.x) to projectService (11.0.0), but updateMockNumbers and updateAuthStatus were left behind on the old service with the deprecated projectId signature.
templates/cli/package.json Version bump for @appwrite.io/console from ~9.1.0 to 11.0.0 — straightforward change.
templates/cli/package.json.twig Twig template version bump matching package.json — correct.
templates/cli/package-lock.json.twig Lock file template regenerated with 11.0.0 resolved URL and integrity hash — looks correct.
templates/cli/bun.lock.twig Bun lock file template regenerated with 11.0.0 hash — looks correct.

Comments Outside Diff (2)

  1. templates/cli/lib/commands/push.ts, line 1053-1056 (link)

    P1 updateMockNumbers not migrated to new service

    This call still uses projectsService (the console-scoped service with an explicit projectId) while every other auth.security method in this block was moved to projectService with the new 11.0.0 naming convention (e.g. updateSessionAlertPolicy just above). If updateMockNumbers was also renamed/moved in 11.0.0, this call will throw at runtime whenever settings.auth.security.mockNumbers is set.

    Following the same migration pattern, this should likely become:

    await projectService.updateMockNumbersPolicy({
      numbers: settings.auth.security.mockNumbers,
    });

    Please verify the exact method name against the 11.0.0 SDK types.

  2. templates/cli/lib/commands/push.ts, line 1062-1066 (link)

    P1 updateAuthStatus not migrated to new service

    This call still targets projectsService with the old signature {projectId, method, status}, but all other project-scoped calls in this function were moved to projectService (which uses the project client directly). If updateAuthStatus was renamed in 11.0.0 (e.g. to updateAuthMethod or updateAuthMethodStatus on projectService), every iteration over settings.auth.methods will fail at runtime.

    Verify the equivalent 11.0.0 method on projectService and update accordingly, e.g.:

    await projectService.updateAuthMethodStatus({
      method: method as AuthMethod,
      status: status,
    });

Reviews (4): Last reviewed commit: "Use direct console 11 project settings m..." | Re-trigger Greptile

@ChiragAgg5k ChiragAgg5k force-pushed the codex/upgrade-cli-console-11 branch from 2c9f138 to 66ac208 Compare April 23, 2026 08:49
@ChiragAgg5k
Copy link
Copy Markdown
Member Author

Verified the two remaining Greptile flags against the current @appwrite.io/console@11.0.0 type surface used by this branch.

  • updateMockNumbers exists on Projects with the object signature { projectId, numbers } in types/services/projects.d.ts.
  • updateAuthStatus also exists on Projects with the object signature { projectId, method, status } in types/services/projects.d.ts.
  • Neither updateMockNumbersPolicy nor updateAuthMethodStatus exists on Project in types/services/project.d.ts.

So the current push.ts usage is intentional: project-level policy methods moved to Project, while updateMockNumbers and updateAuthStatus remain on Projects.

Re-triggering Greptile to refresh its summary against commit 95edd59ae.

@ChiragAgg5k ChiragAgg5k merged commit f786ecd into master Apr 23, 2026
57 checks passed
@ChiragAgg5k ChiragAgg5k deleted the codex/upgrade-cli-console-11 branch April 23, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants