Skip to content

Commit cae7a5d

Browse files
committed
init
1 parent 5074761 commit cae7a5d

File tree

8 files changed

+228
-56
lines changed

8 files changed

+228
-56
lines changed

.circleci/config.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
version: 2
33
jobs:
4-
node-latest: &test
4+
update: &update
55
docker:
66
- image: node:latest
77
working_directory: ~/cli
88
steps:
9+
- add_ssh_keys
910
- checkout
1011
- restore_cache: &restore_cache
1112
keys:
@@ -15,17 +16,16 @@ jobs:
1516
name: Install dependencies
1617
command: .circleci/greenkeeper
1718
- run:
18-
name: Testing
19-
command: yarn test
20-
- run:
21-
name: Submitting code coverage to codecov
19+
name: Updating schema
2220
command: |
23-
./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
24-
curl -s https://codecov.io/bash | bash
25-
node-8:
26-
<<: *test
27-
docker:
28-
- image: node:8
21+
git config --global push.default simple
22+
git config --global user.name "$GIT_AUTHOR_NAME"
23+
git config --global user.email "$GIT_AUTHOR_EMAIL"
24+
curl https://api.heroku.com/schema -H "Accept: application/vnd.heroku+json; version=3" > schema.json
25+
cat schema.json | json2ts > lib/index.d.ts
26+
git add schema.json lib/index.d.ts
27+
git commit -m "fix: updated schema"
28+
git push origin master
2929
release:
3030
<<: *test
3131
steps:
@@ -53,12 +53,18 @@ workflows:
5353
version: 2
5454
"@heroku-cli/typescript-api-schema":
5555
jobs:
56-
- node-latest
57-
- node-8
56+
- update
5857
- release:
5958
context: org-global
6059
filters:
6160
branches: {only: master}
62-
requires:
63-
- node-latest
64-
- node-8
61+
nightly:
62+
triggers:
63+
- schedule:
64+
cron: "0 11 * * *"
65+
filters:
66+
branches:
67+
only:
68+
- master
69+
jobs:
70+
- update

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"author": "Jeff Dickey @jdxcode",
55
"bugs": "https://github.com/heroku/typescript-api-schema/issues",
66
"dependencies": {
7+
"json-schema-to-typescript": "^5.5.0",
78
"tslib": "^1"
89
},
910
"devDependencies": {
@@ -29,12 +30,6 @@
2930
"oclif"
3031
],
3132
"license": "MIT",
32-
"main": "lib/index.js",
3333
"repository": "heroku/typescript-api-schema",
34-
"scripts": {
35-
"posttest": "tsc -p test --noEmit && tslint -p test -t stylish",
36-
"prepack": "rm -rf lib && tsc",
37-
"test": "nyc mocha --forbid-only \"test/**/*.test.ts\""
38-
},
3934
"types": "lib/index.d.ts"
4035
}

src/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/helpers/init.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

test/index.test.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/mocha.opts

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/tsconfig.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)