Use the new module and uninstall shortid
This commit is contained in:
parent
8b900c94ba
commit
62f6ef4559
14 changed files with 17 additions and 26 deletions
|
@ -24,7 +24,7 @@ const blacklist = require('../models/blacklist');
|
|||
const libmime = require('libmime');
|
||||
const { enforce, hashEmail } = require('./helpers');
|
||||
const senders = require('./senders');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('./shortid');
|
||||
|
||||
const MessageType = {
|
||||
REGULAR: 0,
|
||||
|
|
|
@ -4,7 +4,7 @@ const knex = require('../lib/knex');
|
|||
const hasher = require('node-object-hash')();
|
||||
const dtHelpers = require('../lib/dt-helpers');
|
||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../lib/shortid');
|
||||
const { enforce, filterObject } = require('../lib/helpers');
|
||||
const shares = require('./shares');
|
||||
const namespaceHelpers = require('../lib/namespace-helpers');
|
||||
|
@ -1163,4 +1163,4 @@ module.exports.getStatisticsOpened = getStatisticsOpened;
|
|||
module.exports.fetchRssCampaign = fetchRssCampaign;
|
||||
|
||||
module.exports.testSend = testSend;
|
||||
module.exports.getRssPreview = getRssPreview;
|
||||
module.exports.getRssPreview = getRssPreview;
|
||||
|
|
|
@ -4,7 +4,7 @@ const knex = require('../lib/knex');
|
|||
const hasher = require('node-object-hash')();
|
||||
const dtHelpers = require('../lib/dt-helpers');
|
||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../lib/shortid');
|
||||
const { enforce, filterObject } = require('../lib/helpers');
|
||||
const shares = require('./shares');
|
||||
const namespaceHelpers = require('../lib/namespace-helpers');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const knex = require('../lib/knex');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../lib/shortid');
|
||||
|
||||
async function addConfirmation(listId, action, ip, data) {
|
||||
const cid = shortid.generate();
|
||||
|
|
|
@ -7,7 +7,7 @@ const dtHelpers = require('../lib/dt-helpers');
|
|||
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||
const shares = require('./shares');
|
||||
const validators = require('../../shared/validators');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../lib/shortid');
|
||||
const slugify = require('slugify');
|
||||
const segments = require('./segments');
|
||||
const { formatDate, formatBirthday, parseDate, parseBirthday } = require('../../shared/date');
|
||||
|
|
|
@ -10,7 +10,7 @@ const uaParser = require('device');
|
|||
const he = require('he');
|
||||
const { getPublicUrl } = require('../lib/urls');
|
||||
const tools = require('../lib/tools');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../lib/shortid');
|
||||
const {enforce} = require('../lib/helpers');
|
||||
|
||||
const LinkId = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
const knex = require('../lib/knex');
|
||||
const hasher = require('node-object-hash')();
|
||||
const dtHelpers = require('../lib/dt-helpers');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../lib/shortid');
|
||||
const { enforce, filterObject } = require('../lib/helpers');
|
||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||
const shares = require('./shares');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
const knex = require('../lib/knex');
|
||||
const hasher = require('node-object-hash')();
|
||||
const dtHelpers = require('../lib/dt-helpers');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../lib/shortid');
|
||||
const { enforce, filterObject } = require('../lib/helpers');
|
||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||
const shares = require('./shares');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
const config = require('../lib/config');
|
||||
const knex = require('../lib/knex');
|
||||
const hasher = require('node-object-hash')();
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../lib/shortid');
|
||||
const dtHelpers = require('../lib/dt-helpers');
|
||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||
const shares = require('./shares');
|
||||
|
|
14
server/package-lock.json
generated
14
server/package-lock.json
generated
|
@ -5038,9 +5038,9 @@
|
|||
"optional": true
|
||||
},
|
||||
"nanoid": {
|
||||
"version": "2.1.7",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.7.tgz",
|
||||
"integrity": "sha512-fmS3qwDldm4bE01HCIRqNk+f255CNjnAoeV3Zzzv0KemObHKqYgirVaZA9DtKcjogicWjYcHkJs4D5A8CjnuVQ=="
|
||||
"version": "3.1.12",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz",
|
||||
"integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A=="
|
||||
},
|
||||
"nanomatch": {
|
||||
"version": "1.2.13",
|
||||
|
@ -12744,14 +12744,6 @@
|
|||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
|
||||
},
|
||||
"shortid": {
|
||||
"version": "2.2.15",
|
||||
"resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.15.tgz",
|
||||
"integrity": "sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==",
|
||||
"requires": {
|
||||
"nanoid": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"sigmund": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
|
||||
|
|
|
@ -106,7 +106,6 @@
|
|||
"request": "^2.88.0",
|
||||
"request-promise": "^4.2.5",
|
||||
"serve-favicon": "^2.5.0",
|
||||
"shortid": "^2.2.15",
|
||||
"slugify": "^1.3.6",
|
||||
"smtp-server": "^3.4.7",
|
||||
"tmp-promise": "^1.1.0",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const config = require('../config');
|
||||
const knex = require('../../../lib/knex');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../../../shortid');
|
||||
const slugify = require('slugify');
|
||||
|
||||
async function run() {
|
||||
|
@ -66,4 +66,4 @@ async function run() {
|
|||
process.exit();
|
||||
}
|
||||
|
||||
run().catch(err => console.error(err));
|
||||
run().catch(err => console.error(err));
|
||||
|
|
|
@ -11,7 +11,7 @@ const { EntityVals: TriggerEntityVals, EventVals: TriggerEventVals } = require('
|
|||
const { SubscriptionSource } = require('../../../../shared/lists');
|
||||
const {DOMParser, XMLSerializer} = require('xmldom');
|
||||
const log = require('../../../lib/log');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../../../lib/shortid');
|
||||
const slugify = require('slugify');
|
||||
|
||||
const entityTypesAddNamespace = ['list', 'custom_form', 'template', 'campaign', 'report', 'report_template', 'user'];
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
const config = require('../lib/config');
|
||||
const { useCase, step, precondition, driver } = require('../lib/mocha-e2e');
|
||||
const shortid = require('shortid');
|
||||
const shortid = require('../lib/shortid');
|
||||
const expect = require('chai').expect;
|
||||
const createPage = require('../page-objects/subscription');
|
||||
const faker = require('faker');
|
||||
|
|
Loading…
Reference in a new issue