removing `bower`: migrate `scrypt-async`

Signed-off-by: Pamplemousse <git@xaviermaso.com>
This commit is contained in:
Pamplemousse 2023-01-07 12:25:02 +01:00
parent dc7f6b46c7
commit 67b7ea28b8
7 changed files with 19 additions and 5 deletions

View File

@ -18,7 +18,6 @@
"tests"
],
"dependencies": {
"scrypt-async": "1.2.0",
"require-css": "0.1.10",
"bootstrap": "^v4.0.0",
"diff-dom": "2.1.1",

View File

@ -17,7 +17,7 @@ define([
'/common/common-hash.js',
'/components/tweetnacl/nacl-fast.min.js',
'/bower_components/scrypt-async/scrypt-async.min.js', // better load speed
'/components/scrypt-async/scrypt-async.min.js', // better load speed
], function ($, Listmap, Crypto, Util, NetConfig, Cred, ChainPad, Realtime, Constants, UI,
Feedback, LocalStore, Messages, nThen, Block, Hash) {
var Exports = {

13
package-lock.json generated
View File

@ -45,6 +45,7 @@
"rangy": "~1.3.0",
"requirejs": "2.3.5",
"requirejs-plugins": "^1.0.2",
"scrypt-async": "1.2.0",
"selenium-webdriver": "^3.6.0"
},
"funding": {
@ -4036,6 +4037,12 @@
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true
},
"node_modules/scrypt-async": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/scrypt-async/-/scrypt-async-1.2.0.tgz",
"integrity": "sha512-BtT7+xPLdoeXsh6wOblaq6sRy/AsffFXgcwBNGtQJXeNgm9UD3HM3nWEmAERjdCNfE6jWglAtRbAPZ7rc2WtsQ==",
"dev": true
},
"node_modules/selenium-webdriver": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz",
@ -8297,6 +8304,12 @@
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true
},
"scrypt-async": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/scrypt-async/-/scrypt-async-1.2.0.tgz",
"integrity": "sha512-BtT7+xPLdoeXsh6wOblaq6sRy/AsffFXgcwBNGtQJXeNgm9UD3HM3nWEmAERjdCNfE6jWglAtRbAPZ7rc2WtsQ==",
"dev": true
},
"selenium-webdriver": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz",

View File

@ -48,6 +48,7 @@
"rangy": "~1.3.0",
"requirejs": "2.3.5",
"requirejs-plugins": "^1.0.2",
"scrypt-async": "1.2.0",
"selenium-webdriver": "^3.6.0"
},
"scripts": {

View File

@ -23,6 +23,7 @@ Fse.mkdirpSync(componentsPath);
"chainpad-netflux",
"file-saver",
"alertify.js",
"scrypt-async",
].forEach(l => {
const source = Path.join("node_modules", l);
const destination = Path.join(componentsPath, l);

View File

@ -88,12 +88,12 @@ var factory = function (AppConfig, Scrypt) {
if (typeof(module) !== 'undefined' && module.exports) {
module.exports = factory(
{}, //require("../../customize.dist/application_config.js"),
require("../bower_components/scrypt-async/scrypt-async.min.js")
require("../components/scrypt-async/scrypt-async.min.js")
);
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
define([
'/customize/application_config.js',
'/bower_components/scrypt-async/scrypt-async.min.js',
'/components/scrypt-async/scrypt-async.min.js',
], function (AppConfig) {
return factory(AppConfig, window.scrypt);
});

View File

@ -46,7 +46,7 @@ var factory = function (Util, Nacl, Scrypt) {
define([
'/common/common-util.js',
'/components/tweetnacl/nacl-fast.min.js',
'/bower_components/scrypt-async/scrypt-async.min.js',
'/components/scrypt-async/scrypt-async.min.js',
], function (Util) {
return factory(Util, window.nacl, window.scrypt);
});