deepkit / deepkit-framework

A new full-featured and high-performance TypeScript framework
https://deepkit.io/
MIT License
3.24k stars 123 forks source link

Bug: missing shebang in bin/deepkit-sql.js @deepkit/sql #598

Open rktyt opened 4 months ago

rktyt commented 4 months ago

I'm trying to use @deepkit/orm standalone.

  1. https://github.com/deepkit/deepkit-framework/blob/v1.0.1-alpha.153/packages/sql/bin/deepkit-sql.js There's no shebang. Therefore, the command cannot be used with npx deepkit-sql.

    $ npx deepkit-sql --help
    /tmp/my-deepkit-app/node_modules/.bin/deepkit-sql: 1: Syntax error: word unexpected (expecting ")")
    
    $ node node_modules/.bin/deepkit-sql --help
    USAGE
      $ node deepkit-sql [COMMAND]
    
    COMMANDS
    migration
      migration:create   Generates a new migration file based on a database diff.
      migration:down     Executes down migration, reverting old migration files.
      migration:pending  Shows pending migration files.
      migration:up       Executes pending migration files. Use migration:pending to see which are pending.
    
    For more information on a specific command or topic, type '[command/topic] --help'
  2. It seems that the arguments are not being handled correctly. I tried what the documentation says, but it doesn't work. https://deepkit.io/documentation/orm/migrations
    node ./node_modules/.bin/deepkit-sql migration:create --path database.ts --migrationDir src/migrations
    No databases detected. Use --path path/to/database.ts
    done