@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.
- package/dist/chunk-3HDKHFYE.js +1602 -0
- package/dist/chunk-3JBDAA2H.js +439 -0
- package/dist/chunk-4AHM55IO.js +1172 -0
- package/dist/chunk-6HD35RPW.js +5370 -0
- package/dist/chunk-7XF22HAW.js +907 -0
- package/dist/chunk-7YGA6EOV.js +109 -0
- package/dist/chunk-ADS4GRIL.js +14 -0
- package/dist/chunk-FSLE4VGI.js +48 -0
- package/dist/chunk-H7Z6XFBF.js +134 -0
- package/dist/chunk-KJKSI2WL.js +62 -0
- package/dist/chunk-O52JGDU7.js +800 -0
- package/dist/chunk-ORXTTWPB.js +379 -0
- package/dist/chunk-OZJH6SR7.js +20 -0
- package/dist/chunk-P53F45YO.js +64 -0
- package/dist/chunk-QXMPY6EE.js +289 -0
- package/dist/chunk-SBFKX3ZY.js +1554 -0
- package/dist/chunk-WFQEBPE6.js +300 -0
- package/dist/chunk-X4LTH2UN.js +983 -0
- package/dist/chunk-XAX5BZL3.js +132 -0
- package/dist/chunk-ZXF5DGTC.js +45 -0
- package/dist/constants/activity.flag.cjs +92 -0
- package/dist/constants/activity.flag.d.cts +24 -0
- package/dist/constants/activity.flag.d.ts +24 -0
- package/dist/constants/activity.flag.js +49 -0
- package/dist/constants/android.permission.cjs +116 -0
- package/dist/constants/android.permission.d.cts +32 -0
- package/dist/constants/android.permission.d.ts +32 -0
- package/dist/constants/android.permission.js +65 -0
- package/dist/constants/index.cjs +186 -0
- package/dist/constants/index.d.cts +2 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +111 -0
- package/dist/decorators/inject.decorator.cjs +43 -0
- package/dist/decorators/inject.decorator.d.cts +5 -0
- package/dist/decorators/inject.decorator.d.ts +5 -0
- package/dist/decorators/inject.decorator.js +7 -0
- package/dist/main.cjs +1 -2
- package/dist/main.d.cts +17 -1152
- package/dist/main.d.ts +17 -1152
- package/dist/main.js +36 -11873
- package/dist/rpc/application.cjs +2019 -0
- package/dist/rpc/application.d.cts +138 -0
- package/dist/rpc/application.d.ts +138 -0
- package/dist/rpc/application.js +50 -0
- package/dist/rpc/debug.cjs +86 -0
- package/dist/rpc/debug.d.cts +21 -0
- package/dist/rpc/debug.d.ts +21 -0
- package/dist/rpc/debug.js +9 -0
- package/dist/rpc/file.cjs +405 -0
- package/dist/rpc/file.d.cts +40 -0
- package/dist/rpc/file.d.ts +40 -0
- package/dist/rpc/file.js +13 -0
- package/dist/rpc/google/protobuf/any.cjs +126 -0
- package/dist/rpc/google/protobuf/any.d.cts +22 -0
- package/dist/rpc/google/protobuf/any.d.ts +22 -0
- package/dist/rpc/google/protobuf/any.js +103 -0
- package/dist/rpc/google/protobuf/empty.cjs +69 -0
- package/dist/rpc/google/protobuf/empty.d.cts +20 -0
- package/dist/rpc/google/protobuf/empty.d.ts +20 -0
- package/dist/rpc/google/protobuf/empty.js +9 -0
- package/dist/rpc/google/protobuf/struct.cjs +469 -0
- package/dist/rpc/google/protobuf/struct.d.cts +65 -0
- package/dist/rpc/google/protobuf/struct.d.ts +65 -0
- package/dist/rpc/google/protobuf/struct.js +21 -0
- package/dist/rpc/policy.cjs +133 -0
- package/dist/rpc/policy.d.cts +24 -0
- package/dist/rpc/policy.d.ts +24 -0
- package/dist/rpc/policy.js +9 -0
- package/dist/rpc/proxy.cjs +1109 -0
- package/dist/rpc/proxy.d.cts +108 -0
- package/dist/rpc/proxy.d.ts +108 -0
- package/dist/rpc/proxy.js +49 -0
- package/dist/rpc/services.cjs +11898 -0
- package/dist/rpc/services.d.cts +1920 -0
- package/dist/rpc/services.d.ts +1920 -0
- package/dist/rpc/services.js +48 -0
- package/dist/rpc/settings.cjs +161 -0
- package/dist/rpc/settings.d.cts +31 -0
- package/dist/rpc/settings.d.ts +31 -0
- package/dist/rpc/settings.js +15 -0
- package/dist/rpc/shell.cjs +326 -0
- package/dist/rpc/shell.d.cts +36 -0
- package/dist/rpc/shell.d.ts +36 -0
- package/dist/rpc/shell.js +13 -0
- package/dist/rpc/status.cjs +936 -0
- package/dist/rpc/status.d.cts +76 -0
- package/dist/rpc/status.d.ts +76 -0
- package/dist/rpc/status.js +19 -0
- package/dist/rpc/storage.cjs +156 -0
- package/dist/rpc/storage.d.cts +24 -0
- package/dist/rpc/storage.d.ts +24 -0
- package/dist/rpc/storage.js +9 -0
- package/dist/rpc/types.cjs +317 -0
- package/dist/rpc/types.d.cts +36 -0
- package/dist/rpc/types.d.ts +36 -0
- package/dist/rpc/types.js +17 -0
- package/dist/rpc/uiautomator.cjs +5446 -0
- package/dist/rpc/uiautomator.d.cts +618 -0
- package/dist/rpc/uiautomator.d.ts +618 -0
- package/dist/rpc/uiautomator.js +113 -0
- package/dist/rpc/util.cjs +1212 -0
- package/dist/rpc/util.d.cts +103 -0
- package/dist/rpc/util.d.ts +103 -0
- package/dist/rpc/util.js +41 -0
- package/dist/rpc/wifi.cjs +1015 -0
- package/dist/rpc/wifi.d.cts +84 -0
- package/dist/rpc/wifi.d.ts +84 -0
- package/dist/rpc/wifi.js +25 -0
- package/package.json +3 -4
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/rpc/file.ts
|
|
20
|
+
var file_exports = {};
|
|
21
|
+
__export(file_exports, {
|
|
22
|
+
FileDataResponse: () => FileDataResponse,
|
|
23
|
+
FileRequest: () => FileRequest,
|
|
24
|
+
FileStat: () => FileStat,
|
|
25
|
+
protobufPackage: () => protobufPackage
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(file_exports);
|
|
28
|
+
var import_wire = require("@bufbuild/protobuf/wire");
|
|
29
|
+
var protobufPackage = "lamda.rpc";
|
|
30
|
+
function createBaseFileStat() {
|
|
31
|
+
return {
|
|
32
|
+
name: "",
|
|
33
|
+
path: "",
|
|
34
|
+
directory: false,
|
|
35
|
+
stMode: 0,
|
|
36
|
+
stAtime: 0,
|
|
37
|
+
stMtime: 0,
|
|
38
|
+
stCtime: 0,
|
|
39
|
+
stUid: 0,
|
|
40
|
+
stGid: 0,
|
|
41
|
+
stSize: 0
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
var FileStat = {
|
|
45
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
46
|
+
if (message.name !== "") {
|
|
47
|
+
writer.uint32(10).string(message.name);
|
|
48
|
+
}
|
|
49
|
+
if (message.path !== "") {
|
|
50
|
+
writer.uint32(18).string(message.path);
|
|
51
|
+
}
|
|
52
|
+
if (message.directory !== false) {
|
|
53
|
+
writer.uint32(24).bool(message.directory);
|
|
54
|
+
}
|
|
55
|
+
if (message.stMode !== 0) {
|
|
56
|
+
writer.uint32(32).int64(message.stMode);
|
|
57
|
+
}
|
|
58
|
+
if (message.stAtime !== 0) {
|
|
59
|
+
writer.uint32(40).int64(message.stAtime);
|
|
60
|
+
}
|
|
61
|
+
if (message.stMtime !== 0) {
|
|
62
|
+
writer.uint32(48).int64(message.stMtime);
|
|
63
|
+
}
|
|
64
|
+
if (message.stCtime !== 0) {
|
|
65
|
+
writer.uint32(56).int64(message.stCtime);
|
|
66
|
+
}
|
|
67
|
+
if (message.stUid !== 0) {
|
|
68
|
+
writer.uint32(64).int32(message.stUid);
|
|
69
|
+
}
|
|
70
|
+
if (message.stGid !== 0) {
|
|
71
|
+
writer.uint32(72).int32(message.stGid);
|
|
72
|
+
}
|
|
73
|
+
if (message.stSize !== 0) {
|
|
74
|
+
writer.uint32(80).int64(message.stSize);
|
|
75
|
+
}
|
|
76
|
+
return writer;
|
|
77
|
+
},
|
|
78
|
+
decode(input, length) {
|
|
79
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
80
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
81
|
+
const message = createBaseFileStat();
|
|
82
|
+
while (reader.pos < end) {
|
|
83
|
+
const tag = reader.uint32();
|
|
84
|
+
switch (tag >>> 3) {
|
|
85
|
+
case 1: {
|
|
86
|
+
if (tag !== 10) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
message.name = reader.string();
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
case 2: {
|
|
93
|
+
if (tag !== 18) {
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
message.path = reader.string();
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
case 3: {
|
|
100
|
+
if (tag !== 24) {
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
message.directory = reader.bool();
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
case 4: {
|
|
107
|
+
if (tag !== 32) {
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
message.stMode = longToNumber(reader.int64());
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
case 5: {
|
|
114
|
+
if (tag !== 40) {
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
message.stAtime = longToNumber(reader.int64());
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
case 6: {
|
|
121
|
+
if (tag !== 48) {
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
message.stMtime = longToNumber(reader.int64());
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
case 7: {
|
|
128
|
+
if (tag !== 56) {
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
message.stCtime = longToNumber(reader.int64());
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
case 8: {
|
|
135
|
+
if (tag !== 64) {
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
message.stUid = reader.int32();
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
case 9: {
|
|
142
|
+
if (tag !== 72) {
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
message.stGid = reader.int32();
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
case 10: {
|
|
149
|
+
if (tag !== 80) {
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
message.stSize = longToNumber(reader.int64());
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
reader.skip(tag & 7);
|
|
160
|
+
}
|
|
161
|
+
return message;
|
|
162
|
+
},
|
|
163
|
+
fromJSON(object) {
|
|
164
|
+
return {
|
|
165
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
166
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
167
|
+
directory: isSet(object.directory) ? globalThis.Boolean(object.directory) : false,
|
|
168
|
+
stMode: isSet(object.stMode) ? globalThis.Number(object.stMode) : 0,
|
|
169
|
+
stAtime: isSet(object.stAtime) ? globalThis.Number(object.stAtime) : 0,
|
|
170
|
+
stMtime: isSet(object.stMtime) ? globalThis.Number(object.stMtime) : 0,
|
|
171
|
+
stCtime: isSet(object.stCtime) ? globalThis.Number(object.stCtime) : 0,
|
|
172
|
+
stUid: isSet(object.stUid) ? globalThis.Number(object.stUid) : 0,
|
|
173
|
+
stGid: isSet(object.stGid) ? globalThis.Number(object.stGid) : 0,
|
|
174
|
+
stSize: isSet(object.stSize) ? globalThis.Number(object.stSize) : 0
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
toJSON(message) {
|
|
178
|
+
const obj = {};
|
|
179
|
+
if (message.name !== "") {
|
|
180
|
+
obj.name = message.name;
|
|
181
|
+
}
|
|
182
|
+
if (message.path !== "") {
|
|
183
|
+
obj.path = message.path;
|
|
184
|
+
}
|
|
185
|
+
if (message.directory !== false) {
|
|
186
|
+
obj.directory = message.directory;
|
|
187
|
+
}
|
|
188
|
+
if (message.stMode !== 0) {
|
|
189
|
+
obj.stMode = Math.round(message.stMode);
|
|
190
|
+
}
|
|
191
|
+
if (message.stAtime !== 0) {
|
|
192
|
+
obj.stAtime = Math.round(message.stAtime);
|
|
193
|
+
}
|
|
194
|
+
if (message.stMtime !== 0) {
|
|
195
|
+
obj.stMtime = Math.round(message.stMtime);
|
|
196
|
+
}
|
|
197
|
+
if (message.stCtime !== 0) {
|
|
198
|
+
obj.stCtime = Math.round(message.stCtime);
|
|
199
|
+
}
|
|
200
|
+
if (message.stUid !== 0) {
|
|
201
|
+
obj.stUid = Math.round(message.stUid);
|
|
202
|
+
}
|
|
203
|
+
if (message.stGid !== 0) {
|
|
204
|
+
obj.stGid = Math.round(message.stGid);
|
|
205
|
+
}
|
|
206
|
+
if (message.stSize !== 0) {
|
|
207
|
+
obj.stSize = Math.round(message.stSize);
|
|
208
|
+
}
|
|
209
|
+
return obj;
|
|
210
|
+
},
|
|
211
|
+
create(base) {
|
|
212
|
+
return FileStat.fromPartial(base ?? {});
|
|
213
|
+
},
|
|
214
|
+
fromPartial(object) {
|
|
215
|
+
const message = createBaseFileStat();
|
|
216
|
+
message.name = object.name ?? "";
|
|
217
|
+
message.path = object.path ?? "";
|
|
218
|
+
message.directory = object.directory ?? false;
|
|
219
|
+
message.stMode = object.stMode ?? 0;
|
|
220
|
+
message.stAtime = object.stAtime ?? 0;
|
|
221
|
+
message.stMtime = object.stMtime ?? 0;
|
|
222
|
+
message.stCtime = object.stCtime ?? 0;
|
|
223
|
+
message.stUid = object.stUid ?? 0;
|
|
224
|
+
message.stGid = object.stGid ?? 0;
|
|
225
|
+
message.stSize = object.stSize ?? 0;
|
|
226
|
+
return message;
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
function createBaseFileRequest() {
|
|
230
|
+
return { path: "", mode: 0, payload: new Uint8Array(0) };
|
|
231
|
+
}
|
|
232
|
+
var FileRequest = {
|
|
233
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
234
|
+
if (message.path !== "") {
|
|
235
|
+
writer.uint32(10).string(message.path);
|
|
236
|
+
}
|
|
237
|
+
if (message.mode !== 0) {
|
|
238
|
+
writer.uint32(16).uint64(message.mode);
|
|
239
|
+
}
|
|
240
|
+
if (message.payload.length !== 0) {
|
|
241
|
+
writer.uint32(26).bytes(message.payload);
|
|
242
|
+
}
|
|
243
|
+
return writer;
|
|
244
|
+
},
|
|
245
|
+
decode(input, length) {
|
|
246
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
247
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
248
|
+
const message = createBaseFileRequest();
|
|
249
|
+
while (reader.pos < end) {
|
|
250
|
+
const tag = reader.uint32();
|
|
251
|
+
switch (tag >>> 3) {
|
|
252
|
+
case 1: {
|
|
253
|
+
if (tag !== 10) {
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
message.path = reader.string();
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
case 2: {
|
|
260
|
+
if (tag !== 16) {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
message.mode = longToNumber(reader.uint64());
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
case 3: {
|
|
267
|
+
if (tag !== 26) {
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
message.payload = reader.bytes();
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
reader.skip(tag & 7);
|
|
278
|
+
}
|
|
279
|
+
return message;
|
|
280
|
+
},
|
|
281
|
+
fromJSON(object) {
|
|
282
|
+
return {
|
|
283
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
284
|
+
mode: isSet(object.mode) ? globalThis.Number(object.mode) : 0,
|
|
285
|
+
payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0)
|
|
286
|
+
};
|
|
287
|
+
},
|
|
288
|
+
toJSON(message) {
|
|
289
|
+
const obj = {};
|
|
290
|
+
if (message.path !== "") {
|
|
291
|
+
obj.path = message.path;
|
|
292
|
+
}
|
|
293
|
+
if (message.mode !== 0) {
|
|
294
|
+
obj.mode = Math.round(message.mode);
|
|
295
|
+
}
|
|
296
|
+
if (message.payload.length !== 0) {
|
|
297
|
+
obj.payload = base64FromBytes(message.payload);
|
|
298
|
+
}
|
|
299
|
+
return obj;
|
|
300
|
+
},
|
|
301
|
+
create(base) {
|
|
302
|
+
return FileRequest.fromPartial(base ?? {});
|
|
303
|
+
},
|
|
304
|
+
fromPartial(object) {
|
|
305
|
+
const message = createBaseFileRequest();
|
|
306
|
+
message.path = object.path ?? "";
|
|
307
|
+
message.mode = object.mode ?? 0;
|
|
308
|
+
message.payload = object.payload ?? new Uint8Array(0);
|
|
309
|
+
return message;
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
function createBaseFileDataResponse() {
|
|
313
|
+
return { payload: new Uint8Array(0) };
|
|
314
|
+
}
|
|
315
|
+
var FileDataResponse = {
|
|
316
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
317
|
+
if (message.payload.length !== 0) {
|
|
318
|
+
writer.uint32(10).bytes(message.payload);
|
|
319
|
+
}
|
|
320
|
+
return writer;
|
|
321
|
+
},
|
|
322
|
+
decode(input, length) {
|
|
323
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
324
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
325
|
+
const message = createBaseFileDataResponse();
|
|
326
|
+
while (reader.pos < end) {
|
|
327
|
+
const tag = reader.uint32();
|
|
328
|
+
switch (tag >>> 3) {
|
|
329
|
+
case 1: {
|
|
330
|
+
if (tag !== 10) {
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
message.payload = reader.bytes();
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
reader.skip(tag & 7);
|
|
341
|
+
}
|
|
342
|
+
return message;
|
|
343
|
+
},
|
|
344
|
+
fromJSON(object) {
|
|
345
|
+
return { payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0) };
|
|
346
|
+
},
|
|
347
|
+
toJSON(message) {
|
|
348
|
+
const obj = {};
|
|
349
|
+
if (message.payload.length !== 0) {
|
|
350
|
+
obj.payload = base64FromBytes(message.payload);
|
|
351
|
+
}
|
|
352
|
+
return obj;
|
|
353
|
+
},
|
|
354
|
+
create(base) {
|
|
355
|
+
return FileDataResponse.fromPartial(base ?? {});
|
|
356
|
+
},
|
|
357
|
+
fromPartial(object) {
|
|
358
|
+
const message = createBaseFileDataResponse();
|
|
359
|
+
message.payload = object.payload ?? new Uint8Array(0);
|
|
360
|
+
return message;
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
function bytesFromBase64(b64) {
|
|
364
|
+
if (globalThis.Buffer) {
|
|
365
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
366
|
+
} else {
|
|
367
|
+
const bin = globalThis.atob(b64);
|
|
368
|
+
const arr = new Uint8Array(bin.length);
|
|
369
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
370
|
+
arr[i] = bin.charCodeAt(i);
|
|
371
|
+
}
|
|
372
|
+
return arr;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
function base64FromBytes(arr) {
|
|
376
|
+
if (globalThis.Buffer) {
|
|
377
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
378
|
+
} else {
|
|
379
|
+
const bin = [];
|
|
380
|
+
arr.forEach((byte) => {
|
|
381
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
382
|
+
});
|
|
383
|
+
return globalThis.btoa(bin.join(""));
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
function longToNumber(int64) {
|
|
387
|
+
const num = globalThis.Number(int64.toString());
|
|
388
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
389
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
390
|
+
}
|
|
391
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
392
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
393
|
+
}
|
|
394
|
+
return num;
|
|
395
|
+
}
|
|
396
|
+
function isSet(value) {
|
|
397
|
+
return value !== null && value !== void 0;
|
|
398
|
+
}
|
|
399
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
400
|
+
0 && (module.exports = {
|
|
401
|
+
FileDataResponse,
|
|
402
|
+
FileRequest,
|
|
403
|
+
FileStat,
|
|
404
|
+
protobufPackage
|
|
405
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
declare const protobufPackage = "lamda.rpc";
|
|
4
|
+
interface FileStat {
|
|
5
|
+
name: string;
|
|
6
|
+
path: string;
|
|
7
|
+
directory: boolean;
|
|
8
|
+
stMode: number;
|
|
9
|
+
stAtime: number;
|
|
10
|
+
stMtime: number;
|
|
11
|
+
stCtime: number;
|
|
12
|
+
stUid: number;
|
|
13
|
+
stGid: number;
|
|
14
|
+
stSize: number;
|
|
15
|
+
}
|
|
16
|
+
declare const FileStat: MessageFns<FileStat>;
|
|
17
|
+
interface FileRequest {
|
|
18
|
+
path: string;
|
|
19
|
+
mode: number;
|
|
20
|
+
payload: Uint8Array;
|
|
21
|
+
}
|
|
22
|
+
declare const FileRequest: MessageFns<FileRequest>;
|
|
23
|
+
interface FileDataResponse {
|
|
24
|
+
payload: Uint8Array;
|
|
25
|
+
}
|
|
26
|
+
declare const FileDataResponse: MessageFns<FileDataResponse>;
|
|
27
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
28
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
29
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
30
|
+
} : Partial<T>;
|
|
31
|
+
interface MessageFns<T> {
|
|
32
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
33
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
34
|
+
fromJSON(object: any): T;
|
|
35
|
+
toJSON(message: T): unknown;
|
|
36
|
+
create(base?: DeepPartial<T>): T;
|
|
37
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { type DeepPartial, FileDataResponse, FileRequest, FileStat, type MessageFns, protobufPackage };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
declare const protobufPackage = "lamda.rpc";
|
|
4
|
+
interface FileStat {
|
|
5
|
+
name: string;
|
|
6
|
+
path: string;
|
|
7
|
+
directory: boolean;
|
|
8
|
+
stMode: number;
|
|
9
|
+
stAtime: number;
|
|
10
|
+
stMtime: number;
|
|
11
|
+
stCtime: number;
|
|
12
|
+
stUid: number;
|
|
13
|
+
stGid: number;
|
|
14
|
+
stSize: number;
|
|
15
|
+
}
|
|
16
|
+
declare const FileStat: MessageFns<FileStat>;
|
|
17
|
+
interface FileRequest {
|
|
18
|
+
path: string;
|
|
19
|
+
mode: number;
|
|
20
|
+
payload: Uint8Array;
|
|
21
|
+
}
|
|
22
|
+
declare const FileRequest: MessageFns<FileRequest>;
|
|
23
|
+
interface FileDataResponse {
|
|
24
|
+
payload: Uint8Array;
|
|
25
|
+
}
|
|
26
|
+
declare const FileDataResponse: MessageFns<FileDataResponse>;
|
|
27
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
28
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
29
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
30
|
+
} : Partial<T>;
|
|
31
|
+
interface MessageFns<T> {
|
|
32
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
33
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
34
|
+
fromJSON(object: any): T;
|
|
35
|
+
toJSON(message: T): unknown;
|
|
36
|
+
create(base?: DeepPartial<T>): T;
|
|
37
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { type DeepPartial, FileDataResponse, FileRequest, FileStat, type MessageFns, protobufPackage };
|
package/dist/rpc/file.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/rpc/google/protobuf/any.ts
|
|
20
|
+
var any_exports = {};
|
|
21
|
+
__export(any_exports, {
|
|
22
|
+
Any: () => Any,
|
|
23
|
+
protobufPackage: () => protobufPackage
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(any_exports);
|
|
26
|
+
var import_wire = require("@bufbuild/protobuf/wire");
|
|
27
|
+
var protobufPackage = "google.protobuf";
|
|
28
|
+
function createBaseAny() {
|
|
29
|
+
return { typeUrl: "", value: new Uint8Array(0) };
|
|
30
|
+
}
|
|
31
|
+
var Any = {
|
|
32
|
+
encode(message, writer = new import_wire.BinaryWriter()) {
|
|
33
|
+
if (message.typeUrl !== "") {
|
|
34
|
+
writer.uint32(10).string(message.typeUrl);
|
|
35
|
+
}
|
|
36
|
+
if (message.value.length !== 0) {
|
|
37
|
+
writer.uint32(18).bytes(message.value);
|
|
38
|
+
}
|
|
39
|
+
return writer;
|
|
40
|
+
},
|
|
41
|
+
decode(input, length) {
|
|
42
|
+
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
|
|
43
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
44
|
+
const message = createBaseAny();
|
|
45
|
+
while (reader.pos < end) {
|
|
46
|
+
const tag = reader.uint32();
|
|
47
|
+
switch (tag >>> 3) {
|
|
48
|
+
case 1: {
|
|
49
|
+
if (tag !== 10) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
message.typeUrl = reader.string();
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
case 2: {
|
|
56
|
+
if (tag !== 18) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
message.value = reader.bytes();
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
reader.skip(tag & 7);
|
|
67
|
+
}
|
|
68
|
+
return message;
|
|
69
|
+
},
|
|
70
|
+
fromJSON(object) {
|
|
71
|
+
return {
|
|
72
|
+
typeUrl: isSet(object.typeUrl) ? globalThis.String(object.typeUrl) : "",
|
|
73
|
+
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0)
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
toJSON(message) {
|
|
77
|
+
const obj = {};
|
|
78
|
+
if (message.typeUrl !== "") {
|
|
79
|
+
obj.typeUrl = message.typeUrl;
|
|
80
|
+
}
|
|
81
|
+
if (message.value.length !== 0) {
|
|
82
|
+
obj.value = base64FromBytes(message.value);
|
|
83
|
+
}
|
|
84
|
+
return obj;
|
|
85
|
+
},
|
|
86
|
+
create(base) {
|
|
87
|
+
return Any.fromPartial(base ?? {});
|
|
88
|
+
},
|
|
89
|
+
fromPartial(object) {
|
|
90
|
+
const message = createBaseAny();
|
|
91
|
+
message.typeUrl = object.typeUrl ?? "";
|
|
92
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
93
|
+
return message;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
function bytesFromBase64(b64) {
|
|
97
|
+
if (globalThis.Buffer) {
|
|
98
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
99
|
+
} else {
|
|
100
|
+
const bin = globalThis.atob(b64);
|
|
101
|
+
const arr = new Uint8Array(bin.length);
|
|
102
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
103
|
+
arr[i] = bin.charCodeAt(i);
|
|
104
|
+
}
|
|
105
|
+
return arr;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function base64FromBytes(arr) {
|
|
109
|
+
if (globalThis.Buffer) {
|
|
110
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
111
|
+
} else {
|
|
112
|
+
const bin = [];
|
|
113
|
+
arr.forEach((byte) => {
|
|
114
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
115
|
+
});
|
|
116
|
+
return globalThis.btoa(bin.join(""));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function isSet(value) {
|
|
120
|
+
return value !== null && value !== void 0;
|
|
121
|
+
}
|
|
122
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
123
|
+
0 && (module.exports = {
|
|
124
|
+
Any,
|
|
125
|
+
protobufPackage
|
|
126
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
declare const protobufPackage = "google.protobuf";
|
|
4
|
+
interface Any {
|
|
5
|
+
typeUrl: string;
|
|
6
|
+
value: Uint8Array;
|
|
7
|
+
}
|
|
8
|
+
declare const Any: MessageFns<Any>;
|
|
9
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
10
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
11
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
12
|
+
} : Partial<T>;
|
|
13
|
+
interface MessageFns<T> {
|
|
14
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
15
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
16
|
+
fromJSON(object: any): T;
|
|
17
|
+
toJSON(message: T): unknown;
|
|
18
|
+
create(base?: DeepPartial<T>): T;
|
|
19
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { Any, type DeepPartial, type MessageFns, protobufPackage };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
|
|
3
|
+
declare const protobufPackage = "google.protobuf";
|
|
4
|
+
interface Any {
|
|
5
|
+
typeUrl: string;
|
|
6
|
+
value: Uint8Array;
|
|
7
|
+
}
|
|
8
|
+
declare const Any: MessageFns<Any>;
|
|
9
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
10
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
11
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
12
|
+
} : Partial<T>;
|
|
13
|
+
interface MessageFns<T> {
|
|
14
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
15
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
16
|
+
fromJSON(object: any): T;
|
|
17
|
+
toJSON(message: T): unknown;
|
|
18
|
+
create(base?: DeepPartial<T>): T;
|
|
19
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { Any, type DeepPartial, type MessageFns, protobufPackage };
|