@iflyrpa/actions 1.2.2 → 1.2.3
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/dist/bundle.js +20 -2
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +20 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -13760,6 +13760,18 @@ var __webpack_exports__ = {};
|
|
|
13760
13760
|
data: page.url()
|
|
13761
13761
|
};
|
|
13762
13762
|
}
|
|
13763
|
+
const interceptUrls = [
|
|
13764
|
+
'/mp/agw/article/publish'
|
|
13765
|
+
];
|
|
13766
|
+
await page.route('**', async (route, request)=>{
|
|
13767
|
+
const url = new URL(request.url());
|
|
13768
|
+
if (interceptUrls.some((pattern)=>url.pathname.includes(pattern))) {
|
|
13769
|
+
url.searchParams.set('aid', '1');
|
|
13770
|
+
await route.continue({
|
|
13771
|
+
url: url.toString()
|
|
13772
|
+
});
|
|
13773
|
+
} else await route.continue();
|
|
13774
|
+
});
|
|
13763
13775
|
const titleInstance = page.locator(".publish-editor-title-wrapper .publish-editor-title textarea");
|
|
13764
13776
|
await titleInstance.click();
|
|
13765
13777
|
await titleInstance.fill(params.title);
|
|
@@ -13825,7 +13837,8 @@ var __webpack_exports__ = {};
|
|
|
13825
13837
|
const adContainer = page.locator(".form-container .edit-cell .edit-label").filter({
|
|
13826
13838
|
hasText: "投放广告"
|
|
13827
13839
|
}).locator("xpath=..");
|
|
13828
|
-
await adContainer.
|
|
13840
|
+
const isAdOptionVisible = await adContainer.isVisible();
|
|
13841
|
+
if (isAdOptionVisible) await adContainer.locator(`label.byte-radio:has(input[value="${getAddTypeValue(params.settingInfo.toutiaoAd)}"])`).click();
|
|
13829
13842
|
if (params.settingInfo.toutiaoOriginal.includes("exclusive")) {
|
|
13830
13843
|
const exclusiveContainer = page.locator(".form-container .edit-cell .edit-label").filter({
|
|
13831
13844
|
hasText: "声明首发"
|
|
@@ -13846,6 +13859,11 @@ var __webpack_exports__ = {};
|
|
|
13846
13859
|
hasText: "预览并发布"
|
|
13847
13860
|
}).click();
|
|
13848
13861
|
});
|
|
13862
|
+
if ('no' == params.settingInfo.toutiaoAd) {
|
|
13863
|
+
await page.waitForTimeout(200);
|
|
13864
|
+
const confirmBtn = page.locator('div.byte-modal-footer button.byte-btn-primary:has-text("确定")');
|
|
13865
|
+
if (await confirmBtn.isVisible()) await confirmBtn.click();
|
|
13866
|
+
}
|
|
13849
13867
|
if ("publish" === params.saveType) {
|
|
13850
13868
|
await page.locator(".publish-footer button").filter({
|
|
13851
13869
|
hasText: "确认发布"
|
|
@@ -15322,7 +15340,7 @@ var __webpack_exports__ = {};
|
|
|
15322
15340
|
return executeAction(xiaohongshuPublish_mock_mockAction, xiaohongshuPublish_rpa_rpaAction)(task, params);
|
|
15323
15341
|
};
|
|
15324
15342
|
var package_namespaceObject = {
|
|
15325
|
-
i8: "1.2.
|
|
15343
|
+
i8: "1.2.2"
|
|
15326
15344
|
};
|
|
15327
15345
|
class Action {
|
|
15328
15346
|
constructor(task){
|