Skip to content

Commit

Permalink
feat: Add binary script SO-162 (#271)
Browse files Browse the repository at this point in the history
* chore: update deps

* chore: update typescript

* feat: create problemJson constructor

* feat: create serializer for problem/json

* feat: return problem jsons for route errors

* refactor: move problemjson to http package

* test: check with error title

* refactor: use typescript inferring and fluent reply

* refactor: prefer unknown

* feat: replace 400 error for missing invalid response with problem/json

* feat: replace 400 error for missing invalid response with problem/json

* refactor: from template static function

* test: refactor test to use template functin

* refactor: correctly type problem+json

* refactor: no any

* refactor: avoid casts

* refactor: use tsling-stoplight rules

* chore: graphite update

* chore: .x.x

* refactor: do not be too specific on what's wrong

* fix: correct status code is 422

* refactor: use template ProblemJson

Co-Authored-By: XVincentX <[email protected]>

* refactor: UNPROCESSABLE_ENTITY

* refactor: use https link errors

* refactor: remove custom serialiser

* chore: caret

* style: format

* refactor: detail is always set

* refactor: cli does not need sourcemaps

* feat: try to create binary

* refactor: change job name

* refactor: cli on develop merge

* feat: let pkg figure out the targets
  • Loading branch information
XVincentX committed May 8, 2019
1 parent a5a3a67 commit 3b6b508
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ jobs:
name: Build all code to JavaScript
command: yarn build
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run:
name: Create CLI binaries
command: npx pkg --out-path ./cli-binaries ./packages/cli/
- store_artifacts:
path: ./cli-binaries
- run:
name: Publish
command: yarn lerna publish from-package --yes --dist-tag alpha
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"test.update": "yarn test.fast --updateSnapshot",
"release": "lerna version prerelease --conventional-commit"
},
"resolutions": {
"jsonpath": "https://github.com/stoplightio/jsonpath#f1c0e9e634da2d45671b7639fa0a99afc807da17"
},
"devDependencies": {
"@stoplight/types": "^4.0.0",
"@types/chance": "^1.0.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"target": "es2017"
"target": "es2017",
"sourceMap": false,
},
"include": ["src"],
"references": [
Expand Down
19 changes: 1 addition & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4679,17 +4679,7 @@ jsonparse@^1.2.0:
resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=

jsonpath@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/jsonpath/-/jsonpath-1.0.1.tgz#fde977c5a64614aa8dde61a84b9b076d2b9c38ce"
integrity sha512-HY5kSg82LHIs0r0h9gYBwpNc1w1qGY0qJ7al01W1bJltsN2lp+mjjA/a79gXWuvD6Xf8oPkD2d5uKMZQXTGzqA==
dependencies:
esprima "1.2.2"
jison "0.4.13"
static-eval "2.0.2"
underscore "1.7.0"

"jsonpath@https://github.com/stoplightio/jsonpath#f1c0e9e634da2d45671b7639fa0a99afc807da17":
jsonpath@^1.0.0, "jsonpath@https://github.com/stoplightio/jsonpath#f1c0e9e634da2d45671b7639fa0a99afc807da17":
version "1.0.0"
resolved "https://github.com/stoplightio/jsonpath#f1c0e9e634da2d45671b7639fa0a99afc807da17"
dependencies:
Expand Down Expand Up @@ -6926,13 +6916,6 @@ [email protected]:
dependencies:
escodegen "^1.8.1"

[email protected]:
version "2.0.2"
resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-2.0.2.tgz#2d1759306b1befa688938454c546b7871f806a42"
integrity sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==
dependencies:
escodegen "^1.8.1"

static-extend@^0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
Expand Down

0 comments on commit 3b6b508

Please sign in to comment.