From a177a8f31e19e8003f8f3fccd84cbab34c3989e8 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Mon, 3 Aug 2026 11:56:03 +0530 Subject: [PATCH 01/11] fix: nc/nmr changes during build --- .../rollup-plugin-studio-pro-format.mjs | 126 ++++++++++++++++++ configs/jsactions/rollup.config.mjs | 4 +- 2 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 configs/jsactions/rollup-plugin-studio-pro-format.mjs diff --git a/configs/jsactions/rollup-plugin-studio-pro-format.mjs b/configs/jsactions/rollup-plugin-studio-pro-format.mjs new file mode 100644 index 000000000..de8b63865 --- /dev/null +++ b/configs/jsactions/rollup-plugin-studio-pro-format.mjs @@ -0,0 +1,126 @@ +/** + * Rollup plugin that restructures the TypeScript-compiled JS output into the + * exact format Studio Pro expects in javascriptsource/. + * + * The TypeScript compiler already handles stripping types, normalizing formatting, + * and collapsing multi-line signatures. This plugin takes that compiled output + * (chunk.code) and restructures it: + * + * 1. Moves the SP header to the top + * 2. Places all imports after the header (excluding mx-global and big.js, + * which Studio Pro injects itself from BuildData()) + * 3. Wraps EXTRA CODE in its markers + * 4. Emits `export async function Name(...) {` instead of the split + * `async function Name(...) { ... } \n export { Name };` that rollup produces + * 5. Wraps user code in BEGIN/END USER CODE markers + * + * This ensures dist/ files match what Studio Pro regenerates on first deploy, + * eliminating the phantom git diff in javascriptsource/ after a fresh module install. + */ +export function studioProFormat() { + return { + name: "studio-pro-format", + generateBundle(options, bundle) { + for (const [, chunk] of Object.entries(bundle)) { + if (chunk.type !== "chunk") continue; + chunk.code = restructureToStudioProFormat(chunk.code); + } + } + }; +} + +function restructureToStudioProFormat(code) { + const lines = code.split(/\r?\n/); + + const imports = []; + const extraCode = []; + const jsdoc = []; + const userCode = []; + let functionSignature = ""; + + let inExtraCode = false; + let inUserCode = false; + let inJsdoc = false; + let skipHeader = false; + + for (const line of lines) { + const trimmed = line.trimEnd(); + const marker = line.trim(); + + // Drop the SP header block wherever it appears — we re-emit it at the top + if (marker === "// This file was generated by Mendix Studio Pro.") { + skipHeader = true; + continue; + } + if (skipHeader) { + if (marker === "// Other code you write will be lost the next time you deploy the project.") { + skipHeader = false; + } + continue; + } + + // EXTRA CODE section + if (marker === "// BEGIN EXTRA CODE") { inExtraCode = true; continue; } + if (marker === "// END EXTRA CODE") { inExtraCode = false; continue; } + if (inExtraCode) { extraCode.push(trimmed); continue; } + + // USER CODE section + if (marker === "// BEGIN USER CODE") { inUserCode = true; continue; } + if (marker === "// END USER CODE") { inUserCode = false; continue; } + if (inUserCode) { userCode.push(trimmed); continue; } + + // JSDoc block + if (marker.startsWith("/**")) inJsdoc = true; + if (inJsdoc) { + jsdoc.push(trimmed); + if (marker.includes("*/")) inJsdoc = false; + continue; + } + + // Function signature — TypeScript already compiled it to plain JS + if (/^(export\s+)?async function \w+\(/.test(marker)) { + functionSignature = marker.replace(/^export\s+/, "").replace(/\s*\{?\s*$/, ""); + continue; + } + + // Drop trailing `export { Foo };` — SP format uses `export async function` instead + if (/^export \{[^}]+\};?\s*$/.test(marker)) continue; + + // Drop standalone closing brace that belongs to the function wrapper + if (marker === "}") continue; + + // Collect imports — skip big.js (injected explicitly below in correct position) + // and mx-global (Studio Pro adds it unconditionally from BuildData()) + if (marker.startsWith("import ")) { + if (!marker.includes("mx-global") && !marker.includes("big.js")) { + imports.push(trimmed); + } + continue; + } + } + + const out = []; + out.push("// This file was generated by Mendix Studio Pro."); + out.push("//"); + out.push("// WARNING: Only the following code will be retained when actions are regenerated:"); + out.push("// - the import list"); + out.push("// - the code between BEGIN USER CODE and END USER CODE"); + out.push("// - the code between BEGIN EXTRA CODE and END EXTRA CODE"); + out.push("// Other code you write will be lost the next time you deploy the project."); + out.push(`import { Big } from "big.js";`); + imports.forEach(i => out.push(i)); + out.push(""); + out.push("// BEGIN EXTRA CODE"); + extraCode.forEach(l => out.push(l)); + out.push("// END EXTRA CODE"); + out.push(""); + jsdoc.forEach(l => out.push(l)); + out.push(`export ${functionSignature} {`); + out.push("\t// BEGIN USER CODE"); + userCode.forEach(l => out.push(l)); + out.push("\t// END USER CODE"); + out.push("}"); + out.push(""); + + return out.join("\r\n"); +} diff --git a/configs/jsactions/rollup.config.mjs b/configs/jsactions/rollup.config.mjs index d8691fac1..f10559d1c 100644 --- a/configs/jsactions/rollup.config.mjs +++ b/configs/jsactions/rollup.config.mjs @@ -13,7 +13,7 @@ import { nodeResolve } from "@rollup/plugin-node-resolve"; import typescript from "@rollup/plugin-typescript"; import { collectDependencies, copyJsModule } from "./rollup-plugin-collect-dependencies.mjs"; import { licenseCustomTemplate, copyLicenseFile } from "./rollup-helper.mjs"; -import { bigJsImportReplacer } from "./rollup-plugin-bigjs-import-replacer.mjs"; +import { studioProFormat } from "./rollup-plugin-studio-pro-format.mjs"; const cwd = process.cwd(); @@ -75,7 +75,7 @@ export default async args => { }), nodeResolvePlugin, typescriptPlugin, - bigJsImportReplacer(), + studioProFormat(), i === files.length - 1 ? command([ async () => copyLicenseFile(cwd, outDir), From a52dc8e51789c71144ac61871c569d15a4c6ca33 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Fri, 7 Aug 2026 12:54:42 +0530 Subject: [PATCH 02/11] fix: module format --- .../rollup-plugin-studio-pro-format.mjs | 135 ++++-------------- .../authentication/BiometricAuthentication.ts | 1 + .../IsBiometricAuthenticationSupported.ts | 1 + .../src/camera/SaveToPictureLibrary.ts | 1 + .../src/clipboard/GetClipboardContent.ts | 1 + .../src/clipboard/SetClipboardContent.ts | 1 + .../src/deeplink/ParseUrlToObject.ts | 1 + .../src/deeplink/RegisterDeepLink.ts | 1 + .../src/file-download/DownloadFile.ts | 1 + .../src/network/IsCellularConnection.ts | 1 + .../src/network/IsConnected.ts | 1 + .../src/network/IsWifiConnection.ts | 1 + .../CancelAllScheduledNotifications.ts | 1 + .../CancelScheduledNotification.ts | 1 + .../ClearAllDeliveredNotifications.ts | 1 + .../src/notifications/DisplayNotification.ts | 1 + .../notifications/GetPushNotificationToken.ts | 1 + .../HasNotificationPermission.ts | 1 + .../RequestNotificationPermission.ts | 1 + .../src/notifications/ScheduleNotification.ts | 2 + .../src/permissions/CheckGenericPermission.ts | 1 + .../permissions/RequestGenericPermission.ts | 1 + .../src/platform/ChangeStatusBar.ts | 1 + .../src/platform/HideKeyboard.ts | 1 + .../src/platform/OpenInAppBrowser.ts | 1 + .../src/platform/PlaySound.ts | 1 + .../src/client/DownloadWebFile.ts | 1 + .../src/client/GetRemoteUrl.ts | 1 + .../src/client/IsConnectedToServer.ts | 1 + .../src/client/RefreshEntity.ts | 1 + .../src/client/RefreshObject.ts | 1 + .../src/client/Reload.ts | 1 + .../src/client/ShowConfirmation.ts | 1 + .../src/client/SignOut.ts | 1 + .../src/client/ToggleSidebar.ts | 1 + .../src/external/CallPhoneNumber.ts | 1 + .../src/external/DraftEmail.ts | 1 + .../src/external/NavigateTo.ts | 1 + .../src/external/OpenMap.ts | 1 + .../src/external/OpenURL.ts | 1 + .../src/external/SendTextMessage.ts | 1 + .../src/external/Share.ts | 1 + .../src/geolocation/Geocode.ts | 1 + .../geolocation/GetStraightLineDistance.ts | 3 - .../geolocation/RequestLocationPermission.ts | 1 + .../src/geolocation/ReverseGeocode.ts | 1 + .../local-storage/ClearCachedSessionData.ts | 1 + .../src/local-storage/ClearLocalStorage.ts | 1 + .../src/local-storage/GetStorageItemObject.ts | 1 + .../local-storage/GetStorageItemObjectList.ts | 1 + .../src/local-storage/GetStorageItemString.ts | 1 + .../src/local-storage/RemoveStorageItem.ts | 1 + .../src/local-storage/SetStorageItemObject.ts | 1 + .../local-storage/SetStorageItemObjectList.ts | 1 + .../src/local-storage/SetStorageItemString.ts | 1 + .../src/local-storage/StorageItemExists.ts | 1 + .../src/other/Base64Decode.ts | 1 + .../src/other/Base64DecodeToImage.ts | 1 + .../src/other/Base64Encode.ts | 1 + .../src/other/FindObjectWithGUID.ts | 1 + .../src/other/GenerateUniqueID.ts | 1 + .../src/other/GetGuid.ts | 1 + .../src/other/GetObjectByGuid.ts | 1 + .../src/other/GetPlatform.ts | 1 + 64 files changed, 88 insertions(+), 113 deletions(-) diff --git a/configs/jsactions/rollup-plugin-studio-pro-format.mjs b/configs/jsactions/rollup-plugin-studio-pro-format.mjs index de8b63865..e464bcb72 100644 --- a/configs/jsactions/rollup-plugin-studio-pro-format.mjs +++ b/configs/jsactions/rollup-plugin-studio-pro-format.mjs @@ -1,126 +1,41 @@ /** - * Rollup plugin that restructures the TypeScript-compiled JS output into the - * exact format Studio Pro expects in javascriptsource/. + * Rollup plugin to prepare JS action files for mx create-module-package transformation. * - * The TypeScript compiler already handles stripping types, normalizing formatting, - * and collapsing multi-line signatures. This plugin takes that compiled output - * (chunk.code) and restructures it: + * Strips imports that mx will inject (mx-global, Big) and fixes displaced marker comments. + * The mx create-module-package command will then add the Studio Pro header and proper formatting. * - * 1. Moves the SP header to the top - * 2. Places all imports after the header (excluding mx-global and big.js, - * which Studio Pro injects itself from BuildData()) - * 3. Wraps EXTRA CODE in its markers - * 4. Emits `export async function Name(...) {` instead of the split - * `async function Name(...) { ... } \n export { Name };` that rollup produces - * 5. Wraps user code in BEGIN/END USER CODE markers - * - * This ensures dist/ files match what Studio Pro regenerates on first deploy, - * eliminating the phantom git diff in javascriptsource/ after a fresh module install. + * Adapted from pwawrapper's mendixMarkers plugin approach. */ export function studioProFormat() { return { name: "studio-pro-format", generateBundle(options, bundle) { - for (const [, chunk] of Object.entries(bundle)) { - if (chunk.type !== "chunk") continue; - chunk.code = restructureToStudioProFormat(chunk.code); + let fixed = 0; + for (const [fileName, chunk] of Object.entries(bundle)) { + if (chunk.type !== "chunk" || !fileName.endsWith(".js")) continue; + const original = chunk.code; + const patched = prepareForMxTransform(original); + if (patched !== original) { + chunk.code = patched; + fixed++; + } + } + if (fixed > 0) { + console.log(`✅ Prepared ${fixed} file(s) for mx transformation`); } } }; } -function restructureToStudioProFormat(code) { - const lines = code.split(/\r?\n/); - - const imports = []; - const extraCode = []; - const jsdoc = []; - const userCode = []; - let functionSignature = ""; - - let inExtraCode = false; - let inUserCode = false; - let inJsdoc = false; - let skipHeader = false; - - for (const line of lines) { - const trimmed = line.trimEnd(); - const marker = line.trim(); - - // Drop the SP header block wherever it appears — we re-emit it at the top - if (marker === "// This file was generated by Mendix Studio Pro.") { - skipHeader = true; - continue; - } - if (skipHeader) { - if (marker === "// Other code you write will be lost the next time you deploy the project.") { - skipHeader = false; - } - continue; - } - - // EXTRA CODE section - if (marker === "// BEGIN EXTRA CODE") { inExtraCode = true; continue; } - if (marker === "// END EXTRA CODE") { inExtraCode = false; continue; } - if (inExtraCode) { extraCode.push(trimmed); continue; } - - // USER CODE section - if (marker === "// BEGIN USER CODE") { inUserCode = true; continue; } - if (marker === "// END USER CODE") { inUserCode = false; continue; } - if (inUserCode) { userCode.push(trimmed); continue; } - - // JSDoc block - if (marker.startsWith("/**")) inJsdoc = true; - if (inJsdoc) { - jsdoc.push(trimmed); - if (marker.includes("*/")) inJsdoc = false; - continue; - } - - // Function signature — TypeScript already compiled it to plain JS - if (/^(export\s+)?async function \w+\(/.test(marker)) { - functionSignature = marker.replace(/^export\s+/, "").replace(/\s*\{?\s*$/, ""); - continue; - } - - // Drop trailing `export { Foo };` — SP format uses `export async function` instead - if (/^export \{[^}]+\};?\s*$/.test(marker)) continue; - - // Drop standalone closing brace that belongs to the function wrapper - if (marker === "}") continue; - - // Collect imports — skip big.js (injected explicitly below in correct position) - // and mx-global (Studio Pro adds it unconditionally from BuildData()) - if (marker.startsWith("import ")) { - if (!marker.includes("mx-global") && !marker.includes("big.js")) { - imports.push(trimmed); - } - continue; - } - } +function prepareForMxTransform(code) { + // Strip imports that mx create-module-package will inject to avoid duplicates + let out = code + .replace(/^import\s+["']mx-global["'];\s*\n?/m, "") + .replace(/^import\s+\{[^}]+\}\s+from\s+["']big\.js["'];\s*\n?/m, ""); - const out = []; - out.push("// This file was generated by Mendix Studio Pro."); - out.push("//"); - out.push("// WARNING: Only the following code will be retained when actions are regenerated:"); - out.push("// - the import list"); - out.push("// - the code between BEGIN USER CODE and END USER CODE"); - out.push("// - the code between BEGIN EXTRA CODE and END EXTRA CODE"); - out.push("// Other code you write will be lost the next time you deploy the project."); - out.push(`import { Big } from "big.js";`); - imports.forEach(i => out.push(i)); - out.push(""); - out.push("// BEGIN EXTRA CODE"); - extraCode.forEach(l => out.push(l)); - out.push("// END EXTRA CODE"); - out.push(""); - jsdoc.forEach(l => out.push(l)); - out.push(`export ${functionSignature} {`); - out.push("\t// BEGIN USER CODE"); - userCode.forEach(l => out.push(l)); - out.push("\t// END USER CODE"); - out.push("}"); - out.push(""); + // The Studio Pro header comment (lines 1-7) will be naturally stripped by TypeScript + // since it's a standalone comment block not attached to code. + // mx create-module-package will regenerate it along with the imports. - return out.join("\r\n"); + return out; } diff --git a/packages/jsActions/mobile-resources-native/src/authentication/BiometricAuthentication.ts b/packages/jsActions/mobile-resources-native/src/authentication/BiometricAuthentication.ts index cd4582e5f..835f0c7fe 100644 --- a/packages/jsActions/mobile-resources-native/src/authentication/BiometricAuthentication.ts +++ b/packages/jsActions/mobile-resources-native/src/authentication/BiometricAuthentication.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { simplePrompt } from "@sbaiahmed1/react-native-biometrics"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/authentication/IsBiometricAuthenticationSupported.ts b/packages/jsActions/mobile-resources-native/src/authentication/IsBiometricAuthenticationSupported.ts index 020f11cdc..d61fbeaab 100644 --- a/packages/jsActions/mobile-resources-native/src/authentication/IsBiometricAuthenticationSupported.ts +++ b/packages/jsActions/mobile-resources-native/src/authentication/IsBiometricAuthenticationSupported.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { isSensorAvailable } from "@sbaiahmed1/react-native-biometrics"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/camera/SaveToPictureLibrary.ts b/packages/jsActions/mobile-resources-native/src/camera/SaveToPictureLibrary.ts index e8de56c93..944089311 100644 --- a/packages/jsActions/mobile-resources-native/src/camera/SaveToPictureLibrary.ts +++ b/packages/jsActions/mobile-resources-native/src/camera/SaveToPictureLibrary.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { CameraRoll } from "@react-native-camera-roll/camera-roll"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/clipboard/GetClipboardContent.ts b/packages/jsActions/mobile-resources-native/src/clipboard/GetClipboardContent.ts index 0a742a7d7..8e76b4e3e 100644 --- a/packages/jsActions/mobile-resources-native/src/clipboard/GetClipboardContent.ts +++ b/packages/jsActions/mobile-resources-native/src/clipboard/GetClipboardContent.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Clipboard } from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/clipboard/SetClipboardContent.ts b/packages/jsActions/mobile-resources-native/src/clipboard/SetClipboardContent.ts index 69b92b0ef..c3d616446 100644 --- a/packages/jsActions/mobile-resources-native/src/clipboard/SetClipboardContent.ts +++ b/packages/jsActions/mobile-resources-native/src/clipboard/SetClipboardContent.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Clipboard } from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/deeplink/ParseUrlToObject.ts b/packages/jsActions/mobile-resources-native/src/deeplink/ParseUrlToObject.ts index d82f56979..69f2cc5c5 100644 --- a/packages/jsActions/mobile-resources-native/src/deeplink/ParseUrlToObject.ts +++ b/packages/jsActions/mobile-resources-native/src/deeplink/ParseUrlToObject.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import UrlParse from "url-parse"; type Records = Record; diff --git a/packages/jsActions/mobile-resources-native/src/deeplink/RegisterDeepLink.ts b/packages/jsActions/mobile-resources-native/src/deeplink/RegisterDeepLink.ts index 7345bae41..e190e8052 100644 --- a/packages/jsActions/mobile-resources-native/src/deeplink/RegisterDeepLink.ts +++ b/packages/jsActions/mobile-resources-native/src/deeplink/RegisterDeepLink.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Linking } from "react-native"; type Nanoflow = (params: Record) => Promise; diff --git a/packages/jsActions/mobile-resources-native/src/file-download/DownloadFile.ts b/packages/jsActions/mobile-resources-native/src/file-download/DownloadFile.ts index 93216aefd..2f4617ea7 100644 --- a/packages/jsActions/mobile-resources-native/src/file-download/DownloadFile.ts +++ b/packages/jsActions/mobile-resources-native/src/file-download/DownloadFile.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Platform } from "react-native"; import RNBlobUtil from "react-native-blob-util"; import { open } from "react-native-file-viewer-turbo"; diff --git a/packages/jsActions/mobile-resources-native/src/network/IsCellularConnection.ts b/packages/jsActions/mobile-resources-native/src/network/IsCellularConnection.ts index 076a24ae6..04de1250d 100644 --- a/packages/jsActions/mobile-resources-native/src/network/IsCellularConnection.ts +++ b/packages/jsActions/mobile-resources-native/src/network/IsCellularConnection.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { fetch } from "@react-native-community/netinfo"; import { NetInfoType } from "../../typings/NetInfo"; diff --git a/packages/jsActions/mobile-resources-native/src/network/IsConnected.ts b/packages/jsActions/mobile-resources-native/src/network/IsConnected.ts index 3f2e605ee..a6cc535a4 100644 --- a/packages/jsActions/mobile-resources-native/src/network/IsConnected.ts +++ b/packages/jsActions/mobile-resources-native/src/network/IsConnected.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { fetch } from "@react-native-community/netinfo"; import { NetInfoType } from "../../typings/NetInfo"; diff --git a/packages/jsActions/mobile-resources-native/src/network/IsWifiConnection.ts b/packages/jsActions/mobile-resources-native/src/network/IsWifiConnection.ts index 6e1328afe..387b2eaf4 100644 --- a/packages/jsActions/mobile-resources-native/src/network/IsWifiConnection.ts +++ b/packages/jsActions/mobile-resources-native/src/network/IsWifiConnection.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { fetch } from "@react-native-community/netinfo"; import { NetInfoType } from "../../typings/NetInfo"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/CancelAllScheduledNotifications.ts b/packages/jsActions/mobile-resources-native/src/notifications/CancelAllScheduledNotifications.ts index 5c73fddfb..3c8ac9588 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/CancelAllScheduledNotifications.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/CancelAllScheduledNotifications.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { NativeModules } from "react-native"; import notifee from "react-native-notify-kit"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/CancelScheduledNotification.ts b/packages/jsActions/mobile-resources-native/src/notifications/CancelScheduledNotification.ts index 976a41741..0b8316aa8 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/CancelScheduledNotification.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/CancelScheduledNotification.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { NativeModules } from "react-native"; import notifee from "react-native-notify-kit"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/ClearAllDeliveredNotifications.ts b/packages/jsActions/mobile-resources-native/src/notifications/ClearAllDeliveredNotifications.ts index 5a940939b..411b691bd 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/ClearAllDeliveredNotifications.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/ClearAllDeliveredNotifications.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { NativeModules } from "react-native"; import notifee from "react-native-notify-kit"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/DisplayNotification.ts b/packages/jsActions/mobile-resources-native/src/notifications/DisplayNotification.ts index 39c40ed69..0d4093870 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/DisplayNotification.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/DisplayNotification.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { NativeModules, Platform } from "react-native"; import notifee, { AndroidChannel, AndroidImportance, Notification } from "react-native-notify-kit"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/GetPushNotificationToken.ts b/packages/jsActions/mobile-resources-native/src/notifications/GetPushNotificationToken.ts index a395b5e3b..080a412d1 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/GetPushNotificationToken.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/GetPushNotificationToken.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { NativeModules } from "react-native"; import messaging from "@react-native-firebase/messaging"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/HasNotificationPermission.ts b/packages/jsActions/mobile-resources-native/src/notifications/HasNotificationPermission.ts index d1598b170..ab2a304ba 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/HasNotificationPermission.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/HasNotificationPermission.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { NativeModules } from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/notifications/RequestNotificationPermission.ts b/packages/jsActions/mobile-resources-native/src/notifications/RequestNotificationPermission.ts index 36fddaa9c..f452dfe37 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/RequestNotificationPermission.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/RequestNotificationPermission.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { NativeModules, PermissionsAndroid, Platform } from "react-native"; import messaging from "@react-native-firebase/messaging"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/ScheduleNotification.ts b/packages/jsActions/mobile-resources-native/src/notifications/ScheduleNotification.ts index 457532ad4..f27aa1210 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/ScheduleNotification.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/ScheduleNotification.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Platform } from "react-native"; import notifee, { TimestampTrigger, @@ -14,6 +15,7 @@ import notifee, { Notification, AlarmType } from "react-native-notify-kit"; + // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/permissions/CheckGenericPermission.ts b/packages/jsActions/mobile-resources-native/src/permissions/CheckGenericPermission.ts index 2fca380aa..aead5c053 100644 --- a/packages/jsActions/mobile-resources-native/src/permissions/CheckGenericPermission.ts +++ b/packages/jsActions/mobile-resources-native/src/permissions/CheckGenericPermission.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Platform, NativeModules } from "react-native"; import { check, Permission, PERMISSIONS as RNPermissions } from "react-native-permissions"; import { ANDROIDPermissionName, IOSPermissionName } from "../../typings/RequestGenericPermission"; diff --git a/packages/jsActions/mobile-resources-native/src/permissions/RequestGenericPermission.ts b/packages/jsActions/mobile-resources-native/src/permissions/RequestGenericPermission.ts index e6fb1f165..b2f692445 100644 --- a/packages/jsActions/mobile-resources-native/src/permissions/RequestGenericPermission.ts +++ b/packages/jsActions/mobile-resources-native/src/permissions/RequestGenericPermission.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Alert, Platform, NativeModules } from "react-native"; import { check, diff --git a/packages/jsActions/mobile-resources-native/src/platform/ChangeStatusBar.ts b/packages/jsActions/mobile-resources-native/src/platform/ChangeStatusBar.ts index d40cc977d..8de8da113 100644 --- a/packages/jsActions/mobile-resources-native/src/platform/ChangeStatusBar.ts +++ b/packages/jsActions/mobile-resources-native/src/platform/ChangeStatusBar.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Platform, StatusBar, StatusBarAnimation, StatusBarStyle } from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/platform/HideKeyboard.ts b/packages/jsActions/mobile-resources-native/src/platform/HideKeyboard.ts index 5c0223d01..7ad616f94 100644 --- a/packages/jsActions/mobile-resources-native/src/platform/HideKeyboard.ts +++ b/packages/jsActions/mobile-resources-native/src/platform/HideKeyboard.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Keyboard } from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/platform/OpenInAppBrowser.ts b/packages/jsActions/mobile-resources-native/src/platform/OpenInAppBrowser.ts index cb0d3f5b3..8aea05b2c 100644 --- a/packages/jsActions/mobile-resources-native/src/platform/OpenInAppBrowser.ts +++ b/packages/jsActions/mobile-resources-native/src/platform/OpenInAppBrowser.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { openBrowser } from "@swan-io/react-native-browser"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/platform/PlaySound.ts b/packages/jsActions/mobile-resources-native/src/platform/PlaySound.ts index 3aa2be40e..5ca049b9e 100644 --- a/packages/jsActions/mobile-resources-native/src/platform/PlaySound.ts +++ b/packages/jsActions/mobile-resources-native/src/platform/PlaySound.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import Sound from "react-native-sound"; import RNBlobUtil from "react-native-blob-util"; import { Platform } from "react-native"; diff --git a/packages/jsActions/nanoflow-actions-native/src/client/DownloadWebFile.ts b/packages/jsActions/nanoflow-actions-native/src/client/DownloadWebFile.ts index c6dcef98c..77fc0aaf2 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/DownloadWebFile.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/DownloadWebFile.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/GetRemoteUrl.ts b/packages/jsActions/nanoflow-actions-native/src/client/GetRemoteUrl.ts index 1c1ae7a9e..aa90fbd1d 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/GetRemoteUrl.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/GetRemoteUrl.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/IsConnectedToServer.ts b/packages/jsActions/nanoflow-actions-native/src/client/IsConnectedToServer.ts index 557981f6e..17df42e10 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/IsConnectedToServer.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/IsConnectedToServer.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/RefreshEntity.ts b/packages/jsActions/nanoflow-actions-native/src/client/RefreshEntity.ts index 6c02a6c41..648406d5e 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/RefreshEntity.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/RefreshEntity.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/RefreshObject.ts b/packages/jsActions/nanoflow-actions-native/src/client/RefreshObject.ts index dce64f130..388b0d432 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/RefreshObject.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/RefreshObject.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/Reload.ts b/packages/jsActions/nanoflow-actions-native/src/client/Reload.ts index 1b3d55071..11a098f22 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/Reload.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/Reload.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/ShowConfirmation.ts b/packages/jsActions/nanoflow-actions-native/src/client/ShowConfirmation.ts index 8b883dde6..ec008c01c 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/ShowConfirmation.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/ShowConfirmation.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/SignOut.ts b/packages/jsActions/nanoflow-actions-native/src/client/SignOut.ts index 5a4e2c340..f756cfcec 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/SignOut.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/SignOut.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/ToggleSidebar.ts b/packages/jsActions/nanoflow-actions-native/src/client/ToggleSidebar.ts index ae2c474da..12d5709e2 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/ToggleSidebar.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/ToggleSidebar.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/CallPhoneNumber.ts b/packages/jsActions/nanoflow-actions-native/src/external/CallPhoneNumber.ts index f305bc7db..db6c43ad2 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/CallPhoneNumber.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/CallPhoneNumber.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/DraftEmail.ts b/packages/jsActions/nanoflow-actions-native/src/external/DraftEmail.ts index 3d106e812..f87ae87a1 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/DraftEmail.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/DraftEmail.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/NavigateTo.ts b/packages/jsActions/nanoflow-actions-native/src/external/NavigateTo.ts index d85978a23..2a717538e 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/NavigateTo.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/NavigateTo.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/OpenMap.ts b/packages/jsActions/nanoflow-actions-native/src/external/OpenMap.ts index ff637725b..9aa3f2e9a 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/OpenMap.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/OpenMap.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/OpenURL.ts b/packages/jsActions/nanoflow-actions-native/src/external/OpenURL.ts index c121d7807..2210dbe68 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/OpenURL.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/OpenURL.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/SendTextMessage.ts b/packages/jsActions/nanoflow-actions-native/src/external/SendTextMessage.ts index ab6549514..2ce2b4da9 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/SendTextMessage.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/SendTextMessage.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/Share.ts b/packages/jsActions/nanoflow-actions-native/src/external/Share.ts index 8d6b88125..a13f5e0f3 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/Share.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/Share.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/Geocode.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/Geocode.ts index 8b4a93a36..4bf860d8f 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/Geocode.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/Geocode.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import Geodecoder from "react-native-geocoder"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts index a013cb54f..6974922b1 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts @@ -8,12 +8,9 @@ import { Big } from "big.js"; // BEGIN EXTRA CODE -// END EXTRA CODE type DistanceUnit = "KILOMETER" | "STATUTE_MILE" | "NAUTICAL_MILE"; -// BEGIN EXTRA CODE - function deg2rad(deg: Big): Big { return deg.times(Math.PI / 180); } diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/RequestLocationPermission.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/RequestLocationPermission.ts index b9a253b19..8f86fcaaf 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/RequestLocationPermission.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/RequestLocationPermission.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { check, request, PERMISSIONS, RESULTS, openSettings } from "react-native-permissions"; import { Platform, Alert, ToastAndroid } from "react-native"; diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/ReverseGeocode.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/ReverseGeocode.ts index 1b6a25d9f..4761185f0 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/ReverseGeocode.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/ReverseGeocode.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import Geodecoder from "react-native-geocoder"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearCachedSessionData.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearCachedSessionData.ts index 01d92750a..f47959db2 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearCachedSessionData.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearCachedSessionData.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearLocalStorage.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearLocalStorage.ts index 96ccc9d75..813e12f5d 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearLocalStorage.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearLocalStorage.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObject.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObject.ts index 7f312b69e..c6bd76b28 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObject.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObject.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; import { StorageValue } from "../../typings/StorageValue"; diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObjectList.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObjectList.ts index 16ed41d9d..a2ff80b17 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObjectList.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObjectList.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; import { StorageValue } from "../../typings/StorageValue"; diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemString.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemString.ts index 96770145a..5547295cb 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemString.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemString.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/RemoveStorageItem.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/RemoveStorageItem.ts index e956db73a..e86163d37 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/RemoveStorageItem.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/RemoveStorageItem.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObject.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObject.ts index cbc571d8d..2a03d7b75 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObject.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObject.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; import { StorageValue } from "../../typings/StorageValue"; diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObjectList.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObjectList.ts index 2de47af2b..22af0a184 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObjectList.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObjectList.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; import { StorageValue } from "../../typings/StorageValue"; diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemString.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemString.ts index 0f5582988..bdbc509b8 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemString.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemString.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/StorageItemExists.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/StorageItemExists.ts index 9f00e1d2b..bc251bf2d 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/StorageItemExists.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/StorageItemExists.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/Base64Decode.ts b/packages/jsActions/nanoflow-actions-native/src/other/Base64Decode.ts index 4012998bb..e0e37437f 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/Base64Decode.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/Base64Decode.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Base64 } from "js-base64"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/Base64DecodeToImage.ts b/packages/jsActions/nanoflow-actions-native/src/other/Base64DecodeToImage.ts index 8a8f5c4cf..d32446db5 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/Base64DecodeToImage.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/Base64DecodeToImage.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Base64 } from "js-base64"; import RNBlobUtil from "react-native-blob-util"; import { NativeModules } from "react-native"; diff --git a/packages/jsActions/nanoflow-actions-native/src/other/Base64Encode.ts b/packages/jsActions/nanoflow-actions-native/src/other/Base64Encode.ts index 1d9e3da56..5acecef5c 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/Base64Encode.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/Base64Encode.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; import { Base64 } from "js-base64"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/FindObjectWithGUID.ts b/packages/jsActions/nanoflow-actions-native/src/other/FindObjectWithGUID.ts index 8c97c3172..067562468 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/FindObjectWithGUID.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/FindObjectWithGUID.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/GenerateUniqueID.ts b/packages/jsActions/nanoflow-actions-native/src/other/GenerateUniqueID.ts index 073015fbb..15ff2e35d 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/GenerateUniqueID.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/GenerateUniqueID.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE const COUNTER_STORE = "idCounter"; diff --git a/packages/jsActions/nanoflow-actions-native/src/other/GetGuid.ts b/packages/jsActions/nanoflow-actions-native/src/other/GetGuid.ts index b445104a8..b00a6c2bb 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/GetGuid.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/GetGuid.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/GetObjectByGuid.ts b/packages/jsActions/nanoflow-actions-native/src/other/GetObjectByGuid.ts index e83cf6115..1022932fb 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/GetObjectByGuid.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/GetObjectByGuid.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/GetPlatform.ts b/packages/jsActions/nanoflow-actions-native/src/other/GetPlatform.ts index 13a736f06..5af8e28c1 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/GetPlatform.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/GetPlatform.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE From fa9b6d5c904240068e90428bd46deea6febb7e4e Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Tue, 11 Aug 2026 11:37:48 +0530 Subject: [PATCH 03/11] fix: rollup script --- .../rollup-plugin-studio-pro-format.mjs | 41 ------------- configs/jsactions/rollup.config.mjs | 57 ++++++++++++++++++- 2 files changed, 55 insertions(+), 43 deletions(-) delete mode 100644 configs/jsactions/rollup-plugin-studio-pro-format.mjs diff --git a/configs/jsactions/rollup-plugin-studio-pro-format.mjs b/configs/jsactions/rollup-plugin-studio-pro-format.mjs deleted file mode 100644 index e464bcb72..000000000 --- a/configs/jsactions/rollup-plugin-studio-pro-format.mjs +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Rollup plugin to prepare JS action files for mx create-module-package transformation. - * - * Strips imports that mx will inject (mx-global, Big) and fixes displaced marker comments. - * The mx create-module-package command will then add the Studio Pro header and proper formatting. - * - * Adapted from pwawrapper's mendixMarkers plugin approach. - */ -export function studioProFormat() { - return { - name: "studio-pro-format", - generateBundle(options, bundle) { - let fixed = 0; - for (const [fileName, chunk] of Object.entries(bundle)) { - if (chunk.type !== "chunk" || !fileName.endsWith(".js")) continue; - const original = chunk.code; - const patched = prepareForMxTransform(original); - if (patched !== original) { - chunk.code = patched; - fixed++; - } - } - if (fixed > 0) { - console.log(`✅ Prepared ${fixed} file(s) for mx transformation`); - } - } - }; -} - -function prepareForMxTransform(code) { - // Strip imports that mx create-module-package will inject to avoid duplicates - let out = code - .replace(/^import\s+["']mx-global["'];\s*\n?/m, "") - .replace(/^import\s+\{[^}]+\}\s+from\s+["']big\.js["'];\s*\n?/m, ""); - - // The Studio Pro header comment (lines 1-7) will be naturally stripped by TypeScript - // since it's a standalone comment block not attached to code. - // mx create-module-package will regenerate it along with the imports. - - return out; -} diff --git a/configs/jsactions/rollup.config.mjs b/configs/jsactions/rollup.config.mjs index f10559d1c..126aa56e0 100644 --- a/configs/jsactions/rollup.config.mjs +++ b/configs/jsactions/rollup.config.mjs @@ -13,7 +13,6 @@ import { nodeResolve } from "@rollup/plugin-node-resolve"; import typescript from "@rollup/plugin-typescript"; import { collectDependencies, copyJsModule } from "./rollup-plugin-collect-dependencies.mjs"; import { licenseCustomTemplate, copyLicenseFile } from "./rollup-helper.mjs"; -import { studioProFormat } from "./rollup-plugin-studio-pro-format.mjs"; const cwd = process.cwd(); @@ -40,6 +39,60 @@ export default async args => { const copyAsync = promisify(copy); + // Inline plugin to prepare JS actions for Studio Pro format + const studioProFormatPlugin = { + name: "studio-pro-format", + generateBundle(options, bundle) { + for (const [fileName, chunk] of Object.entries(bundle)) { + if (chunk.type !== "chunk" || !fileName.endsWith(".js")) continue; + + let code = chunk.code; + + // 1. Check if header exists and remove it (we'll add it back at line 1) + const hasHeader = code.includes("// This file was generated by Mendix Studio Pro."); + if (hasHeader) { + // Remove existing header (7 lines) + code = code.replace( + /^\/\/ This file was generated by Mendix Studio Pro\.\r?\n\/\/\r?\n\/\/ WARNING: Only the following code will be retained when actions are regenerated:\r?\n\/\/ - the import list\r?\n\/\/ - the code between BEGIN USER CODE and END USER CODE\r?\n\/\/ - the code between BEGIN EXTRA CODE and END EXTRA CODE\r?\n\/\/ Other code you write will be lost the next time you deploy the project\.\r?\n/m, + "" + ); + } + + // 2. Remove Big import (will add back at line 8 with header) + const hasBigImport = code.match(/^import\s*\{\s*Big\s*\}\s*from\s*["']big\.js["'];?\s*$/m); + if (hasBigImport) { + code = code.replace(/^import\s*\{\s*Big\s*\}\s*from\s*["']big\.js["'];?\s*\r?\n/m, ""); + } + + // 3. Add header at line 1 + Big import at line 8 + const header = [ + "// This file was generated by Mendix Studio Pro.", + "//", + "// WARNING: Only the following code will be retained when actions are regenerated:", + "// - the import list", + "// - the code between BEGIN USER CODE and END USER CODE", + "// - the code between BEGIN EXTRA CODE and END EXTRA CODE", + "// Other code you write will be lost the next time you deploy the project.", + 'import { Big } from "big.js";' + ].join("\r\n") + "\r\n"; + + code = header + code; + + // 4. Fix export pattern: async function Name { } export { Name }; + // → export async function Name { } + const exportMatch = code.match(/export\s*\{\s*(\w+)\s*\};?\s*$/m); + if (exportMatch) { + const functionName = exportMatch[1]; + const funcPattern = new RegExp(`^(async\\s+function\\s+${functionName}\\s*\\()`, "m"); + code = code.replace(funcPattern, "export $1"); + code = code.replace(/\nexport\s*\{\s*\w+\s*\};?\s*$/m, ""); + } + + chunk.code = code; + } + } + }; + files.forEach((file, i) => { const fileInput = relative(cwd, file); const fileOutput = basename(file, ".ts"); @@ -75,7 +128,7 @@ export default async args => { }), nodeResolvePlugin, typescriptPlugin, - studioProFormat(), + studioProFormatPlugin, i === files.length - 1 ? command([ async () => copyLicenseFile(cwd, outDir), From af1b03fca4c52885e98a482850e47a5eefcec791 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Tue, 11 Aug 2026 11:47:24 +0530 Subject: [PATCH 04/11] fix: revert unnecessary changes --- .../src/authentication/BiometricAuthentication.ts | 1 - .../src/authentication/IsBiometricAuthenticationSupported.ts | 1 - .../mobile-resources-native/src/camera/SaveToPictureLibrary.ts | 1 - .../mobile-resources-native/src/clipboard/GetClipboardContent.ts | 1 - .../mobile-resources-native/src/clipboard/SetClipboardContent.ts | 1 - .../mobile-resources-native/src/deeplink/ParseUrlToObject.ts | 1 - .../mobile-resources-native/src/deeplink/RegisterDeepLink.ts | 1 - .../mobile-resources-native/src/file-download/DownloadFile.ts | 1 - .../mobile-resources-native/src/network/IsCellularConnection.ts | 1 - .../jsActions/mobile-resources-native/src/network/IsConnected.ts | 1 - .../mobile-resources-native/src/network/IsWifiConnection.ts | 1 - .../src/notifications/CancelAllScheduledNotifications.ts | 1 - .../src/notifications/CancelScheduledNotification.ts | 1 - .../src/notifications/ClearAllDeliveredNotifications.ts | 1 - .../src/notifications/DisplayNotification.ts | 1 - .../src/notifications/GetPushNotificationToken.ts | 1 - .../src/notifications/HasNotificationPermission.ts | 1 - .../src/notifications/RequestNotificationPermission.ts | 1 - .../src/notifications/ScheduleNotification.ts | 1 - .../src/permissions/CheckGenericPermission.ts | 1 - .../src/permissions/RequestGenericPermission.ts | 1 - .../mobile-resources-native/src/platform/ChangeStatusBar.ts | 1 - .../mobile-resources-native/src/platform/HideKeyboard.ts | 1 - .../mobile-resources-native/src/platform/OpenInAppBrowser.ts | 1 - .../jsActions/mobile-resources-native/src/platform/PlaySound.ts | 1 - .../nanoflow-actions-native/src/client/DownloadWebFile.ts | 1 - .../jsActions/nanoflow-actions-native/src/client/GetRemoteUrl.ts | 1 - .../nanoflow-actions-native/src/client/IsConnectedToServer.ts | 1 - .../nanoflow-actions-native/src/client/RefreshEntity.ts | 1 - .../nanoflow-actions-native/src/client/RefreshObject.ts | 1 - packages/jsActions/nanoflow-actions-native/src/client/Reload.ts | 1 - .../nanoflow-actions-native/src/client/ShowConfirmation.ts | 1 - packages/jsActions/nanoflow-actions-native/src/client/SignOut.ts | 1 - .../nanoflow-actions-native/src/client/ToggleSidebar.ts | 1 - .../nanoflow-actions-native/src/external/CallPhoneNumber.ts | 1 - .../jsActions/nanoflow-actions-native/src/external/DraftEmail.ts | 1 - .../jsActions/nanoflow-actions-native/src/external/NavigateTo.ts | 1 - .../jsActions/nanoflow-actions-native/src/external/OpenMap.ts | 1 - .../jsActions/nanoflow-actions-native/src/external/OpenURL.ts | 1 - .../nanoflow-actions-native/src/external/SendTextMessage.ts | 1 - packages/jsActions/nanoflow-actions-native/src/external/Share.ts | 1 - .../jsActions/nanoflow-actions-native/src/geolocation/Geocode.ts | 1 - .../src/geolocation/GetStraightLineDistance.ts | 1 - .../src/geolocation/RequestLocationPermission.ts | 1 - .../nanoflow-actions-native/src/geolocation/ReverseGeocode.ts | 1 - .../src/local-storage/ClearCachedSessionData.ts | 1 - .../src/local-storage/ClearLocalStorage.ts | 1 - .../src/local-storage/GetStorageItemObject.ts | 1 - .../src/local-storage/GetStorageItemObjectList.ts | 1 - .../src/local-storage/GetStorageItemString.ts | 1 - .../src/local-storage/RemoveStorageItem.ts | 1 - .../src/local-storage/SetStorageItemObject.ts | 1 - .../src/local-storage/SetStorageItemObjectList.ts | 1 - .../src/local-storage/SetStorageItemString.ts | 1 - .../src/local-storage/StorageItemExists.ts | 1 - .../jsActions/nanoflow-actions-native/src/other/Base64Decode.ts | 1 - .../nanoflow-actions-native/src/other/Base64DecodeToImage.ts | 1 - .../jsActions/nanoflow-actions-native/src/other/Base64Encode.ts | 1 - .../nanoflow-actions-native/src/other/FindObjectWithGUID.ts | 1 - .../nanoflow-actions-native/src/other/GenerateUniqueID.ts | 1 - packages/jsActions/nanoflow-actions-native/src/other/GetGuid.ts | 1 - .../nanoflow-actions-native/src/other/GetObjectByGuid.ts | 1 - .../jsActions/nanoflow-actions-native/src/other/GetPlatform.ts | 1 - 63 files changed, 63 deletions(-) diff --git a/packages/jsActions/mobile-resources-native/src/authentication/BiometricAuthentication.ts b/packages/jsActions/mobile-resources-native/src/authentication/BiometricAuthentication.ts index 835f0c7fe..cd4582e5f 100644 --- a/packages/jsActions/mobile-resources-native/src/authentication/BiometricAuthentication.ts +++ b/packages/jsActions/mobile-resources-native/src/authentication/BiometricAuthentication.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { simplePrompt } from "@sbaiahmed1/react-native-biometrics"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/authentication/IsBiometricAuthenticationSupported.ts b/packages/jsActions/mobile-resources-native/src/authentication/IsBiometricAuthenticationSupported.ts index d61fbeaab..020f11cdc 100644 --- a/packages/jsActions/mobile-resources-native/src/authentication/IsBiometricAuthenticationSupported.ts +++ b/packages/jsActions/mobile-resources-native/src/authentication/IsBiometricAuthenticationSupported.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { isSensorAvailable } from "@sbaiahmed1/react-native-biometrics"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/camera/SaveToPictureLibrary.ts b/packages/jsActions/mobile-resources-native/src/camera/SaveToPictureLibrary.ts index 944089311..e8de56c93 100644 --- a/packages/jsActions/mobile-resources-native/src/camera/SaveToPictureLibrary.ts +++ b/packages/jsActions/mobile-resources-native/src/camera/SaveToPictureLibrary.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { CameraRoll } from "@react-native-camera-roll/camera-roll"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/clipboard/GetClipboardContent.ts b/packages/jsActions/mobile-resources-native/src/clipboard/GetClipboardContent.ts index 8e76b4e3e..0a742a7d7 100644 --- a/packages/jsActions/mobile-resources-native/src/clipboard/GetClipboardContent.ts +++ b/packages/jsActions/mobile-resources-native/src/clipboard/GetClipboardContent.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Clipboard } from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/clipboard/SetClipboardContent.ts b/packages/jsActions/mobile-resources-native/src/clipboard/SetClipboardContent.ts index c3d616446..69b92b0ef 100644 --- a/packages/jsActions/mobile-resources-native/src/clipboard/SetClipboardContent.ts +++ b/packages/jsActions/mobile-resources-native/src/clipboard/SetClipboardContent.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Clipboard } from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/deeplink/ParseUrlToObject.ts b/packages/jsActions/mobile-resources-native/src/deeplink/ParseUrlToObject.ts index 69f2cc5c5..d82f56979 100644 --- a/packages/jsActions/mobile-resources-native/src/deeplink/ParseUrlToObject.ts +++ b/packages/jsActions/mobile-resources-native/src/deeplink/ParseUrlToObject.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import UrlParse from "url-parse"; type Records = Record; diff --git a/packages/jsActions/mobile-resources-native/src/deeplink/RegisterDeepLink.ts b/packages/jsActions/mobile-resources-native/src/deeplink/RegisterDeepLink.ts index e190e8052..7345bae41 100644 --- a/packages/jsActions/mobile-resources-native/src/deeplink/RegisterDeepLink.ts +++ b/packages/jsActions/mobile-resources-native/src/deeplink/RegisterDeepLink.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Linking } from "react-native"; type Nanoflow = (params: Record) => Promise; diff --git a/packages/jsActions/mobile-resources-native/src/file-download/DownloadFile.ts b/packages/jsActions/mobile-resources-native/src/file-download/DownloadFile.ts index 2f4617ea7..93216aefd 100644 --- a/packages/jsActions/mobile-resources-native/src/file-download/DownloadFile.ts +++ b/packages/jsActions/mobile-resources-native/src/file-download/DownloadFile.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Platform } from "react-native"; import RNBlobUtil from "react-native-blob-util"; import { open } from "react-native-file-viewer-turbo"; diff --git a/packages/jsActions/mobile-resources-native/src/network/IsCellularConnection.ts b/packages/jsActions/mobile-resources-native/src/network/IsCellularConnection.ts index 04de1250d..076a24ae6 100644 --- a/packages/jsActions/mobile-resources-native/src/network/IsCellularConnection.ts +++ b/packages/jsActions/mobile-resources-native/src/network/IsCellularConnection.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { fetch } from "@react-native-community/netinfo"; import { NetInfoType } from "../../typings/NetInfo"; diff --git a/packages/jsActions/mobile-resources-native/src/network/IsConnected.ts b/packages/jsActions/mobile-resources-native/src/network/IsConnected.ts index a6cc535a4..3f2e605ee 100644 --- a/packages/jsActions/mobile-resources-native/src/network/IsConnected.ts +++ b/packages/jsActions/mobile-resources-native/src/network/IsConnected.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { fetch } from "@react-native-community/netinfo"; import { NetInfoType } from "../../typings/NetInfo"; diff --git a/packages/jsActions/mobile-resources-native/src/network/IsWifiConnection.ts b/packages/jsActions/mobile-resources-native/src/network/IsWifiConnection.ts index 387b2eaf4..6e1328afe 100644 --- a/packages/jsActions/mobile-resources-native/src/network/IsWifiConnection.ts +++ b/packages/jsActions/mobile-resources-native/src/network/IsWifiConnection.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { fetch } from "@react-native-community/netinfo"; import { NetInfoType } from "../../typings/NetInfo"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/CancelAllScheduledNotifications.ts b/packages/jsActions/mobile-resources-native/src/notifications/CancelAllScheduledNotifications.ts index 3c8ac9588..5c73fddfb 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/CancelAllScheduledNotifications.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/CancelAllScheduledNotifications.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { NativeModules } from "react-native"; import notifee from "react-native-notify-kit"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/CancelScheduledNotification.ts b/packages/jsActions/mobile-resources-native/src/notifications/CancelScheduledNotification.ts index 0b8316aa8..976a41741 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/CancelScheduledNotification.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/CancelScheduledNotification.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { NativeModules } from "react-native"; import notifee from "react-native-notify-kit"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/ClearAllDeliveredNotifications.ts b/packages/jsActions/mobile-resources-native/src/notifications/ClearAllDeliveredNotifications.ts index 411b691bd..5a940939b 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/ClearAllDeliveredNotifications.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/ClearAllDeliveredNotifications.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { NativeModules } from "react-native"; import notifee from "react-native-notify-kit"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/DisplayNotification.ts b/packages/jsActions/mobile-resources-native/src/notifications/DisplayNotification.ts index 0d4093870..39c40ed69 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/DisplayNotification.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/DisplayNotification.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { NativeModules, Platform } from "react-native"; import notifee, { AndroidChannel, AndroidImportance, Notification } from "react-native-notify-kit"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/GetPushNotificationToken.ts b/packages/jsActions/mobile-resources-native/src/notifications/GetPushNotificationToken.ts index 080a412d1..a395b5e3b 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/GetPushNotificationToken.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/GetPushNotificationToken.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { NativeModules } from "react-native"; import messaging from "@react-native-firebase/messaging"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/HasNotificationPermission.ts b/packages/jsActions/mobile-resources-native/src/notifications/HasNotificationPermission.ts index ab2a304ba..d1598b170 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/HasNotificationPermission.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/HasNotificationPermission.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { NativeModules } from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/notifications/RequestNotificationPermission.ts b/packages/jsActions/mobile-resources-native/src/notifications/RequestNotificationPermission.ts index f452dfe37..36fddaa9c 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/RequestNotificationPermission.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/RequestNotificationPermission.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { NativeModules, PermissionsAndroid, Platform } from "react-native"; import messaging from "@react-native-firebase/messaging"; diff --git a/packages/jsActions/mobile-resources-native/src/notifications/ScheduleNotification.ts b/packages/jsActions/mobile-resources-native/src/notifications/ScheduleNotification.ts index f27aa1210..7a3620770 100644 --- a/packages/jsActions/mobile-resources-native/src/notifications/ScheduleNotification.ts +++ b/packages/jsActions/mobile-resources-native/src/notifications/ScheduleNotification.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Platform } from "react-native"; import notifee, { TimestampTrigger, diff --git a/packages/jsActions/mobile-resources-native/src/permissions/CheckGenericPermission.ts b/packages/jsActions/mobile-resources-native/src/permissions/CheckGenericPermission.ts index aead5c053..2fca380aa 100644 --- a/packages/jsActions/mobile-resources-native/src/permissions/CheckGenericPermission.ts +++ b/packages/jsActions/mobile-resources-native/src/permissions/CheckGenericPermission.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Platform, NativeModules } from "react-native"; import { check, Permission, PERMISSIONS as RNPermissions } from "react-native-permissions"; import { ANDROIDPermissionName, IOSPermissionName } from "../../typings/RequestGenericPermission"; diff --git a/packages/jsActions/mobile-resources-native/src/permissions/RequestGenericPermission.ts b/packages/jsActions/mobile-resources-native/src/permissions/RequestGenericPermission.ts index b2f692445..e6fb1f165 100644 --- a/packages/jsActions/mobile-resources-native/src/permissions/RequestGenericPermission.ts +++ b/packages/jsActions/mobile-resources-native/src/permissions/RequestGenericPermission.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Alert, Platform, NativeModules } from "react-native"; import { check, diff --git a/packages/jsActions/mobile-resources-native/src/platform/ChangeStatusBar.ts b/packages/jsActions/mobile-resources-native/src/platform/ChangeStatusBar.ts index 8de8da113..d40cc977d 100644 --- a/packages/jsActions/mobile-resources-native/src/platform/ChangeStatusBar.ts +++ b/packages/jsActions/mobile-resources-native/src/platform/ChangeStatusBar.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Platform, StatusBar, StatusBarAnimation, StatusBarStyle } from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/platform/HideKeyboard.ts b/packages/jsActions/mobile-resources-native/src/platform/HideKeyboard.ts index 7ad616f94..5c0223d01 100644 --- a/packages/jsActions/mobile-resources-native/src/platform/HideKeyboard.ts +++ b/packages/jsActions/mobile-resources-native/src/platform/HideKeyboard.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Keyboard } from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/platform/OpenInAppBrowser.ts b/packages/jsActions/mobile-resources-native/src/platform/OpenInAppBrowser.ts index 8aea05b2c..cb0d3f5b3 100644 --- a/packages/jsActions/mobile-resources-native/src/platform/OpenInAppBrowser.ts +++ b/packages/jsActions/mobile-resources-native/src/platform/OpenInAppBrowser.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { openBrowser } from "@swan-io/react-native-browser"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/mobile-resources-native/src/platform/PlaySound.ts b/packages/jsActions/mobile-resources-native/src/platform/PlaySound.ts index 5ca049b9e..3aa2be40e 100644 --- a/packages/jsActions/mobile-resources-native/src/platform/PlaySound.ts +++ b/packages/jsActions/mobile-resources-native/src/platform/PlaySound.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import Sound from "react-native-sound"; import RNBlobUtil from "react-native-blob-util"; import { Platform } from "react-native"; diff --git a/packages/jsActions/nanoflow-actions-native/src/client/DownloadWebFile.ts b/packages/jsActions/nanoflow-actions-native/src/client/DownloadWebFile.ts index 77fc0aaf2..c6dcef98c 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/DownloadWebFile.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/DownloadWebFile.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/GetRemoteUrl.ts b/packages/jsActions/nanoflow-actions-native/src/client/GetRemoteUrl.ts index aa90fbd1d..1c1ae7a9e 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/GetRemoteUrl.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/GetRemoteUrl.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/IsConnectedToServer.ts b/packages/jsActions/nanoflow-actions-native/src/client/IsConnectedToServer.ts index 17df42e10..557981f6e 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/IsConnectedToServer.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/IsConnectedToServer.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/RefreshEntity.ts b/packages/jsActions/nanoflow-actions-native/src/client/RefreshEntity.ts index 648406d5e..6c02a6c41 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/RefreshEntity.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/RefreshEntity.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/RefreshObject.ts b/packages/jsActions/nanoflow-actions-native/src/client/RefreshObject.ts index 388b0d432..dce64f130 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/RefreshObject.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/RefreshObject.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/Reload.ts b/packages/jsActions/nanoflow-actions-native/src/client/Reload.ts index 11a098f22..1b3d55071 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/Reload.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/Reload.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/ShowConfirmation.ts b/packages/jsActions/nanoflow-actions-native/src/client/ShowConfirmation.ts index ec008c01c..8b883dde6 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/ShowConfirmation.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/ShowConfirmation.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/SignOut.ts b/packages/jsActions/nanoflow-actions-native/src/client/SignOut.ts index f756cfcec..5a4e2c340 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/SignOut.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/SignOut.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/client/ToggleSidebar.ts b/packages/jsActions/nanoflow-actions-native/src/client/ToggleSidebar.ts index 12d5709e2..ae2c474da 100644 --- a/packages/jsActions/nanoflow-actions-native/src/client/ToggleSidebar.ts +++ b/packages/jsActions/nanoflow-actions-native/src/client/ToggleSidebar.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/CallPhoneNumber.ts b/packages/jsActions/nanoflow-actions-native/src/external/CallPhoneNumber.ts index db6c43ad2..f305bc7db 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/CallPhoneNumber.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/CallPhoneNumber.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/DraftEmail.ts b/packages/jsActions/nanoflow-actions-native/src/external/DraftEmail.ts index f87ae87a1..3d106e812 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/DraftEmail.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/DraftEmail.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/NavigateTo.ts b/packages/jsActions/nanoflow-actions-native/src/external/NavigateTo.ts index 2a717538e..d85978a23 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/NavigateTo.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/NavigateTo.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/OpenMap.ts b/packages/jsActions/nanoflow-actions-native/src/external/OpenMap.ts index 9aa3f2e9a..ff637725b 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/OpenMap.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/OpenMap.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/OpenURL.ts b/packages/jsActions/nanoflow-actions-native/src/external/OpenURL.ts index 2210dbe68..c121d7807 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/OpenURL.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/OpenURL.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/SendTextMessage.ts b/packages/jsActions/nanoflow-actions-native/src/external/SendTextMessage.ts index 2ce2b4da9..ab6549514 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/SendTextMessage.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/SendTextMessage.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/external/Share.ts b/packages/jsActions/nanoflow-actions-native/src/external/Share.ts index a13f5e0f3..8d6b88125 100644 --- a/packages/jsActions/nanoflow-actions-native/src/external/Share.ts +++ b/packages/jsActions/nanoflow-actions-native/src/external/Share.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import ReactNative from "react-native"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/Geocode.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/Geocode.ts index 4bf860d8f..8b4a93a36 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/Geocode.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/Geocode.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import Geodecoder from "react-native-geocoder"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts index 6974922b1..165ca4491 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/RequestLocationPermission.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/RequestLocationPermission.ts index 8f86fcaaf..b9a253b19 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/RequestLocationPermission.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/RequestLocationPermission.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { check, request, PERMISSIONS, RESULTS, openSettings } from "react-native-permissions"; import { Platform, Alert, ToastAndroid } from "react-native"; diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/ReverseGeocode.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/ReverseGeocode.ts index 4761185f0..1b6a25d9f 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/ReverseGeocode.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/ReverseGeocode.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import Geodecoder from "react-native-geocoder"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearCachedSessionData.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearCachedSessionData.ts index f47959db2..01d92750a 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearCachedSessionData.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearCachedSessionData.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearLocalStorage.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearLocalStorage.ts index 813e12f5d..96ccc9d75 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearLocalStorage.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/ClearLocalStorage.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObject.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObject.ts index c6bd76b28..7f312b69e 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObject.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObject.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; import { StorageValue } from "../../typings/StorageValue"; diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObjectList.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObjectList.ts index a2ff80b17..16ed41d9d 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObjectList.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObjectList.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; import { StorageValue } from "../../typings/StorageValue"; diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemString.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemString.ts index 5547295cb..96770145a 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemString.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemString.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/RemoveStorageItem.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/RemoveStorageItem.ts index e86163d37..e956db73a 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/RemoveStorageItem.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/RemoveStorageItem.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObject.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObject.ts index 2a03d7b75..cbc571d8d 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObject.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObject.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; import { StorageValue } from "../../typings/StorageValue"; diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObjectList.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObjectList.ts index 22af0a184..2de47af2b 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObjectList.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemObjectList.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; import { StorageValue } from "../../typings/StorageValue"; diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemString.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemString.ts index bdbc509b8..0f5582988 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemString.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/SetStorageItemString.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/local-storage/StorageItemExists.ts b/packages/jsActions/nanoflow-actions-native/src/local-storage/StorageItemExists.ts index bc251bf2d..9f00e1d2b 100644 --- a/packages/jsActions/nanoflow-actions-native/src/local-storage/StorageItemExists.ts +++ b/packages/jsActions/nanoflow-actions-native/src/local-storage/StorageItemExists.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import AsyncStorage from "@react-native-async-storage/async-storage"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/Base64Decode.ts b/packages/jsActions/nanoflow-actions-native/src/other/Base64Decode.ts index e0e37437f..4012998bb 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/Base64Decode.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/Base64Decode.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Base64 } from "js-base64"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/Base64DecodeToImage.ts b/packages/jsActions/nanoflow-actions-native/src/other/Base64DecodeToImage.ts index d32446db5..8a8f5c4cf 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/Base64DecodeToImage.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/Base64DecodeToImage.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Base64 } from "js-base64"; import RNBlobUtil from "react-native-blob-util"; import { NativeModules } from "react-native"; diff --git a/packages/jsActions/nanoflow-actions-native/src/other/Base64Encode.ts b/packages/jsActions/nanoflow-actions-native/src/other/Base64Encode.ts index 5acecef5c..1d9e3da56 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/Base64Encode.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/Base64Encode.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; import { Base64 } from "js-base64"; // BEGIN EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/FindObjectWithGUID.ts b/packages/jsActions/nanoflow-actions-native/src/other/FindObjectWithGUID.ts index 067562468..8c97c3172 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/FindObjectWithGUID.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/FindObjectWithGUID.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/GenerateUniqueID.ts b/packages/jsActions/nanoflow-actions-native/src/other/GenerateUniqueID.ts index 15ff2e35d..073015fbb 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/GenerateUniqueID.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/GenerateUniqueID.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE const COUNTER_STORE = "idCounter"; diff --git a/packages/jsActions/nanoflow-actions-native/src/other/GetGuid.ts b/packages/jsActions/nanoflow-actions-native/src/other/GetGuid.ts index b00a6c2bb..b445104a8 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/GetGuid.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/GetGuid.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/GetObjectByGuid.ts b/packages/jsActions/nanoflow-actions-native/src/other/GetObjectByGuid.ts index 1022932fb..e83cf6115 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/GetObjectByGuid.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/GetObjectByGuid.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE diff --git a/packages/jsActions/nanoflow-actions-native/src/other/GetPlatform.ts b/packages/jsActions/nanoflow-actions-native/src/other/GetPlatform.ts index 5af8e28c1..13a736f06 100644 --- a/packages/jsActions/nanoflow-actions-native/src/other/GetPlatform.ts +++ b/packages/jsActions/nanoflow-actions-native/src/other/GetPlatform.ts @@ -5,7 +5,6 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. -import { Big } from "big.js"; // BEGIN EXTRA CODE // END EXTRA CODE From f32a6dfac20cd0e96bd3e6fe474ed690f909b7d2 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Tue, 11 Aug 2026 12:01:42 +0530 Subject: [PATCH 05/11] fix: bigjs import --- .../src/geolocation/GetStraightLineDistance.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts index 165ca4491..6974922b1 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts @@ -5,6 +5,7 @@ // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. +import { Big } from "big.js"; // BEGIN EXTRA CODE From 04598c9f24f693d5c5831ef52fbcad9e68246792 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Tue, 11 Aug 2026 16:34:38 +0530 Subject: [PATCH 06/11] fix: rollup --- configs/jsactions/rollup.config.mjs | 33 ++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/configs/jsactions/rollup.config.mjs b/configs/jsactions/rollup.config.mjs index 126aa56e0..426adbeed 100644 --- a/configs/jsactions/rollup.config.mjs +++ b/configs/jsactions/rollup.config.mjs @@ -78,7 +78,18 @@ export default async args => { code = header + code; - // 4. Fix export pattern: async function Name { } export { Name }; + // 4. Add missing // BEGIN EXTRA CODE if // END EXTRA CODE exists without a BEGIN + if (code.includes('// END EXTRA CODE') && !code.includes('// BEGIN EXTRA CODE')) { + // Find last import line, add BEGIN EXTRA CODE after it + code = code.replace(/(^import .+$)/m, '$1\n\n// BEGIN EXTRA CODE'); + } + + // 5. If no EXTRA CODE markers at all, add empty block after imports + if (!code.includes('// BEGIN EXTRA CODE') && !code.includes('// END EXTRA CODE')) { + code = code.replace(/(^import .+$)(\r?\n)+(?=\/?\*\*|export)/m, '$1\n\n// BEGIN EXTRA CODE\n// END EXTRA CODE\n\n'); + } + + // 6. Fix export pattern: async function Name { } export { Name }; // → export async function Name { } const exportMatch = code.match(/export\s*\{\s*(\w+)\s*\};?\s*$/m); if (exportMatch) { @@ -88,6 +99,26 @@ export default async args => { code = code.replace(/\nexport\s*\{\s*\w+\s*\};?\s*$/m, ""); } + // 7. Fix USER CODE marker indentation: Studio Pro uses tabs inside functions + // Match any whitespace before the markers and replace with single tab + code = code.replace(/^[ \t]+(\/\/ BEGIN USER CODE)/gm, "\t$1"); + code = code.replace(/^[ \t]+(\/\/ END USER CODE)/gm, "\t$1"); + + // 8. Ensure blank line before // BEGIN EXTRA CODE + code = code.replace(/([^\r\n])\r?\n(\/\/ BEGIN EXTRA CODE)/g, "$1\r\n\r\n$2"); + + // 9. Ensure blank line after // END EXTRA CODE + code = code.replace(/(\/\/ END EXTRA CODE)\r?\n([^\r\n])/g, "$1\r\n\r\n$2"); + + // 10. Normalize JSDoc formatting to match Studio Pro + // - Empty JSDoc lines: ` *` (one space before asterisk, nothing after) + // - Lines with text: ` * text` (one space before, one space after asterisk) + code = code.replace(/^[ \t]+\*[ \t]+$/gm, " *"); // Empty JSDoc lines: remove trailing whitespace + code = code.replace(/^[ \t]+\*[ \t]+(.+)$/gm, " * $1"); // JSDoc with text: normalize to 1 space before and after asterisk + + // 11. Normalize all line endings to CRLF (Studio Pro expects \r\n everywhere) + code = code.replace(/\r?\n/g, "\r\n"); + chunk.code = code; } } From 16244a6ff90619484c25baf987b84c3ea2fdb11d Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Wed, 12 Aug 2026 12:02:06 +0530 Subject: [PATCH 07/11] fix: try updating buildmpk --- .github/workflows/BuildMpk.yml | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/BuildMpk.yml b/.github/workflows/BuildMpk.yml index 2447295a0..d641a97d5 100644 --- a/.github/workflows/BuildMpk.yml +++ b/.github/workflows/BuildMpk.yml @@ -55,6 +55,51 @@ jobs: MODULE: ${{ inputs.module }} VERSION: ${{ steps.bump_version.outputs.VERSION }} + - name: "TEST: Capture JS actions before mxbuild regeneration" + run: | + TEST_FILE="tmp/${{ inputs.module }}/javascriptsource/nanoflowcommons/actions/Geocode.js" + if [ -f "$TEST_FILE" ]; then + echo "Capturing $TEST_FILE before mxbuild regeneration" + cp "$TEST_FILE" "$TEST_FILE.before" + head -30 "$TEST_FILE" > before.txt + else + echo "Test file not found at $TEST_FILE" + ls -la tmp/${{ inputs.module }}/javascriptsource/*/actions/ || true + fi + + - name: "TEST: Run mxbuild to trigger JS action regeneration" + run: | + cd tmp/${{ inputs.module }} + MPR_FILE=$(ls *.mpr | head -1) + MENDIX_VERSION=$(grep -o '"mendixVersion": *"[^"]*"' ../../packages/jsActions/${{ inputs.module }}/package.json | grep -o '[0-9]*\.[0-9]*\.[0-9]*') + echo "Running mxbuild $MENDIX_VERSION on $MPR_FILE to regenerate JS actions..." + docker run -t -v "$(pwd):/source" --rm mxbuild:$MENDIX_VERSION bash -c "mxbuild --target=package /source/$MPR_FILE" || echo "mxbuild failed, but continuing..." + + - name: "TEST: Compare JS actions after mxbuild" + run: | + TEST_FILE="tmp/${{ inputs.module }}/javascriptsource/nanoflowcommons/actions/Geocode.js" + if [ -f "$TEST_FILE" ]; then + echo "=== BEFORE mxbuild (first 30 lines) ===" > comparison.txt + cat before.txt >> comparison.txt + echo "" >> comparison.txt + echo "=== AFTER mxbuild (first 30 lines) ===" >> comparison.txt + head -30 "$TEST_FILE" >> comparison.txt + echo "" >> comparison.txt + echo "=== DIFF ===" >> comparison.txt + diff "$TEST_FILE.before" "$TEST_FILE" >> comparison.txt || echo "Files differ!" >> comparison.txt + cat comparison.txt + fi + + - name: "TEST: Upload comparison results" + if: always() + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7 + with: + name: mxbuild-regeneration-test-${{ inputs.module }} + path: | + comparison.txt + before.txt + if-no-files-found: warn + - name: "Upload MPK artifact" uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7 with: From dffc89c81a64921d0c569320370c0e027c1437bb Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Wed, 12 Aug 2026 14:27:31 +0530 Subject: [PATCH 08/11] fix: mpk build step --- .github/workflows/BuildMpk.yml | 45 -------------------- scripts/release/module-automation/commons.js | 7 ++- 2 files changed, 5 insertions(+), 47 deletions(-) diff --git a/.github/workflows/BuildMpk.yml b/.github/workflows/BuildMpk.yml index d641a97d5..2447295a0 100644 --- a/.github/workflows/BuildMpk.yml +++ b/.github/workflows/BuildMpk.yml @@ -55,51 +55,6 @@ jobs: MODULE: ${{ inputs.module }} VERSION: ${{ steps.bump_version.outputs.VERSION }} - - name: "TEST: Capture JS actions before mxbuild regeneration" - run: | - TEST_FILE="tmp/${{ inputs.module }}/javascriptsource/nanoflowcommons/actions/Geocode.js" - if [ -f "$TEST_FILE" ]; then - echo "Capturing $TEST_FILE before mxbuild regeneration" - cp "$TEST_FILE" "$TEST_FILE.before" - head -30 "$TEST_FILE" > before.txt - else - echo "Test file not found at $TEST_FILE" - ls -la tmp/${{ inputs.module }}/javascriptsource/*/actions/ || true - fi - - - name: "TEST: Run mxbuild to trigger JS action regeneration" - run: | - cd tmp/${{ inputs.module }} - MPR_FILE=$(ls *.mpr | head -1) - MENDIX_VERSION=$(grep -o '"mendixVersion": *"[^"]*"' ../../packages/jsActions/${{ inputs.module }}/package.json | grep -o '[0-9]*\.[0-9]*\.[0-9]*') - echo "Running mxbuild $MENDIX_VERSION on $MPR_FILE to regenerate JS actions..." - docker run -t -v "$(pwd):/source" --rm mxbuild:$MENDIX_VERSION bash -c "mxbuild --target=package /source/$MPR_FILE" || echo "mxbuild failed, but continuing..." - - - name: "TEST: Compare JS actions after mxbuild" - run: | - TEST_FILE="tmp/${{ inputs.module }}/javascriptsource/nanoflowcommons/actions/Geocode.js" - if [ -f "$TEST_FILE" ]; then - echo "=== BEFORE mxbuild (first 30 lines) ===" > comparison.txt - cat before.txt >> comparison.txt - echo "" >> comparison.txt - echo "=== AFTER mxbuild (first 30 lines) ===" >> comparison.txt - head -30 "$TEST_FILE" >> comparison.txt - echo "" >> comparison.txt - echo "=== DIFF ===" >> comparison.txt - diff "$TEST_FILE.before" "$TEST_FILE" >> comparison.txt || echo "Files differ!" >> comparison.txt - cat comparison.txt - fi - - - name: "TEST: Upload comparison results" - if: always() - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7 - with: - name: mxbuild-regeneration-test-${{ inputs.module }} - path: | - comparison.txt - before.txt - if-no-files-found: warn - - name: "Upload MPK artifact" uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7 with: diff --git a/scripts/release/module-automation/commons.js b/scripts/release/module-automation/commons.js index fe3eac13b..313aedf95 100644 --- a/scripts/release/module-automation/commons.js +++ b/scripts/release/module-automation/commons.js @@ -78,11 +78,14 @@ async function createModuleMpkInDocker(sourceDir, moduleName, mendixVersion, exc ); } - // Build testProject via mxbuild + // Build testProject and regenerate JS actions + // 1. mx update-widgets: Updates widget files + // 2. mxbuild --target=package: Regenerates JS action files in Studio Pro format (prevents phantom diffs) + // 3. mx create-module-package: Packages the module with the regenerated files const projectFile = basename((await getFiles(sourceDir, [`.mpr`]))[0]); await execShellCommand( `docker run -t -v ${sourceDir}:/source ` + - `--rm mxbuild:${mendixVersion} bash -c "mx update-widgets --loose-version-check /source/${projectFile} && dotnet /tmp/mxbuild/modeler/mx.dll create-module-package ${ + `--rm mxbuild:${mendixVersion} bash -c "mx update-widgets --loose-version-check /source/${projectFile} && mxbuild --target=package /source/${projectFile} && dotnet /tmp/mxbuild/modeler/mx.dll create-module-package ${ excludeFilesRegExp ? `--exclude-files='${excludeFilesRegExp}'` : "" } /source/${projectFile} ${moduleName}"` ); From 9263068fea40ed93a8701342b982cacf1c0cf709 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Wed, 12 Aug 2026 16:13:25 +0530 Subject: [PATCH 09/11] fix: java version --- scripts/automation/mxbuild.Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/automation/mxbuild.Dockerfile b/scripts/automation/mxbuild.Dockerfile index 49d751b81..820e6dd1d 100644 --- a/scripts/automation/mxbuild.Dockerfile +++ b/scripts/automation/mxbuild.Dockerfile @@ -2,12 +2,14 @@ FROM mcr.microsoft.com/dotnet/runtime:8.0 ARG MENDIX_VERSION RUN \ - echo "Installing Java..." && \ + echo "Installing Java 21..." && \ apt-get -qq update && \ apt-get -qq install -y wget libgdiplus && \ - wget -q https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz -O /tmp/openjdk.tar.gz && \ - mkdir /usr/lib/jvm && \ + wget -q https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz -O /tmp/openjdk.tar.gz && \ + mkdir -p /usr/lib/jvm && \ tar xfz /tmp/openjdk.tar.gz --directory /usr/lib/jvm && \ + ls /usr/lib/jvm && \ + mv /usr/lib/jvm/jdk-21* /usr/lib/jvm/java-21-openjdk && \ rm /tmp/openjdk.tar.gz RUN \ echo "Downloading mxbuild ${MENDIX_VERSION}..." && \ @@ -20,9 +22,11 @@ RUN \ apt-get clean RUN \ echo "#!/bin/bash -x" >/bin/mxbuild && \ - echo "dotnet /tmp/mxbuild/modeler/mxbuild.dll --java-home=/usr/lib/jvm/jdk-11.0.2 --java-exe-path=/usr/lib/jvm/jdk-11.0.2/bin/java \$@" >>/bin/mxbuild && \ + echo "dotnet /tmp/mxbuild/modeler/mxbuild.dll --java-home=/usr/lib/jvm/java-21-openjdk --java-exe-path=/usr/lib/jvm/java-21-openjdk/bin/java \$@" >>/bin/mxbuild && \ chmod +x /bin/mxbuild RUN \ echo "#!/bin/bash -x" >/bin/mx && \ echo "dotnet /tmp/mxbuild/modeler/mx.dll \$@" >>/bin/mx && \ - chmod +x /bin/mx \ No newline at end of file + chmod +x /bin/mx + +ENV M2EE_TOOLS_JAR=/tmp/mxbuild/modeler/tools/m2ee-tools.jar \ No newline at end of file From 0c73e49d1f364fb8e77483a7342677ce1cb7c1d5 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Wed, 12 Aug 2026 17:56:40 +0530 Subject: [PATCH 10/11] fix: rollup --- configs/jsactions/rollup.config.mjs | 86 ----------------------------- 1 file changed, 86 deletions(-) diff --git a/configs/jsactions/rollup.config.mjs b/configs/jsactions/rollup.config.mjs index 426adbeed..7d26a3c19 100644 --- a/configs/jsactions/rollup.config.mjs +++ b/configs/jsactions/rollup.config.mjs @@ -39,91 +39,6 @@ export default async args => { const copyAsync = promisify(copy); - // Inline plugin to prepare JS actions for Studio Pro format - const studioProFormatPlugin = { - name: "studio-pro-format", - generateBundle(options, bundle) { - for (const [fileName, chunk] of Object.entries(bundle)) { - if (chunk.type !== "chunk" || !fileName.endsWith(".js")) continue; - - let code = chunk.code; - - // 1. Check if header exists and remove it (we'll add it back at line 1) - const hasHeader = code.includes("// This file was generated by Mendix Studio Pro."); - if (hasHeader) { - // Remove existing header (7 lines) - code = code.replace( - /^\/\/ This file was generated by Mendix Studio Pro\.\r?\n\/\/\r?\n\/\/ WARNING: Only the following code will be retained when actions are regenerated:\r?\n\/\/ - the import list\r?\n\/\/ - the code between BEGIN USER CODE and END USER CODE\r?\n\/\/ - the code between BEGIN EXTRA CODE and END EXTRA CODE\r?\n\/\/ Other code you write will be lost the next time you deploy the project\.\r?\n/m, - "" - ); - } - - // 2. Remove Big import (will add back at line 8 with header) - const hasBigImport = code.match(/^import\s*\{\s*Big\s*\}\s*from\s*["']big\.js["'];?\s*$/m); - if (hasBigImport) { - code = code.replace(/^import\s*\{\s*Big\s*\}\s*from\s*["']big\.js["'];?\s*\r?\n/m, ""); - } - - // 3. Add header at line 1 + Big import at line 8 - const header = [ - "// This file was generated by Mendix Studio Pro.", - "//", - "// WARNING: Only the following code will be retained when actions are regenerated:", - "// - the import list", - "// - the code between BEGIN USER CODE and END USER CODE", - "// - the code between BEGIN EXTRA CODE and END EXTRA CODE", - "// Other code you write will be lost the next time you deploy the project.", - 'import { Big } from "big.js";' - ].join("\r\n") + "\r\n"; - - code = header + code; - - // 4. Add missing // BEGIN EXTRA CODE if // END EXTRA CODE exists without a BEGIN - if (code.includes('// END EXTRA CODE') && !code.includes('// BEGIN EXTRA CODE')) { - // Find last import line, add BEGIN EXTRA CODE after it - code = code.replace(/(^import .+$)/m, '$1\n\n// BEGIN EXTRA CODE'); - } - - // 5. If no EXTRA CODE markers at all, add empty block after imports - if (!code.includes('// BEGIN EXTRA CODE') && !code.includes('// END EXTRA CODE')) { - code = code.replace(/(^import .+$)(\r?\n)+(?=\/?\*\*|export)/m, '$1\n\n// BEGIN EXTRA CODE\n// END EXTRA CODE\n\n'); - } - - // 6. Fix export pattern: async function Name { } export { Name }; - // → export async function Name { } - const exportMatch = code.match(/export\s*\{\s*(\w+)\s*\};?\s*$/m); - if (exportMatch) { - const functionName = exportMatch[1]; - const funcPattern = new RegExp(`^(async\\s+function\\s+${functionName}\\s*\\()`, "m"); - code = code.replace(funcPattern, "export $1"); - code = code.replace(/\nexport\s*\{\s*\w+\s*\};?\s*$/m, ""); - } - - // 7. Fix USER CODE marker indentation: Studio Pro uses tabs inside functions - // Match any whitespace before the markers and replace with single tab - code = code.replace(/^[ \t]+(\/\/ BEGIN USER CODE)/gm, "\t$1"); - code = code.replace(/^[ \t]+(\/\/ END USER CODE)/gm, "\t$1"); - - // 8. Ensure blank line before // BEGIN EXTRA CODE - code = code.replace(/([^\r\n])\r?\n(\/\/ BEGIN EXTRA CODE)/g, "$1\r\n\r\n$2"); - - // 9. Ensure blank line after // END EXTRA CODE - code = code.replace(/(\/\/ END EXTRA CODE)\r?\n([^\r\n])/g, "$1\r\n\r\n$2"); - - // 10. Normalize JSDoc formatting to match Studio Pro - // - Empty JSDoc lines: ` *` (one space before asterisk, nothing after) - // - Lines with text: ` * text` (one space before, one space after asterisk) - code = code.replace(/^[ \t]+\*[ \t]+$/gm, " *"); // Empty JSDoc lines: remove trailing whitespace - code = code.replace(/^[ \t]+\*[ \t]+(.+)$/gm, " * $1"); // JSDoc with text: normalize to 1 space before and after asterisk - - // 11. Normalize all line endings to CRLF (Studio Pro expects \r\n everywhere) - code = code.replace(/\r?\n/g, "\r\n"); - - chunk.code = code; - } - } - }; - files.forEach((file, i) => { const fileInput = relative(cwd, file); const fileOutput = basename(file, ".ts"); @@ -159,7 +74,6 @@ export default async args => { }), nodeResolvePlugin, typescriptPlugin, - studioProFormatPlugin, i === files.length - 1 ? command([ async () => copyLicenseFile(cwd, outDir), From 42027572e482a887e1b1ccc450fffe8fae2da111 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Wed, 12 Aug 2026 18:24:01 +0530 Subject: [PATCH 11/11] fix: big js import replacer --- configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs | 3 ++- configs/jsactions/rollup.config.mjs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs b/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs index 206a7bca6..c8d89eac7 100644 --- a/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs +++ b/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs @@ -5,7 +5,8 @@ export function bigJsImportReplacer() { const [filename] = Object.keys(bundle); const fileInfo = bundle[filename]; - fileInfo.code = fileInfo.code.replace("import { Big } from 'big.js';", `import { Big } from "big.js";`); + // Remove Big import entirely - mxbuild will add it in the header at line 8 + fileInfo.code = fileInfo.code.replace(/^import\s*\{\s*Big\s*\}\s*from\s*['"]big\.js['"];?\s*\r?\n/m, ""); } }; } diff --git a/configs/jsactions/rollup.config.mjs b/configs/jsactions/rollup.config.mjs index 7d26a3c19..d8691fac1 100644 --- a/configs/jsactions/rollup.config.mjs +++ b/configs/jsactions/rollup.config.mjs @@ -13,6 +13,7 @@ import { nodeResolve } from "@rollup/plugin-node-resolve"; import typescript from "@rollup/plugin-typescript"; import { collectDependencies, copyJsModule } from "./rollup-plugin-collect-dependencies.mjs"; import { licenseCustomTemplate, copyLicenseFile } from "./rollup-helper.mjs"; +import { bigJsImportReplacer } from "./rollup-plugin-bigjs-import-replacer.mjs"; const cwd = process.cwd(); @@ -74,6 +75,7 @@ export default async args => { }), nodeResolvePlugin, typescriptPlugin, + bigJsImportReplacer(), i === files.length - 1 ? command([ async () => copyLicenseFile(cwd, outDir),