@ekhein/lamda-node-sdk 2.0.6 → 2.0.7

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.
@@ -1,13 +1,18 @@
1
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- export const protobufPackage = "lamda.rpc";
3
- export var Group;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettingsRequest = exports.Group = exports.protobufPackage = void 0;
4
+ exports.groupFromJSON = groupFromJSON;
5
+ exports.groupToJSON = groupToJSON;
6
+ const wire_1 = require("@bufbuild/protobuf/wire");
7
+ exports.protobufPackage = "lamda.rpc";
8
+ var Group;
4
9
  (function (Group) {
5
10
  Group[Group["GROUP_SYSTEM"] = 0] = "GROUP_SYSTEM";
6
11
  Group[Group["GROUP_SECURE"] = 1] = "GROUP_SECURE";
7
12
  Group[Group["GROUP_GLOBAL"] = 2] = "GROUP_GLOBAL";
8
13
  Group[Group["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
9
- })(Group || (Group = {}));
10
- export function groupFromJSON(object) {
14
+ })(Group || (exports.Group = Group = {}));
15
+ function groupFromJSON(object) {
11
16
  switch (object) {
12
17
  case 0:
13
18
  case "GROUP_SYSTEM":
@@ -24,7 +29,7 @@ export function groupFromJSON(object) {
24
29
  return Group.UNRECOGNIZED;
25
30
  }
26
31
  }
27
- export function groupToJSON(object) {
32
+ function groupToJSON(object) {
28
33
  switch (object) {
29
34
  case Group.GROUP_SYSTEM:
30
35
  return "GROUP_SYSTEM";
@@ -40,8 +45,8 @@ export function groupToJSON(object) {
40
45
  function createBaseSettingsRequest() {
41
46
  return { group: 0, name: "", value: "" };
42
47
  }
43
- export const SettingsRequest = {
44
- encode(message, writer = new BinaryWriter()) {
48
+ exports.SettingsRequest = {
49
+ encode(message, writer = new wire_1.BinaryWriter()) {
45
50
  if (message.group !== 0) {
46
51
  writer.uint32(8).int32(message.group);
47
52
  }
@@ -54,7 +59,7 @@ export const SettingsRequest = {
54
59
  return writer;
55
60
  },
56
61
  decode(input, length) {
57
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
62
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
58
63
  let end = length === undefined ? reader.len : reader.pos + length;
59
64
  const message = createBaseSettingsRequest();
60
65
  while (reader.pos < end) {
@@ -110,7 +115,7 @@ export const SettingsRequest = {
110
115
  return obj;
111
116
  },
112
117
  create(base) {
113
- return SettingsRequest.fromPartial(base ?? {});
118
+ return exports.SettingsRequest.fromPartial(base ?? {});
114
119
  },
115
120
  fromPartial(object) {
116
121
  const message = createBaseSettingsRequest();
package/dist/rpc/shell.js CHANGED
@@ -1,10 +1,13 @@
1
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- export const protobufPackage = "lamda.rpc";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ShellTask = exports.ShellResult = exports.ShellRequest = exports.protobufPackage = void 0;
4
+ const wire_1 = require("@bufbuild/protobuf/wire");
5
+ exports.protobufPackage = "lamda.rpc";
3
6
  function createBaseShellRequest() {
4
7
  return { tid: "", name: "", script: "", timeout: 0 };
5
8
  }
6
- export const ShellRequest = {
7
- encode(message, writer = new BinaryWriter()) {
9
+ exports.ShellRequest = {
10
+ encode(message, writer = new wire_1.BinaryWriter()) {
8
11
  if (message.tid !== "") {
9
12
  writer.uint32(10).string(message.tid);
10
13
  }
@@ -20,7 +23,7 @@ export const ShellRequest = {
20
23
  return writer;
21
24
  },
22
25
  decode(input, length) {
23
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
26
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
24
27
  let end = length === undefined ? reader.len : reader.pos + length;
25
28
  const message = createBaseShellRequest();
26
29
  while (reader.pos < end) {
@@ -87,7 +90,7 @@ export const ShellRequest = {
87
90
  return obj;
88
91
  },
89
92
  create(base) {
90
- return ShellRequest.fromPartial(base ?? {});
93
+ return exports.ShellRequest.fromPartial(base ?? {});
91
94
  },
92
95
  fromPartial(object) {
93
96
  const message = createBaseShellRequest();
@@ -101,8 +104,8 @@ export const ShellRequest = {
101
104
  function createBaseShellResult() {
102
105
  return { exitstatus: 0, stdout: new Uint8Array(0), stderr: new Uint8Array(0) };
103
106
  }
104
- export const ShellResult = {
105
- encode(message, writer = new BinaryWriter()) {
107
+ exports.ShellResult = {
108
+ encode(message, writer = new wire_1.BinaryWriter()) {
106
109
  if (message.exitstatus !== 0) {
107
110
  writer.uint32(8).int32(message.exitstatus);
108
111
  }
@@ -115,7 +118,7 @@ export const ShellResult = {
115
118
  return writer;
116
119
  },
117
120
  decode(input, length) {
118
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
121
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
119
122
  let end = length === undefined ? reader.len : reader.pos + length;
120
123
  const message = createBaseShellResult();
121
124
  while (reader.pos < end) {
@@ -171,7 +174,7 @@ export const ShellResult = {
171
174
  return obj;
172
175
  },
173
176
  create(base) {
174
- return ShellResult.fromPartial(base ?? {});
177
+ return exports.ShellResult.fromPartial(base ?? {});
175
178
  },
176
179
  fromPartial(object) {
177
180
  const message = createBaseShellResult();
@@ -184,8 +187,8 @@ export const ShellResult = {
184
187
  function createBaseShellTask() {
185
188
  return { tid: "", name: "", pid: 0 };
186
189
  }
187
- export const ShellTask = {
188
- encode(message, writer = new BinaryWriter()) {
190
+ exports.ShellTask = {
191
+ encode(message, writer = new wire_1.BinaryWriter()) {
189
192
  if (message.tid !== "") {
190
193
  writer.uint32(10).string(message.tid);
191
194
  }
@@ -198,7 +201,7 @@ export const ShellTask = {
198
201
  return writer;
199
202
  },
200
203
  decode(input, length) {
201
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
204
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
202
205
  let end = length === undefined ? reader.len : reader.pos + length;
203
206
  const message = createBaseShellTask();
204
207
  while (reader.pos < end) {
@@ -254,7 +257,7 @@ export const ShellTask = {
254
257
  return obj;
255
258
  },
256
259
  create(base) {
257
- return ShellTask.fromPartial(base ?? {});
260
+ return exports.ShellTask.fromPartial(base ?? {});
258
261
  },
259
262
  fromPartial(object) {
260
263
  const message = createBaseShellTask();
@@ -1,10 +1,13 @@
1
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- export const protobufPackage = "lamda.rpc";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MemInfo = exports.NetIOInfo = exports.DiskIOInfo = exports.DiskUsage = exports.CpuInfo = exports.BatteryInfo = exports.protobufPackage = void 0;
4
+ const wire_1 = require("@bufbuild/protobuf/wire");
5
+ exports.protobufPackage = "lamda.rpc";
3
6
  function createBaseBatteryInfo() {
4
7
  return { battCharging: false, battPercent: 0, battTemperature: 0 };
5
8
  }
6
- export const BatteryInfo = {
7
- encode(message, writer = new BinaryWriter()) {
9
+ exports.BatteryInfo = {
10
+ encode(message, writer = new wire_1.BinaryWriter()) {
8
11
  if (message.battCharging !== false) {
9
12
  writer.uint32(8).bool(message.battCharging);
10
13
  }
@@ -17,7 +20,7 @@ export const BatteryInfo = {
17
20
  return writer;
18
21
  },
19
22
  decode(input, length) {
20
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
23
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
21
24
  let end = length === undefined ? reader.len : reader.pos + length;
22
25
  const message = createBaseBatteryInfo();
23
26
  while (reader.pos < end) {
@@ -73,7 +76,7 @@ export const BatteryInfo = {
73
76
  return obj;
74
77
  },
75
78
  create(base) {
76
- return BatteryInfo.fromPartial(base ?? {});
79
+ return exports.BatteryInfo.fromPartial(base ?? {});
77
80
  },
78
81
  fromPartial(object) {
79
82
  const message = createBaseBatteryInfo();
@@ -95,8 +98,8 @@ function createBaseCpuInfo() {
95
98
  cpuTimesIdle: 0,
96
99
  };
97
100
  }
98
- export const CpuInfo = {
99
- encode(message, writer = new BinaryWriter()) {
101
+ exports.CpuInfo = {
102
+ encode(message, writer = new wire_1.BinaryWriter()) {
100
103
  if (message.cpuPercent !== 0) {
101
104
  writer.uint32(13).float(message.cpuPercent);
102
105
  }
@@ -124,7 +127,7 @@ export const CpuInfo = {
124
127
  return writer;
125
128
  },
126
129
  decode(input, length) {
127
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
130
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
128
131
  let end = length === undefined ? reader.len : reader.pos + length;
129
132
  const message = createBaseCpuInfo();
130
133
  while (reader.pos < end) {
@@ -235,7 +238,7 @@ export const CpuInfo = {
235
238
  return obj;
236
239
  },
237
240
  create(base) {
238
- return CpuInfo.fromPartial(base ?? {});
241
+ return exports.CpuInfo.fromPartial(base ?? {});
239
242
  },
240
243
  fromPartial(object) {
241
244
  const message = createBaseCpuInfo();
@@ -253,8 +256,8 @@ export const CpuInfo = {
253
256
  function createBaseDiskUsage() {
254
257
  return { diskTotal: 0, diskUsed: 0, diskFree: 0, diskPercent: 0 };
255
258
  }
256
- export const DiskUsage = {
257
- encode(message, writer = new BinaryWriter()) {
259
+ exports.DiskUsage = {
260
+ encode(message, writer = new wire_1.BinaryWriter()) {
258
261
  if (message.diskTotal !== 0) {
259
262
  writer.uint32(8).int64(message.diskTotal);
260
263
  }
@@ -270,7 +273,7 @@ export const DiskUsage = {
270
273
  return writer;
271
274
  },
272
275
  decode(input, length) {
273
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
276
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
274
277
  let end = length === undefined ? reader.len : reader.pos + length;
275
278
  const message = createBaseDiskUsage();
276
279
  while (reader.pos < end) {
@@ -337,7 +340,7 @@ export const DiskUsage = {
337
340
  return obj;
338
341
  },
339
342
  create(base) {
340
- return DiskUsage.fromPartial(base ?? {});
343
+ return exports.DiskUsage.fromPartial(base ?? {});
341
344
  },
342
345
  fromPartial(object) {
343
346
  const message = createBaseDiskUsage();
@@ -359,8 +362,8 @@ function createBaseDiskIOInfo() {
359
362
  diskIoBusyTime: 0,
360
363
  };
361
364
  }
362
- export const DiskIOInfo = {
363
- encode(message, writer = new BinaryWriter()) {
365
+ exports.DiskIOInfo = {
366
+ encode(message, writer = new wire_1.BinaryWriter()) {
364
367
  if (message.diskIoReadBytes !== 0) {
365
368
  writer.uint32(8).int64(message.diskIoReadBytes);
366
369
  }
@@ -385,7 +388,7 @@ export const DiskIOInfo = {
385
388
  return writer;
386
389
  },
387
390
  decode(input, length) {
388
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
391
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
389
392
  let end = length === undefined ? reader.len : reader.pos + length;
390
393
  const message = createBaseDiskIOInfo();
391
394
  while (reader.pos < end) {
@@ -485,7 +488,7 @@ export const DiskIOInfo = {
485
488
  return obj;
486
489
  },
487
490
  create(base) {
488
- return DiskIOInfo.fromPartial(base ?? {});
491
+ return exports.DiskIOInfo.fromPartial(base ?? {});
489
492
  },
490
493
  fromPartial(object) {
491
494
  const message = createBaseDiskIOInfo();
@@ -511,8 +514,8 @@ function createBaseNetIOInfo() {
511
514
  netIoErrout: 0,
512
515
  };
513
516
  }
514
- export const NetIOInfo = {
515
- encode(message, writer = new BinaryWriter()) {
517
+ exports.NetIOInfo = {
518
+ encode(message, writer = new wire_1.BinaryWriter()) {
516
519
  if (message.netIoBytesSent !== 0) {
517
520
  writer.uint32(8).int64(message.netIoBytesSent);
518
521
  }
@@ -540,7 +543,7 @@ export const NetIOInfo = {
540
543
  return writer;
541
544
  },
542
545
  decode(input, length) {
543
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
546
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
544
547
  let end = length === undefined ? reader.len : reader.pos + length;
545
548
  const message = createBaseNetIOInfo();
546
549
  while (reader.pos < end) {
@@ -651,7 +654,7 @@ export const NetIOInfo = {
651
654
  return obj;
652
655
  },
653
656
  create(base) {
654
- return NetIOInfo.fromPartial(base ?? {});
657
+ return exports.NetIOInfo.fromPartial(base ?? {});
655
658
  },
656
659
  fromPartial(object) {
657
660
  const message = createBaseNetIOInfo();
@@ -681,8 +684,8 @@ function createBaseMemInfo() {
681
684
  memSlab: 0,
682
685
  };
683
686
  }
684
- export const MemInfo = {
685
- encode(message, writer = new BinaryWriter()) {
687
+ exports.MemInfo = {
688
+ encode(message, writer = new wire_1.BinaryWriter()) {
686
689
  if (message.memTotal !== 0) {
687
690
  writer.uint32(8).int64(message.memTotal);
688
691
  }
@@ -719,7 +722,7 @@ export const MemInfo = {
719
722
  return writer;
720
723
  },
721
724
  decode(input, length) {
722
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
725
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
723
726
  let end = length === undefined ? reader.len : reader.pos + length;
724
727
  const message = createBaseMemInfo();
725
728
  while (reader.pos < end) {
@@ -863,7 +866,7 @@ export const MemInfo = {
863
866
  return obj;
864
867
  },
865
868
  create(base) {
866
- return MemInfo.fromPartial(base ?? {});
869
+ return exports.MemInfo.fromPartial(base ?? {});
867
870
  },
868
871
  fromPartial(object) {
869
872
  const message = createBaseMemInfo();
@@ -1,10 +1,13 @@
1
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- export const protobufPackage = "lamda.rpc";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StorageRequest = exports.protobufPackage = void 0;
4
+ const wire_1 = require("@bufbuild/protobuf/wire");
5
+ exports.protobufPackage = "lamda.rpc";
3
6
  function createBaseStorageRequest() {
4
7
  return { container: "", key: "", value: new Uint8Array(0), ttl: 0 };
5
8
  }
6
- export const StorageRequest = {
7
- encode(message, writer = new BinaryWriter()) {
9
+ exports.StorageRequest = {
10
+ encode(message, writer = new wire_1.BinaryWriter()) {
8
11
  if (message.container !== "") {
9
12
  writer.uint32(10).string(message.container);
10
13
  }
@@ -20,7 +23,7 @@ export const StorageRequest = {
20
23
  return writer;
21
24
  },
22
25
  decode(input, length) {
23
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
26
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
24
27
  let end = length === undefined ? reader.len : reader.pos + length;
25
28
  const message = createBaseStorageRequest();
26
29
  while (reader.pos < end) {
@@ -87,7 +90,7 @@ export const StorageRequest = {
87
90
  return obj;
88
91
  },
89
92
  create(base) {
90
- return StorageRequest.fromPartial(base ?? {});
93
+ return exports.StorageRequest.fromPartial(base ?? {});
91
94
  },
92
95
  fromPartial(object) {
93
96
  const message = createBaseStorageRequest();
package/dist/rpc/types.js CHANGED
@@ -1,17 +1,20 @@
1
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- export const protobufPackage = "lamda.rpc";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Empty = exports.Bytes = exports.String = exports.Integer = exports.Boolean = exports.protobufPackage = void 0;
4
+ const wire_1 = require("@bufbuild/protobuf/wire");
5
+ exports.protobufPackage = "lamda.rpc";
3
6
  function createBaseBoolean() {
4
7
  return { value: false };
5
8
  }
6
- export const Boolean = {
7
- encode(message, writer = new BinaryWriter()) {
9
+ exports.Boolean = {
10
+ encode(message, writer = new wire_1.BinaryWriter()) {
8
11
  if (message.value !== false) {
9
12
  writer.uint32(8).bool(message.value);
10
13
  }
11
14
  return writer;
12
15
  },
13
16
  decode(input, length) {
14
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
17
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
15
18
  let end = length === undefined ? reader.len : reader.pos + length;
16
19
  const message = createBaseBoolean();
17
20
  while (reader.pos < end) {
@@ -43,7 +46,7 @@ export const Boolean = {
43
46
  return obj;
44
47
  },
45
48
  create(base) {
46
- return Boolean.fromPartial(base ?? {});
49
+ return exports.Boolean.fromPartial(base ?? {});
47
50
  },
48
51
  fromPartial(object) {
49
52
  const message = createBaseBoolean();
@@ -54,15 +57,15 @@ export const Boolean = {
54
57
  function createBaseInteger() {
55
58
  return { value: 0 };
56
59
  }
57
- export const Integer = {
58
- encode(message, writer = new BinaryWriter()) {
60
+ exports.Integer = {
61
+ encode(message, writer = new wire_1.BinaryWriter()) {
59
62
  if (message.value !== 0) {
60
63
  writer.uint32(8).int64(message.value);
61
64
  }
62
65
  return writer;
63
66
  },
64
67
  decode(input, length) {
65
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
68
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
66
69
  let end = length === undefined ? reader.len : reader.pos + length;
67
70
  const message = createBaseInteger();
68
71
  while (reader.pos < end) {
@@ -94,7 +97,7 @@ export const Integer = {
94
97
  return obj;
95
98
  },
96
99
  create(base) {
97
- return Integer.fromPartial(base ?? {});
100
+ return exports.Integer.fromPartial(base ?? {});
98
101
  },
99
102
  fromPartial(object) {
100
103
  const message = createBaseInteger();
@@ -105,15 +108,15 @@ export const Integer = {
105
108
  function createBaseString() {
106
109
  return { value: "" };
107
110
  }
108
- export const String = {
109
- encode(message, writer = new BinaryWriter()) {
111
+ exports.String = {
112
+ encode(message, writer = new wire_1.BinaryWriter()) {
110
113
  if (message.value !== "") {
111
114
  writer.uint32(10).string(message.value);
112
115
  }
113
116
  return writer;
114
117
  },
115
118
  decode(input, length) {
116
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
119
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
117
120
  let end = length === undefined ? reader.len : reader.pos + length;
118
121
  const message = createBaseString();
119
122
  while (reader.pos < end) {
@@ -145,7 +148,7 @@ export const String = {
145
148
  return obj;
146
149
  },
147
150
  create(base) {
148
- return String.fromPartial(base ?? {});
151
+ return exports.String.fromPartial(base ?? {});
149
152
  },
150
153
  fromPartial(object) {
151
154
  const message = createBaseString();
@@ -156,15 +159,15 @@ export const String = {
156
159
  function createBaseBytes() {
157
160
  return { value: new Uint8Array(0) };
158
161
  }
159
- export const Bytes = {
160
- encode(message, writer = new BinaryWriter()) {
162
+ exports.Bytes = {
163
+ encode(message, writer = new wire_1.BinaryWriter()) {
161
164
  if (message.value.length !== 0) {
162
165
  writer.uint32(10).bytes(message.value);
163
166
  }
164
167
  return writer;
165
168
  },
166
169
  decode(input, length) {
167
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
170
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
168
171
  let end = length === undefined ? reader.len : reader.pos + length;
169
172
  const message = createBaseBytes();
170
173
  while (reader.pos < end) {
@@ -196,7 +199,7 @@ export const Bytes = {
196
199
  return obj;
197
200
  },
198
201
  create(base) {
199
- return Bytes.fromPartial(base ?? {});
202
+ return exports.Bytes.fromPartial(base ?? {});
200
203
  },
201
204
  fromPartial(object) {
202
205
  const message = createBaseBytes();
@@ -207,12 +210,12 @@ export const Bytes = {
207
210
  function createBaseEmpty() {
208
211
  return {};
209
212
  }
210
- export const Empty = {
211
- encode(_, writer = new BinaryWriter()) {
213
+ exports.Empty = {
214
+ encode(_, writer = new wire_1.BinaryWriter()) {
212
215
  return writer;
213
216
  },
214
217
  decode(input, length) {
215
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
218
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
216
219
  let end = length === undefined ? reader.len : reader.pos + length;
217
220
  const message = createBaseEmpty();
218
221
  while (reader.pos < end) {
@@ -234,7 +237,7 @@ export const Empty = {
234
237
  return obj;
235
238
  },
236
239
  create(base) {
237
- return Empty.fromPartial(base ?? {});
240
+ return exports.Empty.fromPartial(base ?? {});
238
241
  },
239
242
  fromPartial(_) {
240
243
  const message = createBaseEmpty();