generated from qiwi/blank-ts-monorepo
-
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.
feat: introduce cli-api, cli-pipe, some refactoring (#8)
- Loading branch information
1 parent
9983bf3
commit 13a90a2
Showing
44 changed files
with
551 additions
and
58 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,7 @@ | ||
module.exports = { | ||
extends: [ | ||
'eslint-config-qiwi', | ||
'prettier', | ||
'prettier/@typescript-eslint', | ||
], | ||
}; |
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,17 @@ | ||
{ | ||
"branch": "master", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"successComment": false, | ||
"failComment": false | ||
} | ||
], | ||
"@semantic-release/git" | ||
] | ||
} |
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,14 @@ | ||
# @qiwi/npm-batch-cli-api | ||
API npm-batch CLI utilities | ||
## Installation | ||
```shell script | ||
npm install @qiwi/npm-batch-cli-api | ||
yarn add @qiwi/npm-batch-cli-api | ||
``` | ||
## Usage | ||
```typescript | ||
import { readConfigAndRun } from '@qiwi/npm-batch-cli-api' | ||
|
||
readConfigAndRun({ config: 'config.json' }) | ||
.then(() => console.log('Done.')) | ||
``` |
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,34 @@ | ||
{ | ||
"testEnvironment": "node", | ||
"transform": { | ||
"^.+\\.tsx?$": "ts-jest", | ||
"^.+\\.jsx?$": "@swissquote/crafty-preset-jest/src/esm-transformer" | ||
}, | ||
"collectCoverage": true, | ||
"coveragePathIgnorePatterns": [ | ||
], | ||
"collectCoverageFrom": [ | ||
"<rootDir>/src/main/**/*.(j|t)s" | ||
], | ||
"testMatch": [ | ||
"<rootDir>/src/test/js/*.js", | ||
"<rootDir>/src/test/ts/**/*.ts" | ||
], | ||
"testPathIgnorePatterns": [ | ||
"/node_modules/" | ||
], | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node" | ||
], | ||
"preset": "ts-jest", | ||
"globals": { | ||
"ts-jest": { | ||
"tsconfig": "<rootDir>/tsconfig.test.json" | ||
} | ||
} | ||
} |
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,65 @@ | ||
{ | ||
"name": "@qiwi/npm-batch-cli-api", | ||
"version": "0.0.0", | ||
"private": false, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"description": "API for npm-batch CLI utilities", | ||
"keywords": [ | ||
"npm", | ||
"batch", | ||
"deprecate", | ||
"cli" | ||
], | ||
"main": "target/es5/index.js", | ||
"source": "target/ts/index.ts", | ||
"types": "target/es5/index.d.ts", | ||
"typescript": { | ||
"definition": "target/es5/index.d.ts" | ||
}, | ||
"files": [ | ||
"README.md", | ||
"CHANGELOG.md", | ||
"target", | ||
"typings", | ||
"flow-typed" | ||
], | ||
"scripts": { | ||
"test": "yarn lint && yarn jest", | ||
"jest": "jest -w=1 --config=jest.config.json", | ||
"lint": "eslint src/**/*.ts", | ||
"lint:fix": "yarn lint --fix", | ||
"clean": "rimraf target typings flow-typed buildcache coverage docs", | ||
"build": "yarn build:es5 && yarn build:es6 && yarn build:ts && yarn build:libdef && yarn docs", | ||
"build:es5": "mkdirp target/es5 && tsc -p tsconfig.es5.json", | ||
"build:es6": "mkdirp target/es6 && tsc -p tsconfig.es6.json", | ||
"build:ts": "cpy src/main/ts/ target/ts/", | ||
"build:libdef": "libdefkit --tsconfig=tsconfig.es5.json --tsconfig=tsconfig.es6.json", | ||
"docs": "typedoc --readme README.md --tsconfig tsconfig.es5.json src/main", | ||
"uglify": "for f in $(find target -name '*.js'); do short=${f%.js}; terser -c -m -o $short.js -- $f; done", | ||
"postupdate": "yarn && yarn build && yarn test", | ||
"format": "prettier --write 'src/**/*.ts'" | ||
}, | ||
"dependencies": { | ||
"@qiwi/deep-proxy": "^1.8.1", | ||
"@qiwi/npm-batch-client": "1.1.0", | ||
"@qiwi/substrate": "^1.19.5", | ||
"push-it-to-the-limit": "^1.17.1", | ||
"tslib": "^2.0.3" | ||
}, | ||
"devDependencies": { | ||
"@qiwi/npm-batch-client-infra": "1.0.0", | ||
"nock": "^13.0.5" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/qiwi/npm-batch-action.git" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/qiwi/npm-batch-action/issues" | ||
}, | ||
"homepage": "https://github.com/qiwi/npm-batch-action/#readme", | ||
"prettier": "prettier-config-qiwi" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
export * from './interfaces' | ||
export * from './runner' | ||
export * from './utils' | ||
export * from './executors' |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es5", | ||
"outDir": "target/es5" | ||
}, | ||
"include": [ | ||
"src/main/**/*" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
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 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es6", | ||
"outDir": "target/es6" | ||
}, | ||
"include": [ | ||
"src/main/**/*" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
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,16 @@ | ||
{ | ||
"extends": "../../packages/infra/tsconfig.compiler.json", | ||
"compilerOptions": { | ||
"rootDir": "./src/main/ts/", | ||
"baseUrl": "./src/main/ts/", | ||
"target": "es5", | ||
"outDir": "target/es5", | ||
"tsBuildInfoFile": "./buildcache/.tsbuildinfo" | ||
}, | ||
"include": [ | ||
"src/main/**/*" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
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,9 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": [ | ||
"src/**/*" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
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,15 @@ | ||
{ | ||
"name": "@qiwi/npm-batch-cli-api", | ||
"mode": "file", | ||
"out": "./docs", | ||
"target": "ES6", | ||
"exclude": ["test", "node_modules", "paralleljs"], | ||
"externalPattern": "**/node_modules/**", | ||
"excludePrivate": true, | ||
"excludeNotExported": true, | ||
"moduleResolution": "node", | ||
"module": "commonjs", | ||
"hideGenerator": true, | ||
"readme": "none", | ||
"ignoreCompilerErrors": true | ||
} |
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,7 @@ | ||
module.exports = { | ||
extends: [ | ||
'eslint-config-qiwi', | ||
'prettier', | ||
'prettier/@typescript-eslint', | ||
], | ||
}; |
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,17 @@ | ||
{ | ||
"branch": "master", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"successComment": false, | ||
"failComment": false | ||
} | ||
], | ||
"@semantic-release/git" | ||
] | ||
} |
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,7 @@ | ||
# @qiwi/npm-batch-cli-pipe | ||
The same as `@qiwi/npm-batch-cli`, but with configuring via a pipeline. | ||
## Usage | ||
```shell script | ||
cat config.json | npx @qiwi/npm-batch-cli-pipe | ||
``` | ||
See more at [@qiwi/npm-batch-cli](https://github.com/qiwi/npm-batch-action/tree/master/packages/cli) docs. |
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,34 @@ | ||
{ | ||
"testEnvironment": "node", | ||
"transform": { | ||
"^.+\\.tsx?$": "ts-jest", | ||
"^.+\\.jsx?$": "@swissquote/crafty-preset-jest/src/esm-transformer" | ||
}, | ||
"collectCoverage": true, | ||
"coveragePathIgnorePatterns": [ | ||
], | ||
"collectCoverageFrom": [ | ||
"<rootDir>/src/main/**/*.(j|t)s" | ||
], | ||
"testMatch": [ | ||
"<rootDir>/src/test/js/*.js", | ||
"<rootDir>/src/test/ts/**/*.ts" | ||
], | ||
"testPathIgnorePatterns": [ | ||
"/node_modules/" | ||
], | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node" | ||
], | ||
"preset": "ts-jest", | ||
"globals": { | ||
"ts-jest": { | ||
"tsconfig": "<rootDir>/tsconfig.test.json" | ||
} | ||
} | ||
} |
Oops, something went wrong.