@capraconsulting/cals-cli 2.25.23 → 3.0.0

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/README.md CHANGED
@@ -40,6 +40,8 @@ to automate releases and follows
40
40
  [Git commit guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit)
41
41
  from the Angular project.
42
42
 
43
+ Version numbers depend on the commit type and footers: https://github.com/semantic-release/commit-analyzer/blob/75c9c87c88772d7ded4ca9614852b42519e41931/lib/default-release-rules.js#L7-L12
44
+
43
45
  ## Goals of CLI
44
46
 
45
47
  - Provide an uniform way of consistently doing repeatable CALS tasks
package/lib/cals-cli.js CHANGED
@@ -47,7 +47,7 @@ var read__default = /*#__PURE__*/_interopDefaultLegacy(read);
47
47
  var findUp__default = /*#__PURE__*/_interopDefaultLegacy(findUp);
48
48
  var execa__default = /*#__PURE__*/_interopDefaultLegacy(execa);
49
49
 
50
- var version = "2.25.23";
50
+ var version = "3.0.0";
51
51
  var engines = {
52
52
  node: ">=12.0.0"
53
53
  };
@@ -654,7 +654,7 @@ class GitHubService {
654
654
  await this.tokenProvider.markInvalid();
655
655
  }
656
656
  if (!response.ok) {
657
- throw new Error(`Response from GitHub not OK (${response.status}): ${JSON.stringify(response)}`);
657
+ throw new Error(`Response from GitHub not OK (${response.status}): ${await response.text()}`);
658
658
  }
659
659
  const json = (await response.json());
660
660
  if (!!json.errors) {
@@ -828,11 +828,11 @@ class GitHubService {
828
828
  }),
829
829
  ];
830
830
  }
831
- async getSearchedPullRequestList() {
831
+ async getSearchedPullRequestList(owner) {
832
832
  // NOTE: Changes to this must by synced with SearchedPullRequestListQueryResult.
833
833
  const getQuery = (after) => `{
834
834
  search(
835
- query: "is:open is:pr user:capralifecycle user:capraconsulting archived:false",
835
+ query: "is:open is:pr user:${owner} owner:${owner} archived:false",
836
836
  type: ISSUE,
837
837
  first: 100${after === null
838
838
  ? ""
@@ -2316,7 +2316,7 @@ const command$a = {
2316
2316
  async function listPullRequestsStats({ reporter, github, }) {
2317
2317
  // This is only an initial attempt to get some insights into
2318
2318
  // open pull requests. Feel free to change.
2319
- const pulls = await github.getSearchedPullRequestList();
2319
+ const pulls = await github.getSearchedPullRequestList("capralifecycle");
2320
2320
  const cutoffOld = new Date(new Date().getTime() - 86400 * 1000 * 60);
2321
2321
  const categories = pulls
2322
2322
  .reduce((acc, cur) => {
@@ -3334,7 +3334,7 @@ async function main() {
3334
3334
  / /___/ ___ |/ /______/ /
3335
3335
  \\____/_/ |_/_____/____/
3336
3336
  cli ${version}
3337
- built ${"2023-07-17T06:10:41+0000"}
3337
+ built ${"2023-07-19T10:15:01+0000"}
3338
3338
 
3339
3339
  https://github.com/capralifecycle/cals-cli/
3340
3340
 
@@ -70,7 +70,7 @@ export declare class GitHubService {
70
70
  getTeamMemberList(org: OrgsGetResponse, team: TeamsListResponseItem): Promise<TeamsListMembersResponseItem[]>;
71
71
  getTeamMemberInvitedList(org: OrgsGetResponse, team: TeamsListResponseItem): Promise<TeamsListPendingInvitationsResponseItem[]>;
72
72
  getTeamMemberListIncludingInvited(org: OrgsGetResponse, team: TeamsListResponseItem): Promise<TeamMemberOrInvited[]>;
73
- getSearchedPullRequestList(): Promise<SearchedPullRequestListItem[]>;
73
+ getSearchedPullRequestList(owner: string): Promise<SearchedPullRequestListItem[]>;
74
74
  getHasVulnerabilityAlertsEnabled(owner: string, repo: string): Promise<boolean>;
75
75
  enableVulnerabilityAlerts(owner: string, repo: string): Promise<void>;
76
76
  /**
package/lib/index.es.js CHANGED
@@ -22,7 +22,7 @@ import execa from 'execa';
22
22
  import { performance } from 'perf_hooks';
23
23
  import { Transform } from 'stream';
24
24
 
25
- var version = "2.25.23";
25
+ var version = "3.0.0";
26
26
 
27
27
  class CacheProvider {
28
28
  constructor(config) {
@@ -730,7 +730,7 @@ class GitHubService {
730
730
  await this.tokenProvider.markInvalid();
731
731
  }
732
732
  if (!response.ok) {
733
- throw new Error(`Response from GitHub not OK (${response.status}): ${JSON.stringify(response)}`);
733
+ throw new Error(`Response from GitHub not OK (${response.status}): ${await response.text()}`);
734
734
  }
735
735
  const json = (await response.json());
736
736
  if (!!json.errors) {
@@ -904,11 +904,11 @@ class GitHubService {
904
904
  }),
905
905
  ];
906
906
  }
907
- async getSearchedPullRequestList() {
907
+ async getSearchedPullRequestList(owner) {
908
908
  // NOTE: Changes to this must by synced with SearchedPullRequestListQueryResult.
909
909
  const getQuery = (after) => `{
910
910
  search(
911
- query: "is:open is:pr user:capralifecycle user:capraconsulting archived:false",
911
+ query: "is:open is:pr user:${owner} owner:${owner} archived:false",
912
912
  type: ISSUE,
913
913
  first: 100${after === null
914
914
  ? ""
package/lib/index.js CHANGED
@@ -44,7 +44,7 @@ var keytar__default = /*#__PURE__*/_interopDefaultLegacy(keytar);
44
44
  var read__default = /*#__PURE__*/_interopDefaultLegacy(read);
45
45
  var execa__default = /*#__PURE__*/_interopDefaultLegacy(execa);
46
46
 
47
- var version = "2.25.23";
47
+ var version = "3.0.0";
48
48
 
49
49
  class CacheProvider {
50
50
  constructor(config) {
@@ -752,7 +752,7 @@ class GitHubService {
752
752
  await this.tokenProvider.markInvalid();
753
753
  }
754
754
  if (!response.ok) {
755
- throw new Error(`Response from GitHub not OK (${response.status}): ${JSON.stringify(response)}`);
755
+ throw new Error(`Response from GitHub not OK (${response.status}): ${await response.text()}`);
756
756
  }
757
757
  const json = (await response.json());
758
758
  if (!!json.errors) {
@@ -926,11 +926,11 @@ class GitHubService {
926
926
  }),
927
927
  ];
928
928
  }
929
- async getSearchedPullRequestList() {
929
+ async getSearchedPullRequestList(owner) {
930
930
  // NOTE: Changes to this must by synced with SearchedPullRequestListQueryResult.
931
931
  const getQuery = (after) => `{
932
932
  search(
933
- query: "is:open is:pr user:capralifecycle user:capraconsulting archived:false",
933
+ query: "is:open is:pr user:${owner} owner:${owner} archived:false",
934
934
  type: ISSUE,
935
935
  first: 100${after === null
936
936
  ? ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capraconsulting/cals-cli",
3
- "version": "2.25.23",
3
+ "version": "3.0.0",
4
4
  "description": "CLI for repeatable tasks in CALS",
5
5
  "scripts": {
6
6
  "prepare": "node scripts/create-definition-schema.js && husky install",
@@ -58,8 +58,8 @@
58
58
  "@types/semver": "7.5.0",
59
59
  "@types/sprintf-js": "1.1.2",
60
60
  "@types/yargs": "17.0.24",
61
- "@typescript-eslint/eslint-plugin": "5.60.1",
62
- "@typescript-eslint/parser": "5.60.1",
61
+ "@typescript-eslint/eslint-plugin": "5.62.0",
62
+ "@typescript-eslint/parser": "5.62.0",
63
63
  "dateformat": "4.6.3",
64
64
  "del": "6.1.1",
65
65
  "eslint": "8.44.0",