fcdns 0.5.7 → 0.5.8
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/dist/cli.cjs +20 -18
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -20301,7 +20301,7 @@ exports.getRouteResult = (0, extra_lazy_1.withLazyStatic)(function (hostname) {
|
|
|
20301
20301
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
20302
20302
|
|
|
20303
20303
|
"use strict";
|
|
20304
|
-
var __dirname =
|
|
20304
|
+
var __dirname = "lib";
|
|
20305
20305
|
|
|
20306
20306
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
20307
20307
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -29062,24 +29062,27 @@ const errors_1 = __webpack_require__(26);
|
|
|
29062
29062
|
const extra_lazy_1 = __webpack_require__(441);
|
|
29063
29063
|
exports.migrate = (0, extra_lazy_1.withLazyStatic)(function (db, migrations, targetVersion = getMaximumVersion(migrations)) {
|
|
29064
29064
|
const maxVersion = getMaximumVersion(migrations);
|
|
29065
|
-
|
|
29066
|
-
const
|
|
29067
|
-
|
|
29068
|
-
|
|
29065
|
+
const migrate = (0, extra_lazy_1.lazyStatic)(() => db.transaction((targetVersion, maxVersion) => {
|
|
29066
|
+
const currentVersion = getDatabaseVersion(db);
|
|
29067
|
+
if (maxVersion < currentVersion) {
|
|
29068
|
+
return true;
|
|
29069
|
+
}
|
|
29070
|
+
else {
|
|
29071
|
+
if (currentVersion === targetVersion) {
|
|
29069
29072
|
return true;
|
|
29070
29073
|
}
|
|
29074
|
+
else if (currentVersion < targetVersion) {
|
|
29075
|
+
upgrade();
|
|
29076
|
+
return false;
|
|
29077
|
+
}
|
|
29071
29078
|
else {
|
|
29072
|
-
|
|
29073
|
-
|
|
29074
|
-
}
|
|
29075
|
-
else if (currentVersion < targetVersion) {
|
|
29076
|
-
upgrade();
|
|
29077
|
-
}
|
|
29078
|
-
else {
|
|
29079
|
-
downgrade();
|
|
29080
|
-
}
|
|
29079
|
+
downgrade();
|
|
29080
|
+
return false;
|
|
29081
29081
|
}
|
|
29082
|
-
}
|
|
29082
|
+
}
|
|
29083
|
+
}), [db]);
|
|
29084
|
+
while (true) {
|
|
29085
|
+
const done = migrate.immediate(targetVersion, maxVersion);
|
|
29083
29086
|
if (done)
|
|
29084
29087
|
break;
|
|
29085
29088
|
}
|
|
@@ -30356,8 +30359,7 @@ function writeSoa(buff, val, label_index) {
|
|
|
30356
30359
|
assertUndefined(val.minimum, 'SOA record requires "minimum"');
|
|
30357
30360
|
namePack(val.primary, buff, label_index);
|
|
30358
30361
|
namePack(val.admin, buff, label_index);
|
|
30359
|
-
|
|
30360
|
-
buff.writeUInt32BE(serial < 0 || serial > 4294967295 ? 0 : serial);
|
|
30362
|
+
buff.writeUInt32BE(val.serial & 0xFFFFFFFF);
|
|
30361
30363
|
buff.writeInt32BE(val.refresh & 0xFFFFFFFF);
|
|
30362
30364
|
buff.writeInt32BE(val.retry & 0xFFFFFFFF);
|
|
30363
30365
|
buff.writeInt32BE(val.expiration & 0xFFFFFFFF);
|
|
@@ -48240,7 +48242,7 @@ exports.Constructor = Constructor;
|
|
|
48240
48242
|
/***/ ((module) => {
|
|
48241
48243
|
|
|
48242
48244
|
"use strict";
|
|
48243
|
-
module.exports = JSON.parse('{"name":"fcdns","version":"0.5.
|
|
48245
|
+
module.exports = JSON.parse('{"name":"fcdns","version":"0.5.8","description":"DNS relay server with fact-checking.","keywords":["dns"],"bin":"dist/cli.cjs","files":["migrations","dist"],"repository":"git@github.com:BlackGlory/fcdns.git","author":"BlackGlory <woshenmedoubuzhidao@blackglory.me>","license":"MIT","scripts":{"prepare":"ts-patch install -s","deduplicate":"yarn-deduplicate","postinstall":"patch-package","prepublishOnly":"run-s clean build bundle","lint":"eslint --ext .js,.jsx,.ts,.tsx --quiet src","test":"jest --config jest.config.js","test:debug":"node --inspect-brk node_modules/.bin/jest --runInBand","test:coverage":"jest --coverage --config jest.config.js","clean":"rimraf lib dist","build":"run-p build:*","build:src":"tsc --project tsconfig.build.json","build:scripts":"tsc --project tsconfig.scripts.json","bundle":"webpack --stats-error-details","smoke":"node dist/cli.cjs --help","release":"standard-version","script:generate-whitelist-by-cc":"ts-node scripts/generate-whitelist-by-cc.ts","script:import-poison-test-results-from-ndjson-map-file":"ts-node scripts/import-poison-test-results-from-ndjson-map-file.ts","script:import-route-results-from-ndjson-map-file":"ts-node scripts/import-route-results-from-ndjson-map-file.ts"},"husky":{"hooks":{"pre-commit":"run-s prepare clean lint build test bundle smoke","commit-msg":"commitlint --env HUSKY_GIT_PARAMS"}},"devDependencies":{"@commitlint/cli":"^17.0.3","@commitlint/config-conventional":"^17.0.3","@types/better-sqlite3":"^7.6.0","@types/jest":"^27.4.1","@types/node":"14","@types/ping":"^0.4.1","@typescript-eslint/eslint-plugin":"^5.33.0","@typescript-eslint/parser":"^5.33.0","eslint":"^8.21.0","extra-prompts":"^0.1.3","husky":"4","internet-number":"^3.0.3","jest":"^27.5.1","npm-run-all":"^4.1.5","rimraf":"^3.0.2","standard-version":"^9.5.0","ts-jest":"^27.1.4","ts-node":"^10.9.1","ts-patch":"^2.0.2","typescript":"^4.7.4","typescript-transform-paths":"^3.3.1","webpack":"^5.74.0","webpack-cli":"^4.10.0","webpack-shebang-plugin":"^1.1.8","yarn-deduplicate":"^5.0.0"},"dependencies":{"@blackglory/better-sqlite3-migrations":"^0.1.15","@blackglory/errors":"^2.2.2","@blackglory/prelude":"^0.1.3","@blackglory/structures":"^0.6.2","address-range":"^0.2.11","better-sqlite3":"^7.6.2","chalk":"^4.1.2","commander":"^9.4.0","extra-filesystem":"^0.4.5","extra-lazy":"^1.3.1","extra-logger":"^0.6.9","extra-promise":"^2.4.1","iterable-operator":"^1.2.0","migrations-file":"^0.2.4","native-node-dns":"0.7.6","native-node-dns-packet":"0.1.5","patch-package":"^6.4.7","ping":"^0.4.2","return-style":"^1.0.0","you-died":"^0.4.1"}}');
|
|
48244
48246
|
|
|
48245
48247
|
/***/ })
|
|
48246
48248
|
/******/ ]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fcdns",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "DNS relay server with fact-checking.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dns"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"yarn-deduplicate": "^5.0.0"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@blackglory/better-sqlite3-migrations": "^0.1.
|
|
70
|
+
"@blackglory/better-sqlite3-migrations": "^0.1.15",
|
|
71
71
|
"@blackglory/errors": "^2.2.2",
|
|
72
72
|
"@blackglory/prelude": "^0.1.3",
|
|
73
73
|
"@blackglory/structures": "^0.6.2",
|