-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
459 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"options": { "parser": "typescript" } | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
[@clickup/pg-mig](../README.md) / [Exports](../modules.md) / MigrateOptions | ||
|
||
# Interface: MigrateOptions | ||
|
||
Options for the migrate() function. | ||
|
||
## Properties | ||
|
||
### migDir | ||
|
||
• **migDir**: `string` | ||
|
||
The directory the migration versions are loaded from. | ||
|
||
#### Defined in | ||
|
||
[src/cli.ts:27](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L27) | ||
|
||
___ | ||
|
||
### hosts | ||
|
||
• **hosts**: `string`[] | ||
|
||
List of PostgreSQL master hostnames. The migration versions in `migDir` | ||
will be applied to all of them. | ||
|
||
#### Defined in | ||
|
||
[src/cli.ts:30](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L30) | ||
|
||
___ | ||
|
||
### port | ||
|
||
• **port**: `number` | ||
|
||
PostgreSQL port on each hosts. | ||
|
||
#### Defined in | ||
|
||
[src/cli.ts:32](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L32) | ||
|
||
___ | ||
|
||
### user | ||
|
||
• **user**: `string` | ||
|
||
PostgreSQL user on each host. | ||
|
||
#### Defined in | ||
|
||
[src/cli.ts:34](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L34) | ||
|
||
___ | ||
|
||
### pass | ||
|
||
• **pass**: `string` | ||
|
||
PostgreSQL password on each host. | ||
|
||
#### Defined in | ||
|
||
[src/cli.ts:36](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L36) | ||
|
||
___ | ||
|
||
### db | ||
|
||
• **db**: `string` | ||
|
||
PostgreSQL database name on each host. | ||
|
||
#### Defined in | ||
|
||
[src/cli.ts:38](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L38) | ||
|
||
___ | ||
|
||
### parallelism | ||
|
||
• `Optional` **parallelism**: `number` | ||
|
||
How many schemas to process in parallel (defaults to 10). | ||
|
||
#### Defined in | ||
|
||
[src/cli.ts:40](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L40) | ||
|
||
___ | ||
|
||
### dry | ||
|
||
• `Optional` **dry**: `boolean` | ||
|
||
If true, prints what it plans to do, but doesn't change anything. | ||
|
||
#### Defined in | ||
|
||
[src/cli.ts:42](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L42) | ||
|
||
___ | ||
|
||
### ci | ||
|
||
• `Optional` **ci**: `boolean` | ||
|
||
If true, then doesn't use log-update and doesn't replace lines; instead, | ||
prints logs to stdout line by line. | ||
|
||
#### Defined in | ||
|
||
[src/cli.ts:45](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L45) | ||
|
||
___ | ||
|
||
### action | ||
|
||
• **action**: \{ `type`: ``"make"`` ; `name`: `string` } \| \{ `type`: ``"list"`` } \| \{ `type`: ``"undo"`` ; `version`: `string` } \| \{ `type`: ``"apply"`` } | ||
|
||
What to do. | ||
|
||
#### Defined in | ||
|
||
[src/cli.ts:47](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L47) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
tsc --build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
rm -rf dist yarn.lock package-lock.json pnpm-lock.yaml *.log | ||
rm -rf dist dist.* yarn.lock package-lock.json pnpm-lock.yaml node_modules ./*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
npm run build | ||
npm run lint | ||
npm run clean | ||
npm install | ||
npm run test | ||
npm run lint | ||
npm publish --access=public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
tsc --watch --preserveWatchOutput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
bash internal/build.sh | ||
jest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"use strict"; | ||
module.exports = { | ||
roots: ["<rootDir>/src"], | ||
testMatch: ["**/*.test.ts"], | ||
clearMocks: true, | ||
restoreMocks: true, | ||
...(process.env.IN_JEST_PROJECT | ||
? {} | ||
: { forceExit: true, testTimeout: 30000 }), | ||
transform: { | ||
"\\.ts$": "ts-jest", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,2 @@ | ||
"use strict"; | ||
module.exports = { | ||
roots: ["<rootDir>/src"], | ||
testMatch: ["**/*.test.ts"], | ||
clearMocks: true, | ||
restoreMocks: true, | ||
...(process.env.IN_JEST_PROJECT | ||
? {} | ||
: { forceExit: true, testTimeout: 30000, forceExit: true }), | ||
transform: { | ||
"\\.ts$": "ts-jest", | ||
}, | ||
}; | ||
module.exports = { ...require("./jest.config.base") }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.