@capraconsulting/cals-cli 3.10.4 → 3.10.5
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/lib/cals-cli.mjs +21 -4
- package/lib/cals-cli.mjs.map +1 -1
- package/lib/git/GitRepo.d.ts +2 -2
- package/lib/index.es.js +2 -2
- package/lib/index.js +2 -2
- package/lib/testing/lib.d.ts +2 -2
- package/package.json +3 -3
package/lib/cals-cli.mjs
CHANGED
|
@@ -25,9 +25,9 @@ import readline from 'readline';
|
|
|
25
25
|
import { sprintf } from 'sprintf-js';
|
|
26
26
|
import read from 'read';
|
|
27
27
|
import { findUp } from 'find-up';
|
|
28
|
-
import execa from 'execa';
|
|
28
|
+
import { execa } from 'execa';
|
|
29
29
|
|
|
30
|
-
var version = "3.10.
|
|
30
|
+
var version = "3.10.5";
|
|
31
31
|
var engines = {
|
|
32
32
|
node: ">=12.0.0"
|
|
33
33
|
};
|
|
@@ -2689,15 +2689,26 @@ class GitRepo {
|
|
|
2689
2689
|
}
|
|
2690
2690
|
}
|
|
2691
2691
|
async getCurrentBranch() {
|
|
2692
|
-
|
|
2692
|
+
const result = await this.git(["rev-parse", "--abbrev-ref", "HEAD"]);
|
|
2693
|
+
// check if stdout is a string
|
|
2694
|
+
if (typeof result.stdout !== "string") {
|
|
2695
|
+
throw new Error("stdout is not a string");
|
|
2696
|
+
}
|
|
2697
|
+
return result.stdout;
|
|
2693
2698
|
}
|
|
2694
2699
|
async hasChangesInProgress() {
|
|
2695
2700
|
const result = await this.git(["status", "--short"]);
|
|
2701
|
+
if (typeof result.stdout !== "string") {
|
|
2702
|
+
throw new Error("stdout is not a string");
|
|
2703
|
+
}
|
|
2696
2704
|
// Ignore untracked files.
|
|
2697
2705
|
return result.stdout.replace(/^\?\?.+$/gm, "").length > 0;
|
|
2698
2706
|
}
|
|
2699
2707
|
async hasUnpushedCommits() {
|
|
2700
2708
|
const result = await this.git(["status", "-sb"]);
|
|
2709
|
+
if (typeof result.stdout !== "string") {
|
|
2710
|
+
throw new Error("stdout is not a string");
|
|
2711
|
+
}
|
|
2701
2712
|
return result.stdout.includes("[ahead");
|
|
2702
2713
|
}
|
|
2703
2714
|
async getAuthorsForRange(range) {
|
|
@@ -2706,6 +2717,9 @@ class GitRepo {
|
|
|
2706
2717
|
"-s",
|
|
2707
2718
|
`${range.from}..${range.to}`,
|
|
2708
2719
|
]);
|
|
2720
|
+
if (typeof result.stdout !== "string") {
|
|
2721
|
+
throw new Error("stdout is not a string");
|
|
2722
|
+
}
|
|
2709
2723
|
return parseShortlogSummary(result.stdout);
|
|
2710
2724
|
}
|
|
2711
2725
|
async update() {
|
|
@@ -2728,6 +2742,9 @@ class GitRepo {
|
|
|
2728
2742
|
// cwd: path,
|
|
2729
2743
|
// })
|
|
2730
2744
|
const result = await this.git(["pull", "--rebase"]);
|
|
2745
|
+
if (typeof result.stdout !== "string") {
|
|
2746
|
+
throw new Error("stdout is not a string");
|
|
2747
|
+
}
|
|
2731
2748
|
return {
|
|
2732
2749
|
dirty: false,
|
|
2733
2750
|
updated: wasUpdated(result.stdout),
|
|
@@ -3360,7 +3377,7 @@ async function main() {
|
|
|
3360
3377
|
process$2.exit(1);
|
|
3361
3378
|
}
|
|
3362
3379
|
await yargs(hideBin(process$2.argv))
|
|
3363
|
-
.usage(`cals-cli v${version} (build: ${"2025-01-
|
|
3380
|
+
.usage(`cals-cli v${version} (build: ${"2025-01-10T11:41:45+0000"})`)
|
|
3364
3381
|
.scriptName("cals")
|
|
3365
3382
|
.locale("en")
|
|
3366
3383
|
.help("help")
|
package/lib/cals-cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cals-cli.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cals-cli.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/git/GitRepo.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type Result } from "execa";
|
|
2
2
|
export declare enum CloneType {
|
|
3
3
|
HTTPS = 0,
|
|
4
4
|
SSH = 1
|
|
@@ -14,7 +14,7 @@ export interface UpdateResult {
|
|
|
14
14
|
export declare class GitRepo {
|
|
15
15
|
private readonly path;
|
|
16
16
|
private readonly logCommand;
|
|
17
|
-
constructor(path: string, logCommand: (result:
|
|
17
|
+
constructor(path: string, logCommand: (result: Result) => Promise<void>);
|
|
18
18
|
cloneGitHubRepo(org: string, name: string, cloneType: CloneType): Promise<void>;
|
|
19
19
|
private git;
|
|
20
20
|
getCurrentBranch(): Promise<string>;
|
package/lib/index.es.js
CHANGED
|
@@ -18,11 +18,11 @@ import * as process from 'process';
|
|
|
18
18
|
import { performance } from 'perf_hooks';
|
|
19
19
|
import { Buffer } from 'node:buffer';
|
|
20
20
|
import { strict } from 'assert';
|
|
21
|
-
import execa from 'execa';
|
|
21
|
+
import { execa } from 'execa';
|
|
22
22
|
import read from 'read';
|
|
23
23
|
import { Transform } from 'stream';
|
|
24
24
|
|
|
25
|
-
var version = "3.10.
|
|
25
|
+
var version = "3.10.5";
|
|
26
26
|
|
|
27
27
|
class CacheProvider {
|
|
28
28
|
constructor(config) {
|
package/lib/index.js
CHANGED
|
@@ -18,11 +18,11 @@ import * as process from 'process';
|
|
|
18
18
|
import { performance } from 'perf_hooks';
|
|
19
19
|
import { Buffer } from 'node:buffer';
|
|
20
20
|
import { strict } from 'assert';
|
|
21
|
-
import execa from 'execa';
|
|
21
|
+
import { execa } from 'execa';
|
|
22
22
|
import read from 'read';
|
|
23
23
|
import { Transform } from 'stream';
|
|
24
24
|
|
|
25
|
-
var version = "3.10.
|
|
25
|
+
var version = "3.10.5";
|
|
26
26
|
|
|
27
27
|
class CacheProvider {
|
|
28
28
|
constructor(config) {
|
package/lib/testing/lib.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type Subprocess } from "execa";
|
|
2
2
|
import { TestExecutor } from "./executor";
|
|
3
3
|
export interface Container {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
6
|
network: Network;
|
|
7
|
-
process:
|
|
7
|
+
process: Subprocess;
|
|
8
8
|
executor: TestExecutor;
|
|
9
9
|
}
|
|
10
10
|
export interface Network {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capraconsulting/cals-cli",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.5",
|
|
4
4
|
"description": "CLI for repeatable tasks in CALS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"ajv": "^8.11.0",
|
|
29
29
|
"cachedir": "^2.4.0",
|
|
30
30
|
"chalk": "5.4.1",
|
|
31
|
-
"execa": "^
|
|
31
|
+
"execa": "^9.0.0",
|
|
32
32
|
"find-up": "^7.0.0",
|
|
33
33
|
"js-yaml": "^4.1.0",
|
|
34
34
|
"keytar": "^7.9.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@vitest/coverage-v8": "2.1.8",
|
|
71
71
|
"@vitest/ui": "2.1.8",
|
|
72
72
|
"dateformat": "5.0.3",
|
|
73
|
-
"eslint": "9.
|
|
73
|
+
"eslint": "9.17.0",
|
|
74
74
|
"eslint-config-prettier": "9.1.0",
|
|
75
75
|
"eslint-plugin-prettier": "5.2.1",
|
|
76
76
|
"husky": "9.1.7",
|