ares-ssh-deploy 1.0.2 → 1.0.3

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,11 @@
1
1
  # ares-ssh-deploy
2
2
 
3
+ ## 1.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - fix bug
8
+
3
9
  ## 1.0.2
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.cts CHANGED
@@ -1,3 +1,5 @@
1
1
  export { deployToWindowsServer } from './utils/deploy-windows-server.cjs';
2
2
  export { deployToLinuxBastionInternalServer, disableLinuxBastionHealthCheck, enableLinuxBastionHealthCheck } from './utils/deploy-linux-bastion.cjs';
3
3
  import 'node-ssh';
4
+ import './shared/ssh-deploy.BPGd0bH8.cjs';
5
+ import 'ssh2';
package/dist/index.d.mts CHANGED
@@ -1,3 +1,5 @@
1
1
  export { deployToWindowsServer } from './utils/deploy-windows-server.mjs';
2
2
  export { deployToLinuxBastionInternalServer, disableLinuxBastionHealthCheck, enableLinuxBastionHealthCheck } from './utils/deploy-linux-bastion.mjs';
3
3
  import 'node-ssh';
4
+ import './shared/ssh-deploy.BPGd0bH8.mjs';
5
+ import 'ssh2';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  export { deployToWindowsServer } from './utils/deploy-windows-server.js';
2
2
  export { deployToLinuxBastionInternalServer, disableLinuxBastionHealthCheck, enableLinuxBastionHealthCheck } from './utils/deploy-linux-bastion.js';
3
3
  import 'node-ssh';
4
+ import './shared/ssh-deploy.BPGd0bH8.js';
5
+ import 'ssh2';
@@ -0,0 +1,59 @@
1
+ import { SFTPWrapper } from 'ssh2';
2
+
3
+ interface SSHClientConfig {
4
+ host?: string
5
+ port?: number | string
6
+ username?: string
7
+ password?: string
8
+ privateKey?: string
9
+ [key: string]: any
10
+ }
11
+ interface BastionSSHClientConfig extends SSHClientConfig {
12
+ [key: string]: any
13
+ }
14
+ interface TargetSSHClientConfig extends SSHClientConfig {
15
+ localDeployDir?: string
16
+ localDownloadDir?: string
17
+
18
+ remoteBackupDir?: string
19
+ remoteDir?: string
20
+ remoteDirTemp?: string
21
+
22
+ remoteHealthDir?: string
23
+ remoteHideHealthFileDir?: string
24
+ remoteHealthFile?: string
25
+ remoteHealthHiddenFile?: string
26
+ [key: string]: any
27
+ }
28
+ interface BastionChannelConfig {
29
+ srcIP?: string
30
+ srcPort?: number | string
31
+ dstIP?: string
32
+ dstPort?: number | string
33
+ [key: string]: any
34
+ }
35
+ interface IntraServerSSHClientConfig {
36
+ username?: string
37
+ password?: string
38
+ [key: string]: any
39
+ }
40
+ interface UploadDownloadConfig {
41
+ localDir?: string
42
+ remoteDir?: string
43
+ [key: string]: any
44
+ }
45
+ interface MakeDirectoryConfig {
46
+ path: string
47
+ method?: 'sftp' | 'exec'
48
+ givenSftp?: SFTPWrapper
49
+ [key: string]: any
50
+ }
51
+
52
+ interface BuildConfig {
53
+ build?: boolean
54
+ mode?: string
55
+ projectDir?: string
56
+ [key: string]: any
57
+ }
58
+
59
+ export type { BuildConfig as B, IntraServerSSHClientConfig as I, MakeDirectoryConfig as M, SSHClientConfig as S, TargetSSHClientConfig as T, UploadDownloadConfig as U, BastionChannelConfig as a, BastionSSHClientConfig as b };
@@ -0,0 +1,59 @@
1
+ import { SFTPWrapper } from 'ssh2';
2
+
3
+ interface SSHClientConfig {
4
+ host?: string
5
+ port?: number | string
6
+ username?: string
7
+ password?: string
8
+ privateKey?: string
9
+ [key: string]: any
10
+ }
11
+ interface BastionSSHClientConfig extends SSHClientConfig {
12
+ [key: string]: any
13
+ }
14
+ interface TargetSSHClientConfig extends SSHClientConfig {
15
+ localDeployDir?: string
16
+ localDownloadDir?: string
17
+
18
+ remoteBackupDir?: string
19
+ remoteDir?: string
20
+ remoteDirTemp?: string
21
+
22
+ remoteHealthDir?: string
23
+ remoteHideHealthFileDir?: string
24
+ remoteHealthFile?: string
25
+ remoteHealthHiddenFile?: string
26
+ [key: string]: any
27
+ }
28
+ interface BastionChannelConfig {
29
+ srcIP?: string
30
+ srcPort?: number | string
31
+ dstIP?: string
32
+ dstPort?: number | string
33
+ [key: string]: any
34
+ }
35
+ interface IntraServerSSHClientConfig {
36
+ username?: string
37
+ password?: string
38
+ [key: string]: any
39
+ }
40
+ interface UploadDownloadConfig {
41
+ localDir?: string
42
+ remoteDir?: string
43
+ [key: string]: any
44
+ }
45
+ interface MakeDirectoryConfig {
46
+ path: string
47
+ method?: 'sftp' | 'exec'
48
+ givenSftp?: SFTPWrapper
49
+ [key: string]: any
50
+ }
51
+
52
+ interface BuildConfig {
53
+ build?: boolean
54
+ mode?: string
55
+ projectDir?: string
56
+ [key: string]: any
57
+ }
58
+
59
+ export type { BuildConfig as B, IntraServerSSHClientConfig as I, MakeDirectoryConfig as M, SSHClientConfig as S, TargetSSHClientConfig as T, UploadDownloadConfig as U, BastionChannelConfig as a, BastionSSHClientConfig as b };
@@ -0,0 +1,59 @@
1
+ import { SFTPWrapper } from 'ssh2';
2
+
3
+ interface SSHClientConfig {
4
+ host?: string
5
+ port?: number | string
6
+ username?: string
7
+ password?: string
8
+ privateKey?: string
9
+ [key: string]: any
10
+ }
11
+ interface BastionSSHClientConfig extends SSHClientConfig {
12
+ [key: string]: any
13
+ }
14
+ interface TargetSSHClientConfig extends SSHClientConfig {
15
+ localDeployDir?: string
16
+ localDownloadDir?: string
17
+
18
+ remoteBackupDir?: string
19
+ remoteDir?: string
20
+ remoteDirTemp?: string
21
+
22
+ remoteHealthDir?: string
23
+ remoteHideHealthFileDir?: string
24
+ remoteHealthFile?: string
25
+ remoteHealthHiddenFile?: string
26
+ [key: string]: any
27
+ }
28
+ interface BastionChannelConfig {
29
+ srcIP?: string
30
+ srcPort?: number | string
31
+ dstIP?: string
32
+ dstPort?: number | string
33
+ [key: string]: any
34
+ }
35
+ interface IntraServerSSHClientConfig {
36
+ username?: string
37
+ password?: string
38
+ [key: string]: any
39
+ }
40
+ interface UploadDownloadConfig {
41
+ localDir?: string
42
+ remoteDir?: string
43
+ [key: string]: any
44
+ }
45
+ interface MakeDirectoryConfig {
46
+ path: string
47
+ method?: 'sftp' | 'exec'
48
+ givenSftp?: SFTPWrapper
49
+ [key: string]: any
50
+ }
51
+
52
+ interface BuildConfig {
53
+ build?: boolean
54
+ mode?: string
55
+ projectDir?: string
56
+ [key: string]: any
57
+ }
58
+
59
+ export type { BuildConfig as B, IntraServerSSHClientConfig as I, MakeDirectoryConfig as M, SSHClientConfig as S, TargetSSHClientConfig as T, UploadDownloadConfig as U, BastionChannelConfig as a, BastionSSHClientConfig as b };
@@ -1,67 +1,64 @@
1
1
  import type { SFTPWrapper } from 'ssh2'
2
2
 
3
- export {};
4
3
 
5
- declare global {
4
+ export type Recordable<K extends string | number | symbol = string, T = any> = Record<
5
+ K extends null | undefined ? string : K,
6
+ T
7
+ >
6
8
 
7
- type Recordable<K extends string | number | symbol = string, T = any> = Record<
8
- K extends null | undefined ? string : K,
9
- T
10
- >
11
-
12
- interface SSHClientConfig {
13
- host?: string
14
- port?: number | string
15
- username?: string
16
- password?: string
17
- privateKey?: string
18
- [key: string]: any
19
- }
20
- interface BastionSSHClientConfig extends SSHClientConfig {
21
- [key: string]: any
22
- }
23
- interface TargetSSHClientConfig extends SSHClientConfig {
24
- localDeployDir?: string
25
- localDownloadDir?: string
9
+ export interface SSHClientConfig {
10
+ host?: string
11
+ port?: number | string
12
+ username?: string
13
+ password?: string
14
+ privateKey?: string
15
+ [key: string]: any
16
+ }
17
+ export interface BastionSSHClientConfig extends SSHClientConfig {
18
+ [key: string]: any
19
+ }
20
+ export interface TargetSSHClientConfig extends SSHClientConfig {
21
+ localDeployDir?: string
22
+ localDownloadDir?: string
26
23
 
27
- remoteBackupDir?: string
28
- remoteDir?: string
29
- remoteDirTemp?: string
24
+ remoteBackupDir?: string
25
+ remoteDir?: string
26
+ remoteDirTemp?: string
30
27
 
31
- remoteHealthDir?: string
32
- remoteHideHealthFileDir?: string
33
- remoteHealthFile?: string
34
- remoteHealthHiddenFile?: string
35
- [key: string]: any
36
- }
37
- interface BastionChannelConfig {
38
- srcIP?: string
39
- srcPort?: number | string
40
- dstIP?: string
41
- dstPort?: number | string
42
- [key: string]: any
43
- }
44
- interface IntraServerSSHClientConfig {
45
- username?: string
46
- password?: string
47
- [key: string]: any
48
- }
49
- interface UploadDownloadConfig {
50
- localDir?: string
51
- remoteDir?: string
52
- [key: string]: any
53
- }
54
- interface MakeDirectoryConfig {
55
- path: string
56
- method?: 'sftp' | 'exec'
57
- givenSftp?: SFTPWrapper
58
- [key: string]: any
59
- }
28
+ remoteHealthDir?: string
29
+ remoteHideHealthFileDir?: string
30
+ remoteHealthFile?: string
31
+ remoteHealthHiddenFile?: string
32
+ [key: string]: any
33
+ }
34
+ export interface BastionChannelConfig {
35
+ srcIP?: string
36
+ srcPort?: number | string
37
+ dstIP?: string
38
+ dstPort?: number | string
39
+ [key: string]: any
40
+ }
41
+ export interface IntraServerSSHClientConfig {
42
+ username?: string
43
+ password?: string
44
+ [key: string]: any
45
+ }
46
+ export interface UploadDownloadConfig {
47
+ localDir?: string
48
+ remoteDir?: string
49
+ [key: string]: any
50
+ }
51
+ export interface MakeDirectoryConfig {
52
+ path: string
53
+ method?: 'sftp' | 'exec'
54
+ givenSftp?: SFTPWrapper
55
+ [key: string]: any
56
+ }
60
57
 
61
- interface BuildConfig {
62
- build?: boolean
63
- mode?: string
64
- projectDir?: string
65
- [key: string]: any
66
- }
58
+ export interface BuildConfig {
59
+ build?: boolean
60
+ mode?: string
61
+ projectDir?: string
62
+ [key: string]: any
67
63
  }
64
+
@@ -1 +1 @@
1
- "use strict";const lodashEs=require("lodash-es"),utils_logger=require("./logger.cjs"),utils_childProcess=require("./childProcess.cjs"),{BUILD_PROJECT:g,BUILD_MODE:p,PROJECT_DIR:u,LOCAL_DEPLOY_DIR:i,LOCAL_DOWNLOAD_DIR:n,BASTION_SSH_HOST:A,BASTION_SSH_USER:d,BASTION_SSH_PASSWORD:f,BASTION_SSH_PORT:I,BASTION_SSH_PRIVATE_KEY:c,TARGET_SSH_HOST:T,TARGET_SSH_USER:S,TARGET_SSH_PASSWORD:_,TARGET_SSH_PORT:a,TARGET_SSH_PRIVATE_KEY:l,TARGET_BK_DIR:D,TARGET_DIR:H,TARGET_DIR_TEMP:s,TARGET_HEALTH_DIR:B,TARGET_HIDE_HEALTH_FILE_DIR:O,TARGET_HEALTH_FILE:P,TARGET_HEALTH_HIDDEN_FILE:L}=process.env;function getBastionConfig(e={}){return lodashEs.merge({host:A,port:I,username:d,password:f,privateKey:c},e)}function getBastionTargetConfig(e={}){return lodashEs.merge({host:T,port:a,username:S,password:_,privateKey:l,localDeployDir:i,localDownloadDir:n,remoteBackupDir:D,remoteDir:H,remoteDirTemp:s,remoteHealthDir:B,remoteHideHealthFileDir:O,remoteHealthFile:P,remoteHealthHiddenFile:L},e)}function getBastionChannelConfig(e={}){const o=getBastionTargetConfig(e);return lodashEs.merge({dstIP:o.host,dstPort:o.port},e)}function getWindowsServerTargetConfig(e={}){return lodashEs.merge({host:T,port:a,username:S,password:_,privateKey:l,localDeployDir:i,localDownloadDir:n,remoteBackupDir:D,remoteDir:H,remoteDirTemp:s},e)}function getBuildConfig(e){return lodashEs.merge({build:e.build||g==="true",mode:e.mode||p,projectDir:e.projectDir||u},e)}async function buildProject(e){const{mode:o,projectDir:r}=getBuildConfig(e),t=o?`build:${o}`:"build";utils_logger.logger.info("\u5F00\u59CB\u6253\u5305\u9879\u76EE...");const E=await utils_childProcess.execProjectPNPMCommand(r,t);return utils_logger.logger.info("\u6253\u5305\u9879\u76EE\u5B8C\u6210"),E}exports.buildProject=buildProject,exports.getBastionChannelConfig=getBastionChannelConfig,exports.getBastionConfig=getBastionConfig,exports.getBastionTargetConfig=getBastionTargetConfig,exports.getBuildConfig=getBuildConfig,exports.getWindowsServerTargetConfig=getWindowsServerTargetConfig;
1
+ "use strict";const lodashEs=require("lodash-es"),utils_logger=require("./logger.cjs"),utils_childProcess=require("./childProcess.cjs"),{BUILD_PROJECT:E,BUILD_MODE:R,PROJECT_DIR:f,LOCAL_DEPLOY_DIR:i,LOCAL_DOWNLOAD_DIR:n,BASTION_SSH_HOST:u,BASTION_SSH_USER:A,BASTION_SSH_PASSWORD:d,BASTION_SSH_PORT:B,BASTION_SSH_PRIVATE_KEY:I,TARGET_SSH_HOST:S,TARGET_SSH_USER:T,TARGET_SSH_PASSWORD:a,TARGET_SSH_PORT:_,TARGET_SSH_PRIVATE_KEY:l,TARGET_BK_DIR:C,TARGET_DIR:D,TARGET_DIR_TEMP:H,TARGET_HEALTH_DIR:c,TARGET_HIDE_HEALTH_FILE_DIR:O,TARGET_HEALTH_FILE:P,TARGET_HEALTH_HIDDEN_FILE:L}=process.env;function getBastionConfig(e={}){return lodashEs.merge({host:u,port:B,username:A,password:d,privateKey:I},e)}function getBastionTargetConfig(e={}){return lodashEs.merge({host:S,port:_,username:T,password:a,privateKey:l,localDeployDir:i,localDownloadDir:n,remoteBackupDir:C,remoteDir:D,remoteDirTemp:H,remoteHealthDir:c,remoteHideHealthFileDir:O,remoteHealthFile:P,remoteHealthHiddenFile:L},e)}function getBastionChannelConfig(e={}){const o=getBastionTargetConfig(e);return lodashEs.merge({dstIP:o.host,dstPort:o.port},e)}function getWindowsServerTargetConfig(e={}){return lodashEs.merge({host:S,port:_,username:T,password:a,privateKey:l,localDeployDir:i,localDownloadDir:n,remoteBackupDir:C,remoteDir:D,remoteDirTemp:H},e)}function getBuildConfig(e){return lodashEs.merge({build:e.build||E==="true",mode:e.mode||R,projectDir:e.projectDir||f},e)}async function buildProject(e){const{mode:o,projectDir:r}=getBuildConfig(e),t=o?`build:${o}`:"build";utils_logger.logger.info("\u5F00\u59CB\u6253\u5305\u9879\u76EE...");const s=await utils_childProcess.execProjectPNPMCommand(r,t);return utils_logger.logger.info("\u6253\u5305\u9879\u76EE\u5B8C\u6210"),s}exports.buildProject=buildProject,exports.getBastionChannelConfig=getBastionChannelConfig,exports.getBastionConfig=getBastionConfig,exports.getBastionTargetConfig=getBastionTargetConfig,exports.getBuildConfig=getBuildConfig,exports.getWindowsServerTargetConfig=getWindowsServerTargetConfig;
@@ -1,3 +1,6 @@
1
+ import { B as BuildConfig, T as TargetSSHClientConfig, a as BastionChannelConfig, b as BastionSSHClientConfig } from '../shared/ssh-deploy.BPGd0bH8.cjs';
2
+ import 'ssh2';
3
+
1
4
  /**
2
5
  * @author: ares
3
6
  * @date: 2026/1/26 上午9:38
@@ -1,3 +1,6 @@
1
+ import { B as BuildConfig, T as TargetSSHClientConfig, a as BastionChannelConfig, b as BastionSSHClientConfig } from '../shared/ssh-deploy.BPGd0bH8.mjs';
2
+ import 'ssh2';
3
+
1
4
  /**
2
5
  * @author: ares
3
6
  * @date: 2026/1/26 上午9:38
@@ -1,3 +1,6 @@
1
+ import { B as BuildConfig, T as TargetSSHClientConfig, a as BastionChannelConfig, b as BastionSSHClientConfig } from '../shared/ssh-deploy.BPGd0bH8.js';
2
+ import 'ssh2';
3
+
1
4
  /**
2
5
  * @author: ares
3
6
  * @date: 2026/1/26 上午9:38
@@ -1,4 +1,6 @@
1
1
  import { NodeSSH, SSHExecCommandResponse } from 'node-ssh';
2
+ import { B as BuildConfig, b as BastionSSHClientConfig, T as TargetSSHClientConfig, a as BastionChannelConfig } from '../shared/ssh-deploy.BPGd0bH8.cjs';
3
+ import 'ssh2';
2
4
 
3
5
  /**
4
6
  * @author: ares
@@ -1,4 +1,6 @@
1
1
  import { NodeSSH, SSHExecCommandResponse } from 'node-ssh';
2
+ import { B as BuildConfig, b as BastionSSHClientConfig, T as TargetSSHClientConfig, a as BastionChannelConfig } from '../shared/ssh-deploy.BPGd0bH8.mjs';
3
+ import 'ssh2';
2
4
 
3
5
  /**
4
6
  * @author: ares
@@ -1,4 +1,6 @@
1
1
  import { NodeSSH, SSHExecCommandResponse } from 'node-ssh';
2
+ import { B as BuildConfig, b as BastionSSHClientConfig, T as TargetSSHClientConfig, a as BastionChannelConfig } from '../shared/ssh-deploy.BPGd0bH8.js';
3
+ import 'ssh2';
2
4
 
3
5
  /**
4
6
  * @author: ares
@@ -1,4 +1,6 @@
1
1
  import { NodeSSH } from 'node-ssh';
2
+ import { B as BuildConfig, T as TargetSSHClientConfig } from '../shared/ssh-deploy.BPGd0bH8.cjs';
3
+ import 'ssh2';
2
4
 
3
5
  /**
4
6
  * @author: ares
@@ -1,4 +1,6 @@
1
1
  import { NodeSSH } from 'node-ssh';
2
+ import { B as BuildConfig, T as TargetSSHClientConfig } from '../shared/ssh-deploy.BPGd0bH8.mjs';
3
+ import 'ssh2';
2
4
 
3
5
  /**
4
6
  * @author: ares
@@ -1,4 +1,6 @@
1
1
  import { NodeSSH } from 'node-ssh';
2
+ import { B as BuildConfig, T as TargetSSHClientConfig } from '../shared/ssh-deploy.BPGd0bH8.js';
3
+ import 'ssh2';
2
4
 
3
5
  /**
4
6
  * @author: ares
@@ -1,62 +1,6 @@
1
- /// <reference types="node" />
2
1
  import { NodeSSH, SSHExecCommandResponse, SSHExecCommandOptions } from 'node-ssh';
3
- import { Duplex, Writable, Readable } from 'stream';
4
-
5
- type ChannelType = "session" | "sftp" | "direct-tcpip" | "direct-streamlocal@openssh.com";
6
-
7
- type ChannelSubType = "exec" | "shell";
8
-
9
- interface Channel extends Duplex {
10
- /** Standard input for the Channel. */
11
- stdin: this;
12
- /** Standard output for the Channel. */
13
- stdout: this;
14
- /** Standard error for the Channel. */
15
- stderr: Writable | Readable;
16
- /** Indicates whether this is a server or client channel. */
17
- server: boolean;
18
- /** The channel type, usually "session". */
19
- type: ChannelType;
20
- /** The channel subtype, usually "exec", "shell", or undefined. */
21
- subtype?: ChannelSubType;
22
- incoming: unknown;
23
- outgoing: unknown;
24
-
25
- /**
26
- * Sends EOF to the remote side.
27
- */
28
- eof(): void;
29
-
30
- /**
31
- * Closes the channel on both sides.
32
- */
33
- close(...args: any[]): void;
34
-
35
- /**
36
- * Shuts down the channel on this side.
37
- */
38
- destroy(): this;
39
-
40
- /**
41
- * Session type-specific methods
42
- */
43
- setWindow(rows: number, cols: number, height: number, width: number): void;
44
- signal(signalName: string): void;
45
- exit(status: number): void;
46
- exit(signalName: string, coreDumped?: boolean, msg?: string): void;
47
-
48
- /**
49
- * Emitted once the channel is completely closed on both the client and the server.
50
- */
51
- on(event: "close", listener: () => void): this;
52
- on(event: "eof", listener: () => void): this;
53
- on(event: "end", listener: () => void): this;
54
- on(event: string | symbol, listener: Function): this;
55
- once(event: "close", listener: () => void): this;
56
- once(event: "eof", listener: () => void): this;
57
- once(event: "end", listener: () => void): this;
58
- once(event: string | symbol, listener: Function): this;
59
- }
2
+ import { Channel } from 'ssh2';
3
+ import { a as BastionChannelConfig, I as IntraServerSSHClientConfig, S as SSHClientConfig, U as UploadDownloadConfig, M as MakeDirectoryConfig } from '../shared/ssh-deploy.BPGd0bH8.cjs';
60
4
 
61
5
  /**
62
6
  * @author: ares
@@ -1,62 +1,6 @@
1
- /// <reference types="node" />
2
1
  import { NodeSSH, SSHExecCommandResponse, SSHExecCommandOptions } from 'node-ssh';
3
- import { Duplex, Writable, Readable } from 'stream';
4
-
5
- type ChannelType = "session" | "sftp" | "direct-tcpip" | "direct-streamlocal@openssh.com";
6
-
7
- type ChannelSubType = "exec" | "shell";
8
-
9
- interface Channel extends Duplex {
10
- /** Standard input for the Channel. */
11
- stdin: this;
12
- /** Standard output for the Channel. */
13
- stdout: this;
14
- /** Standard error for the Channel. */
15
- stderr: Writable | Readable;
16
- /** Indicates whether this is a server or client channel. */
17
- server: boolean;
18
- /** The channel type, usually "session". */
19
- type: ChannelType;
20
- /** The channel subtype, usually "exec", "shell", or undefined. */
21
- subtype?: ChannelSubType;
22
- incoming: unknown;
23
- outgoing: unknown;
24
-
25
- /**
26
- * Sends EOF to the remote side.
27
- */
28
- eof(): void;
29
-
30
- /**
31
- * Closes the channel on both sides.
32
- */
33
- close(...args: any[]): void;
34
-
35
- /**
36
- * Shuts down the channel on this side.
37
- */
38
- destroy(): this;
39
-
40
- /**
41
- * Session type-specific methods
42
- */
43
- setWindow(rows: number, cols: number, height: number, width: number): void;
44
- signal(signalName: string): void;
45
- exit(status: number): void;
46
- exit(signalName: string, coreDumped?: boolean, msg?: string): void;
47
-
48
- /**
49
- * Emitted once the channel is completely closed on both the client and the server.
50
- */
51
- on(event: "close", listener: () => void): this;
52
- on(event: "eof", listener: () => void): this;
53
- on(event: "end", listener: () => void): this;
54
- on(event: string | symbol, listener: Function): this;
55
- once(event: "close", listener: () => void): this;
56
- once(event: "eof", listener: () => void): this;
57
- once(event: "end", listener: () => void): this;
58
- once(event: string | symbol, listener: Function): this;
59
- }
2
+ import { Channel } from 'ssh2';
3
+ import { a as BastionChannelConfig, I as IntraServerSSHClientConfig, S as SSHClientConfig, U as UploadDownloadConfig, M as MakeDirectoryConfig } from '../shared/ssh-deploy.BPGd0bH8.mjs';
60
4
 
61
5
  /**
62
6
  * @author: ares
@@ -1,62 +1,6 @@
1
- /// <reference types="node" />
2
1
  import { NodeSSH, SSHExecCommandResponse, SSHExecCommandOptions } from 'node-ssh';
3
- import { Duplex, Writable, Readable } from 'stream';
4
-
5
- type ChannelType = "session" | "sftp" | "direct-tcpip" | "direct-streamlocal@openssh.com";
6
-
7
- type ChannelSubType = "exec" | "shell";
8
-
9
- interface Channel extends Duplex {
10
- /** Standard input for the Channel. */
11
- stdin: this;
12
- /** Standard output for the Channel. */
13
- stdout: this;
14
- /** Standard error for the Channel. */
15
- stderr: Writable | Readable;
16
- /** Indicates whether this is a server or client channel. */
17
- server: boolean;
18
- /** The channel type, usually "session". */
19
- type: ChannelType;
20
- /** The channel subtype, usually "exec", "shell", or undefined. */
21
- subtype?: ChannelSubType;
22
- incoming: unknown;
23
- outgoing: unknown;
24
-
25
- /**
26
- * Sends EOF to the remote side.
27
- */
28
- eof(): void;
29
-
30
- /**
31
- * Closes the channel on both sides.
32
- */
33
- close(...args: any[]): void;
34
-
35
- /**
36
- * Shuts down the channel on this side.
37
- */
38
- destroy(): this;
39
-
40
- /**
41
- * Session type-specific methods
42
- */
43
- setWindow(rows: number, cols: number, height: number, width: number): void;
44
- signal(signalName: string): void;
45
- exit(status: number): void;
46
- exit(signalName: string, coreDumped?: boolean, msg?: string): void;
47
-
48
- /**
49
- * Emitted once the channel is completely closed on both the client and the server.
50
- */
51
- on(event: "close", listener: () => void): this;
52
- on(event: "eof", listener: () => void): this;
53
- on(event: "end", listener: () => void): this;
54
- on(event: string | symbol, listener: Function): this;
55
- once(event: "close", listener: () => void): this;
56
- once(event: "eof", listener: () => void): this;
57
- once(event: "end", listener: () => void): this;
58
- once(event: string | symbol, listener: Function): this;
59
- }
2
+ import { Channel } from 'ssh2';
3
+ import { a as BastionChannelConfig, I as IntraServerSSHClientConfig, S as SSHClientConfig, U as UploadDownloadConfig, M as MakeDirectoryConfig } from '../shared/ssh-deploy.BPGd0bH8.js';
60
4
 
61
5
  /**
62
6
  * @author: ares
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "ares-ssh-deploy",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "ssh deploy tools",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
- "types": "./dist/types/index.d.ts",
7
+ "types": "./dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.mjs",
12
12
  "require": "./dist/index.cjs"
13
13
  },
14
- "./utils/*": "./dist/utils/*"
14
+ "./utils/*": "./dist/utils/*",
15
+ "./types": "././dist/types/index.d.ts"
15
16
  },
16
17
  "scripts": {
17
18
  "deploy:windows-server": "dotenvx run --env-file=.env.windows-server -- node src/utils/deploy-windows-server.js",