|
@@ -6,8 +6,17 @@
|
|
|
"name": "Pyth Data Association"
|
|
"name": "Pyth Data Association"
|
|
|
},
|
|
},
|
|
|
"homepage": "https://pyth.network",
|
|
"homepage": "https://pyth.network",
|
|
|
- "main": "lib/HermesClient.js",
|
|
|
|
|
- "types": "lib/HermesClient.d.ts",
|
|
|
|
|
|
|
+ "type": "module",
|
|
|
|
|
+ "exports": {
|
|
|
|
|
+ ".": {
|
|
|
|
|
+ "import": "./lib/HermesClient.js",
|
|
|
|
|
+ "require": "./lib/cjs/HermesClient.js",
|
|
|
|
|
+ "types": "./lib/HermesClient.d.ts"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "main": "./lib/cjs/HermesClient.js",
|
|
|
|
|
+ "module": "./lib/HermesClient.js",
|
|
|
|
|
+ "types": "./lib/HermesClient.d.ts",
|
|
|
"files": [
|
|
"files": [
|
|
|
"lib/**/*"
|
|
"lib/**/*"
|
|
|
],
|
|
],
|
|
@@ -20,13 +29,15 @@
|
|
|
"access": "public"
|
|
"access": "public"
|
|
|
},
|
|
},
|
|
|
"scripts": {
|
|
"scripts": {
|
|
|
- "build:typescript": "tsc",
|
|
|
|
|
|
|
+ "build": "pnpm run build:esm && pnpm run build:cjs",
|
|
|
|
|
+ "build:esm": "tsc",
|
|
|
|
|
+ "build:cjs": "tsc --module commonjs --outDir lib/cjs",
|
|
|
"build:schemas": "openapi-zod-client ./schema.json --output src/zodSchemas.ts",
|
|
"build:schemas": "openapi-zod-client ./schema.json --output src/zodSchemas.ts",
|
|
|
"pull:schema": "curl -o schema.json -z schema.json https://hermes.pyth.network/docs/openapi.json",
|
|
"pull:schema": "curl -o schema.json -z schema.json https://hermes.pyth.network/docs/openapi.json",
|
|
|
"example": "node lib/examples/HermesClient.js",
|
|
"example": "node lib/examples/HermesClient.js",
|
|
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
|
"test:lint": "eslint src/",
|
|
"test:lint": "eslint src/",
|
|
|
- "prepublishOnly": "pnpm run build:typescript && pnpm run test:lint",
|
|
|
|
|
|
|
+ "prepublishOnly": "pnpm run build && pnpm run test:lint",
|
|
|
"preversion": "pnpm run test:lint",
|
|
"preversion": "pnpm run test:lint",
|
|
|
"version": "pnpm run format && git add -A src"
|
|
"version": "pnpm run format && git add -A src"
|
|
|
},
|
|
},
|