@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-AT7DN6ES.mjs
+packages/ari/chunk-AT7DN6ES.mjsNew file
+72
Index: package/packages/ari/chunk-AT7DN6ES.mjs
===================================================================
--- package/packages/ari/chunk-AT7DN6ES.mjs
+++ package/packages/ari/chunk-AT7DN6ES.mjs
@@ -0,0 +1,72 @@
+import {
+  MicrosoftAzureDevopsRemoteLinkAriResourceOwner,
+  MicrosoftAzureDevopsRemoteLinkAriResourceType
+} from "./chunk-WOJ62URL.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/microsoft.azure-devops/remote-link/manifest.ts
+var microsoftAzureDevopsRemoteLinkAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "third-party",
+  cloudId: new RegExp("^$"),
+  resourceOwner: MicrosoftAzureDevopsRemoteLinkAriResourceOwner,
+  resourceType: MicrosoftAzureDevopsRemoteLinkAriResourceType,
+  resourceIdSlug: "organization/{organization}/project/{projectId}/repository/{repositoryId}",
+  resourceIdSegmentFormats: {
+    organization: /[a-fA-F0-9]{64}/,
+    projectId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,
+    repositoryId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
+  }
+};
+
+// src/microsoft.azure-devops/remote-link/index.ts
+var MicrosoftAzureDevopsRemoteLinkAri = class _MicrosoftAzureDevopsRemoteLinkAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._organization = opts.resourceIdSegmentValues.organization, this._projectId = opts.resourceIdSegmentValues.projectId, this._repositoryId = opts.resourceIdSegmentValues.repositoryId;
+  }
+  get organization() {
+    return this._organization;
+  }
+  get projectId() {
+    return this._projectId;
+  }
+  get repositoryId() {
+    return this._repositoryId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: microsoftAzureDevopsRemoteLinkAriStaticOpts.qualifier,
+      platformQualifier: microsoftAzureDevopsRemoteLinkAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: microsoftAzureDevopsRemoteLinkAriStaticOpts.resourceOwner,
+      resourceType: microsoftAzureDevopsRemoteLinkAriStaticOpts.resourceType,
+      resourceId: `organization/${opts.organization}/project/${opts.projectId}/repository/${opts.repositoryId}`,
+      resourceIdSegmentValues: {
+        organization: opts.organization,
+        projectId: opts.projectId,
+        repositoryId: opts.repositoryId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, microsoftAzureDevopsRemoteLinkAriStaticOpts);
+    return new _MicrosoftAzureDevopsRemoteLinkAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, microsoftAzureDevopsRemoteLinkAriStaticOpts);
+    return new _MicrosoftAzureDevopsRemoteLinkAri(opts);
+  }
+  getVariables() {
+    return {
+      organization: this.organization,
+      projectId: this.projectId,
+      repositoryId: this.repositoryId
+    };
+  }
+};
+
+export {
+  MicrosoftAzureDevopsRemoteLinkAri
+};