siteversion 0.0.1-security → 0.0.2

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.

Potentially problematic release.


This version of siteversion might be problematic. Click here for more details.

Files changed (42) hide show
  1. package/index.js +56 -0
  2. package/package.json +14 -3
  3. package/proof/node_modules/dellingr/index.js +64 -0
  4. package/proof/node_modules/dellingr/package.json +41 -0
  5. package/proof/node_modules/dellingr/proof/package-lock.json +49 -0
  6. package/proof/node_modules/dellingr/proof/package.json +15 -0
  7. package/proof/node_modules/dotenv/CHANGELOG.md +347 -0
  8. package/proof/node_modules/dotenv/LICENSE +23 -0
  9. package/proof/node_modules/dotenv/README.md +406 -0
  10. package/proof/node_modules/dotenv/config.d.ts +1 -0
  11. package/proof/node_modules/dotenv/config.js +9 -0
  12. package/proof/node_modules/dotenv/lib/cli-options.js +11 -0
  13. package/proof/node_modules/dotenv/lib/env-options.js +20 -0
  14. package/proof/node_modules/dotenv/lib/main.d.ts +73 -0
  15. package/proof/node_modules/dotenv/lib/main.js +109 -0
  16. package/proof/node_modules/dotenv/package.json +86 -0
  17. package/proof/node_modules/node-fetch/LICENSE.md +22 -0
  18. package/proof/node_modules/node-fetch/README.md +590 -0
  19. package/proof/node_modules/node-fetch/browser.js +25 -0
  20. package/proof/node_modules/node-fetch/lib/index.es.js +1688 -0
  21. package/proof/node_modules/node-fetch/lib/index.js +1697 -0
  22. package/proof/node_modules/node-fetch/lib/index.mjs +1686 -0
  23. package/proof/node_modules/node-fetch/package.json +106 -0
  24. package/proof/node_modules/tr46/index.js +193 -0
  25. package/proof/node_modules/tr46/lib/.gitkeep +0 -0
  26. package/proof/node_modules/tr46/lib/mappingTable.json +1 -0
  27. package/proof/node_modules/tr46/package.json +62 -0
  28. package/proof/node_modules/webidl-conversions/LICENSE.md +12 -0
  29. package/proof/node_modules/webidl-conversions/README.md +53 -0
  30. package/proof/node_modules/webidl-conversions/lib/index.js +189 -0
  31. package/proof/node_modules/webidl-conversions/package.json +62 -0
  32. package/proof/node_modules/whatwg-url/LICENSE.txt +21 -0
  33. package/proof/node_modules/whatwg-url/README.md +67 -0
  34. package/proof/node_modules/whatwg-url/lib/URL-impl.js +200 -0
  35. package/proof/node_modules/whatwg-url/lib/URL.js +196 -0
  36. package/proof/node_modules/whatwg-url/lib/public-api.js +11 -0
  37. package/proof/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
  38. package/proof/node_modules/whatwg-url/lib/utils.js +20 -0
  39. package/proof/node_modules/whatwg-url/package.json +70 -0
  40. package/proof/package-lock.json +49 -0
  41. package/proof/package.json +15 -0
  42. package/README.md +0 -5
@@ -0,0 +1,106 @@
1
+ {
2
+ "_args": [
3
+ [
4
+ "node-fetch@2.6.7",
5
+ "/Users/joseantonio/Projetos/night-watch/night-watch/temp/troiano/proof"
6
+ ]
7
+ ],
8
+ "_from": "node-fetch@2.6.7",
9
+ "_id": "node-fetch@2.6.7",
10
+ "_inBundle": false,
11
+ "_integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
12
+ "_location": "/node-fetch",
13
+ "_phantomChildren": {},
14
+ "_requested": {
15
+ "type": "version",
16
+ "registry": true,
17
+ "raw": "node-fetch@2.6.7",
18
+ "name": "node-fetch",
19
+ "escapedName": "node-fetch",
20
+ "rawSpec": "2.6.7",
21
+ "saveSpec": null,
22
+ "fetchSpec": "2.6.7"
23
+ },
24
+ "_requiredBy": [
25
+ "/dellingr"
26
+ ],
27
+ "_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
28
+ "_spec": "2.6.7",
29
+ "_where": "/Users/joseantonio/Projetos/night-watch/night-watch/temp/troiano/proof",
30
+ "author": {
31
+ "name": "David Frank"
32
+ },
33
+ "browser": "./browser.js",
34
+ "bugs": {
35
+ "url": "https://github.com/bitinn/node-fetch/issues"
36
+ },
37
+ "dependencies": {
38
+ "whatwg-url": "^5.0.0"
39
+ },
40
+ "description": "A light-weight module that brings window.fetch to node.js",
41
+ "devDependencies": {
42
+ "@ungap/url-search-params": "^0.1.2",
43
+ "abort-controller": "^1.1.0",
44
+ "abortcontroller-polyfill": "^1.3.0",
45
+ "babel-core": "^6.26.3",
46
+ "babel-plugin-istanbul": "^4.1.6",
47
+ "babel-preset-env": "^1.6.1",
48
+ "babel-register": "^6.16.3",
49
+ "chai": "^3.5.0",
50
+ "chai-as-promised": "^7.1.1",
51
+ "chai-iterator": "^1.1.1",
52
+ "chai-string": "~1.3.0",
53
+ "codecov": "3.3.0",
54
+ "cross-env": "^5.2.0",
55
+ "form-data": "^2.3.3",
56
+ "is-builtin-module": "^1.0.0",
57
+ "mocha": "^5.0.0",
58
+ "nyc": "11.9.0",
59
+ "parted": "^0.1.1",
60
+ "promise": "^8.0.3",
61
+ "resumer": "0.0.0",
62
+ "rollup": "^0.63.4",
63
+ "rollup-plugin-babel": "^3.0.7",
64
+ "string-to-arraybuffer": "^1.0.2",
65
+ "teeny-request": "3.7.0"
66
+ },
67
+ "engines": {
68
+ "node": "4.x || >=6.0.0"
69
+ },
70
+ "files": [
71
+ "lib/index.js",
72
+ "lib/index.mjs",
73
+ "lib/index.es.js",
74
+ "browser.js"
75
+ ],
76
+ "homepage": "https://github.com/bitinn/node-fetch",
77
+ "keywords": [
78
+ "fetch",
79
+ "http",
80
+ "promise"
81
+ ],
82
+ "license": "MIT",
83
+ "main": "lib/index.js",
84
+ "module": "lib/index.mjs",
85
+ "name": "node-fetch",
86
+ "peerDependencies": {
87
+ "encoding": "^0.1.0"
88
+ },
89
+ "peerDependenciesMeta": {
90
+ "encoding": {
91
+ "optional": true
92
+ }
93
+ },
94
+ "repository": {
95
+ "type": "git",
96
+ "url": "git+https://github.com/bitinn/node-fetch.git"
97
+ },
98
+ "scripts": {
99
+ "build": "cross-env BABEL_ENV=rollup rollup -c",
100
+ "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json",
101
+ "prepare": "npm run build",
102
+ "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js",
103
+ "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js"
104
+ },
105
+ "version": "2.6.7"
106
+ }
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+
3
+ var punycode = require("punycode");
4
+ var mappingTable = require("./lib/mappingTable.json");
5
+
6
+ var PROCESSING_OPTIONS = {
7
+ TRANSITIONAL: 0,
8
+ NONTRANSITIONAL: 1
9
+ };
10
+
11
+ function normalize(str) { // fix bug in v8
12
+ return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000');
13
+ }
14
+
15
+ function findStatus(val) {
16
+ var start = 0;
17
+ var end = mappingTable.length - 1;
18
+
19
+ while (start <= end) {
20
+ var mid = Math.floor((start + end) / 2);
21
+
22
+ var target = mappingTable[mid];
23
+ if (target[0][0] <= val && target[0][1] >= val) {
24
+ return target;
25
+ } else if (target[0][0] > val) {
26
+ end = mid - 1;
27
+ } else {
28
+ start = mid + 1;
29
+ }
30
+ }
31
+
32
+ return null;
33
+ }
34
+
35
+ var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
36
+
37
+ function countSymbols(string) {
38
+ return string
39
+ // replace every surrogate pair with a BMP symbol
40
+ .replace(regexAstralSymbols, '_')
41
+ // then get the length
42
+ .length;
43
+ }
44
+
45
+ function mapChars(domain_name, useSTD3, processing_option) {
46
+ var hasError = false;
47
+ var processed = "";
48
+
49
+ var len = countSymbols(domain_name);
50
+ for (var i = 0; i < len; ++i) {
51
+ var codePoint = domain_name.codePointAt(i);
52
+ var status = findStatus(codePoint);
53
+
54
+ switch (status[1]) {
55
+ case "disallowed":
56
+ hasError = true;
57
+ processed += String.fromCodePoint(codePoint);
58
+ break;
59
+ case "ignored":
60
+ break;
61
+ case "mapped":
62
+ processed += String.fromCodePoint.apply(String, status[2]);
63
+ break;
64
+ case "deviation":
65
+ if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {
66
+ processed += String.fromCodePoint.apply(String, status[2]);
67
+ } else {
68
+ processed += String.fromCodePoint(codePoint);
69
+ }
70
+ break;
71
+ case "valid":
72
+ processed += String.fromCodePoint(codePoint);
73
+ break;
74
+ case "disallowed_STD3_mapped":
75
+ if (useSTD3) {
76
+ hasError = true;
77
+ processed += String.fromCodePoint(codePoint);
78
+ } else {
79
+ processed += String.fromCodePoint.apply(String, status[2]);
80
+ }
81
+ break;
82
+ case "disallowed_STD3_valid":
83
+ if (useSTD3) {
84
+ hasError = true;
85
+ }
86
+
87
+ processed += String.fromCodePoint(codePoint);
88
+ break;
89
+ }
90
+ }
91
+
92
+ return {
93
+ string: processed,
94
+ error: hasError
95
+ };
96
+ }
97
+
98
+ var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;
99
+
100
+ function validateLabel(label, processing_option) {
101
+ if (label.substr(0, 4) === "xn--") {
102
+ label = punycode.toUnicode(label);
103
+ processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;
104
+ }
105
+
106
+ var error = false;
107
+
108
+ if (normalize(label) !== label ||
109
+ (label[3] === "-" && label[4] === "-") ||
110
+ label[0] === "-" || label[label.length - 1] === "-" ||
111
+ label.indexOf(".") !== -1 ||
112
+ label.search(combiningMarksRegex) === 0) {
113
+ error = true;
114
+ }
115
+
116
+ var len = countSymbols(label);
117
+ for (var i = 0; i < len; ++i) {
118
+ var status = findStatus(label.codePointAt(i));
119
+ if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") ||
120
+ (processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&
121
+ status[1] !== "valid" && status[1] !== "deviation")) {
122
+ error = true;
123
+ break;
124
+ }
125
+ }
126
+
127
+ return {
128
+ label: label,
129
+ error: error
130
+ };
131
+ }
132
+
133
+ function processing(domain_name, useSTD3, processing_option) {
134
+ var result = mapChars(domain_name, useSTD3, processing_option);
135
+ result.string = normalize(result.string);
136
+
137
+ var labels = result.string.split(".");
138
+ for (var i = 0; i < labels.length; ++i) {
139
+ try {
140
+ var validation = validateLabel(labels[i]);
141
+ labels[i] = validation.label;
142
+ result.error = result.error || validation.error;
143
+ } catch(e) {
144
+ result.error = true;
145
+ }
146
+ }
147
+
148
+ return {
149
+ string: labels.join("."),
150
+ error: result.error
151
+ };
152
+ }
153
+
154
+ module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {
155
+ var result = processing(domain_name, useSTD3, processing_option);
156
+ var labels = result.string.split(".");
157
+ labels = labels.map(function(l) {
158
+ try {
159
+ return punycode.toASCII(l);
160
+ } catch(e) {
161
+ result.error = true;
162
+ return l;
163
+ }
164
+ });
165
+
166
+ if (verifyDnsLength) {
167
+ var total = labels.slice(0, labels.length - 1).join(".").length;
168
+ if (total.length > 253 || total.length === 0) {
169
+ result.error = true;
170
+ }
171
+
172
+ for (var i=0; i < labels.length; ++i) {
173
+ if (labels.length > 63 || labels.length === 0) {
174
+ result.error = true;
175
+ break;
176
+ }
177
+ }
178
+ }
179
+
180
+ if (result.error) return null;
181
+ return labels.join(".");
182
+ };
183
+
184
+ module.exports.toUnicode = function(domain_name, useSTD3) {
185
+ var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);
186
+
187
+ return {
188
+ domain: result.string,
189
+ error: result.error
190
+ };
191
+ };
192
+
193
+ module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
File without changes