@forge/util
2.0.12.0.1-experimental-7890858
packages/ari/chunk-LVC7BW6S.mjs+
packages/ari/chunk-LVC7BW6S.mjsNew file+64
Index: package/packages/ari/chunk-LVC7BW6S.mjs
===================================================================
--- package/packages/ari/chunk-LVC7BW6S.mjs
+++ package/packages/ari/chunk-LVC7BW6S.mjs
@@ -0,0 +1,64 @@
+import {
+ DevopsContainerAriResourceOwner,
+ DevopsContainerAriResourceType
+} from "./chunk-FGEFELP3.mjs";
+import {
+ RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+ AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/devops/container/manifest.ts
+var devopsContainerAriStaticOpts = {
+ qualifier: "ari",
+ platformQualifier: "cloud",
+ cloudId: new RegExp("^[a-zA-Z0-9_\\-.]{1,255}$"),
+ resourceOwner: DevopsContainerAriResourceOwner,
+ resourceType: DevopsContainerAriResourceType,
+ resourceIdSlug: "{containerId}",
+ resourceIdSegmentFormats: {
+ containerId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
+ }
+};
+
+// src/devops/container/index.ts
+var DevopsContainerAri = class _DevopsContainerAri extends RegisteredAri {
+ constructor(opts) {
+ super(opts), this._siteId = opts.cloudId || "", this._containerId = opts.resourceIdSegmentValues.containerId;
+ }
+ get siteId() {
+ return this._siteId;
+ }
+ get containerId() {
+ return this._containerId;
+ }
+ static create(opts) {
+ let derivedOpts = {
+ qualifier: devopsContainerAriStaticOpts.qualifier,
+ platformQualifier: devopsContainerAriStaticOpts.platformQualifier,
+ cloudId: opts.siteId,
+ resourceOwner: devopsContainerAriStaticOpts.resourceOwner,
+ resourceType: devopsContainerAriStaticOpts.resourceType,
+ resourceId: `${opts.containerId}`,
+ resourceIdSegmentValues: {
+ containerId: opts.containerId
+ }
+ }, ariOpts = AriParser.fromOpts(derivedOpts, devopsContainerAriStaticOpts);
+ return new _DevopsContainerAri(ariOpts);
+ }
+ static parse(maybeAri) {
+ let opts = AriParser.fromString(maybeAri, devopsContainerAriStaticOpts);
+ return new _DevopsContainerAri(opts);
+ }
+ getVariables() {
+ return {
+ siteId: this.siteId,
+ containerId: this.containerId
+ };
+ }
+};
+
+export {
+ DevopsContainerAri
+};