rampway 0.2.2 → 0.2.4
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 +39 -19
- package/build/src/cli.d.ts +18 -1
- package/build/src/cli.d.ts.map +1 -1
- package/build/src/cli.js +46 -39
- package/build/src/cli.js.map +1 -1
- package/build/src/commands/context.d.ts +4 -1
- package/build/src/commands/context.d.ts.map +1 -1
- package/build/src/commands/context.js +4 -2
- package/build/src/commands/context.js.map +1 -1
- package/build/src/commands/deploy.d.ts.map +1 -1
- package/build/src/commands/deploy.js +26 -5
- package/build/src/commands/deploy.js.map +1 -1
- package/build/src/core/deploy-runner.d.ts +1 -1
- package/build/src/core/deploy-runner.d.ts.map +1 -1
- package/build/src/core/deploy-runner.js +40 -12
- package/build/src/core/deploy-runner.js.map +1 -1
- package/build/src/core/git-source.d.ts.map +1 -1
- package/build/src/core/git-source.js +4 -1
- package/build/src/core/git-source.js.map +1 -1
- package/build/src/core/redaction.d.ts +46 -0
- package/build/src/core/redaction.d.ts.map +1 -1
- package/build/src/core/redaction.js +106 -0
- package/build/src/core/redaction.js.map +1 -1
- package/build/src/core/reporter.d.ts +68 -0
- package/build/src/core/reporter.d.ts.map +1 -0
- package/build/src/core/reporter.js +76 -0
- package/build/src/core/reporter.js.map +1 -0
- package/build/src/core/task-runner.d.ts +7 -4
- package/build/src/core/task-runner.d.ts.map +1 -1
- package/build/src/core/task-runner.js +12 -7
- package/build/src/core/task-runner.js.map +1 -1
- package/build/src/transports/local-transport.d.ts +8 -0
- package/build/src/transports/local-transport.d.ts.map +1 -1
- package/build/src/transports/local-transport.js +38 -4
- package/build/src/transports/local-transport.js.map +1 -1
- package/build/src/transports/ssh-transport.d.ts +7 -3
- package/build/src/transports/ssh-transport.d.ts.map +1 -1
- package/build/src/transports/ssh-transport.js +59 -25
- package/build/src/transports/ssh-transport.js.map +1 -1
- package/build/src/types.d.ts +1 -0
- package/build/src/types.d.ts.map +1 -1
- package/build/src/types.js +1 -0
- package/build/src/types.js.map +1 -1
- package/docs/config-reference.md +4 -1
- package/docs/migration-from-capistrano.md +7 -7
- package/package.json +4 -2
|
@@ -19,4 +19,50 @@ export function redactEnv(env?: Record<string, string>): Record<string, string>;
|
|
|
19
19
|
* @returns {string}
|
|
20
20
|
*/
|
|
21
21
|
export function redactText(text: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Incrementally redacts a command output stream without ever emitting a
|
|
24
|
+
* possibly-incomplete sensitive tail.
|
|
25
|
+
*
|
|
26
|
+
* Secret assignments (`KEY=value`) and credential URLs
|
|
27
|
+
* (`https://user:pass@host`) are always terminated by whitespace and contain no
|
|
28
|
+
* internal whitespace, so any token preceding the final whitespace in the
|
|
29
|
+
* buffer is complete and safe to redact and emit. The unterminated trailing
|
|
30
|
+
* token is held back until more input (or {@link StreamingRedactor#flush})
|
|
31
|
+
* arrives. Notably `https://user:pass` without a terminating `@host` is not a
|
|
32
|
+
* credential URL at all, so holding it back until whitespace guarantees the
|
|
33
|
+
* `@host` half has arrived before anything is emitted.
|
|
34
|
+
*
|
|
35
|
+
* The held-back tail is bounded. An over-long non-sensitive token is trimmed to
|
|
36
|
+
* its trailing `maxHold` characters. An over-long secret assignment is redacted
|
|
37
|
+
* once and then discarded until its terminating whitespace, so no suffix can
|
|
38
|
+
* escape and memory remains bounded.
|
|
39
|
+
*/
|
|
40
|
+
export class StreamingRedactor {
|
|
41
|
+
/**
|
|
42
|
+
* @param {{maxHold?: number}} [opts]
|
|
43
|
+
*/
|
|
44
|
+
constructor({ maxHold }?: {
|
|
45
|
+
maxHold?: number;
|
|
46
|
+
});
|
|
47
|
+
/** @type {string} */
|
|
48
|
+
pending: string;
|
|
49
|
+
/** @type {number} */
|
|
50
|
+
maxHold: number;
|
|
51
|
+
/** @type {boolean} */
|
|
52
|
+
discardingSecretValue: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Appends a chunk and returns the redacted text that is safe to emit now.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} chunk
|
|
57
|
+
* @returns {string}
|
|
58
|
+
*/
|
|
59
|
+
push(chunk: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* Emits and clears any buffered tail. At end of stream the final token is
|
|
62
|
+
* complete, so redactText fully masks any secret it contains.
|
|
63
|
+
*
|
|
64
|
+
* @returns {string}
|
|
65
|
+
*/
|
|
66
|
+
flush(): string;
|
|
67
|
+
}
|
|
22
68
|
//# sourceMappingURL=redaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redaction.d.ts","sourceRoot":"","sources":["../../../src/core/redaction.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"redaction.d.ts","sourceRoot":"","sources":["../../../src/core/redaction.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH,iCAHW,OAAO,GACL,OAAO,CAInB;AAED;;;;GAIG;AACH,iCAJW,OAAO,SACP,OAAO,GACL,MAAM,CAKlB;AAED;;;GAGG;AACH,gCAHW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOlC;AAED;;;GAGG;AACH,iCAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;OAEG;IACH,0BAFW;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAC,EAS5B;IANC,qBAAqB;IACrB,SADW,MAAM,CACA;IACjB,qBAAqB;IACrB,SADW,MAAM,CACK;IACtB,sBAAsB;IACtB,uBADW,OAAO,CACgB;IAGpC;;;;;OAKG;IACH,YAHW,MAAM,GACJ,MAAM,CA6BlB;IAED;;;;;OAKG;IACH,SAFa,MAAM,CAMlB;CACF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-check
|
|
1
2
|
const SECRET_KEY_PATTERN = /(token|password|secret|key|cookie|authorization)/iu;
|
|
2
3
|
const SECRET_ASSIGNMENT_PATTERN = /((?:token|password|secret|key|cookie|authorization)[A-Z0-9_\-]*\s*=\s*)([^\s]+)/giu;
|
|
3
4
|
const HTTPS_USERINFO_PATTERN = /(https?:\/\/)[^/@\s]+@/giu;
|
|
@@ -36,4 +37,109 @@ export function redactEnv(env = {}) {
|
|
|
36
37
|
export function redactText(text) {
|
|
37
38
|
return String(text).replace(SECRET_ASSIGNMENT_PATTERN, "$1[REDACTED]").replace(HTTPS_USERINFO_PATTERN, "$1[REDACTED]@");
|
|
38
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Incrementally redacts a command output stream without ever emitting a
|
|
42
|
+
* possibly-incomplete sensitive tail.
|
|
43
|
+
*
|
|
44
|
+
* Secret assignments (`KEY=value`) and credential URLs
|
|
45
|
+
* (`https://user:pass@host`) are always terminated by whitespace and contain no
|
|
46
|
+
* internal whitespace, so any token preceding the final whitespace in the
|
|
47
|
+
* buffer is complete and safe to redact and emit. The unterminated trailing
|
|
48
|
+
* token is held back until more input (or {@link StreamingRedactor#flush})
|
|
49
|
+
* arrives. Notably `https://user:pass` without a terminating `@host` is not a
|
|
50
|
+
* credential URL at all, so holding it back until whitespace guarantees the
|
|
51
|
+
* `@host` half has arrived before anything is emitted.
|
|
52
|
+
*
|
|
53
|
+
* The held-back tail is bounded. An over-long non-sensitive token is trimmed to
|
|
54
|
+
* its trailing `maxHold` characters. An over-long secret assignment is redacted
|
|
55
|
+
* once and then discarded until its terminating whitespace, so no suffix can
|
|
56
|
+
* escape and memory remains bounded.
|
|
57
|
+
*/
|
|
58
|
+
export class StreamingRedactor {
|
|
59
|
+
/**
|
|
60
|
+
* @param {{maxHold?: number}} [opts]
|
|
61
|
+
*/
|
|
62
|
+
constructor({ maxHold = 8192 } = {}) {
|
|
63
|
+
/** @type {string} */
|
|
64
|
+
this.pending = "";
|
|
65
|
+
/** @type {number} */
|
|
66
|
+
this.maxHold = maxHold;
|
|
67
|
+
/** @type {boolean} */
|
|
68
|
+
this.discardingSecretValue = false;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Appends a chunk and returns the redacted text that is safe to emit now.
|
|
72
|
+
*
|
|
73
|
+
* @param {string} chunk
|
|
74
|
+
* @returns {string}
|
|
75
|
+
*/
|
|
76
|
+
push(chunk) {
|
|
77
|
+
if (this.discardingSecretValue) {
|
|
78
|
+
const whitespaceIndex = firstWhitespaceIndex(chunk);
|
|
79
|
+
if (whitespaceIndex < 0)
|
|
80
|
+
return "";
|
|
81
|
+
this.discardingSecretValue = false;
|
|
82
|
+
chunk = chunk.slice(whitespaceIndex);
|
|
83
|
+
}
|
|
84
|
+
this.pending += chunk;
|
|
85
|
+
let cut = lastWhitespaceIndex(this.pending) + 1;
|
|
86
|
+
if (this.pending.length - cut > this.maxHold) {
|
|
87
|
+
const tail = this.pending.slice(cut);
|
|
88
|
+
const secretPrefix = secretAssignmentPrefix(tail);
|
|
89
|
+
if (secretPrefix) {
|
|
90
|
+
const leading = this.pending.slice(0, cut);
|
|
91
|
+
this.pending = "";
|
|
92
|
+
this.discardingSecretValue = true;
|
|
93
|
+
return leading + secretPrefix + "[REDACTED]";
|
|
94
|
+
}
|
|
95
|
+
const scheme = tail.search(/https?:\/\/(?![^\s]*@)/u);
|
|
96
|
+
cut = scheme >= 0 ? cut + scheme : this.pending.length - this.maxHold;
|
|
97
|
+
}
|
|
98
|
+
if (cut <= 0)
|
|
99
|
+
return "";
|
|
100
|
+
const emit = this.pending.slice(0, cut);
|
|
101
|
+
this.pending = this.pending.slice(cut);
|
|
102
|
+
return redactText(emit);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Emits and clears any buffered tail. At end of stream the final token is
|
|
106
|
+
* complete, so redactText fully masks any secret it contains.
|
|
107
|
+
*
|
|
108
|
+
* @returns {string}
|
|
109
|
+
*/
|
|
110
|
+
flush() {
|
|
111
|
+
const rest = this.pending;
|
|
112
|
+
this.pending = "";
|
|
113
|
+
return redactText(rest);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @param {string} text
|
|
118
|
+
* @returns {number}
|
|
119
|
+
*/
|
|
120
|
+
function lastWhitespaceIndex(text) {
|
|
121
|
+
for (let index = text.length - 1; index >= 0; index -= 1) {
|
|
122
|
+
if (/\s/u.test(text[index]))
|
|
123
|
+
return index;
|
|
124
|
+
}
|
|
125
|
+
return -1;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* @param {string} text
|
|
129
|
+
* @returns {number}
|
|
130
|
+
*/
|
|
131
|
+
function firstWhitespaceIndex(text) {
|
|
132
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
133
|
+
if (/\s/u.test(text[index]))
|
|
134
|
+
return index;
|
|
135
|
+
}
|
|
136
|
+
return -1;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* @param {string} token
|
|
140
|
+
* @returns {string|null}
|
|
141
|
+
*/
|
|
142
|
+
function secretAssignmentPrefix(token) {
|
|
143
|
+
return token.match(/^(?:token|password|secret|key|cookie|authorization)[A-Z0-9_\-]*\s*=\s*/iu)?.[0] ?? null;
|
|
144
|
+
}
|
|
39
145
|
//# sourceMappingURL=redaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redaction.js","sourceRoot":"","sources":["../../../src/core/redaction.js"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,oDAAoD,CAAA;AAC/E,MAAM,yBAAyB,GAAG,oFAAoF,CAAA;AACtH,MAAM,sBAAsB,GAAG,2BAA2B,CAAA;AAE1D;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,GAAG;IAC7B,OAAO,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;AAC7C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,GAAG,EAAE,KAAK;IACpC,IAAI,WAAW,CAAC,GAAG,CAAC;QAAE,OAAO,YAAY,CAAA;IACzC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA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AC,IAAI,CAAC,KAAK,CAAC,CAAC;YAAE,OAAO,KAAK,CAAA;IAC3C,CAAC;IACD,OAAO,CAAC,CAAC,CAAA;AACX,CAAC;AAED;;;GAGG;AACH,SAAS,oBAAoB,CAAC,IAAI;IAChC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACpD,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAAE,OAAO,KAAK,CAAA;IAC3C,CAAC;IACD,OAAO,CAAC,CAAC,CAAA;AACX,CAAC;AAED;;;GAGG;AACH,SAAS,sBAAsB,CAAC,KAAK;IACnC,OAAO,KAAK,CAAC,KAAK,CAAC,0EAA0E,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAA;AAC7G,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Human reporter: Capistrano-style lifecycle lines and live command streaming.
|
|
3
|
+
*
|
|
4
|
+
* @returns {Reporter}
|
|
5
|
+
*/
|
|
6
|
+
export function humanReporter(): Reporter;
|
|
7
|
+
/**
|
|
8
|
+
* JSON/automation reporter: no lifecycle lines and no streamed command output,
|
|
9
|
+
* so the only thing a caller writes is the final JSON payload.
|
|
10
|
+
*
|
|
11
|
+
* @returns {Reporter}
|
|
12
|
+
*/
|
|
13
|
+
export function jsonReporter(): Reporter;
|
|
14
|
+
/**
|
|
15
|
+
* @file Explicit deploy output-mode reporter.
|
|
16
|
+
*
|
|
17
|
+
* A reporter is threaded through the deploy path so that command lifecycle
|
|
18
|
+
* progress and live command output are printed in human ("Capistrano") mode and
|
|
19
|
+
* fully suppressed in `--json` automation mode. It is passed explicitly instead
|
|
20
|
+
* of relying on any global output flag, so callers stay in control of their own
|
|
21
|
+
* stdout/stderr contract.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* @name Reporter
|
|
25
|
+
* @description Output-mode object controlling lifecycle and streamed output.
|
|
26
|
+
*/
|
|
27
|
+
export class Reporter {
|
|
28
|
+
/**
|
|
29
|
+
* @param {{lifecycle?: boolean, streamCommands?: boolean, out?: import('node:stream').Writable, err?: import('node:stream').Writable}} [opts]
|
|
30
|
+
*/
|
|
31
|
+
constructor({ lifecycle, streamCommands, out, err }?: {
|
|
32
|
+
lifecycle?: boolean;
|
|
33
|
+
streamCommands?: boolean;
|
|
34
|
+
out?: import("node:stream").Writable;
|
|
35
|
+
err?: import("node:stream").Writable;
|
|
36
|
+
});
|
|
37
|
+
/** @type {boolean} */
|
|
38
|
+
lifecycleEnabled: boolean;
|
|
39
|
+
/** @type {boolean} */
|
|
40
|
+
streamCommands: boolean;
|
|
41
|
+
/** @type {import('node:stream').Writable} */
|
|
42
|
+
out: import("node:stream").Writable;
|
|
43
|
+
/** @type {import('node:stream').Writable} */
|
|
44
|
+
err: import("node:stream").Writable;
|
|
45
|
+
/**
|
|
46
|
+
* Whether live command stdout/stderr should be streamed as it arrives.
|
|
47
|
+
*
|
|
48
|
+
* @returns {boolean}
|
|
49
|
+
*/
|
|
50
|
+
get streamsCommands(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Prints a Capistrano-style lifecycle line in human mode; no-op otherwise.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} message
|
|
55
|
+
* @returns {void}
|
|
56
|
+
*/
|
|
57
|
+
line(message: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Writes already-redacted streamed command output to the error stream. The
|
|
60
|
+
* error stream is used so human deploy stdout stays reserved for lifecycle
|
|
61
|
+
* progress and the final summary, and JSON stdout stays clean.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} text
|
|
64
|
+
* @returns {boolean}
|
|
65
|
+
*/
|
|
66
|
+
writeCommandOutput(text: string): boolean;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=reporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../../../src/core/reporter.js"],"names":[],"mappings":"AA+DA;;;;GAIG;AACH,iCAFa,QAAQ,CAIpB;AAED;;;;;GAKG;AACH,gCAFa,QAAQ,CAIpB;AA9ED;;;;;;;;GAQG;AAEH;;;GAGG;AACH;IACE;;OAEG;IACH,sDAFW;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,aAAa,EAAE,QAAQ,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,aAAa,EAAE,QAAQ,CAAA;KAAC,EAWrI;IARC,sBAAsB;IACtB,kBADW,OAAO,CACe;IACjC,sBAAsB;IACtB,gBADW,OAAO,CACkB;IACpC,6CAA6C;IAC7C,KADW,OAAO,aAAa,EAAE,QAAQ,CAC3B;IACd,6CAA6C;IAC7C,KADW,OAAO,aAAa,EAAE,QAAQ,CAC3B;IAGhB;;;;OAIG;IACH,uBAFa,OAAO,CAInB;IAED;;;;;OAKG;IACH,cAHW,MAAM,GACJ,IAAI,CAIhB;IAED;;;;;;;OAOG;IACH,yBAHW,MAAM,GACJ,OAAO,CAInB;CACF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/**
|
|
3
|
+
* @file Explicit deploy output-mode reporter.
|
|
4
|
+
*
|
|
5
|
+
* A reporter is threaded through the deploy path so that command lifecycle
|
|
6
|
+
* progress and live command output are printed in human ("Capistrano") mode and
|
|
7
|
+
* fully suppressed in `--json` automation mode. It is passed explicitly instead
|
|
8
|
+
* of relying on any global output flag, so callers stay in control of their own
|
|
9
|
+
* stdout/stderr contract.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* @name Reporter
|
|
13
|
+
* @description Output-mode object controlling lifecycle and streamed output.
|
|
14
|
+
*/
|
|
15
|
+
export class Reporter {
|
|
16
|
+
/**
|
|
17
|
+
* @param {{lifecycle?: boolean, streamCommands?: boolean, out?: import('node:stream').Writable, err?: import('node:stream').Writable}} [opts]
|
|
18
|
+
*/
|
|
19
|
+
constructor({ lifecycle = true, streamCommands = true, out = process.stdout, err = process.stderr } = {}) {
|
|
20
|
+
/** @type {boolean} */
|
|
21
|
+
this.lifecycleEnabled = lifecycle;
|
|
22
|
+
/** @type {boolean} */
|
|
23
|
+
this.streamCommands = streamCommands;
|
|
24
|
+
/** @type {import('node:stream').Writable} */
|
|
25
|
+
this.out = out;
|
|
26
|
+
/** @type {import('node:stream').Writable} */
|
|
27
|
+
this.err = err;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Whether live command stdout/stderr should be streamed as it arrives.
|
|
31
|
+
*
|
|
32
|
+
* @returns {boolean}
|
|
33
|
+
*/
|
|
34
|
+
get streamsCommands() {
|
|
35
|
+
return this.streamCommands;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Prints a Capistrano-style lifecycle line in human mode; no-op otherwise.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} message
|
|
41
|
+
* @returns {void}
|
|
42
|
+
*/
|
|
43
|
+
line(message) {
|
|
44
|
+
if (this.lifecycleEnabled)
|
|
45
|
+
this.out.write(`${message}\n`);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Writes already-redacted streamed command output to the error stream. The
|
|
49
|
+
* error stream is used so human deploy stdout stays reserved for lifecycle
|
|
50
|
+
* progress and the final summary, and JSON stdout stays clean.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} text
|
|
53
|
+
* @returns {boolean}
|
|
54
|
+
*/
|
|
55
|
+
writeCommandOutput(text) {
|
|
56
|
+
return this.err.write(text);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Human reporter: Capistrano-style lifecycle lines and live command streaming.
|
|
61
|
+
*
|
|
62
|
+
* @returns {Reporter}
|
|
63
|
+
*/
|
|
64
|
+
export function humanReporter() {
|
|
65
|
+
return new Reporter({ lifecycle: true, streamCommands: true });
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* JSON/automation reporter: no lifecycle lines and no streamed command output,
|
|
69
|
+
* so the only thing a caller writes is the final JSON payload.
|
|
70
|
+
*
|
|
71
|
+
* @returns {Reporter}
|
|
72
|
+
*/
|
|
73
|
+
export function jsonReporter() {
|
|
74
|
+
return new Reporter({ lifecycle: false, streamCommands: false });
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=reporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../src/core/reporter.js"],"names":[],"mappings":"AAAA,YAAY;AAEZ;;;;;;;;GAQG;AAEH;;;GAGG;AACH,MAAM,OAAO,QAAQ;IACnB;;OAEG;IACH,YAAY,EAAC,SAAS,GAAG,IAAI,EAAE,cAAc,GAAG,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,EAAC,GAAG,EAAE;QACpG,sBAAsB;QACtB,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAA;QACjC,sBAAsB;QACtB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,6CAA6C;QAC7C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,6CAA6C;QAC7C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IAChB,CAAC;IAED;;;;OAIG;IACH,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,cAAc,CAAA;IAC5B,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,OAAO;QACV,IAAI,IAAI,CAAC,gBAAgB;YAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAA;IAC3D,CAAC;IAED;;;;;;;OAOG;IACH,kBAAkB,CAAC,IAAI;QACrB,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC7B,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,QAAQ,CAAC,EAAC,SAAS,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAC,CAAC,CAAA;AAC9D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,IAAI,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAC,CAAC,CAAA;AAChE,CAAC"}
|
|
@@ -7,11 +7,12 @@ export function taskCommands(stage: import("#types").StageConfig): import("#type
|
|
|
7
7
|
* @param {import('#types').Transport} transport
|
|
8
8
|
* @param {import('#types').StageConfig} stage
|
|
9
9
|
* @param {string} releasePath
|
|
10
|
-
* @param {{previousReleasePath?: string|null}} [opts]
|
|
10
|
+
* @param {{previousReleasePath?: string|null, reporter?: Reporter}} [opts]
|
|
11
11
|
* @returns {Promise<import('#types').TaskResult[]>}
|
|
12
12
|
*/
|
|
13
|
-
export function runTasks(transport: import("#types").Transport, stage: import("#types").StageConfig, releasePath: string, { previousReleasePath }?: {
|
|
13
|
+
export function runTasks(transport: import("#types").Transport, stage: import("#types").StageConfig, releasePath: string, { previousReleasePath, reporter }?: {
|
|
14
14
|
previousReleasePath?: string | null;
|
|
15
|
+
reporter?: Reporter;
|
|
15
16
|
}): Promise<import("#types").TaskResult[]>;
|
|
16
17
|
/**
|
|
17
18
|
* @param {string} name
|
|
@@ -29,10 +30,12 @@ export function normalizeTask(name: string, entry: string | import("#types").Tas
|
|
|
29
30
|
* @param {import('#types').Transport} transport
|
|
30
31
|
* @param {import('#types').TaskEntry} task
|
|
31
32
|
* @param {string} cwd
|
|
32
|
-
* @param {{previousReleasePath?: string|null}} [opts]
|
|
33
|
+
* @param {{previousReleasePath?: string|null, reporter?: Reporter}} [opts]
|
|
33
34
|
* @returns {Promise<import('#types').TaskResult>}
|
|
34
35
|
*/
|
|
35
|
-
export function runTask(transport: import("#types").Transport, task: import("#types").TaskEntry, cwd: string, { previousReleasePath }?: {
|
|
36
|
+
export function runTask(transport: import("#types").Transport, task: import("#types").TaskEntry, cwd: string, { previousReleasePath, reporter }?: {
|
|
36
37
|
previousReleasePath?: string | null;
|
|
38
|
+
reporter?: Reporter;
|
|
37
39
|
}): Promise<import("#types").TaskResult>;
|
|
40
|
+
import { Reporter } from "./reporter.js";
|
|
38
41
|
//# sourceMappingURL=task-runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-runner.d.ts","sourceRoot":"","sources":["../../../src/core/task-runner.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"task-runner.d.ts","sourceRoot":"","sources":["../../../src/core/task-runner.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,oCAHW,OAAO,QAAQ,EAAE,WAAW,GAC1B,OAAO,QAAQ,EAAE,SAAS,EAAE,CAQxC;AAED;;;;;;GAMG;AACH,oCANW,OAAO,QAAQ,EAAE,SAAS,SAC1B,OAAO,QAAQ,EAAE,WAAW,eAC5B,MAAM,sCACN;IAAC,mBAAmB,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAC,GACtD,OAAO,CAAC,OAAO,QAAQ,EAAE,UAAU,EAAE,CAAC,CAQlD;AAED;;;;GAIG;AACH,yCAJW,MAAM,WACN,MAAM,GAAC,OAAO,QAAQ,EAAE,SAAS,GAAC,KAAK,CAAC,MAAM,GAAC,OAAO,QAAQ,EAAE,SAAS,CAAC,GACxE,OAAO,QAAQ,EAAE,SAAS,EAAE,CASxC;AAED;;;;GAIG;AACH,oCAJW,MAAM,SACN,MAAM,GAAC,OAAO,QAAQ,EAAE,SAAS,GAC/B,OAAO,QAAQ,EAAE,SAAS,CAOtC;AAED;;;;;;GAMG;AACH,mCANW,OAAO,QAAQ,EAAE,SAAS,QAC1B,OAAO,QAAQ,EAAE,SAAS,OAC1B,MAAM,sCACN;IAAC,mBAAmB,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAC,GACtD,OAAO,CAAC,OAAO,QAAQ,EAAE,UAAU,CAAC,CAyBhD;yBAtFsB,eAAe"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
// @ts-check
|
|
1
2
|
import { redactText } from "./redaction.js";
|
|
3
|
+
import { Reporter } from "./reporter.js";
|
|
2
4
|
import { pathsChanged } from "./path-change-gate.js";
|
|
3
5
|
/**
|
|
4
6
|
* @param {import('#types').StageConfig} stage
|
|
@@ -15,13 +17,13 @@ export function taskCommands(stage) {
|
|
|
15
17
|
* @param {import('#types').Transport} transport
|
|
16
18
|
* @param {import('#types').StageConfig} stage
|
|
17
19
|
* @param {string} releasePath
|
|
18
|
-
* @param {{previousReleasePath?: string|null}} [opts]
|
|
20
|
+
* @param {{previousReleasePath?: string|null, reporter?: Reporter}} [opts]
|
|
19
21
|
* @returns {Promise<import('#types').TaskResult[]>}
|
|
20
22
|
*/
|
|
21
|
-
export async function runTasks(transport, stage, releasePath, { previousReleasePath } = {}) {
|
|
23
|
+
export async function runTasks(transport, stage, releasePath, { previousReleasePath, reporter = new Reporter({ lifecycle: false }) } = {}) {
|
|
22
24
|
const results = [];
|
|
23
25
|
for (const task of taskCommands(stage)) {
|
|
24
|
-
results.push(await runTask(transport, task, releasePath, { previousReleasePath }));
|
|
26
|
+
results.push(await runTask(transport, task, releasePath, { previousReleasePath, reporter }));
|
|
25
27
|
}
|
|
26
28
|
return results;
|
|
27
29
|
}
|
|
@@ -56,17 +58,20 @@ export function normalizeTask(name, entry) {
|
|
|
56
58
|
* @param {import('#types').Transport} transport
|
|
57
59
|
* @param {import('#types').TaskEntry} task
|
|
58
60
|
* @param {string} cwd
|
|
59
|
-
* @param {{previousReleasePath?: string|null}} [opts]
|
|
61
|
+
* @param {{previousReleasePath?: string|null, reporter?: Reporter}} [opts]
|
|
60
62
|
* @returns {Promise<import('#types').TaskResult>}
|
|
61
63
|
*/
|
|
62
|
-
export async function runTask(transport, task, cwd, { previousReleasePath } = {}) {
|
|
64
|
+
export async function runTask(transport, task, cwd, { previousReleasePath, reporter = new Reporter({ lifecycle: false }) } = {}) {
|
|
63
65
|
if (task.onlyIfChanged && previousReleasePath) {
|
|
64
66
|
const changed = await pathsChanged(transport, previousReleasePath, cwd, task.onlyIfChanged);
|
|
65
|
-
if (!changed)
|
|
67
|
+
if (!changed) {
|
|
68
|
+
reporter.line(` * Skipping task ${task.name} (no paths changed)`);
|
|
66
69
|
return taskResult(task, task.optional === true, "skipped", undefined, "no paths changed");
|
|
70
|
+
}
|
|
67
71
|
}
|
|
68
72
|
const taskCwd = task.cwd ? `${cwd}/${task.cwd}` : cwd;
|
|
69
73
|
const optional = task.optional === true;
|
|
74
|
+
reporter.line(` * Running task ${task.name}: ${redactText(task.command)}`);
|
|
70
75
|
try {
|
|
71
76
|
await transport.run(task.command, { cwd: taskCwd, env: task.env ?? {} });
|
|
72
77
|
return taskResult(task, optional, "passed", undefined);
|
|
@@ -74,7 +79,7 @@ export async function runTask(transport, task, cwd, { previousReleasePath } = {}
|
|
|
74
79
|
catch (error) {
|
|
75
80
|
if (optional) {
|
|
76
81
|
const err = /** @type {Error} */ (error);
|
|
77
|
-
|
|
82
|
+
reporter.line(` * Optional task '${task.name}' failed: ${err.message}`);
|
|
78
83
|
return taskResult(task, optional, "failed", err);
|
|
79
84
|
}
|
|
80
85
|
const err = /** @type {Error} */ (error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-runner.js","sourceRoot":"","sources":["../../../src/core/task-runner.js"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAA;AAElD;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAK;IAChC,MAAM,QAAQ,GAAG,EAAE,CAAA;IACn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AAC,KAAK,CAAC,CAAA;YACxC,QAAQ,CAAC,IAAI,CAAC,sBAAsB,IAAI,CAAC,IAAI,aAAa,GAAG,CAAC,OAAO,EAAE,CAAC,CAAA;YACxE,OAAO,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAA;QAClD,CAAC;QACD,MAAM,GAAG,GAAG,oBAAoB,CAAC,CAAC,KAAK,CAAC,CAAA;QACxC,MAAM,IAAI,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,0BAA0B,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,CAAA;IACzG,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU;IAC3D,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;QACrB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,QAAQ;QACR,MAAM;QACN,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAC,UAAU,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACpC,CAAA;AACH,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export class LocalTransport {
|
|
2
|
+
/**
|
|
3
|
+
* @param {{reporter?: import('../core/reporter.js').Reporter}} [opts]
|
|
4
|
+
*/
|
|
5
|
+
constructor({ reporter }?: {
|
|
6
|
+
reporter?: import("../core/reporter.js").Reporter;
|
|
7
|
+
});
|
|
8
|
+
/** @type {import('../core/reporter.js').Reporter} */
|
|
9
|
+
reporter: import("../core/reporter.js").Reporter;
|
|
2
10
|
/**
|
|
3
11
|
* @param {string} targetPath
|
|
4
12
|
* @returns {Promise<void>}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-transport.d.ts","sourceRoot":"","sources":["../../../src/transports/local-transport.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-transport.d.ts","sourceRoot":"","sources":["../../../src/transports/local-transport.js"],"names":[],"mappings":"AAOA;IACE;;OAEG;IACH,2BAFW;QAAC,QAAQ,CAAC,EAAE,OAAO,qBAAqB,EAAE,QAAQ,CAAA;KAAC,EAK7D;IAFC,qDAAqD;IACrD,UADW,OAAO,qBAAqB,EAAE,QAAQ,CACzB;IAG1B;;;OAGG;IACH,mBAHW,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAW5B;IAED;;;;;OAKG;IACH,gBALW,MAAM,YACN,MAAM,SACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAI3B;IAED;;;OAGG;IACH,eAHW,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED;;;;OAIG;IACH,aAJW,MAAM,MACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED;;;;OAIG;IACH,oBAJW,MAAM,WACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAKzB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAI3B;IAED;;;OAGG;IACH,iBAHW,MAAM,GACJ,OAAO,CAAC,MAAM,EAAE,CAAC,CAU7B;IAED;;;;OAIG;IACH,cAJW,MAAM,MACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED;;;;OAIG;IACH,aAJW,MAAM,iBACN;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAC,GAC1C,OAAO,CAAC,OAAO,QAAQ,EAAE,WAAW,CAAC,CAqCjD;CACF"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
// @ts-check
|
|
1
2
|
import fs from "node:fs/promises";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
import { spawn } from "node:child_process";
|
|
4
|
-
import { redactText } from "../core/redaction.js";
|
|
5
|
+
import { redactText, StreamingRedactor } from "../core/redaction.js";
|
|
6
|
+
import { Reporter } from "../core/reporter.js";
|
|
5
7
|
export class LocalTransport {
|
|
8
|
+
/**
|
|
9
|
+
* @param {{reporter?: import('../core/reporter.js').Reporter}} [opts]
|
|
10
|
+
*/
|
|
11
|
+
constructor({ reporter = new Reporter() } = {}) {
|
|
12
|
+
/** @type {import('../core/reporter.js').Reporter} */
|
|
13
|
+
this.reporter = reporter;
|
|
14
|
+
}
|
|
6
15
|
/**
|
|
7
16
|
* @param {string} targetPath
|
|
8
17
|
* @returns {Promise<void>}
|
|
@@ -102,13 +111,38 @@ export class LocalTransport {
|
|
|
102
111
|
* @returns {Promise<import('#types').SpawnResult>}
|
|
103
112
|
*/
|
|
104
113
|
async run(command, { cwd, env = {} } = {}) {
|
|
114
|
+
const shouldStream = this.reporter.streamsCommands;
|
|
105
115
|
return await new Promise((resolve, reject) => {
|
|
106
116
|
const child = spawn(command, { cwd, env: { ...process.env, ...env }, shell: true });
|
|
107
117
|
let output = "";
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
118
|
+
const redactor = new StreamingRedactor();
|
|
119
|
+
const emit = /** @param {Buffer|string} chunk */ /** @param {Buffer|string} chunk */ chunk => {
|
|
120
|
+
const text = chunk.toString();
|
|
121
|
+
output += text;
|
|
122
|
+
if (!shouldStream)
|
|
123
|
+
return;
|
|
124
|
+
const safe = redactor.push(text);
|
|
125
|
+
if (safe && !this.reporter.writeCommandOutput(safe)) {
|
|
126
|
+
child.stdout.pause();
|
|
127
|
+
child.stderr.pause();
|
|
128
|
+
this.reporter.err.once("drain", () => {
|
|
129
|
+
child.stdout.resume();
|
|
130
|
+
child.stderr.resume();
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const flush = () => {
|
|
135
|
+
if (!shouldStream)
|
|
136
|
+
return;
|
|
137
|
+
const rest = redactor.flush();
|
|
138
|
+
if (rest)
|
|
139
|
+
this.reporter.writeCommandOutput(rest);
|
|
140
|
+
};
|
|
141
|
+
child.stdout.on("data", emit);
|
|
142
|
+
child.stderr.on("data", emit);
|
|
143
|
+
child.on("error", /** @param {Error} error */ /** @param {Error} error */ error => { flush(); reject(error); });
|
|
111
144
|
child.on("close", /** @param {number|null} code */ /** @param {number|null} code */ code => {
|
|
145
|
+
flush();
|
|
112
146
|
if (code === 0)
|
|
113
147
|
resolve({ code, output: redactText(output) });
|
|
114
148
|
else
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-transport.js","sourceRoot":"","sources":["../../../src/transports/local-transport.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACjC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAA;AACxC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"local-transport.js","sourceRoot":"","sources":["../../../src/transports/local-transport.js"],"names":[],"mappings":"AAAA,YAAY;AACZ,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACjC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAA;AACxC,OAAO,EAAC,UAAU,EAAE,iBAAiB,EAAC,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AAE5C,MAAM,OAAO,cAAc;IACzB;;OAEG;IACH,Y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,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAC7B,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAC7B,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,CAAC,AAA5B,2BAA2B,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA,CAAC,CAAC,CAAC,CAAA;YAClF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,gCAAgC,CAAC,AAAjC,gCAAgC,CAAC,IAAI,CAAC,EAAE;gBACxD,KAAK,EAAE,CAAA;gBACP,IAAI,IAAI,KAAK,CAAC;oBAAE,OAAO,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAC,CAAC,CAAA;;oBACtD,MAAM,CAAC,IAAI,KAAK,CAAC,4BAA4B,IAAI,KAAK,UAAU,CAAC,OAAO,CAAC;EACpF,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA;YAClB,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -27,17 +27,21 @@ export function remotePath(value: unknown): string;
|
|
|
27
27
|
export class SshTransport {
|
|
28
28
|
/**
|
|
29
29
|
* @param {import('#types').StageConfig} stage
|
|
30
|
+
* @param {import('../core/reporter.js').Reporter} [reporter]
|
|
30
31
|
* @returns {SshTransport}
|
|
31
32
|
*/
|
|
32
|
-
static fromStage(stage: import("#types").StageConfig): SshTransport;
|
|
33
|
+
static fromStage(stage: import("#types").StageConfig, reporter?: import("../core/reporter.js").Reporter): SshTransport;
|
|
33
34
|
/**
|
|
34
|
-
* @param {{host: import('#types').TransportConfig}} opts
|
|
35
|
+
* @param {{host: import('#types').TransportConfig, reporter?: import('../core/reporter.js').Reporter}} opts
|
|
35
36
|
*/
|
|
36
|
-
constructor({ host }: {
|
|
37
|
+
constructor({ host, reporter }: {
|
|
37
38
|
host: import("#types").TransportConfig;
|
|
39
|
+
reporter?: import("../core/reporter.js").Reporter;
|
|
38
40
|
});
|
|
39
41
|
/** @type {import('#types').TransportConfig} */
|
|
40
42
|
host: import("#types").TransportConfig;
|
|
43
|
+
/** @type {import('../core/reporter.js').Reporter} */
|
|
44
|
+
reporter: import("../core/reporter.js").Reporter;
|
|
41
45
|
/**
|
|
42
46
|
* @param {string} targetPath
|
|
43
47
|
* @returns {Promise<void>}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssh-transport.d.ts","sourceRoot":"","sources":["../../../src/transports/ssh-transport.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ssh-transport.d.ts","sourceRoot":"","sources":["../../../src/transports/ssh-transport.js"],"names":[],"mappings":"AA2WA;;;GAGG;AACH,qCAHW,OAAO,QAAQ,EAAE,eAAe,GAC9B,MAAM,CAKlB;AAED;;;;GAIG;AACH,8BAJW,OAAO,QAAQ,EAAE,eAAe,WAChC,MAAM,GACJ,MAAM,EAAE,CASpB;AAED;;;GAGG;AACH,kCAHW,OAAO,GACL,MAAM,CAMlB;AAED;;;GAGG;AACH,iCAHW,OAAO,GACL,MAAM,CAOlB;AAED;;;GAGG;AACH,kCAHW,OAAO,GACL,MAAM,CAIlB;AAvZD;IAWE;;;;OAIG;IACH,wBAJW,OAAO,QAAQ,EAAE,WAAW,aAC5B,OAAO,qBAAqB,EAAE,QAAQ,GACpC,YAAY,CAIxB;IAjBD;;OAEG;IACH,gCAFW;QAAC,IAAI,EAAE,OAAO,QAAQ,EAAE,eAAe,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,qBAAqB,EAAE,QAAQ,CAAA;KAAC,EAOrG;IAJC,+CAA+C;IAC/C,MADW,OAAO,QAAQ,EAAE,eAAe,CAC3B;IAChB,qDAAqD;IACrD,UADW,OAAO,qBAAqB,EAAE,QAAQ,CACzB;IAY1B;;;OAGG;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