@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-5BA4UDCU.mjs
+packages/ari/chunk-5BA4UDCU.mjsNew file
+60
Index: package/packages/ari/chunk-5BA4UDCU.mjs
===================================================================
--- package/packages/ari/chunk-5BA4UDCU.mjs
+++ package/packages/ari/chunk-5BA4UDCU.mjs
@@ -0,0 +1,60 @@
+import {
+  BitbucketProjectAriResourceOwner,
+  BitbucketProjectAriResourceType
+} from "./chunk-KZCUOZCO.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/bitbucket/project/manifest.ts
+var bitbucketProjectAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  resourceOwner: BitbucketProjectAriResourceOwner,
+  resourceType: BitbucketProjectAriResourceType,
+  resourceIdSlug: "{projectId}",
+  resourceIdSegmentFormats: {
+    projectId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+  }
+};
+
+// src/bitbucket/project/index.ts
+var BitbucketProjectAri = class _BitbucketProjectAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._projectId = opts.resourceIdSegmentValues.projectId;
+  }
+  get projectId() {
+    return this._projectId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: bitbucketProjectAriStaticOpts.qualifier,
+      platformQualifier: bitbucketProjectAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: bitbucketProjectAriStaticOpts.resourceOwner,
+      resourceType: bitbucketProjectAriStaticOpts.resourceType,
+      resourceId: `${opts.projectId}`,
+      resourceIdSegmentValues: {
+        projectId: opts.projectId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, bitbucketProjectAriStaticOpts);
+    return new _BitbucketProjectAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, bitbucketProjectAriStaticOpts);
+    return new _BitbucketProjectAri(opts);
+  }
+  getVariables() {
+    return {
+      projectId: this.projectId
+    };
+  }
+};
+
+export {
+  BitbucketProjectAri
+};