npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/chunk-PCOEYRAB.mjs
Index: package/packages/ari/chunk-PCOEYRAB.mjs
===================================================================
--- package/packages/ari/chunk-PCOEYRAB.mjs
+++ package/packages/ari/chunk-PCOEYRAB.mjs
@@ -0,0 +1,63 @@
+import {
+ BeaconSiteAriResourceOwner,
+ BeaconSiteAriResourceType
+} from "./chunk-JQQF6HSU.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/beacon/site/manifest.ts
+var beaconSiteAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
+ resourceOwner: BeaconSiteAriResourceOwner,
+ resourceType: BeaconSiteAriResourceType,
+ resourceIdSlug: "{siteId}",
+ resourceIdSegmentFormats: {
+ siteId: /[a-zA-Z0-9_\-.]{1,255}/
+ // eslint-disable-line no-useless-escape
+ }
+};
+
+// src/beacon/site/index.ts
+var BeaconSiteAri = class _BeaconSiteAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts);
+ this._siteId = opts.resourceIdSegmentValues.siteId;
+ }
+ get siteId() {
+ return this._siteId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: beaconSiteAriStaticOpts.qualifier,
+ platformQualifier: beaconSiteAriStaticOpts.platformQualifier,
+ cloudId: void 0,
+ resourceOwner: beaconSiteAriStaticOpts.resourceOwner,
+ resourceType: beaconSiteAriStaticOpts.resourceType,
+ resourceId: `${opts.siteId}`,
+ resourceIdSegmentValues: {
+ siteId: opts.siteId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, beaconSiteAriStaticOpts);
+ return new _BeaconSiteAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, beaconSiteAriStaticOpts);
+ return new _BeaconSiteAri(opts);
+ }
+ getVariables() {
+ return {
+ siteId: this.siteId
+ };
+ }
+};
+
+export {
+ BeaconSiteAri
+};