diff --git a/package.json b/package.json index 5f6ad430f..9ef73f567 100644 --- a/package.json +++ b/package.json @@ -133,6 +133,7 @@ "commander": "^2.18.0", "debug": "^4.1.1", "get-stdin": "^6.0.0", + "gitlab": "^5.0.0-rc.11", "http-proxy-agent": "^2.1.0", "https-proxy-agent": "^2.2.1", "hyperlinker": "^1.0.0", diff --git a/source/dsl/GitLabDSL.ts b/source/dsl/GitLabDSL.ts new file mode 100644 index 000000000..378bd198f --- /dev/null +++ b/source/dsl/GitLabDSL.ts @@ -0,0 +1,138 @@ +export interface GitLabUser { + id: number + name: string + username: string + state: "active" + avatar_url: string | null + web_url: string +} + +export interface GitLabMRDSLBase { + /** */ + id: number + + /** */ + iid: number + + /** */ + project_id: number + + /** */ + title: string + + /** */ + description: string + + /** */ + state: "closed" | "open" | "locked" | "merged" + + /** */ + created_at: string + + /** */ + updated_at: string + + target_branch: string + source_branch: string + upvotes: number + downvotes: number + + author: GitLabUser + user: { + can_merge: boolean + } + assignee: GitLabUser + source_project_id: number + target_project_id: number + labels: string[] + work_in_progress: boolean + milestone: { + id: number + iid: number + project_id: number + title: string + description: string + state: "closed" + created_at: string + updated_at: string + due_date: string + start_date: string + web_url: string + } + merge_when_pipeline_succeeds: boolean + merge_status: "can_be_merged" + merge_error: null | null + sha: string + merge_commit_sha: string | null + user_notes_count: number + discussion_locked: null | null + should_remove_source_branch: boolean + force_remove_source_branch: boolean + allow_collaboration: boolean + allow_maintainer_to_push: boolean + web_url: string + time_stats: { + time_estimate: number + total_time_spent: number + human_time_estimate: number | null + human_total_time_spent: number | null + } +} + +export interface GitLabMRDSL extends GitLabMRDSLBase { + squash: boolean + subscribed: boolean + changes_count: string + merged_by: GitLabUser + merged_at: string + closed_by: GitLabUser | null + closed_at: string | null + latest_build_started_at: string + latest_build_finished_at: string + first_deployed_to_production_at: string | null + pipeline: { + id: number + sha: string + ref: string + status: "success" + web_url: string + } + diff_refs: { + base_sha: string + head_sha: string + start_sha: string + } + diverged_commits_count: number + rebase_in_progress: boolean + approvals_before_merge: null | null +} + +export interface GitLabMRChangeDSL { + old_path: string + new_path: string + a_mode: string + b_mode: string + diff: string + new_file: boolean + renamed_file: boolean + deleted_file: boolean +} + +export interface GitLabMRChangesDSL extends GitLabMRDSLBase { + changes: GitLabMRChangeDSL[] +} + +export interface GitLabMRCommitDSL { + id: string + short_id: string + created_at: string + parent_ids: string[] + title: string + message: string + author_name: string + author_email: string + authored_date: string + committer_name: string + committer_email: string + committed_date: string +} diff --git a/source/platforms/GitLab.ts b/source/platforms/GitLab.ts index ed44d6616..2cd60c75c 100644 --- a/source/platforms/GitLab.ts +++ b/source/platforms/GitLab.ts @@ -1,7 +1,8 @@ import GitLabAPI from "./gitlab/GitLabAPI" import { Platform, Comment } from "./platform" import { readFileSync } from "fs" -import { GitDSL } from "../dsl/GitDSL" +import { GitDSL, GitJSONDSL } from "../dsl/GitDSL" +import { GitCommit } from "../dsl/Commit" class GitLab implements Platform { public readonly name: string @@ -11,33 +12,57 @@ class GitLab implements Platform { } async getReviewInfo(): Promise { - return {} + return this.api.getPullRequestInfo() } async getPlatformReviewDSLRepresentation(): Promise { return {} } - async getPlatformGitRepresentation(): Promise { - return { - modified_files: [], - created_files: [], - deleted_files: [], - diffForFile: async () => ({ before: "", after: "", diff: "", added: "", removed: "" }), - structuredDiffForFile: async () => ({ chunks: [] }), - JSONDiffForFile: async () => ({} as any), - JSONPatchForFile: async () => ({} as any), - commits: [ - { - sha: "123", - author: { name: "1", email: "1", date: "1" }, - committer: { name: "1", email: "1", date: "1" }, - message: "456", - tree: { sha: "123", url: "123" }, - url: "123", + async getPlatformGitRepresentation(): Promise { + const changes = await this.api.getMergeRequestChanges() + const commits = await this.api.getMergeRequestCommits() + + const mappedCommits: GitCommit[] = commits.map(commit => { + return { + sha: commit.id, + author: { + name: commit.author_name, + email: commit.author_email, + date: commit.authored_date, + }, + committer: { + name: commit.committer_name, + email: commit.committer_email, + date: commit.committed_date, }, - ], - linesOfCode: async () => 0, + message: commit.message, + parents: commit.parent_ids, + url: `${this.api.projectURL}/commit/${commit.id}`, + //url: `${this.api.mergeRequestURL}/diffs?commit_id=${commit.id}`, + tree: null, + } + }) + + // XXX: does "renamed_file"/move count is "delete/create", or "modified"? + const modified_files: string[] = changes + .filter(change => change.new_file === false && change.deleted_file == false) + .map(change => change.new_path) + const created_files: string[] = changes.filter(change => change.new_file === true).map(change => change.new_path) + const deleted_files: string[] = changes + .filter(change => change.deleted_file === true) + .map(change => change.new_path) + + return { + modified_files, + created_files, + deleted_files, + // diffForFile: async () => ({ before: "", after: "", diff: "", added: "", removed: "" }), + // structuredDiffForFile: async () => ({ chunks: [] }), + // JSONDiffForFile: async () => ({} as any), + // JSONPatchForFile: async () => ({} as any), + commits: mappedCommits, + // linesOfCode: async () => 0, } } diff --git a/source/platforms/gitlab/GitLabAPI.ts b/source/platforms/gitlab/GitLabAPI.ts index 9b234dc94..b2fdc34e9 100644 --- a/source/platforms/gitlab/GitLabAPI.ts +++ b/source/platforms/gitlab/GitLabAPI.ts @@ -1,15 +1,83 @@ import { RepoMetaData } from "../../dsl/BitBucketServerDSL" import { api as fetch } from "../../api/fetch" +import { GitLabMRDSL, GitLabMRChangesDSL, GitLabMRChangeDSL, GitLabMRCommitDSL } from "../../dsl/GitLabDSL" + +import { Gitlab } from "gitlab" +// const Gitlab = require("gitlab").default export type GitLabAPIToken = string class GitLabAPI { fetch: typeof fetch + private pr: GitLabMRDSL | undefined + + // https://github.com/jdalrymple/node-gitlab/issues/257 + private api: any //typeof Gitlab + constructor(public readonly repoMetadata: RepoMetaData, public readonly token: GitLabAPIToken) { // This allows Peril to DI in a new Fetch function // which can handle unique API edge-cases around integrations this.fetch = fetch + + // Type 'Mapper' is not assignable to type + // 'Bundle'. + // Type 'Mapper' provides no match for the signature + // 'new (options?: any): Mapper'.ts(2322) + + const api = new Gitlab({ + host: this.hostURL, + token, + }) + + this.api = api + } + + get hostURL(): string { + return `https://${process.env["DANGER_GITLAB_HOST"]}` + } + + get projectURL(): string { + return `${this.hostURL}/${this.repoMetadata.repoSlug}` + } + + get mergeRequestURL(): string { + return `${this.projectURL}/merge_requests/${this.repoMetadata.pullRequestID}` + } + + getPullRequestInfo = async (): Promise => { + if (this.pr) { + return this.pr + } + + console.log("[+] getPullRequestInfo") + + return this.api.MergeRequests.show(this.repoMetadata.repoSlug, this.repoMetadata.pullRequestID) + + // const repo = this.repoMetadata.repoSlug + // const prID = this.repoMetadata.pullRequestID + // const res = await this.get(`repos/${repo}/pulls/${prID}`) + // const prDSL = (await res.json()) as GitLabMRDSL + // this.pr = prDSL + + // if (res.ok) { + // return prDSL + // } else { + // throw `Could not get PR Metadata for repos/${repo}/pulls/${prID}` + // } + } + + getMergeRequestChanges = async (): Promise => { + const pr: GitLabMRChangesDSL = await this.api.MergeRequests.changes( + this.repoMetadata.repoSlug, + this.repoMetadata.pullRequestID + ) + + return pr.changes + } + + getMergeRequestCommits = async (): Promise => { + return this.api.MergeRequests.commits(this.repoMetadata.repoSlug, this.repoMetadata.pullRequestID) } } diff --git a/yarn.lock b/yarn.lock index ba944ce8c..fef1c5b14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -811,6 +811,11 @@ dependencies: any-observable "^0.3.0" +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + "@sindresorhus/is@^0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" @@ -821,11 +826,25 @@ resolved "https://registry.yarnpkg.com/@types/braces/-/braces-2.3.0.tgz#d00ec0a76562b2acb6f29330be33a093e33ed25c" integrity sha512-A3MV5EsLHgShHoJ/XES/fQAnwNISKLrFuH9eNBZY5OkTQB7JPIwbRoExvRpDsNABvkMojnKqKWS8x0m2rLYi+A== +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + "@types/debug@0.0.30": version "0.0.30" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-0.0.30.tgz#dc1e40f7af3b9c815013a7860e6252f6352a84df" integrity sha512-orGL5LXERPYsLov6CWs3Fh6203+dXzJkR7OnddIr2514Hsecwc8xRpzCapshBbKFImCsvS/mk6+FWiN5LyZJAQ== +"@types/form-data@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e" + integrity sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ== + dependencies: + "@types/node" "*" + "@types/fs-extra@4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-4.0.0.tgz#1dd742ad5c9bce308f7a52d02ebc01421bc9102f" @@ -1202,6 +1221,11 @@ array-union@^1.0.1: dependencies: array-uniq "^1.0.1" +array-uniq@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.2.tgz#5fcc373920775723cfd64d65c64bef53bf9eba6d" + integrity sha1-X8w3OSB3VyPP1k1lxkvvU7+eum0= + array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -2098,6 +2122,19 @@ cacheable-request@^2.1.1: normalize-url "2.0.1" responselike "1.0.2" +cacheable-request@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.0.0.tgz#4a1727414e02ac4af82560c4da1b61daa3fa2b63" + integrity sha512-2N7AmszH/WPPpl5Z3XMw1HAP+8d+xugnKQAeKvxFZ/04dbT/CAznqwbl+7eSr3HkwdepNwtb2yx3CAMQWvG01Q== + dependencies: + clone-response "^1.0.2" + get-stream "^4.0.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^1.0.1" + normalize-url "^3.1.0" + responselike "^1.0.2" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -2356,7 +2393,7 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" -clone-response@1.0.2: +clone-response@1.0.2, clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= @@ -2405,6 +2442,13 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" +combined-stream@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" + integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== + dependencies: + delayed-stream "~1.0.0" + commander@^2.11.0: version "2.12.2" resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555" @@ -2997,6 +3041,11 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" +defer-to-connect@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" + integrity sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw== + define-properties@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" @@ -3749,6 +3798,15 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +form-data@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + form-data@~2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf" @@ -3921,7 +3979,7 @@ get-stream@3.0.0, get-stream@^3.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= -get-stream@^4.0.0: +get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== @@ -3983,6 +4041,19 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" +gitlab@^5.0.0-rc.11: + version "5.0.0-rc.11" + resolved "https://registry.yarnpkg.com/gitlab/-/gitlab-5.0.0-rc.11.tgz#ff06b1ca7409b2d1e59cdee98e005796df6280c5" + integrity sha512-z7VYXXhQy8YS/My8gA6Dt1XraDPyXR2TYapVNUJvxeMwPnpIXEoe6LV3IWCMf3ux09iRDFq8woA0PgkB+P6S3g== + dependencies: + "@types/form-data" "^2.2.1" + form-data "^2.3.3" + got "^9.6.0" + humps "^2.0.1" + ky "^0.9.0" + query-string "^6.4.2" + randomstring "^1.1.5" + glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" @@ -4109,6 +4180,23 @@ got@^6.7.1: unzip-response "^2.0.1" url-parse-lax "^1.0.0" +got@^9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -4306,6 +4394,11 @@ http-cache-semantics@3.8.1: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== +http-cache-semantics@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz#495704773277eeef6e43f9ab2c2c7d259dda25c5" + integrity sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew== + http-errors@~1.6.1: version "1.6.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" @@ -4341,6 +4434,11 @@ https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1: agent-base "^4.1.0" debug "^3.1.0" +humps@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/humps/-/humps-2.0.1.tgz#dd02ea6081bd0568dc5d073184463957ba9ef9aa" + integrity sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao= + husky@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/husky/-/husky-1.0.1.tgz#749bc6b3a14bdc9cab73d8cc827b92fcd691fac6" @@ -5508,6 +5606,13 @@ keyv@3.0.0: dependencies: json-buffer "3.0.0" +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + dependencies: + json-buffer "3.0.0" + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -5537,6 +5642,11 @@ kleur@^3.0.0: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.1.tgz#4f5b313f5fa315432a400f19a24db78d451ede62" integrity sha512-P3kRv+B+Ra070ng2VKQqW4qW7gd/v3iD8sy/zOdcYRsfiD+QBokQNOps/AfP6Hr48cBhIIBFWckB9aO+IZhrWg== +ky@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/ky/-/ky-0.9.0.tgz#f6ca68417e1c95e0292d083d5c3c4c39558c13fe" + integrity sha512-5OgdeZ/HROtJh6ghuSARGIe4Y0SzY+eM7EY5YEvlVVBmp3V2ioz1erGRYaf55uMUG0jTkE+L8USxD+oiRmgX8A== + latest-version@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" @@ -5894,6 +6004,11 @@ lowercase-keys@1.0.0, lowercase-keys@^1.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY= +lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + lru-cache@^4.0.0, lru-cache@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" @@ -6176,7 +6291,7 @@ mimic-fn@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" integrity sha1-5md4PZLonb00KBi1IwudYqZyrRg= -mimic-response@^1.0.0: +mimic-response@^1.0.0, mimic-response@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== @@ -6475,6 +6590,11 @@ normalize-url@2.0.1: query-string "^5.0.1" sort-keys "^2.0.0" +normalize-url@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" + integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== + npm-bundled@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" @@ -6752,6 +6872,11 @@ p-cancelable@^0.4.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" @@ -7247,11 +7372,27 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" +query-string@^6.4.2: + version "6.4.2" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.4.2.tgz#8be1dbd105306aebf86022144f575a29d516b713" + integrity sha512-DfJqAen17LfLA3rQ+H5S4uXphrF+ANU1lT2ijds4V/Tj4gZxA3gx5/tg1bz7kYCmwna7LyJNCYqO7jNRzo3aLw== + dependencies: + decode-uri-component "^0.2.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= +randomstring@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/randomstring/-/randomstring-1.1.5.tgz#6df0628f75cbd5932930d9fe3ab4e956a18518c3" + integrity sha1-bfBij3XL1ZMpMNn+OrTpVqGFGMM= + dependencies: + array-uniq "1.0.2" + range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" @@ -7780,7 +7921,7 @@ resolve@^1.3.2: dependencies: path-parse "^1.0.5" -responselike@1.0.2: +responselike@1.0.2, responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= @@ -8226,6 +8367,11 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" integrity sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA== +split-on-first@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.0.0.tgz#648af4ce9a28fbcaadd43274455f298b55025fc6" + integrity sha512-mjA57TQtdWztVZ9THAjGNpgbuIrNfsNrGa5IyK94NoPaT4N14M+GI4jD7t4arLjFkYRQWdETC5RxFzLWouoB3A== + split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -8307,6 +8453,11 @@ strict-uri-encode@^1.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + string-argv@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.0.2.tgz#dac30408690c21f3c3630a3ff3a05877bdcbd736" @@ -8628,6 +8779,11 @@ to-object-path@^0.3.0: dependencies: kind-of "^3.0.2" +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"