@ubox-tools/deploy-xperience 1.1.13 → 1.1.15
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/README.md +1 -1
- package/deploy.js +6 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ Before injecting source files, `generateProxy()` applies three transforms to eac
|
|
|
110
110
|
|
|
111
111
|
| Transform | Applies to | What it does |
|
|
112
112
|
|---|---|---|
|
|
113
|
-
| Parameter substitution | JS | Replaces `const KEY =
|
|
113
|
+
| Parameter substitution | JS | Replaces `const KEY = "value"` with `const KEY = "{parameter:KEY}"` for every key in `parameters.json` |
|
|
114
114
|
| Asset path substitution | JS, CSS | Replaces `../assets/file.ext` references with `{resources:type/file.ext}` tokens |
|
|
115
115
|
| Emoji escaping | JS | Converts non-ASCII characters to `\uXXXX` Unicode escape sequences |
|
|
116
116
|
| Local tag stripping | HTML | Removes local `<link href>` and `<script src>` tags (CDN URLs are kept) |
|
package/deploy.js
CHANGED
|
@@ -271,12 +271,6 @@ function generateProxy(appName) {
|
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
// 2b. Log substitution results
|
|
275
|
-
if (isJS && Object.keys(params).length > 0) {
|
|
276
|
-
const paramLines = content.split('\n').filter(l => Object.keys(params).some(k => l.includes(k)));
|
|
277
|
-
console.log(` [proxy] ${file}:\n${paramLines.map(l => ' ' + l).join('\n')}`);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
274
|
// 3. Emoji → unicode escapes (JS only)
|
|
281
275
|
if (isJS) content = escapeEmojiInJS(content);
|
|
282
276
|
}
|
|
@@ -614,9 +608,6 @@ async function configureParameters(page, params) {
|
|
|
614
608
|
|
|
615
609
|
console.log(` [params] Creating ${toCreate.length} new parameter(s) (${existingKeys.length} already exist)...`);
|
|
616
610
|
|
|
617
|
-
// Accept any confirm() dialogs that Save triggers
|
|
618
|
-
page.on('dialog', async d => { await d.accept(); });
|
|
619
|
-
|
|
620
611
|
await clickByText(page, 'Edit', 'button');
|
|
621
612
|
await sleep(1000);
|
|
622
613
|
|
|
@@ -725,7 +716,7 @@ async function deployApp(page, appName, projectName, { noAssets = false, noSourc
|
|
|
725
716
|
// Extract app ID from current URL
|
|
726
717
|
const appId = page.url().match(/#\/application(?:-source)?\/(\d+)/)?.[1] || '?';
|
|
727
718
|
console.log(` [app] Done — ID: ${appId}`);
|
|
728
|
-
return appId;
|
|
719
|
+
return { appId, params };
|
|
729
720
|
}
|
|
730
721
|
|
|
731
722
|
// ─── Phase 3: Ubox Deployment ─────────────────────────────────────────────────
|
|
@@ -1139,6 +1130,9 @@ async function main() {
|
|
|
1139
1130
|
const state = {};
|
|
1140
1131
|
|
|
1141
1132
|
try {
|
|
1133
|
+
// Always accept any confirm() dialogs the studio may show during deployment
|
|
1134
|
+
page.on('dialog', async d => { await d.accept(); });
|
|
1135
|
+
|
|
1142
1136
|
// Phase 1 — Login
|
|
1143
1137
|
await login(page, email, password);
|
|
1144
1138
|
|
|
@@ -1146,9 +1140,9 @@ async function main() {
|
|
|
1146
1140
|
const appParamsMap = {};
|
|
1147
1141
|
for (const appName of apps) {
|
|
1148
1142
|
state[appName] = {};
|
|
1149
|
-
const { params } =
|
|
1143
|
+
const { appId, params } = await deployApp(page, appName, projectName, { noAssets, noSource });
|
|
1144
|
+
state[appName].appId = appId;
|
|
1150
1145
|
appParamsMap[appName] = params;
|
|
1151
|
-
state[appName].appId = await deployApp(page, appName, projectName, { noAssets, noSource });
|
|
1152
1146
|
}
|
|
1153
1147
|
|
|
1154
1148
|
// Phase 3 — Deploy Uboxes
|
package/package.json
CHANGED