Skip to content

Commit

Permalink
Merge pull request #157 from open-rpc/fix/maint
Browse files Browse the repository at this point in the history
WIP Fix/maint
  • Loading branch information
BelfordZ authored Apr 17, 2019
2 parents 0a7b886 + c096bd8 commit d08f643
Show file tree
Hide file tree
Showing 12 changed files with 4,531 additions and 1,543 deletions.
2,309 changes: 1,465 additions & 844 deletions package-lock.json

Large diffs are not rendered by default.

19 changes: 7 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,19 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@open-rpc/meta-schema": "^1.2.2",
"@open-rpc/schema-utils-js": "1.5.1",
"@types/lodash": "^4.14.123",
"@open-rpc/schema-utils-js": "^1.8.0",
"commander": "^2.19.0",
"fs-extra": "^7.0.1",
"is-url": "^1.2.4",
"jayson": "^2.1.2",
"jest": "^24.5.0",
"json-schema-to-typescript": "^6.1.3",
"lodash": "^4.17.11",
"quicktype": "13.0.10",
"quicktype-core": "^6.0.26",
"typescript": "^3.3.3333"
"lodash": "^4.17.11"
},
"devDependencies": {
"@open-rpc/examples": "^1.2.5",
"@types/fs-extra": "^5.0.5",
"@types/lodash": "^4.14.123",
"@types/jest": "^24.0.11",
"@open-rpc/meta-schema": "^1.3.1",
"@open-rpc/examples": "^1.3.0",
"jest": "^24.5.0",
"typescript": "^3.3.3333",
"ts-jest": "^24.0.0"
}
}
19 changes: 0 additions & 19 deletions src/generators/generator-interface.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/generators/index.ts

This file was deleted.

179 changes: 0 additions & 179 deletions src/generators/rust.ts

This file was deleted.

105 changes: 0 additions & 105 deletions src/generators/typescript.ts

This file was deleted.

11 changes: 4 additions & 7 deletions src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import clientGen from "./";
import fs from "fs";
import fsx from "fs-extra";
import path from "path";
import examples from "@open-rpc/examples";
import { promisify } from "util";
import { forEach } from "lodash";
import { types } from "@open-rpc/meta-schema";
import { parse } from "@open-rpc/schema-utils-js";
import _ from "lodash";
import { parseOpenRPCDocument } from "@open-rpc/schema-utils-js";
import { OpenRPC } from "@open-rpc/meta-schema";

const stat = promisify(fs.stat);
const rmdir = promisify(fs.rmdir);
Expand All @@ -25,14 +23,13 @@ describe(`Examples to generate Js clients`, () => {
return await rmdir(testDir);
});

forEach(examples, (example: types.OpenRPC, exampleName: string) => {
//if(exampleName != "petstore") return;
forEach(examples, (example: OpenRPC, exampleName: string) => {
it(`creates a new client for example: ${exampleName}`, async () => {
expect.assertions(1);

await clientGen({
clientName: "test",
schema: await parse(JSON.stringify(example)),
schema: await parseOpenRPCDocument(example),
});

await expect(stat(testDir)).resolves.toBeTruthy();
Expand Down
Loading

0 comments on commit d08f643

Please sign in to comment.