@ellipticltd/aml-utils 0.16.27 → 0.16.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -43
- package/lib/errors/errors.js +19 -30
- package/lib/errors/errors.js.map +1 -0
- package/{dist → lib}/file-parser/errors.js +1 -1
- package/lib/file-parser/errors.js.map +1 -0
- package/{dist → lib}/file-parser/file-parser.d.ts +2 -4
- package/lib/file-parser/file-parser.js +59 -0
- package/lib/file-parser/file-parser.js.map +1 -0
- package/{dist/structured-file-parser → lib/file-parser}/parse-row.js +2 -1
- package/lib/file-parser/parse-row.js.map +1 -0
- package/{dist/file-parser/sanitzeRows.d.ts → lib/file-parser/sanitizeRows.d.ts} +3 -1
- package/lib/file-parser/sanitizeRows.js +15 -0
- package/lib/file-parser/sanitizeRows.js.map +1 -0
- package/lib/formatting/formatting.js +11 -12
- package/lib/formatting/formatting.js.map +1 -0
- package/{dist → lib}/index.d.ts +1 -1
- package/lib/index.js +21 -0
- package/lib/index.js.map +1 -0
- package/lib/middleware/middleware.js +14 -17
- package/lib/middleware/middleware.js.map +1 -0
- package/lib/orm-helpers/ormHelpers.js +12 -13
- package/lib/orm-helpers/ormHelpers.js.map +1 -0
- package/{dist → lib}/structured-file-parser/errors.js +1 -0
- package/lib/structured-file-parser/errors.js.map +1 -0
- package/{dist/file-parser → lib/structured-file-parser}/parse-row.js +2 -1
- package/lib/structured-file-parser/parse-row.js.map +1 -0
- package/{dist → lib}/structured-file-parser/sanitize-rows.js +3 -4
- package/lib/structured-file-parser/sanitize-rows.js.map +1 -0
- package/{dist → lib}/structured-file-parser/structured-file-parser.d.ts +2 -2
- package/lib/structured-file-parser/structured-file-parser.js +95 -0
- package/lib/structured-file-parser/structured-file-parser.js.map +1 -0
- package/{dist → lib}/types/types.d.ts +0 -6
- package/lib/types/types.js +191 -203
- package/lib/types/types.js.map +1 -0
- package/{dist → lib}/validations/validations.d.ts +133 -82
- package/lib/validations/validations.js +672 -453
- package/lib/validations/validations.js.map +1 -0
- package/package.json +7 -60
- package/.circleci/config.yml +0 -87
- package/.claude/settings.local.json +0 -7
- package/.eslintrc +0 -45
- package/.huskyrc +0 -5
- package/.mocharc.json +0 -3
- package/.nvmrc +0 -1
- package/.nycrc.json +0 -11
- package/.releaserc.json +0 -18
- package/.snyk +0 -12
- package/codecov.yml +0 -29
- package/commitlint.config.js +0 -1
- package/dist/errors/errors.js +0 -42
- package/dist/errors/errors.spec.d.ts +0 -1
- package/dist/errors/errors.spec.js +0 -23
- package/dist/file-parser/__tests/file-parser.spec.d.ts +0 -1
- package/dist/file-parser/__tests/file-parser.spec.js +0 -109
- package/dist/file-parser/__tests/parse-row.spec.d.ts +0 -1
- package/dist/file-parser/__tests/parse-row.spec.js +0 -29
- package/dist/file-parser/__tests/sanitize-rows.spec.d.ts +0 -1
- package/dist/file-parser/__tests/sanitize-rows.spec.js +0 -78
- package/dist/file-parser/file-parser.js +0 -55
- package/dist/file-parser/sanitzeRows.js +0 -18
- package/dist/formatting/formatting.js +0 -17
- package/dist/formatting/formatting.spec.d.ts +0 -1
- package/dist/formatting/formatting.spec.js +0 -37
- package/dist/index.js +0 -22
- package/dist/middleware/middleware.js +0 -22
- package/dist/orm-helpers/ormHelpers.js +0 -17
- package/dist/orm-helpers/ormHelpers.spec.d.ts +0 -1
- package/dist/orm-helpers/ormHelpers.spec.js +0 -38
- package/dist/structured-file-parser/structured-file-parser.js +0 -98
- package/dist/types/types.js +0 -203
- package/dist/validations/validations.js +0 -470
- package/dist/validations/validations.spec.d.ts +0 -1
- package/dist/validations/validations.spec.js +0 -463
- package/lib/errors/errors.spec.js +0 -37
- package/lib/file-parser/__tests/file-parser.spec.js +0 -107
- package/lib/file-parser/__tests/parse-row.spec.js +0 -35
- package/lib/file-parser/__tests/sanitize-rows.spec.js +0 -88
- package/lib/file-parser/errors.ts +0 -7
- package/lib/file-parser/file-parser.ts +0 -84
- package/lib/file-parser/parse-row.ts +0 -52
- package/lib/file-parser/sanitzeRows.ts +0 -32
- package/lib/formatting/formatting.spec.js +0 -45
- package/lib/index.ts +0 -19
- package/lib/orm-helpers/ormHelpers.spec.js +0 -41
- package/lib/structured-file-parser/errors.ts +0 -25
- package/lib/structured-file-parser/parse-row.ts +0 -52
- package/lib/structured-file-parser/sanitize-rows.ts +0 -24
- package/lib/structured-file-parser/structured-file-parser.ts +0 -155
- package/lib/validations/validations.spec.js +0 -603
- package/tsconfig.json +0 -26
- /package/{dist → lib}/errors/errors.d.ts +0 -0
- /package/{dist → lib}/file-parser/errors.d.ts +0 -0
- /package/{dist → lib}/file-parser/parse-row.d.ts +0 -0
- /package/{dist → lib}/formatting/formatting.d.ts +0 -0
- /package/{dist → lib}/middleware/middleware.d.ts +0 -0
- /package/{dist → lib}/orm-helpers/ormHelpers.d.ts +0 -0
- /package/{dist → lib}/structured-file-parser/errors.d.ts +0 -0
- /package/{dist → lib}/structured-file-parser/parse-row.d.ts +0 -0
- /package/{dist → lib}/structured-file-parser/sanitize-rows.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validations.js","sourceRoot":"","sources":["../../../../../libs/aml-utils/lib/validations/validations.js"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAC/B,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE5B,kGAAkG;AAClG,MAAM,gBAAgB,GAAG,OAAO,CAAC,2DAA2D,CAAC,CAAC;AAC9F,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/B,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AACrD,MAAM,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEtC,MAAM,gBAAgB,GAAG;IACvB,iGAAiG;IACjG,SAAS,CAAC,GAAG;QACX,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI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CAAC,CAAC,CAAC,CAAC;IACf,yEAAyE;IACzE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,GAAG,WAAW,CAAC","sourcesContent":["/* eslint no-underscore-dangle: 0 */\nconst V = require('validator');\nconst _ = require('lodash');\n\n// Importing directly from dist to make sure we import the browser-friendly version of the library\nconst addressValidator = require('multicoin-address-validator/dist/wallet-address-validator');\nconst eip55 = require('eip55');\nconst stellarBase = require('@stellar/stellar-base');\nconst E = require('../errors/errors');\n\nconst cryptoValidators = {\n // Here we use our regex to validate the shape of the address, and eip55 to validate the checksum\n isAddress(str) {\n if (typeof str !== 'string' || !/^0x[0-9a-fA-F]{40}$/.test(str)) return false;\n return eip55.verify(str, true);\n },\n isHexStrict(str) {\n return typeof str === 'string' && /^0x[0-9a-fA-F]*$/.test(str);\n },\n isHex(str) {\n return typeof str === 'string' && /^(0x)?[0-9a-fA-F]*$/.test(str);\n },\n isValidWeiAmount(str) {\n return typeof str === 'string' && /^[0-9]+$/.test(str);\n },\n};\n\nconst validations = {\n _validate(Err, pred, x, msg) {\n if (pred(x)) {\n return x;\n }\n throw new Err(msg);\n },\n _validateArg(pred, x, msg) {\n return this._validate(E.InvalidArguments, pred, x, msg);\n },\n _tryCheck(fn, arg) {\n try {\n fn(arg);\n return true;\n } catch (error) {\n return false;\n }\n },\n\n exists(x) {\n return x != null;\n },\n nonEmpty(x) {\n return (x != null ? x.length : undefined) > 0;\n },\n isNonEmptyString(x) {\n return _.isString(x) && (x != null ? x.length : undefined) > 0;\n },\n isSafeString(str) {\n // eslint-disable-next-line no-useless-escape, prefer-regex-literals\n return RegExp(/^(\\p{L}|[0-9]|-|=|!|\\.|:|\\s|@|\\+|_|,|\\$|£|&)+$/, 'u').test(str);\n },\n isAssetSafeString(str) {\n // eslint-disable-next-line no-useless-escape, prefer-regex-literals\n return RegExp(/^(\\p{L}|[0-9]|-|=|!|\\.|:|\\s|@|\\+|_|,|\\$|£|&|\\/)+$/, 'u').test(str);\n },\n ensureShortEnough(limit, x) {\n const l = x != null ? x.length : undefined;\n if (l <= limit) {\n return true;\n }\n throw new E.BadRequest(`Max query size exceeded: ${l} / ${limit}`);\n },\n ensure(crit, msg) {\n if (crit) {\n return true;\n }\n throw new E.BadRequest(msg);\n },\n argExists(x, msg) {\n return this._validateArg(this.exists, x, msg);\n },\n\n check: {\n matches(required, given, msg) {\n const newGiven = _.uniq(given);\n const crit = _.intersection(newGiven, required).length === given.length;\n if (crit) {\n return true;\n }\n throw new E.BadRequest(msg);\n },\n wasFound(type) {\n return (item) => {\n if (item == null) {\n throw new E.NotFound(`Unknown ${type}`);\n } else {\n return item;\n }\n };\n },\n wasCreated(msg) {\n return (arr) => {\n if (!arr[1]) {\n throw new E.BadRequest(msg);\n } else {\n return arr;\n }\n };\n },\n isTrue(crit, msg) {\n if (crit) {\n return true;\n }\n throw new E.BadRequest(msg);\n },\n isFalse(crit, msg) {\n if (!crit) {\n return true;\n }\n throw new E.BadRequest(msg);\n },\n },\n\n isCustomerReference(x) {\n return _.isString(x) && (x != null ? x.length : undefined) > 0 && (x != null ? x.length : undefined) <= 100;\n },\n isCustomerLabelName(x) {\n return _.isString(x) && (x != null ? x.length : undefined) > 0 && (x != null ? x.length : undefined) <= 50;\n },\n binanceChain: {\n isAddress(str) {\n return /^(bnb)([a-z0-9]{39})$/.test(str);\n },\n isTxHash(str) {\n if (!V.isHexadecimal(str)) {\n return false;\n }\n return str.length === 64;\n },\n },\n bitcoin: {\n isAddress(str, asset) {\n if (asset === 'lightning') {\n return validations.isNonEmptyString(str);\n }\n return typeof str === 'string' && addressValidator.validate(str.trim(), 'btc', 'prod');\n },\n isTxHash(str) {\n if (!V.isHexadecimal(str)) {\n return false;\n }\n return str.length === 64;\n },\n },\n bitcoinCash: {\n isAddress(str) {\n return /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$|^(bitcoincash:)?[q|p][a-z0-9]{41}$|^(BITCOINCASH:)?[Q|P][A-Z0-9]{41}$/.test(str);\n },\n isTxHash(str) {\n if (!V.isHexadecimal(str)) {\n return false;\n }\n return str.length === 64;\n },\n },\n ethereum: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isBlockHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n isAddressCode(str) {\n return cryptoValidators.isHexStrict(str);\n },\n isValidWeiAmount(str) {\n return cryptoValidators.isValidWeiAmount(str);\n },\n },\n horizen: {\n isAddress(str) {\n return addressValidator.validate(str, 'zen');\n },\n isTxHash(str) {\n if (!V.isHexadecimal(str)) {\n return false;\n }\n return str.length === 64;\n },\n },\n litecoin: {\n isAddress(str) {\n return /^[3LM][a-km-zA-HJ-NP-Z1-9]{24,33}$|^ltc1[ac-hj-np-z02-9]{6,86}$|^LTC1[AC-HJ-NP-Z02-9]{6,86}$|^ltcmweb[a-zA-Z0-9]{114}$/.test(\n str\n );\n },\n isTxHash(str) {\n if (!V.isHexadecimal(str)) {\n return false;\n }\n return str.length === 64;\n },\n },\n ripple: {\n isAddress(str) {\n return addressValidator.validate(str, 'xrp');\n },\n isTxHash(str) {\n if (!V.isHexadecimal(str)) {\n return false;\n }\n return str.length === 64;\n },\n },\n stellar: {\n isAddress(str) {\n return stellarBase.StrKey.isValidEd25519PublicKey(str);\n },\n isTxHash(str) {\n if (!V.isHexadecimal(str)) {\n return false;\n }\n return str.length === 64;\n },\n },\n zcash: {\n isAddress(str) {\n return addressValidator.validate(str, 'zec');\n },\n isTxHash(str) {\n if (!V.isHexadecimal(str)) {\n return false;\n }\n return str.length === 64;\n },\n },\n zilliqa: {\n isAddress(str) {\n // https://pub.dev/documentation/laksadart/latest/laksadart/isBech32.html\n return !!str.match(/^zil1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38}$/);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n algorand: {\n isAddress(str) {\n return addressValidator.validate(str, 'algo');\n },\n isTxHash(str) {\n return str.length === 52;\n },\n },\n tezos: {\n isAddress(str) {\n return str[0] !== 'o' && addressValidator.validate(str, 'xtz');\n },\n isTxHash(str) {\n return str.length === 51;\n },\n },\n polkadot: {\n isAddress(str) {\n return addressValidator.validate(str, 'dot');\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n cardano: {\n isAddress(str) {\n return addressValidator.validate(str, 'ada');\n },\n isTxHash(str) {\n if (!V.isHexadecimal(str)) {\n return false;\n }\n return str.length === 64;\n },\n },\n cryptocom: {\n isAddress(str) {\n return addressValidator.validate(str, 'cro');\n },\n isTxHash(str) {\n if (!V.isHexadecimal(str)) {\n return false;\n }\n return str.length === 64;\n },\n },\n near: {\n isAddress(str) {\n // https://nomicon.io/DataStructures/Account\n return /^(([a-z\\d]+[-_])*[a-z\\d]+\\.)*([a-z\\d]+[-_])*[a-z\\d]+$/.test(str);\n },\n isTxHash(str) {\n return str.length === 44 || str.length === 43;\n },\n },\n doge: {\n isAddress(str) {\n return /^[a-zA-Z\\d]{34}$/.test(str);\n },\n isTxHash(str) {\n return str.length === 64;\n },\n },\n cosmos: {\n isAddress(str) {\n return /^cosmos{1}[a-zA-Z\\d]{39}$/.test(str);\n },\n isTxHash(str) {\n return str.length === 64 && cryptoValidators.isHex(str);\n },\n },\n solana: {\n isAddress(str) {\n return /^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(str);\n },\n isTxHash(str) {\n return /^[1-9A-HJ-NP-Za-km-z]{77,88}$/.test(str);\n },\n },\n binanceSmartChain: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n polygon: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n filecoin: {\n isAddress(str) {\n return /^(f0|f1|f2|f3)/.test(str);\n },\n isTxHash(str) {\n return str.length === 62 && /^bafy2bza/.test(str);\n },\n },\n optimism: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n avalanche: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n arbitrum: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n tron: {\n isAddress(str) {\n return addressValidator.validate(str, 'tron');\n },\n isTxHash(str) {\n return str.length === 64 && cryptoValidators.isHex(str);\n },\n },\n fantom: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n celo: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n ethereumClassic: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n mobilecoin: {\n isAddress(str) {\n return str.length === 24 && /^[A-Za-z0-9+/]+={0,2}$/.test(str);\n },\n isTxHash(str) {\n return str.length === 64 && cryptoValidators.isHex(str);\n },\n },\n sui: {\n isAddress(str) {\n return str.length === 66 && /^[A-Za-z0-9+/]+$/.test(str);\n },\n isTxHash(str) {\n return str.length === 44;\n },\n },\n flare: {\n isAddress(str) {\n return str.length === 42 && /^[A-Za-z0-9+/]+$/.test(str);\n },\n isTxHash(str) {\n return str.length === 66;\n },\n },\n ton: {\n isAddress(str) {\n return /^[A-Za-z0-9+/]{64}$/.test(str);\n },\n isTxHash(str) {\n return /^[A-Za-z0-9+/]{64}$/.test(str);\n },\n },\n gnosis: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n dydx: {\n isAddress(str) {\n return /^[a-z]+1[a-zA-Z0-9]{38}$/.test(str) || str === 'dydx_chain';\n },\n isTxHash(str) {\n return str.length === 64 && cryptoValidators.isHex(str);\n },\n },\n hederaHashgraph: {\n isAddress(str) {\n return /^\\d+\\.\\d+\\.\\d+$/.test(str);\n },\n isTxHash(str) {\n return /^[xa-f0-9+/]{98}$/.test(str);\n },\n },\n aptos: {\n isAddress(str) {\n return str.length <= 66 && cryptoValidators.isHex(str);\n },\n isTxHash(str) {\n return cryptoValidators.isHex(str);\n },\n },\n zksync: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n haqq: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 64 && cryptoValidators.isHex(str);\n },\n },\n base: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n corechain: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n worldchain: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n injective: {\n isAddress(str) {\n return /^[a-z0-9]+$/i.test(str);\n },\n isTxHash(str) {\n return str.length === 64 && cryptoValidators.isHex(str);\n },\n },\n linea: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n xdc: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n internetcomputer: {\n isAddress(str) {\n return cryptoValidators.isHex(str);\n },\n isTxHash(str) {\n return cryptoValidators.isHex(str);\n },\n },\n unichain: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n sei: {\n isAddress(str) {\n return /^[a-z0-9]+$/i.test(str);\n },\n isTxHash(str) {\n return (str.length === 64 && cryptoValidators.isHex(str)) || (str.length === 66 && cryptoValidators.isHexStrict(str));\n },\n },\n bittensor: {\n isAddress(str) {\n return addressValidator.validate(str, 'dot');\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n codex: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n mantra: {\n isAddress(str) {\n return /^[a-z0-9]+$/i.test(str);\n },\n isTxHash(str) {\n return str.length === 64 && cryptoValidators.isHex(str);\n },\n },\n nillion: {\n isAddress(str) {\n return /^[a-z0-9]+$/i.test(str);\n },\n isTxHash(str) {\n return str.length === 64 && cryptoValidators.isHex(str);\n },\n },\n canton: {\n isAddress(str) {\n return str.length > 1;\n },\n isTxHash(str) {\n return cryptoValidators.isHex(str) && str.length === 68;\n },\n },\n starknet: {\n isAddress(str) {\n return cryptoValidators.isHex(str);\n },\n isTxHash(str) {\n return cryptoValidators.isHex(str);\n },\n },\n noble: {\n isAddress(str) {\n return /^[a-z0-9]+$/i.test(str);\n },\n isTxHash(str) {\n return str.length === 64 && cryptoValidators.isHex(str);\n },\n },\n assethub: {\n isAddress(str) {\n return addressValidator.validate(str, 'dot');\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n plasma: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n ink: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n xlayer: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n monad: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n hyperevm: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n tempo: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n morph: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n etherlink: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n edgex: {\n isAddress(str) {\n return cryptoValidators.isAddress(str);\n },\n isTxHash(str) {\n return str.length === 66 && cryptoValidators.isHexStrict(str);\n },\n },\n};\n\nObject.keys(V).forEach((k) => {\n const v = V[k];\n // don't trigger validation with null values (prevents swagger 500 error)\n validations[k] = (x) => (x === null ? false : v(x));\n});\n\nmodule.exports = validations;\n"]}
|
package/package.json
CHANGED
|
@@ -1,69 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ellipticltd/aml-utils",
|
|
3
|
-
"version": "0.16.
|
|
4
|
-
"description": "Utilities, helpers, validations, type-checking, etc",
|
|
5
|
-
"engines": {
|
|
6
|
-
"node": "18.19.0",
|
|
7
|
-
"npm": "10.0.0"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+ssh://git@bitbucket.org/elliptic/aml-utils.git"
|
|
12
|
-
},
|
|
13
|
-
"homepage": "https://bitbucket.org/elliptic/aml-utils#readme",
|
|
14
|
-
"main": "dist/index.js",
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "tsc",
|
|
17
|
-
"build:dev": "tsc --watch",
|
|
18
|
-
"test:unit": "ts-mocha --reporter spec \"lib/**/*.spec.js\" --watch-extensions js,ts",
|
|
19
|
-
"prepublishOnly": "npm run build",
|
|
20
|
-
"lint": "./node_modules/.bin/eslint --color 'lib/**/*.{js,ts}' 'test/**/*.js' ",
|
|
21
|
-
"test": "nyc npm run test:unit && nyc report --reporter=html",
|
|
22
|
-
"coverage": "nyc npm run test:unit && nyc report --reporter=lcov --reporter=text-lcov | codecov --pipe",
|
|
23
|
-
"prepare": "npm run snyk-protect",
|
|
24
|
-
"snyk-protect": "snyk-protect"
|
|
25
|
-
},
|
|
26
|
-
"author": "Adam Joyce <adam@ellipitc.co>",
|
|
27
|
-
"license": "MIT",
|
|
3
|
+
"version": "0.16.28",
|
|
28
4
|
"dependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"bitcore-lib": "^8.22.2",
|
|
5
|
+
"@stellar/stellar-base": "^14.0.3",
|
|
31
6
|
"create-error": "0.3.1",
|
|
32
7
|
"eip55": "^2.1.1",
|
|
33
|
-
"lodash": "^4.17.
|
|
8
|
+
"lodash": "^4.17.21",
|
|
34
9
|
"multicoin-address-validator": "^0.5.2",
|
|
35
|
-
"stellar-sdk": "4.0.2",
|
|
36
10
|
"type-check": "0.3.2",
|
|
37
|
-
"validator": "10.10.0"
|
|
38
|
-
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@commitlint/cli": "^11.0.0",
|
|
41
|
-
"@commitlint/config-angular": "^11.0.0",
|
|
42
|
-
"@commitlint/config-conventional": "^11.0.0",
|
|
43
|
-
"@semantic-release/git": "^9.0.0",
|
|
44
|
-
"@types/chai": "^4.2.14",
|
|
45
|
-
"@types/lodash": "^4.14.164",
|
|
46
|
-
"@types/mocha": "^8.0.3",
|
|
47
|
-
"@typescript-eslint/parser": "^4.6.1",
|
|
48
|
-
"chai": "^4.2.0",
|
|
49
|
-
"codecov": "^3.6.1",
|
|
50
|
-
"eslint": "^7.2.0",
|
|
51
|
-
"eslint-config-airbnb-base": "^14.2.0",
|
|
52
|
-
"eslint-import-resolver-typescript": "^2.3.0",
|
|
53
|
-
"eslint-plugin-chai-friendly": "^0.4.1",
|
|
54
|
-
"eslint-plugin-coffeescript": "^1.0.0",
|
|
55
|
-
"eslint-plugin-import": "^2.18.2",
|
|
56
|
-
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
57
|
-
"husky": "^4.3.0",
|
|
58
|
-
"mocha": "^8.2.1",
|
|
59
|
-
"mocha-lcov-reporter": "^1.3.0",
|
|
60
|
-
"nyc": "^14.1.1",
|
|
61
|
-
"semantic-release": "^17.2.2",
|
|
62
|
-
"sinon": "^9.2.1",
|
|
63
|
-
"sinon-chai": "^3.5.0",
|
|
64
|
-
"ts-mocha": "^8.0.0",
|
|
65
|
-
"ts-node": "^9.0.0",
|
|
66
|
-
"typescript": "^4.0.5"
|
|
11
|
+
"validator": "10.10.0",
|
|
12
|
+
"tslib": "1.14.1"
|
|
67
13
|
},
|
|
68
|
-
"
|
|
14
|
+
"main": "./lib/index.js",
|
|
15
|
+
"type": "commonjs"
|
|
69
16
|
}
|
package/.circleci/config.yml
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
version: 2.1
|
|
2
|
-
|
|
3
|
-
executors:
|
|
4
|
-
node-18:
|
|
5
|
-
docker:
|
|
6
|
-
- image: cimg/node:18.19.0
|
|
7
|
-
working_directory: /tmp/workspace
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
install:
|
|
11
|
-
executor: node-18
|
|
12
|
-
steps:
|
|
13
|
-
- checkout
|
|
14
|
-
- restore_cache:
|
|
15
|
-
keys:
|
|
16
|
-
- npm-cache-{{ checksum "package-lock.json" }}
|
|
17
|
-
- run:
|
|
18
|
-
name: install node modules
|
|
19
|
-
command: |
|
|
20
|
-
npm i
|
|
21
|
-
- save_cache:
|
|
22
|
-
key: npm-cache-{{ checksum "package-lock.json" }}
|
|
23
|
-
paths:
|
|
24
|
-
- node_modules
|
|
25
|
-
- persist_to_workspace:
|
|
26
|
-
root: /tmp
|
|
27
|
-
paths:
|
|
28
|
-
- workspace
|
|
29
|
-
|
|
30
|
-
unit_test:
|
|
31
|
-
executor: node-18
|
|
32
|
-
steps:
|
|
33
|
-
- attach_workspace:
|
|
34
|
-
at: /tmp
|
|
35
|
-
- run:
|
|
36
|
-
name: unit_test
|
|
37
|
-
command: npm run coverage
|
|
38
|
-
- store_artifacts:
|
|
39
|
-
path: coverage
|
|
40
|
-
|
|
41
|
-
lint:
|
|
42
|
-
executor: node-18
|
|
43
|
-
steps:
|
|
44
|
-
- attach_workspace:
|
|
45
|
-
at: /tmp
|
|
46
|
-
- run:
|
|
47
|
-
name: lint
|
|
48
|
-
command: npm run lint
|
|
49
|
-
|
|
50
|
-
semantic_release:
|
|
51
|
-
executor: node-18
|
|
52
|
-
steps:
|
|
53
|
-
- checkout
|
|
54
|
-
- attach_workspace:
|
|
55
|
-
at: /tmp
|
|
56
|
-
- add_ssh_keys:
|
|
57
|
-
fingerprints:
|
|
58
|
-
- "14:c6:29:a4:9e:45:36:d2:0e:e9:be:41:35:d7:06:23"
|
|
59
|
-
- run:
|
|
60
|
-
command: npx semantic-release
|
|
61
|
-
|
|
62
|
-
workflows:
|
|
63
|
-
version: 2.1
|
|
64
|
-
build-test-deploy:
|
|
65
|
-
jobs:
|
|
66
|
-
- install:
|
|
67
|
-
context: npm
|
|
68
|
-
|
|
69
|
-
- unit_test:
|
|
70
|
-
context: npm
|
|
71
|
-
requires:
|
|
72
|
-
- install
|
|
73
|
-
|
|
74
|
-
- lint:
|
|
75
|
-
context: npm
|
|
76
|
-
requires:
|
|
77
|
-
- install
|
|
78
|
-
|
|
79
|
-
- semantic_release:
|
|
80
|
-
context: npm
|
|
81
|
-
requires:
|
|
82
|
-
- lint
|
|
83
|
-
- unit_test
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
# VS Code Extension Version: 1.5.1
|
package/.eslintrc
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["airbnb-base"],
|
|
3
|
-
"overrides": [
|
|
4
|
-
{
|
|
5
|
-
"files": [
|
|
6
|
-
"*.ts"
|
|
7
|
-
],
|
|
8
|
-
"parser": "@typescript-eslint/parser",
|
|
9
|
-
"parserOptions": {
|
|
10
|
-
"project": "tsconfig.json"
|
|
11
|
-
},
|
|
12
|
-
"rules": {
|
|
13
|
-
"no-unused-vars": 0
|
|
14
|
-
// annoyingly this must be switched off
|
|
15
|
-
// https://github.com/typescript-eslint/typescript-eslint/issues/46
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"files": [
|
|
20
|
-
"*.spec.js"
|
|
21
|
-
],
|
|
22
|
-
"env": {
|
|
23
|
-
"mocha": true
|
|
24
|
-
},
|
|
25
|
-
"rules": {
|
|
26
|
-
"no-unused-expressions": 0,
|
|
27
|
-
"chai-friendly/no-unused-expressions": 2
|
|
28
|
-
},
|
|
29
|
-
"plugins": [
|
|
30
|
-
"chai-friendly"
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"rules": {
|
|
35
|
-
"no-underscore-dangle": 0,
|
|
36
|
-
"prefer-object-spread": 0,
|
|
37
|
-
"new-parens": 0,
|
|
38
|
-
"import/extensions": 0
|
|
39
|
-
},
|
|
40
|
-
"settings": {
|
|
41
|
-
"import/resolver": {
|
|
42
|
-
"typescript": {}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
package/.huskyrc
DELETED
package/.mocharc.json
DELETED
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
18.19.0
|
package/.nycrc.json
DELETED
package/.releaserc.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"branches": [
|
|
3
|
-
"master",
|
|
4
|
-
{
|
|
5
|
-
"name": "*",
|
|
6
|
-
"prerelease": true
|
|
7
|
-
}
|
|
8
|
-
],
|
|
9
|
-
"plugins": [
|
|
10
|
-
"@semantic-release/commit-analyzer",
|
|
11
|
-
"@semantic-release/npm",
|
|
12
|
-
[ "@semantic-release/git", {
|
|
13
|
-
"assets": ["package.json"],
|
|
14
|
-
"message": "chore(release): ${nextRelease.version} [skip ci]"
|
|
15
|
-
}]
|
|
16
|
-
],
|
|
17
|
-
"repositoryUrl": "git@bitbucket.org:elliptic/aml-utils.git"
|
|
18
|
-
}
|
package/.snyk
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
|
2
|
-
version: v1.25.0
|
|
3
|
-
ignore: {}
|
|
4
|
-
# patches apply the minimum changes required to fix a vulnerability
|
|
5
|
-
patch:
|
|
6
|
-
SNYK-JS-LODASH-567746:
|
|
7
|
-
- stellar-sdk > lodash:
|
|
8
|
-
patched: '2022-11-24T10:44:51.115Z'
|
|
9
|
-
- stellar-sdk > stellar-base > lodash:
|
|
10
|
-
patched: '2022-11-24T10:44:51.115Z'
|
|
11
|
-
- stellar-sdk > stellar-base > js-xdr > lodash:
|
|
12
|
-
patched: '2022-11-24T10:44:51.115Z'
|
package/codecov.yml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
codecov:
|
|
2
|
-
require_ci_to_pass: yes
|
|
3
|
-
|
|
4
|
-
coverage:
|
|
5
|
-
precision: 2
|
|
6
|
-
round: down
|
|
7
|
-
range: "70...100"
|
|
8
|
-
|
|
9
|
-
status:
|
|
10
|
-
project:
|
|
11
|
-
default:
|
|
12
|
-
target: 85%
|
|
13
|
-
patch:
|
|
14
|
-
default:
|
|
15
|
-
target: 85%
|
|
16
|
-
changes: no
|
|
17
|
-
|
|
18
|
-
parsers:
|
|
19
|
-
gcov:
|
|
20
|
-
branch_detection:
|
|
21
|
-
conditional: yes
|
|
22
|
-
loop: yes
|
|
23
|
-
method: no
|
|
24
|
-
macro: no
|
|
25
|
-
|
|
26
|
-
comment:
|
|
27
|
-
layout: "reach,diff,flags,tree"
|
|
28
|
-
behavior: default
|
|
29
|
-
require_changes: no
|
package/commitlint.config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = { extends: ['@commitlint/config-angular'] };
|
package/dist/errors/errors.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const create = require('create-error');
|
|
3
|
-
const AppError = create('AppError');
|
|
4
|
-
const RequestError = create(AppError, 'RequestError');
|
|
5
|
-
RequestError.toJSON = () => ({
|
|
6
|
-
message: this.message,
|
|
7
|
-
});
|
|
8
|
-
const Forbidden = create(RequestError, 'ForbiddenError', {
|
|
9
|
-
status: 403,
|
|
10
|
-
});
|
|
11
|
-
const Unauthorized = create(RequestError, 'UnauthorizedError', {
|
|
12
|
-
status: 401,
|
|
13
|
-
});
|
|
14
|
-
const BadRequest = create(RequestError, 'BadRequestError', {
|
|
15
|
-
status: 400,
|
|
16
|
-
});
|
|
17
|
-
const NotFound = create(RequestError, 'NotFoundError', {
|
|
18
|
-
status: 404,
|
|
19
|
-
});
|
|
20
|
-
const ConflictError = create(RequestError, 'ConflictError', {
|
|
21
|
-
status: 409,
|
|
22
|
-
});
|
|
23
|
-
const ServerError = create(RequestError, 'ServerError', {
|
|
24
|
-
status: 500,
|
|
25
|
-
});
|
|
26
|
-
const InvalidArguments = create(RequestError, 'InvalidArgumentsError', {
|
|
27
|
-
status: 500,
|
|
28
|
-
});
|
|
29
|
-
const ServerTimeout = create(RequestError, 'ServerTimeoutError', {
|
|
30
|
-
status: 503,
|
|
31
|
-
});
|
|
32
|
-
module.exports = {
|
|
33
|
-
RequestError,
|
|
34
|
-
ServerError,
|
|
35
|
-
Forbidden,
|
|
36
|
-
Unauthorized,
|
|
37
|
-
BadRequest,
|
|
38
|
-
NotFound,
|
|
39
|
-
ConflictError,
|
|
40
|
-
InvalidArguments,
|
|
41
|
-
ServerTimeout,
|
|
42
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const { RequestError, Forbidden, Unauthorized, BadRequest, NotFound, } = require('./errors');
|
|
3
|
-
describe('lib/error', () => {
|
|
4
|
-
describe('RequestError', () => {
|
|
5
|
-
it('should inherit from Error', () => (new RequestError instanceof Error).should.be.true);
|
|
6
|
-
describe('Forbidden Error', () => {
|
|
7
|
-
it('should inherit from Error', () => new Forbidden instanceof Error);
|
|
8
|
-
return it('should inherit from RequestError', () => new Forbidden instanceof RequestError);
|
|
9
|
-
});
|
|
10
|
-
describe('Unauthorized Error', () => {
|
|
11
|
-
it('should inherit from Error', () => new Unauthorized instanceof Error);
|
|
12
|
-
return it('should inherit from RequestError', () => new Unauthorized instanceof RequestError);
|
|
13
|
-
});
|
|
14
|
-
describe('BadRequest Error', () => {
|
|
15
|
-
it('should inherit from Error', () => new BadRequest instanceof Error);
|
|
16
|
-
return it('should inherit from RequestError', () => new BadRequest instanceof RequestError);
|
|
17
|
-
});
|
|
18
|
-
return describe('NotFound Error', () => {
|
|
19
|
-
it('should inherit from Error', () => new NotFound instanceof Error);
|
|
20
|
-
return it('should inherit from RequestError', () => new NotFound instanceof RequestError);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
const sinon_1 = __importDefault(require("sinon"));
|
|
26
|
-
const chai_1 = require("chai");
|
|
27
|
-
const file_parser_1 = __importDefault(require("../file-parser"));
|
|
28
|
-
const sanitizeRows = __importStar(require("../sanitzeRows"));
|
|
29
|
-
const parseRow = __importStar(require("../parse-row"));
|
|
30
|
-
describe('file-parser', () => {
|
|
31
|
-
const dependencies = {
|
|
32
|
-
processRow: sinon_1.default.spy(),
|
|
33
|
-
};
|
|
34
|
-
const parsedRows = [];
|
|
35
|
-
let mockParseRow;
|
|
36
|
-
let mockSanitizeRows;
|
|
37
|
-
let mockSetTimeout;
|
|
38
|
-
before(() => {
|
|
39
|
-
mockParseRow = sinon_1.default.stub(parseRow, 'default').returns(parsedRows);
|
|
40
|
-
mockSanitizeRows = sinon_1.default.stub(sanitizeRows, 'default').returns([{}]);
|
|
41
|
-
mockSetTimeout = sinon_1.default.stub(global, 'setTimeout').callsFake((callback) => callback());
|
|
42
|
-
});
|
|
43
|
-
beforeEach(() => {
|
|
44
|
-
sinon_1.default.resetHistory();
|
|
45
|
-
});
|
|
46
|
-
after(() => {
|
|
47
|
-
sinon_1.default.restore();
|
|
48
|
-
});
|
|
49
|
-
it('should call parseRow once per input new line', async () => {
|
|
50
|
-
const input = '\n';
|
|
51
|
-
await file_parser_1.default(input, 50, dependencies);
|
|
52
|
-
chai_1.expect(mockParseRow).to.be.calledTwice;
|
|
53
|
-
});
|
|
54
|
-
it('should call pass parseRow result into sanitizeRows', async () => {
|
|
55
|
-
const input = '\n';
|
|
56
|
-
await file_parser_1.default(input, 50, dependencies);
|
|
57
|
-
chai_1.expect(mockSanitizeRows).to.be.calledOnce;
|
|
58
|
-
chai_1.expect(mockSanitizeRows).to.be.deep.calledWith([[], []], dependencies.processRow);
|
|
59
|
-
});
|
|
60
|
-
it('should throw error when number of rows is more than max rows', async () => {
|
|
61
|
-
const input = '\n';
|
|
62
|
-
mockSanitizeRows.returns(new Array(20));
|
|
63
|
-
try {
|
|
64
|
-
await file_parser_1.default(input, 10, dependencies);
|
|
65
|
-
chai_1.expect(1).to.equal(2);
|
|
66
|
-
}
|
|
67
|
-
catch (ex) {
|
|
68
|
-
chai_1.expect(ex.name).to.equal('TooManyRowsError');
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
it('should throw error when no rows returned from sanitizeRows', async () => {
|
|
72
|
-
const input = '\n';
|
|
73
|
-
mockSanitizeRows.returns([]);
|
|
74
|
-
try {
|
|
75
|
-
await file_parser_1.default(input, 10, dependencies);
|
|
76
|
-
chai_1.expect(1).to.equal(2);
|
|
77
|
-
}
|
|
78
|
-
catch (ex) {
|
|
79
|
-
chai_1.expect(ex.name).to.equal('Error');
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
it('should throw error an error when content is "invalidFileType"', async () => {
|
|
83
|
-
const input = 'invalidFileType';
|
|
84
|
-
mockSanitizeRows.returns([]);
|
|
85
|
-
try {
|
|
86
|
-
await file_parser_1.default(input, 10, dependencies);
|
|
87
|
-
chai_1.expect(1).to.equal(2);
|
|
88
|
-
}
|
|
89
|
-
catch (ex) {
|
|
90
|
-
chai_1.expect(ex.message).to.equal('Invalid file type');
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
it('should call process row once per row in single timeout', async () => {
|
|
94
|
-
const input = '\n';
|
|
95
|
-
const fakeRows = (new Array(30)).fill({});
|
|
96
|
-
mockSanitizeRows.returns(fakeRows);
|
|
97
|
-
await file_parser_1.default(input, 70, dependencies);
|
|
98
|
-
chai_1.expect(dependencies.processRow).to.be.callCount(30);
|
|
99
|
-
chai_1.expect(mockSetTimeout).to.be.calledOnce;
|
|
100
|
-
});
|
|
101
|
-
it('should call process row once per row in two timeouts when more than 30 rows', async () => {
|
|
102
|
-
const input = '\n';
|
|
103
|
-
const fakeRows = (new Array(50)).fill({});
|
|
104
|
-
mockSanitizeRows.returns(fakeRows);
|
|
105
|
-
await file_parser_1.default(input, 70, dependencies);
|
|
106
|
-
chai_1.expect(dependencies.processRow).to.be.callCount(50);
|
|
107
|
-
chai_1.expect(mockSetTimeout).to.be.calledTwice;
|
|
108
|
-
});
|
|
109
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const chai_1 = require("chai");
|
|
7
|
-
const parse_row_1 = __importDefault(require("../parse-row"));
|
|
8
|
-
describe('parse-row', () => {
|
|
9
|
-
it('should handle tabs', () => {
|
|
10
|
-
const input = 'asdas \t asdar \t aaaaa \t bbb bb';
|
|
11
|
-
const result = parse_row_1.default(input);
|
|
12
|
-
chai_1.expect(result).to.have.length(4);
|
|
13
|
-
});
|
|
14
|
-
it('should handle comas', () => {
|
|
15
|
-
const input = 'asdas, asdar, aaaaa, bbb bb';
|
|
16
|
-
const result = parse_row_1.default(input);
|
|
17
|
-
chai_1.expect(result).to.have.length(4);
|
|
18
|
-
});
|
|
19
|
-
it('should handle spaces', () => {
|
|
20
|
-
const input = 'asdas asdar aaaaa bbb bb';
|
|
21
|
-
const result = parse_row_1.default(input);
|
|
22
|
-
chai_1.expect(result).to.have.length(4);
|
|
23
|
-
});
|
|
24
|
-
it('should handle spaces', () => {
|
|
25
|
-
const input = 'asdas asdar aaaaa bbb bb';
|
|
26
|
-
const result = parse_row_1.default(input);
|
|
27
|
-
chai_1.expect(result).to.have.length(5);
|
|
28
|
-
});
|
|
29
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|