summaryrefslogtreecommitdiff
path: root/includes/external/signal/node_modules/.bin/sdp-verify
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2024-03-30 23:40:33 +0100
committerRaindropsSys <raindrops@equestria.dev>2024-03-30 23:40:33 +0100
commit6b796258d413f00e498ce7f80f73a9f6c061f29c (patch)
tree49e64a5dd4cde2acff7f0a93ed3f8e20e1cb2dc8 /includes/external/signal/node_modules/.bin/sdp-verify
parent5860551daa0f60103ad24e93da29f401a653f144 (diff)
downloadpluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.tar.gz
pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.tar.bz2
pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.zip
Updated 5 files, added 2 files, deleted 495 files and renamed 7 files (automated)
Diffstat (limited to 'includes/external/signal/node_modules/.bin/sdp-verify')
-rw-r--r--includes/external/signal/node_modules/.bin/sdp-verify47
1 files changed, 0 insertions, 47 deletions
diff --git a/includes/external/signal/node_modules/.bin/sdp-verify b/includes/external/signal/node_modules/.bin/sdp-verify
deleted file mode 100644
index cf88a90..0000000
--- a/includes/external/signal/node_modules/.bin/sdp-verify
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env node
-
-var transform = require('./')
- , file = require('path').join(process.cwd(), process.argv[2])
- , sdp = require('fs').readFileSync(file).toString()
- , parsed = transform.parse(sdp)
- , written = transform.write(parsed)
- , writtenLines = written.split('\r\n')
- , origLines = sdp.split('\r\n')
- , numMissing = 0
- , numNew = 0
- ;
-
-var parseFails = 0;
-parsed.media.forEach(function (media) {
- (media.invalid || []).forEach(function (inv) {
- console.warn('unrecognized a=' + inv.value + ' belonging to m=' + media.type);
- parseFails += 1;
- });
-});
-var parseStr = parseFails + ' unrecognized line(s) copied blindly';
-
-origLines.forEach(function (line, i) {
- if (writtenLines.indexOf(line) < 0) {
- console.error('l' + i + ' lost (' + line + ')');
- numMissing += 1;
- }
-});
-
-writtenLines.forEach(function (line, i) {
- if (origLines.indexOf(line) < 0) {
- console.error('l' + i + ' new (' + line + ')');
- numNew += 1;
- }
-});
-
-var failed = (numMissing > 0 || numNew > 0);
-if (failed) {
- console.log('\n' + file + ' changes during transform:');
- console.log(numMissing + ' missing line(s), ' + numNew + ' new line(s)%s',
- parseFails > 0 ? ', ' + parseStr : ''
- );
-}
-else {
- console.log(file + ' verified%s', parseFails > 0 ? ', but had ' + parseStr : '');
-}
-process.exit(failed ? 1 : 0);