codeplay-common 4.5.5 → 4.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -194,12 +194,16 @@ function applyFlowchartStoreApi(storeId) {
194
194
  if (String(_appUniqueId) !== String(FLOWCHART_API_APP_ID) || !flowchartSharedOriginal) return false;
195
195
  const apiBase = String(storeId) === '1' ? FLOWCHART_PLAY_API_BASE : FLOWCHART_OTHER_STORE_API_BASE;
196
196
  const accessHash = String(storeId) === '1' ? '' : FLOWCHART_OTHER_STORE_API_HASH;
197
- const updated = flowchartSharedOriginal
198
- .replace(/const FLOWCHART_API_BASE = "[^"]*";/, `const FLOWCHART_API_BASE = "${apiBase}";`)
199
- .replace(/const FLOWCHART_API_ACCESS_HASH = "[^"]*";/, `const FLOWCHART_API_ACCESS_HASH = "${accessHash}";`);
200
- if (updated === flowchartSharedOriginal) {
197
+ const apiBaseMarker = /const FLOWCHART_API_BASE = "[^"]*";/;
198
+ const accessHashMarker = /const FLOWCHART_API_ACCESS_HASH = "[^"]*";/;
199
+
200
+ if (!apiBaseMarker.test(flowchartSharedOriginal) || !accessHashMarker.test(flowchartSharedOriginal)) {
201
201
  throw new Error(`Flowchart API configuration markers were not found in ${FLOWCHART_SHARED_PATH}.`);
202
202
  }
203
+
204
+ const updated = flowchartSharedOriginal
205
+ .replace(apiBaseMarker, `const FLOWCHART_API_BASE = "${apiBase}";`)
206
+ .replace(accessHashMarker, `const FLOWCHART_API_ACCESS_HASH = "${accessHash}";`);
203
207
  writeFileSync(FLOWCHART_SHARED_PATH, updated, 'utf8');
204
208
  console.log(`✅ App 228 API endpoint configured for Store ID ${storeId}.`);
205
209
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "4.5.5",
3
+ "version": "4.5.6",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",