@ubox-tools/deploy-xperience 1.1.14 → 1.1.16

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.
Files changed (2) hide show
  1. package/deploy.js +9 -4
  2. package/package.json +1 -1
package/deploy.js CHANGED
@@ -608,9 +608,6 @@ async function configureParameters(page, params) {
608
608
 
609
609
  console.log(` [params] Creating ${toCreate.length} new parameter(s) (${existingKeys.length} already exist)...`);
610
610
 
611
- // Accept any confirm() dialogs that Save triggers
612
- page.on('dialog', async d => { await d.accept(); });
613
-
614
611
  await clickByText(page, 'Edit', 'button');
615
612
  await sleep(1000);
616
613
 
@@ -689,8 +686,10 @@ async function injectSource(page, proxy) {
689
686
  await sleep(500);
690
687
  }
691
688
 
689
+ const navPromise = page.waitForNavigation({ waitUntil: 'networkidle2', timeout: 15000 }).catch(() => null);
692
690
  await clickByText(page, 'Save and back to app');
693
- await sleep(3000);
691
+ await navPromise;
692
+ await sleep(1000);
694
693
  }
695
694
 
696
695
  async function deployApp(page, appName, projectName, { noAssets = false, noSource = false } = {}) {
@@ -1133,6 +1132,12 @@ async function main() {
1133
1132
  const state = {};
1134
1133
 
1135
1134
  try {
1135
+ // Always accept any confirm() dialogs the studio may show during deployment
1136
+ page.on('dialog', async d => {
1137
+ console.log(` [dialog] type=${d.type()} msg="${d.message()}" → accepted`);
1138
+ await d.accept();
1139
+ });
1140
+
1136
1141
  // Phase 1 — Login
1137
1142
  await login(page, email, password);
1138
1143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubox-tools/deploy-xperience",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "Deploy a Ubox experience to studio.ubox.world",
5
5
  "bin": { "deploy-xperience": "./deploy.js" },
6
6
  "dependencies": { "puppeteer": "*" },