npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/chunk-SXFYLCCM.mjs
Index: package/packages/ari/chunk-SXFYLCCM.mjs
===================================================================
--- package/packages/ari/chunk-SXFYLCCM.mjs
+++ package/packages/ari/chunk-SXFYLCCM.mjs
@@ -0,0 +1,77 @@
+import {
+ GithubGithubCommentAriResourceOwner,
+ GithubGithubCommentAriResourceType
+} from "./chunk-LOCQJBS5.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/github.github/comment/manifest.ts
+var githubGithubCommentAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "third-party",
+ cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
+ resourceOwner: GithubGithubCommentAriResourceOwner,
+ resourceType: GithubGithubCommentAriResourceType,
+ resourceIdSlug: "repositoryId/{repositoryId}/pullRequestId/{pullRequestId}/comment/{commentId}",
+ resourceIdSegmentFormats: {
+ repositoryId: /[0-9]+/,
+ // eslint-disable-line no-useless-escape
+ pullRequestId: /[0-9]+/,
+ // eslint-disable-line no-useless-escape
+ commentId: /[0-9]+/
+ // eslint-disable-line no-useless-escape
+ }
+};
+
+// src/github.github/comment/index.ts
+var GithubGithubCommentAri = class _GithubGithubCommentAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts);
+ this._repositoryId = opts.resourceIdSegmentValues.repositoryId, this._pullRequestId = opts.resourceIdSegmentValues.pullRequestId, this._commentId = opts.resourceIdSegmentValues.commentId;
+ }
+ get repositoryId() {
+ return this._repositoryId;
+ }
+ get pullRequestId() {
+ return this._pullRequestId;
+ }
+ get commentId() {
+ return this._commentId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: githubGithubCommentAriStaticOpts.qualifier,
+ platformQualifier: githubGithubCommentAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: githubGithubCommentAriStaticOpts.resourceOwner,
+ resourceType: githubGithubCommentAriStaticOpts.resourceType,
+ resourceId: `repositoryId/${opts.repositoryId}/pullRequestId/${opts.pullRequestId}/comment/${opts.commentId}`,
+ resourceIdSegmentValues: {
+ repositoryId: opts.repositoryId,
+ pullRequestId: opts.pullRequestId,
+ commentId: opts.commentId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, githubGithubCommentAriStaticOpts);
+ return new _GithubGithubCommentAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, githubGithubCommentAriStaticOpts);
+ return new _GithubGithubCommentAri(opts);
+ }
+ getVariables() {
+ return {
+ repositoryId: this.repositoryId,
+ pullRequestId: this.pullRequestId,
+ commentId: this.commentId
+ };
+ }
+};
+
+export {
+ GithubGithubCommentAri
+};