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