From 62be760808c4124e6c6665ef61253df8d112a162 Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Mon, 18 Sep 2023 18:03:08 +0600 Subject: [PATCH 1/2] Added uid generation for IITC core script --- src/worker.js | 2 ++ test/manager.2.external.spec.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/worker.js b/src/worker.js index 77fe82c..6016bf6 100644 --- a/src/worker.js +++ b/src/worker.js @@ -371,6 +371,7 @@ export class Worker { const iitc_code = await this._getUrl(this.network_host[this.channel] + '/total-conversion-build.user.js'); if (iitc_code) { const iitc_core = parseMeta(iitc_code); + iitc_core['uid'] = getUID(iitc_core); iitc_core['code'] = iitc_code; await this._save({ iitc_core: iitc_core, @@ -603,6 +604,7 @@ export class Worker { if (plugin_uid in data) { data[plugin_uid]['status'] = plugins_user[plugin_uid]['status']; data[plugin_uid]['code'] = plugins_user[plugin_uid]['code']; + data[plugin_uid]['user'] = true; data[plugin_uid]['override'] = true; } else { data[plugin_uid] = plugins_user[plugin_uid]; diff --git a/test/manager.2.external.spec.js b/test/manager.2.external.spec.js index 8c4ab38..fd8ac67 100644 --- a/test/manager.2.external.spec.js +++ b/test/manager.2.external.spec.js @@ -497,6 +497,7 @@ describe('manage.js external plugins integration tests', function () { it('Check getIITCCore() for standard IITC', async function () { const script = await manager.getIITCCore(); expect(script, 'getIITCCore()').to.have.all.keys( + 'uid', 'author', 'code', 'description', From 1e07f5b38bda8dcc6aa0b758365bf000889bd27a Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Mon, 18 Sep 2023 18:04:44 +0600 Subject: [PATCH 2/2] 1.8.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8e1420..d28700e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lib-iitc-manager", - "version": "1.8.0", + "version": "1.8.1", "description": "Library for managing IITC plugins", "main": "src/index.js", "type": "module",