@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-HNFXCXIN.mjs
+packages/ari/chunk-HNFXCXIN.mjsNew file
+71
Index: package/packages/ari/chunk-HNFXCXIN.mjs
===================================================================
--- package/packages/ari/chunk-HNFXCXIN.mjs
+++ package/packages/ari/chunk-HNFXCXIN.mjs
@@ -0,0 +1,71 @@
+import {
+  CompassComponentLabelAriResourceOwner,
+  CompassComponentLabelAriResourceType
+} from "./chunk-QOMYCLGO.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/compass/component-label/manifest.ts
+var compassComponentLabelAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^[a-zA-Z0-9_\\-.]{1,255}$"),
+  resourceOwner: CompassComponentLabelAriResourceOwner,
+  resourceType: CompassComponentLabelAriResourceType,
+  resourceIdSlug: "{workspaceId}/{labelId}",
+  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}/,
+    labelId: /[0-9a-f\-]{36,64}/
+    // eslint-disable-line no-useless-escape
+  }
+};
+
+// src/compass/component-label/index.ts
+var CompassComponentLabelAri = class _CompassComponentLabelAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._siteId = opts.cloudId || "", this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._labelId = opts.resourceIdSegmentValues.labelId;
+  }
+  get siteId() {
+    return this._siteId;
+  }
+  get workspaceId() {
+    return this._workspaceId;
+  }
+  get labelId() {
+    return this._labelId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: compassComponentLabelAriStaticOpts.qualifier,
+      platformQualifier: compassComponentLabelAriStaticOpts.platformQualifier,
+      cloudId: opts.siteId,
+      resourceOwner: compassComponentLabelAriStaticOpts.resourceOwner,
+      resourceType: compassComponentLabelAriStaticOpts.resourceType,
+      resourceId: `${opts.workspaceId}/${opts.labelId}`,
+      resourceIdSegmentValues: {
+        workspaceId: opts.workspaceId,
+        labelId: opts.labelId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, compassComponentLabelAriStaticOpts);
+    return new _CompassComponentLabelAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, compassComponentLabelAriStaticOpts);
+    return new _CompassComponentLabelAri(opts);
+  }
+  getVariables() {
+    return {
+      siteId: this.siteId,
+      workspaceId: this.workspaceId,
+      labelId: this.labelId
+    };
+  }
+};
+
+export {
+  CompassComponentLabelAri
+};