@truenas/api-client 2.0.1 → 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/dist/index.cjs +39 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +421 -350
- package/dist/index.d.ts +421 -350
- package/dist/index.js +39 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2519,7 +2519,6 @@ __export(v26_0_0_exports, {
|
|
|
2519
2519
|
Aclmode: () => Aclmode,
|
|
2520
2520
|
Acltype: () => Acltype,
|
|
2521
2521
|
Advpowermgmt: () => Advpowermgmt,
|
|
2522
|
-
Algorithm: () => Algorithm,
|
|
2523
2522
|
AppContainerDetailsState: () => AppContainerDetailsState,
|
|
2524
2523
|
AppContainerDetailsStateInput: () => AppContainerDetailsStateInput,
|
|
2525
2524
|
Atime: () => Atime,
|
|
@@ -2657,11 +2656,13 @@ var ContainerNICDeviceTypeInput = {
|
|
|
2657
2656
|
};
|
|
2658
2657
|
var ContainerStatusState = {
|
|
2659
2658
|
Running: "RUNNING",
|
|
2660
|
-
Stopped: "STOPPED"
|
|
2659
|
+
Stopped: "STOPPED",
|
|
2660
|
+
Suspended: "SUSPENDED"
|
|
2661
2661
|
};
|
|
2662
2662
|
var ContainerStatusStateInput = {
|
|
2663
2663
|
Running: "RUNNING",
|
|
2664
|
-
Stopped: "STOPPED"
|
|
2664
|
+
Stopped: "STOPPED",
|
|
2665
|
+
Suspended: "SUSPENDED"
|
|
2665
2666
|
};
|
|
2666
2667
|
var Feature2 = {
|
|
2667
2668
|
Apps: "APPS",
|
|
@@ -2741,7 +2742,6 @@ __export(v27_0_0_exports, {
|
|
|
2741
2742
|
Aclmode: () => Aclmode,
|
|
2742
2743
|
Acltype: () => Acltype,
|
|
2743
2744
|
Advpowermgmt: () => Advpowermgmt,
|
|
2744
|
-
Algorithm: () => Algorithm,
|
|
2745
2745
|
AppContainerDetailsState: () => AppContainerDetailsState,
|
|
2746
2746
|
AppContainerDetailsStateInput: () => AppContainerDetailsStateInput,
|
|
2747
2747
|
Atime: () => Atime,
|
|
@@ -3064,6 +3064,10 @@ var AppState = /* @__PURE__ */ ((AppState2) => {
|
|
|
3064
3064
|
AppState2["Stopped"] = "STOPPED";
|
|
3065
3065
|
AppState2["Stopping"] = "STOPPING";
|
|
3066
3066
|
AppState2["Deploying"] = "DEPLOYING";
|
|
3067
|
+
AppState2["Suspended"] = "SUSPENDED";
|
|
3068
|
+
AppState2["Suspending"] = "SUSPENDING";
|
|
3069
|
+
AppState2["Error"] = "ERROR";
|
|
3070
|
+
AppState2["Unknown"] = "UNKNOWN";
|
|
3067
3071
|
return AppState2;
|
|
3068
3072
|
})(AppState || {});
|
|
3069
3073
|
|
|
@@ -3074,7 +3078,10 @@ function toAppState(state) {
|
|
|
3074
3078
|
return "RUNNING" /* Running */;
|
|
3075
3079
|
case "STOPPED":
|
|
3076
3080
|
return "STOPPED" /* Stopped */;
|
|
3081
|
+
// `ABORTING` is v25.10 only: the instance is being forced down, which ends
|
|
3082
|
+
// at `STOPPED` and is what `Stopping` already means.
|
|
3077
3083
|
case "STOPPING":
|
|
3084
|
+
case "ABORTING":
|
|
3078
3085
|
return "STOPPING" /* Stopping */;
|
|
3079
3086
|
// `STARTING` is v25.10 `virt.instance` only, and folding it into `Stopped`
|
|
3080
3087
|
// told callers a container that is coming up is at rest — enough for a UI
|
|
@@ -3083,8 +3090,35 @@ function toAppState(state) {
|
|
|
3083
3090
|
case "STARTING":
|
|
3084
3091
|
case "DEPLOYING":
|
|
3085
3092
|
return "DEPLOYING" /* Deploying */;
|
|
3093
|
+
// v25.10's freezer states are the same idea as v26's `SUSPENDED`: the
|
|
3094
|
+
// processes are paused, not exited. `FROZEN` is that pause completed, so it
|
|
3095
|
+
// and `SUSPENDED` are the same answer.
|
|
3096
|
+
case "SUSPENDED":
|
|
3097
|
+
case "FROZEN":
|
|
3098
|
+
return "SUSPENDED" /* Suspended */;
|
|
3099
|
+
// `FREEZING` is on the way there and not there yet. It used to answer
|
|
3100
|
+
// `Suspended`, defended by analogy with `STARTING` — but `STARTING` maps to
|
|
3101
|
+
// `Deploying`, which is itself an in-progress word, so the analogy ran the
|
|
3102
|
+
// wrong way. Answering `Suspended` tells a caller polling for "the memory
|
|
3103
|
+
// is quiesced" that it is, one poll before it is true: the same false
|
|
3104
|
+
// claim this mapping was rewritten to stop making, one state along.
|
|
3105
|
+
// `ABORTING` had `Stopping` to land on; the freeze path needed its own.
|
|
3106
|
+
case "FREEZING":
|
|
3107
|
+
return "SUSPENDING" /* Suspending */;
|
|
3108
|
+
// `THAWED` is the freezer lifted: the processes are scheduled again, so
|
|
3109
|
+
// this is `RUNNING` reported through the transition rather than a state a
|
|
3110
|
+
// caller should act on differently.
|
|
3111
|
+
case "THAWED":
|
|
3112
|
+
return "RUNNING" /* Running */;
|
|
3113
|
+
case "ERROR":
|
|
3114
|
+
return "ERROR" /* Error */;
|
|
3115
|
+
// `UNKNOWN` is middleware's own word for it, and anything unrecognised is
|
|
3116
|
+
// the same situation: a state this mapping has no word for. Neither is
|
|
3117
|
+
// evidence the container is stopped.
|
|
3118
|
+
case "UNKNOWN":
|
|
3119
|
+
return "UNKNOWN" /* Unknown */;
|
|
3086
3120
|
default:
|
|
3087
|
-
return "
|
|
3121
|
+
return "UNKNOWN" /* Unknown */;
|
|
3088
3122
|
}
|
|
3089
3123
|
}
|
|
3090
3124
|
|