cocos2d-cli 1.6.1 → 1.6.2

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Screenshot Core Module
2
+ * Screenshot Core Module
3
3
  * 渲染 JSON 数据并使用 Playwright 截图
4
4
  */
5
5
 
@@ -16,6 +16,7 @@ const DEFAULT_CONFIG = {
16
16
  outputDir: process.cwd(),
17
17
  viewport: { width: 750, height: 1334 },
18
18
  fullPage: true,
19
+ debugBounds: false,
19
20
  timeout: 30000,
20
21
  waitTime: 1000
21
22
  };
@@ -224,7 +225,10 @@ async function takeScreenshot(userConfig = {}) {
224
225
 
225
226
  // 加载页面
226
227
  console.log('\n=== Loading Page ===');
227
- await page.goto(`${serverUrl}/index.html`, {
228
+ const pageUrl = config.debugBounds
229
+ ? `${serverUrl}/index.html?debugBounds=true`
230
+ : `${serverUrl}/index.html`;
231
+ await page.goto(pageUrl, {
228
232
  waitUntil: 'networkidle',
229
233
  timeout: config.timeout
230
234
  });