@truenas/api-client 7.0.0 → 7.0.1
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 +31 -0
- package/dist/{chunk-QJRF5DK4.cjs → chunk-JVFS4GW2.cjs} +135 -54
- package/dist/chunk-JVFS4GW2.cjs.map +1 -0
- package/dist/{chunk-SAJ5HZHK.js → chunk-NXXESRJ6.js} +135 -56
- package/dist/chunk-NXXESRJ6.js.map +1 -0
- package/dist/index.cjs +36 -36
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/testing/index.cjs +21 -12
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +4 -3
- package/dist/testing/index.d.ts +4 -3
- package/dist/testing/index.js +13 -4
- package/dist/testing/index.js.map +1 -1
- package/dist/{truenas-auth-mechanism.enum-CHo_zr2p.d.cts → truenas-auth-mechanism.enum-VwmwFzX1.d.cts} +102 -29
- package/dist/{truenas-auth-mechanism.enum-CHo_zr2p.d.ts → truenas-auth-mechanism.enum-VwmwFzX1.d.ts} +102 -29
- package/package.json +1 -1
- package/dist/chunk-QJRF5DK4.cjs.map +0 -1
- package/dist/chunk-SAJ5HZHK.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,148 +1,148 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJVFS4GW2_cjs = require('./chunk-JVFS4GW2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "AppState", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkJVFS4GW2_cjs.AppState; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "AuthError", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkJVFS4GW2_cjs.AuthError; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "AuthErrorCode", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkJVFS4GW2_cjs.AuthErrorCode; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "AuthResponseType", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkJVFS4GW2_cjs.AuthResponseType; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "InvalidVersionResponseError", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkJVFS4GW2_cjs.InvalidVersionResponseError; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "JobState", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkJVFS4GW2_cjs.JobState; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "NoCompatibleVersionsError", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkJVFS4GW2_cjs.NoCompatibleVersionsError; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "SUPPORTED_API_VERSIONS", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkJVFS4GW2_cjs.SUPPORTED_API_VERSIONS; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "TrueNasApiClient", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkJVFS4GW2_cjs.TrueNasApiClient; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "TrueNasApiClientV2510", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkJVFS4GW2_cjs.TrueNasApiClientV2510; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "TrueNasApiClientV26", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkJVFS4GW2_cjs.TrueNasApiClientV26; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "TrueNasApiClientV27", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkJVFS4GW2_cjs.TrueNasApiClientV27; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "TrueNasAuthMechanism", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkJVFS4GW2_cjs.TrueNasAuthMechanism; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "UserRole", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkJVFS4GW2_cjs.UserRole; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "VersionCompatibility", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkJVFS4GW2_cjs.VersionCompatibility; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "VersionDiscovery", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkJVFS4GW2_cjs.VersionDiscovery; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "VersionDiscoveryError", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkJVFS4GW2_cjs.VersionDiscoveryError; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "VersionDiscoveryNetworkError", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkJVFS4GW2_cjs.VersionDiscoveryNetworkError; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "VersionDiscoveryTimeoutError", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkJVFS4GW2_cjs.VersionDiscoveryTimeoutError; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "VersionEndpointNotFoundError", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkJVFS4GW2_cjs.VersionEndpointNotFoundError; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "VersionTooNewError", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkJVFS4GW2_cjs.VersionTooNewError; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "VersionTooOldError", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkJVFS4GW2_cjs.VersionTooOldError; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "consoleLogger", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkJVFS4GW2_cjs.consoleLogger; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "createTrueNasClient", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkJVFS4GW2_cjs.createTrueNasClient; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "getApiErrorMessage", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkJVFS4GW2_cjs.getApiErrorMessage; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "isJobFinished", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkJVFS4GW2_cjs.isJobFinished; }
|
|
110
110
|
});
|
|
111
111
|
Object.defineProperty(exports, "noopLogger", {
|
|
112
112
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunkJVFS4GW2_cjs.noopLogger; }
|
|
114
114
|
});
|
|
115
115
|
Object.defineProperty(exports, "v25_10_0", {
|
|
116
116
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkJVFS4GW2_cjs.v25_10_0_exports; }
|
|
118
118
|
});
|
|
119
119
|
Object.defineProperty(exports, "v25_10_1", {
|
|
120
120
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkJVFS4GW2_cjs.v25_10_1_exports; }
|
|
122
122
|
});
|
|
123
123
|
Object.defineProperty(exports, "v25_10_2", {
|
|
124
124
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkJVFS4GW2_cjs.v25_10_2_exports; }
|
|
126
126
|
});
|
|
127
127
|
Object.defineProperty(exports, "v25_10_3", {
|
|
128
128
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkJVFS4GW2_cjs.v25_10_3_exports; }
|
|
130
130
|
});
|
|
131
131
|
Object.defineProperty(exports, "v25_10_4", {
|
|
132
132
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkJVFS4GW2_cjs.v25_10_4_exports; }
|
|
134
134
|
});
|
|
135
135
|
Object.defineProperty(exports, "v25_10_5", {
|
|
136
136
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkJVFS4GW2_cjs.v25_10_5_exports; }
|
|
138
138
|
});
|
|
139
139
|
Object.defineProperty(exports, "v26_0_0", {
|
|
140
140
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkJVFS4GW2_cjs.v26_0_0_exports; }
|
|
142
142
|
});
|
|
143
143
|
Object.defineProperty(exports, "v27_0_0", {
|
|
144
144
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkJVFS4GW2_cjs.v27_0_0_exports; }
|
|
146
146
|
});
|
|
147
147
|
//# sourceMappingURL=index.cjs.map
|
|
148
148
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TrueNasApiClient, A as ApiDirectory, O as OperationMappings, a as ApiDirectory$1, b as ApiDirectory$2, L as Logger, c as ApplianceProtocol, d as ApiVersion } from './truenas-auth-mechanism.enum-
|
|
2
|
-
export { e as ApiCallDirectoryV25_10_0, f as ApiCallDirectoryV25_10_1, g as ApiCallDirectoryV25_10_2, h as ApiCallDirectoryV25_10_3, i as ApiCallDirectoryV25_10_4, j as ApiCallDirectoryV25_10_5, k as ApiCallDirectoryV26_0_0, l as ApiCallDirectoryV27_0_0, m as ApiDirectoryByVersion, n as ApiDirectoryShape, o as ApiDirectoryV25_10_1, p as ApiDirectoryV25_10_2, q as ApiDirectoryV25_10_3, r as ApiDirectoryV25_10_4, s as ApiDirectoryV25_10_5, t as ApiError, u as ApiEventDirectoryV25_10_0, v as ApiEventDirectoryV25_10_1, w as ApiEventDirectoryV25_10_2, x as ApiEventDirectoryV25_10_3, y as ApiEventDirectoryV25_10_4, z as ApiEventDirectoryV25_10_5, B as ApiEventDirectoryV26_0_0, C as ApiEventDirectoryV27_0_0, D as ApiJobDirectoryV25_10_0, E as ApiJobDirectoryV25_10_1, F as ApiJobDirectoryV25_10_2, G as ApiJobDirectoryV25_10_3, H as ApiJobDirectoryV25_10_4, I as ApiJobDirectoryV25_10_5, J as ApiJobDirectoryV26_0_0, K as ApiJobDirectoryV27_0_0, M as ApiKeyCreate, N as ApiVersionResponse, P as AppState, Q as ArgsOf, R as AuthResponse, S as AuthResponseType, U as BaseApiDirectory, V as CallMethod, W as CallParams, X as CallResponse, Y as
|
|
1
|
+
import { T as TrueNasApiClient, A as ApiDirectory, O as OperationMappings, a as ApiDirectory$1, b as ApiDirectory$2, L as Logger, c as ApplianceProtocol, d as ApiVersion } from './truenas-auth-mechanism.enum-VwmwFzX1.cjs';
|
|
2
|
+
export { e as ApiCallDirectoryV25_10_0, f as ApiCallDirectoryV25_10_1, g as ApiCallDirectoryV25_10_2, h as ApiCallDirectoryV25_10_3, i as ApiCallDirectoryV25_10_4, j as ApiCallDirectoryV25_10_5, k as ApiCallDirectoryV26_0_0, l as ApiCallDirectoryV27_0_0, m as ApiDirectoryByVersion, n as ApiDirectoryShape, o as ApiDirectoryV25_10_1, p as ApiDirectoryV25_10_2, q as ApiDirectoryV25_10_3, r as ApiDirectoryV25_10_4, s as ApiDirectoryV25_10_5, t as ApiError, u as ApiEventDirectoryV25_10_0, v as ApiEventDirectoryV25_10_1, w as ApiEventDirectoryV25_10_2, x as ApiEventDirectoryV25_10_3, y as ApiEventDirectoryV25_10_4, z as ApiEventDirectoryV25_10_5, B as ApiEventDirectoryV26_0_0, C as ApiEventDirectoryV27_0_0, D as ApiJobDirectoryV25_10_0, E as ApiJobDirectoryV25_10_1, F as ApiJobDirectoryV25_10_2, G as ApiJobDirectoryV25_10_3, H as ApiJobDirectoryV25_10_4, I as ApiJobDirectoryV25_10_5, J as ApiJobDirectoryV26_0_0, K as ApiJobDirectoryV27_0_0, M as ApiKeyCreate, N as ApiVersionResponse, P as AppState, Q as ArgsOf, R as AuthResponse, S as AuthResponseType, U as BaseApiDirectory, V as CallMethod, W as CallParams, X as CallResponse, Y as ConnectionClose, Z as ConnectionEndpoint, _ as Container, $ as CreateClientOptions, a0 as DefaultApiDirectory, a1 as EventKind, a2 as EventName, a3 as EventUnion, a4 as Job, a5 as JobMethod, a6 as JobParams, a7 as JobProgress, a8 as JobResult, a9 as JobState, aa as QueryDirectory, ab as QueryEntity, ac as QueryListOptions, ad as QueryMethod, ae as QuerySingleOptions, af as ReconnectOptions, ag as SUPPORTED_API_VERSIONS, ah as SmbStatusInfoLevel, ai as SmbStatusOptions, aj as SmbStatusRequest, ak as SmbStatusResponse, al as SmbStatusRow, am as SupportedApiVersion, an as TrueNasAuthMechanism, ao as TrueNasDate, ap as TrueNasErrorData, aq as TrueNasErrorFrame, ar as UserRole, as as UserRoleName, at as VersionCompatibility, au as consoleLogger, av as createTrueNasClient, aw as getApiErrorMessage, ax as isJobFinished, ay as noopLogger, az as v25_10_0, aA as v25_10_1, aB as v25_10_2, aC as v25_10_3, aD as v25_10_4, aE as v25_10_5, aF as v26_0_0, aG as v27_0_0 } from './truenas-auth-mechanism.enum-VwmwFzX1.cjs';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import 'rxjs/webSocket';
|
|
5
5
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TrueNasApiClient, A as ApiDirectory, O as OperationMappings, a as ApiDirectory$1, b as ApiDirectory$2, L as Logger, c as ApplianceProtocol, d as ApiVersion } from './truenas-auth-mechanism.enum-
|
|
2
|
-
export { e as ApiCallDirectoryV25_10_0, f as ApiCallDirectoryV25_10_1, g as ApiCallDirectoryV25_10_2, h as ApiCallDirectoryV25_10_3, i as ApiCallDirectoryV25_10_4, j as ApiCallDirectoryV25_10_5, k as ApiCallDirectoryV26_0_0, l as ApiCallDirectoryV27_0_0, m as ApiDirectoryByVersion, n as ApiDirectoryShape, o as ApiDirectoryV25_10_1, p as ApiDirectoryV25_10_2, q as ApiDirectoryV25_10_3, r as ApiDirectoryV25_10_4, s as ApiDirectoryV25_10_5, t as ApiError, u as ApiEventDirectoryV25_10_0, v as ApiEventDirectoryV25_10_1, w as ApiEventDirectoryV25_10_2, x as ApiEventDirectoryV25_10_3, y as ApiEventDirectoryV25_10_4, z as ApiEventDirectoryV25_10_5, B as ApiEventDirectoryV26_0_0, C as ApiEventDirectoryV27_0_0, D as ApiJobDirectoryV25_10_0, E as ApiJobDirectoryV25_10_1, F as ApiJobDirectoryV25_10_2, G as ApiJobDirectoryV25_10_3, H as ApiJobDirectoryV25_10_4, I as ApiJobDirectoryV25_10_5, J as ApiJobDirectoryV26_0_0, K as ApiJobDirectoryV27_0_0, M as ApiKeyCreate, N as ApiVersionResponse, P as AppState, Q as ArgsOf, R as AuthResponse, S as AuthResponseType, U as BaseApiDirectory, V as CallMethod, W as CallParams, X as CallResponse, Y as
|
|
1
|
+
import { T as TrueNasApiClient, A as ApiDirectory, O as OperationMappings, a as ApiDirectory$1, b as ApiDirectory$2, L as Logger, c as ApplianceProtocol, d as ApiVersion } from './truenas-auth-mechanism.enum-VwmwFzX1.js';
|
|
2
|
+
export { e as ApiCallDirectoryV25_10_0, f as ApiCallDirectoryV25_10_1, g as ApiCallDirectoryV25_10_2, h as ApiCallDirectoryV25_10_3, i as ApiCallDirectoryV25_10_4, j as ApiCallDirectoryV25_10_5, k as ApiCallDirectoryV26_0_0, l as ApiCallDirectoryV27_0_0, m as ApiDirectoryByVersion, n as ApiDirectoryShape, o as ApiDirectoryV25_10_1, p as ApiDirectoryV25_10_2, q as ApiDirectoryV25_10_3, r as ApiDirectoryV25_10_4, s as ApiDirectoryV25_10_5, t as ApiError, u as ApiEventDirectoryV25_10_0, v as ApiEventDirectoryV25_10_1, w as ApiEventDirectoryV25_10_2, x as ApiEventDirectoryV25_10_3, y as ApiEventDirectoryV25_10_4, z as ApiEventDirectoryV25_10_5, B as ApiEventDirectoryV26_0_0, C as ApiEventDirectoryV27_0_0, D as ApiJobDirectoryV25_10_0, E as ApiJobDirectoryV25_10_1, F as ApiJobDirectoryV25_10_2, G as ApiJobDirectoryV25_10_3, H as ApiJobDirectoryV25_10_4, I as ApiJobDirectoryV25_10_5, J as ApiJobDirectoryV26_0_0, K as ApiJobDirectoryV27_0_0, M as ApiKeyCreate, N as ApiVersionResponse, P as AppState, Q as ArgsOf, R as AuthResponse, S as AuthResponseType, U as BaseApiDirectory, V as CallMethod, W as CallParams, X as CallResponse, Y as ConnectionClose, Z as ConnectionEndpoint, _ as Container, $ as CreateClientOptions, a0 as DefaultApiDirectory, a1 as EventKind, a2 as EventName, a3 as EventUnion, a4 as Job, a5 as JobMethod, a6 as JobParams, a7 as JobProgress, a8 as JobResult, a9 as JobState, aa as QueryDirectory, ab as QueryEntity, ac as QueryListOptions, ad as QueryMethod, ae as QuerySingleOptions, af as ReconnectOptions, ag as SUPPORTED_API_VERSIONS, ah as SmbStatusInfoLevel, ai as SmbStatusOptions, aj as SmbStatusRequest, ak as SmbStatusResponse, al as SmbStatusRow, am as SupportedApiVersion, an as TrueNasAuthMechanism, ao as TrueNasDate, ap as TrueNasErrorData, aq as TrueNasErrorFrame, ar as UserRole, as as UserRoleName, at as VersionCompatibility, au as consoleLogger, av as createTrueNasClient, aw as getApiErrorMessage, ax as isJobFinished, ay as noopLogger, az as v25_10_0, aA as v25_10_1, aB as v25_10_2, aC as v25_10_3, aD as v25_10_4, aE as v25_10_5, aF as v26_0_0, aG as v27_0_0 } from './truenas-auth-mechanism.enum-VwmwFzX1.js';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import 'rxjs/webSocket';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AppState, AuthError, AuthErrorCode, AuthResponseType, InvalidVersionResponseError, JobState, NoCompatibleVersionsError, SUPPORTED_API_VERSIONS, TrueNasApiClient, TrueNasApiClientV2510, TrueNasApiClientV26, TrueNasApiClientV27, TrueNasAuthMechanism, UserRole, VersionCompatibility, VersionDiscovery, VersionDiscoveryError, VersionDiscoveryNetworkError, VersionDiscoveryTimeoutError, VersionEndpointNotFoundError, VersionTooNewError, VersionTooOldError, consoleLogger, createTrueNasClient, getApiErrorMessage, isJobFinished, noopLogger, v25_10_0_exports as v25_10_0, v25_10_1_exports as v25_10_1, v25_10_2_exports as v25_10_2, v25_10_3_exports as v25_10_3, v25_10_4_exports as v25_10_4, v25_10_5_exports as v25_10_5, v26_0_0_exports as v26_0_0, v27_0_0_exports as v27_0_0 } from './chunk-
|
|
1
|
+
export { AppState, AuthError, AuthErrorCode, AuthResponseType, InvalidVersionResponseError, JobState, NoCompatibleVersionsError, SUPPORTED_API_VERSIONS, TrueNasApiClient, TrueNasApiClientV2510, TrueNasApiClientV26, TrueNasApiClientV27, TrueNasAuthMechanism, UserRole, VersionCompatibility, VersionDiscovery, VersionDiscoveryError, VersionDiscoveryNetworkError, VersionDiscoveryTimeoutError, VersionEndpointNotFoundError, VersionTooNewError, VersionTooOldError, consoleLogger, createTrueNasClient, getApiErrorMessage, isJobFinished, noopLogger, v25_10_0_exports as v25_10_0, v25_10_1_exports as v25_10_1, v25_10_2_exports as v25_10_2, v25_10_3_exports as v25_10_3, v25_10_4_exports as v25_10_4, v25_10_5_exports as v25_10_5, v26_0_0_exports as v26_0_0, v27_0_0_exports as v27_0_0 } from './chunk-NXXESRJ6.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/testing/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJVFS4GW2_cjs = require('../chunk-JVFS4GW2.cjs');
|
|
4
4
|
var rxjs = require('rxjs');
|
|
5
5
|
|
|
6
6
|
// src/testing/unmocked-call-error.ts
|
|
@@ -17,7 +17,7 @@ var UnmockedCallError = class extends Error {
|
|
|
17
17
|
|
|
18
18
|
// src/testing/fake-connection.ts
|
|
19
19
|
var CLIENT_HOUSEKEEPING = /* @__PURE__ */ new Set(["core.subscribe"]);
|
|
20
|
-
var FakeConnection = class extends
|
|
20
|
+
var FakeConnection = class extends chunkJVFS4GW2_cjs.TrueNasConnection {
|
|
21
21
|
constructor(options = {}) {
|
|
22
22
|
super(
|
|
23
23
|
// Disabled: `connection$` derives from this, so no socket is ever built
|
|
@@ -29,7 +29,7 @@ var FakeConnection = class extends chunkQJRF5DK4_cjs.TrueNasConnection {
|
|
|
29
29
|
void 0,
|
|
30
30
|
0,
|
|
31
31
|
0,
|
|
32
|
-
|
|
32
|
+
chunkJVFS4GW2_cjs.noopLogger
|
|
33
33
|
);
|
|
34
34
|
this.incoming = new rxjs.Subject();
|
|
35
35
|
this.frames = [];
|
|
@@ -166,16 +166,25 @@ var FakeConnection = class extends chunkQJRF5DK4_cjs.TrueNasConnection {
|
|
|
166
166
|
for (const message of pending) this.write(message);
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
|
-
* Lower `opened` and
|
|
169
|
+
* Lower `opened`, fire `closed` and report the close on `closes$`, as a live
|
|
170
|
+
* socket closing with `code` would. 1008 is the appliance refusing the client.
|
|
170
171
|
*
|
|
171
172
|
* Named for what it simulates rather than overriding `close()`, which on the
|
|
172
173
|
* real connection means "stop, and do not retry" — a different verb that
|
|
173
174
|
* callers already use for teardown.
|
|
174
175
|
*/
|
|
175
|
-
simulateClose() {
|
|
176
|
+
simulateClose(code = 1006, reason = "") {
|
|
176
177
|
if (this.terminated || !this.opened.getValue()) return;
|
|
177
178
|
this.opened.next(false);
|
|
178
179
|
this.closed.next();
|
|
180
|
+
this.closesSubject.next({
|
|
181
|
+
code,
|
|
182
|
+
reason,
|
|
183
|
+
message: chunkJVFS4GW2_cjs.getCloseMessage(code, reason),
|
|
184
|
+
hostname: this.endpoint.hostnames[0] ?? "",
|
|
185
|
+
wasOpen: true,
|
|
186
|
+
refused: code === chunkJVFS4GW2_cjs.policyViolationCloseCode
|
|
187
|
+
});
|
|
179
188
|
}
|
|
180
189
|
/**
|
|
181
190
|
* Terminal, as on the real connection: the streams end and nothing more is
|
|
@@ -203,7 +212,7 @@ var FakeConnection = class extends chunkQJRF5DK4_cjs.TrueNasConnection {
|
|
|
203
212
|
};
|
|
204
213
|
|
|
205
214
|
// src/testing/fake-authenticator.ts
|
|
206
|
-
var FakeAuthenticator = class extends
|
|
215
|
+
var FakeAuthenticator = class extends chunkJVFS4GW2_cjs.TrueNasAuthenticator {
|
|
207
216
|
constructor(fakeConnection, version) {
|
|
208
217
|
super(fakeConnection, version);
|
|
209
218
|
this.fakeConnection = fakeConnection;
|
|
@@ -553,12 +562,12 @@ function withFakeCollaborators(Base, options) {
|
|
|
553
562
|
};
|
|
554
563
|
}
|
|
555
564
|
function createFakeClient(options = {}) {
|
|
556
|
-
const versionString = options.version ??
|
|
557
|
-
const version =
|
|
565
|
+
const versionString = options.version ?? chunkJVFS4GW2_cjs.SUPPORTED_API_VERSIONS[0];
|
|
566
|
+
const version = chunkJVFS4GW2_cjs.parseApiVersion(versionString);
|
|
558
567
|
if (!version) {
|
|
559
568
|
throw new Error(`'${versionString}' is not a version this package parses.`);
|
|
560
569
|
}
|
|
561
|
-
const Base =
|
|
570
|
+
const Base = chunkJVFS4GW2_cjs.clientClassFor(version);
|
|
562
571
|
if (!Base) {
|
|
563
572
|
throw new Error(
|
|
564
573
|
`No client implementation for '${versionString}'. The real factory would have refused it too.`
|
|
@@ -644,8 +653,8 @@ function withSpies(client, spy) {
|
|
|
644
653
|
}
|
|
645
654
|
|
|
646
655
|
// src/testing/fake-api-version.ts
|
|
647
|
-
function fakeApiVersion(version =
|
|
648
|
-
const parsed =
|
|
656
|
+
function fakeApiVersion(version = chunkJVFS4GW2_cjs.SUPPORTED_API_VERSIONS[0], overrides = {}) {
|
|
657
|
+
const parsed = chunkJVFS4GW2_cjs.parseApiVersion(version);
|
|
649
658
|
if (!parsed) {
|
|
650
659
|
throw new Error(
|
|
651
660
|
`fakeApiVersion('${version}'): not a version this package parses. Expected vYY.MINOR.PATCH \u2014 v25.10.0, v27.0.0. For a version the parser rejects, pass one it accepts and override its fields.`
|
|
@@ -714,7 +723,7 @@ function fakeAuthResponse(overrides = {}) {
|
|
|
714
723
|
|
|
715
724
|
Object.defineProperty(exports, "AuthResponseType", {
|
|
716
725
|
enumerable: true,
|
|
717
|
-
get: function () { return
|
|
726
|
+
get: function () { return chunkJVFS4GW2_cjs.AuthResponseType; }
|
|
718
727
|
});
|
|
719
728
|
exports.FakeAuthenticator = FakeAuthenticator;
|
|
720
729
|
exports.FakeConnection = FakeConnection;
|