Skip to content

Commit 1dfbe4e

Browse files
authored
Merge pull request #13 from jduff/refactor_schema_inference
Refactor schema inference
2 parents 10a145f + c620dea commit 1dfbe4e

File tree

5 files changed

+830
-651
lines changed

5 files changed

+830
-651
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@
3030
"license": "MIT",
3131
"devDependencies": {
3232
"@arethetypeswrong/cli": "^0.15.3",
33-
"@cloudflare/json-schema-walker": "^0.1.1",
3433
"@gadgetinc/eslint-config": "^0.6.1",
3534
"@gadgetinc/prettier-config": "^0.4.0",
3635
"@jsonhero/json-infer-types": "^1.2.11",
37-
"@jsonhero/schema-infer": "^0.1.5",
3836
"@opentelemetry/api": "^1.8.0",
3937
"@types/fs-extra": "^11.0.4",
4038
"@types/lodash": "^4.17.0",
@@ -48,16 +46,18 @@
4846
"globby": "^14.0.1",
4947
"got": "^11.8.6",
5048
"inflected": "^2.1.0",
51-
"lodash": "^4.17.21",
5249
"prettier": "^2.8.8",
5350
"publint": "^0.2.7",
54-
"safe-stable-stringify": "^2.5.0",
5551
"traverse": "^0.6.9",
5652
"tsx": "^4.7.3",
5753
"typescript": "^5.4.5"
5854
},
5955
"dependencies": {
60-
"fast-glob": "^3.3.2"
56+
"fast-glob": "^3.3.2",
57+
"@cloudflare/json-schema-walker": "^0.1.1",
58+
"@jsonhero/schema-infer": "^0.1.5",
59+
"lodash": "^4.17.21",
60+
"safe-stable-stringify": "^2.5.0"
6161
},
6262
"packageManager": "[email protected]+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b"
6363
}

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import fs from "fs";
22
import path from "path";
33
import fastGlob from "fast-glob";
4+
import { inferSchemaFromExamplePayload } from "./infer-schema";
5+
6+
export { inferSchemaFromExamplePayload };
47

58
const loaded: { [kind in "metadatas" | "schemas"]: { [apiVersion: string]: { [topic: string]: any } } } = { metadatas: {}, schemas: {} };
69

0 commit comments

Comments
 (0)