npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/chunk-H4GGGBFS.mjs
Index: package/packages/ari/chunk-H4GGGBFS.mjs
===================================================================
--- package/packages/ari/chunk-H4GGGBFS.mjs
+++ package/packages/ari/chunk-H4GGGBFS.mjs
@@ -1,80 +0,0 @@
-import {
- JiraProjectFeatureAriResourceOwner,
- JiraProjectFeatureAriResourceType
-} from "./chunk-QKR33HHC.mjs";
-import {
- RegisteredAri
-} from "./chunk-CLQNXEWF.mjs";
-import {
- AriParser
-} from "./chunk-HNZGDVUS.mjs";
-
-// src/jira/project-feature/manifest.ts
-var jiraProjectFeatureAriStaticOpts = {
- qualifier: "ari",
- platformQualifier: "cloud",
- cloudId: new RegExp("^[a-zA-Z0-9-]+$"),
- resourceOwner: JiraProjectFeatureAriResourceOwner,
- resourceType: JiraProjectFeatureAriResourceType,
- resourceIdSlug: "activation/{activationId}/{projectId}/featureKey/{featureKey}",
- resourceIdSegmentFormats: {
- activationId: /[a-zA-Z0-9\-]+/,
- // eslint-disable-line no-useless-escape
- projectId: /[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
- featureKey: /[!a-zA-Z0-9\-_.~@:{}=]+(\/[!a-zA-Z0-9\-_.~@:{}=]+)*/
- // eslint-disable-line no-useless-escape
- }
-};
-
-// src/jira/project-feature/index.ts
-var JiraProjectFeatureAri = class _JiraProjectFeatureAri extends RegisteredAri {
- constructor(opts) {
- super(opts);
- this._siteId = opts.cloudId || "", this._activationId = opts.resourceIdSegmentValues.activationId, this._projectId = opts.resourceIdSegmentValues.projectId, this._featureKey = opts.resourceIdSegmentValues.featureKey;
- }
- get siteId() {
- return this._siteId;
- }
- get activationId() {
- return this._activationId;
- }
- get projectId() {
- return this._projectId;
- }
- get featureKey() {
- return this._featureKey;
- }
- static create(opts) {
- let derivedOpts = {
- qualifier: jiraProjectFeatureAriStaticOpts.qualifier,
- platformQualifier: jiraProjectFeatureAriStaticOpts.platformQualifier,
- cloudId: opts.siteId,
- resourceOwner: jiraProjectFeatureAriStaticOpts.resourceOwner,
- resourceType: jiraProjectFeatureAriStaticOpts.resourceType,
- resourceId: `activation/${opts.activationId}/${opts.projectId}/featureKey/${opts.featureKey}`,
- resourceIdSegmentValues: {
- activationId: opts.activationId,
- projectId: opts.projectId,
- featureKey: opts.featureKey
- }
- }, ariOpts = AriParser.fromOpts(derivedOpts, jiraProjectFeatureAriStaticOpts);
- return new _JiraProjectFeatureAri(ariOpts);
- }
- static parse(maybeAri) {
- let opts = AriParser.fromString(maybeAri, jiraProjectFeatureAriStaticOpts);
- return new _JiraProjectFeatureAri(opts);
- }
- getVariables() {
- return {
- siteId: this.siteId,
- activationId: this.activationId,
- projectId: this.projectId,
- featureKey: this.featureKey
- };
- }
-};
-
-export {
- JiraProjectFeatureAri
-};