From 8677a8354d74352c0ea1e82ade3ebb6849189b6c Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 27 Jun 2023 11:56:59 +0300 Subject: [PATCH] libs rename key to amdId --- frontend/libs.json | 60 +++++++++++++++--------------- js/scripts/prepare-lib-original.js | 10 ++--- package-lock.json | 10 ++--- package.json | 2 +- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/frontend/libs.json b/frontend/libs.json index b2df733d4a..0ca67e00d9 100644 --- a/frontend/libs.json +++ b/frontend/libs.json @@ -2,44 +2,44 @@ { "src": "node_modules/jquery/dist/jquery.js", "bundle": true, - "key": "jquery" + "amdId": "jquery" }, { "src": "node_modules/underscore/underscore-umd.js", "bundle": true, - "key": "underscore" + "amdId": "underscore" }, { "src": "node_modules/backbone/backbone.js", "bundle": true, - "key": "backbone" + "amdId": "backbone" }, { "src": "node_modules/handlebars/dist/handlebars.js", "bundle": true, - "key": "handlebars" + "amdId": "handlebars" }, { "src": "node_modules/bullbone/dist/bullbone.umd.js", "bundle": true, - "key": "bullbone" + "amdId": "bullbone" }, { "src": "node_modules/js-base64/base64.js", "bundle": true, - "key": "js-base64", + "amdId": "js-base64", "suppressAmd": true }, { "src": "node_modules/moment/moment.js", "bundle": true, - "key": "moment", + "amdId": "moment", "suppressAmd": true }, { "src": "node_modules/moment-timezone/moment-timezone.js", "bundle": true, - "key": "moment-timezone", + "amdId": "moment-timezone", "suppressAmd": true }, { @@ -49,19 +49,19 @@ { "src": "node_modules/timepicker/jquery.timepicker.js", "bundle": true, - "key": "timepicker", + "amdId": "timepicker", "suppressAmd": true }, { "src": "node_modules/devbridge-autocomplete/dist/jquery.autocomplete.js", "bundle": true, - "key": "autocomplete", + "amdId": "autocomplete", "suppressAmd": true }, { "src": "node_modules/jquery-textcomplete/dist/jquery.textcomplete.js", "bundle": true, - "key": "jquery-textcomplete" + "amdId": "jquery-textcomplete" }, { "src": "node_modules/bootstrap/dist/js/bootstrap.js", @@ -70,18 +70,18 @@ { "src": "node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js", "bundle": true, - "key": "bootstrap-datepicker", + "amdId": "bootstrap-datepicker", "suppressAmd": true }, { "src": "node_modules/marked/lib/marked.umd.js", "bundle": true, - "key": "marked" + "amdId": "marked" }, { "src": "node_modules/dompurify/dist/purify.js", "bundle": true, - "key": "dompurify" + "amdId": "dompurify" }, { "src": "node_modules/autobahn-espo/autobahn.js", @@ -91,7 +91,7 @@ "src": "node_modules/jquery-ui-espo/dist/jquery-ui.js", "bundle": true, "suppressAmd": true, - "key": "jquery-ui" + "amdId": "jquery-ui" }, { "src": "node_modules/jquery-ui-touch-punch/jquery.ui.touch-punch.js", @@ -101,61 +101,61 @@ "name": "gridstack", "src": "node_modules/gridstack/dist/gridstack-jq.js", "bundle": true, - "key": "gridstack" + "amdId": "gridstack" }, { "src": "node_modules/selectize/dist/js/standalone/selectize.js", "bundle": true, - "key": "selectize", + "amdId": "selectize", "suppressAmd": true }, { "src": "node_modules/autonumeric/dist/autoNumeric.js", "bundle": true, - "key": "autonumeric" + "amdId": "autonumeric" }, { "src": "node_modules/summernote/dist/summernote.js", - "key": "summernote", + "amdId": "summernote", "minify": true }, { "src": "node_modules/espo-funnel-chart/build/espo-funnel-chart.js", - "key": "espo-funnel-chart", + "amdId": "espo-funnel-chart", "minify": true }, { "src": "node_modules/flotr2/flotr2.js", - "key": "flotr2", + "amdId": "flotr2", "minify": true }, { "src": "node_modules/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js", - "key": "bootstrap-colorpicker" + "amdId": "bootstrap-colorpicker" }, { "src": "node_modules/cropper/dist/cropper.js", - "key": "cropper", + "amdId": "cropper", "minify": true }, { "src": "node_modules/cronstrue/dist/cronstrue-i18n.js", "minify": true, - "key": "cronstrue" + "amdId": "cronstrue" }, { "src": "node_modules/exif-js/exif.js", "minify": true, - "key": "exif-js" + "amdId": "exif-js" }, { "src": "node_modules/jsbarcode/dist/JsBarcode.all.js", "minify": true, - "key": "jsbarcode" + "amdId": "jsbarcode" }, { "src": "node_modules/qrcodejs/qrcode.js", - "key": "qrcodejs" + "amdId": "qrcodejs" }, { "name": "ace-builds", @@ -177,18 +177,18 @@ "dest": "client/lib/ace-theme-tomorrow_night.js" } ], - "key": "ace" + "amdId": "ace" }, { "src": "node_modules/fullcalendar/dist/fullcalendar.js", "dest": "client/modules/crm/lib/fullcalendar.js", "minify": true, - "key": "fullcalendar" + "amdId": "fullcalendar" }, { "src": "node_modules/vis/dist/vis.js", "dest": "client/modules/crm/lib/vis.js", "minify": true, - "key": "vis" + "amdId": "vis" } ] diff --git a/js/scripts/prepare-lib-original.js b/js/scripts/prepare-lib-original.js index 6df8d59fd5..9d32b5cbca 100644 --- a/js/scripts/prepare-lib-original.js +++ b/js/scripts/prepare-lib-original.js @@ -97,11 +97,11 @@ const addSuppressAmd = path => { /** @var {string[]} */ const libSrcList = buildUtils.getBundleLibList(libs); -let keyMap = {}; +let amdIdMap = {}; let suppressAmdMap = {}; libs.forEach(item => { - if (!item.key || !item.bundle || item.files) { + if (!item.amdId || !item.bundle || item.files) { return; } @@ -111,7 +111,7 @@ libs.forEach(item => { return; } - keyMap[item.src] = 'lib!' + item.key; + amdIdMap[item.src] = 'lib!' + item.amdId; }); libSrcList.forEach(src => { @@ -124,7 +124,7 @@ libSrcList.forEach(src => { addSuppressAmd(dest); } - let key = keyMap[src]; + let key = amdIdMap[src]; if (key) { addLoadingSubject(dest, key); @@ -141,7 +141,7 @@ buildUtils.getCopyLibDataList(libs) addSuppressAmd(item.originalDest); } - let key = keyMap[item.src]; + let key = amdIdMap[item.src]; if (key) { addLoadingSubject(item.originalDest, key); diff --git a/package-lock.json b/package-lock.json index 695dcfefc7..ab88f0be52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,7 +49,7 @@ }, "devDependencies": { "archiver": "^5.3.0", - "espo-frontend-build-tools": "github:espocrm/frontend-build-tools#0.0.4", + "espo-frontend-build-tools": "github:espocrm/frontend-build-tools#0.0.5", "fstream": ">=1.0.12", "glob": "^10.2.6", "grunt": "^1.5.3", @@ -3095,8 +3095,8 @@ } }, "node_modules/espo-frontend-build-tools": { - "version": "0.0.4", - "resolved": "git+ssh://git@github.com/espocrm/frontend-build-tools.git#e802fd4f263531d5ba615d14a13fe5578c62bc06", + "version": "0.0.5", + "resolved": "git+ssh://git@github.com/espocrm/frontend-build-tools.git#f73730df04366ff16aee0917449f9c5927067d0d", "dev": true, "license": "MIT", "dependencies": { @@ -9340,9 +9340,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "espo-frontend-build-tools": { - "version": "git+ssh://git@github.com/espocrm/frontend-build-tools.git#e802fd4f263531d5ba615d14a13fe5578c62bc06", + "version": "git+ssh://git@github.com/espocrm/frontend-build-tools.git#f73730df04366ff16aee0917449f9c5927067d0d", "dev": true, - "from": "espo-frontend-build-tools@github:espocrm/frontend-build-tools#0.0.4", + "from": "espo-frontend-build-tools@github:espocrm/frontend-build-tools#0.0.5", "requires": { "@babel/cli": "^7.21.5", "@babel/core": "^7.22.1", diff --git a/package.json b/package.json index 9d9cc731db..900a24be26 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "license": "GPL-3.0", "devDependencies": { "archiver": "^5.3.0", - "espo-frontend-build-tools": "github:espocrm/frontend-build-tools#0.0.4", + "espo-frontend-build-tools": "github:espocrm/frontend-build-tools#0.0.5", "fstream": ">=1.0.12", "glob": "^10.2.6", "grunt": "^1.5.3",