npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/chunk-3YMPGLW2.mjs
Index: package/packages/ari/chunk-3YMPGLW2.mjs
===================================================================
--- package/packages/ari/chunk-3YMPGLW2.mjs
+++ package/packages/ari/chunk-3YMPGLW2.mjs
@@ -1,73 +0,0 @@
-import {
- AvocadoAnswerAriResourceOwner,
- AvocadoAnswerAriResourceType
-} from "./chunk-MBGO4Q2M.mjs";
-import {
- RegisteredAri
-} from "./chunk-CLQNXEWF.mjs";
-import {
- AriParser
-} from "./chunk-HNZGDVUS.mjs";
-
-// src/avocado/answer/manifest.ts
-var avocadoAnswerAriStaticOpts = {
- qualifier: "ari",
- platformQualifier: "cloud",
- cloudId: new RegExp("^[a-zA-Z0-9-]+$"),
- resourceOwner: AvocadoAnswerAriResourceOwner,
- resourceType: AvocadoAnswerAriResourceType,
- resourceIdSlug: "activation/{workspaceId}/{answerId}",
- 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
- answerId: /[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/avocado/answer/index.ts
-var AvocadoAnswerAri = class _AvocadoAnswerAri extends RegisteredAri {
- constructor(opts) {
- super(opts);
- this._siteId = opts.cloudId || "", this._workspaceId = opts.resourceIdSegmentValues.workspaceId, this._answerId = opts.resourceIdSegmentValues.answerId;
- }
- get siteId() {
- return this._siteId;
- }
- get workspaceId() {
- return this._workspaceId;
- }
- get answerId() {
- return this._answerId;
- }
- static create(opts) {
- let derivedOpts = {
- qualifier: avocadoAnswerAriStaticOpts.qualifier,
- platformQualifier: avocadoAnswerAriStaticOpts.platformQualifier,
- cloudId: opts.siteId,
- resourceOwner: avocadoAnswerAriStaticOpts.resourceOwner,
- resourceType: avocadoAnswerAriStaticOpts.resourceType,
- resourceId: `activation/${opts.workspaceId}/${opts.answerId}`,
- resourceIdSegmentValues: {
- workspaceId: opts.workspaceId,
- answerId: opts.answerId
- }
- }, ariOpts = AriParser.fromOpts(derivedOpts, avocadoAnswerAriStaticOpts);
- return new _AvocadoAnswerAri(ariOpts);
- }
- static parse(maybeAri) {
- let opts = AriParser.fromString(maybeAri, avocadoAnswerAriStaticOpts);
- return new _AvocadoAnswerAri(opts);
- }
- getVariables() {
- return {
- siteId: this.siteId,
- workspaceId: this.workspaceId,
- answerId: this.answerId
- };
- }
-};
-
-export {
- AvocadoAnswerAri
-};