@forge/cli-shared 2.4.0-next.7 → 2.4.0-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @forge/cli-shared
2
2
 
3
+ ## 2.4.0-next.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [3d82376]
8
+ - @forge/manifest@3.5.0-next.7
9
+
3
10
  ## 2.4.0-next.7
4
11
 
5
12
  ### Patch Changes
@@ -1,9 +1,23 @@
1
+ interface CachedValue<E> {
2
+ value: E;
3
+ expiry: number | undefined;
4
+ }
5
+ interface ConfStore {
6
+ get(key: string): CachedValue<any> | undefined;
7
+ set(key: string, value: CachedValue<any>): void;
8
+ delete(key: string): void;
9
+ }
1
10
  export declare class CachedConf {
2
11
  private readonly conf;
3
12
  constructor(projectName: string);
13
+ constructor(store: ConfStore);
4
14
  get<T = string | object>(key: string): T | undefined;
5
15
  set<T = string | object>(key: string, value: T, age?: number): void;
6
16
  delete(key: string): void;
17
+ cached<T = string | object>(key: string, getter: () => T, age?: number): T;
18
+ cached<T = string | object>(key: string, getter: () => Promise<T>, age?: number): Promise<T>;
7
19
  static getCache(projectName: string): CachedConf;
20
+ static memoryCache(): CachedConf;
8
21
  }
22
+ export {};
9
23
  //# sourceMappingURL=cached-conf.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cached-conf.d.ts","sourceRoot":"","sources":["../../src/cache/cached-conf.ts"],"names":[],"mappings":"AAOA,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;gBAEhB,WAAW,EAAE,MAAM;IAOxB,GAAG,CAAC,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAapD,GAAG,CAAC,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CA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AAE,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAkBnG,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU;IAQhD,MAAM,CAAC,WAAW,IAAI,UAAU;CAGjC"}
@@ -3,11 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CachedConf = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const conf_1 = tslib_1.__importDefault(require("conf"));
6
+ const isThenable = (input) => input && typeof input.then === 'function';
6
7
  class CachedConf {
7
- constructor(projectName) {
8
- this.conf = new conf_1.default({
9
- projectName
10
- });
8
+ constructor(arg) {
9
+ if (typeof arg === 'string') {
10
+ this.conf = new conf_1.default({
11
+ projectName: arg
12
+ });
13
+ }
14
+ else {
15
+ this.conf = arg;
16
+ }
11
17
  }
12
18
  get(key) {
13
19
  const result = this.conf.get(key);
@@ -28,8 +34,28 @@ class CachedConf {
28
34
  delete(key) {
29
35
  this.conf.delete(key);
30
36
  }
37
+ cached(key, getter, age) {
38
+ const cached = this.get(key);
39
+ if (cached) {
40
+ return cached;
41
+ }
42
+ const valuePromise = getter();
43
+ if (isThenable(valuePromise)) {
44
+ return valuePromise.then((value) => {
45
+ this.set(key, value, age);
46
+ return value;
47
+ });
48
+ }
49
+ else {
50
+ this.set(key, valuePromise, age);
51
+ return valuePromise;
52
+ }
53
+ }
31
54
  static getCache(projectName) {
32
55
  return new CachedConf(projectName);
33
56
  }
57
+ static memoryCache() {
58
+ return new CachedConf(new Map());
59
+ }
34
60
  }
35
61
  exports.CachedConf = CachedConf;
@@ -184,6 +184,12 @@ export declare type ActivityConnection = {
184
184
  edges?: Maybe<Array<Maybe<ActivityItemEdge>>>;
185
185
  pageInfo: ActivityPageInfo;
186
186
  };
187
+ export declare type ActivityContributor = {
188
+ __typename?: 'ActivityContributor';
189
+ profile?: Maybe<User>;
190
+ lastAccessedDate: Scalars['DateTime'];
191
+ count?: Maybe<Scalars['Int']>;
192
+ };
187
193
  export declare type ActivityEdge = {
188
194
  __typename?: 'ActivityEdge';
189
195
  cursor: Scalars['String'];
@@ -242,7 +248,7 @@ export declare type ActivityObject = {
242
248
  type: Scalars['String'];
243
249
  product: Scalars['String'];
244
250
  subProduct?: Maybe<Scalars['String']>;
245
- contributors?: Maybe<Array<ActivitiesContributor>>;
251
+ contributors?: Maybe<Array<ActivityContributor>>;
246
252
  data?: Maybe<ActivityObjectData>;
247
253
  };
248
254
  export declare type ActivityObjectData = AvocadoQuestion | AvocadoAnswer | TownsquareProject | TownsquareGoal | TownsquareComment | ConfluencePage | ConfluenceBlogPost | ConfluenceComment | JiraIssue | JiraPlatformComment | JiraServiceManagementComment;
@@ -5855,6 +5861,7 @@ export declare enum GrantCheckProduct {
5855
5861
  JiraServicedesk = "JIRA_SERVICEDESK",
5856
5862
  Confluence = "CONFLUENCE",
5857
5863
  Compass = "COMPASS",
5864
+ Avocado = "AVOCADO",
5858
5865
  NoGrantChecks = "NO_GRANT_CHECKS"
5859
5866
  }
5860
5867
  export declare type HelpCenter = Node & {
@@ -5985,26 +5992,54 @@ export declare type HelpCenterUpdateCollectionsOrderPayload = Payload & {
5985
5992
  success: Scalars['Boolean'];
5986
5993
  errors?: Maybe<Array<MutationError>>;
5987
5994
  };
5988
- export declare type HelpObjectStoreHelpObject = Node & {
5989
- __typename?: 'HelpObjectStoreHelpObject';
5995
+ export declare type HelpObjectStoreArticle = HelpObjectStoreHelpObject & Node & {
5996
+ __typename?: 'HelpObjectStoreArticle';
5990
5997
  id: Scalars['ID'];
5991
5998
  title: Scalars['String'];
5992
5999
  description: Scalars['String'];
5993
6000
  icon?: Maybe<HelpObjectStoreIcon>;
5994
6001
  displayLink: Scalars['URL'];
6002
+ entityId?: Maybe<Scalars['String']>;
6003
+ entityProjectId?: Maybe<Scalars['String']>;
5995
6004
  };
5996
- export declare type HelpObjectStoreHelpObjectResult = HelpObjectStoreHelpObject | QueryError;
6005
+ export declare type HelpObjectStoreArticleResult = HelpObjectStoreArticle | QueryError;
6006
+ export declare type HelpObjectStoreHelpObject = {
6007
+ id: Scalars['ID'];
6008
+ title: Scalars['String'];
6009
+ description: Scalars['String'];
6010
+ icon?: Maybe<HelpObjectStoreIcon>;
6011
+ displayLink: Scalars['URL'];
6012
+ };
6013
+ export declare enum HelpObjectStoreHelpObjectType {
6014
+ RequestForm = "REQUEST_FORM",
6015
+ Article = "ARTICLE"
6016
+ }
5997
6017
  export declare type HelpObjectStoreIcon = {
5998
6018
  __typename?: 'HelpObjectStoreIcon';
5999
6019
  iconUrl: Scalars['URL'];
6000
6020
  };
6001
6021
  export declare type HelpObjectStoreQueryApi = {
6002
6022
  __typename?: 'HelpObjectStoreQueryApi';
6003
- helpObjects?: Maybe<Array<Maybe<HelpObjectStoreHelpObjectResult>>>;
6023
+ requestForms?: Maybe<Array<Maybe<HelpObjectStoreRequestFormResult>>>;
6024
+ articles?: Maybe<Array<Maybe<HelpObjectStoreArticleResult>>>;
6004
6025
  };
6005
- export declare type HelpObjectStoreQueryApiHelpObjectsArgs = {
6006
- helpObjectARIs: Array<Scalars['ID']>;
6026
+ export declare type HelpObjectStoreQueryApiRequestFormsArgs = {
6027
+ ids: Array<Scalars['ID']>;
6007
6028
  };
6029
+ export declare type HelpObjectStoreQueryApiArticlesArgs = {
6030
+ ids: Array<Scalars['ID']>;
6031
+ };
6032
+ export declare type HelpObjectStoreRequestForm = HelpObjectStoreHelpObject & Node & {
6033
+ __typename?: 'HelpObjectStoreRequestForm';
6034
+ id: Scalars['ID'];
6035
+ title: Scalars['String'];
6036
+ description: Scalars['String'];
6037
+ icon?: Maybe<HelpObjectStoreIcon>;
6038
+ displayLink: Scalars['URL'];
6039
+ entityId?: Maybe<Scalars['String']>;
6040
+ entityProjectId?: Maybe<Scalars['String']>;
6041
+ };
6042
+ export declare type HelpObjectStoreRequestFormResult = HelpObjectStoreRequestForm | QueryError;
6008
6043
  export declare type HostedResourcePreSignedUrl = {
6009
6044
  __typename?: 'HostedResourcePreSignedUrl';
6010
6045
  uploadUrl: Scalars['String'];
@@ -7555,6 +7590,11 @@ export declare type JiraGroupGrantTypeValue = Node & {
7555
7590
  id: Scalars['ID'];
7556
7591
  group: JiraGroup;
7557
7592
  };
7593
+ export declare type JiraHierarchyConfigError = {
7594
+ __typename?: 'JiraHierarchyConfigError';
7595
+ code?: Maybe<Scalars['String']>;
7596
+ message?: Maybe<Scalars['String']>;
7597
+ };
7558
7598
  export declare type JiraInvalidJqlError = {
7559
7599
  __typename?: 'JiraInvalidJqlError';
7560
7600
  messages?: Maybe<Array<Maybe<Scalars['String']>>>;
@@ -7584,6 +7624,11 @@ export declare type JiraIssue = Node & {
7584
7624
  devSummaryCache?: Maybe<JiraIssueDevSummaryResult>;
7585
7625
  deploymentsSummary?: Maybe<DevOpsSummarisedDeployments>;
7586
7626
  devInfoDetails?: Maybe<JiraIssueDevInfoDetails>;
7627
+ hierarchyLevelBelow?: Maybe<JiraIssueTypeHierarchyLevel>;
7628
+ hierarchyLevelAbove?: Maybe<JiraIssueTypeHierarchyLevel>;
7629
+ issueTypesForHierarchyBelow?: Maybe<JiraIssueTypeConnection>;
7630
+ issueTypesForHierarchyAbove?: Maybe<JiraIssueTypeConnection>;
7631
+ issueTypesForHierarchySame?: Maybe<JiraIssueTypeConnection>;
7587
7632
  };
7588
7633
  export declare type JiraIssueFieldsArgs = {
7589
7634
  first?: Maybe<Scalars['Int']>;
@@ -7806,6 +7851,43 @@ export declare type JiraIssueFieldSetEdge = {
7806
7851
  node?: Maybe<JiraIssueFieldSet>;
7807
7852
  cursor: Scalars['String'];
7808
7853
  };
7854
+ export declare type JiraIssueHierarchyConfigData = {
7855
+ __typename?: 'JiraIssueHierarchyConfigData';
7856
+ hierarchyLevel?: Maybe<JiraIssueTypeHierarchyLevel>;
7857
+ cmpIssueTypes?: Maybe<JiraIssueTypeConnection>;
7858
+ };
7859
+ export declare type JiraIssueHierarchyConfigDataCmpIssueTypesArgs = {
7860
+ first?: Maybe<Scalars['Int']>;
7861
+ after?: Maybe<Scalars['String']>;
7862
+ last?: Maybe<Scalars['Int']>;
7863
+ before?: Maybe<Scalars['String']>;
7864
+ };
7865
+ export declare type JiraIssueHierarchyConfigInput = {
7866
+ level: Scalars['Int'];
7867
+ title: Scalars['String'];
7868
+ issueTypeIds: Array<Scalars['ID']>;
7869
+ };
7870
+ export declare type JiraIssueHierarchyConfigurationMutationInput = {
7871
+ dryRun: Scalars['Boolean'];
7872
+ issueHierarchyConfig: Array<JiraIssueHierarchyConfigInput>;
7873
+ };
7874
+ export declare type JiraIssueHierarchyConfigurationMutationResult = {
7875
+ __typename?: 'JiraIssueHierarchyConfigurationMutationResult';
7876
+ updateInitiated: Scalars['Boolean'];
7877
+ success: Scalars['Boolean'];
7878
+ errors?: Maybe<Array<JiraHierarchyConfigError>>;
7879
+ };
7880
+ export declare type JiraIssueHierarchyConfigurationQuery = {
7881
+ __typename?: 'JiraIssueHierarchyConfigurationQuery';
7882
+ data?: Maybe<Array<JiraIssueHierarchyConfigData>>;
7883
+ success: Scalars['Boolean'];
7884
+ errors?: Maybe<Array<JiraHierarchyConfigError>>;
7885
+ };
7886
+ export declare type JiraIssueHierarchyLimits = {
7887
+ __typename?: 'JiraIssueHierarchyLimits';
7888
+ maxLevels: Scalars['Int'];
7889
+ nameLength: Scalars['Int'];
7890
+ };
7809
7891
  export declare type JiraIssueItemContainer = {
7810
7892
  __typename?: 'JiraIssueItemContainer';
7811
7893
  containerType?: Maybe<JiraIssueItemSystemContainerType>;
@@ -8853,9 +8935,9 @@ export declare type JiraMutation = {
8853
8935
  setApplicationProperties?: Maybe<JiraSetApplicationPropertiesPayload>;
8854
8936
  addPermissionSchemeGrants?: Maybe<JiraPermissionSchemeAddGrantPayload>;
8855
8937
  removePermissionSchemeGrants?: Maybe<JiraPermissionSchemeRemoveGrantPayload>;
8938
+ updateIssueHierarchyConfig: JiraIssueHierarchyConfigurationMutationResult;
8856
8939
  addIssuesToFixVersion?: Maybe<JiraAddIssuesToFixVersionPayload>;
8857
8940
  updateVersionWarningConfig?: Maybe<JiraUpdateVersionWarningConfigPayload>;
8858
- updateIssueSearchViewFieldConfigSets?: Maybe<JiraIssueSearchViewPayload>;
8859
8941
  replaceIssueSearchViewFieldConfigSets?: Maybe<JiraIssueSearchViewPayload>;
8860
8942
  devOps?: Maybe<JiraDevOpsMutation>;
8861
8943
  };
@@ -8869,16 +8951,16 @@ export declare type JiraMutationAddPermissionSchemeGrantsArgs = {
8869
8951
  export declare type JiraMutationRemovePermissionSchemeGrantsArgs = {
8870
8952
  input: JiraPermissionSchemeRemoveGrantInput;
8871
8953
  };
8954
+ export declare type JiraMutationUpdateIssueHierarchyConfigArgs = {
8955
+ cloudId: Scalars['ID'];
8956
+ input: JiraIssueHierarchyConfigurationMutationInput;
8957
+ };
8872
8958
  export declare type JiraMutationAddIssuesToFixVersionArgs = {
8873
8959
  input: JiraAddIssuesToFixVersionInput;
8874
8960
  };
8875
8961
  export declare type JiraMutationUpdateVersionWarningConfigArgs = {
8876
8962
  input: JiraUpdateVersionWarningConfigInput;
8877
8963
  };
8878
- export declare type JiraMutationUpdateIssueSearchViewFieldConfigSetsArgs = {
8879
- id: Scalars['ID'];
8880
- fieldConfigSetIds: Array<Scalars['String']>;
8881
- };
8882
8964
  export declare type JiraMutationReplaceIssueSearchViewFieldConfigSetsArgs = {
8883
8965
  id: Scalars['ID'];
8884
8966
  input: JiraReplaceIssueSearchViewFieldConfigSetsInput;
@@ -9644,6 +9726,8 @@ export declare type JiraQuery = {
9644
9726
  permissionSchemeGrants?: Maybe<JiraPermissionGrantValueConnection>;
9645
9727
  getPermissionSchemeGrants?: Maybe<JiraPermissionGrantConnection>;
9646
9728
  getPermissionSchemeGrantsHierarchy: Array<JiraPermissionGrants>;
9729
+ issueHierarchyConfig: JiraIssueHierarchyConfigurationQuery;
9730
+ issueHierarchyLimits: JiraIssueHierarchyLimits;
9647
9731
  version?: Maybe<JiraVersionResult>;
9648
9732
  versionsForProject?: Maybe<JiraVersionConnection>;
9649
9733
  versionDetailPage?: Maybe<JiraVersionDetailPage>;
@@ -9764,6 +9848,12 @@ export declare type JiraQueryGetPermissionSchemeGrantsHierarchyArgs = {
9764
9848
  schemeId: Scalars['ID'];
9765
9849
  permissionKey: Scalars['String'];
9766
9850
  };
9851
+ export declare type JiraQueryIssueHierarchyConfigArgs = {
9852
+ cloudId: Scalars['ID'];
9853
+ };
9854
+ export declare type JiraQueryIssueHierarchyLimitsArgs = {
9855
+ cloudId: Scalars['ID'];
9856
+ };
9767
9857
  export declare type JiraQueryVersionArgs = {
9768
9858
  id: Scalars['ID'];
9769
9859
  };
@@ -9959,7 +10049,7 @@ export declare type JiraResolution = Node & {
9959
10049
  export declare type JiraResolutionConnection = {
9960
10050
  __typename?: 'JiraResolutionConnection';
9961
10051
  totalCount?: Maybe<Scalars['Int']>;
9962
- pageInfo?: Maybe<PageInfo>;
10052
+ pageInfo: PageInfo;
9963
10053
  edges?: Maybe<Array<Maybe<JiraResolutionEdge>>>;
9964
10054
  };
9965
10055
  export declare type JiraResolutionEdge = {
@@ -13250,6 +13340,7 @@ export declare type PolarisValueRuleInput = {
13250
13340
  export declare type PolarisView = {
13251
13341
  __typename?: 'PolarisView';
13252
13342
  id: Scalars['ID'];
13343
+ xid?: Maybe<Scalars['Int']>;
13253
13344
  name: Scalars['String'];
13254
13345
  emoji?: Maybe<Scalars['String']>;
13255
13346
  description?: Maybe<Scalars['JSON']>;
@@ -14458,7 +14549,8 @@ export declare enum Scope {
14458
14549
  AdminContainer = "ADMIN_CONTAINER",
14459
14550
  ReadContainer = "READ_CONTAINER",
14460
14551
  WriteContainer = "WRITE_CONTAINER",
14461
- MigrateConfluence = "MIGRATE_CONFLUENCE"
14552
+ MigrateConfluence = "MIGRATE_CONFLUENCE",
14553
+ ReadAvocadoEntity = "READ_AVOCADO_ENTITY"
14462
14554
  }
14463
14555
  export declare type ScopeSprintIssue = {
14464
14556
  __typename?: 'ScopeSprintIssue';
@@ -14684,12 +14776,18 @@ export declare type ShepherdAlert = {
14684
14776
  assignee?: Maybe<ShepherdUser>;
14685
14777
  cloudId?: Maybe<Scalars['ID']>;
14686
14778
  createdOn: Scalars['DateTime'];
14779
+ description?: Maybe<Array<Maybe<ShepherdDescriptionSection>>>;
14687
14780
  id: Scalars['ID'];
14688
14781
  orgId: Scalars['ID'];
14689
14782
  status: ShepherdAlertStatus;
14690
14783
  title: Scalars['String'];
14691
14784
  updatedOn?: Maybe<Scalars['DateTime']>;
14692
14785
  };
14786
+ export declare enum ShepherdAlertDescriptionType {
14787
+ AlertInfo = "ALERT_INFO",
14788
+ Investigate = "INVESTIGATE",
14789
+ Remediate = "REMEDIATE"
14790
+ }
14693
14791
  export declare type ShepherdAlertEdge = {
14694
14792
  __typename?: 'ShepherdAlertEdge';
14695
14793
  node?: Maybe<ShepherdAlert>;
@@ -14761,6 +14859,11 @@ export declare type ShepherdCreateWebhookInput = {
14761
14859
  status?: Maybe<ShepherdSubscriptionStatus>;
14762
14860
  type?: Maybe<ShepherdWebhookType>;
14763
14861
  };
14862
+ export declare type ShepherdDescriptionSection = {
14863
+ __typename?: 'ShepherdDescriptionSection';
14864
+ text?: Maybe<Scalars['JSON']>;
14865
+ type?: Maybe<ShepherdAlertDescriptionType>;
14866
+ };
14764
14867
  export declare type ShepherdEmailConnection = {
14765
14868
  __typename?: 'ShepherdEmailConnection';
14766
14869
  edges?: Maybe<Array<Maybe<ShepherdEmailEdge>>>;