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 libmime = require('libmime');
|
||||||
const { enforce, hashEmail } = require('./helpers');
|
const { enforce, hashEmail } = require('./helpers');
|
||||||
const senders = require('./senders');
|
const senders = require('./senders');
|
||||||
const shortid = require('shortid');
|
const shortid = require('./shortid');
|
||||||
|
|
||||||
const MessageType = {
|
const MessageType = {
|
||||||
REGULAR: 0,
|
REGULAR: 0,
|
||||||
|
|
|
@ -4,7 +4,7 @@ const knex = require('../lib/knex');
|
||||||
const hasher = require('node-object-hash')();
|
const hasher = require('node-object-hash')();
|
||||||
const dtHelpers = require('../lib/dt-helpers');
|
const dtHelpers = require('../lib/dt-helpers');
|
||||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||||
const shortid = require('shortid');
|
const shortid = require('../lib/shortid');
|
||||||
const { enforce, filterObject } = require('../lib/helpers');
|
const { enforce, filterObject } = require('../lib/helpers');
|
||||||
const shares = require('./shares');
|
const shares = require('./shares');
|
||||||
const namespaceHelpers = require('../lib/namespace-helpers');
|
const namespaceHelpers = require('../lib/namespace-helpers');
|
||||||
|
@ -1163,4 +1163,4 @@ module.exports.getStatisticsOpened = getStatisticsOpened;
|
||||||
module.exports.fetchRssCampaign = fetchRssCampaign;
|
module.exports.fetchRssCampaign = fetchRssCampaign;
|
||||||
|
|
||||||
module.exports.testSend = testSend;
|
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 hasher = require('node-object-hash')();
|
||||||
const dtHelpers = require('../lib/dt-helpers');
|
const dtHelpers = require('../lib/dt-helpers');
|
||||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||||
const shortid = require('shortid');
|
const shortid = require('../lib/shortid');
|
||||||
const { enforce, filterObject } = require('../lib/helpers');
|
const { enforce, filterObject } = require('../lib/helpers');
|
||||||
const shares = require('./shares');
|
const shares = require('./shares');
|
||||||
const namespaceHelpers = require('../lib/namespace-helpers');
|
const namespaceHelpers = require('../lib/namespace-helpers');
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const knex = require('../lib/knex');
|
const knex = require('../lib/knex');
|
||||||
const shortid = require('shortid');
|
const shortid = require('../lib/shortid');
|
||||||
|
|
||||||
async function addConfirmation(listId, action, ip, data) {
|
async function addConfirmation(listId, action, ip, data) {
|
||||||
const cid = shortid.generate();
|
const cid = shortid.generate();
|
||||||
|
|
|
@ -7,7 +7,7 @@ const dtHelpers = require('../lib/dt-helpers');
|
||||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||||
const shares = require('./shares');
|
const shares = require('./shares');
|
||||||
const validators = require('../../shared/validators');
|
const validators = require('../../shared/validators');
|
||||||
const shortid = require('shortid');
|
const shortid = require('../lib/shortid');
|
||||||
const slugify = require('slugify');
|
const slugify = require('slugify');
|
||||||
const segments = require('./segments');
|
const segments = require('./segments');
|
||||||
const { formatDate, formatBirthday, parseDate, parseBirthday } = require('../../shared/date');
|
const { formatDate, formatBirthday, parseDate, parseBirthday } = require('../../shared/date');
|
||||||
|
|
|
@ -10,7 +10,7 @@ const uaParser = require('device');
|
||||||
const he = require('he');
|
const he = require('he');
|
||||||
const { getPublicUrl } = require('../lib/urls');
|
const { getPublicUrl } = require('../lib/urls');
|
||||||
const tools = require('../lib/tools');
|
const tools = require('../lib/tools');
|
||||||
const shortid = require('shortid');
|
const shortid = require('../lib/shortid');
|
||||||
const {enforce} = require('../lib/helpers');
|
const {enforce} = require('../lib/helpers');
|
||||||
|
|
||||||
const LinkId = {
|
const LinkId = {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const knex = require('../lib/knex');
|
const knex = require('../lib/knex');
|
||||||
const hasher = require('node-object-hash')();
|
const hasher = require('node-object-hash')();
|
||||||
const dtHelpers = require('../lib/dt-helpers');
|
const dtHelpers = require('../lib/dt-helpers');
|
||||||
const shortid = require('shortid');
|
const shortid = require('../lib/shortid');
|
||||||
const { enforce, filterObject } = require('../lib/helpers');
|
const { enforce, filterObject } = require('../lib/helpers');
|
||||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||||
const shares = require('./shares');
|
const shares = require('./shares');
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const knex = require('../lib/knex');
|
const knex = require('../lib/knex');
|
||||||
const hasher = require('node-object-hash')();
|
const hasher = require('node-object-hash')();
|
||||||
const dtHelpers = require('../lib/dt-helpers');
|
const dtHelpers = require('../lib/dt-helpers');
|
||||||
const shortid = require('shortid');
|
const shortid = require('../lib/shortid');
|
||||||
const { enforce, filterObject } = require('../lib/helpers');
|
const { enforce, filterObject } = require('../lib/helpers');
|
||||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||||
const shares = require('./shares');
|
const shares = require('./shares');
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const config = require('../lib/config');
|
const config = require('../lib/config');
|
||||||
const knex = require('../lib/knex');
|
const knex = require('../lib/knex');
|
||||||
const hasher = require('node-object-hash')();
|
const hasher = require('node-object-hash')();
|
||||||
const shortid = require('shortid');
|
const shortid = require('../lib/shortid');
|
||||||
const dtHelpers = require('../lib/dt-helpers');
|
const dtHelpers = require('../lib/dt-helpers');
|
||||||
const interoperableErrors = require('../../shared/interoperable-errors');
|
const interoperableErrors = require('../../shared/interoperable-errors');
|
||||||
const shares = require('./shares');
|
const shares = require('./shares');
|
||||||
|
|
14
server/package-lock.json
generated
14
server/package-lock.json
generated
|
@ -5038,9 +5038,9 @@
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"nanoid": {
|
"nanoid": {
|
||||||
"version": "2.1.7",
|
"version": "3.1.12",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz",
|
||||||
"integrity": "sha512-fmS3qwDldm4bE01HCIRqNk+f255CNjnAoeV3Zzzv0KemObHKqYgirVaZA9DtKcjogicWjYcHkJs4D5A8CjnuVQ=="
|
"integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A=="
|
||||||
},
|
},
|
||||||
"nanomatch": {
|
"nanomatch": {
|
||||||
"version": "1.2.13",
|
"version": "1.2.13",
|
||||||
|
@ -12744,14 +12744,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||||
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
|
"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": {
|
"sigmund": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
|
||||||
|
|
|
@ -106,7 +106,6 @@
|
||||||
"request": "^2.88.0",
|
"request": "^2.88.0",
|
||||||
"request-promise": "^4.2.5",
|
"request-promise": "^4.2.5",
|
||||||
"serve-favicon": "^2.5.0",
|
"serve-favicon": "^2.5.0",
|
||||||
"shortid": "^2.2.15",
|
|
||||||
"slugify": "^1.3.6",
|
"slugify": "^1.3.6",
|
||||||
"smtp-server": "^3.4.7",
|
"smtp-server": "^3.4.7",
|
||||||
"tmp-promise": "^1.1.0",
|
"tmp-promise": "^1.1.0",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
const config = require('../config');
|
const config = require('../config');
|
||||||
const knex = require('../../../lib/knex');
|
const knex = require('../../../lib/knex');
|
||||||
const shortid = require('shortid');
|
const shortid = require('../../../shortid');
|
||||||
const slugify = require('slugify');
|
const slugify = require('slugify');
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
|
@ -66,4 +66,4 @@ async function run() {
|
||||||
process.exit();
|
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 { SubscriptionSource } = require('../../../../shared/lists');
|
||||||
const {DOMParser, XMLSerializer} = require('xmldom');
|
const {DOMParser, XMLSerializer} = require('xmldom');
|
||||||
const log = require('../../../lib/log');
|
const log = require('../../../lib/log');
|
||||||
const shortid = require('shortid');
|
const shortid = require('../../../lib/shortid');
|
||||||
const slugify = require('slugify');
|
const slugify = require('slugify');
|
||||||
|
|
||||||
const entityTypesAddNamespace = ['list', 'custom_form', 'template', 'campaign', 'report', 'report_template', 'user'];
|
const entityTypesAddNamespace = ['list', 'custom_form', 'template', 'campaign', 'report', 'report_template', 'user'];
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
const config = require('../lib/config');
|
const config = require('../lib/config');
|
||||||
const { useCase, step, precondition, driver } = require('../lib/mocha-e2e');
|
const { useCase, step, precondition, driver } = require('../lib/mocha-e2e');
|
||||||
const shortid = require('shortid');
|
const shortid = require('../lib/shortid');
|
||||||
const expect = require('chai').expect;
|
const expect = require('chai').expect;
|
||||||
const createPage = require('../page-objects/subscription');
|
const createPage = require('../page-objects/subscription');
|
||||||
const faker = require('faker');
|
const faker = require('faker');
|
||||||
|
|
Loading…
Reference in a new issue