# sequelize-cli-bunch

> The Sequelize CLI for Bunch.Capital with full TypeScript support

Latest version **5.2.15** (published 2022-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install sequelize-cli-bunch
pnpm add sequelize-cli-bunch
yarn add sequelize-cli-bunch
bun add sequelize-cli-bunch
```

Provides the command `sequelize`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.2.15 |
| Published | 2022-03-31 |
| First published | 2022-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16.0.0 <17 |
| Dependencies | 8 |
| Unpacked size | 248.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | coderocket |
| Keywords | sequelize, cli, typescript |

## Links

- npm: https://www.npmjs.com/package/sequelize-cli-bunch
- Repository: https://github.com/dominicrico/sequelize-cli-typescript
- Issues: https://github.com/dominicrico/sequelize-cli-typescript/issues
- npm.io page: https://npm.io/package/sequelize-cli-bunch

## Dependencies (8)

- [umzug](https://npm.io/package/umzug.md) ^3.1.0
- [yargs](https://npm.io/package/yargs.md) ^12.0.5
- [lodash](https://npm.io/package/lodash.md) ^4.17.5
- [resolve](https://npm.io/package/resolve.md) ^1.5.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.3
- [fs-extra](https://npm.io/package/fs-extra.md) ^7.0.1
- [cli-color](https://npm.io/package/cli-color.md) ^1.4.0
- [js-beautify](https://npm.io/package/js-beautify.md) ^1.8.8

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 5.2.15 (latest) — 2022-03-31
- 5.2.14 — 2022-03-30
- 5.2.13 — 2022-03-30
- 5.2.12 — 2022-03-30
- 5.2.11 — 2022-03-30
- 5.2.10 — 2022-03-29
- 5.2.9 — 2022-03-29
- 5.2.8 — 2022-03-29

## README

# Fork

This repository was forked to allow having a compiled folder for migrations and seeders.

By setting up local scripts you are able to compile `.ts` -> `.js` migrations within your Sequelize's configuration folders and run them as usual.

I have extended this functionallity to allow migrating typescript in runtime - meaning you are not required to compile `.ts` down to `.js` anymore. Run your migrations as usual.

Be sure that your Sequelize compiled path for migrations and seeders point to a correct location.

# sequelize/cli [![npm version](https://badge.fury.io/js/sequelize-cli.svg)](https://badge.fury.io/js/sequelize-cli) [![Build Status](https://travis-ci.org/sequelize/cli.svg?branch=master)](https://travis-ci.org/sequelize/cli) [![Greenkeeper badge](https://badges.greenkeeper.io/sequelize/cli.svg)](https://greenkeeper.io/)

The Sequelize Command Line Interface (CLI) _for TypeScript_

## Table of Contents
- [Installation](#installation)
- [Contributing](#contributing)
- [Documentation](#documentation)

## Installation

### Globally
Install CLI globally with

```bash
$ npm install -g sequelize-cli-typescript
```

Now you can run CLI using following command anywhere

```bash
$ sequelize
```

### Locally
Install CLI locally to your `node_modules` folder with

```bash
$ npm install --save sequelize-cli-typescript
```

You should be able to run CLI with

```bash
$ node_modules/.bin/sequelize
```

### Differences from Sequelize-Cli _(non-TypeScript)_

With sequelize-cli, the ```model:generate``` command would produce _JavaScript_ files in two folders: 
/models and /migrations, or other folders as specified in your .sequelizerc file.  The ```db:migrate``` 
command would then exe ute these _JavaScript_ files to update your database.

With sequelize-cli-typescript, ```model:generate``` produces _TypeScript_ files in the same two folders
(or again, as specified in your .sequelizerc file).  But before you can run ```db:migrate``` you must
compile your migrations.  (The step of compiling your migrations is left to you.)

You could compile your migrations along with your other code, or as part of a separate script.  After you have compiled
your migrations, then you can run ```db:migrate```.

It's usually the case that the compiled _JavaScript_ code will be put in a different directory than
the source _TypeScript_ code, so whereas sequelize-cli had one ```migrations-path``` setting, 
sequelize-cli-typescript has two: ```migrations-source-path``` and ```migrations-compiled-path```, which
default to /migrations and /migrations/compiled respectively.


### Usage
```
Sequelize CLI [Node: 6.11.2, CLI: 3.0.0, ORM: 4.8.0]

Commands:
  db:migrate                        Run pending migrations
  db:migrate:schema:timestamps:add  Update migration table to have timestamps
  db:migrate:status                 List the status of all migrations
  db:migrate:undo                   Reverts a migration
  db:migrate:undo:all               Revert all migrations ran
  db:seed                           Run specified seeder
  db:seed:undo                      Deletes data from the database
  db:seed:all                       Run every seeder
  db:seed:undo:all                  Deletes data from the database
  db:create                         Create database specified by configuration
  db:drop                           Drop database specified by configuration
  init                              Initializes project
  init:config                       Initializes configuration
  init:migrations                   Initializes migrations
  init:models                       Initializes models
  init:seeders                      Initializes seeders
  migration:generate                Generates a new migration file       [aliases: migration:create]
  model:generate                    Generates a model and its migration  [aliases: model:create]
  seed:generate                     Generates a new seed file            [aliases: seed:create]

Options:
  --version  Show version number                                         [boolean]
  --help     Show help                                                   [boolean]
```

## Contributing

Sequelize CLI is always looking for contributions. You can help us with fixing bugs, reporting bugs or improving documentation.

Please read [contributing documentation](CONTRIBUTING.md)

## Documentation

- [Migrations Documentation](http://docs.sequelizejs.com/manual/tutorial/migrations.html)
- [CLI Options](docs/README.md)
- [Frequently Asked Questions](docs/FAQ.md)

---
_Source: https://npm.io/package/sequelize-cli-bunch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
