From efa67d87aa4f8d9d57883ee85b59f5aaf211eb12 Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 26 Jul 2018 14:52:23 -0700 Subject: Rename to sra-api --- packages/sra-api/package.json | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 packages/sra-api/package.json (limited to 'packages/sra-api/package.json') diff --git a/packages/sra-api/package.json b/packages/sra-api/package.json new file mode 100644 index 000000000..8cbe911f3 --- /dev/null +++ b/packages/sra-api/package.json @@ -0,0 +1,51 @@ +{ + "name": "@0xproject/sra-api", + "version": "0.0.1", + "engines": { + "node": ">=6.12" + }, + "description": "Standard Relayer API Swagger Spec", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "scripts": { + "lint": "tslint --project .", + "test": "yarn run_mocha", + "rebuild_and_test": "run-s clean build test", + "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", + "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", + "test:circleci": "yarn test:coverage", + "run_mocha": + "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", + "clean": "shx rm -rf lib test_temp scripts", + "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts" + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x-monorepo.git" + }, + "author": "Francesco Agosti", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x-monorepo/issues" + }, + "homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-api/README.md", + "dependencies": {}, + "devDependencies": { + "@0xproject/tslint-config": "^1.0.4", + "@loopback/openapi-v3-types": "^0.8.2", + "@types/mocha": "^2.2.42", + "chai": "^4.0.1", + "copyfiles": "^1.2.0", + "dirty-chai": "^2.0.1", + "make-promises-safe": "^1.1.0", + "mocha": "^4.0.1", + "nyc": "^11.0.1", + "openapi-schema-validation": "^0.4.1", + "shx": "^0.2.2", + "tslint": "5.11.0", + "typescript": "2.7.1" + }, + "publishConfig": { + "access": "public" + } +} -- cgit v1.2.3 From c1fcbe3f04714c5ad1c560d88d03fe6e3e251864 Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 26 Jul 2018 16:49:43 -0700 Subject: Create API development environment and json distribution --- packages/sra-api/package.json | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'packages/sra-api/package.json') diff --git a/packages/sra-api/package.json b/packages/sra-api/package.json index 8cbe911f3..61fa392fb 100644 --- a/packages/sra-api/package.json +++ b/packages/sra-api/package.json @@ -8,16 +8,20 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { + "serve": "redoc-cli serve lib/api.json --watch", + "develop": "run-p build-json:watch serve", "lint": "tslint --project .", "test": "yarn run_mocha", + "redoc-cli": "redoc-cli", "rebuild_and_test": "run-s clean build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", - "run_mocha": - "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", - "clean": "shx rm -rf lib test_temp scripts", - "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts" + "run_mocha": "mocha lib/test/**/*_test.js --exit", + "clean": "shx rm -rf lib", + "build": "tsc && yarn build-json", + "build-json": "ts-node scripts/buildJson.ts", + "build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' " }, "repository": { "type": "git", @@ -34,14 +38,17 @@ "@0xproject/tslint-config": "^1.0.4", "@loopback/openapi-v3-types": "^0.8.2", "@types/mocha": "^2.2.42", + "@types/node": "^10.5.3", "chai": "^4.0.1", - "copyfiles": "^1.2.0", + "chokidar-cli": "^1.2.0", "dirty-chai": "^2.0.1", - "make-promises-safe": "^1.1.0", "mocha": "^4.0.1", + "npm-run-all": "^4.1.3", "nyc": "^11.0.1", "openapi-schema-validation": "^0.4.1", + "redoc-cli": "^0.6.1", "shx": "^0.2.2", + "ts-node": "^7.0.0", "tslint": "5.11.0", "typescript": "2.7.1" }, -- cgit v1.2.3 From 4aff9515d807feb5fc30431d109d503a6c52f0cd Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 31 Jul 2018 16:37:51 -0700 Subject: Get schema tests running (not crashiing) --- packages/sra-api/package.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'packages/sra-api/package.json') diff --git a/packages/sra-api/package.json b/packages/sra-api/package.json index 61fa392fb..9a0ab4971 100644 --- a/packages/sra-api/package.json +++ b/packages/sra-api/package.json @@ -4,15 +4,14 @@ "engines": { "node": ">=6.12" }, - "description": "Standard Relayer API Swagger Spec", + "description": "Standard Relayer API Open API Spec", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { "serve": "redoc-cli serve lib/api.json --watch", - "develop": "run-p build-json:watch serve", + "watch_without_deps": "run-p build-json:watch serve", "lint": "tslint --project .", "test": "yarn run_mocha", - "redoc-cli": "redoc-cli", "rebuild_and_test": "run-s clean build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", @@ -33,7 +32,9 @@ "url": "https://github.com/0xProject/0x-monorepo/issues" }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-api/README.md", - "dependencies": {}, + "dependencies": { + "@0xproject/json-schemas": "1.0.1-rc.3" + }, "devDependencies": { "@0xproject/tslint-config": "^1.0.4", "@loopback/openapi-v3-types": "^0.8.2", -- cgit v1.2.3 From 3b542bf356f14e7bfd5bbd740d2df55ff64e1309 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 7 Aug 2018 13:36:59 -0700 Subject: Add static site build --- packages/sra-api/package.json | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/sra-api/package.json') diff --git a/packages/sra-api/package.json b/packages/sra-api/package.json index 9a0ab4971..b7bcd588b 100644 --- a/packages/sra-api/package.json +++ b/packages/sra-api/package.json @@ -19,6 +19,7 @@ "run_mocha": "mocha lib/test/**/*_test.js --exit", "clean": "shx rm -rf lib", "build": "tsc && yarn build-json", + "build-site": "yarn build-json && redoc-cli bundle lib/api.json --output public/index.html", "build-json": "ts-node scripts/buildJson.ts", "build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' " }, -- cgit v1.2.3 From 57a44291233548da9785aec3cde92171342c9eb3 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 7 Aug 2018 13:50:56 -0700 Subject: Add discharge config and deploy --- packages/sra-api/package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/sra-api/package.json') diff --git a/packages/sra-api/package.json b/packages/sra-api/package.json index b7bcd588b..4e0fb1637 100644 --- a/packages/sra-api/package.json +++ b/packages/sra-api/package.json @@ -19,9 +19,10 @@ "run_mocha": "mocha lib/test/**/*_test.js --exit", "clean": "shx rm -rf lib", "build": "tsc && yarn build-json", - "build-site": "yarn build-json && redoc-cli bundle lib/api.json --output public/index.html", + "build-site": "yarn build && redoc-cli bundle lib/api.json --output public/index.html", "build-json": "ts-node scripts/buildJson.ts", - "build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' " + "build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' ", + "deploy-site": "discharge deploy" }, "repository": { "type": "git", @@ -44,6 +45,7 @@ "chai": "^4.0.1", "chokidar-cli": "^1.2.0", "dirty-chai": "^2.0.1", + "discharge": "^0.7.1", "mocha": "^4.0.1", "npm-run-all": "^4.1.3", "nyc": "^11.0.1", -- cgit v1.2.3 From 9aacceb0e4549a7a72cae7cbf74ea819db184d80 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 8 Aug 2018 14:00:50 -0700 Subject: Remove tests directory, use swagger api, make json api compliant --- packages/sra-api/package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packages/sra-api/package.json') diff --git a/packages/sra-api/package.json b/packages/sra-api/package.json index 4e0fb1637..a9bc934fe 100644 --- a/packages/sra-api/package.json +++ b/packages/sra-api/package.json @@ -11,12 +11,11 @@ "serve": "redoc-cli serve lib/api.json --watch", "watch_without_deps": "run-p build-json:watch serve", "lint": "tslint --project .", - "test": "yarn run_mocha", + "test": "swagger-cli validate lib/api.json", "rebuild_and_test": "run-s clean build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", - "run_mocha": "mocha lib/test/**/*_test.js --exit", "clean": "shx rm -rf lib", "build": "tsc && yarn build-json", "build-site": "yarn build && redoc-cli bundle lib/api.json --output public/index.html", @@ -49,9 +48,9 @@ "mocha": "^4.0.1", "npm-run-all": "^4.1.3", "nyc": "^11.0.1", - "openapi-schema-validation": "^0.4.1", "redoc-cli": "^0.6.1", "shx": "^0.2.2", + "swagger-cli": "^2.1.1", "ts-node": "^7.0.0", "tslint": "5.11.0", "typescript": "2.7.1" -- cgit v1.2.3 From 0113ecee96cd7ac3a6fc439df66ba826e7313768 Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 9 Aug 2018 10:13:37 -0700 Subject: Change scripts folder to build_scripts --- packages/sra-api/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/sra-api/package.json') diff --git a/packages/sra-api/package.json b/packages/sra-api/package.json index a9bc934fe..5fed56303 100644 --- a/packages/sra-api/package.json +++ b/packages/sra-api/package.json @@ -19,7 +19,7 @@ "clean": "shx rm -rf lib", "build": "tsc && yarn build-json", "build-site": "yarn build && redoc-cli bundle lib/api.json --output public/index.html", - "build-json": "ts-node scripts/buildJson.ts", + "build-json": "ts-node build_scripts/buildJson.ts", "build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' ", "deploy-site": "discharge deploy" }, -- cgit v1.2.3