diff --git a/package.json b/package.json index 9f71a0d..a9db1f3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@wcpos/managed-expo", - "version": "1.5.3", + "version": "1.5.4", "main": "index.js", "author": "kilbot ", "homepage": ".", @@ -25,7 +25,7 @@ "eas-build-on-error": "echo 'Error'", "eas-build-on-complete": "echo 'Complete'", "postinstall": "patch-package", - "preinstall": "chmod +x ./scripts/install-rxdb-license.ts && npx ts-node ./scripts/install-rxdb-license.ts" + "preinstall": "chmod +x ./scripts/install-rxdb-license.js && node ./scripts/install-rxdb-license.js" }, "dependencies": { "@react-native-community/netinfo": "11.3.2", diff --git a/scripts/install-rxdb-license.ts b/scripts/install-rxdb-license.js similarity index 79% rename from scripts/install-rxdb-license.ts rename to scripts/install-rxdb-license.js index e6e9523..1d028a2 100755 --- a/scripts/install-rxdb-license.ts +++ b/scripts/install-rxdb-license.js @@ -1,6 +1,8 @@ #!/usr/bin/env node -import * as dotenv from 'dotenv'; -import { readJson, writeJson } from 'fs-extra'; +const dotenv = require('dotenv'); +const { readJson, writeJson } = require('fs-extra'); + +console.log('Starting preinstall script...'); async function addLicenseToPackageJson() { dotenv.config(); @@ -13,6 +15,7 @@ async function addLicenseToPackageJson() { const packageJsonPath = './package.json'; // Adjust path as necessary try { + console.log('Reading package.json...'); const packageJson = await readJson(packageJsonPath); // Ensuring accessTokens object exists @@ -23,6 +26,7 @@ async function addLicenseToPackageJson() { // Adding the license key to rxdb-premium in accessTokens packageJson.accessTokens['rxdb-premium'] = licenseKey; + console.log('Writing updated package.json...'); await writeJson(packageJsonPath, packageJson, { spaces: 2 }); console.log('License key added to package.json under accessTokens'); } catch (error) {