Skip to content

fix(cli): package type for esm imports, missing realtime#574

Merged
waleedlatif1 merged 2 commits intostagingfrom
fix/cli
Jun 28, 2025
Merged

fix(cli): package type for esm imports, missing realtime#574
waleedlatif1 merged 2 commits intostagingfrom
fix/cli

Conversation

@adiologydev
Copy link
Contributor

Description

Prepare CLI for publishing. We can change migrate back to push once its fixed. Currently seeing the following error:

$ bunx drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '/app/apps/sim/drizzle.config.ts'
Using 'postgres' driver for database querying
[⣷] Pulling schema from database...
[✓] Pulling schema from database...
790 |     }
791 |   )
792 |   Error.captureStackTrace(error, notSupported)
793 |   return error
794 | }
          ^
PostgresError: type "vector" does not exist
 severity_local: "ERROR",
   severity: "ERROR",
   position: "297",
       file: "parse_type.c",
    routine: "typenameType",
       code: "42704"

      at ErrorResponse (/app/node_modules/postgres/src/errors.js:794:5)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Security enhancement
  • Performance improvement
  • Code refactoring (no functional changes)

How Has This Been Tested?

Ran it locally.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally and in CI (bun run test)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have updated version numbers as needed (if needed)
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Security Considerations:

  • My changes do not introduce any new security vulnerabilities
  • I have considered the security implications of my changes

Additional Information:

Any additional information, configuration or data that might be necessary to reproduce the issue or use the feature.

@vercel
Copy link

vercel bot commented Jun 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Jun 28, 2025 2:44pm
sim ⬜️ Skipped (Inspect) Jun 28, 2025 2:44pm

@adiologydev adiologydev requested a review from waleedlatif1 June 28, 2025 14:24
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Addresses CLI package publishing readiness by fixing module imports and realtime container handling.

  • Added type: "module" to packages/cli/package.json to enable proper ESM imports and module resolution
  • Changed Drizzle database command from push to migrate to temporarily work around PostgreSQL vector type error
  • Added missing cleanup and shutdown handling for realtime container in packages/cli/src/index.ts
  • Updated package version to 0.1.18 with required CLI dependencies (chalk, commander, inquirer, listr2)
  • Improved error handling for PostgreSQL 'vector' type issues in database migrations

2 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@delve-auditor
Copy link

delve-auditor bot commented Jun 28, 2025

No security or compliance issues detected. Reviewed everything up to a0af3ac.

Security Overview
  • 🔎 Scanned files: 2 changed file(s)
Detected Code Changes
Change Type Relevant files
Enhancement ► package.json
    Version bump to 0.1.19
    Added type:module configuration
► index.ts
    Updated migrations command from db:push to db:migrate
    Added simstudio-realtime container to stop command
    Added realtime container cleanup

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@vercel vercel bot temporarily deployed to Preview – docs June 28, 2025 14:44 Inactive
@vercel vercel bot temporarily deployed to Preview – sim June 28, 2025 14:44 Inactive
@waleedlatif1 waleedlatif1 merged commit e93a5ce into staging Jun 28, 2025
4 checks passed
waleedlatif1 pushed a commit that referenced this pull request Jun 28, 2025
* fix: package type for esm imports, missing realtime calls and use of migrate

* chore: bump cli
waleedlatif1 added a commit that referenced this pull request Jun 28, 2025
* feat: agent model dropdown combobox

* fix(cli): package type for esm imports, missing realtime (#574)

* fix: package type for esm imports, missing realtime calls and use of migrate

* chore: bump cli

* fix sourceBlock null check

* fix(kb): fix kb navigation URLs

* fix(csp): update CSP to allow for google drive picker

* feat(dropdown): added optional icon to agent model dropdown

---------

Co-authored-by: Aditya Tripathi <aditya@climactic.co>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Waleed Latif <walif6@gmail.com>
@adiologydev adiologydev deleted the fix/cli branch June 28, 2025 18:13
icecrasher321 added a commit that referenced this pull request Jun 28, 2025
* feat(agent): agent model dropdown combobox (#572)

* feat: agent model dropdown combobox

* fix(cli): package type for esm imports, missing realtime (#574)

* fix: package type for esm imports, missing realtime calls and use of migrate

* chore: bump cli

* fix sourceBlock null check

* fix(kb): fix kb navigation URLs

* fix(csp): update CSP to allow for google drive picker

* feat(dropdown): added optional icon to agent model dropdown

---------

Co-authored-by: Aditya Tripathi <aditya@climactic.co>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Waleed Latif <walif6@gmail.com>

* fix concurrent req check (#576)

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>

---------

Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Aditya Tripathi <aditya@climactic.co>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…#574)

* fix: package type for esm imports, missing realtime calls and use of migrate

* chore: bump cli
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
* feat(agent): agent model dropdown combobox (simstudioai#572)

* feat: agent model dropdown combobox

* fix(cli): package type for esm imports, missing realtime (simstudioai#574)

* fix: package type for esm imports, missing realtime calls and use of migrate

* chore: bump cli

* fix sourceBlock null check

* fix(kb): fix kb navigation URLs

* fix(csp): update CSP to allow for google drive picker

* feat(dropdown): added optional icon to agent model dropdown

---------

Co-authored-by: Aditya Tripathi <aditya@climactic.co>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Waleed Latif <walif6@gmail.com>

* fix concurrent req check (simstudioai#576)

Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>

---------

Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Aditya Tripathi <aditya@climactic.co>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-MacBook-Air.local>
Co-authored-by: Waleed Latif <walif6@gmail.com>
Co-authored-by: Vikhyath Mondreti <vikhyathmondreti@Vikhyaths-Air.attlocal.net>
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