@ekhein/lamda-node-sdk 1.0.1 → 1.0.2

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.
Files changed (109) hide show
  1. package/dist/chunk-3HDKHFYE.js +1602 -0
  2. package/dist/chunk-3JBDAA2H.js +439 -0
  3. package/dist/chunk-4AHM55IO.js +1172 -0
  4. package/dist/chunk-6HD35RPW.js +5370 -0
  5. package/dist/chunk-7XF22HAW.js +907 -0
  6. package/dist/chunk-7YGA6EOV.js +109 -0
  7. package/dist/chunk-ADS4GRIL.js +14 -0
  8. package/dist/chunk-FSLE4VGI.js +48 -0
  9. package/dist/chunk-H7Z6XFBF.js +134 -0
  10. package/dist/chunk-KJKSI2WL.js +62 -0
  11. package/dist/chunk-O52JGDU7.js +800 -0
  12. package/dist/chunk-ORXTTWPB.js +379 -0
  13. package/dist/chunk-OZJH6SR7.js +20 -0
  14. package/dist/chunk-P53F45YO.js +64 -0
  15. package/dist/chunk-QXMPY6EE.js +289 -0
  16. package/dist/chunk-SBFKX3ZY.js +1554 -0
  17. package/dist/chunk-WFQEBPE6.js +300 -0
  18. package/dist/chunk-X4LTH2UN.js +983 -0
  19. package/dist/chunk-XAX5BZL3.js +132 -0
  20. package/dist/chunk-ZXF5DGTC.js +45 -0
  21. package/dist/constants/activity.flag.cjs +92 -0
  22. package/dist/constants/activity.flag.d.cts +24 -0
  23. package/dist/constants/activity.flag.d.ts +24 -0
  24. package/dist/constants/activity.flag.js +49 -0
  25. package/dist/constants/android.permission.cjs +116 -0
  26. package/dist/constants/android.permission.d.cts +32 -0
  27. package/dist/constants/android.permission.d.ts +32 -0
  28. package/dist/constants/android.permission.js +65 -0
  29. package/dist/constants/index.cjs +186 -0
  30. package/dist/constants/index.d.cts +2 -0
  31. package/dist/constants/index.d.ts +2 -0
  32. package/dist/constants/index.js +111 -0
  33. package/dist/decorators/inject.decorator.cjs +43 -0
  34. package/dist/decorators/inject.decorator.d.cts +5 -0
  35. package/dist/decorators/inject.decorator.d.ts +5 -0
  36. package/dist/decorators/inject.decorator.js +7 -0
  37. package/dist/main.cjs +1 -2
  38. package/dist/main.d.cts +17 -1152
  39. package/dist/main.d.ts +17 -1152
  40. package/dist/main.js +36 -11873
  41. package/dist/rpc/application.cjs +2019 -0
  42. package/dist/rpc/application.d.cts +138 -0
  43. package/dist/rpc/application.d.ts +138 -0
  44. package/dist/rpc/application.js +50 -0
  45. package/dist/rpc/debug.cjs +86 -0
  46. package/dist/rpc/debug.d.cts +21 -0
  47. package/dist/rpc/debug.d.ts +21 -0
  48. package/dist/rpc/debug.js +9 -0
  49. package/dist/rpc/file.cjs +405 -0
  50. package/dist/rpc/file.d.cts +40 -0
  51. package/dist/rpc/file.d.ts +40 -0
  52. package/dist/rpc/file.js +13 -0
  53. package/dist/rpc/google/protobuf/any.cjs +126 -0
  54. package/dist/rpc/google/protobuf/any.d.cts +22 -0
  55. package/dist/rpc/google/protobuf/any.d.ts +22 -0
  56. package/dist/rpc/google/protobuf/any.js +103 -0
  57. package/dist/rpc/google/protobuf/empty.cjs +69 -0
  58. package/dist/rpc/google/protobuf/empty.d.cts +20 -0
  59. package/dist/rpc/google/protobuf/empty.d.ts +20 -0
  60. package/dist/rpc/google/protobuf/empty.js +9 -0
  61. package/dist/rpc/google/protobuf/struct.cjs +469 -0
  62. package/dist/rpc/google/protobuf/struct.d.cts +65 -0
  63. package/dist/rpc/google/protobuf/struct.d.ts +65 -0
  64. package/dist/rpc/google/protobuf/struct.js +21 -0
  65. package/dist/rpc/policy.cjs +133 -0
  66. package/dist/rpc/policy.d.cts +24 -0
  67. package/dist/rpc/policy.d.ts +24 -0
  68. package/dist/rpc/policy.js +9 -0
  69. package/dist/rpc/proxy.cjs +1109 -0
  70. package/dist/rpc/proxy.d.cts +108 -0
  71. package/dist/rpc/proxy.d.ts +108 -0
  72. package/dist/rpc/proxy.js +49 -0
  73. package/dist/rpc/services.cjs +11898 -0
  74. package/dist/rpc/services.d.cts +1920 -0
  75. package/dist/rpc/services.d.ts +1920 -0
  76. package/dist/rpc/services.js +48 -0
  77. package/dist/rpc/settings.cjs +161 -0
  78. package/dist/rpc/settings.d.cts +31 -0
  79. package/dist/rpc/settings.d.ts +31 -0
  80. package/dist/rpc/settings.js +15 -0
  81. package/dist/rpc/shell.cjs +326 -0
  82. package/dist/rpc/shell.d.cts +36 -0
  83. package/dist/rpc/shell.d.ts +36 -0
  84. package/dist/rpc/shell.js +13 -0
  85. package/dist/rpc/status.cjs +936 -0
  86. package/dist/rpc/status.d.cts +76 -0
  87. package/dist/rpc/status.d.ts +76 -0
  88. package/dist/rpc/status.js +19 -0
  89. package/dist/rpc/storage.cjs +156 -0
  90. package/dist/rpc/storage.d.cts +24 -0
  91. package/dist/rpc/storage.d.ts +24 -0
  92. package/dist/rpc/storage.js +9 -0
  93. package/dist/rpc/types.cjs +317 -0
  94. package/dist/rpc/types.d.cts +36 -0
  95. package/dist/rpc/types.d.ts +36 -0
  96. package/dist/rpc/types.js +17 -0
  97. package/dist/rpc/uiautomator.cjs +5446 -0
  98. package/dist/rpc/uiautomator.d.cts +618 -0
  99. package/dist/rpc/uiautomator.d.ts +618 -0
  100. package/dist/rpc/uiautomator.js +113 -0
  101. package/dist/rpc/util.cjs +1212 -0
  102. package/dist/rpc/util.d.cts +103 -0
  103. package/dist/rpc/util.d.ts +103 -0
  104. package/dist/rpc/util.js +41 -0
  105. package/dist/rpc/wifi.cjs +1015 -0
  106. package/dist/rpc/wifi.d.cts +84 -0
  107. package/dist/rpc/wifi.d.ts +84 -0
  108. package/dist/rpc/wifi.js +25 -0
  109. package/package.json +3 -4
@@ -0,0 +1,300 @@
1
+ // src/rpc/shell.ts
2
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
3
+ var protobufPackage = "lamda.rpc";
4
+ function createBaseShellRequest() {
5
+ return { tid: "", name: "", script: "", timeout: 0 };
6
+ }
7
+ var ShellRequest = {
8
+ encode(message, writer = new BinaryWriter()) {
9
+ if (message.tid !== "") {
10
+ writer.uint32(10).string(message.tid);
11
+ }
12
+ if (message.name !== "") {
13
+ writer.uint32(18).string(message.name);
14
+ }
15
+ if (message.script !== "") {
16
+ writer.uint32(26).string(message.script);
17
+ }
18
+ if (message.timeout !== 0) {
19
+ writer.uint32(32).int32(message.timeout);
20
+ }
21
+ return writer;
22
+ },
23
+ decode(input, length) {
24
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
25
+ let end = length === void 0 ? reader.len : reader.pos + length;
26
+ const message = createBaseShellRequest();
27
+ while (reader.pos < end) {
28
+ const tag = reader.uint32();
29
+ switch (tag >>> 3) {
30
+ case 1: {
31
+ if (tag !== 10) {
32
+ break;
33
+ }
34
+ message.tid = reader.string();
35
+ continue;
36
+ }
37
+ case 2: {
38
+ if (tag !== 18) {
39
+ break;
40
+ }
41
+ message.name = reader.string();
42
+ continue;
43
+ }
44
+ case 3: {
45
+ if (tag !== 26) {
46
+ break;
47
+ }
48
+ message.script = reader.string();
49
+ continue;
50
+ }
51
+ case 4: {
52
+ if (tag !== 32) {
53
+ break;
54
+ }
55
+ message.timeout = reader.int32();
56
+ continue;
57
+ }
58
+ }
59
+ if ((tag & 7) === 4 || tag === 0) {
60
+ break;
61
+ }
62
+ reader.skip(tag & 7);
63
+ }
64
+ return message;
65
+ },
66
+ fromJSON(object) {
67
+ return {
68
+ tid: isSet(object.tid) ? globalThis.String(object.tid) : "",
69
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
70
+ script: isSet(object.script) ? globalThis.String(object.script) : "",
71
+ timeout: isSet(object.timeout) ? globalThis.Number(object.timeout) : 0
72
+ };
73
+ },
74
+ toJSON(message) {
75
+ const obj = {};
76
+ if (message.tid !== "") {
77
+ obj.tid = message.tid;
78
+ }
79
+ if (message.name !== "") {
80
+ obj.name = message.name;
81
+ }
82
+ if (message.script !== "") {
83
+ obj.script = message.script;
84
+ }
85
+ if (message.timeout !== 0) {
86
+ obj.timeout = Math.round(message.timeout);
87
+ }
88
+ return obj;
89
+ },
90
+ create(base) {
91
+ return ShellRequest.fromPartial(base ?? {});
92
+ },
93
+ fromPartial(object) {
94
+ const message = createBaseShellRequest();
95
+ message.tid = object.tid ?? "";
96
+ message.name = object.name ?? "";
97
+ message.script = object.script ?? "";
98
+ message.timeout = object.timeout ?? 0;
99
+ return message;
100
+ }
101
+ };
102
+ function createBaseShellResult() {
103
+ return { exitstatus: 0, stdout: new Uint8Array(0), stderr: new Uint8Array(0) };
104
+ }
105
+ var ShellResult = {
106
+ encode(message, writer = new BinaryWriter()) {
107
+ if (message.exitstatus !== 0) {
108
+ writer.uint32(8).int32(message.exitstatus);
109
+ }
110
+ if (message.stdout.length !== 0) {
111
+ writer.uint32(18).bytes(message.stdout);
112
+ }
113
+ if (message.stderr.length !== 0) {
114
+ writer.uint32(26).bytes(message.stderr);
115
+ }
116
+ return writer;
117
+ },
118
+ decode(input, length) {
119
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
120
+ let end = length === void 0 ? reader.len : reader.pos + length;
121
+ const message = createBaseShellResult();
122
+ while (reader.pos < end) {
123
+ const tag = reader.uint32();
124
+ switch (tag >>> 3) {
125
+ case 1: {
126
+ if (tag !== 8) {
127
+ break;
128
+ }
129
+ message.exitstatus = reader.int32();
130
+ continue;
131
+ }
132
+ case 2: {
133
+ if (tag !== 18) {
134
+ break;
135
+ }
136
+ message.stdout = reader.bytes();
137
+ continue;
138
+ }
139
+ case 3: {
140
+ if (tag !== 26) {
141
+ break;
142
+ }
143
+ message.stderr = reader.bytes();
144
+ continue;
145
+ }
146
+ }
147
+ if ((tag & 7) === 4 || tag === 0) {
148
+ break;
149
+ }
150
+ reader.skip(tag & 7);
151
+ }
152
+ return message;
153
+ },
154
+ fromJSON(object) {
155
+ return {
156
+ exitstatus: isSet(object.exitstatus) ? globalThis.Number(object.exitstatus) : 0,
157
+ stdout: isSet(object.stdout) ? bytesFromBase64(object.stdout) : new Uint8Array(0),
158
+ stderr: isSet(object.stderr) ? bytesFromBase64(object.stderr) : new Uint8Array(0)
159
+ };
160
+ },
161
+ toJSON(message) {
162
+ const obj = {};
163
+ if (message.exitstatus !== 0) {
164
+ obj.exitstatus = Math.round(message.exitstatus);
165
+ }
166
+ if (message.stdout.length !== 0) {
167
+ obj.stdout = base64FromBytes(message.stdout);
168
+ }
169
+ if (message.stderr.length !== 0) {
170
+ obj.stderr = base64FromBytes(message.stderr);
171
+ }
172
+ return obj;
173
+ },
174
+ create(base) {
175
+ return ShellResult.fromPartial(base ?? {});
176
+ },
177
+ fromPartial(object) {
178
+ const message = createBaseShellResult();
179
+ message.exitstatus = object.exitstatus ?? 0;
180
+ message.stdout = object.stdout ?? new Uint8Array(0);
181
+ message.stderr = object.stderr ?? new Uint8Array(0);
182
+ return message;
183
+ }
184
+ };
185
+ function createBaseShellTask() {
186
+ return { tid: "", name: "", pid: 0 };
187
+ }
188
+ var ShellTask = {
189
+ encode(message, writer = new BinaryWriter()) {
190
+ if (message.tid !== "") {
191
+ writer.uint32(10).string(message.tid);
192
+ }
193
+ if (message.name !== "") {
194
+ writer.uint32(18).string(message.name);
195
+ }
196
+ if (message.pid !== 0) {
197
+ writer.uint32(24).int32(message.pid);
198
+ }
199
+ return writer;
200
+ },
201
+ decode(input, length) {
202
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
203
+ let end = length === void 0 ? reader.len : reader.pos + length;
204
+ const message = createBaseShellTask();
205
+ while (reader.pos < end) {
206
+ const tag = reader.uint32();
207
+ switch (tag >>> 3) {
208
+ case 1: {
209
+ if (tag !== 10) {
210
+ break;
211
+ }
212
+ message.tid = reader.string();
213
+ continue;
214
+ }
215
+ case 2: {
216
+ if (tag !== 18) {
217
+ break;
218
+ }
219
+ message.name = reader.string();
220
+ continue;
221
+ }
222
+ case 3: {
223
+ if (tag !== 24) {
224
+ break;
225
+ }
226
+ message.pid = reader.int32();
227
+ continue;
228
+ }
229
+ }
230
+ if ((tag & 7) === 4 || tag === 0) {
231
+ break;
232
+ }
233
+ reader.skip(tag & 7);
234
+ }
235
+ return message;
236
+ },
237
+ fromJSON(object) {
238
+ return {
239
+ tid: isSet(object.tid) ? globalThis.String(object.tid) : "",
240
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
241
+ pid: isSet(object.pid) ? globalThis.Number(object.pid) : 0
242
+ };
243
+ },
244
+ toJSON(message) {
245
+ const obj = {};
246
+ if (message.tid !== "") {
247
+ obj.tid = message.tid;
248
+ }
249
+ if (message.name !== "") {
250
+ obj.name = message.name;
251
+ }
252
+ if (message.pid !== 0) {
253
+ obj.pid = Math.round(message.pid);
254
+ }
255
+ return obj;
256
+ },
257
+ create(base) {
258
+ return ShellTask.fromPartial(base ?? {});
259
+ },
260
+ fromPartial(object) {
261
+ const message = createBaseShellTask();
262
+ message.tid = object.tid ?? "";
263
+ message.name = object.name ?? "";
264
+ message.pid = object.pid ?? 0;
265
+ return message;
266
+ }
267
+ };
268
+ function bytesFromBase64(b64) {
269
+ if (globalThis.Buffer) {
270
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
271
+ } else {
272
+ const bin = globalThis.atob(b64);
273
+ const arr = new Uint8Array(bin.length);
274
+ for (let i = 0; i < bin.length; ++i) {
275
+ arr[i] = bin.charCodeAt(i);
276
+ }
277
+ return arr;
278
+ }
279
+ }
280
+ function base64FromBytes(arr) {
281
+ if (globalThis.Buffer) {
282
+ return globalThis.Buffer.from(arr).toString("base64");
283
+ } else {
284
+ const bin = [];
285
+ arr.forEach((byte) => {
286
+ bin.push(globalThis.String.fromCharCode(byte));
287
+ });
288
+ return globalThis.btoa(bin.join(""));
289
+ }
290
+ }
291
+ function isSet(value) {
292
+ return value !== null && value !== void 0;
293
+ }
294
+
295
+ export {
296
+ protobufPackage,
297
+ ShellRequest,
298
+ ShellResult,
299
+ ShellTask
300
+ };