@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-Y74LDJPF.mjs+
packages/ari/chunk-Y74LDJPF.mjsNew file+60
Index: package/packages/ari/chunk-Y74LDJPF.mjs
===================================================================
--- package/packages/ari/chunk-Y74LDJPF.mjs
+++ package/packages/ari/chunk-Y74LDJPF.mjs
@@ -0,0 +1,60 @@
+import {
+ PlatformMercuryAriResourceOwner,
+ PlatformMercuryAriResourceType
+} from "./chunk-QASRMIQG.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/platform/mercury/manifest.ts
+var platformMercuryAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ resourceOwner: PlatformMercuryAriResourceOwner,
+ resourceType: PlatformMercuryAriResourceType,
+ resourceIdSlug: "{productEntityId}",
+ resourceIdSegmentFormats: {
+ productEntityId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+ }
+};
+
+// src/platform/mercury/index.ts
+var PlatformMercuryAri = class _PlatformMercuryAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._productEntityId = opts.resourceIdSegmentValues.productEntityId;
+ }
+ get productEntityId() {
+ return this._productEntityId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: platformMercuryAriStaticOpts.qualifier,
+ platformQualifier: platformMercuryAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: platformMercuryAriStaticOpts.resourceOwner,
+ resourceType: platformMercuryAriStaticOpts.resourceType,
+ resourceId: `${opts.productEntityId}`,
+ resourceIdSegmentValues: {
+ productEntityId: opts.productEntityId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, platformMercuryAriStaticOpts);
+ return new _PlatformMercuryAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, platformMercuryAriStaticOpts);
+ return new _PlatformMercuryAri(opts);
+ }
+ getVariables() {
+ return {
+ productEntityId: this.productEntityId
+ };
+ }
+};
+
+export {
+ PlatformMercuryAri
+};