npm package diff

Package: @forge/util

Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31

File: package/packages/ari/chunk-XI7AS255.mjs

Index: package/packages/ari/chunk-XI7AS255.mjs
===================================================================
--- package/packages/ari/chunk-XI7AS255.mjs
+++ package/packages/ari/chunk-XI7AS255.mjs
@@ -0,0 +1,70 @@
+import {
+  SentrySentryRemoteLinkAriResourceOwner,
+  SentrySentryRemoteLinkAriResourceType
+} from "./chunk-R33LKGOS.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/sentry.sentry/remote-link/manifest.ts
+var sentrySentryRemoteLinkAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "third-party",
+  cloudId: new RegExp("^$"),
+  // eslint-disable-line no-useless-escape
+  resourceOwner: SentrySentryRemoteLinkAriResourceOwner,
+  resourceType: SentrySentryRemoteLinkAriResourceType,
+  resourceIdSlug: "org/{orgId}/issue/{issueId}",
+  resourceIdSegmentFormats: {
+    orgId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/,
+    // eslint-disable-line no-useless-escape
+    issueId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+    // eslint-disable-line no-useless-escape
+  }
+};
+
+// src/sentry.sentry/remote-link/index.ts
+var SentrySentryRemoteLinkAri = class _SentrySentryRemoteLinkAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts);
+    this._orgId = opts.resourceIdSegmentValues.orgId, this._issueId = opts.resourceIdSegmentValues.issueId;
+  }
+  get orgId() {
+    return this._orgId;
+  }
+  get issueId() {
+    return this._issueId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: sentrySentryRemoteLinkAriStaticOpts.qualifier,
+      platformQualifier: sentrySentryRemoteLinkAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: sentrySentryRemoteLinkAriStaticOpts.resourceOwner,
+      resourceType: sentrySentryRemoteLinkAriStaticOpts.resourceType,
+      resourceId: `org/${opts.orgId}/issue/${opts.issueId}`,
+      resourceIdSegmentValues: {
+        orgId: opts.orgId,
+        issueId: opts.issueId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, sentrySentryRemoteLinkAriStaticOpts);
+    return new _SentrySentryRemoteLinkAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, sentrySentryRemoteLinkAriStaticOpts);
+    return new _SentrySentryRemoteLinkAri(opts);
+  }
+  getVariables() {
+    return {
+      orgId: this.orgId,
+      issueId: this.issueId
+    };
+  }
+};
+
+export {
+  SentrySentryRemoteLinkAri
+};