@tricoteuses/assemblee 1.0.7 → 1.1.1
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/lib/api.js +3 -9
- package/lib/api.mjs +4 -5
- package/lib/bugs/acteur-00010/plugin.test.js +3 -50
- package/lib/bugs/acteur-00010/plugin.test.mjs +1 -1
- package/lib/bugs/acteur-00010.js +2 -57
- package/lib/bugs/acteur-00010.mjs +1 -6
- package/lib/bugs/agenda-00002/plugin.test.js +3 -53
- package/lib/bugs/agenda-00002/plugin.test.mjs +1 -3
- package/lib/bugs/agenda-00002.js +3 -148
- package/lib/bugs/agenda-00002.mjs +1 -28
- package/lib/bugs/agenda-00008/plugin.test.js +3 -52
- package/lib/bugs/agenda-00008/plugin.test.mjs +1 -1
- package/lib/bugs/agenda-00008.js +2 -61
- package/lib/bugs/agenda-00008.mjs +1 -5
- package/lib/bugs/agenda-00011/plugin.test.js +5 -99
- package/lib/bugs/agenda-00011/plugin.test.mjs +3 -3
- package/lib/bugs/agenda-00011.js +4 -105
- package/lib/bugs/agenda-00011.mjs +3 -29
- package/lib/bugs.js +3 -164
- package/lib/bugs.mjs +1 -26
- package/lib/cleaners/actes_legislatifs.js +11 -115
- package/lib/cleaners/actes_legislatifs.mjs +7 -82
- package/lib/cleaners/acteurs.js +12 -92
- package/lib/cleaners/acteurs.mjs +7 -38
- package/lib/cleaners/amendements.js +10 -103
- package/lib/cleaners/amendements.mjs +4 -58
- package/lib/cleaners/documents.js +5 -67
- package/lib/cleaners/documents.mjs +1 -37
- package/lib/cleaners/dossiers_legislatifs.js +5 -61
- package/lib/cleaners/dossiers_legislatifs.mjs +1 -29
- package/lib/cleaners/index.js +1 -9
- package/lib/cleaners/index.mjs +1 -1
- package/lib/cleaners/organes.js +1 -33
- package/lib/cleaners/organes.mjs +1 -17
- package/lib/cleaners/reunions.js +4 -119
- package/lib/cleaners/reunions.mjs +1 -64
- package/lib/cleaners/scrutins.js +10 -102
- package/lib/cleaners/scrutins.mjs +1 -48
- package/lib/cleaners/xml.js +8 -42
- package/lib/cleaners/xml.mjs +6 -8
- package/lib/datasets.js +14 -113
- package/lib/datasets.mjs +6 -46
- package/lib/dates.js +7 -37
- package/lib/dates.mjs +9 -14
- package/lib/dossiers_legislatifs.js +6 -68
- package/lib/dossiers_legislatifs.mjs +5 -36
- package/lib/file_systems.js +56 -139
- package/lib/file_systems.mjs +1 -9
- package/lib/git.js +4 -53
- package/lib/git.mjs +1 -12
- package/lib/index.js +1 -15
- package/lib/index.mjs +1 -1
- package/lib/inserters.js +23 -146
- package/lib/inserters.mjs +6 -87
- package/lib/loaders.js +44 -316
- package/lib/loaders.mjs +12 -135
- package/lib/organes.js +1 -7
- package/lib/organes.mjs +1 -4
- package/lib/parsers/documents.js +22 -151
- package/lib/parsers/documents.mjs +19 -81
- package/lib/parsers/index.js +1 -4
- package/lib/parsers/index.mjs +1 -1
- package/lib/parsers/recherche_amendements.js +302 -527
- package/lib/parsers/recherche_amendements.mjs +8 -31
- package/lib/raw_types/acteurs_et_organes.d.ts +1 -30
- package/lib/raw_types/acteurs_et_organes.js +5 -124
- package/lib/raw_types/acteurs_et_organes.mjs +5 -105
- package/lib/raw_types/agendas.js +6 -89
- package/lib/raw_types/agendas.mjs +9 -65
- package/lib/raw_types/amendements.d.ts +2 -0
- package/lib/raw_types/amendements.js +10 -90
- package/lib/raw_types/amendements.mjs +11 -69
- package/lib/raw_types/dossiers_legislatifs.js +6 -96
- package/lib/raw_types/dossiers_legislatifs.mjs +6 -73
- package/lib/raw_types/scrutins.js +6 -81
- package/lib/raw_types/scrutins.mjs +9 -57
- package/lib/scripts/bugs_helper.js +2 -181
- package/lib/scripts/bugs_helper.mjs +2 -39
- package/lib/scripts/clean_data.js +27 -143
- package/lib/scripts/clean_data.mjs +15 -34
- package/lib/scripts/clean_reorganized_data.js +76 -240
- package/lib/scripts/clean_reorganized_data.mjs +36 -99
- package/lib/scripts/diff_amendements.js +19 -79
- package/lib/scripts/diff_amendements.mjs +17 -35
- package/lib/scripts/document_dossiers_legislatifs.js +17 -142
- package/lib/scripts/document_dossiers_legislatifs.mjs +6 -90
- package/lib/scripts/get_today_reunions.js +4 -22
- package/lib/scripts/get_today_reunions.mjs +1 -7
- package/lib/scripts/merge_scrutins.js +3 -47
- package/lib/scripts/merge_scrutins.mjs +1 -9
- package/lib/scripts/parse_textes_lois.js +15 -44
- package/lib/scripts/parse_textes_lois.mjs +18 -19
- package/lib/scripts/raw_types_from_amendements.js +3 -95
- package/lib/scripts/raw_types_from_amendements.mjs +1 -16
- package/lib/scripts/reorganize_data.js +74 -294
- package/lib/scripts/reorganize_data.mjs +22 -133
- package/lib/scripts/retrieve_deputes_photos.js +6 -119
- package/lib/scripts/retrieve_deputes_photos.mjs +7 -33
- package/lib/scripts/retrieve_documents.js +4 -192
- package/lib/scripts/retrieve_documents.mjs +2 -50
- package/lib/scripts/retrieve_open_data.js +44 -116
- package/lib/scripts/retrieve_open_data.mjs +14 -19
- package/lib/scripts/retrieve_pending_amendments.js +4 -98
- package/lib/scripts/retrieve_pending_amendments.mjs +1 -14
- package/lib/scripts/retrieve_senateurs_photos.js +18 -114
- package/lib/scripts/retrieve_senateurs_photos.mjs +20 -48
- package/lib/scripts/retrieve_textes_lois.js +3 -122
- package/lib/scripts/retrieve_textes_lois.mjs +3 -21
- package/lib/scripts/test_load.js +2 -10
- package/lib/scripts/test_load.mjs +2 -1
- package/lib/scripts/test_load_big_files.js +2 -10
- package/lib/scripts/test_load_big_files.mjs +2 -1
- package/lib/scripts/validate_json.js +4 -119
- package/lib/scripts/validate_json.mjs +2 -36
- package/lib/shared_types/codes_actes.js +1 -24
- package/lib/shared_types/codes_actes.mjs +3 -10
- package/lib/strings.js +1 -5
- package/lib/strings.mjs +1 -1
- package/lib/types/acteurs_et_organes.js +9 -84
- package/lib/types/acteurs_et_organes.mjs +10 -63
- package/lib/types/agendas.js +8 -90
- package/lib/types/agendas.mjs +11 -66
- package/lib/types/amendements.d.ts +2 -0
- package/lib/types/amendements.js +12 -92
- package/lib/types/amendements.mjs +15 -70
- package/lib/types/dossiers_legislatifs.js +8 -96
- package/lib/types/dossiers_legislatifs.mjs +10 -72
- package/lib/types/legislatures.js +1 -3
- package/lib/types/legislatures.mjs +1 -2
- package/lib/types/scrutins.js +8 -82
- package/lib/types/scrutins.mjs +11 -58
- package/lib/urls.js +3 -27
- package/lib/urls.mjs +3 -21
- package/package.json +1 -1
package/lib/bugs.js
CHANGED
|
@@ -1,112 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.promise.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.symbol.js");
|
|
8
|
-
|
|
9
6
|
require("core-js/modules/es.symbol.description.js");
|
|
10
|
-
|
|
11
7
|
require("core-js/modules/es.symbol.iterator.js");
|
|
12
|
-
|
|
13
8
|
require("core-js/modules/es.array.iterator.js");
|
|
14
|
-
|
|
15
9
|
require("core-js/modules/es.string.iterator.js");
|
|
16
|
-
|
|
17
10
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
18
|
-
|
|
19
11
|
require("core-js/modules/es.symbol.async-iterator.js");
|
|
20
|
-
|
|
21
12
|
require("core-js/modules/es.symbol.to-string-tag.js");
|
|
22
|
-
|
|
23
13
|
require("core-js/modules/es.json.to-string-tag.js");
|
|
24
|
-
|
|
25
14
|
require("core-js/modules/es.math.to-string-tag.js");
|
|
26
|
-
|
|
27
15
|
require("core-js/modules/es.object.create.js");
|
|
28
|
-
|
|
29
16
|
require("core-js/modules/es.object.get-prototype-of.js");
|
|
30
|
-
|
|
31
17
|
require("core-js/modules/es.array.for-each.js");
|
|
32
|
-
|
|
33
18
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
34
|
-
|
|
35
19
|
require("core-js/modules/es.object.set-prototype-of.js");
|
|
36
|
-
|
|
37
20
|
require("core-js/modules/es.array.reverse.js");
|
|
38
|
-
|
|
39
21
|
require("core-js/modules/es.array.slice.js");
|
|
40
|
-
|
|
41
22
|
require("core-js/modules/es.array.from.js");
|
|
42
|
-
|
|
43
23
|
require("core-js/modules/es.regexp.exec.js");
|
|
44
|
-
|
|
45
24
|
require("core-js/modules/es.array.is-array.js");
|
|
46
|
-
|
|
47
25
|
require("core-js/modules/es.weak-map.js");
|
|
48
|
-
|
|
49
26
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
50
|
-
|
|
51
27
|
Object.defineProperty(exports, "__esModule", {
|
|
52
28
|
value: true
|
|
53
29
|
});
|
|
54
30
|
exports.SchemaBugs = exports.BasePlugin = void 0;
|
|
55
|
-
|
|
56
31
|
require("core-js/modules/es.function.name.js");
|
|
57
|
-
|
|
58
32
|
require("core-js/modules/es.array.filter.js");
|
|
59
|
-
|
|
60
33
|
require("core-js/modules/es.object.to-string.js");
|
|
61
|
-
|
|
62
34
|
require("core-js/modules/es.array.concat.js");
|
|
63
|
-
|
|
64
35
|
require("core-js/modules/es.array.includes.js");
|
|
65
|
-
|
|
66
36
|
require("core-js/modules/es.string.includes.js");
|
|
67
|
-
|
|
68
37
|
require("core-js/modules/es.object.define-property.js");
|
|
69
|
-
|
|
70
38
|
var git = _interopRequireWildcard(require("./git"));
|
|
71
|
-
|
|
72
39
|
var _file_systems = require("./file_systems");
|
|
73
|
-
|
|
74
40
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
75
|
-
|
|
76
41
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
77
|
-
|
|
78
42
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
79
|
-
|
|
80
43
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
81
|
-
|
|
82
44
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
83
|
-
|
|
84
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
85
|
-
|
|
45
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
86
46
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
87
|
-
|
|
88
47
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
89
|
-
|
|
90
48
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
91
|
-
|
|
92
49
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
93
|
-
|
|
94
50
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
95
|
-
|
|
96
51
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
97
|
-
|
|
98
52
|
var BasePlugin = /*#__PURE__*/function () {
|
|
99
53
|
function BasePlugin(options, name) {
|
|
100
54
|
_classCallCheck(this, BasePlugin);
|
|
101
|
-
|
|
102
55
|
_defineProperty(this, "options", void 0);
|
|
103
|
-
|
|
104
56
|
_defineProperty(this, "name", void 0);
|
|
105
|
-
|
|
106
57
|
this.options = options;
|
|
107
58
|
this.name = name;
|
|
108
59
|
}
|
|
109
|
-
|
|
110
60
|
_createClass(BasePlugin, [{
|
|
111
61
|
key: "preFix",
|
|
112
62
|
value: function () {
|
|
@@ -121,11 +71,9 @@ var BasePlugin = /*#__PURE__*/function () {
|
|
|
121
71
|
}
|
|
122
72
|
}, _callee);
|
|
123
73
|
}));
|
|
124
|
-
|
|
125
74
|
function preFix() {
|
|
126
75
|
return _preFix.apply(this, arguments);
|
|
127
76
|
}
|
|
128
|
-
|
|
129
77
|
return preFix;
|
|
130
78
|
}()
|
|
131
79
|
}, {
|
|
@@ -137,7 +85,6 @@ var BasePlugin = /*#__PURE__*/function () {
|
|
|
137
85
|
switch (_context2.prev = _context2.next) {
|
|
138
86
|
case 0:
|
|
139
87
|
return _context2.abrupt("return", null);
|
|
140
|
-
|
|
141
88
|
case 1:
|
|
142
89
|
case "end":
|
|
143
90
|
return _context2.stop();
|
|
@@ -145,11 +92,9 @@ var BasePlugin = /*#__PURE__*/function () {
|
|
|
145
92
|
}
|
|
146
93
|
}, _callee2);
|
|
147
94
|
}));
|
|
148
|
-
|
|
149
95
|
function fix(_x, _x2) {
|
|
150
96
|
return _fix.apply(this, arguments);
|
|
151
97
|
}
|
|
152
|
-
|
|
153
98
|
return fix;
|
|
154
99
|
}()
|
|
155
100
|
}, {
|
|
@@ -166,11 +111,9 @@ var BasePlugin = /*#__PURE__*/function () {
|
|
|
166
111
|
}
|
|
167
112
|
}, _callee3);
|
|
168
113
|
}));
|
|
169
|
-
|
|
170
114
|
function preCheck() {
|
|
171
115
|
return _preCheck.apply(this, arguments);
|
|
172
116
|
}
|
|
173
|
-
|
|
174
117
|
return preCheck;
|
|
175
118
|
}()
|
|
176
119
|
}, {
|
|
@@ -182,7 +125,6 @@ var BasePlugin = /*#__PURE__*/function () {
|
|
|
182
125
|
switch (_context4.prev = _context4.next) {
|
|
183
126
|
case 0:
|
|
184
127
|
return _context4.abrupt("return", null);
|
|
185
|
-
|
|
186
128
|
case 1:
|
|
187
129
|
case "end":
|
|
188
130
|
return _context4.stop();
|
|
@@ -190,11 +132,9 @@ var BasePlugin = /*#__PURE__*/function () {
|
|
|
190
132
|
}
|
|
191
133
|
}, _callee4);
|
|
192
134
|
}));
|
|
193
|
-
|
|
194
135
|
function check(_x3, _x4) {
|
|
195
136
|
return _check.apply(this, arguments);
|
|
196
137
|
}
|
|
197
|
-
|
|
198
138
|
return check;
|
|
199
139
|
}()
|
|
200
140
|
}, {
|
|
@@ -211,52 +151,38 @@ var BasePlugin = /*#__PURE__*/function () {
|
|
|
211
151
|
}
|
|
212
152
|
}, _callee5);
|
|
213
153
|
}));
|
|
214
|
-
|
|
215
154
|
function postCheck(_x5) {
|
|
216
155
|
return _postCheck.apply(this, arguments);
|
|
217
156
|
}
|
|
218
|
-
|
|
219
157
|
return postCheck;
|
|
220
158
|
}()
|
|
221
159
|
}]);
|
|
222
|
-
|
|
223
160
|
return BasePlugin;
|
|
224
161
|
}();
|
|
225
|
-
|
|
226
162
|
exports.BasePlugin = BasePlugin;
|
|
227
|
-
|
|
228
163
|
var SchemaBugs = /*#__PURE__*/function () {
|
|
229
164
|
function SchemaBugs(options) {
|
|
230
165
|
_classCallCheck(this, SchemaBugs);
|
|
231
|
-
|
|
232
166
|
_defineProperty(this, "options", void 0);
|
|
233
|
-
|
|
234
167
|
_defineProperty(this, "plugins", void 0);
|
|
235
|
-
|
|
236
168
|
this.options = options;
|
|
237
169
|
this.get(this.options.schema);
|
|
238
170
|
}
|
|
239
|
-
|
|
240
171
|
_createClass(SchemaBugs, [{
|
|
241
172
|
key: "get",
|
|
242
173
|
value: function get(schema) {
|
|
243
174
|
var _this = this;
|
|
244
|
-
|
|
245
175
|
this.plugins = [];
|
|
246
176
|
var bugsDir = this.options["bugs-dir"] || ".";
|
|
247
177
|
var files = (0, _file_systems.getFiles)(["".concat(bugsDir, "/src/bugs/").concat(schema, "-*.ts")]).filter(function (f) {
|
|
248
178
|
return _this.options.bug == undefined || f.includes(_this.options.bug);
|
|
249
179
|
});
|
|
250
|
-
|
|
251
180
|
var _iterator = _createForOfIteratorHelper(files),
|
|
252
|
-
|
|
253
|
-
|
|
181
|
+
_step;
|
|
254
182
|
try {
|
|
255
183
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
256
184
|
var file = _step.value;
|
|
257
|
-
|
|
258
185
|
var module = require("../".concat(file));
|
|
259
|
-
|
|
260
186
|
this.plugins.push(new module["Plugin"](this.options));
|
|
261
187
|
}
|
|
262
188
|
} catch (err) {
|
|
@@ -270,47 +196,35 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
270
196
|
value: function () {
|
|
271
197
|
var _preFix2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
272
198
|
var _iterator2, _step2, plugin;
|
|
273
|
-
|
|
274
199
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
275
200
|
while (1) {
|
|
276
201
|
switch (_context6.prev = _context6.next) {
|
|
277
202
|
case 0:
|
|
278
203
|
_iterator2 = _createForOfIteratorHelper(this.plugins);
|
|
279
204
|
_context6.prev = 1;
|
|
280
|
-
|
|
281
205
|
_iterator2.s();
|
|
282
|
-
|
|
283
206
|
case 3:
|
|
284
207
|
if ((_step2 = _iterator2.n()).done) {
|
|
285
208
|
_context6.next = 9;
|
|
286
209
|
break;
|
|
287
210
|
}
|
|
288
|
-
|
|
289
211
|
plugin = _step2.value;
|
|
290
212
|
_context6.next = 7;
|
|
291
213
|
return plugin.preFix();
|
|
292
|
-
|
|
293
214
|
case 7:
|
|
294
215
|
_context6.next = 3;
|
|
295
216
|
break;
|
|
296
|
-
|
|
297
217
|
case 9:
|
|
298
218
|
_context6.next = 14;
|
|
299
219
|
break;
|
|
300
|
-
|
|
301
220
|
case 11:
|
|
302
221
|
_context6.prev = 11;
|
|
303
222
|
_context6.t0 = _context6["catch"](1);
|
|
304
|
-
|
|
305
223
|
_iterator2.e(_context6.t0);
|
|
306
|
-
|
|
307
224
|
case 14:
|
|
308
225
|
_context6.prev = 14;
|
|
309
|
-
|
|
310
226
|
_iterator2.f();
|
|
311
|
-
|
|
312
227
|
return _context6.finish(14);
|
|
313
|
-
|
|
314
228
|
case 17:
|
|
315
229
|
case "end":
|
|
316
230
|
return _context6.stop();
|
|
@@ -318,11 +232,9 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
318
232
|
}
|
|
319
233
|
}, _callee6, this, [[1, 11, 14, 17]]);
|
|
320
234
|
}));
|
|
321
|
-
|
|
322
235
|
function preFix() {
|
|
323
236
|
return _preFix2.apply(this, arguments);
|
|
324
237
|
}
|
|
325
|
-
|
|
326
238
|
return preFix;
|
|
327
239
|
}()
|
|
328
240
|
}, {
|
|
@@ -330,7 +242,6 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
330
242
|
value: function () {
|
|
331
243
|
var _fix2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(filenames) {
|
|
332
244
|
var results, _iterator3, _step3, plugin, _iterator4, _step4, filename, content, result;
|
|
333
|
-
|
|
334
245
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
335
246
|
while (1) {
|
|
336
247
|
switch (_context7.prev = _context7.next) {
|
|
@@ -338,88 +249,64 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
338
249
|
results = {};
|
|
339
250
|
_iterator3 = _createForOfIteratorHelper(this.plugins);
|
|
340
251
|
_context7.prev = 2;
|
|
341
|
-
|
|
342
252
|
_iterator3.s();
|
|
343
|
-
|
|
344
253
|
case 4:
|
|
345
254
|
if ((_step3 = _iterator3.n()).done) {
|
|
346
255
|
_context7.next = 31;
|
|
347
256
|
break;
|
|
348
257
|
}
|
|
349
|
-
|
|
350
258
|
plugin = _step3.value;
|
|
351
259
|
_iterator4 = _createForOfIteratorHelper(filenames);
|
|
352
260
|
_context7.prev = 7;
|
|
353
|
-
|
|
354
261
|
_iterator4.s();
|
|
355
|
-
|
|
356
262
|
case 9:
|
|
357
263
|
if ((_step4 = _iterator4.n()).done) {
|
|
358
264
|
_context7.next = 20;
|
|
359
265
|
break;
|
|
360
266
|
}
|
|
361
|
-
|
|
362
267
|
filename = _step4.value;
|
|
363
268
|
content = (0, _file_systems.load)(filename);
|
|
364
269
|
_context7.next = 14;
|
|
365
270
|
return plugin.fix(content, filename);
|
|
366
|
-
|
|
367
271
|
case 14:
|
|
368
272
|
result = _context7.sent;
|
|
369
273
|
results[plugin.name] = result;
|
|
370
274
|
if (result == true) (0, _file_systems.write)(content, filename);
|
|
371
275
|
if (this.options.debug) console.log("".concat(plugin.name, " ").concat(filename, " ").concat(result ? "FIXED" : "OK"));
|
|
372
|
-
|
|
373
276
|
case 18:
|
|
374
277
|
_context7.next = 9;
|
|
375
278
|
break;
|
|
376
|
-
|
|
377
279
|
case 20:
|
|
378
280
|
_context7.next = 25;
|
|
379
281
|
break;
|
|
380
|
-
|
|
381
282
|
case 22:
|
|
382
283
|
_context7.prev = 22;
|
|
383
284
|
_context7.t0 = _context7["catch"](7);
|
|
384
|
-
|
|
385
285
|
_iterator4.e(_context7.t0);
|
|
386
|
-
|
|
387
286
|
case 25:
|
|
388
287
|
_context7.prev = 25;
|
|
389
|
-
|
|
390
288
|
_iterator4.f();
|
|
391
|
-
|
|
392
289
|
return _context7.finish(25);
|
|
393
|
-
|
|
394
290
|
case 28:
|
|
395
291
|
if (this.options.commit) {
|
|
396
292
|
git.commit(this.options.commit, "Fix ".concat(plugin.name));
|
|
397
293
|
}
|
|
398
|
-
|
|
399
294
|
case 29:
|
|
400
295
|
_context7.next = 4;
|
|
401
296
|
break;
|
|
402
|
-
|
|
403
297
|
case 31:
|
|
404
298
|
_context7.next = 36;
|
|
405
299
|
break;
|
|
406
|
-
|
|
407
300
|
case 33:
|
|
408
301
|
_context7.prev = 33;
|
|
409
302
|
_context7.t1 = _context7["catch"](2);
|
|
410
|
-
|
|
411
303
|
_iterator3.e(_context7.t1);
|
|
412
|
-
|
|
413
304
|
case 36:
|
|
414
305
|
_context7.prev = 36;
|
|
415
|
-
|
|
416
306
|
_iterator3.f();
|
|
417
|
-
|
|
418
307
|
return _context7.finish(36);
|
|
419
|
-
|
|
420
308
|
case 39:
|
|
421
309
|
return _context7.abrupt("return", results);
|
|
422
|
-
|
|
423
310
|
case 40:
|
|
424
311
|
case "end":
|
|
425
312
|
return _context7.stop();
|
|
@@ -427,11 +314,9 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
427
314
|
}
|
|
428
315
|
}, _callee7, this, [[2, 33, 36, 39], [7, 22, 25, 28]]);
|
|
429
316
|
}));
|
|
430
|
-
|
|
431
317
|
function fix(_x6) {
|
|
432
318
|
return _fix2.apply(this, arguments);
|
|
433
319
|
}
|
|
434
|
-
|
|
435
320
|
return fix;
|
|
436
321
|
}()
|
|
437
322
|
}, {
|
|
@@ -439,47 +324,35 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
439
324
|
value: function () {
|
|
440
325
|
var _preCheck2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
441
326
|
var _iterator5, _step5, plugin;
|
|
442
|
-
|
|
443
327
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
444
328
|
while (1) {
|
|
445
329
|
switch (_context8.prev = _context8.next) {
|
|
446
330
|
case 0:
|
|
447
331
|
_iterator5 = _createForOfIteratorHelper(this.plugins);
|
|
448
332
|
_context8.prev = 1;
|
|
449
|
-
|
|
450
333
|
_iterator5.s();
|
|
451
|
-
|
|
452
334
|
case 3:
|
|
453
335
|
if ((_step5 = _iterator5.n()).done) {
|
|
454
336
|
_context8.next = 9;
|
|
455
337
|
break;
|
|
456
338
|
}
|
|
457
|
-
|
|
458
339
|
plugin = _step5.value;
|
|
459
340
|
_context8.next = 7;
|
|
460
341
|
return plugin.preCheck();
|
|
461
|
-
|
|
462
342
|
case 7:
|
|
463
343
|
_context8.next = 3;
|
|
464
344
|
break;
|
|
465
|
-
|
|
466
345
|
case 9:
|
|
467
346
|
_context8.next = 14;
|
|
468
347
|
break;
|
|
469
|
-
|
|
470
348
|
case 11:
|
|
471
349
|
_context8.prev = 11;
|
|
472
350
|
_context8.t0 = _context8["catch"](1);
|
|
473
|
-
|
|
474
351
|
_iterator5.e(_context8.t0);
|
|
475
|
-
|
|
476
352
|
case 14:
|
|
477
353
|
_context8.prev = 14;
|
|
478
|
-
|
|
479
354
|
_iterator5.f();
|
|
480
|
-
|
|
481
355
|
return _context8.finish(14);
|
|
482
|
-
|
|
483
356
|
case 17:
|
|
484
357
|
case "end":
|
|
485
358
|
return _context8.stop();
|
|
@@ -487,11 +360,9 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
487
360
|
}
|
|
488
361
|
}, _callee8, this, [[1, 11, 14, 17]]);
|
|
489
362
|
}));
|
|
490
|
-
|
|
491
363
|
function preCheck() {
|
|
492
364
|
return _preCheck2.apply(this, arguments);
|
|
493
365
|
}
|
|
494
|
-
|
|
495
366
|
return preCheck;
|
|
496
367
|
}()
|
|
497
368
|
}, {
|
|
@@ -499,7 +370,6 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
499
370
|
value: function () {
|
|
500
371
|
var _check2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(content, filename) {
|
|
501
372
|
var results, _iterator6, _step6, plugin;
|
|
502
|
-
|
|
503
373
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
504
374
|
while (1) {
|
|
505
375
|
switch (_context9.prev = _context9.next) {
|
|
@@ -507,46 +377,33 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
507
377
|
results = {};
|
|
508
378
|
_iterator6 = _createForOfIteratorHelper(this.plugins);
|
|
509
379
|
_context9.prev = 2;
|
|
510
|
-
|
|
511
380
|
_iterator6.s();
|
|
512
|
-
|
|
513
381
|
case 4:
|
|
514
382
|
if ((_step6 = _iterator6.n()).done) {
|
|
515
383
|
_context9.next = 11;
|
|
516
384
|
break;
|
|
517
385
|
}
|
|
518
|
-
|
|
519
386
|
plugin = _step6.value;
|
|
520
387
|
_context9.next = 8;
|
|
521
388
|
return plugin.check(content, filename);
|
|
522
|
-
|
|
523
389
|
case 8:
|
|
524
390
|
results[plugin.name] = _context9.sent;
|
|
525
|
-
|
|
526
391
|
case 9:
|
|
527
392
|
_context9.next = 4;
|
|
528
393
|
break;
|
|
529
|
-
|
|
530
394
|
case 11:
|
|
531
395
|
_context9.next = 16;
|
|
532
396
|
break;
|
|
533
|
-
|
|
534
397
|
case 13:
|
|
535
398
|
_context9.prev = 13;
|
|
536
399
|
_context9.t0 = _context9["catch"](2);
|
|
537
|
-
|
|
538
400
|
_iterator6.e(_context9.t0);
|
|
539
|
-
|
|
540
401
|
case 16:
|
|
541
402
|
_context9.prev = 16;
|
|
542
|
-
|
|
543
403
|
_iterator6.f();
|
|
544
|
-
|
|
545
404
|
return _context9.finish(16);
|
|
546
|
-
|
|
547
405
|
case 19:
|
|
548
406
|
return _context9.abrupt("return", results);
|
|
549
|
-
|
|
550
407
|
case 20:
|
|
551
408
|
case "end":
|
|
552
409
|
return _context9.stop();
|
|
@@ -554,11 +411,9 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
554
411
|
}
|
|
555
412
|
}, _callee9, this, [[2, 13, 16, 19]]);
|
|
556
413
|
}));
|
|
557
|
-
|
|
558
414
|
function check(_x7, _x8) {
|
|
559
415
|
return _check2.apply(this, arguments);
|
|
560
416
|
}
|
|
561
|
-
|
|
562
417
|
return check;
|
|
563
418
|
}()
|
|
564
419
|
}, {
|
|
@@ -566,47 +421,35 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
566
421
|
value: function () {
|
|
567
422
|
var _postCheck2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(analysis) {
|
|
568
423
|
var _iterator7, _step7, plugin;
|
|
569
|
-
|
|
570
424
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
571
425
|
while (1) {
|
|
572
426
|
switch (_context10.prev = _context10.next) {
|
|
573
427
|
case 0:
|
|
574
428
|
_iterator7 = _createForOfIteratorHelper(this.plugins);
|
|
575
429
|
_context10.prev = 1;
|
|
576
|
-
|
|
577
430
|
_iterator7.s();
|
|
578
|
-
|
|
579
431
|
case 3:
|
|
580
432
|
if ((_step7 = _iterator7.n()).done) {
|
|
581
433
|
_context10.next = 9;
|
|
582
434
|
break;
|
|
583
435
|
}
|
|
584
|
-
|
|
585
436
|
plugin = _step7.value;
|
|
586
437
|
_context10.next = 7;
|
|
587
438
|
return plugin.postCheck(analysis);
|
|
588
|
-
|
|
589
439
|
case 7:
|
|
590
440
|
_context10.next = 3;
|
|
591
441
|
break;
|
|
592
|
-
|
|
593
442
|
case 9:
|
|
594
443
|
_context10.next = 14;
|
|
595
444
|
break;
|
|
596
|
-
|
|
597
445
|
case 11:
|
|
598
446
|
_context10.prev = 11;
|
|
599
447
|
_context10.t0 = _context10["catch"](1);
|
|
600
|
-
|
|
601
448
|
_iterator7.e(_context10.t0);
|
|
602
|
-
|
|
603
449
|
case 14:
|
|
604
450
|
_context10.prev = 14;
|
|
605
|
-
|
|
606
451
|
_iterator7.f();
|
|
607
|
-
|
|
608
452
|
return _context10.finish(14);
|
|
609
|
-
|
|
610
453
|
case 17:
|
|
611
454
|
case "end":
|
|
612
455
|
return _context10.stop();
|
|
@@ -614,17 +457,13 @@ var SchemaBugs = /*#__PURE__*/function () {
|
|
|
614
457
|
}
|
|
615
458
|
}, _callee10, this, [[1, 11, 14, 17]]);
|
|
616
459
|
}));
|
|
617
|
-
|
|
618
460
|
function postCheck(_x9) {
|
|
619
461
|
return _postCheck2.apply(this, arguments);
|
|
620
462
|
}
|
|
621
|
-
|
|
622
463
|
return postCheck;
|
|
623
464
|
}()
|
|
624
465
|
}]);
|
|
625
|
-
|
|
626
466
|
return SchemaBugs;
|
|
627
467
|
}();
|
|
628
|
-
|
|
629
468
|
exports.SchemaBugs = SchemaBugs;
|
|
630
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJCYXNlUGx1Z2luIiwib3B0aW9ucyIsIm5hbWUiLCJfY29udGVudCIsIl9maWxlbmFtZSIsIl9hbmFseXNpcyIsIlNjaGVtYUJ1Z3MiLCJnZXQiLCJzY2hlbWEiLCJwbHVnaW5zIiwiYnVnc0RpciIsImZpbGVzIiwiZ2V0RmlsZXMiLCJmaWx0ZXIiLCJmIiwiYnVnIiwidW5kZWZpbmVkIiwiaW5jbHVkZXMiLCJmaWxlIiwibW9kdWxlIiwicmVxdWlyZSIsInB1c2giLCJwbHVnaW4iLCJwcmVGaXgiLCJmaWxlbmFt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