@contrast/agent 4.31.2 → 5.0.0-alpha.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/index.js +56 -0
- package/package.json +20 -201
- package/LICENSE +0 -12
- package/README.md +0 -111
- package/agent-loader.js +0 -44
- package/bin/VERSION +0 -1
- package/bin/contrast-service-darwin-arm64 +0 -0
- package/bin/contrast-service-darwin-x64 +0 -0
- package/bin/contrast-service-linux-arm64 +0 -0
- package/bin/contrast-service-linux-x64 +0 -0
- package/bin/contrast-service-win32-x64.exe +0 -0
- package/bootstrap.js +0 -65
- package/changelog.config.js +0 -56
- package/cli-rewriter.js +0 -24
- package/cli.js +0 -38
- package/config-diagnostics.js +0 -127
- package/esm.mjs +0 -156
- package/lib/agent-emitter.js +0 -89
- package/lib/agent.js +0 -214
- package/lib/app-info.js +0 -150
- package/lib/assess/deadzones/index.js +0 -93
- package/lib/assess/deadzones/rewrite.js +0 -64
- package/lib/assess/express/index.js +0 -29
- package/lib/assess/express/route-coverage.js +0 -143
- package/lib/assess/express/sinks/index.js +0 -23
- package/lib/assess/express/sinks/xss.js +0 -88
- package/lib/assess/express/sources.js +0 -56
- package/lib/assess/fastify/index.js +0 -29
- package/lib/assess/fastify/route-coverage.js +0 -119
- package/lib/assess/fastify/sinks/index.js +0 -25
- package/lib/assess/fastify/sinks/response-scanning.js +0 -54
- package/lib/assess/fastify/sinks/unvalidated-redirect.js +0 -95
- package/lib/assess/fastify/sinks/xss.js +0 -238
- package/lib/assess/fastify/sources.js +0 -76
- package/lib/assess/hapi/index.js +0 -29
- package/lib/assess/hapi/route-coverage.js +0 -163
- package/lib/assess/hapi/sinks/index.js +0 -27
- package/lib/assess/hapi/sinks/response-scanning.js +0 -49
- package/lib/assess/hapi/sinks/session.js +0 -125
- package/lib/assess/hapi/sinks/unvalidated-redirect.js +0 -100
- package/lib/assess/hapi/sinks/xss.js +0 -178
- package/lib/assess/hapi/sources.js +0 -37
- package/lib/assess/index.js +0 -35
- package/lib/assess/koa/index.js +0 -29
- package/lib/assess/koa/route-coverage.js +0 -114
- package/lib/assess/koa/sinks/index.js +0 -25
- package/lib/assess/koa/sinks/response-scanning.js +0 -40
- package/lib/assess/koa/sinks/unvalidated-redirect.js +0 -96
- package/lib/assess/koa/sinks/xss.js +0 -127
- package/lib/assess/koa/sources.js +0 -145
- package/lib/assess/loopback4/index.js +0 -29
- package/lib/assess/loopback4/route-coverage.js +0 -129
- package/lib/assess/loopback4/sinks/index.js +0 -25
- package/lib/assess/loopback4/sinks/response-scanning.js +0 -39
- package/lib/assess/loopback4/sinks/xss.js +0 -77
- package/lib/assess/loopback4/sources.js +0 -33
- package/lib/assess/membrane/debraner.js +0 -170
- package/lib/assess/membrane/deserialization-membrane.js +0 -76
- package/lib/assess/membrane/index.js +0 -463
- package/lib/assess/membrane/source-membrane.js +0 -415
- package/lib/assess/models/base-event.js +0 -207
- package/lib/assess/models/call-context.js +0 -197
- package/lib/assess/models/index.js +0 -31
- package/lib/assess/models/propagation-event.js +0 -77
- package/lib/assess/models/signature.js +0 -92
- package/lib/assess/models/sink-event.js +0 -43
- package/lib/assess/models/source-event.js +0 -95
- package/lib/assess/models/tag-range/index.js +0 -180
- package/lib/assess/models/tag-range/relationships.js +0 -67
- package/lib/assess/models/tag-range/util.js +0 -363
- package/lib/assess/policy/deadzones.json +0 -185
- package/lib/assess/policy/index.js +0 -20
- package/lib/assess/policy/init.js +0 -309
- package/lib/assess/policy/non-dataflow-rules.json +0 -156
- package/lib/assess/policy/propagators.json +0 -545
- package/lib/assess/policy/rules.json +0 -1682
- package/lib/assess/policy/signatures.json +0 -1412
- package/lib/assess/policy/util.js +0 -423
- package/lib/assess/propagators/JSON/parse.js +0 -53
- package/lib/assess/propagators/JSON/stringify.js +0 -444
- package/lib/assess/propagators/ajv/conditionals.js +0 -164
- package/lib/assess/propagators/ajv/evaluator-shim.js +0 -42
- package/lib/assess/propagators/ajv/index.js +0 -91
- package/lib/assess/propagators/ajv/json-schema-type-evaluators.js +0 -495
- package/lib/assess/propagators/ajv/object-walk.js +0 -76
- package/lib/assess/propagators/ajv/refs.js +0 -265
- package/lib/assess/propagators/ajv/schema-context.js +0 -388
- package/lib/assess/propagators/array-prototype-join.js +0 -163
- package/lib/assess/propagators/common.js +0 -137
- package/lib/assess/propagators/dustjs/escape-html.js +0 -22
- package/lib/assess/propagators/dustjs/escape-js.js +0 -22
- package/lib/assess/propagators/ejs-template-generate-source.js +0 -64
- package/lib/assess/propagators/encode-uri/encode-uri-component.js +0 -22
- package/lib/assess/propagators/encode-uri/encode-uri.js +0 -22
- package/lib/assess/propagators/fastify-static/allowed-path.js +0 -85
- package/lib/assess/propagators/handlebars-compile.js +0 -78
- package/lib/assess/propagators/handlebars-escape-expresssion.js +0 -71
- package/lib/assess/propagators/index.js +0 -154
- package/lib/assess/propagators/joi/any.js +0 -47
- package/lib/assess/propagators/joi/boolean.js +0 -68
- package/lib/assess/propagators/joi/expression.js +0 -48
- package/lib/assess/propagators/joi/index.js +0 -27
- package/lib/assess/propagators/joi/keys.js +0 -72
- package/lib/assess/propagators/joi/number.js +0 -67
- package/lib/assess/propagators/joi/object.js +0 -60
- package/lib/assess/propagators/joi/string-base.js +0 -123
- package/lib/assess/propagators/joi/string-schema.js +0 -199
- package/lib/assess/propagators/joi/values.js +0 -304
- package/lib/assess/propagators/manager.js +0 -469
- package/lib/assess/propagators/mongoose/helpers.js +0 -57
- package/lib/assess/propagators/mongoose/index.js +0 -19
- package/lib/assess/propagators/mongoose/map.js +0 -62
- package/lib/assess/propagators/mongoose/mixed.js +0 -71
- package/lib/assess/propagators/mongoose/string.js +0 -112
- package/lib/assess/propagators/mustache/escape.js +0 -22
- package/lib/assess/propagators/number.js +0 -54
- package/lib/assess/propagators/object.js +0 -60
- package/lib/assess/propagators/path/basename.js +0 -113
- package/lib/assess/propagators/path/common.js +0 -387
- package/lib/assess/propagators/path/dirname.js +0 -78
- package/lib/assess/propagators/path/extname.js +0 -83
- package/lib/assess/propagators/path/format.js +0 -65
- package/lib/assess/propagators/path/join.js +0 -53
- package/lib/assess/propagators/path/normalize.js +0 -55
- package/lib/assess/propagators/path/parse.js +0 -43
- package/lib/assess/propagators/path/relative.js +0 -154
- package/lib/assess/propagators/path/resolve.js +0 -63
- package/lib/assess/propagators/path/to-namespaced-path.js +0 -52
- package/lib/assess/propagators/pug-compile.js +0 -58
- package/lib/assess/propagators/querystring/escape.js +0 -56
- package/lib/assess/propagators/querystring/parse.js +0 -118
- package/lib/assess/propagators/querystring/stringify.js +0 -313
- package/lib/assess/propagators/querystring/unescape.js +0 -60
- package/lib/assess/propagators/querystring/utils.js +0 -69
- package/lib/assess/propagators/sequelize/sql-string-escape.js +0 -61
- package/lib/assess/propagators/sequelize/sql-string-format-named-parameters.js +0 -145
- package/lib/assess/propagators/sequelize/sql-string-format.js +0 -104
- package/lib/assess/propagators/sequelize/utils.js +0 -36
- package/lib/assess/propagators/serve-static.js +0 -109
- package/lib/assess/propagators/string-prototype-replace.js +0 -671
- package/lib/assess/propagators/string-prototype-split.js +0 -266
- package/lib/assess/propagators/string-prototype-trim.js +0 -61
- package/lib/assess/propagators/string.js +0 -68
- package/lib/assess/propagators/template-escape.js +0 -87
- package/lib/assess/propagators/templates.js +0 -168
- package/lib/assess/propagators/url/url-prototype-parse.js +0 -133
- package/lib/assess/propagators/url/url-url.js +0 -464
- package/lib/assess/propagators/url/utils.js +0 -58
- package/lib/assess/propagators/util/format.js +0 -305
- package/lib/assess/propagators/utils.js +0 -148
- package/lib/assess/propagators/v8/init-hooks.js +0 -142
- package/lib/assess/propagators/validator/init-hooks.js +0 -252
- package/lib/assess/propagators/validator/validator-methods.js +0 -98
- package/lib/assess/response-scanning/app-activity.js +0 -33
- package/lib/assess/response-scanning/autocomplete-missing.js +0 -66
- package/lib/assess/response-scanning/cache-controls-missing.js +0 -205
- package/lib/assess/response-scanning/clickjacking-control-missing.js +0 -49
- package/lib/assess/response-scanning/common.js +0 -58
- package/lib/assess/response-scanning/cookies/common.js +0 -63
- package/lib/assess/response-scanning/cookies/events.js +0 -28
- package/lib/assess/response-scanning/cookies/httponly.js +0 -45
- package/lib/assess/response-scanning/cookies/secure-flag-missing.js +0 -46
- package/lib/assess/response-scanning/headers/csp-header-insecure.js +0 -190
- package/lib/assess/response-scanning/headers/csp-header-missing.js +0 -45
- package/lib/assess/response-scanning/headers/csp-utils.js +0 -28
- package/lib/assess/response-scanning/headers/hsts-header-missing.js +0 -59
- package/lib/assess/response-scanning/headers/powered-by.js +0 -53
- package/lib/assess/response-scanning/headers/xcontenttype-header-missing.js +0 -51
- package/lib/assess/response-scanning/headers/xxssprotection-header-disabled.js +0 -46
- package/lib/assess/response-scanning/parameter-pollution.js +0 -63
- package/lib/assess/response-scanning/parseable-response-emitter.js +0 -43
- package/lib/assess/restify/index.js +0 -30
- package/lib/assess/restify/route-coverage.js +0 -86
- package/lib/assess/restify/session.js +0 -53
- package/lib/assess/restify/sinks/index.js +0 -25
- package/lib/assess/restify/sinks/response-scanning.js +0 -48
- package/lib/assess/restify/sinks/unvalidated-redirect.js +0 -100
- package/lib/assess/restify/sinks/xss.js +0 -87
- package/lib/assess/restify/sources.js +0 -224
- package/lib/assess/sinks/common.js +0 -513
- package/lib/assess/sinks/dustjs-linkedin-xss.js +0 -131
- package/lib/assess/sinks/dynamo.js +0 -277
- package/lib/assess/sinks/hapi-16-xss.js +0 -75
- package/lib/assess/sinks/index.js +0 -179
- package/lib/assess/sinks/libxmljs-xxe.js +0 -57
- package/lib/assess/sinks/mongodb.js +0 -368
- package/lib/assess/sinks/rethinkdb-nosql-injection.js +0 -142
- package/lib/assess/sinks/ssrf-url.js +0 -98
- package/lib/assess/sources/event-handler.js +0 -309
- package/lib/assess/sources/formidable.js +0 -38
- package/lib/assess/sources/index.js +0 -247
- package/lib/assess/spdy/index.js +0 -23
- package/lib/assess/spdy/sinks/index.js +0 -23
- package/lib/assess/spdy/sinks/xss.js +0 -84
- package/lib/assess/static/hardcoded.js +0 -345
- package/lib/assess/static/read-findings-from-cache.js +0 -40
- package/lib/assess/technologies/index.js +0 -48
- package/lib/assess/utils.js +0 -22
- package/lib/cat.txt +0 -87
- package/lib/cli-rewriter/index.js +0 -328
- package/lib/constants.js +0 -749
- package/lib/contrast.js +0 -465
- package/lib/core/arch-components/dynamodb.js +0 -45
- package/lib/core/arch-components/dynamodbv3.js +0 -48
- package/lib/core/arch-components/index.js +0 -23
- package/lib/core/arch-components/mongodb.js +0 -189
- package/lib/core/arch-components/mysql.js +0 -63
- package/lib/core/arch-components/postgres.js +0 -70
- package/lib/core/arch-components/rethinkdb.js +0 -53
- package/lib/core/arch-components/sqlite3.js +0 -44
- package/lib/core/arch-components/util.js +0 -51
- package/lib/core/async-storage/context.js +0 -133
- package/lib/core/async-storage/hooks/bluebird.js +0 -91
- package/lib/core/async-storage/hooks/mongodb.js +0 -157
- package/lib/core/async-storage/hooks/mysql.js +0 -154
- package/lib/core/async-storage/hooks/redis.js +0 -38
- package/lib/core/async-storage/hooks/utils.js +0 -42
- package/lib/core/async-storage/index.js +0 -222
- package/lib/core/async-storage/scopes/index.js +0 -153
- package/lib/core/common/formidable.js +0 -65
- package/lib/core/common/index.js +0 -19
- package/lib/core/config/options.js +0 -1015
- package/lib/core/config/util.js +0 -391
- package/lib/core/exclusions/exclusion-factory.js +0 -124
- package/lib/core/exclusions/exclusion.js +0 -48
- package/lib/core/exclusions/input.js +0 -95
- package/lib/core/exclusions/url.js +0 -66
- package/lib/core/express/index.js +0 -538
- package/lib/core/express/utils.js +0 -571
- package/lib/core/fastify/index.js +0 -199
- package/lib/core/fastify/utils.js +0 -28
- package/lib/core/hapi/index.js +0 -215
- package/lib/core/hapi/utils.js +0 -126
- package/lib/core/index.js +0 -34
- package/lib/core/koa/index.js +0 -299
- package/lib/core/koa/utils.js +0 -31
- package/lib/core/logger/daily-rotate-file.js +0 -45
- package/lib/core/logger/dataflow-monitor.js +0 -124
- package/lib/core/logger/debug-logger.js +0 -364
- package/lib/core/logger/index.js +0 -43
- package/lib/core/logger/perf-logger.js +0 -241
- package/lib/core/logger/umbrella-logger.js +0 -163
- package/lib/core/loopback4/index.js +0 -173
- package/lib/core/metrics/index.js +0 -150
- package/lib/core/restify/index.js +0 -147
- package/lib/core/restify/utils.js +0 -84
- package/lib/core/rewrite/assignment-expression.js +0 -40
- package/lib/core/rewrite/binary-expression.js +0 -63
- package/lib/core/rewrite/call-expression.js +0 -44
- package/lib/core/rewrite/callees.js +0 -142
- package/lib/core/rewrite/catch-clause.js +0 -49
- package/lib/core/rewrite/function-wrap.js +0 -49
- package/lib/core/rewrite/import-declaration.js +0 -71
- package/lib/core/rewrite/index.js +0 -316
- package/lib/core/rewrite/injections.js +0 -169
- package/lib/core/rewrite/is-contrast-method.js +0 -28
- package/lib/core/rewrite/log.js +0 -24
- package/lib/core/rewrite/member-expression.js +0 -52
- package/lib/core/rewrite/object-property.js +0 -46
- package/lib/core/rewrite/prepend-globals.js +0 -48
- package/lib/core/rewrite/rewrite-log.js +0 -74
- package/lib/core/rewrite/switch-statement.js +0 -71
- package/lib/core/rewrite/template-literal.js +0 -64
- package/lib/core/stacktrace.js +0 -221
- package/lib/coverage.js +0 -158
- package/lib/feature-set.js +0 -297
- package/lib/generator-function.js +0 -20
- package/lib/hooks/array.js +0 -75
- package/lib/hooks/cluster.js +0 -232
- package/lib/hooks/dataflow-monitor.js +0 -38
- package/lib/hooks/encoding.js +0 -88
- package/lib/hooks/express-fileupload.js +0 -57
- package/lib/hooks/express-session.js +0 -108
- package/lib/hooks/fn-to-string.js +0 -106
- package/lib/hooks/frameworks/base.js +0 -103
- package/lib/hooks/frameworks/common.js +0 -191
- package/lib/hooks/frameworks/hapi16.js +0 -293
- package/lib/hooks/frameworks/http.js +0 -89
- package/lib/hooks/frameworks/http2.js +0 -73
- package/lib/hooks/frameworks/index.js +0 -29
- package/lib/hooks/frameworks/spdy.js +0 -87
- package/lib/hooks/hapi-16-reply.js +0 -55
- package/lib/hooks/hapi-16-session.js +0 -312
- package/lib/hooks/http.js +0 -210
- package/lib/hooks/module/extensions.js +0 -41
- package/lib/hooks/module/helpers.js +0 -157
- package/lib/hooks/module/index.js +0 -99
- package/lib/hooks/newrelic.js +0 -60
- package/lib/hooks/object-is.js +0 -48
- package/lib/hooks/object-to-primitive.js +0 -64
- package/lib/hooks/patcher.js +0 -575
- package/lib/hooks/require.js +0 -57
- package/lib/hooks/stealthy-require.js +0 -64
- package/lib/instrumentation.js +0 -190
- package/lib/libraries.js +0 -172
- package/lib/library-usage.js +0 -51
- package/lib/list-installed.js +0 -97
- package/lib/protect/analysis/aho-corasick.js +0 -175
- package/lib/protect/analysis/dfsa-analyzer.js +0 -64
- package/lib/protect/errors/handler-async-errors.js +0 -66
- package/lib/protect/errors/handler.js +0 -55
- package/lib/protect/errors/security-exception.js +0 -31
- package/lib/protect/express/index.js +0 -27
- package/lib/protect/express/sinks.js +0 -34
- package/lib/protect/express/sources.js +0 -54
- package/lib/protect/express/utils.js +0 -60
- package/lib/protect/fastify/index.js +0 -25
- package/lib/protect/fastify/sinks.js +0 -37
- package/lib/protect/fastify/sources.js +0 -90
- package/lib/protect/hapi/error-handler.js +0 -79
- package/lib/protect/hapi/index.js +0 -27
- package/lib/protect/hapi/sinks.js +0 -40
- package/lib/protect/hapi/sources.js +0 -104
- package/lib/protect/index.js +0 -31
- package/lib/protect/input-analysis.js +0 -359
- package/lib/protect/koa/index.js +0 -25
- package/lib/protect/koa/sinks.js +0 -38
- package/lib/protect/koa/sources.js +0 -152
- package/lib/protect/listeners.js +0 -213
- package/lib/protect/loopback4/index.js +0 -23
- package/lib/protect/loopback4/sources.js +0 -48
- package/lib/protect/models/application-context.js +0 -46
- package/lib/protect/models/sink-event.js +0 -28
- package/lib/protect/models/source-event.js +0 -51
- package/lib/protect/restify/index.js +0 -25
- package/lib/protect/restify/sinks.js +0 -39
- package/lib/protect/restify/sources.js +0 -100
- package/lib/protect/rules/assessment.js +0 -204
- package/lib/protect/rules/attack-patterns.js +0 -364
- package/lib/protect/rules/base-scanner/index.js +0 -621
- package/lib/protect/rules/base-scanner/java-script-scanner.js +0 -154
- package/lib/protect/rules/base-scanner/postgresqlscanner.js +0 -26
- package/lib/protect/rules/base-scanner/scan-state.js +0 -243
- package/lib/protect/rules/base-scanner/scan-states.json +0 -14
- package/lib/protect/rules/base-scanner/substring-finder.js +0 -59
- package/lib/protect/rules/base-scanner/token-sequence.js +0 -57
- package/lib/protect/rules/bot-blocker/bot-blocker-rule.js +0 -108
- package/lib/protect/rules/bot-blocker/bots.json +0 -283
- package/lib/protect/rules/bot-blocker/index.js +0 -93
- package/lib/protect/rules/cmd-injection/cmdinjection-rule.js +0 -113
- package/lib/protect/rules/cmd-injection-command-backdoors/backdoor-detector.js +0 -103
- package/lib/protect/rules/cmd-injection-command-backdoors/cmd-injection-command-backdoors-rule.js +0 -90
- package/lib/protect/rules/cmd-injection-semantic-chained-commands/chained-command-scanner.js +0 -278
- package/lib/protect/rules/cmd-injection-semantic-chained-commands/cmd-injection-semantic-chained-commands-rule.js +0 -117
- package/lib/protect/rules/cmd-injection-semantic-dangerous-paths/cmd-injection-semantic-dangerous-paths-rule.js +0 -112
- package/lib/protect/rules/cmd-injection-semantic-dangerous-paths/dangerous-paths-scanner.js +0 -210
- package/lib/protect/rules/common.js +0 -38
- package/lib/protect/rules/index.js +0 -357
- package/lib/protect/rules/ip-denylist/ip-denylist-rule.js +0 -106
- package/lib/protect/rules/method-tampering/evaluator.js +0 -39
- package/lib/protect/rules/method-tampering/method-tampering-rule.js +0 -99
- package/lib/protect/rules/nosqli/nosql-injection-rule.js +0 -307
- package/lib/protect/rules/nosqli/nosql-scanner/index.js +0 -46
- package/lib/protect/rules/nosqli/nosql-scanner/labels.json +0 -73
- package/lib/protect/rules/nosqli/nosql-scanner/mongodbscanner.js +0 -85
- package/lib/protect/rules/nosqli/nosql-scanner/rethinkdbscanner.js +0 -26
- package/lib/protect/rules/path-traversal/path-traversal-rule.js +0 -61
- package/lib/protect/rules/rule-factory.js +0 -250
- package/lib/protect/rules/signatures/cmd-injection/config.json +0 -8
- package/lib/protect/rules/signatures/cmd-injection/custom-searchers/chained-command-searcher.js +0 -117
- package/lib/protect/rules/signatures/cmd-injection/custom-searchers/index.js +0 -26
- package/lib/protect/rules/signatures/cmd-injection/index.js +0 -30
- package/lib/protect/rules/signatures/evaluator.js +0 -187
- package/lib/protect/rules/signatures/index.js +0 -83
- package/lib/protect/rules/signatures/nosql-injection/config.json +0 -8
- package/lib/protect/rules/signatures/nosql-injection/custom-searchers/index.js +0 -28
- package/lib/protect/rules/signatures/nosql-injection/custom-searchers/nosql-comment-searcher.js +0 -42
- package/lib/protect/rules/signatures/nosql-injection/custom-searchers/simple-or-searcher.js +0 -115
- package/lib/protect/rules/signatures/nosql-injection/index.js +0 -30
- package/lib/protect/rules/signatures/path-traversal/config.json +0 -8
- package/lib/protect/rules/signatures/path-traversal/index.js +0 -30
- package/lib/protect/rules/signatures/reflected-xss/config.json +0 -14
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/behavior-url-searcher.js +0 -84
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/custom-searches.json +0 -103
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/function-definition-searcher.js +0 -59
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/immediate-function-searcher.js +0 -105
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/index.js +0 -36
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/link-and-src-target-searcher.js +0 -145
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/location-set-searcher.js +0 -72
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/map-access-searcher.js +0 -102
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/native-function-execution-searcher.js +0 -82
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/no-alnum-searcher.js +0 -50
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/redefined-function-searcher.js +0 -111
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/style-url-injection-searcher.js +0 -65
- package/lib/protect/rules/signatures/reflected-xss/custom-searchers/variable-assignment-searcher.js +0 -90
- package/lib/protect/rules/signatures/reflected-xss/helpers/function-call.js +0 -83
- package/lib/protect/rules/signatures/reflected-xss/index.js +0 -30
- package/lib/protect/rules/signatures/signature.js +0 -201
- package/lib/protect/rules/signatures/sql-injection/config.json +0 -10
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/if-else-drop-searcher.js +0 -49
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/index.js +0 -30
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/simple-or-searcher.js +0 -124
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/sql-comment-searcher.js +0 -73
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/time-function-searcher.js +0 -64
- package/lib/protect/rules/signatures/sql-injection/custom-searchers/tsql-exec-searcher.js +0 -45
- package/lib/protect/rules/signatures/sql-injection/index.js +0 -30
- package/lib/protect/rules/signatures/ssjs-injection/config.json +0 -17
- package/lib/protect/rules/signatures/ssjs-injection/index.js +0 -30
- package/lib/protect/rules/signatures/unsafe-file-upload/config.json +0 -7
- package/lib/protect/rules/signatures/unsafe-file-upload/index.js +0 -29
- package/lib/protect/rules/signatures/untrusted-deserialization/config.json +0 -8
- package/lib/protect/rules/signatures/untrusted-deserialization/index.js +0 -27
- package/lib/protect/rules/sqli/generic-complicated.js +0 -50
- package/lib/protect/rules/sqli/sql-injection-rule.js +0 -278
- package/lib/protect/rules/sqli/sql-scanner/index.js +0 -61
- package/lib/protect/rules/sqli/sql-scanner/labels.json +0 -135
- package/lib/protect/rules/sqli/sql-scanner/mysql-scanner.js +0 -170
- package/lib/protect/rules/ssjs-injection/evaluator.js +0 -48
- package/lib/protect/rules/ssjs-injection/ssjsinjection-rule.js +0 -164
- package/lib/protect/rules/unsafe-file-upload/unsafe-file-upload-rule.js +0 -33
- package/lib/protect/rules/untrusted-deserialization/untrusted-deserialization-rule.js +0 -95
- package/lib/protect/rules/virtual-patch/index.js +0 -17
- package/lib/protect/rules/virtual-patch/utils.js +0 -72
- package/lib/protect/rules/virtual-patch/virtual-patch-rule.js +0 -162
- package/lib/protect/rules/xss/helpers/function-call.js +0 -82
- package/lib/protect/rules/xss/reflected-xss-rule.js +0 -103
- package/lib/protect/rules/xxe/xxerule.js +0 -184
- package/lib/protect/sample-aggregator.js +0 -144
- package/lib/protect/samples.js +0 -167
- package/lib/protect/service.js +0 -1203
- package/lib/protect/sinks/child-process.js +0 -65
- package/lib/protect/sinks/eval.js +0 -57
- package/lib/protect/sinks/fs.js +0 -97
- package/lib/protect/sinks/function.js +0 -64
- package/lib/protect/sinks/index.js +0 -54
- package/lib/protect/sinks/libxmljs.js +0 -107
- package/lib/protect/sinks/mongodb.js +0 -158
- package/lib/protect/sinks/mysql.js +0 -63
- package/lib/protect/sinks/node-serialize.js +0 -53
- package/lib/protect/sinks/postgres.js +0 -81
- package/lib/protect/sinks/rethinkdb.js +0 -47
- package/lib/protect/sinks/sequelize.js +0 -86
- package/lib/protect/sinks/sqlite3.js +0 -50
- package/lib/protect/sinks/vm.js +0 -89
- package/lib/protect/sources/busboy.js +0 -58
- package/lib/protect/sources/formidable.js +0 -55
- package/lib/protect/sources/index.js +0 -27
- package/lib/protect/validators/authorization.js +0 -31
- package/lib/protect/validators/common.js +0 -74
- package/lib/protect/validators/connection.js +0 -31
- package/lib/protect/validators/content-length.js +0 -30
- package/lib/protect/validators/host.js +0 -23
- package/lib/protect/validators/if-none-match.js +0 -71
- package/lib/protect/validators/index.js +0 -24
- package/lib/protect/validators/origin.js +0 -29
- package/lib/reporter/app-activity-queue.js +0 -179
- package/lib/reporter/grpc-client.js +0 -88
- package/lib/reporter/messages/speedracer/activity.js +0 -38
- package/lib/reporter/messages/speedracer/application-create.js +0 -65
- package/lib/reporter/messages/speedracer/application-update.js +0 -41
- package/lib/reporter/messages/speedracer/base.js +0 -401
- package/lib/reporter/messages/speedracer/index.js +0 -33
- package/lib/reporter/messages/speedracer/observed-route.js +0 -41
- package/lib/reporter/messages/speedracer/poll.js +0 -43
- package/lib/reporter/messages/speedracer/request.js +0 -33
- package/lib/reporter/messages/speedracer/startup.js +0 -63
- package/lib/reporter/messaging-router.js +0 -116
- package/lib/reporter/models/app-activity/app-activity.js +0 -43
- package/lib/reporter/models/app-activity/attacker-activity.js +0 -77
- package/lib/reporter/models/app-activity/defend.js +0 -94
- package/lib/reporter/models/app-activity/inventory.js +0 -73
- package/lib/reporter/models/app-activity/protection-rule-activity.js +0 -68
- package/lib/reporter/models/app-activity/rule-events.js +0 -55
- package/lib/reporter/models/app-activity/sample.js +0 -139
- package/lib/reporter/models/app-activity/source.js +0 -79
- package/lib/reporter/models/app-activity/user-input.js +0 -87
- package/lib/reporter/models/app-create.js +0 -63
- package/lib/reporter/models/app-update/index.js +0 -178
- package/lib/reporter/models/app-update/library-manifest.js +0 -54
- package/lib/reporter/models/app-update/library-usage.js +0 -36
- package/lib/reporter/models/app-update/library.js +0 -165
- package/lib/reporter/models/event-tag.js +0 -36
- package/lib/reporter/models/finding/event.js +0 -158
- package/lib/reporter/models/finding/finding.js +0 -77
- package/lib/reporter/models/frameworks/express-request.js +0 -75
- package/lib/reporter/models/frameworks/fastify-request.js +0 -27
- package/lib/reporter/models/frameworks/hapi-request.js +0 -39
- package/lib/reporter/models/frameworks/index.js +0 -21
- package/lib/reporter/models/frameworks/koa-request.js +0 -27
- package/lib/reporter/models/frameworks/restify-request.js +0 -27
- package/lib/reporter/models/observed-route.js +0 -37
- package/lib/reporter/models/request.js +0 -288
- package/lib/reporter/models/route-coverage.js +0 -53
- package/lib/reporter/models/startup.js +0 -56
- package/lib/reporter/models/trace-event-source.js +0 -38
- package/lib/reporter/models/utils/request-factory.js +0 -32
- package/lib/reporter/models/utils/user-input-factory.js +0 -190
- package/lib/reporter/models/utils/user-input-kit.js +0 -48
- package/lib/reporter/mq-client.js +0 -59
- package/lib/reporter/server-activity-queue.js +0 -37
- package/lib/reporter/socket-client.js +0 -172
- package/lib/reporter/speedracer/base-connection-state.js +0 -49
- package/lib/reporter/speedracer/constants.js +0 -68
- package/lib/reporter/speedracer/failure-connection-state.js +0 -45
- package/lib/reporter/speedracer/index.js +0 -330
- package/lib/reporter/speedracer/success-connection-state.js +0 -67
- package/lib/reporter/speedracer/unknown-connection-state.js +0 -154
- package/lib/reporter/translations/enums.js +0 -268
- package/lib/reporter/translations/helpers.js +0 -115
- package/lib/reporter/translations/to-protobuf/dtm/activity.js +0 -149
- package/lib/reporter/translations/to-protobuf/dtm/address.js +0 -25
- package/lib/reporter/translations/to-protobuf/dtm/agent-startup.js +0 -40
- package/lib/reporter/translations/to-protobuf/dtm/application-create.js +0 -44
- package/lib/reporter/translations/to-protobuf/dtm/application-update.js +0 -61
- package/lib/reporter/translations/to-protobuf/dtm/architecture-component.js +0 -33
- package/lib/reporter/translations/to-protobuf/dtm/attack-result.js +0 -38
- package/lib/reporter/translations/to-protobuf/dtm/bot-blocker-details.js +0 -23
- package/lib/reporter/translations/to-protobuf/dtm/cmd-injection-details.js +0 -22
- package/lib/reporter/translations/to-protobuf/dtm/cmd-injection-semantic-analysis-details.js +0 -23
- package/lib/reporter/translations/to-protobuf/dtm/finding.js +0 -47
- package/lib/reporter/translations/to-protobuf/dtm/http-method-tampering-details.js +0 -24
- package/lib/reporter/translations/to-protobuf/dtm/http-request.js +0 -50
- package/lib/reporter/translations/to-protobuf/dtm/index.js +0 -48
- package/lib/reporter/translations/to-protobuf/dtm/ip-denylist-details.js +0 -23
- package/lib/reporter/translations/to-protobuf/dtm/library-usage-update.js +0 -32
- package/lib/reporter/translations/to-protobuf/dtm/no-sql-injection-details.js +0 -26
- package/lib/reporter/translations/to-protobuf/dtm/observed-route.js +0 -73
- package/lib/reporter/translations/to-protobuf/dtm/pair.js +0 -24
- package/lib/reporter/translations/to-protobuf/dtm/path-traversal-details.js +0 -22
- package/lib/reporter/translations/to-protobuf/dtm/poll.js +0 -19
- package/lib/reporter/translations/to-protobuf/dtm/rasp-rule-sample.js +0 -134
- package/lib/reporter/translations/to-protobuf/dtm/raw-request.js +0 -105
- package/lib/reporter/translations/to-protobuf/dtm/route-coverage.js +0 -68
- package/lib/reporter/translations/to-protobuf/dtm/simple-pair.js +0 -24
- package/lib/reporter/translations/to-protobuf/dtm/sql-injection-details.js +0 -26
- package/lib/reporter/translations/to-protobuf/dtm/ssjs-injection-details.js +0 -25
- package/lib/reporter/translations/to-protobuf/dtm/stack-trace-element.js +0 -30
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/action.js +0 -21
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/index.js +0 -56
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/parent-object-id.js +0 -23
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/trace-event-object.js +0 -28
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/trace-event-signature.js +0 -37
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/trace-event-source.js +0 -24
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/trace-stack.js +0 -27
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/trace-taint-range.js +0 -24
- package/lib/reporter/translations/to-protobuf/dtm/trace-event/type.js +0 -21
- package/lib/reporter/translations/to-protobuf/dtm/untrusted-deserialization-details.js +0 -24
- package/lib/reporter/translations/to-protobuf/dtm/user-input.js +0 -37
- package/lib/reporter/translations/to-protobuf/dtm/virtual-patch-details.js +0 -23
- package/lib/reporter/translations/to-protobuf/dtm/xss-details.js +0 -34
- package/lib/reporter/translations/to-protobuf/dtm/xxe-details.js +0 -45
- package/lib/reporter/translations/to-protobuf/index.js +0 -18
- package/lib/reporter/translations/to-protobuf/settings/application-settings.js +0 -76
- package/lib/reporter/translations/to-protobuf/settings/assess-features.js +0 -66
- package/lib/reporter/translations/to-protobuf/settings/auth.js +0 -25
- package/lib/reporter/translations/to-protobuf/settings/bot-blocker.js +0 -27
- package/lib/reporter/translations/to-protobuf/settings/custom-rule-feature.js +0 -27
- package/lib/reporter/translations/to-protobuf/settings/defend-features.js +0 -74
- package/lib/reporter/translations/to-protobuf/settings/exclusions.js +0 -98
- package/lib/reporter/translations/to-protobuf/settings/index.js +0 -37
- package/lib/reporter/translations/to-protobuf/settings/input-analysis-result.js +0 -22
- package/lib/reporter/translations/to-protobuf/settings/inventory-features.js +0 -35
- package/lib/reporter/translations/to-protobuf/settings/ip-filter.js +0 -29
- package/lib/reporter/translations/to-protobuf/settings/log-enhancer.js +0 -23
- package/lib/reporter/translations/to-protobuf/settings/protection-rule.js +0 -45
- package/lib/reporter/translations/to-protobuf/settings/reaction.js +0 -29
- package/lib/reporter/translations/to-protobuf/settings/rule-definition.js +0 -59
- package/lib/reporter/translations/to-protobuf/settings/sampling.js +0 -35
- package/lib/reporter/translations/to-protobuf/settings/server-features.js +0 -73
- package/lib/reporter/translations/to-protobuf/settings/syslog.js +0 -62
- package/lib/reporter/translations/to-protobuf/settings/virtual-patch.js +0 -77
- package/lib/reporter/ts-reporter.js +0 -448
- package/lib/telemetry.js +0 -194
- package/lib/tracker.js +0 -156
- package/lib/util/base64.js +0 -23
- package/lib/util/bitset.js +0 -85
- package/lib/util/block-request.js +0 -34
- package/lib/util/callback-resolver.js +0 -37
- package/lib/util/clean-stack.js +0 -308
- package/lib/util/clean-string/brackets.js +0 -86
- package/lib/util/clean-string/clean-string-base.js +0 -60
- package/lib/util/clean-string/comments.js +0 -107
- package/lib/util/clean-string/concatenations.js +0 -183
- package/lib/util/clean-string/jsclean-string.js +0 -96
- package/lib/util/clean-string/placeholders.js +0 -107
- package/lib/util/clean-string/util.js +0 -69
- package/lib/util/colors.js +0 -28
- package/lib/util/config-diagnostics-utils.js +0 -229
- package/lib/util/file-finder.js +0 -160
- package/lib/util/get-file-type.js +0 -43
- package/lib/util/heap-dump.js +0 -72
- package/lib/util/html-util.js +0 -83
- package/lib/util/ip-analyzer.js +0 -246
- package/lib/util/is-agent-path.js +0 -25
- package/lib/util/is-contrast-error.js +0 -15
- package/lib/util/is-piped-to-dev.js +0 -16
- package/lib/util/is-string.js +0 -24
- package/lib/util/partial.js +0 -29
- package/lib/util/pkg-name.js +0 -23
- package/lib/util/request-util.js +0 -74
- package/lib/util/resolve-obj.js +0 -39
- package/lib/util/route-info.js +0 -50
- package/lib/util/some.js +0 -27
- package/lib/util/source-map.js +0 -171
- package/lib/util/static-rules.js +0 -33
- package/lib/util/trace-util.js +0 -74
- package/lib/util/traverse.js +0 -188
- package/lib/util/user-input-evaluator.js +0 -64
- package/lib/util/xml-analyzer/external-entity-finder.js +0 -183
- package/node_modules/@colors/colors/LICENSE +0 -26
- package/node_modules/@colors/colors/README.md +0 -219
- package/node_modules/@colors/colors/examples/normal-usage.js +0 -83
- package/node_modules/@colors/colors/examples/safe-string.js +0 -80
- package/node_modules/@colors/colors/index.d.ts +0 -136
- package/node_modules/@colors/colors/lib/colors.js +0 -211
- package/node_modules/@colors/colors/lib/custom/trap.js +0 -46
- package/node_modules/@colors/colors/lib/custom/zalgo.js +0 -110
- package/node_modules/@colors/colors/lib/extendStringPrototype.js +0 -110
- package/node_modules/@colors/colors/lib/index.js +0 -13
- package/node_modules/@colors/colors/lib/maps/america.js +0 -10
- package/node_modules/@colors/colors/lib/maps/rainbow.js +0 -12
- package/node_modules/@colors/colors/lib/maps/random.js +0 -11
- package/node_modules/@colors/colors/lib/maps/zebra.js +0 -5
- package/node_modules/@colors/colors/lib/styles.js +0 -95
- package/node_modules/@colors/colors/lib/system/has-flag.js +0 -35
- package/node_modules/@colors/colors/lib/system/supports-colors.js +0 -151
- package/node_modules/@colors/colors/package.json +0 -49
- package/node_modules/@colors/colors/safe.d.ts +0 -48
- package/node_modules/@colors/colors/safe.js +0 -10
- package/node_modules/@colors/colors/themes/generic-logging.js +0 -12
- package/node_modules/@dabh/diagnostics/CHANGELOG.md +0 -26
- package/node_modules/@dabh/diagnostics/LICENSE +0 -20
- package/node_modules/@dabh/diagnostics/README.md +0 -473
- package/node_modules/@dabh/diagnostics/adapters/hash.js +0 -11
- package/node_modules/@dabh/diagnostics/adapters/index.js +0 -18
- package/node_modules/@dabh/diagnostics/adapters/localstorage.js +0 -11
- package/node_modules/@dabh/diagnostics/adapters/process.env.js +0 -11
- package/node_modules/@dabh/diagnostics/browser/development.js +0 -35
- package/node_modules/@dabh/diagnostics/browser/index.js +0 -8
- package/node_modules/@dabh/diagnostics/browser/override.js +0 -6
- package/node_modules/@dabh/diagnostics/browser/production.js +0 -24
- package/node_modules/@dabh/diagnostics/diagnostics.js +0 -212
- package/node_modules/@dabh/diagnostics/logger/console.js +0 -19
- package/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js +0 -20
- package/node_modules/@dabh/diagnostics/modifiers/namespace.js +0 -32
- package/node_modules/@dabh/diagnostics/node/development.js +0 -36
- package/node_modules/@dabh/diagnostics/node/index.js +0 -8
- package/node_modules/@dabh/diagnostics/node/override.js +0 -21
- package/node_modules/@dabh/diagnostics/node/production.js +0 -24
- package/node_modules/@dabh/diagnostics/package.json +0 -68
- package/node_modules/async/CHANGELOG.md +0 -344
- package/node_modules/async/LICENSE +0 -19
- package/node_modules/async/README.md +0 -60
- package/node_modules/async/all.js +0 -119
- package/node_modules/async/allLimit.js +0 -46
- package/node_modules/async/allSeries.js +0 -45
- package/node_modules/async/any.js +0 -122
- package/node_modules/async/anyLimit.js +0 -47
- package/node_modules/async/anySeries.js +0 -46
- package/node_modules/async/apply.js +0 -55
- package/node_modules/async/applyEach.js +0 -57
- package/node_modules/async/applyEachSeries.js +0 -37
- package/node_modules/async/asyncify.js +0 -118
- package/node_modules/async/auto.js +0 -333
- package/node_modules/async/autoInject.js +0 -182
- package/node_modules/async/bower.json +0 -17
- package/node_modules/async/cargo.js +0 -63
- package/node_modules/async/cargoQueue.js +0 -71
- package/node_modules/async/compose.js +0 -55
- package/node_modules/async/concat.js +0 -115
- package/node_modules/async/concatLimit.js +0 -60
- package/node_modules/async/concatSeries.js +0 -41
- package/node_modules/async/constant.js +0 -55
- package/node_modules/async/detect.js +0 -96
- package/node_modules/async/detectLimit.js +0 -48
- package/node_modules/async/detectSeries.js +0 -47
- package/node_modules/async/dir.js +0 -43
- package/node_modules/async/dist/async.js +0 -6057
- package/node_modules/async/dist/async.min.js +0 -1
- package/node_modules/async/dist/async.mjs +0 -5945
- package/node_modules/async/doDuring.js +0 -68
- package/node_modules/async/doUntil.js +0 -46
- package/node_modules/async/doWhilst.js +0 -68
- package/node_modules/async/during.js +0 -78
- package/node_modules/async/each.js +0 -129
- package/node_modules/async/eachLimit.js +0 -50
- package/node_modules/async/eachOf.js +0 -185
- package/node_modules/async/eachOfLimit.js +0 -47
- package/node_modules/async/eachOfSeries.js +0 -39
- package/node_modules/async/eachSeries.js +0 -44
- package/node_modules/async/ensureAsync.js +0 -67
- package/node_modules/async/every.js +0 -119
- package/node_modules/async/everyLimit.js +0 -46
- package/node_modules/async/everySeries.js +0 -45
- package/node_modules/async/filter.js +0 -93
- package/node_modules/async/filterLimit.js +0 -45
- package/node_modules/async/filterSeries.js +0 -43
- package/node_modules/async/find.js +0 -96
- package/node_modules/async/findLimit.js +0 -48
- package/node_modules/async/findSeries.js +0 -47
- package/node_modules/async/flatMap.js +0 -115
- package/node_modules/async/flatMapLimit.js +0 -60
- package/node_modules/async/flatMapSeries.js +0 -41
- package/node_modules/async/foldl.js +0 -153
- package/node_modules/async/foldr.js +0 -41
- package/node_modules/async/forEach.js +0 -129
- package/node_modules/async/forEachLimit.js +0 -50
- package/node_modules/async/forEachOf.js +0 -185
- package/node_modules/async/forEachOfLimit.js +0 -47
- package/node_modules/async/forEachOfSeries.js +0 -39
- package/node_modules/async/forEachSeries.js +0 -44
- package/node_modules/async/forever.js +0 -68
- package/node_modules/async/groupBy.js +0 -108
- package/node_modules/async/groupByLimit.js +0 -71
- package/node_modules/async/groupBySeries.js +0 -36
- package/node_modules/async/index.js +0 -588
- package/node_modules/async/inject.js +0 -153
- package/node_modules/async/internal/DoublyLinkedList.js +0 -92
- package/node_modules/async/internal/Heap.js +0 -120
- package/node_modules/async/internal/applyEach.js +0 -29
- package/node_modules/async/internal/asyncEachOfLimit.js +0 -75
- package/node_modules/async/internal/awaitify.js +0 -27
- package/node_modules/async/internal/breakLoop.js +0 -10
- package/node_modules/async/internal/consoleFunc.js +0 -31
- package/node_modules/async/internal/createTester.js +0 -40
- package/node_modules/async/internal/eachOfLimit.js +0 -90
- package/node_modules/async/internal/filter.js +0 -55
- package/node_modules/async/internal/getIterator.js +0 -11
- package/node_modules/async/internal/initialParams.js +0 -14
- package/node_modules/async/internal/isArrayLike.js +0 -10
- package/node_modules/async/internal/iterator.js +0 -57
- package/node_modules/async/internal/map.js +0 -30
- package/node_modules/async/internal/once.js +0 -17
- package/node_modules/async/internal/onlyOnce.js +0 -15
- package/node_modules/async/internal/parallel.js +0 -34
- package/node_modules/async/internal/promiseCallback.js +0 -23
- package/node_modules/async/internal/queue.js +0 -291
- package/node_modules/async/internal/range.js +0 -14
- package/node_modules/async/internal/reject.js +0 -26
- package/node_modules/async/internal/setImmediate.js +0 -34
- package/node_modules/async/internal/withoutIndex.js +0 -10
- package/node_modules/async/internal/wrapAsync.js +0 -34
- package/node_modules/async/log.js +0 -41
- package/node_modules/async/map.js +0 -142
- package/node_modules/async/mapLimit.js +0 -45
- package/node_modules/async/mapSeries.js +0 -44
- package/node_modules/async/mapValues.js +0 -152
- package/node_modules/async/mapValuesLimit.js +0 -61
- package/node_modules/async/mapValuesSeries.js +0 -37
- package/node_modules/async/memoize.js +0 -91
- package/node_modules/async/nextTick.js +0 -52
- package/node_modules/async/package.json +0 -84
- package/node_modules/async/parallel.js +0 -180
- package/node_modules/async/parallelLimit.js +0 -41
- package/node_modules/async/priorityQueue.js +0 -91
- package/node_modules/async/queue.js +0 -167
- package/node_modules/async/race.js +0 -67
- package/node_modules/async/reduce.js +0 -153
- package/node_modules/async/reduceRight.js +0 -41
- package/node_modules/async/reflect.js +0 -78
- package/node_modules/async/reflectAll.js +0 -93
- package/node_modules/async/reject.js +0 -87
- package/node_modules/async/rejectLimit.js +0 -45
- package/node_modules/async/rejectSeries.js +0 -43
- package/node_modules/async/retry.js +0 -159
- package/node_modules/async/retryable.js +0 -77
- package/node_modules/async/select.js +0 -93
- package/node_modules/async/selectLimit.js +0 -45
- package/node_modules/async/selectSeries.js +0 -43
- package/node_modules/async/seq.js +0 -79
- package/node_modules/async/series.js +0 -186
- package/node_modules/async/setImmediate.js +0 -45
- package/node_modules/async/some.js +0 -122
- package/node_modules/async/someLimit.js +0 -47
- package/node_modules/async/someSeries.js +0 -46
- package/node_modules/async/sortBy.js +0 -190
- package/node_modules/async/timeout.js +0 -89
- package/node_modules/async/times.js +0 -50
- package/node_modules/async/timesLimit.js +0 -43
- package/node_modules/async/timesSeries.js +0 -32
- package/node_modules/async/transform.js +0 -173
- package/node_modules/async/tryEach.js +0 -78
- package/node_modules/async/unmemoize.js +0 -25
- package/node_modules/async/until.js +0 -61
- package/node_modules/async/waterfall.js +0 -105
- package/node_modules/async/whilst.js +0 -78
- package/node_modules/async/wrapSync.js +0 -118
- package/node_modules/color/LICENSE +0 -21
- package/node_modules/color/README.md +0 -123
- package/node_modules/color/index.js +0 -482
- package/node_modules/color/package.json +0 -44
- package/node_modules/color-convert/CHANGELOG.md +0 -54
- package/node_modules/color-convert/LICENSE +0 -21
- package/node_modules/color-convert/README.md +0 -68
- package/node_modules/color-convert/conversions.js +0 -868
- package/node_modules/color-convert/index.js +0 -78
- package/node_modules/color-convert/package.json +0 -50
- package/node_modules/color-convert/route.js +0 -97
- package/node_modules/color-name/.eslintrc.json +0 -43
- package/node_modules/color-name/.npmignore +0 -107
- package/node_modules/color-name/LICENSE +0 -8
- package/node_modules/color-name/README.md +0 -11
- package/node_modules/color-name/index.js +0 -152
- package/node_modules/color-name/package.json +0 -29
- package/node_modules/color-name/test.js +0 -7
- package/node_modules/color-string/LICENSE +0 -21
- package/node_modules/color-string/README.md +0 -62
- package/node_modules/color-string/index.js +0 -242
- package/node_modules/color-string/package.json +0 -43
- package/node_modules/colors/LICENSE +0 -25
- package/node_modules/colors/README.md +0 -221
- package/node_modules/colors/examples/normal-usage.js +0 -82
- package/node_modules/colors/examples/safe-string.js +0 -79
- package/node_modules/colors/index.d.ts +0 -136
- package/node_modules/colors/lib/colors.js +0 -211
- package/node_modules/colors/lib/custom/trap.js +0 -46
- package/node_modules/colors/lib/custom/zalgo.js +0 -110
- package/node_modules/colors/lib/extendStringPrototype.js +0 -110
- package/node_modules/colors/lib/index.js +0 -13
- package/node_modules/colors/lib/maps/america.js +0 -10
- package/node_modules/colors/lib/maps/rainbow.js +0 -12
- package/node_modules/colors/lib/maps/random.js +0 -11
- package/node_modules/colors/lib/maps/zebra.js +0 -5
- package/node_modules/colors/lib/styles.js +0 -95
- package/node_modules/colors/lib/system/has-flag.js +0 -35
- package/node_modules/colors/lib/system/supports-colors.js +0 -151
- package/node_modules/colors/package.json +0 -49
- package/node_modules/colors/safe.d.ts +0 -48
- package/node_modules/colors/safe.js +0 -10
- package/node_modules/colors/themes/generic-logging.js +0 -12
- package/node_modules/colorspace/LICENSE.md +0 -20
- package/node_modules/colorspace/README.md +0 -43
- package/node_modules/colorspace/index.js +0 -29
- package/node_modules/colorspace/package.json +0 -41
- package/node_modules/core-util-is/LICENSE +0 -19
- package/node_modules/core-util-is/README.md +0 -3
- package/node_modules/core-util-is/float.patch +0 -604
- package/node_modules/core-util-is/lib/util.js +0 -107
- package/node_modules/core-util-is/package.json +0 -36
- package/node_modules/core-util-is/test.js +0 -68
- package/node_modules/cycle/README.md +0 -49
- package/node_modules/cycle/cycle.js +0 -170
- package/node_modules/cycle/package.json +0 -16
- package/node_modules/enabled/.travis.yml +0 -9
- package/node_modules/enabled/LICENSE +0 -20
- package/node_modules/enabled/README.md +0 -68
- package/node_modules/enabled/index.js +0 -34
- package/node_modules/enabled/package.json +0 -37
- package/node_modules/enabled/test.js +0 -39
- package/node_modules/fast-safe-stringify/.travis.yml +0 -8
- package/node_modules/fast-safe-stringify/CHANGELOG.md +0 -17
- package/node_modules/fast-safe-stringify/LICENSE +0 -23
- package/node_modules/fast-safe-stringify/benchmark.js +0 -137
- package/node_modules/fast-safe-stringify/index.d.ts +0 -8
- package/node_modules/fast-safe-stringify/index.js +0 -161
- package/node_modules/fast-safe-stringify/package.json +0 -50
- package/node_modules/fast-safe-stringify/readme.md +0 -154
- package/node_modules/fast-safe-stringify/test-stable.js +0 -311
- package/node_modules/fast-safe-stringify/test.js +0 -304
- package/node_modules/fecha/LICENSE +0 -22
- package/node_modules/fecha/README.md +0 -320
- package/node_modules/fecha/dist/fecha.min.js +0 -2
- package/node_modules/fecha/dist/fecha.min.js.map +0 -1
- package/node_modules/fecha/lib/fecha.d.ts +0 -52
- package/node_modules/fecha/lib/fecha.js +0 -403
- package/node_modules/fecha/lib/fecha.js.map +0 -1
- package/node_modules/fecha/lib/fecha.umd.js +0 -418
- package/node_modules/fecha/lib/fecha.umd.js.map +0 -1
- package/node_modules/fecha/package.json +0 -59
- package/node_modules/fecha/src/fecha.ts +0 -524
- package/node_modules/file-stream-rotator/.nvmrc +0 -1
- package/node_modules/file-stream-rotator/.travis.yml +0 -5
- package/node_modules/file-stream-rotator/FileStreamRotator.js +0 -543
- package/node_modules/file-stream-rotator/README.md +0 -133
- package/node_modules/file-stream-rotator/index.js +0 -1
- package/node_modules/file-stream-rotator/package.json +0 -34
- package/node_modules/file-stream-rotator/test.js +0 -208
- package/node_modules/file-stream-rotator/tests/every-minute-test.js +0 -68
- package/node_modules/file-stream-rotator/tests/every-second-test.js +0 -66
- package/node_modules/fn.name/.gitattributes +0 -1
- package/node_modules/fn.name/.travis.yml +0 -10
- package/node_modules/fn.name/LICENSE +0 -22
- package/node_modules/fn.name/README.md +0 -42
- package/node_modules/fn.name/index.js +0 -42
- package/node_modules/fn.name/package.json +0 -41
- package/node_modules/fn.name/test.js +0 -73
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -33
- package/node_modules/is-arrayish/LICENSE +0 -21
- package/node_modules/is-arrayish/README.md +0 -16
- package/node_modules/is-arrayish/index.js +0 -9
- package/node_modules/is-arrayish/package.json +0 -49
- package/node_modules/is-arrayish/yarn-error.log +0 -1443
- package/node_modules/is-stream/index.d.ts +0 -80
- package/node_modules/is-stream/index.js +0 -29
- package/node_modules/is-stream/license +0 -9
- package/node_modules/is-stream/package.json +0 -45
- package/node_modules/is-stream/readme.md +0 -57
- package/node_modules/isarray/.npmignore +0 -1
- package/node_modules/isarray/.travis.yml +0 -4
- package/node_modules/isarray/Makefile +0 -6
- package/node_modules/isarray/README.md +0 -60
- package/node_modules/isarray/component.json +0 -19
- package/node_modules/isarray/index.js +0 -5
- package/node_modules/isarray/package.json +0 -49
- package/node_modules/isarray/test.js +0 -20
- package/node_modules/kuler/.travis.yml +0 -5
- package/node_modules/kuler/LICENSE +0 -7
- package/node_modules/kuler/README.md +0 -40
- package/node_modules/kuler/index.js +0 -118
- package/node_modules/kuler/package.json +0 -38
- package/node_modules/kuler/test.js +0 -23
- package/node_modules/logform/.babelrc +0 -3
- package/node_modules/logform/.eslintrc +0 -7
- package/node_modules/logform/.gitattributes +0 -1
- package/node_modules/logform/CHANGELOG.md +0 -256
- package/node_modules/logform/LICENSE +0 -21
- package/node_modules/logform/README.md +0 -653
- package/node_modules/logform/align.js +0 -14
- package/node_modules/logform/browser.js +0 -38
- package/node_modules/logform/cli.js +0 -52
- package/node_modules/logform/colorize.js +0 -122
- package/node_modules/logform/combine.js +0 -66
- package/node_modules/logform/dist/align.js +0 -15
- package/node_modules/logform/dist/browser.js +0 -72
- package/node_modules/logform/dist/cli.js +0 -73
- package/node_modules/logform/dist/colorize.js +0 -144
- package/node_modules/logform/dist/combine.js +0 -71
- package/node_modules/logform/dist/errors.js +0 -43
- package/node_modules/logform/dist/format.js +0 -91
- package/node_modules/logform/dist/index.js +0 -87
- package/node_modules/logform/dist/json.js +0 -34
- package/node_modules/logform/dist/label.js +0 -20
- package/node_modules/logform/dist/levels.js +0 -14
- package/node_modules/logform/dist/logstash.js +0 -34
- package/node_modules/logform/dist/metadata.js +0 -64
- package/node_modules/logform/dist/ms.js +0 -21
- package/node_modules/logform/dist/pad-levels.js +0 -127
- package/node_modules/logform/dist/pretty-print.js +0 -34
- package/node_modules/logform/dist/printf.js +0 -41
- package/node_modules/logform/dist/simple.js +0 -37
- package/node_modules/logform/dist/splat.js +0 -159
- package/node_modules/logform/dist/timestamp.js +0 -32
- package/node_modules/logform/dist/uncolorize.js +0 -31
- package/node_modules/logform/errors.js +0 -39
- package/node_modules/logform/examples/combine.js +0 -14
- package/node_modules/logform/examples/filter.js +0 -30
- package/node_modules/logform/examples/invalid.js +0 -6
- package/node_modules/logform/examples/metadata.js +0 -78
- package/node_modules/logform/examples/padLevels.js +0 -39
- package/node_modules/logform/examples/volume.js +0 -25
- package/node_modules/logform/format.js +0 -52
- package/node_modules/logform/index.d.ts +0 -197
- package/node_modules/logform/index.js +0 -52
- package/node_modules/logform/json.js +0 -30
- package/node_modules/logform/label.js +0 -19
- package/node_modules/logform/levels.js +0 -12
- package/node_modules/logform/logstash.js +0 -29
- package/node_modules/logform/metadata.js +0 -61
- package/node_modules/logform/ms.js +0 -18
- package/node_modules/logform/package.json +0 -53
- package/node_modules/logform/pad-levels.js +0 -83
- package/node_modules/logform/pretty-print.js +0 -29
- package/node_modules/logform/printf.js +0 -26
- package/node_modules/logform/simple.js +0 -33
- package/node_modules/logform/splat.js +0 -132
- package/node_modules/logform/timestamp.js +0 -30
- package/node_modules/logform/tsconfig.json +0 -22
- package/node_modules/logform/uncolorize.js +0 -27
- package/node_modules/moment/CHANGELOG.md +0 -988
- package/node_modules/moment/LICENSE +0 -22
- package/node_modules/moment/README.md +0 -55
- package/node_modules/moment/dist/locale/af.js +0 -71
- package/node_modules/moment/dist/locale/ar-dz.js +0 -156
- package/node_modules/moment/dist/locale/ar-kw.js +0 -55
- package/node_modules/moment/dist/locale/ar-ly.js +0 -171
- package/node_modules/moment/dist/locale/ar-ma.js +0 -56
- package/node_modules/moment/dist/locale/ar-sa.js +0 -105
- package/node_modules/moment/dist/locale/ar-tn.js +0 -55
- package/node_modules/moment/dist/locale/ar.js +0 -189
- package/node_modules/moment/dist/locale/az.js +0 -102
- package/node_modules/moment/dist/locale/be.js +0 -142
- package/node_modules/moment/dist/locale/bg.js +0 -87
- package/node_modules/moment/dist/locale/bm.js +0 -52
- package/node_modules/moment/dist/locale/bn-bd.js +0 -129
- package/node_modules/moment/dist/locale/bn.js +0 -119
- package/node_modules/moment/dist/locale/bo.js +0 -124
- package/node_modules/moment/dist/locale/br.js +0 -168
- package/node_modules/moment/dist/locale/bs.js +0 -150
- package/node_modules/moment/dist/locale/ca.js +0 -100
- package/node_modules/moment/dist/locale/cs.js +0 -180
- package/node_modules/moment/dist/locale/cv.js +0 -63
- package/node_modules/moment/dist/locale/cy.js +0 -98
- package/node_modules/moment/dist/locale/da.js +0 -53
- package/node_modules/moment/dist/locale/de-at.js +0 -79
- package/node_modules/moment/dist/locale/de-ch.js +0 -78
- package/node_modules/moment/dist/locale/de.js +0 -78
- package/node_modules/moment/dist/locale/dv.js +0 -90
- package/node_modules/moment/dist/locale/el.js +0 -106
- package/node_modules/moment/dist/locale/en-au.js +0 -68
- package/node_modules/moment/dist/locale/en-ca.js +0 -64
- package/node_modules/moment/dist/locale/en-gb.js +0 -68
- package/node_modules/moment/dist/locale/en-ie.js +0 -68
- package/node_modules/moment/dist/locale/en-il.js +0 -64
- package/node_modules/moment/dist/locale/en-in.js +0 -68
- package/node_modules/moment/dist/locale/en-nz.js +0 -68
- package/node_modules/moment/dist/locale/en-sg.js +0 -68
- package/node_modules/moment/dist/locale/eo.js +0 -68
- package/node_modules/moment/dist/locale/es-do.js +0 -108
- package/node_modules/moment/dist/locale/es-mx.js +0 -110
- package/node_modules/moment/dist/locale/es-us.js +0 -110
- package/node_modules/moment/dist/locale/es.js +0 -110
- package/node_modules/moment/dist/locale/et.js +0 -78
- package/node_modules/moment/dist/locale/eu.js +0 -65
- package/node_modules/moment/dist/locale/fa.js +0 -113
- package/node_modules/moment/dist/locale/fi.js +0 -124
- package/node_modules/moment/dist/locale/fil.js +0 -58
- package/node_modules/moment/dist/locale/fo.js +0 -57
- package/node_modules/moment/dist/locale/fr-ca.js +0 -70
- package/node_modules/moment/dist/locale/fr-ch.js +0 -74
- package/node_modules/moment/dist/locale/fr.js +0 -108
- package/node_modules/moment/dist/locale/fy.js +0 -75
- package/node_modules/moment/dist/locale/ga.js +0 -95
- package/node_modules/moment/dist/locale/gd.js +0 -95
- package/node_modules/moment/dist/locale/gl.js +0 -75
- package/node_modules/moment/dist/locale/gom-deva.js +0 -126
- package/node_modules/moment/dist/locale/gom-latn.js +0 -124
- package/node_modules/moment/dist/locale/gu.js +0 -122
- package/node_modules/moment/dist/locale/he.js +0 -94
- package/node_modules/moment/dist/locale/hi.js +0 -168
- package/node_modules/moment/dist/locale/hr.js +0 -156
- package/node_modules/moment/dist/locale/hu.js +0 -118
- package/node_modules/moment/dist/locale/hy-am.js +0 -94
- package/node_modules/moment/dist/locale/id.js +0 -76
- package/node_modules/moment/dist/locale/is.js +0 -140
- package/node_modules/moment/dist/locale/it-ch.js +0 -64
- package/node_modules/moment/dist/locale/it.js +0 -106
- package/node_modules/moment/dist/locale/ja.js +0 -148
- package/node_modules/moment/dist/locale/jv.js +0 -76
- package/node_modules/moment/dist/locale/ka.js +0 -92
- package/node_modules/moment/dist/locale/kk.js +0 -82
- package/node_modules/moment/dist/locale/km.js +0 -103
- package/node_modules/moment/dist/locale/kn.js +0 -124
- package/node_modules/moment/dist/locale/ko.js +0 -75
- package/node_modules/moment/dist/locale/ku.js +0 -118
- package/node_modules/moment/dist/locale/ky.js +0 -84
- package/node_modules/moment/dist/locale/lb.js +0 -137
- package/node_modules/moment/dist/locale/lo.js +0 -66
- package/node_modules/moment/dist/locale/lt.js +0 -125
- package/node_modules/moment/dist/locale/lv.js +0 -94
- package/node_modules/moment/dist/locale/me.js +0 -117
- package/node_modules/moment/dist/locale/mi.js +0 -60
- package/node_modules/moment/dist/locale/mk.js +0 -85
- package/node_modules/moment/dist/locale/ml.js +0 -82
- package/node_modules/moment/dist/locale/mn.js +0 -100
- package/node_modules/moment/dist/locale/mr.js +0 -203
- package/node_modules/moment/dist/locale/ms-my.js +0 -76
- package/node_modules/moment/dist/locale/ms.js +0 -75
- package/node_modules/moment/dist/locale/mt.js +0 -56
- package/node_modules/moment/dist/locale/my.js +0 -91
- package/node_modules/moment/dist/locale/nb.js +0 -60
- package/node_modules/moment/dist/locale/ne.js +0 -121
- package/node_modules/moment/dist/locale/nl-be.js +0 -102
- package/node_modules/moment/dist/locale/nl.js +0 -104
- package/node_modules/moment/dist/locale/nn.js +0 -59
- package/node_modules/moment/dist/locale/oc-lnc.js +0 -85
- package/node_modules/moment/dist/locale/pa-in.js +0 -122
- package/node_modules/moment/dist/locale/pl.js +0 -140
- package/node_modules/moment/dist/locale/pt-br.js +0 -58
- package/node_modules/moment/dist/locale/pt.js +0 -63
- package/node_modules/moment/dist/locale/ro.js +0 -76
- package/node_modules/moment/dist/locale/ru.js +0 -213
- package/node_modules/moment/dist/locale/sd.js +0 -81
- package/node_modules/moment/dist/locale/se.js +0 -57
- package/node_modules/moment/dist/locale/si.js +0 -69
- package/node_modules/moment/dist/locale/sk.js +0 -145
- package/node_modules/moment/dist/locale/sl.js +0 -171
- package/node_modules/moment/dist/locale/sq.js +0 -65
- package/node_modules/moment/dist/locale/sr-cyrl.js +0 -127
- package/node_modules/moment/dist/locale/sr.js +0 -129
- package/node_modules/moment/dist/locale/ss.js +0 -84
- package/node_modules/moment/dist/locale/sv.js +0 -68
- package/node_modules/moment/dist/locale/sw.js +0 -55
- package/node_modules/moment/dist/locale/ta.js +0 -131
- package/node_modules/moment/dist/locale/te.js +0 -88
- package/node_modules/moment/dist/locale/tet.js +0 -68
- package/node_modules/moment/dist/locale/tg.js +0 -117
- package/node_modules/moment/dist/locale/th.js +0 -65
- package/node_modules/moment/dist/locale/tk.js +0 -91
- package/node_modules/moment/dist/locale/tl-ph.js +0 -57
- package/node_modules/moment/dist/locale/tlh.js +0 -124
- package/node_modules/moment/dist/locale/tr.js +0 -106
- package/node_modules/moment/dist/locale/tzl.js +0 -89
- package/node_modules/moment/dist/locale/tzm-latn.js +0 -54
- package/node_modules/moment/dist/locale/tzm.js +0 -54
- package/node_modules/moment/dist/locale/ug-cn.js +0 -111
- package/node_modules/moment/dist/locale/uk.js +0 -167
- package/node_modules/moment/dist/locale/ur.js +0 -82
- package/node_modules/moment/dist/locale/uz-latn.js +0 -54
- package/node_modules/moment/dist/locale/uz.js +0 -51
- package/node_modules/moment/dist/locale/vi.js +0 -80
- package/node_modules/moment/dist/locale/x-pseudo.js +0 -73
- package/node_modules/moment/dist/locale/yo.js +0 -53
- package/node_modules/moment/dist/locale/zh-cn.js +0 -120
- package/node_modules/moment/dist/locale/zh-hk.js +0 -101
- package/node_modules/moment/dist/locale/zh-mo.js +0 -100
- package/node_modules/moment/dist/locale/zh-tw.js +0 -99
- package/node_modules/moment/dist/moment.js +0 -5677
- package/node_modules/moment/ender.js +0 -1
- package/node_modules/moment/locale/af.js +0 -82
- package/node_modules/moment/locale/ar-dz.js +0 -167
- package/node_modules/moment/locale/ar-kw.js +0 -66
- package/node_modules/moment/locale/ar-ly.js +0 -182
- package/node_modules/moment/locale/ar-ma.js +0 -67
- package/node_modules/moment/locale/ar-sa.js +0 -116
- package/node_modules/moment/locale/ar-tn.js +0 -66
- package/node_modules/moment/locale/ar.js +0 -200
- package/node_modules/moment/locale/az.js +0 -113
- package/node_modules/moment/locale/be.js +0 -153
- package/node_modules/moment/locale/bg.js +0 -98
- package/node_modules/moment/locale/bm.js +0 -62
- package/node_modules/moment/locale/bn-bd.js +0 -140
- package/node_modules/moment/locale/bn.js +0 -130
- package/node_modules/moment/locale/bo.js +0 -135
- package/node_modules/moment/locale/br.js +0 -179
- package/node_modules/moment/locale/bs.js +0 -161
- package/node_modules/moment/locale/ca.js +0 -111
- package/node_modules/moment/locale/cs.js +0 -191
- package/node_modules/moment/locale/cv.js +0 -74
- package/node_modules/moment/locale/cy.js +0 -109
- package/node_modules/moment/locale/da.js +0 -64
- package/node_modules/moment/locale/de-at.js +0 -90
- package/node_modules/moment/locale/de-ch.js +0 -87
- package/node_modules/moment/locale/de.js +0 -89
- package/node_modules/moment/locale/dv.js +0 -101
- package/node_modules/moment/locale/el.js +0 -117
- package/node_modules/moment/locale/en-au.js +0 -79
- package/node_modules/moment/locale/en-ca.js +0 -75
- package/node_modules/moment/locale/en-gb.js +0 -79
- package/node_modules/moment/locale/en-ie.js +0 -79
- package/node_modules/moment/locale/en-il.js +0 -75
- package/node_modules/moment/locale/en-in.js +0 -79
- package/node_modules/moment/locale/en-nz.js +0 -79
- package/node_modules/moment/locale/en-sg.js +0 -79
- package/node_modules/moment/locale/eo.js +0 -79
- package/node_modules/moment/locale/es-do.js +0 -119
- package/node_modules/moment/locale/es-mx.js +0 -121
- package/node_modules/moment/locale/es-us.js +0 -121
- package/node_modules/moment/locale/es.js +0 -121
- package/node_modules/moment/locale/et.js +0 -89
- package/node_modules/moment/locale/eu.js +0 -76
- package/node_modules/moment/locale/fa.js +0 -124
- package/node_modules/moment/locale/fi.js +0 -135
- package/node_modules/moment/locale/fil.js +0 -69
- package/node_modules/moment/locale/fo.js +0 -68
- package/node_modules/moment/locale/fr-ca.js +0 -81
- package/node_modules/moment/locale/fr-ch.js +0 -85
- package/node_modules/moment/locale/fr.js +0 -119
- package/node_modules/moment/locale/fy.js +0 -86
- package/node_modules/moment/locale/ga.js +0 -106
- package/node_modules/moment/locale/gd.js +0 -106
- package/node_modules/moment/locale/gl.js +0 -86
- package/node_modules/moment/locale/gom-deva.js +0 -137
- package/node_modules/moment/locale/gom-latn.js +0 -135
- package/node_modules/moment/locale/gu.js +0 -133
- package/node_modules/moment/locale/he.js +0 -105
- package/node_modules/moment/locale/hi.js +0 -179
- package/node_modules/moment/locale/hr.js +0 -167
- package/node_modules/moment/locale/hu.js +0 -129
- package/node_modules/moment/locale/hy-am.js +0 -105
- package/node_modules/moment/locale/id.js +0 -87
- package/node_modules/moment/locale/is.js +0 -151
- package/node_modules/moment/locale/it-ch.js +0 -75
- package/node_modules/moment/locale/it.js +0 -117
- package/node_modules/moment/locale/ja.js +0 -159
- package/node_modules/moment/locale/jv.js +0 -87
- package/node_modules/moment/locale/ka.js +0 -103
- package/node_modules/moment/locale/kk.js +0 -93
- package/node_modules/moment/locale/km.js +0 -114
- package/node_modules/moment/locale/kn.js +0 -135
- package/node_modules/moment/locale/ko.js +0 -86
- package/node_modules/moment/locale/ku.js +0 -129
- package/node_modules/moment/locale/ky.js +0 -95
- package/node_modules/moment/locale/lb.js +0 -148
- package/node_modules/moment/locale/lo.js +0 -77
- package/node_modules/moment/locale/lt.js +0 -136
- package/node_modules/moment/locale/lv.js +0 -105
- package/node_modules/moment/locale/me.js +0 -128
- package/node_modules/moment/locale/mi.js +0 -71
- package/node_modules/moment/locale/mk.js +0 -97
- package/node_modules/moment/locale/ml.js +0 -93
- package/node_modules/moment/locale/mn.js +0 -111
- package/node_modules/moment/locale/mr.js +0 -214
- package/node_modules/moment/locale/ms-my.js +0 -87
- package/node_modules/moment/locale/ms.js +0 -86
- package/node_modules/moment/locale/mt.js +0 -67
- package/node_modules/moment/locale/my.js +0 -102
- package/node_modules/moment/locale/nb.js +0 -71
- package/node_modules/moment/locale/ne.js +0 -132
- package/node_modules/moment/locale/nl-be.js +0 -113
- package/node_modules/moment/locale/nl.js +0 -115
- package/node_modules/moment/locale/nn.js +0 -70
- package/node_modules/moment/locale/oc-lnc.js +0 -96
- package/node_modules/moment/locale/pa-in.js +0 -133
- package/node_modules/moment/locale/pl.js +0 -151
- package/node_modules/moment/locale/pt-br.js +0 -69
- package/node_modules/moment/locale/pt.js +0 -74
- package/node_modules/moment/locale/ro.js +0 -87
- package/node_modules/moment/locale/ru.js +0 -224
- package/node_modules/moment/locale/sd.js +0 -92
- package/node_modules/moment/locale/se.js +0 -68
- package/node_modules/moment/locale/si.js +0 -80
- package/node_modules/moment/locale/sk.js +0 -156
- package/node_modules/moment/locale/sl.js +0 -182
- package/node_modules/moment/locale/sq.js +0 -76
- package/node_modules/moment/locale/sr-cyrl.js +0 -138
- package/node_modules/moment/locale/sr.js +0 -140
- package/node_modules/moment/locale/ss.js +0 -95
- package/node_modules/moment/locale/sv.js +0 -79
- package/node_modules/moment/locale/sw.js +0 -66
- package/node_modules/moment/locale/ta.js +0 -142
- package/node_modules/moment/locale/te.js +0 -99
- package/node_modules/moment/locale/tet.js +0 -79
- package/node_modules/moment/locale/tg.js +0 -128
- package/node_modules/moment/locale/th.js +0 -76
- package/node_modules/moment/locale/tk.js +0 -102
- package/node_modules/moment/locale/tl-ph.js +0 -68
- package/node_modules/moment/locale/tlh.js +0 -135
- package/node_modules/moment/locale/tr.js +0 -117
- package/node_modules/moment/locale/tzl.js +0 -100
- package/node_modules/moment/locale/tzm-latn.js +0 -65
- package/node_modules/moment/locale/tzm.js +0 -65
- package/node_modules/moment/locale/ug-cn.js +0 -122
- package/node_modules/moment/locale/uk.js +0 -178
- package/node_modules/moment/locale/ur.js +0 -93
- package/node_modules/moment/locale/uz-latn.js +0 -65
- package/node_modules/moment/locale/uz.js +0 -62
- package/node_modules/moment/locale/vi.js +0 -91
- package/node_modules/moment/locale/x-pseudo.js +0 -84
- package/node_modules/moment/locale/yo.js +0 -64
- package/node_modules/moment/locale/zh-cn.js +0 -131
- package/node_modules/moment/locale/zh-hk.js +0 -112
- package/node_modules/moment/locale/zh-mo.js +0 -111
- package/node_modules/moment/locale/zh-tw.js +0 -110
- package/node_modules/moment/min/locales.js +0 -12570
- package/node_modules/moment/min/locales.min.js +0 -2
- package/node_modules/moment/min/locales.min.js.map +0 -1
- package/node_modules/moment/min/moment-with-locales.js +0 -18239
- package/node_modules/moment/min/moment-with-locales.min.js +0 -2
- package/node_modules/moment/min/moment-with-locales.min.js.map +0 -1
- package/node_modules/moment/min/moment.min.js +0 -2
- package/node_modules/moment/min/moment.min.js.map +0 -1
- package/node_modules/moment/moment.d.ts +0 -796
- package/node_modules/moment/moment.js +0 -5685
- package/node_modules/moment/package.js +0 -11
- package/node_modules/moment/package.json +0 -116
- package/node_modules/moment/src/lib/create/check-overflow.js +0 -57
- package/node_modules/moment/src/lib/create/date-from-array.js +0 -35
- package/node_modules/moment/src/lib/create/from-anything.js +0 -117
- package/node_modules/moment/src/lib/create/from-array.js +0 -187
- package/node_modules/moment/src/lib/create/from-object.js +0 -20
- package/node_modules/moment/src/lib/create/from-string-and-array.js +0 -67
- package/node_modules/moment/src/lib/create/from-string-and-format.js +0 -135
- package/node_modules/moment/src/lib/create/from-string.js +0 -258
- package/node_modules/moment/src/lib/create/local.js +0 -5
- package/node_modules/moment/src/lib/create/parsing-flags.js +0 -28
- package/node_modules/moment/src/lib/create/utc.js +0 -5
- package/node_modules/moment/src/lib/create/valid.js +0 -51
- package/node_modules/moment/src/lib/duration/abs.js +0 -18
- package/node_modules/moment/src/lib/duration/add-subtract.js +0 -21
- package/node_modules/moment/src/lib/duration/as.js +0 -88
- package/node_modules/moment/src/lib/duration/bubble.js +0 -68
- package/node_modules/moment/src/lib/duration/clone.js +0 -5
- package/node_modules/moment/src/lib/duration/constructor.js +0 -42
- package/node_modules/moment/src/lib/duration/create.js +0 -133
- package/node_modules/moment/src/lib/duration/duration.js +0 -16
- package/node_modules/moment/src/lib/duration/get.js +0 -27
- package/node_modules/moment/src/lib/duration/humanize.js +0 -114
- package/node_modules/moment/src/lib/duration/iso-string.js +0 -68
- package/node_modules/moment/src/lib/duration/prototype.js +0 -78
- package/node_modules/moment/src/lib/duration/valid.js +0 -55
- package/node_modules/moment/src/lib/format/format.js +0 -104
- package/node_modules/moment/src/lib/locale/base-config.js +0 -41
- package/node_modules/moment/src/lib/locale/calendar.js +0 -15
- package/node_modules/moment/src/lib/locale/constructor.js +0 -5
- package/node_modules/moment/src/lib/locale/en.js +0 -39
- package/node_modules/moment/src/lib/locale/formats.js +0 -36
- package/node_modules/moment/src/lib/locale/invalid.js +0 -5
- package/node_modules/moment/src/lib/locale/lists.js +0 -93
- package/node_modules/moment/src/lib/locale/locale.js +0 -45
- package/node_modules/moment/src/lib/locale/locales.js +0 -248
- package/node_modules/moment/src/lib/locale/ordinal.js +0 -8
- package/node_modules/moment/src/lib/locale/pre-post-format.js +0 -3
- package/node_modules/moment/src/lib/locale/prototype.js +0 -88
- package/node_modules/moment/src/lib/locale/relative.js +0 -32
- package/node_modules/moment/src/lib/locale/set.js +0 -56
- package/node_modules/moment/src/lib/moment/add-subtract.js +0 -61
- package/node_modules/moment/src/lib/moment/calendar.js +0 -53
- package/node_modules/moment/src/lib/moment/clone.js +0 -5
- package/node_modules/moment/src/lib/moment/compare.js +0 -72
- package/node_modules/moment/src/lib/moment/constructor.js +0 -80
- package/node_modules/moment/src/lib/moment/creation-data.js +0 -9
- package/node_modules/moment/src/lib/moment/diff.js +0 -79
- package/node_modules/moment/src/lib/moment/format.js +0 -78
- package/node_modules/moment/src/lib/moment/from.js +0 -20
- package/node_modules/moment/src/lib/moment/get-set.js +0 -73
- package/node_modules/moment/src/lib/moment/locale.js +0 -34
- package/node_modules/moment/src/lib/moment/min-max.js +0 -62
- package/node_modules/moment/src/lib/moment/moment.js +0 -28
- package/node_modules/moment/src/lib/moment/now.js +0 -3
- package/node_modules/moment/src/lib/moment/prototype.js +0 -197
- package/node_modules/moment/src/lib/moment/start-end-of.js +0 -164
- package/node_modules/moment/src/lib/moment/to-type.js +0 -42
- package/node_modules/moment/src/lib/moment/to.js +0 -20
- package/node_modules/moment/src/lib/moment/valid.js +0 -15
- package/node_modules/moment/src/lib/parse/regex.js +0 -80
- package/node_modules/moment/src/lib/parse/token.js +0 -36
- package/node_modules/moment/src/lib/units/aliases.js +0 -31
- package/node_modules/moment/src/lib/units/constants.js +0 -9
- package/node_modules/moment/src/lib/units/day-of-month.js +0 -39
- package/node_modules/moment/src/lib/units/day-of-week.js +0 -443
- package/node_modules/moment/src/lib/units/day-of-year.js +0 -37
- package/node_modules/moment/src/lib/units/era.js +0 -287
- package/node_modules/moment/src/lib/units/hour.js +0 -159
- package/node_modules/moment/src/lib/units/millisecond.js +0 -76
- package/node_modules/moment/src/lib/units/minute.js +0 -29
- package/node_modules/moment/src/lib/units/month.js +0 -349
- package/node_modules/moment/src/lib/units/offset.js +0 -249
- package/node_modules/moment/src/lib/units/priorities.js +0 -21
- package/node_modules/moment/src/lib/units/quarter.js +0 -34
- package/node_modules/moment/src/lib/units/second.js +0 -29
- package/node_modules/moment/src/lib/units/timestamp.js +0 -20
- package/node_modules/moment/src/lib/units/timezone.js +0 -16
- package/node_modules/moment/src/lib/units/units.js +0 -20
- package/node_modules/moment/src/lib/units/week-calendar-utils.js +0 -66
- package/node_modules/moment/src/lib/units/week-year.js +0 -138
- package/node_modules/moment/src/lib/units/week.js +0 -69
- package/node_modules/moment/src/lib/units/year.js +0 -85
- package/node_modules/moment/src/lib/utils/abs-ceil.js +0 -7
- package/node_modules/moment/src/lib/utils/abs-floor.js +0 -8
- package/node_modules/moment/src/lib/utils/abs-round.js +0 -7
- package/node_modules/moment/src/lib/utils/compare-arrays.js +0 -18
- package/node_modules/moment/src/lib/utils/defaults.js +0 -10
- package/node_modules/moment/src/lib/utils/deprecate.js +0 -69
- package/node_modules/moment/src/lib/utils/extend.js +0 -19
- package/node_modules/moment/src/lib/utils/has-own-prop.js +0 -3
- package/node_modules/moment/src/lib/utils/hooks.js +0 -13
- package/node_modules/moment/src/lib/utils/index-of.js +0 -18
- package/node_modules/moment/src/lib/utils/is-array.js +0 -6
- package/node_modules/moment/src/lib/utils/is-calendar-spec.js +0 -25
- package/node_modules/moment/src/lib/utils/is-date.js +0 -6
- package/node_modules/moment/src/lib/utils/is-function.js +0 -6
- package/node_modules/moment/src/lib/utils/is-leap-year.js +0 -3
- package/node_modules/moment/src/lib/utils/is-moment-input.js +0 -75
- package/node_modules/moment/src/lib/utils/is-number.js +0 -6
- package/node_modules/moment/src/lib/utils/is-object-empty.js +0 -15
- package/node_modules/moment/src/lib/utils/is-object.js +0 -8
- package/node_modules/moment/src/lib/utils/is-string.js +0 -3
- package/node_modules/moment/src/lib/utils/is-undefined.js +0 -3
- package/node_modules/moment/src/lib/utils/keys.js +0 -20
- package/node_modules/moment/src/lib/utils/map.js +0 -9
- package/node_modules/moment/src/lib/utils/mod.js +0 -3
- package/node_modules/moment/src/lib/utils/some.js +0 -20
- package/node_modules/moment/src/lib/utils/to-int.js +0 -12
- package/node_modules/moment/src/lib/utils/zero-fill.js +0 -10
- package/node_modules/moment/src/locale/af.js +0 -71
- package/node_modules/moment/src/locale/ar-dz.js +0 -156
- package/node_modules/moment/src/locale/ar-kw.js +0 -55
- package/node_modules/moment/src/locale/ar-ly.js +0 -171
- package/node_modules/moment/src/locale/ar-ma.js +0 -56
- package/node_modules/moment/src/locale/ar-sa.js +0 -105
- package/node_modules/moment/src/locale/ar-tn.js +0 -55
- package/node_modules/moment/src/locale/ar.js +0 -189
- package/node_modules/moment/src/locale/az.js +0 -102
- package/node_modules/moment/src/locale/be.js +0 -142
- package/node_modules/moment/src/locale/bg.js +0 -87
- package/node_modules/moment/src/locale/bm.js +0 -52
- package/node_modules/moment/src/locale/bn-bd.js +0 -129
- package/node_modules/moment/src/locale/bn.js +0 -119
- package/node_modules/moment/src/locale/bo.js +0 -124
- package/node_modules/moment/src/locale/br.js +0 -168
- package/node_modules/moment/src/locale/bs.js +0 -150
- package/node_modules/moment/src/locale/ca.js +0 -100
- package/node_modules/moment/src/locale/cs.js +0 -180
- package/node_modules/moment/src/locale/cv.js +0 -63
- package/node_modules/moment/src/locale/cy.js +0 -98
- package/node_modules/moment/src/locale/da.js +0 -53
- package/node_modules/moment/src/locale/de-at.js +0 -79
- package/node_modules/moment/src/locale/de-ch.js +0 -78
- package/node_modules/moment/src/locale/de.js +0 -78
- package/node_modules/moment/src/locale/dv.js +0 -90
- package/node_modules/moment/src/locale/el.js +0 -106
- package/node_modules/moment/src/locale/en-au.js +0 -68
- package/node_modules/moment/src/locale/en-ca.js +0 -64
- package/node_modules/moment/src/locale/en-gb.js +0 -68
- package/node_modules/moment/src/locale/en-ie.js +0 -68
- package/node_modules/moment/src/locale/en-il.js +0 -64
- package/node_modules/moment/src/locale/en-in.js +0 -68
- package/node_modules/moment/src/locale/en-nz.js +0 -68
- package/node_modules/moment/src/locale/en-sg.js +0 -68
- package/node_modules/moment/src/locale/eo.js +0 -68
- package/node_modules/moment/src/locale/es-do.js +0 -108
- package/node_modules/moment/src/locale/es-mx.js +0 -110
- package/node_modules/moment/src/locale/es-us.js +0 -110
- package/node_modules/moment/src/locale/es.js +0 -110
- package/node_modules/moment/src/locale/et.js +0 -78
- package/node_modules/moment/src/locale/eu.js +0 -65
- package/node_modules/moment/src/locale/fa.js +0 -113
- package/node_modules/moment/src/locale/fi.js +0 -124
- package/node_modules/moment/src/locale/fil.js +0 -58
- package/node_modules/moment/src/locale/fo.js +0 -57
- package/node_modules/moment/src/locale/fr-ca.js +0 -70
- package/node_modules/moment/src/locale/fr-ch.js +0 -74
- package/node_modules/moment/src/locale/fr.js +0 -108
- package/node_modules/moment/src/locale/fy.js +0 -75
- package/node_modules/moment/src/locale/ga.js +0 -95
- package/node_modules/moment/src/locale/gd.js +0 -95
- package/node_modules/moment/src/locale/gl.js +0 -75
- package/node_modules/moment/src/locale/gom-deva.js +0 -126
- package/node_modules/moment/src/locale/gom-latn.js +0 -124
- package/node_modules/moment/src/locale/gu.js +0 -122
- package/node_modules/moment/src/locale/he.js +0 -94
- package/node_modules/moment/src/locale/hi.js +0 -168
- package/node_modules/moment/src/locale/hr.js +0 -156
- package/node_modules/moment/src/locale/hu.js +0 -118
- package/node_modules/moment/src/locale/hy-am.js +0 -94
- package/node_modules/moment/src/locale/id.js +0 -76
- package/node_modules/moment/src/locale/is.js +0 -140
- package/node_modules/moment/src/locale/it-ch.js +0 -64
- package/node_modules/moment/src/locale/it.js +0 -106
- package/node_modules/moment/src/locale/ja.js +0 -148
- package/node_modules/moment/src/locale/jv.js +0 -76
- package/node_modules/moment/src/locale/ka.js +0 -92
- package/node_modules/moment/src/locale/kk.js +0 -82
- package/node_modules/moment/src/locale/km.js +0 -103
- package/node_modules/moment/src/locale/kn.js +0 -124
- package/node_modules/moment/src/locale/ko.js +0 -75
- package/node_modules/moment/src/locale/ku.js +0 -118
- package/node_modules/moment/src/locale/ky.js +0 -84
- package/node_modules/moment/src/locale/lb.js +0 -137
- package/node_modules/moment/src/locale/lo.js +0 -66
- package/node_modules/moment/src/locale/lt.js +0 -125
- package/node_modules/moment/src/locale/lv.js +0 -94
- package/node_modules/moment/src/locale/me.js +0 -117
- package/node_modules/moment/src/locale/mi.js +0 -60
- package/node_modules/moment/src/locale/mk.js +0 -85
- package/node_modules/moment/src/locale/ml.js +0 -82
- package/node_modules/moment/src/locale/mn.js +0 -100
- package/node_modules/moment/src/locale/mr.js +0 -203
- package/node_modules/moment/src/locale/ms-my.js +0 -76
- package/node_modules/moment/src/locale/ms.js +0 -75
- package/node_modules/moment/src/locale/mt.js +0 -56
- package/node_modules/moment/src/locale/my.js +0 -91
- package/node_modules/moment/src/locale/nb.js +0 -60
- package/node_modules/moment/src/locale/ne.js +0 -121
- package/node_modules/moment/src/locale/nl-be.js +0 -102
- package/node_modules/moment/src/locale/nl.js +0 -104
- package/node_modules/moment/src/locale/nn.js +0 -59
- package/node_modules/moment/src/locale/oc-lnc.js +0 -85
- package/node_modules/moment/src/locale/pa-in.js +0 -122
- package/node_modules/moment/src/locale/pl.js +0 -140
- package/node_modules/moment/src/locale/pt-br.js +0 -58
- package/node_modules/moment/src/locale/pt.js +0 -63
- package/node_modules/moment/src/locale/ro.js +0 -76
- package/node_modules/moment/src/locale/ru.js +0 -213
- package/node_modules/moment/src/locale/sd.js +0 -81
- package/node_modules/moment/src/locale/se.js +0 -57
- package/node_modules/moment/src/locale/si.js +0 -69
- package/node_modules/moment/src/locale/sk.js +0 -145
- package/node_modules/moment/src/locale/sl.js +0 -171
- package/node_modules/moment/src/locale/sq.js +0 -65
- package/node_modules/moment/src/locale/sr-cyrl.js +0 -127
- package/node_modules/moment/src/locale/sr.js +0 -129
- package/node_modules/moment/src/locale/ss.js +0 -84
- package/node_modules/moment/src/locale/sv.js +0 -68
- package/node_modules/moment/src/locale/sw.js +0 -55
- package/node_modules/moment/src/locale/ta.js +0 -131
- package/node_modules/moment/src/locale/te.js +0 -88
- package/node_modules/moment/src/locale/tet.js +0 -68
- package/node_modules/moment/src/locale/tg.js +0 -117
- package/node_modules/moment/src/locale/th.js +0 -65
- package/node_modules/moment/src/locale/tk.js +0 -91
- package/node_modules/moment/src/locale/tl-ph.js +0 -57
- package/node_modules/moment/src/locale/tlh.js +0 -124
- package/node_modules/moment/src/locale/tr.js +0 -106
- package/node_modules/moment/src/locale/tzl.js +0 -89
- package/node_modules/moment/src/locale/tzm-latn.js +0 -54
- package/node_modules/moment/src/locale/tzm.js +0 -54
- package/node_modules/moment/src/locale/ug-cn.js +0 -111
- package/node_modules/moment/src/locale/uk.js +0 -167
- package/node_modules/moment/src/locale/ur.js +0 -82
- package/node_modules/moment/src/locale/uz-latn.js +0 -54
- package/node_modules/moment/src/locale/uz.js +0 -51
- package/node_modules/moment/src/locale/vi.js +0 -80
- package/node_modules/moment/src/locale/x-pseudo.js +0 -73
- package/node_modules/moment/src/locale/yo.js +0 -53
- package/node_modules/moment/src/locale/zh-cn.js +0 -120
- package/node_modules/moment/src/locale/zh-hk.js +0 -101
- package/node_modules/moment/src/locale/zh-mo.js +0 -100
- package/node_modules/moment/src/locale/zh-tw.js +0 -99
- package/node_modules/moment/src/moment.js +0 -93
- package/node_modules/moment/ts3.1-typings/moment.d.ts +0 -785
- package/node_modules/ms/index.js +0 -162
- package/node_modules/ms/license.md +0 -21
- package/node_modules/ms/package.json +0 -41
- package/node_modules/ms/readme.md +0 -60
- package/node_modules/object-hash/.jshintrc +0 -19
- package/node_modules/object-hash/.travis.yml +0 -35
- package/node_modules/object-hash/LICENSE +0 -22
- package/node_modules/object-hash/bower.json +0 -15
- package/node_modules/object-hash/dist/object_hash.js +0 -2
- package/node_modules/object-hash/dist/object_hash.js.map +0 -1
- package/node_modules/object-hash/dist/object_hash_test.js +0 -4737
- package/node_modules/object-hash/gulpfile.js +0 -97
- package/node_modules/object-hash/index.js +0 -441
- package/node_modules/object-hash/karma.conf.js +0 -69
- package/node_modules/object-hash/package.json +0 -55
- package/node_modules/object-hash/readme.markdown +0 -169
- package/node_modules/object-hash/test/blob.js +0 -41
- package/node_modules/object-hash/test/index.js +0 -290
- package/node_modules/object-hash/test/object-classes.js +0 -106
- package/node_modules/object-hash/test/old-crypto.js +0 -60
- package/node_modules/object-hash/test/replacer.js +0 -36
- package/node_modules/object-hash/test/types.js +0 -174
- package/node_modules/object-hash/test/writeToStream.js +0 -27
- package/node_modules/one-time/LICENSE +0 -22
- package/node_modules/one-time/README.md +0 -88
- package/node_modules/one-time/async.js +0 -43
- package/node_modules/one-time/index.js +0 -42
- package/node_modules/one-time/package.json +0 -38
- package/node_modules/process-nextick-args/index.js +0 -45
- package/node_modules/process-nextick-args/license.md +0 -19
- package/node_modules/process-nextick-args/package.json +0 -29
- package/node_modules/process-nextick-args/readme.md +0 -18
- package/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/readable-stream/README.md +0 -58
- package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
- package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
- package/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
- package/node_modules/readable-stream/lib/_stream_transform.js +0 -214
- package/node_modules/readable-stream/lib/_stream_writable.js +0 -687
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -74
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/readable-stream/package.json +0 -56
- package/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/readable-stream/readable-browser.js +0 -7
- package/node_modules/readable-stream/readable.js +0 -19
- package/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -62
- package/node_modules/safe-buffer/package.json +0 -41
- package/node_modules/safe-stable-stringify/CHANGELOG.md +0 -75
- package/node_modules/safe-stable-stringify/LICENSE +0 -21
- package/node_modules/safe-stable-stringify/esm/package.json +0 -4
- package/node_modules/safe-stable-stringify/esm/wrapper.js +0 -6
- package/node_modules/safe-stable-stringify/index.d.ts +0 -18
- package/node_modules/safe-stable-stringify/index.js +0 -618
- package/node_modules/safe-stable-stringify/package.json +0 -69
- package/node_modules/safe-stable-stringify/readme.md +0 -170
- package/node_modules/safe-stable-stringify/tsconfig.json +0 -22
- package/node_modules/simple-swizzle/LICENSE +0 -21
- package/node_modules/simple-swizzle/README.md +0 -39
- package/node_modules/simple-swizzle/index.js +0 -29
- package/node_modules/simple-swizzle/package.json +0 -40
- package/node_modules/stack-trace/.npmignore +0 -1
- package/node_modules/stack-trace/License +0 -19
- package/node_modules/stack-trace/Makefile +0 -11
- package/node_modules/stack-trace/Readme.md +0 -98
- package/node_modules/stack-trace/lib/stack-trace.js +0 -136
- package/node_modules/stack-trace/package.json +0 -25
- package/node_modules/string_decoder/.travis.yml +0 -50
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -35
- package/node_modules/text-hex/LICENSE +0 -21
- package/node_modules/text-hex/README.md +0 -20
- package/node_modules/text-hex/index.js +0 -24
- package/node_modules/text-hex/package.json +0 -34
- package/node_modules/text-hex/test.js +0 -11
- package/node_modules/triple-beam/.eslintrc +0 -7
- package/node_modules/triple-beam/.gitattributes +0 -1
- package/node_modules/triple-beam/.travis.yml +0 -17
- package/node_modules/triple-beam/CHANGELOG.md +0 -22
- package/node_modules/triple-beam/LICENSE +0 -21
- package/node_modules/triple-beam/README.md +0 -34
- package/node_modules/triple-beam/config/cli.js +0 -42
- package/node_modules/triple-beam/config/index.js +0 -32
- package/node_modules/triple-beam/config/npm.js +0 -36
- package/node_modules/triple-beam/config/syslog.js +0 -38
- package/node_modules/triple-beam/index.js +0 -46
- package/node_modules/triple-beam/package.json +0 -40
- package/node_modules/triple-beam/test.js +0 -98
- package/node_modules/util-deprecate/History.md +0 -16
- package/node_modules/util-deprecate/LICENSE +0 -24
- package/node_modules/util-deprecate/README.md +0 -53
- package/node_modules/util-deprecate/browser.js +0 -67
- package/node_modules/util-deprecate/node.js +0 -6
- package/node_modules/util-deprecate/package.json +0 -31
- package/node_modules/winston/LICENSE +0 -19
- package/node_modules/winston/README.md +0 -1231
- package/node_modules/winston/dist/winston/common.js +0 -56
- package/node_modules/winston/dist/winston/config/index.js +0 -37
- package/node_modules/winston/dist/winston/container.js +0 -147
- package/node_modules/winston/dist/winston/create-logger.js +0 -145
- package/node_modules/winston/dist/winston/exception-handler.js +0 -288
- package/node_modules/winston/dist/winston/exception-stream.js +0 -94
- package/node_modules/winston/dist/winston/logger.js +0 -766
- package/node_modules/winston/dist/winston/profiler.js +0 -69
- package/node_modules/winston/dist/winston/rejection-handler.js +0 -288
- package/node_modules/winston/dist/winston/tail-file.js +0 -135
- package/node_modules/winston/dist/winston/transports/console.js +0 -166
- package/node_modules/winston/dist/winston/transports/file.js +0 -817
- package/node_modules/winston/dist/winston/transports/http.js +0 -342
- package/node_modules/winston/dist/winston/transports/index.js +0 -55
- package/node_modules/winston/dist/winston/transports/stream.js +0 -117
- package/node_modules/winston/dist/winston.js +0 -166
- package/node_modules/winston/index.d.ts +0 -213
- package/node_modules/winston/lib/winston/common.js +0 -61
- package/node_modules/winston/lib/winston/config/index.d.ts +0 -99
- package/node_modules/winston/lib/winston/config/index.js +0 -35
- package/node_modules/winston/lib/winston/container.js +0 -114
- package/node_modules/winston/lib/winston/create-logger.js +0 -104
- package/node_modules/winston/lib/winston/exception-handler.js +0 -245
- package/node_modules/winston/lib/winston/exception-stream.js +0 -54
- package/node_modules/winston/lib/winston/logger.js +0 -676
- package/node_modules/winston/lib/winston/profiler.js +0 -51
- package/node_modules/winston/lib/winston/rejection-handler.js +0 -251
- package/node_modules/winston/lib/winston/tail-file.js +0 -124
- package/node_modules/winston/lib/winston/transports/console.js +0 -117
- package/node_modules/winston/lib/winston/transports/file.js +0 -695
- package/node_modules/winston/lib/winston/transports/http.js +0 -267
- package/node_modules/winston/lib/winston/transports/index.d.ts +0 -103
- package/node_modules/winston/lib/winston/transports/index.js +0 -56
- package/node_modules/winston/lib/winston/transports/stream.js +0 -63
- package/node_modules/winston/lib/winston.js +0 -176
- package/node_modules/winston/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/winston/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/winston/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/winston/node_modules/readable-stream/README.md +0 -106
- package/node_modules/winston/node_modules/readable-stream/errors-browser.js +0 -127
- package/node_modules/winston/node_modules/readable-stream/errors.js +0 -116
- package/node_modules/winston/node_modules/readable-stream/experimentalWarning.js +0 -17
- package/node_modules/winston/node_modules/readable-stream/lib/_stream_duplex.js +0 -139
- package/node_modules/winston/node_modules/readable-stream/lib/_stream_passthrough.js +0 -39
- package/node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js +0 -1124
- package/node_modules/winston/node_modules/readable-stream/lib/_stream_transform.js +0 -201
- package/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js +0 -697
- package/node_modules/winston/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -207
- package/node_modules/winston/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -210
- package/node_modules/winston/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -105
- package/node_modules/winston/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -104
- package/node_modules/winston/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
- package/node_modules/winston/node_modules/readable-stream/lib/internal/streams/from.js +0 -64
- package/node_modules/winston/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -97
- package/node_modules/winston/node_modules/readable-stream/lib/internal/streams/state.js +0 -27
- package/node_modules/winston/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/winston/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/winston/node_modules/readable-stream/package.json +0 -72
- package/node_modules/winston/node_modules/readable-stream/readable-browser.js +0 -9
- package/node_modules/winston/node_modules/readable-stream/readable.js +0 -16
- package/node_modules/winston/node_modules/winston-transport/.babelrc +0 -3
- package/node_modules/winston/node_modules/winston-transport/.eslintrc +0 -7
- package/node_modules/winston/node_modules/winston-transport/.gitattributes +0 -1
- package/node_modules/winston/node_modules/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +0 -1
- package/node_modules/winston/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +0 -1
- package/node_modules/winston/node_modules/winston-transport/.nyc_output/processinfo/index.json +0 -1
- package/node_modules/winston/node_modules/winston-transport/CHANGELOG.md +0 -126
- package/node_modules/winston/node_modules/winston-transport/LICENSE +0 -22
- package/node_modules/winston/node_modules/winston-transport/README.md +0 -50
- package/node_modules/winston/node_modules/winston-transport/dist/index.js +0 -215
- package/node_modules/winston/node_modules/winston-transport/dist/legacy.js +0 -116
- package/node_modules/winston/node_modules/winston-transport/index.d.ts +0 -39
- package/node_modules/winston/node_modules/winston-transport/index.js +0 -215
- package/node_modules/winston/node_modules/winston-transport/legacy.js +0 -119
- package/node_modules/winston/node_modules/winston-transport/package.json +0 -56
- package/node_modules/winston/package.json +0 -78
- package/node_modules/winston-compat/.gitattributes +0 -1
- package/node_modules/winston-compat/.node-version +0 -1
- package/node_modules/winston-compat/CHANGELOG.md +0 -17
- package/node_modules/winston-compat/LICENSE +0 -22
- package/node_modules/winston-compat/README.md +0 -2
- package/node_modules/winston-compat/index.js +0 -295
- package/node_modules/winston-compat/lib/transport.js +0 -135
- package/node_modules/winston-compat/node_modules/fecha/CHANGELOG.md +0 -11
- package/node_modules/winston-compat/node_modules/fecha/LICENSE +0 -22
- package/node_modules/winston-compat/node_modules/fecha/README.md +0 -259
- package/node_modules/winston-compat/node_modules/fecha/fecha.d.ts +0 -47
- package/node_modules/winston-compat/node_modules/fecha/fecha.js +0 -334
- package/node_modules/winston-compat/node_modules/fecha/fecha.min.js +0 -1
- package/node_modules/winston-compat/node_modules/fecha/package.json +0 -44
- package/node_modules/winston-compat/node_modules/logform/.babelrc +0 -3
- package/node_modules/winston-compat/node_modules/logform/.eslintrc +0 -7
- package/node_modules/winston-compat/node_modules/logform/.gitattributes +0 -1
- package/node_modules/winston-compat/node_modules/logform/.travis.yml +0 -17
- package/node_modules/winston-compat/node_modules/logform/CHANGELOG.md +0 -103
- package/node_modules/winston-compat/node_modules/logform/LICENSE +0 -21
- package/node_modules/winston-compat/node_modules/logform/README.md +0 -170
- package/node_modules/winston-compat/node_modules/logform/align.js +0 -14
- package/node_modules/winston-compat/node_modules/logform/browser.js +0 -36
- package/node_modules/winston-compat/node_modules/logform/cli.js +0 -52
- package/node_modules/winston-compat/node_modules/logform/colorize.js +0 -118
- package/node_modules/winston-compat/node_modules/logform/combine.js +0 -66
- package/node_modules/winston-compat/node_modules/logform/dist/align.js +0 -14
- package/node_modules/winston-compat/node_modules/logform/dist/browser.js +0 -37
- package/node_modules/winston-compat/node_modules/logform/dist/cli.js +0 -75
- package/node_modules/winston-compat/node_modules/logform/dist/colorize.js +0 -147
- package/node_modules/winston-compat/node_modules/logform/dist/combine.js +0 -66
- package/node_modules/winston-compat/node_modules/logform/dist/format.js +0 -69
- package/node_modules/winston-compat/node_modules/logform/dist/index.js +0 -54
- package/node_modules/winston-compat/node_modules/logform/dist/json.js +0 -27
- package/node_modules/winston-compat/node_modules/logform/dist/label.js +0 -19
- package/node_modules/winston-compat/node_modules/logform/dist/levels.js +0 -15
- package/node_modules/winston-compat/node_modules/logform/dist/logstash.js +0 -32
- package/node_modules/winston-compat/node_modules/logform/dist/metadata.js +0 -63
- package/node_modules/winston-compat/node_modules/logform/dist/ms.js +0 -18
- package/node_modules/winston-compat/node_modules/logform/dist/pad-levels.js +0 -118
- package/node_modules/winston-compat/node_modules/logform/dist/pretty-print.js +0 -20
- package/node_modules/winston-compat/node_modules/logform/dist/printf.js +0 -40
- package/node_modules/winston-compat/node_modules/logform/dist/simple.js +0 -36
- package/node_modules/winston-compat/node_modules/logform/dist/splat.js +0 -147
- package/node_modules/winston-compat/node_modules/logform/dist/timestamp.js +0 -28
- package/node_modules/winston-compat/node_modules/logform/dist/uncolorize.js +0 -31
- package/node_modules/winston-compat/node_modules/logform/examples/combine.js +0 -14
- package/node_modules/winston-compat/node_modules/logform/examples/filter.js +0 -30
- package/node_modules/winston-compat/node_modules/logform/examples/invalid.js +0 -6
- package/node_modules/winston-compat/node_modules/logform/examples/metadata.js +0 -78
- package/node_modules/winston-compat/node_modules/logform/examples/padLevels.js +0 -39
- package/node_modules/winston-compat/node_modules/logform/examples/volume.js +0 -25
- package/node_modules/winston-compat/node_modules/logform/format.js +0 -52
- package/node_modules/winston-compat/node_modules/logform/index.d.ts +0 -53
- package/node_modules/winston-compat/node_modules/logform/index.js +0 -52
- package/node_modules/winston-compat/node_modules/logform/json.js +0 -26
- package/node_modules/winston-compat/node_modules/logform/label.js +0 -19
- package/node_modules/winston-compat/node_modules/logform/levels.js +0 -12
- package/node_modules/winston-compat/node_modules/logform/logstash.js +0 -29
- package/node_modules/winston-compat/node_modules/logform/metadata.js +0 -61
- package/node_modules/winston-compat/node_modules/logform/ms.js +0 -18
- package/node_modules/winston-compat/node_modules/logform/package.json +0 -51
- package/node_modules/winston-compat/node_modules/logform/pad-levels.js +0 -83
- package/node_modules/winston-compat/node_modules/logform/pretty-print.js +0 -16
- package/node_modules/winston-compat/node_modules/logform/printf.js +0 -26
- package/node_modules/winston-compat/node_modules/logform/simple.js +0 -33
- package/node_modules/winston-compat/node_modules/logform/splat.js +0 -125
- package/node_modules/winston-compat/node_modules/logform/timestamp.js +0 -30
- package/node_modules/winston-compat/node_modules/logform/tsconfig.json +0 -22
- package/node_modules/winston-compat/node_modules/logform/uncolorize.js +0 -27
- package/node_modules/winston-compat/package.json +0 -46
- package/node_modules/winston-compat/test/clone.test.js +0 -25
- package/node_modules/winston-compat/test/helpers.js +0 -256
- package/node_modules/winston-compat/test/timestamp.test.js +0 -14
- package/node_modules/winston-compat/test/transports/transport.js +0 -205
- package/node_modules/winston-compat/test/winston-compat.test.js +0 -18
- package/node_modules/winston-daily-rotate-file/.eslintrc.js +0 -11
- package/node_modules/winston-daily-rotate-file/.node-version +0 -1
- package/node_modules/winston-daily-rotate-file/.travis.yml +0 -15
- package/node_modules/winston-daily-rotate-file/LICENSE +0 -22
- package/node_modules/winston-daily-rotate-file/README.md +0 -67
- package/node_modules/winston-daily-rotate-file/daily-rotate-file.js +0 -292
- package/node_modules/winston-daily-rotate-file/index.d.ts +0 -73
- package/node_modules/winston-daily-rotate-file/index.js +0 -7
- package/node_modules/winston-daily-rotate-file/node_modules/semver/CHANGELOG.md +0 -70
- package/node_modules/winston-daily-rotate-file/node_modules/semver/LICENSE +0 -15
- package/node_modules/winston-daily-rotate-file/node_modules/semver/README.md +0 -443
- package/node_modules/winston-daily-rotate-file/node_modules/semver/bin/semver.js +0 -174
- package/node_modules/winston-daily-rotate-file/node_modules/semver/package.json +0 -32
- package/node_modules/winston-daily-rotate-file/node_modules/semver/range.bnf +0 -16
- package/node_modules/winston-daily-rotate-file/node_modules/semver/semver.js +0 -1596
- package/node_modules/winston-daily-rotate-file/package.json +0 -54
- package/node_modules/winston-daily-rotate-file/test/memory-stream.js +0 -38
- package/node_modules/winston-daily-rotate-file/test/random-string.js +0 -31
- package/node_modules/winston-daily-rotate-file/test/transport-tests.js +0 -250
- package/node_modules/winston-transport/.babelrc +0 -3
- package/node_modules/winston-transport/.eslintrc +0 -7
- package/node_modules/winston-transport/.gitattributes +0 -1
- package/node_modules/winston-transport/.nyc_output/1c69f3e4-4c25-457d-9df5-dfa761729528.json +0 -1
- package/node_modules/winston-transport/.nyc_output/processinfo/1c69f3e4-4c25-457d-9df5-dfa761729528.json +0 -1
- package/node_modules/winston-transport/.nyc_output/processinfo/index.json +0 -1
- package/node_modules/winston-transport/.travis.yml +0 -17
- package/node_modules/winston-transport/CHANGELOG.md +0 -115
- package/node_modules/winston-transport/LICENSE +0 -22
- package/node_modules/winston-transport/README.md +0 -50
- package/node_modules/winston-transport/dist/index.js +0 -215
- package/node_modules/winston-transport/dist/legacy.js +0 -116
- package/node_modules/winston-transport/index.d.ts +0 -37
- package/node_modules/winston-transport/index.js +0 -215
- package/node_modules/winston-transport/legacy.js +0 -119
- package/node_modules/winston-transport/package.json +0 -54
- package/node_modules/winston-transport/tsconfig.json +0 -22
- package/perf-logs.js +0 -155
- package/system-diagnostics.js +0 -199
|
@@ -1,1596 +0,0 @@
|
|
|
1
|
-
exports = module.exports = SemVer
|
|
2
|
-
|
|
3
|
-
var debug
|
|
4
|
-
/* istanbul ignore next */
|
|
5
|
-
if (typeof process === 'object' &&
|
|
6
|
-
process.env &&
|
|
7
|
-
process.env.NODE_DEBUG &&
|
|
8
|
-
/\bsemver\b/i.test(process.env.NODE_DEBUG)) {
|
|
9
|
-
debug = function () {
|
|
10
|
-
var args = Array.prototype.slice.call(arguments, 0)
|
|
11
|
-
args.unshift('SEMVER')
|
|
12
|
-
console.log.apply(console, args)
|
|
13
|
-
}
|
|
14
|
-
} else {
|
|
15
|
-
debug = function () {}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Note: this is the semver.org version of the spec that it implements
|
|
19
|
-
// Not necessarily the package version of this code.
|
|
20
|
-
exports.SEMVER_SPEC_VERSION = '2.0.0'
|
|
21
|
-
|
|
22
|
-
var MAX_LENGTH = 256
|
|
23
|
-
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
|
|
24
|
-
/* istanbul ignore next */ 9007199254740991
|
|
25
|
-
|
|
26
|
-
// Max safe segment length for coercion.
|
|
27
|
-
var MAX_SAFE_COMPONENT_LENGTH = 16
|
|
28
|
-
|
|
29
|
-
// The actual regexps go on exports.re
|
|
30
|
-
var re = exports.re = []
|
|
31
|
-
var src = exports.src = []
|
|
32
|
-
var t = exports.tokens = {}
|
|
33
|
-
var R = 0
|
|
34
|
-
|
|
35
|
-
function tok (n) {
|
|
36
|
-
t[n] = R++
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// The following Regular Expressions can be used for tokenizing,
|
|
40
|
-
// validating, and parsing SemVer version strings.
|
|
41
|
-
|
|
42
|
-
// ## Numeric Identifier
|
|
43
|
-
// A single `0`, or a non-zero digit followed by zero or more digits.
|
|
44
|
-
|
|
45
|
-
tok('NUMERICIDENTIFIER')
|
|
46
|
-
src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*'
|
|
47
|
-
tok('NUMERICIDENTIFIERLOOSE')
|
|
48
|
-
src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+'
|
|
49
|
-
|
|
50
|
-
// ## Non-numeric Identifier
|
|
51
|
-
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
|
52
|
-
// more letters, digits, or hyphens.
|
|
53
|
-
|
|
54
|
-
tok('NONNUMERICIDENTIFIER')
|
|
55
|
-
src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
|
|
56
|
-
|
|
57
|
-
// ## Main Version
|
|
58
|
-
// Three dot-separated numeric identifiers.
|
|
59
|
-
|
|
60
|
-
tok('MAINVERSION')
|
|
61
|
-
src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' +
|
|
62
|
-
'(' + src[t.NUMERICIDENTIFIER] + ')\\.' +
|
|
63
|
-
'(' + src[t.NUMERICIDENTIFIER] + ')'
|
|
64
|
-
|
|
65
|
-
tok('MAINVERSIONLOOSE')
|
|
66
|
-
src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' +
|
|
67
|
-
'(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' +
|
|
68
|
-
'(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'
|
|
69
|
-
|
|
70
|
-
// ## Pre-release Version Identifier
|
|
71
|
-
// A numeric identifier, or a non-numeric identifier.
|
|
72
|
-
|
|
73
|
-
tok('PRERELEASEIDENTIFIER')
|
|
74
|
-
src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +
|
|
75
|
-
'|' + src[t.NONNUMERICIDENTIFIER] + ')'
|
|
76
|
-
|
|
77
|
-
tok('PRERELEASEIDENTIFIERLOOSE')
|
|
78
|
-
src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +
|
|
79
|
-
'|' + src[t.NONNUMERICIDENTIFIER] + ')'
|
|
80
|
-
|
|
81
|
-
// ## Pre-release Version
|
|
82
|
-
// Hyphen, followed by one or more dot-separated pre-release version
|
|
83
|
-
// identifiers.
|
|
84
|
-
|
|
85
|
-
tok('PRERELEASE')
|
|
86
|
-
src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +
|
|
87
|
-
'(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'
|
|
88
|
-
|
|
89
|
-
tok('PRERELEASELOOSE')
|
|
90
|
-
src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +
|
|
91
|
-
'(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'
|
|
92
|
-
|
|
93
|
-
// ## Build Metadata Identifier
|
|
94
|
-
// Any combination of digits, letters, or hyphens.
|
|
95
|
-
|
|
96
|
-
tok('BUILDIDENTIFIER')
|
|
97
|
-
src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
|
|
98
|
-
|
|
99
|
-
// ## Build Metadata
|
|
100
|
-
// Plus sign, followed by one or more period-separated build metadata
|
|
101
|
-
// identifiers.
|
|
102
|
-
|
|
103
|
-
tok('BUILD')
|
|
104
|
-
src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] +
|
|
105
|
-
'(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))'
|
|
106
|
-
|
|
107
|
-
// ## Full Version String
|
|
108
|
-
// A main version, followed optionally by a pre-release version and
|
|
109
|
-
// build metadata.
|
|
110
|
-
|
|
111
|
-
// Note that the only major, minor, patch, and pre-release sections of
|
|
112
|
-
// the version string are capturing groups. The build metadata is not a
|
|
113
|
-
// capturing group, because it should not ever be used in version
|
|
114
|
-
// comparison.
|
|
115
|
-
|
|
116
|
-
tok('FULL')
|
|
117
|
-
tok('FULLPLAIN')
|
|
118
|
-
src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +
|
|
119
|
-
src[t.PRERELEASE] + '?' +
|
|
120
|
-
src[t.BUILD] + '?'
|
|
121
|
-
|
|
122
|
-
src[t.FULL] = '^' + src[t.FULLPLAIN] + '$'
|
|
123
|
-
|
|
124
|
-
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
|
|
125
|
-
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
|
|
126
|
-
// common in the npm registry.
|
|
127
|
-
tok('LOOSEPLAIN')
|
|
128
|
-
src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] +
|
|
129
|
-
src[t.PRERELEASELOOSE] + '?' +
|
|
130
|
-
src[t.BUILD] + '?'
|
|
131
|
-
|
|
132
|
-
tok('LOOSE')
|
|
133
|
-
src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'
|
|
134
|
-
|
|
135
|
-
tok('GTLT')
|
|
136
|
-
src[t.GTLT] = '((?:<|>)?=?)'
|
|
137
|
-
|
|
138
|
-
// Something like "2.*" or "1.2.x".
|
|
139
|
-
// Note that "x.x" is a valid xRange identifer, meaning "any version"
|
|
140
|
-
// Only the first item is strictly required.
|
|
141
|
-
tok('XRANGEIDENTIFIERLOOSE')
|
|
142
|
-
src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
|
|
143
|
-
tok('XRANGEIDENTIFIER')
|
|
144
|
-
src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*'
|
|
145
|
-
|
|
146
|
-
tok('XRANGEPLAIN')
|
|
147
|
-
src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +
|
|
148
|
-
'(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' +
|
|
149
|
-
'(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' +
|
|
150
|
-
'(?:' + src[t.PRERELEASE] + ')?' +
|
|
151
|
-
src[t.BUILD] + '?' +
|
|
152
|
-
')?)?'
|
|
153
|
-
|
|
154
|
-
tok('XRANGEPLAINLOOSE')
|
|
155
|
-
src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
|
|
156
|
-
'(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
|
|
157
|
-
'(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
|
|
158
|
-
'(?:' + src[t.PRERELEASELOOSE] + ')?' +
|
|
159
|
-
src[t.BUILD] + '?' +
|
|
160
|
-
')?)?'
|
|
161
|
-
|
|
162
|
-
tok('XRANGE')
|
|
163
|
-
src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$'
|
|
164
|
-
tok('XRANGELOOSE')
|
|
165
|
-
src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$'
|
|
166
|
-
|
|
167
|
-
// Coercion.
|
|
168
|
-
// Extract anything that could conceivably be a part of a valid semver
|
|
169
|
-
tok('COERCE')
|
|
170
|
-
src[t.COERCE] = '(^|[^\\d])' +
|
|
171
|
-
'(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
|
|
172
|
-
'(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
|
|
173
|
-
'(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
|
|
174
|
-
'(?:$|[^\\d])'
|
|
175
|
-
tok('COERCERTL')
|
|
176
|
-
re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')
|
|
177
|
-
|
|
178
|
-
// Tilde ranges.
|
|
179
|
-
// Meaning is "reasonably at or greater than"
|
|
180
|
-
tok('LONETILDE')
|
|
181
|
-
src[t.LONETILDE] = '(?:~>?)'
|
|
182
|
-
|
|
183
|
-
tok('TILDETRIM')
|
|
184
|
-
src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+'
|
|
185
|
-
re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')
|
|
186
|
-
var tildeTrimReplace = '$1~'
|
|
187
|
-
|
|
188
|
-
tok('TILDE')
|
|
189
|
-
src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'
|
|
190
|
-
tok('TILDELOOSE')
|
|
191
|
-
src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'
|
|
192
|
-
|
|
193
|
-
// Caret ranges.
|
|
194
|
-
// Meaning is "at least and backwards compatible with"
|
|
195
|
-
tok('LONECARET')
|
|
196
|
-
src[t.LONECARET] = '(?:\\^)'
|
|
197
|
-
|
|
198
|
-
tok('CARETTRIM')
|
|
199
|
-
src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+'
|
|
200
|
-
re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')
|
|
201
|
-
var caretTrimReplace = '$1^'
|
|
202
|
-
|
|
203
|
-
tok('CARET')
|
|
204
|
-
src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'
|
|
205
|
-
tok('CARETLOOSE')
|
|
206
|
-
src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'
|
|
207
|
-
|
|
208
|
-
// A simple gt/lt/eq thing, or just "" to indicate "any version"
|
|
209
|
-
tok('COMPARATORLOOSE')
|
|
210
|
-
src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'
|
|
211
|
-
tok('COMPARATOR')
|
|
212
|
-
src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$'
|
|
213
|
-
|
|
214
|
-
// An expression to strip any whitespace between the gtlt and the thing
|
|
215
|
-
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
|
|
216
|
-
tok('COMPARATORTRIM')
|
|
217
|
-
src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] +
|
|
218
|
-
'\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'
|
|
219
|
-
|
|
220
|
-
// this one has to use the /g flag
|
|
221
|
-
re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')
|
|
222
|
-
var comparatorTrimReplace = '$1$2$3'
|
|
223
|
-
|
|
224
|
-
// Something like `1.2.3 - 1.2.4`
|
|
225
|
-
// Note that these all use the loose form, because they'll be
|
|
226
|
-
// checked against either the strict or loose comparator form
|
|
227
|
-
// later.
|
|
228
|
-
tok('HYPHENRANGE')
|
|
229
|
-
src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' +
|
|
230
|
-
'\\s+-\\s+' +
|
|
231
|
-
'(' + src[t.XRANGEPLAIN] + ')' +
|
|
232
|
-
'\\s*$'
|
|
233
|
-
|
|
234
|
-
tok('HYPHENRANGELOOSE')
|
|
235
|
-
src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +
|
|
236
|
-
'\\s+-\\s+' +
|
|
237
|
-
'(' + src[t.XRANGEPLAINLOOSE] + ')' +
|
|
238
|
-
'\\s*$'
|
|
239
|
-
|
|
240
|
-
// Star ranges basically just allow anything at all.
|
|
241
|
-
tok('STAR')
|
|
242
|
-
src[t.STAR] = '(<|>)?=?\\s*\\*'
|
|
243
|
-
|
|
244
|
-
// Compile to actual regexp objects.
|
|
245
|
-
// All are flag-free, unless they were created above with a flag.
|
|
246
|
-
for (var i = 0; i < R; i++) {
|
|
247
|
-
debug(i, src[i])
|
|
248
|
-
if (!re[i]) {
|
|
249
|
-
re[i] = new RegExp(src[i])
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
exports.parse = parse
|
|
254
|
-
function parse (version, options) {
|
|
255
|
-
if (!options || typeof options !== 'object') {
|
|
256
|
-
options = {
|
|
257
|
-
loose: !!options,
|
|
258
|
-
includePrerelease: false
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
if (version instanceof SemVer) {
|
|
263
|
-
return version
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
if (typeof version !== 'string') {
|
|
267
|
-
return null
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
if (version.length > MAX_LENGTH) {
|
|
271
|
-
return null
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
var r = options.loose ? re[t.LOOSE] : re[t.FULL]
|
|
275
|
-
if (!r.test(version)) {
|
|
276
|
-
return null
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
try {
|
|
280
|
-
return new SemVer(version, options)
|
|
281
|
-
} catch (er) {
|
|
282
|
-
return null
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
exports.valid = valid
|
|
287
|
-
function valid (version, options) {
|
|
288
|
-
var v = parse(version, options)
|
|
289
|
-
return v ? v.version : null
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
exports.clean = clean
|
|
293
|
-
function clean (version, options) {
|
|
294
|
-
var s = parse(version.trim().replace(/^[=v]+/, ''), options)
|
|
295
|
-
return s ? s.version : null
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
exports.SemVer = SemVer
|
|
299
|
-
|
|
300
|
-
function SemVer (version, options) {
|
|
301
|
-
if (!options || typeof options !== 'object') {
|
|
302
|
-
options = {
|
|
303
|
-
loose: !!options,
|
|
304
|
-
includePrerelease: false
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
if (version instanceof SemVer) {
|
|
308
|
-
if (version.loose === options.loose) {
|
|
309
|
-
return version
|
|
310
|
-
} else {
|
|
311
|
-
version = version.version
|
|
312
|
-
}
|
|
313
|
-
} else if (typeof version !== 'string') {
|
|
314
|
-
throw new TypeError('Invalid Version: ' + version)
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
if (version.length > MAX_LENGTH) {
|
|
318
|
-
throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
if (!(this instanceof SemVer)) {
|
|
322
|
-
return new SemVer(version, options)
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
debug('SemVer', version, options)
|
|
326
|
-
this.options = options
|
|
327
|
-
this.loose = !!options.loose
|
|
328
|
-
|
|
329
|
-
var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
|
|
330
|
-
|
|
331
|
-
if (!m) {
|
|
332
|
-
throw new TypeError('Invalid Version: ' + version)
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
this.raw = version
|
|
336
|
-
|
|
337
|
-
// these are actually numbers
|
|
338
|
-
this.major = +m[1]
|
|
339
|
-
this.minor = +m[2]
|
|
340
|
-
this.patch = +m[3]
|
|
341
|
-
|
|
342
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
343
|
-
throw new TypeError('Invalid major version')
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
347
|
-
throw new TypeError('Invalid minor version')
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
351
|
-
throw new TypeError('Invalid patch version')
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// numberify any prerelease numeric ids
|
|
355
|
-
if (!m[4]) {
|
|
356
|
-
this.prerelease = []
|
|
357
|
-
} else {
|
|
358
|
-
this.prerelease = m[4].split('.').map(function (id) {
|
|
359
|
-
if (/^[0-9]+$/.test(id)) {
|
|
360
|
-
var num = +id
|
|
361
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
362
|
-
return num
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
return id
|
|
366
|
-
})
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
this.build = m[5] ? m[5].split('.') : []
|
|
370
|
-
this.format()
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
SemVer.prototype.format = function () {
|
|
374
|
-
this.version = this.major + '.' + this.minor + '.' + this.patch
|
|
375
|
-
if (this.prerelease.length) {
|
|
376
|
-
this.version += '-' + this.prerelease.join('.')
|
|
377
|
-
}
|
|
378
|
-
return this.version
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
SemVer.prototype.toString = function () {
|
|
382
|
-
return this.version
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
SemVer.prototype.compare = function (other) {
|
|
386
|
-
debug('SemVer.compare', this.version, this.options, other)
|
|
387
|
-
if (!(other instanceof SemVer)) {
|
|
388
|
-
other = new SemVer(other, this.options)
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
return this.compareMain(other) || this.comparePre(other)
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
SemVer.prototype.compareMain = function (other) {
|
|
395
|
-
if (!(other instanceof SemVer)) {
|
|
396
|
-
other = new SemVer(other, this.options)
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
return compareIdentifiers(this.major, other.major) ||
|
|
400
|
-
compareIdentifiers(this.minor, other.minor) ||
|
|
401
|
-
compareIdentifiers(this.patch, other.patch)
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
SemVer.prototype.comparePre = function (other) {
|
|
405
|
-
if (!(other instanceof SemVer)) {
|
|
406
|
-
other = new SemVer(other, this.options)
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
// NOT having a prerelease is > having one
|
|
410
|
-
if (this.prerelease.length && !other.prerelease.length) {
|
|
411
|
-
return -1
|
|
412
|
-
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
413
|
-
return 1
|
|
414
|
-
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
415
|
-
return 0
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
var i = 0
|
|
419
|
-
do {
|
|
420
|
-
var a = this.prerelease[i]
|
|
421
|
-
var b = other.prerelease[i]
|
|
422
|
-
debug('prerelease compare', i, a, b)
|
|
423
|
-
if (a === undefined && b === undefined) {
|
|
424
|
-
return 0
|
|
425
|
-
} else if (b === undefined) {
|
|
426
|
-
return 1
|
|
427
|
-
} else if (a === undefined) {
|
|
428
|
-
return -1
|
|
429
|
-
} else if (a === b) {
|
|
430
|
-
continue
|
|
431
|
-
} else {
|
|
432
|
-
return compareIdentifiers(a, b)
|
|
433
|
-
}
|
|
434
|
-
} while (++i)
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
SemVer.prototype.compareBuild = function (other) {
|
|
438
|
-
if (!(other instanceof SemVer)) {
|
|
439
|
-
other = new SemVer(other, this.options)
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
var i = 0
|
|
443
|
-
do {
|
|
444
|
-
var a = this.build[i]
|
|
445
|
-
var b = other.build[i]
|
|
446
|
-
debug('prerelease compare', i, a, b)
|
|
447
|
-
if (a === undefined && b === undefined) {
|
|
448
|
-
return 0
|
|
449
|
-
} else if (b === undefined) {
|
|
450
|
-
return 1
|
|
451
|
-
} else if (a === undefined) {
|
|
452
|
-
return -1
|
|
453
|
-
} else if (a === b) {
|
|
454
|
-
continue
|
|
455
|
-
} else {
|
|
456
|
-
return compareIdentifiers(a, b)
|
|
457
|
-
}
|
|
458
|
-
} while (++i)
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
462
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
463
|
-
SemVer.prototype.inc = function (release, identifier) {
|
|
464
|
-
switch (release) {
|
|
465
|
-
case 'premajor':
|
|
466
|
-
this.prerelease.length = 0
|
|
467
|
-
this.patch = 0
|
|
468
|
-
this.minor = 0
|
|
469
|
-
this.major++
|
|
470
|
-
this.inc('pre', identifier)
|
|
471
|
-
break
|
|
472
|
-
case 'preminor':
|
|
473
|
-
this.prerelease.length = 0
|
|
474
|
-
this.patch = 0
|
|
475
|
-
this.minor++
|
|
476
|
-
this.inc('pre', identifier)
|
|
477
|
-
break
|
|
478
|
-
case 'prepatch':
|
|
479
|
-
// If this is already a prerelease, it will bump to the next version
|
|
480
|
-
// drop any prereleases that might already exist, since they are not
|
|
481
|
-
// relevant at this point.
|
|
482
|
-
this.prerelease.length = 0
|
|
483
|
-
this.inc('patch', identifier)
|
|
484
|
-
this.inc('pre', identifier)
|
|
485
|
-
break
|
|
486
|
-
// If the input is a non-prerelease version, this acts the same as
|
|
487
|
-
// prepatch.
|
|
488
|
-
case 'prerelease':
|
|
489
|
-
if (this.prerelease.length === 0) {
|
|
490
|
-
this.inc('patch', identifier)
|
|
491
|
-
}
|
|
492
|
-
this.inc('pre', identifier)
|
|
493
|
-
break
|
|
494
|
-
|
|
495
|
-
case 'major':
|
|
496
|
-
// If this is a pre-major version, bump up to the same major version.
|
|
497
|
-
// Otherwise increment major.
|
|
498
|
-
// 1.0.0-5 bumps to 1.0.0
|
|
499
|
-
// 1.1.0 bumps to 2.0.0
|
|
500
|
-
if (this.minor !== 0 ||
|
|
501
|
-
this.patch !== 0 ||
|
|
502
|
-
this.prerelease.length === 0) {
|
|
503
|
-
this.major++
|
|
504
|
-
}
|
|
505
|
-
this.minor = 0
|
|
506
|
-
this.patch = 0
|
|
507
|
-
this.prerelease = []
|
|
508
|
-
break
|
|
509
|
-
case 'minor':
|
|
510
|
-
// If this is a pre-minor version, bump up to the same minor version.
|
|
511
|
-
// Otherwise increment minor.
|
|
512
|
-
// 1.2.0-5 bumps to 1.2.0
|
|
513
|
-
// 1.2.1 bumps to 1.3.0
|
|
514
|
-
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
515
|
-
this.minor++
|
|
516
|
-
}
|
|
517
|
-
this.patch = 0
|
|
518
|
-
this.prerelease = []
|
|
519
|
-
break
|
|
520
|
-
case 'patch':
|
|
521
|
-
// If this is not a pre-release version, it will increment the patch.
|
|
522
|
-
// If it is a pre-release it will bump up to the same patch version.
|
|
523
|
-
// 1.2.0-5 patches to 1.2.0
|
|
524
|
-
// 1.2.0 patches to 1.2.1
|
|
525
|
-
if (this.prerelease.length === 0) {
|
|
526
|
-
this.patch++
|
|
527
|
-
}
|
|
528
|
-
this.prerelease = []
|
|
529
|
-
break
|
|
530
|
-
// This probably shouldn't be used publicly.
|
|
531
|
-
// 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
|
|
532
|
-
case 'pre':
|
|
533
|
-
if (this.prerelease.length === 0) {
|
|
534
|
-
this.prerelease = [0]
|
|
535
|
-
} else {
|
|
536
|
-
var i = this.prerelease.length
|
|
537
|
-
while (--i >= 0) {
|
|
538
|
-
if (typeof this.prerelease[i] === 'number') {
|
|
539
|
-
this.prerelease[i]++
|
|
540
|
-
i = -2
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
if (i === -1) {
|
|
544
|
-
// didn't increment anything
|
|
545
|
-
this.prerelease.push(0)
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
if (identifier) {
|
|
549
|
-
// 1.2.0-beta.1 bumps to 1.2.0-beta.2,
|
|
550
|
-
// 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
|
|
551
|
-
if (this.prerelease[0] === identifier) {
|
|
552
|
-
if (isNaN(this.prerelease[1])) {
|
|
553
|
-
this.prerelease = [identifier, 0]
|
|
554
|
-
}
|
|
555
|
-
} else {
|
|
556
|
-
this.prerelease = [identifier, 0]
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
break
|
|
560
|
-
|
|
561
|
-
default:
|
|
562
|
-
throw new Error('invalid increment argument: ' + release)
|
|
563
|
-
}
|
|
564
|
-
this.format()
|
|
565
|
-
this.raw = this.version
|
|
566
|
-
return this
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
exports.inc = inc
|
|
570
|
-
function inc (version, release, loose, identifier) {
|
|
571
|
-
if (typeof (loose) === 'string') {
|
|
572
|
-
identifier = loose
|
|
573
|
-
loose = undefined
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
try {
|
|
577
|
-
return new SemVer(version, loose).inc(release, identifier).version
|
|
578
|
-
} catch (er) {
|
|
579
|
-
return null
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
exports.diff = diff
|
|
584
|
-
function diff (version1, version2) {
|
|
585
|
-
if (eq(version1, version2)) {
|
|
586
|
-
return null
|
|
587
|
-
} else {
|
|
588
|
-
var v1 = parse(version1)
|
|
589
|
-
var v2 = parse(version2)
|
|
590
|
-
var prefix = ''
|
|
591
|
-
if (v1.prerelease.length || v2.prerelease.length) {
|
|
592
|
-
prefix = 'pre'
|
|
593
|
-
var defaultResult = 'prerelease'
|
|
594
|
-
}
|
|
595
|
-
for (var key in v1) {
|
|
596
|
-
if (key === 'major' || key === 'minor' || key === 'patch') {
|
|
597
|
-
if (v1[key] !== v2[key]) {
|
|
598
|
-
return prefix + key
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
return defaultResult // may be undefined
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
exports.compareIdentifiers = compareIdentifiers
|
|
607
|
-
|
|
608
|
-
var numeric = /^[0-9]+$/
|
|
609
|
-
function compareIdentifiers (a, b) {
|
|
610
|
-
var anum = numeric.test(a)
|
|
611
|
-
var bnum = numeric.test(b)
|
|
612
|
-
|
|
613
|
-
if (anum && bnum) {
|
|
614
|
-
a = +a
|
|
615
|
-
b = +b
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
return a === b ? 0
|
|
619
|
-
: (anum && !bnum) ? -1
|
|
620
|
-
: (bnum && !anum) ? 1
|
|
621
|
-
: a < b ? -1
|
|
622
|
-
: 1
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
exports.rcompareIdentifiers = rcompareIdentifiers
|
|
626
|
-
function rcompareIdentifiers (a, b) {
|
|
627
|
-
return compareIdentifiers(b, a)
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
exports.major = major
|
|
631
|
-
function major (a, loose) {
|
|
632
|
-
return new SemVer(a, loose).major
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
exports.minor = minor
|
|
636
|
-
function minor (a, loose) {
|
|
637
|
-
return new SemVer(a, loose).minor
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
exports.patch = patch
|
|
641
|
-
function patch (a, loose) {
|
|
642
|
-
return new SemVer(a, loose).patch
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
exports.compare = compare
|
|
646
|
-
function compare (a, b, loose) {
|
|
647
|
-
return new SemVer(a, loose).compare(new SemVer(b, loose))
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
exports.compareLoose = compareLoose
|
|
651
|
-
function compareLoose (a, b) {
|
|
652
|
-
return compare(a, b, true)
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
exports.compareBuild = compareBuild
|
|
656
|
-
function compareBuild (a, b, loose) {
|
|
657
|
-
var versionA = new SemVer(a, loose)
|
|
658
|
-
var versionB = new SemVer(b, loose)
|
|
659
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB)
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
exports.rcompare = rcompare
|
|
663
|
-
function rcompare (a, b, loose) {
|
|
664
|
-
return compare(b, a, loose)
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
exports.sort = sort
|
|
668
|
-
function sort (list, loose) {
|
|
669
|
-
return list.sort(function (a, b) {
|
|
670
|
-
return exports.compareBuild(a, b, loose)
|
|
671
|
-
})
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
exports.rsort = rsort
|
|
675
|
-
function rsort (list, loose) {
|
|
676
|
-
return list.sort(function (a, b) {
|
|
677
|
-
return exports.compareBuild(b, a, loose)
|
|
678
|
-
})
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
exports.gt = gt
|
|
682
|
-
function gt (a, b, loose) {
|
|
683
|
-
return compare(a, b, loose) > 0
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
exports.lt = lt
|
|
687
|
-
function lt (a, b, loose) {
|
|
688
|
-
return compare(a, b, loose) < 0
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
exports.eq = eq
|
|
692
|
-
function eq (a, b, loose) {
|
|
693
|
-
return compare(a, b, loose) === 0
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
exports.neq = neq
|
|
697
|
-
function neq (a, b, loose) {
|
|
698
|
-
return compare(a, b, loose) !== 0
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
exports.gte = gte
|
|
702
|
-
function gte (a, b, loose) {
|
|
703
|
-
return compare(a, b, loose) >= 0
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
exports.lte = lte
|
|
707
|
-
function lte (a, b, loose) {
|
|
708
|
-
return compare(a, b, loose) <= 0
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
exports.cmp = cmp
|
|
712
|
-
function cmp (a, op, b, loose) {
|
|
713
|
-
switch (op) {
|
|
714
|
-
case '===':
|
|
715
|
-
if (typeof a === 'object')
|
|
716
|
-
a = a.version
|
|
717
|
-
if (typeof b === 'object')
|
|
718
|
-
b = b.version
|
|
719
|
-
return a === b
|
|
720
|
-
|
|
721
|
-
case '!==':
|
|
722
|
-
if (typeof a === 'object')
|
|
723
|
-
a = a.version
|
|
724
|
-
if (typeof b === 'object')
|
|
725
|
-
b = b.version
|
|
726
|
-
return a !== b
|
|
727
|
-
|
|
728
|
-
case '':
|
|
729
|
-
case '=':
|
|
730
|
-
case '==':
|
|
731
|
-
return eq(a, b, loose)
|
|
732
|
-
|
|
733
|
-
case '!=':
|
|
734
|
-
return neq(a, b, loose)
|
|
735
|
-
|
|
736
|
-
case '>':
|
|
737
|
-
return gt(a, b, loose)
|
|
738
|
-
|
|
739
|
-
case '>=':
|
|
740
|
-
return gte(a, b, loose)
|
|
741
|
-
|
|
742
|
-
case '<':
|
|
743
|
-
return lt(a, b, loose)
|
|
744
|
-
|
|
745
|
-
case '<=':
|
|
746
|
-
return lte(a, b, loose)
|
|
747
|
-
|
|
748
|
-
default:
|
|
749
|
-
throw new TypeError('Invalid operator: ' + op)
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
exports.Comparator = Comparator
|
|
754
|
-
function Comparator (comp, options) {
|
|
755
|
-
if (!options || typeof options !== 'object') {
|
|
756
|
-
options = {
|
|
757
|
-
loose: !!options,
|
|
758
|
-
includePrerelease: false
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
if (comp instanceof Comparator) {
|
|
763
|
-
if (comp.loose === !!options.loose) {
|
|
764
|
-
return comp
|
|
765
|
-
} else {
|
|
766
|
-
comp = comp.value
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
if (!(this instanceof Comparator)) {
|
|
771
|
-
return new Comparator(comp, options)
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
debug('comparator', comp, options)
|
|
775
|
-
this.options = options
|
|
776
|
-
this.loose = !!options.loose
|
|
777
|
-
this.parse(comp)
|
|
778
|
-
|
|
779
|
-
if (this.semver === ANY) {
|
|
780
|
-
this.value = ''
|
|
781
|
-
} else {
|
|
782
|
-
this.value = this.operator + this.semver.version
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
debug('comp', this)
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
var ANY = {}
|
|
789
|
-
Comparator.prototype.parse = function (comp) {
|
|
790
|
-
var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
|
791
|
-
var m = comp.match(r)
|
|
792
|
-
|
|
793
|
-
if (!m) {
|
|
794
|
-
throw new TypeError('Invalid comparator: ' + comp)
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
this.operator = m[1] !== undefined ? m[1] : ''
|
|
798
|
-
if (this.operator === '=') {
|
|
799
|
-
this.operator = ''
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
// if it literally is just '>' or '' then allow anything.
|
|
803
|
-
if (!m[2]) {
|
|
804
|
-
this.semver = ANY
|
|
805
|
-
} else {
|
|
806
|
-
this.semver = new SemVer(m[2], this.options.loose)
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
Comparator.prototype.toString = function () {
|
|
811
|
-
return this.value
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
Comparator.prototype.test = function (version) {
|
|
815
|
-
debug('Comparator.test', version, this.options.loose)
|
|
816
|
-
|
|
817
|
-
if (this.semver === ANY || version === ANY) {
|
|
818
|
-
return true
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
if (typeof version === 'string') {
|
|
822
|
-
try {
|
|
823
|
-
version = new SemVer(version, this.options)
|
|
824
|
-
} catch (er) {
|
|
825
|
-
return false
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
return cmp(version, this.operator, this.semver, this.options)
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
Comparator.prototype.intersects = function (comp, options) {
|
|
833
|
-
if (!(comp instanceof Comparator)) {
|
|
834
|
-
throw new TypeError('a Comparator is required')
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
if (!options || typeof options !== 'object') {
|
|
838
|
-
options = {
|
|
839
|
-
loose: !!options,
|
|
840
|
-
includePrerelease: false
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
var rangeTmp
|
|
845
|
-
|
|
846
|
-
if (this.operator === '') {
|
|
847
|
-
if (this.value === '') {
|
|
848
|
-
return true
|
|
849
|
-
}
|
|
850
|
-
rangeTmp = new Range(comp.value, options)
|
|
851
|
-
return satisfies(this.value, rangeTmp, options)
|
|
852
|
-
} else if (comp.operator === '') {
|
|
853
|
-
if (comp.value === '') {
|
|
854
|
-
return true
|
|
855
|
-
}
|
|
856
|
-
rangeTmp = new Range(this.value, options)
|
|
857
|
-
return satisfies(comp.semver, rangeTmp, options)
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
var sameDirectionIncreasing =
|
|
861
|
-
(this.operator === '>=' || this.operator === '>') &&
|
|
862
|
-
(comp.operator === '>=' || comp.operator === '>')
|
|
863
|
-
var sameDirectionDecreasing =
|
|
864
|
-
(this.operator === '<=' || this.operator === '<') &&
|
|
865
|
-
(comp.operator === '<=' || comp.operator === '<')
|
|
866
|
-
var sameSemVer = this.semver.version === comp.semver.version
|
|
867
|
-
var differentDirectionsInclusive =
|
|
868
|
-
(this.operator === '>=' || this.operator === '<=') &&
|
|
869
|
-
(comp.operator === '>=' || comp.operator === '<=')
|
|
870
|
-
var oppositeDirectionsLessThan =
|
|
871
|
-
cmp(this.semver, '<', comp.semver, options) &&
|
|
872
|
-
((this.operator === '>=' || this.operator === '>') &&
|
|
873
|
-
(comp.operator === '<=' || comp.operator === '<'))
|
|
874
|
-
var oppositeDirectionsGreaterThan =
|
|
875
|
-
cmp(this.semver, '>', comp.semver, options) &&
|
|
876
|
-
((this.operator === '<=' || this.operator === '<') &&
|
|
877
|
-
(comp.operator === '>=' || comp.operator === '>'))
|
|
878
|
-
|
|
879
|
-
return sameDirectionIncreasing || sameDirectionDecreasing ||
|
|
880
|
-
(sameSemVer && differentDirectionsInclusive) ||
|
|
881
|
-
oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
exports.Range = Range
|
|
885
|
-
function Range (range, options) {
|
|
886
|
-
if (!options || typeof options !== 'object') {
|
|
887
|
-
options = {
|
|
888
|
-
loose: !!options,
|
|
889
|
-
includePrerelease: false
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
if (range instanceof Range) {
|
|
894
|
-
if (range.loose === !!options.loose &&
|
|
895
|
-
range.includePrerelease === !!options.includePrerelease) {
|
|
896
|
-
return range
|
|
897
|
-
} else {
|
|
898
|
-
return new Range(range.raw, options)
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
if (range instanceof Comparator) {
|
|
903
|
-
return new Range(range.value, options)
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
if (!(this instanceof Range)) {
|
|
907
|
-
return new Range(range, options)
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
this.options = options
|
|
911
|
-
this.loose = !!options.loose
|
|
912
|
-
this.includePrerelease = !!options.includePrerelease
|
|
913
|
-
|
|
914
|
-
// First, split based on boolean or ||
|
|
915
|
-
this.raw = range
|
|
916
|
-
this.set = range.split(/\s*\|\|\s*/).map(function (range) {
|
|
917
|
-
return this.parseRange(range.trim())
|
|
918
|
-
}, this).filter(function (c) {
|
|
919
|
-
// throw out any that are not relevant for whatever reason
|
|
920
|
-
return c.length
|
|
921
|
-
})
|
|
922
|
-
|
|
923
|
-
if (!this.set.length) {
|
|
924
|
-
throw new TypeError('Invalid SemVer Range: ' + range)
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
this.format()
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
Range.prototype.format = function () {
|
|
931
|
-
this.range = this.set.map(function (comps) {
|
|
932
|
-
return comps.join(' ').trim()
|
|
933
|
-
}).join('||').trim()
|
|
934
|
-
return this.range
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
Range.prototype.toString = function () {
|
|
938
|
-
return this.range
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
Range.prototype.parseRange = function (range) {
|
|
942
|
-
var loose = this.options.loose
|
|
943
|
-
range = range.trim()
|
|
944
|
-
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
|
945
|
-
var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
|
|
946
|
-
range = range.replace(hr, hyphenReplace)
|
|
947
|
-
debug('hyphen replace', range)
|
|
948
|
-
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
|
949
|
-
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
|
|
950
|
-
debug('comparator trim', range, re[t.COMPARATORTRIM])
|
|
951
|
-
|
|
952
|
-
// `~ 1.2.3` => `~1.2.3`
|
|
953
|
-
range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
|
|
954
|
-
|
|
955
|
-
// `^ 1.2.3` => `^1.2.3`
|
|
956
|
-
range = range.replace(re[t.CARETTRIM], caretTrimReplace)
|
|
957
|
-
|
|
958
|
-
// normalize spaces
|
|
959
|
-
range = range.split(/\s+/).join(' ')
|
|
960
|
-
|
|
961
|
-
// At this point, the range is completely trimmed and
|
|
962
|
-
// ready to be split into comparators.
|
|
963
|
-
|
|
964
|
-
var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
|
965
|
-
var set = range.split(' ').map(function (comp) {
|
|
966
|
-
return parseComparator(comp, this.options)
|
|
967
|
-
}, this).join(' ').split(/\s+/)
|
|
968
|
-
if (this.options.loose) {
|
|
969
|
-
// in loose mode, throw out any that are not valid comparators
|
|
970
|
-
set = set.filter(function (comp) {
|
|
971
|
-
return !!comp.match(compRe)
|
|
972
|
-
})
|
|
973
|
-
}
|
|
974
|
-
set = set.map(function (comp) {
|
|
975
|
-
return new Comparator(comp, this.options)
|
|
976
|
-
}, this)
|
|
977
|
-
|
|
978
|
-
return set
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
Range.prototype.intersects = function (range, options) {
|
|
982
|
-
if (!(range instanceof Range)) {
|
|
983
|
-
throw new TypeError('a Range is required')
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
return this.set.some(function (thisComparators) {
|
|
987
|
-
return (
|
|
988
|
-
isSatisfiable(thisComparators, options) &&
|
|
989
|
-
range.set.some(function (rangeComparators) {
|
|
990
|
-
return (
|
|
991
|
-
isSatisfiable(rangeComparators, options) &&
|
|
992
|
-
thisComparators.every(function (thisComparator) {
|
|
993
|
-
return rangeComparators.every(function (rangeComparator) {
|
|
994
|
-
return thisComparator.intersects(rangeComparator, options)
|
|
995
|
-
})
|
|
996
|
-
})
|
|
997
|
-
)
|
|
998
|
-
})
|
|
999
|
-
)
|
|
1000
|
-
})
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
// take a set of comparators and determine whether there
|
|
1004
|
-
// exists a version which can satisfy it
|
|
1005
|
-
function isSatisfiable (comparators, options) {
|
|
1006
|
-
var result = true
|
|
1007
|
-
var remainingComparators = comparators.slice()
|
|
1008
|
-
var testComparator = remainingComparators.pop()
|
|
1009
|
-
|
|
1010
|
-
while (result && remainingComparators.length) {
|
|
1011
|
-
result = remainingComparators.every(function (otherComparator) {
|
|
1012
|
-
return testComparator.intersects(otherComparator, options)
|
|
1013
|
-
})
|
|
1014
|
-
|
|
1015
|
-
testComparator = remainingComparators.pop()
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
return result
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
// Mostly just for testing and legacy API reasons
|
|
1022
|
-
exports.toComparators = toComparators
|
|
1023
|
-
function toComparators (range, options) {
|
|
1024
|
-
return new Range(range, options).set.map(function (comp) {
|
|
1025
|
-
return comp.map(function (c) {
|
|
1026
|
-
return c.value
|
|
1027
|
-
}).join(' ').trim().split(' ')
|
|
1028
|
-
})
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
// comprised of xranges, tildes, stars, and gtlt's at this point.
|
|
1032
|
-
// already replaced the hyphen ranges
|
|
1033
|
-
// turn into a set of JUST comparators.
|
|
1034
|
-
function parseComparator (comp, options) {
|
|
1035
|
-
debug('comp', comp, options)
|
|
1036
|
-
comp = replaceCarets(comp, options)
|
|
1037
|
-
debug('caret', comp)
|
|
1038
|
-
comp = replaceTildes(comp, options)
|
|
1039
|
-
debug('tildes', comp)
|
|
1040
|
-
comp = replaceXRanges(comp, options)
|
|
1041
|
-
debug('xrange', comp)
|
|
1042
|
-
comp = replaceStars(comp, options)
|
|
1043
|
-
debug('stars', comp)
|
|
1044
|
-
return comp
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
function isX (id) {
|
|
1048
|
-
return !id || id.toLowerCase() === 'x' || id === '*'
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
// ~, ~> --> * (any, kinda silly)
|
|
1052
|
-
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
|
|
1053
|
-
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
|
|
1054
|
-
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
|
|
1055
|
-
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
|
|
1056
|
-
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
|
|
1057
|
-
function replaceTildes (comp, options) {
|
|
1058
|
-
return comp.trim().split(/\s+/).map(function (comp) {
|
|
1059
|
-
return replaceTilde(comp, options)
|
|
1060
|
-
}).join(' ')
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
function replaceTilde (comp, options) {
|
|
1064
|
-
var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
|
|
1065
|
-
return comp.replace(r, function (_, M, m, p, pr) {
|
|
1066
|
-
debug('tilde', comp, _, M, m, p, pr)
|
|
1067
|
-
var ret
|
|
1068
|
-
|
|
1069
|
-
if (isX(M)) {
|
|
1070
|
-
ret = ''
|
|
1071
|
-
} else if (isX(m)) {
|
|
1072
|
-
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
|
|
1073
|
-
} else if (isX(p)) {
|
|
1074
|
-
// ~1.2 == >=1.2.0 <1.3.0
|
|
1075
|
-
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
|
|
1076
|
-
} else if (pr) {
|
|
1077
|
-
debug('replaceTilde pr', pr)
|
|
1078
|
-
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
|
|
1079
|
-
' <' + M + '.' + (+m + 1) + '.0'
|
|
1080
|
-
} else {
|
|
1081
|
-
// ~1.2.3 == >=1.2.3 <1.3.0
|
|
1082
|
-
ret = '>=' + M + '.' + m + '.' + p +
|
|
1083
|
-
' <' + M + '.' + (+m + 1) + '.0'
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
debug('tilde return', ret)
|
|
1087
|
-
return ret
|
|
1088
|
-
})
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
// ^ --> * (any, kinda silly)
|
|
1092
|
-
// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
|
|
1093
|
-
// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
|
|
1094
|
-
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
|
|
1095
|
-
// ^1.2.3 --> >=1.2.3 <2.0.0
|
|
1096
|
-
// ^1.2.0 --> >=1.2.0 <2.0.0
|
|
1097
|
-
function replaceCarets (comp, options) {
|
|
1098
|
-
return comp.trim().split(/\s+/).map(function (comp) {
|
|
1099
|
-
return replaceCaret(comp, options)
|
|
1100
|
-
}).join(' ')
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
function replaceCaret (comp, options) {
|
|
1104
|
-
debug('caret', comp, options)
|
|
1105
|
-
var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
|
|
1106
|
-
return comp.replace(r, function (_, M, m, p, pr) {
|
|
1107
|
-
debug('caret', comp, _, M, m, p, pr)
|
|
1108
|
-
var ret
|
|
1109
|
-
|
|
1110
|
-
if (isX(M)) {
|
|
1111
|
-
ret = ''
|
|
1112
|
-
} else if (isX(m)) {
|
|
1113
|
-
ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
|
|
1114
|
-
} else if (isX(p)) {
|
|
1115
|
-
if (M === '0') {
|
|
1116
|
-
ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
|
|
1117
|
-
} else {
|
|
1118
|
-
ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
|
|
1119
|
-
}
|
|
1120
|
-
} else if (pr) {
|
|
1121
|
-
debug('replaceCaret pr', pr)
|
|
1122
|
-
if (M === '0') {
|
|
1123
|
-
if (m === '0') {
|
|
1124
|
-
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
|
|
1125
|
-
' <' + M + '.' + m + '.' + (+p + 1)
|
|
1126
|
-
} else {
|
|
1127
|
-
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
|
|
1128
|
-
' <' + M + '.' + (+m + 1) + '.0'
|
|
1129
|
-
}
|
|
1130
|
-
} else {
|
|
1131
|
-
ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
|
|
1132
|
-
' <' + (+M + 1) + '.0.0'
|
|
1133
|
-
}
|
|
1134
|
-
} else {
|
|
1135
|
-
debug('no pr')
|
|
1136
|
-
if (M === '0') {
|
|
1137
|
-
if (m === '0') {
|
|
1138
|
-
ret = '>=' + M + '.' + m + '.' + p +
|
|
1139
|
-
' <' + M + '.' + m + '.' + (+p + 1)
|
|
1140
|
-
} else {
|
|
1141
|
-
ret = '>=' + M + '.' + m + '.' + p +
|
|
1142
|
-
' <' + M + '.' + (+m + 1) + '.0'
|
|
1143
|
-
}
|
|
1144
|
-
} else {
|
|
1145
|
-
ret = '>=' + M + '.' + m + '.' + p +
|
|
1146
|
-
' <' + (+M + 1) + '.0.0'
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
debug('caret return', ret)
|
|
1151
|
-
return ret
|
|
1152
|
-
})
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
function replaceXRanges (comp, options) {
|
|
1156
|
-
debug('replaceXRanges', comp, options)
|
|
1157
|
-
return comp.split(/\s+/).map(function (comp) {
|
|
1158
|
-
return replaceXRange(comp, options)
|
|
1159
|
-
}).join(' ')
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
function replaceXRange (comp, options) {
|
|
1163
|
-
comp = comp.trim()
|
|
1164
|
-
var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
|
|
1165
|
-
return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
|
|
1166
|
-
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
|
1167
|
-
var xM = isX(M)
|
|
1168
|
-
var xm = xM || isX(m)
|
|
1169
|
-
var xp = xm || isX(p)
|
|
1170
|
-
var anyX = xp
|
|
1171
|
-
|
|
1172
|
-
if (gtlt === '=' && anyX) {
|
|
1173
|
-
gtlt = ''
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
// if we're including prereleases in the match, then we need
|
|
1177
|
-
// to fix this to -0, the lowest possible prerelease value
|
|
1178
|
-
pr = options.includePrerelease ? '-0' : ''
|
|
1179
|
-
|
|
1180
|
-
if (xM) {
|
|
1181
|
-
if (gtlt === '>' || gtlt === '<') {
|
|
1182
|
-
// nothing is allowed
|
|
1183
|
-
ret = '<0.0.0-0'
|
|
1184
|
-
} else {
|
|
1185
|
-
// nothing is forbidden
|
|
1186
|
-
ret = '*'
|
|
1187
|
-
}
|
|
1188
|
-
} else if (gtlt && anyX) {
|
|
1189
|
-
// we know patch is an x, because we have any x at all.
|
|
1190
|
-
// replace X with 0
|
|
1191
|
-
if (xm) {
|
|
1192
|
-
m = 0
|
|
1193
|
-
}
|
|
1194
|
-
p = 0
|
|
1195
|
-
|
|
1196
|
-
if (gtlt === '>') {
|
|
1197
|
-
// >1 => >=2.0.0
|
|
1198
|
-
// >1.2 => >=1.3.0
|
|
1199
|
-
// >1.2.3 => >= 1.2.4
|
|
1200
|
-
gtlt = '>='
|
|
1201
|
-
if (xm) {
|
|
1202
|
-
M = +M + 1
|
|
1203
|
-
m = 0
|
|
1204
|
-
p = 0
|
|
1205
|
-
} else {
|
|
1206
|
-
m = +m + 1
|
|
1207
|
-
p = 0
|
|
1208
|
-
}
|
|
1209
|
-
} else if (gtlt === '<=') {
|
|
1210
|
-
// <=0.7.x is actually <0.8.0, since any 0.7.x should
|
|
1211
|
-
// pass. Similarly, <=7.x is actually <8.0.0, etc.
|
|
1212
|
-
gtlt = '<'
|
|
1213
|
-
if (xm) {
|
|
1214
|
-
M = +M + 1
|
|
1215
|
-
} else {
|
|
1216
|
-
m = +m + 1
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
ret = gtlt + M + '.' + m + '.' + p + pr
|
|
1221
|
-
} else if (xm) {
|
|
1222
|
-
ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr
|
|
1223
|
-
} else if (xp) {
|
|
1224
|
-
ret = '>=' + M + '.' + m + '.0' + pr +
|
|
1225
|
-
' <' + M + '.' + (+m + 1) + '.0' + pr
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
debug('xRange return', ret)
|
|
1229
|
-
|
|
1230
|
-
return ret
|
|
1231
|
-
})
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
// Because * is AND-ed with everything else in the comparator,
|
|
1235
|
-
// and '' means "any version", just remove the *s entirely.
|
|
1236
|
-
function replaceStars (comp, options) {
|
|
1237
|
-
debug('replaceStars', comp, options)
|
|
1238
|
-
// Looseness is ignored here. star is always as loose as it gets!
|
|
1239
|
-
return comp.trim().replace(re[t.STAR], '')
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
// This function is passed to string.replace(re[t.HYPHENRANGE])
|
|
1243
|
-
// M, m, patch, prerelease, build
|
|
1244
|
-
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
|
|
1245
|
-
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
|
|
1246
|
-
// 1.2 - 3.4 => >=1.2.0 <3.5.0
|
|
1247
|
-
function hyphenReplace ($0,
|
|
1248
|
-
from, fM, fm, fp, fpr, fb,
|
|
1249
|
-
to, tM, tm, tp, tpr, tb) {
|
|
1250
|
-
if (isX(fM)) {
|
|
1251
|
-
from = ''
|
|
1252
|
-
} else if (isX(fm)) {
|
|
1253
|
-
from = '>=' + fM + '.0.0'
|
|
1254
|
-
} else if (isX(fp)) {
|
|
1255
|
-
from = '>=' + fM + '.' + fm + '.0'
|
|
1256
|
-
} else {
|
|
1257
|
-
from = '>=' + from
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
if (isX(tM)) {
|
|
1261
|
-
to = ''
|
|
1262
|
-
} else if (isX(tm)) {
|
|
1263
|
-
to = '<' + (+tM + 1) + '.0.0'
|
|
1264
|
-
} else if (isX(tp)) {
|
|
1265
|
-
to = '<' + tM + '.' + (+tm + 1) + '.0'
|
|
1266
|
-
} else if (tpr) {
|
|
1267
|
-
to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
|
|
1268
|
-
} else {
|
|
1269
|
-
to = '<=' + to
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
return (from + ' ' + to).trim()
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
// if ANY of the sets match ALL of its comparators, then pass
|
|
1276
|
-
Range.prototype.test = function (version) {
|
|
1277
|
-
if (!version) {
|
|
1278
|
-
return false
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
if (typeof version === 'string') {
|
|
1282
|
-
try {
|
|
1283
|
-
version = new SemVer(version, this.options)
|
|
1284
|
-
} catch (er) {
|
|
1285
|
-
return false
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
for (var i = 0; i < this.set.length; i++) {
|
|
1290
|
-
if (testSet(this.set[i], version, this.options)) {
|
|
1291
|
-
return true
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
return false
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
function testSet (set, version, options) {
|
|
1298
|
-
for (var i = 0; i < set.length; i++) {
|
|
1299
|
-
if (!set[i].test(version)) {
|
|
1300
|
-
return false
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
|
-
if (version.prerelease.length && !options.includePrerelease) {
|
|
1305
|
-
// Find the set of versions that are allowed to have prereleases
|
|
1306
|
-
// For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
|
|
1307
|
-
// That should allow `1.2.3-pr.2` to pass.
|
|
1308
|
-
// However, `1.2.4-alpha.notready` should NOT be allowed,
|
|
1309
|
-
// even though it's within the range set by the comparators.
|
|
1310
|
-
for (i = 0; i < set.length; i++) {
|
|
1311
|
-
debug(set[i].semver)
|
|
1312
|
-
if (set[i].semver === ANY) {
|
|
1313
|
-
continue
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
if (set[i].semver.prerelease.length > 0) {
|
|
1317
|
-
var allowed = set[i].semver
|
|
1318
|
-
if (allowed.major === version.major &&
|
|
1319
|
-
allowed.minor === version.minor &&
|
|
1320
|
-
allowed.patch === version.patch) {
|
|
1321
|
-
return true
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
// Version has a -pre, but it's not one of the ones we like.
|
|
1327
|
-
return false
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
return true
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
exports.satisfies = satisfies
|
|
1334
|
-
function satisfies (version, range, options) {
|
|
1335
|
-
try {
|
|
1336
|
-
range = new Range(range, options)
|
|
1337
|
-
} catch (er) {
|
|
1338
|
-
return false
|
|
1339
|
-
}
|
|
1340
|
-
return range.test(version)
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
exports.maxSatisfying = maxSatisfying
|
|
1344
|
-
function maxSatisfying (versions, range, options) {
|
|
1345
|
-
var max = null
|
|
1346
|
-
var maxSV = null
|
|
1347
|
-
try {
|
|
1348
|
-
var rangeObj = new Range(range, options)
|
|
1349
|
-
} catch (er) {
|
|
1350
|
-
return null
|
|
1351
|
-
}
|
|
1352
|
-
versions.forEach(function (v) {
|
|
1353
|
-
if (rangeObj.test(v)) {
|
|
1354
|
-
// satisfies(v, range, options)
|
|
1355
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
1356
|
-
// compare(max, v, true)
|
|
1357
|
-
max = v
|
|
1358
|
-
maxSV = new SemVer(max, options)
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
})
|
|
1362
|
-
return max
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
exports.minSatisfying = minSatisfying
|
|
1366
|
-
function minSatisfying (versions, range, options) {
|
|
1367
|
-
var min = null
|
|
1368
|
-
var minSV = null
|
|
1369
|
-
try {
|
|
1370
|
-
var rangeObj = new Range(range, options)
|
|
1371
|
-
} catch (er) {
|
|
1372
|
-
return null
|
|
1373
|
-
}
|
|
1374
|
-
versions.forEach(function (v) {
|
|
1375
|
-
if (rangeObj.test(v)) {
|
|
1376
|
-
// satisfies(v, range, options)
|
|
1377
|
-
if (!min || minSV.compare(v) === 1) {
|
|
1378
|
-
// compare(min, v, true)
|
|
1379
|
-
min = v
|
|
1380
|
-
minSV = new SemVer(min, options)
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
})
|
|
1384
|
-
return min
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
exports.minVersion = minVersion
|
|
1388
|
-
function minVersion (range, loose) {
|
|
1389
|
-
range = new Range(range, loose)
|
|
1390
|
-
|
|
1391
|
-
var minver = new SemVer('0.0.0')
|
|
1392
|
-
if (range.test(minver)) {
|
|
1393
|
-
return minver
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
minver = new SemVer('0.0.0-0')
|
|
1397
|
-
if (range.test(minver)) {
|
|
1398
|
-
return minver
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
minver = null
|
|
1402
|
-
for (var i = 0; i < range.set.length; ++i) {
|
|
1403
|
-
var comparators = range.set[i]
|
|
1404
|
-
|
|
1405
|
-
comparators.forEach(function (comparator) {
|
|
1406
|
-
// Clone to avoid manipulating the comparator's semver object.
|
|
1407
|
-
var compver = new SemVer(comparator.semver.version)
|
|
1408
|
-
switch (comparator.operator) {
|
|
1409
|
-
case '>':
|
|
1410
|
-
if (compver.prerelease.length === 0) {
|
|
1411
|
-
compver.patch++
|
|
1412
|
-
} else {
|
|
1413
|
-
compver.prerelease.push(0)
|
|
1414
|
-
}
|
|
1415
|
-
compver.raw = compver.format()
|
|
1416
|
-
/* fallthrough */
|
|
1417
|
-
case '':
|
|
1418
|
-
case '>=':
|
|
1419
|
-
if (!minver || gt(minver, compver)) {
|
|
1420
|
-
minver = compver
|
|
1421
|
-
}
|
|
1422
|
-
break
|
|
1423
|
-
case '<':
|
|
1424
|
-
case '<=':
|
|
1425
|
-
/* Ignore maximum versions */
|
|
1426
|
-
break
|
|
1427
|
-
/* istanbul ignore next */
|
|
1428
|
-
default:
|
|
1429
|
-
throw new Error('Unexpected operation: ' + comparator.operator)
|
|
1430
|
-
}
|
|
1431
|
-
})
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
if (minver && range.test(minver)) {
|
|
1435
|
-
return minver
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
return null
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
exports.validRange = validRange
|
|
1442
|
-
function validRange (range, options) {
|
|
1443
|
-
try {
|
|
1444
|
-
// Return '*' instead of '' so that truthiness works.
|
|
1445
|
-
// This will throw if it's invalid anyway
|
|
1446
|
-
return new Range(range, options).range || '*'
|
|
1447
|
-
} catch (er) {
|
|
1448
|
-
return null
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
// Determine if version is less than all the versions possible in the range
|
|
1453
|
-
exports.ltr = ltr
|
|
1454
|
-
function ltr (version, range, options) {
|
|
1455
|
-
return outside(version, range, '<', options)
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
// Determine if version is greater than all the versions possible in the range.
|
|
1459
|
-
exports.gtr = gtr
|
|
1460
|
-
function gtr (version, range, options) {
|
|
1461
|
-
return outside(version, range, '>', options)
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
exports.outside = outside
|
|
1465
|
-
function outside (version, range, hilo, options) {
|
|
1466
|
-
version = new SemVer(version, options)
|
|
1467
|
-
range = new Range(range, options)
|
|
1468
|
-
|
|
1469
|
-
var gtfn, ltefn, ltfn, comp, ecomp
|
|
1470
|
-
switch (hilo) {
|
|
1471
|
-
case '>':
|
|
1472
|
-
gtfn = gt
|
|
1473
|
-
ltefn = lte
|
|
1474
|
-
ltfn = lt
|
|
1475
|
-
comp = '>'
|
|
1476
|
-
ecomp = '>='
|
|
1477
|
-
break
|
|
1478
|
-
case '<':
|
|
1479
|
-
gtfn = lt
|
|
1480
|
-
ltefn = gte
|
|
1481
|
-
ltfn = gt
|
|
1482
|
-
comp = '<'
|
|
1483
|
-
ecomp = '<='
|
|
1484
|
-
break
|
|
1485
|
-
default:
|
|
1486
|
-
throw new TypeError('Must provide a hilo val of "<" or ">"')
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
// If it satisifes the range it is not outside
|
|
1490
|
-
if (satisfies(version, range, options)) {
|
|
1491
|
-
return false
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
// From now on, variable terms are as if we're in "gtr" mode.
|
|
1495
|
-
// but note that everything is flipped for the "ltr" function.
|
|
1496
|
-
|
|
1497
|
-
for (var i = 0; i < range.set.length; ++i) {
|
|
1498
|
-
var comparators = range.set[i]
|
|
1499
|
-
|
|
1500
|
-
var high = null
|
|
1501
|
-
var low = null
|
|
1502
|
-
|
|
1503
|
-
comparators.forEach(function (comparator) {
|
|
1504
|
-
if (comparator.semver === ANY) {
|
|
1505
|
-
comparator = new Comparator('>=0.0.0')
|
|
1506
|
-
}
|
|
1507
|
-
high = high || comparator
|
|
1508
|
-
low = low || comparator
|
|
1509
|
-
if (gtfn(comparator.semver, high.semver, options)) {
|
|
1510
|
-
high = comparator
|
|
1511
|
-
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
1512
|
-
low = comparator
|
|
1513
|
-
}
|
|
1514
|
-
})
|
|
1515
|
-
|
|
1516
|
-
// If the edge version comparator has a operator then our version
|
|
1517
|
-
// isn't outside it
|
|
1518
|
-
if (high.operator === comp || high.operator === ecomp) {
|
|
1519
|
-
return false
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
// If the lowest version comparator has an operator and our version
|
|
1523
|
-
// is less than it then it isn't higher than the range
|
|
1524
|
-
if ((!low.operator || low.operator === comp) &&
|
|
1525
|
-
ltefn(version, low.semver)) {
|
|
1526
|
-
return false
|
|
1527
|
-
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
1528
|
-
return false
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
return true
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
exports.prerelease = prerelease
|
|
1535
|
-
function prerelease (version, options) {
|
|
1536
|
-
var parsed = parse(version, options)
|
|
1537
|
-
return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
exports.intersects = intersects
|
|
1541
|
-
function intersects (r1, r2, options) {
|
|
1542
|
-
r1 = new Range(r1, options)
|
|
1543
|
-
r2 = new Range(r2, options)
|
|
1544
|
-
return r1.intersects(r2)
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
exports.coerce = coerce
|
|
1548
|
-
function coerce (version, options) {
|
|
1549
|
-
if (version instanceof SemVer) {
|
|
1550
|
-
return version
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
if (typeof version === 'number') {
|
|
1554
|
-
version = String(version)
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
if (typeof version !== 'string') {
|
|
1558
|
-
return null
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
options = options || {}
|
|
1562
|
-
|
|
1563
|
-
var match = null
|
|
1564
|
-
if (!options.rtl) {
|
|
1565
|
-
match = version.match(re[t.COERCE])
|
|
1566
|
-
} else {
|
|
1567
|
-
// Find the right-most coercible string that does not share
|
|
1568
|
-
// a terminus with a more left-ward coercible string.
|
|
1569
|
-
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
|
|
1570
|
-
//
|
|
1571
|
-
// Walk through the string checking with a /g regexp
|
|
1572
|
-
// Manually set the index so as to pick up overlapping matches.
|
|
1573
|
-
// Stop when we get a match that ends at the string end, since no
|
|
1574
|
-
// coercible string can be more right-ward without the same terminus.
|
|
1575
|
-
var next
|
|
1576
|
-
while ((next = re[t.COERCERTL].exec(version)) &&
|
|
1577
|
-
(!match || match.index + match[0].length !== version.length)
|
|
1578
|
-
) {
|
|
1579
|
-
if (!match ||
|
|
1580
|
-
next.index + next[0].length !== match.index + match[0].length) {
|
|
1581
|
-
match = next
|
|
1582
|
-
}
|
|
1583
|
-
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
|
|
1584
|
-
}
|
|
1585
|
-
// leave it in a clean state
|
|
1586
|
-
re[t.COERCERTL].lastIndex = -1
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
if (match === null) {
|
|
1590
|
-
return null
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
return parse(match[2] +
|
|
1594
|
-
'.' + (match[3] || '0') +
|
|
1595
|
-
'.' + (match[4] || '0'), options)
|
|
1596
|
-
}
|