From adb07d6db0feb4f1e58879e00bffb194f7efd88d Mon Sep 17 00:00:00 2001 From: William Van Haevre Date: Fri, 8 Nov 2024 11:04:21 +0100 Subject: [PATCH 1/5] Setup manifest creation --- manifest.js | 6 ++++++ package.json | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 manifest.js diff --git a/manifest.js b/manifest.js new file mode 100755 index 0000000..e7629f2 --- /dev/null +++ b/manifest.js @@ -0,0 +1,6 @@ +const manifest = { + version: process.env.npm_package_version, + buildDate: new Date().toISOString(), +}; + +console.log(JSON.stringify(manifest)); diff --git a/package.json b/package.json index 6449ec1..a66a32c 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "prettier:fix": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", "lint": "eslint \"src/**/*.{ts,tsx}\"", "lint:fix": "npm run lint -- --fix", - "prepare": "bob build && husky" + "manifest": "node manifest.js > src/manifest.json", + "prepare": "npm run manifest && bob build && husky" }, "lint-staged": { "src/**/*.{js,jsx,ts,tsx}": [ From e1ca09ee3a02088fa2db8fed105d38789e47d2b1 Mon Sep 17 00:00:00 2001 From: William Van Haevre Date: Fri, 8 Nov 2024 11:04:46 +0100 Subject: [PATCH 2/5] ignore created manifest --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7535671..e3eaaed 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,4 @@ android/keystores/debug.keystore # generated by bob lib/ +src/manifest.json From 7aaadad27dc9a96f71c0ec27ca2e9106ccc29bf6 Mon Sep 17 00:00:00 2001 From: William Van Haevre Date: Fri, 8 Nov 2024 11:05:11 +0100 Subject: [PATCH 3/5] Bump react-native-theoplayer dependency --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index c178276..aea33fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "react": "^18.2.0", "react-native": "^0.74.5", "react-native-builder-bob": "^0.23.2", - "react-native-theoplayer": "^8.0.0", + "react-native-theoplayer": "^8.7.0", "typescript": "^5.6.2" }, "peerDependencies": { @@ -11402,9 +11402,9 @@ } }, "node_modules/react-native-theoplayer": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/react-native-theoplayer/-/react-native-theoplayer-8.0.0.tgz", - "integrity": "sha512-9CxR3Qi0Q0j6hP+CYVf0T9/t1OohKMjyKGgIq8Jn2p5Bjjz/cQxrNQyM2pK55q3iDXUTjXAn7ZO+scwZPeSXeA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/react-native-theoplayer/-/react-native-theoplayer-8.7.0.tgz", + "integrity": "sha512-37DIxzbWlxxz5Co5hMqf7udUTw63g3E78YM6UxDylnawRE89gykrP+A+kcsP6g3vDVr64SF1dN4T8Sfr0/HX2g==", "dev": true, "dependencies": { "buffer": "^6.0.3" diff --git a/package.json b/package.json index a66a32c..e1dcdce 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "react": "^18.2.0", "react-native": "^0.74.5", "react-native-builder-bob": "^0.23.2", - "react-native-theoplayer": "^8.0.0", + "react-native-theoplayer": "^8.7.0", "typescript": "^5.6.2" }, "peerDependencies": { From 3be4b53f610fbb8a9c09fe2e36f564680ee11f86 Mon Sep 17 00:00:00 2001 From: William Van Haevre Date: Fri, 8 Nov 2024 11:05:24 +0100 Subject: [PATCH 4/5] Add sdkVersions method to connector API --- src/index.ts | 1 + src/version/Version.ts | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 src/version/Version.ts diff --git a/src/index.ts b/src/index.ts index fb1cc87..f97b9e9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,3 +13,4 @@ export * from './pallycon/PallyConFairplayContentProtectionIntegrationFactory'; export * from './keyos/KeyOSDrmFairplayContentProtectionIntegrationFactory'; export * from './keyos/KeyOSDrmWidevineContentProtectionIntegrationFactory'; export * from './keyos/KeyOSDrmPlayReadyContentProtectionIntegrationFactory'; +export { sdkVersions } from './version/Version'; diff --git a/src/version/Version.ts b/src/version/Version.ts new file mode 100644 index 0000000..b398023 --- /dev/null +++ b/src/version/Version.ts @@ -0,0 +1,9 @@ +import type { SdkVersions } from 'react-native-theoplayer'; +import * as manifest from '../manifest.json'; + +export const sdkVersions = async (): Promise => { + const rnVersionString = manifest.version ?? ''; + return { + rn: rnVersionString, + }; +}; From 797fda7d217ed1eff69bcfdbafd6795bf4451746 Mon Sep 17 00:00:00 2001 From: William Van Haevre Date: Fri, 8 Nov 2024 11:05:38 +0100 Subject: [PATCH 5/5] Add changelog entry --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b477b1..aeddec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + +- Add sdkVersions to connector API + ## [1.7.1] - 2024-09-11 ### Fixed