diff --git a/packages/http/package.json b/packages/http/package.json index 17c3d6574..024b781e9 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -38,6 +38,7 @@ "access": "public" }, "scripts": { + "preinstall": "node -p \"'export const VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts", "prepublishOnly": "pnpm -w run clean-all && pnpm -w run build-all", "build": "rollup -c", "clean": "rimraf ./dist ./.cache", diff --git a/packages/http/src/index.ts b/packages/http/src/index.ts index 41bef6d35..3ed7fd521 100644 --- a/packages/http/src/index.ts +++ b/packages/http/src/index.ts @@ -20,3 +20,5 @@ const PublicApiService = TurnkeyApi; export { PublicApiService }; export { sealAndStampRequestBody } from "./base"; + +export { VERSION } from "./version"; diff --git a/packages/http/src/version.ts b/packages/http/src/version.ts new file mode 100644 index 000000000..be0095450 --- /dev/null +++ b/packages/http/src/version.ts @@ -0,0 +1 @@ +export const VERSION = "2.5.1";