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.
- package/files/finalrelease +8 -4
- package/package.json +1 -1
package/files/finalrelease
CHANGED
|
@@ -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
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
if (
|
|
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;
|