npm package diff

Package: @forge/util

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

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

Index: package/packages/ari/chunk-VRCK4EFE.mjs
===================================================================
--- package/packages/ari/chunk-VRCK4EFE.mjs
+++ package/packages/ari/chunk-VRCK4EFE.mjs
@@ -0,0 +1,63 @@
+import {
+  BitbucketWorkspaceAriResourceOwner,
+  BitbucketWorkspaceAriResourceType
+} from "./chunk-A35PGQYK.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/bitbucket/workspace/manifest.ts
+var bitbucketWorkspaceAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  // eslint-disable-line no-useless-escape
+  resourceOwner: BitbucketWorkspaceAriResourceOwner,
+  resourceType: BitbucketWorkspaceAriResourceType,
+  resourceIdSlug: "{workspaceId}",
+  resourceIdSegmentFormats: {
+    workspaceId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+    // eslint-disable-line no-useless-escape
+  }
+};
+
+// src/bitbucket/workspace/index.ts
+var BitbucketWorkspaceAri = class _BitbucketWorkspaceAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts);
+    this._workspaceId = opts.resourceIdSegmentValues.workspaceId;
+  }
+  get workspaceId() {
+    return this._workspaceId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: bitbucketWorkspaceAriStaticOpts.qualifier,
+      platformQualifier: bitbucketWorkspaceAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: bitbucketWorkspaceAriStaticOpts.resourceOwner,
+      resourceType: bitbucketWorkspaceAriStaticOpts.resourceType,
+      resourceId: `${opts.workspaceId}`,
+      resourceIdSegmentValues: {
+        workspaceId: opts.workspaceId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, bitbucketWorkspaceAriStaticOpts);
+    return new _BitbucketWorkspaceAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, bitbucketWorkspaceAriStaticOpts);
+    return new _BitbucketWorkspaceAri(opts);
+  }
+  getVariables() {
+    return {
+      workspaceId: this.workspaceId
+    };
+  }
+};
+
+export {
+  BitbucketWorkspaceAri
+};