@iflyrpa/playwright 4.0.9-beta.3 → 4.0.9-beta.5
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/index.cjs +14 -146
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -202
- package/dist/index.js +14 -140
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -10,90 +10,6 @@ import { User } from '@sentry/node';
|
|
|
10
10
|
|
|
11
11
|
export { ActionMethodParams }
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* 脚本包(@iflyrpa/actions)的版本状态
|
|
15
|
-
*/
|
|
16
|
-
export declare interface ActionVersionInfo {
|
|
17
|
-
/** 当前内存中实际生效的版本 */
|
|
18
|
-
current: string;
|
|
19
|
-
/** 随 @iflyrpa/playwright 一起打包的内置版本 */
|
|
20
|
-
bundled: string;
|
|
21
|
-
/** 远端 registry 上对应渠道的最新版本,未查询成功时为 null */
|
|
22
|
-
latest: string | null;
|
|
23
|
-
/** 远端存在更新且尚未生效(current !== latest) */
|
|
24
|
-
hasUpdate: boolean;
|
|
25
|
-
/** 更新已下载并热替换成功,无需重启 */
|
|
26
|
-
applied: boolean;
|
|
27
|
-
/** 本次查询使用的渠道:beta 由 GrowthBook 灰度开关决定 */
|
|
28
|
-
channel: "latest" | "beta";
|
|
29
|
-
/** 更新流程失败时的原因 */
|
|
30
|
-
error?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 比较两个 semver 版本,a 比 b 新返回正数
|
|
35
|
-
*
|
|
36
|
-
* 只覆盖本仓库用到的 `x.y.z` 和 `x.y.z-beta.n` 两种形态,
|
|
37
|
-
* 按 semver 规则 prerelease 小于同版本号的正式版。
|
|
38
|
-
*/
|
|
39
|
-
export declare function compareVersion(a: string, b: string): number;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* 获取最新版本记录
|
|
43
|
-
*
|
|
44
|
-
* @returns 最新的版本记录,无历史记录时返回 null
|
|
45
|
-
*/
|
|
46
|
-
export declare function getLatestVersionRecord(): VersionRecord | null;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 取一组版本记录中的最高价值等级
|
|
50
|
-
*
|
|
51
|
-
* 跨多个版本升级时,应按其中最严格的等级决定更新策略:
|
|
52
|
-
* 只要期间有过一个 LEVEL_2 版本,就必须强制更新重启。
|
|
53
|
-
*
|
|
54
|
-
* @returns 最高等级,records 为空时返回 null
|
|
55
|
-
*/
|
|
56
|
-
export declare function getMaxUpdateLevel(records: VersionRecord[]): UpdateLevel | null;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* 获取版本历史信息
|
|
60
|
-
*
|
|
61
|
-
* 数据来自随包发布的 version-history.json,同步返回,不发起网络请求。
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* import { getVersionHistory } from "@iflyrpa/playwright";
|
|
66
|
-
*
|
|
67
|
-
* const history = getVersionHistory();
|
|
68
|
-
* console.log("当前版本:", history.currentVersion);
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
export declare function getVersionHistory(): VersionHistory;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* 获取指定版本的详细信息
|
|
75
|
-
*
|
|
76
|
-
* @param version - 版本号,如 "4.1.0"
|
|
77
|
-
* @returns 版本记录,版本不存在时返回 null
|
|
78
|
-
*/
|
|
79
|
-
export declare function getVersionRecord(version: string): VersionRecord | null;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* 获取从 fromVersion(不含)到最新版本(含)之间的所有版本记录
|
|
83
|
-
*
|
|
84
|
-
* 三方升级后可用它一次性展示期间累积的全部更新内容。
|
|
85
|
-
* fromVersion 不在历史记录中时(跨度超过保留的 10 个版本),返回全部记录。
|
|
86
|
-
*
|
|
87
|
-
* @param fromVersion - 用户当前所在版本
|
|
88
|
-
*
|
|
89
|
-
* @example
|
|
90
|
-
* ```typescript
|
|
91
|
-
* const notes = getVersionRecordsSince("4.0.8");
|
|
92
|
-
* // 展示 4.0.9 ~ 4.1.0 之间的所有更新说明
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
export declare function getVersionRecordsSince(fromVersion: string): VersionRecord[];
|
|
96
|
-
|
|
97
13
|
declare class Logger extends SentryInstance implements LoggerImplement {
|
|
98
14
|
private stream;
|
|
99
15
|
constructor(taskParams: TaskParams);
|
|
@@ -111,89 +27,15 @@ declare class PackageManager {
|
|
|
111
27
|
private extract;
|
|
112
28
|
require(module: string): any;
|
|
113
29
|
install(name: string, version: string): Promise<void>;
|
|
114
|
-
|
|
115
|
-
* 查询远端指定 dist-tag 的版本号(只读,不下载)
|
|
116
|
-
*
|
|
117
|
-
* distTag 缺失时(比如从未发过 beta)回退到 latest,不阻断更新。
|
|
118
|
-
*/
|
|
119
|
-
getVersionByTag(name: string, distTag?: string): Promise<string>;
|
|
120
|
-
/**
|
|
121
|
-
* 查询远端应当使用的版本号(只读,不下载)
|
|
122
|
-
*
|
|
123
|
-
* beta 渠道取 beta 与 latest 的较大值:beta tag 可能落后于正式版
|
|
124
|
-
* (正式版发布后 beta tag 不会自动前移),此时不应让灰度用户降级。
|
|
125
|
-
*/
|
|
126
|
-
getLatestVersion(name: string, useBeta?: boolean): Promise<string>;
|
|
127
|
-
update(name: string, useBeta?: boolean): Promise<string>;
|
|
30
|
+
update(name: string): Promise<string>;
|
|
128
31
|
}
|
|
129
32
|
|
|
130
33
|
export declare class RpaTask extends Task {
|
|
131
34
|
actions: RpaAction.Action;
|
|
132
35
|
private actionName;
|
|
133
|
-
/** 内置版本,热更新失败时的回退基线 */
|
|
134
|
-
private readonly bundledActionVersion;
|
|
135
|
-
/** 内存中实际生效的版本 */
|
|
136
|
-
private currentActionVersion;
|
|
137
|
-
private latestActionVersion;
|
|
138
|
-
private appliedUpdate;
|
|
139
|
-
private updateChannel;
|
|
140
|
-
private updateError?;
|
|
141
|
-
/** 构造函数触发的更新任务,供 waitForUpdate 复用,避免重复请求 */
|
|
142
|
-
private updateTask;
|
|
143
36
|
constructor(params: TaskParams);
|
|
144
37
|
private registerActions;
|
|
145
|
-
/**
|
|
146
|
-
* 获取当前运行的脚本包(@iflyrpa/actions)版本号
|
|
147
|
-
*
|
|
148
|
-
* 返回内存中实际生效的版本,热更新后会自动切换到新版本。
|
|
149
|
-
* 适用于在脚本执行过程中记录或上报实际使用的脚本版本。
|
|
150
|
-
*/
|
|
151
|
-
getActionVersion(): string;
|
|
152
|
-
/**
|
|
153
|
-
* 脚本包版本状态快照(同步,不发起网络请求)
|
|
154
|
-
*
|
|
155
|
-
* 第三方可用它与自己记录的版本比对,决定是否提示重启。
|
|
156
|
-
* 注意:applied 为 true 时更新已在内存中生效,无需重启。
|
|
157
|
-
*/
|
|
158
|
-
getActionVersionInfo(): ActionVersionInfo;
|
|
159
|
-
/**
|
|
160
|
-
* 当前用户是否走灰度渠道
|
|
161
|
-
*
|
|
162
|
-
* 取决于 GrowthBook 的 HuiwenCanary 开关,未初始化时返回 false(走正式渠道)。
|
|
163
|
-
* 注意 GrowthBook 依赖 setUser 才会初始化,未调用 setUser 的场景恒为正式渠道。
|
|
164
|
-
*/
|
|
165
|
-
private useBetaChannel;
|
|
166
|
-
/**
|
|
167
|
-
* 只查询远端最新版本号,不下载、不替换
|
|
168
|
-
*
|
|
169
|
-
* 适合"启动时静默检查有没有新版本"的场景。
|
|
170
|
-
*/
|
|
171
|
-
checkActionUpdate(): Promise<ActionVersionInfo>;
|
|
172
|
-
/**
|
|
173
|
-
* 等待构造函数触发的更新流程结束,返回最终版本状态
|
|
174
|
-
*
|
|
175
|
-
* forceUpdate 为 false 时会主动执行一次更新。
|
|
176
|
-
* 多次调用复用同一个任务,不会重复下载。
|
|
177
|
-
*/
|
|
178
|
-
waitForActionUpdate(): Promise<ActionVersionInfo>;
|
|
179
38
|
private update;
|
|
180
|
-
/**
|
|
181
|
-
* 【测试专用】验证脚本是否真的在内存中更新了
|
|
182
|
-
*
|
|
183
|
-
* 通过调用 actions 实例的版本标识方法,验证热更新后内存中的代码是否真的被替换。
|
|
184
|
-
* 如果版本标识变化,说明热更新成功;如果标识不变,说明仍在使用旧版本。
|
|
185
|
-
*
|
|
186
|
-
* @returns 当前内存中 Action 实例的版本标识
|
|
187
|
-
*/
|
|
188
|
-
verifyActionMemoryUpdate(): {
|
|
189
|
-
version: string;
|
|
190
|
-
shareVersion: string;
|
|
191
|
-
marker: string;
|
|
192
|
-
timestamp: string;
|
|
193
|
-
} | {
|
|
194
|
-
error: string;
|
|
195
|
-
currentVersion: string;
|
|
196
|
-
};
|
|
197
39
|
}
|
|
198
40
|
|
|
199
41
|
declare class SentryInstance {
|
|
@@ -285,49 +127,6 @@ declare interface TaskParams {
|
|
|
285
127
|
|
|
286
128
|
declare type TimeConsuming = Record<string, number>;
|
|
287
129
|
|
|
288
|
-
/**
|
|
289
|
-
* 版本价值等级
|
|
290
|
-
*
|
|
291
|
-
* - 0 细微:修复小问题、文档更新、轻微优化,可选更新
|
|
292
|
-
* - 1 一般:新功能、常规优化、非关键修复,建议更新
|
|
293
|
-
* - 2 强烈:重大功能、安全修复、关键性能优化,强制更新并重启
|
|
294
|
-
*/
|
|
295
|
-
export declare type UpdateLevel = 0 | 1 | 2;
|
|
296
|
-
|
|
297
130
|
export declare const version: string;
|
|
298
131
|
|
|
299
|
-
/**
|
|
300
|
-
* 版本历史数据
|
|
301
|
-
*/
|
|
302
|
-
export declare interface VersionHistory {
|
|
303
|
-
/** 包名 */
|
|
304
|
-
name: string;
|
|
305
|
-
/** 当前版本 */
|
|
306
|
-
currentVersion: string;
|
|
307
|
-
/** 最后更新日期 */
|
|
308
|
-
lastUpdate: string;
|
|
309
|
-
/** 保留的最大版本数 */
|
|
310
|
-
maxVersions: number;
|
|
311
|
-
/** 版本记录列表(从新到旧) */
|
|
312
|
-
versions: VersionRecord[];
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* 单个版本记录
|
|
317
|
-
*/
|
|
318
|
-
export declare interface VersionRecord {
|
|
319
|
-
/** 版本号 */
|
|
320
|
-
version: string;
|
|
321
|
-
/** 发布日期 YYYY-MM-DD */
|
|
322
|
-
releaseDate: string;
|
|
323
|
-
/** 版本更新说明 */
|
|
324
|
-
releaseNote: string[];
|
|
325
|
-
/** 版本价值等级 0-细微 1-一般 2-强烈 */
|
|
326
|
-
updateLevel: UpdateLevel;
|
|
327
|
-
/** 更新策略建议 */
|
|
328
|
-
updateStrategy: string;
|
|
329
|
-
/** 变更类型 */
|
|
330
|
-
changeType: "patch" | "minor" | "major";
|
|
331
|
-
}
|
|
332
|
-
|
|
333
132
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e917807d-cf3e-5e05-acac-c2c1de740544")}catch(e){}}();
|
|
1
3
|
import * as __WEBPACK_EXTERNAL_MODULE_punycode__ from "punycode";
|
|
2
4
|
import * as __WEBPACK_EXTERNAL_MODULE_stream__ from "stream";
|
|
3
5
|
import * as __WEBPACK_EXTERNAL_MODULE_http__ from "http";
|
|
@@ -2550,7 +2552,7 @@ function __webpack_require__(moduleId) {
|
|
|
2550
2552
|
});
|
|
2551
2553
|
};
|
|
2552
2554
|
})();
|
|
2553
|
-
var package_namespaceObject = JSON.parse('{"i8":"4.0.9-beta.
|
|
2555
|
+
var package_namespaceObject = JSON.parse('{"i8":"4.0.9-beta.5"}');
|
|
2554
2556
|
function _define_property(obj, key, value) {
|
|
2555
2557
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
2556
2558
|
value: value,
|
|
@@ -5359,45 +5361,10 @@ function packageManager_define_property(obj, key, value) {
|
|
|
5359
5361
|
return obj;
|
|
5360
5362
|
}
|
|
5361
5363
|
const NPM_REGISTRY = "https://registry.npmmirror.com/";
|
|
5362
|
-
const LATEST_TAG = "latest";
|
|
5363
|
-
const BETA_TAG = "beta";
|
|
5364
|
-
function compareVersion(a, b) {
|
|
5365
|
-
const parse = (v)=>{
|
|
5366
|
-
const [core, pre] = v.split("-");
|
|
5367
|
-
const nums = core.split(".").map(Number);
|
|
5368
|
-
return {
|
|
5369
|
-
nums,
|
|
5370
|
-
pre
|
|
5371
|
-
};
|
|
5372
|
-
};
|
|
5373
|
-
const va = parse(a);
|
|
5374
|
-
const vb = parse(b);
|
|
5375
|
-
for(let i = 0; i < 3; i++){
|
|
5376
|
-
const diff = (va.nums[i] ?? 0) - (vb.nums[i] ?? 0);
|
|
5377
|
-
if (0 !== diff) return diff;
|
|
5378
|
-
}
|
|
5379
|
-
if (!va.pre && !vb.pre) return 0;
|
|
5380
|
-
if (!va.pre) return 1;
|
|
5381
|
-
if (!vb.pre) return -1;
|
|
5382
|
-
const pa = va.pre.split(".");
|
|
5383
|
-
const pb = vb.pre.split(".");
|
|
5384
|
-
for(let i = 0; i < Math.max(pa.length, pb.length); i++){
|
|
5385
|
-
const sa = pa[i];
|
|
5386
|
-
const sb = pb[i];
|
|
5387
|
-
if (void 0 === sa) return -1;
|
|
5388
|
-
if (void 0 === sb) return 1;
|
|
5389
|
-
const na = Number(sa);
|
|
5390
|
-
const nb = Number(sb);
|
|
5391
|
-
const bothNumeric = !Number.isNaN(na) && !Number.isNaN(nb);
|
|
5392
|
-
const diff = bothNumeric ? na - nb : sa.localeCompare(sb);
|
|
5393
|
-
if (0 !== diff) return diff;
|
|
5394
|
-
}
|
|
5395
|
-
return 0;
|
|
5396
|
-
}
|
|
5397
5364
|
class PackageManager {
|
|
5398
5365
|
async getManifest(module) {
|
|
5399
5366
|
try {
|
|
5400
|
-
return
|
|
5367
|
+
return __WEBPACK_EXTERNAL_MODULE__iflyrpa_pacote_56da1cff__["default"].manifest(module, {
|
|
5401
5368
|
registry: NPM_REGISTRY
|
|
5402
5369
|
});
|
|
5403
5370
|
} catch (error) {
|
|
@@ -5428,25 +5395,9 @@ class PackageManager {
|
|
|
5428
5395
|
const plugin = this.require(packageName);
|
|
5429
5396
|
if (!plugin) await this.extract(name, version);
|
|
5430
5397
|
}
|
|
5431
|
-
async
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
return manifest.version;
|
|
5435
|
-
} catch (error) {
|
|
5436
|
-
if (distTag === LATEST_TAG) throw error;
|
|
5437
|
-
this.task.logger.warn(`${name}@${distTag} 不存在,回退到 ${LATEST_TAG}`);
|
|
5438
|
-
const manifest = await this.getManifest(`${name}@${LATEST_TAG}`);
|
|
5439
|
-
return manifest.version;
|
|
5440
|
-
}
|
|
5441
|
-
}
|
|
5442
|
-
async getLatestVersion(name, useBeta = false) {
|
|
5443
|
-
const latest = await this.getVersionByTag(name, LATEST_TAG);
|
|
5444
|
-
if (!useBeta) return latest;
|
|
5445
|
-
const beta = await this.getVersionByTag(name, BETA_TAG);
|
|
5446
|
-
return compareVersion(beta, latest) > 0 ? beta : latest;
|
|
5447
|
-
}
|
|
5448
|
-
async update(name, useBeta = false) {
|
|
5449
|
-
const version = await this.getLatestVersion(name, useBeta);
|
|
5398
|
+
async update(name) {
|
|
5399
|
+
const manifest = await this.getManifest(`${name}@latest`);
|
|
5400
|
+
const version = manifest.version;
|
|
5450
5401
|
const plugin = this.require(`${name}@${version}/package.json`);
|
|
5451
5402
|
if (!plugin) await this.extract(name, version);
|
|
5452
5403
|
return version;
|
|
@@ -5662,25 +5613,6 @@ class Task {
|
|
|
5662
5613
|
this.electronPackage = this.installElectron();
|
|
5663
5614
|
}
|
|
5664
5615
|
}
|
|
5665
|
-
var version_history_namespaceObject = JSON.parse('{"name":"@iflyrpa/playwright","currentVersion":"4.0.9-beta.3","lastUpdate":"2026-08-14","maxVersions":10,"versions":[{"version":"4.0.9-beta.3","releaseDate":"2026-08-14","releaseNote":["1. 测试更新","2. 重要修复,需要更新"],"updateLevel":2,"updateStrategy":"强制更新并重启","changeType":"patch"},{"version":"4.0.9-beta.2","releaseDate":"2026-08-13","releaseNote":["1.增加版本更新记录","2.优化错误提示"],"updateLevel":1,"updateStrategy":"建议更新","changeType":"patch"},{"version":"4.0.9-beta.1","releaseDate":"2024-08-10","releaseNote":["改进多个 action 的用户错误提示信息"],"updateLevel":1,"updateStrategy":"建议更新","changeType":"patch"}]}');
|
|
5666
|
-
function getVersionHistory() {
|
|
5667
|
-
return version_history_namespaceObject;
|
|
5668
|
-
}
|
|
5669
|
-
function getLatestVersionRecord() {
|
|
5670
|
-
return getVersionHistory().versions[0] ?? null;
|
|
5671
|
-
}
|
|
5672
|
-
function getVersionRecord(version) {
|
|
5673
|
-
return getVersionHistory().versions.find((v)=>v.version === version) ?? null;
|
|
5674
|
-
}
|
|
5675
|
-
function getVersionRecordsSince(fromVersion) {
|
|
5676
|
-
const { versions } = getVersionHistory();
|
|
5677
|
-
const index = versions.findIndex((v)=>v.version === fromVersion);
|
|
5678
|
-
return -1 === index ? versions : versions.slice(0, index);
|
|
5679
|
-
}
|
|
5680
|
-
function getMaxUpdateLevel(records) {
|
|
5681
|
-
if (0 === records.length) return null;
|
|
5682
|
-
return records.reduce((max, r)=>r.updateLevel > max ? r.updateLevel : max, 0);
|
|
5683
|
-
}
|
|
5684
5616
|
function src_define_property(obj, key, value) {
|
|
5685
5617
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
5686
5618
|
value: value,
|
|
@@ -5694,83 +5626,25 @@ function src_define_property(obj, key, value) {
|
|
|
5694
5626
|
class RpaTask extends Task {
|
|
5695
5627
|
registerActions(rpaAction) {
|
|
5696
5628
|
this.actions = new rpaAction.Action(this);
|
|
5697
|
-
this.currentActionVersion = rpaAction.version;
|
|
5698
5629
|
this.setActionVersion(rpaAction.version);
|
|
5699
5630
|
}
|
|
5700
|
-
getActionVersion() {
|
|
5701
|
-
return this.currentActionVersion;
|
|
5702
|
-
}
|
|
5703
|
-
getActionVersionInfo() {
|
|
5704
|
-
return {
|
|
5705
|
-
current: this.currentActionVersion,
|
|
5706
|
-
bundled: this.bundledActionVersion,
|
|
5707
|
-
latest: this.latestActionVersion,
|
|
5708
|
-
hasUpdate: !!this.latestActionVersion && this.latestActionVersion !== this.currentActionVersion,
|
|
5709
|
-
applied: this.appliedUpdate,
|
|
5710
|
-
channel: this.updateChannel,
|
|
5711
|
-
error: this.updateError
|
|
5712
|
-
};
|
|
5713
|
-
}
|
|
5714
|
-
useBetaChannel() {
|
|
5715
|
-
const useBeta = this.isFeatOn(__WEBPACK_EXTERNAL_MODULE__iflyrpa_actions_bd801d6f__.BetaFlag);
|
|
5716
|
-
this.updateChannel = useBeta ? "beta" : "latest";
|
|
5717
|
-
return useBeta;
|
|
5718
|
-
}
|
|
5719
|
-
async checkActionUpdate() {
|
|
5720
|
-
try {
|
|
5721
|
-
this.latestActionVersion = await this.packageManager.getLatestVersion(this.actionName, this.useBetaChannel());
|
|
5722
|
-
this.updateError = void 0;
|
|
5723
|
-
} catch (error) {
|
|
5724
|
-
this.updateError = error instanceof Error ? error.message : String(error);
|
|
5725
|
-
this.logger.error("检查脚本版本失败", error);
|
|
5726
|
-
}
|
|
5727
|
-
return this.getActionVersionInfo();
|
|
5728
|
-
}
|
|
5729
|
-
waitForActionUpdate() {
|
|
5730
|
-
if (!this.updateTask) this.updateTask = this.update();
|
|
5731
|
-
return this.updateTask;
|
|
5732
|
-
}
|
|
5733
5631
|
async update() {
|
|
5734
5632
|
try {
|
|
5735
|
-
const version = await this.packageManager.update(this.actionName
|
|
5736
|
-
this.latestActionVersion = version;
|
|
5737
|
-
if (version === this.currentActionVersion) {
|
|
5738
|
-
this.appliedUpdate = false;
|
|
5739
|
-
return this.getActionVersionInfo();
|
|
5740
|
-
}
|
|
5633
|
+
const version = await this.packageManager.update(this.actionName);
|
|
5741
5634
|
const rpaPackage = this.packageManager.require(`${this.actionName}@${version}/dist/bundle.js`);
|
|
5742
|
-
|
|
5743
|
-
this.registerActions(rpaPackage);
|
|
5744
|
-
this.appliedUpdate = true;
|
|
5745
|
-
this.updateError = void 0;
|
|
5746
|
-
this.logger.info(`脚本已热更新至 ${version}`);
|
|
5747
|
-
} else {
|
|
5748
|
-
this.appliedUpdate = false;
|
|
5749
|
-
this.updateError = `加载 ${this.actionName}@${version} 失败`;
|
|
5750
|
-
this.logger.warn(this.updateError);
|
|
5751
|
-
}
|
|
5635
|
+
(null == rpaPackage ? void 0 : rpaPackage.Action) && this.registerActions(rpaPackage);
|
|
5752
5636
|
} catch (error) {
|
|
5753
|
-
this.appliedUpdate = false;
|
|
5754
|
-
this.updateError = error instanceof Error ? error.message : String(error);
|
|
5755
5637
|
this.logger.error("更新依赖失败", error);
|
|
5756
5638
|
}
|
|
5757
|
-
return this.getActionVersionInfo();
|
|
5758
|
-
}
|
|
5759
|
-
verifyActionMemoryUpdate() {
|
|
5760
|
-
var _this_actions;
|
|
5761
|
-
if (!(null === (_this_actions = this.actions) || void 0 === _this_actions ? void 0 : _this_actions.getActionVersionMarker)) return {
|
|
5762
|
-
error: "getActionVersionMarker 方法不存在,可能是旧版本的 @iflyrpa/actions",
|
|
5763
|
-
currentVersion: this.currentActionVersion
|
|
5764
|
-
};
|
|
5765
|
-
return this.actions.getActionVersionMarker();
|
|
5766
5639
|
}
|
|
5767
5640
|
constructor(params){
|
|
5768
|
-
super(params), src_define_property(this, "actions", void 0), src_define_property(this, "actionName", "@iflyrpa/actions")
|
|
5641
|
+
super(params), src_define_property(this, "actions", void 0), src_define_property(this, "actionName", "@iflyrpa/actions");
|
|
5769
5642
|
this.registerActions(__WEBPACK_EXTERNAL_MODULE__iflyrpa_actions_bd801d6f__);
|
|
5770
|
-
|
|
5643
|
+
params.forceUpdate && this.update();
|
|
5771
5644
|
}
|
|
5772
5645
|
}
|
|
5773
5646
|
const src_version = package_namespaceObject.i8;
|
|
5774
|
-
export { RpaTask,
|
|
5647
|
+
export { RpaTask, src_version as version };
|
|
5775
5648
|
|
|
5776
|
-
//# sourceMappingURL=index.js.map
|
|
5649
|
+
//# sourceMappingURL=index.js.map
|
|
5650
|
+
//# debugId=e917807d-cf3e-5e05-acac-c2c1de740544
|