@lazycatcloud/sdk 0.1.144 → 0.1.146

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 (58) hide show
  1. package/dist/common/media_meta.js +2 -2
  2. package/dist/common/media_meta.js.map +1 -1
  3. package/dist/extentions/app_common.d.ts.map +1 -1
  4. package/dist/extentions/app_common.js +43 -18
  5. package/dist/extentions/app_common.js.map +1 -1
  6. package/dist/extentions/base.d.ts +2 -2
  7. package/dist/extentions/base.d.ts.map +1 -1
  8. package/dist/extentions/base.js +3 -3
  9. package/dist/extentions/base.js.map +1 -1
  10. package/dist/package.json +10 -2
  11. package/package.json +10 -2
  12. package/common/box.ts +0 -545
  13. package/common/browseronly.ts +0 -520
  14. package/common/end_device.ts +0 -635
  15. package/common/file_handler.ts +0 -485
  16. package/common/filetrans.ts +0 -1936
  17. package/common/gateway.ts +0 -663
  18. package/common/media_meta.ts +0 -319
  19. package/common/message.ts +0 -242
  20. package/common/peripheral_device.ts +0 -783
  21. package/common/security_context.ts +0 -729
  22. package/common/users.ts +0 -1044
  23. package/dlna/dlna.ts +0 -895
  24. package/docs/contribute.md +0 -40
  25. package/docs/extentions/AppCommon.md +0 -30
  26. package/extentions/app_common.ts +0 -63
  27. package/extentions/base.ts +0 -459
  28. package/extentions/index.ts +0 -27
  29. package/extentions/safe_app.ts +0 -60
  30. package/extentions/unsafe_app.ts +0 -107
  31. package/google/protobuf/descriptor.ts +0 -3778
  32. package/google/protobuf/empty.ts +0 -64
  33. package/google/protobuf/timestamp.ts +0 -214
  34. package/grpcweb.ts +0 -106
  35. package/index.ts +0 -204
  36. package/lanforward/lanforward.ts +0 -301
  37. package/localdevice/clipboard.ts +0 -499
  38. package/localdevice/config.ts +0 -268
  39. package/localdevice/device.ts +0 -218
  40. package/localdevice/dialog.ts +0 -707
  41. package/localdevice/local-launch.ts +0 -954
  42. package/localdevice/network.ts +0 -273
  43. package/localdevice/permission.ts +0 -733
  44. package/localdevice/photo.ts +0 -1497
  45. package/ssdp/ssdp.ts +0 -332
  46. package/sys/OS_daemon.ts +0 -325
  47. package/sys/OS_snapshot.ts +0 -1714
  48. package/sys/OS_upgrader.ts +0 -782
  49. package/sys/btrfs.ts +0 -530
  50. package/sys/devopt.ts +0 -250
  51. package/sys/event.ts +0 -787
  52. package/sys/hc-core/hc-core.ts +0 -1582
  53. package/sys/ingress.ts +0 -953
  54. package/sys/network_manager.ts +0 -874
  55. package/sys/package_manager.ts +0 -1931
  56. package/sys/portal-server/portal-server.ts +0 -2934
  57. package/sys/snapd.ts +0 -861
  58. package/tsconfig.json +0 -15
package/sys/btrfs.ts DELETED
@@ -1,530 +0,0 @@
1
- /* eslint-disable */
2
- import { grpc } from "@improbable-eng/grpc-web";
3
- import { BrowserHeaders } from "browser-headers";
4
- import Long from "long";
5
- import _m0 from "protobufjs/minimal";
6
- import { Empty } from "../google/protobuf/empty";
7
-
8
- export interface BtrfsSubvolCreateRequest {
9
- path: string;
10
- force: boolean;
11
- }
12
-
13
- export interface BtrfsSubvolInfoRequest {
14
- path: string;
15
- }
16
-
17
- export interface BtrfsSubvolInfoResponse {
18
- uuid: string;
19
- gen: number;
20
- }
21
-
22
- export interface BtrfsSubvolFindNewRequest {
23
- path: string;
24
- gen: number;
25
- }
26
-
27
- export interface BtrfsSubvolFindNewResponse {
28
- files: string[];
29
- gen: number;
30
- }
31
-
32
- function createBaseBtrfsSubvolCreateRequest(): BtrfsSubvolCreateRequest {
33
- return { path: "", force: false };
34
- }
35
-
36
- export const BtrfsSubvolCreateRequest = {
37
- encode(message: BtrfsSubvolCreateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
38
- if (message.path !== "") {
39
- writer.uint32(10).string(message.path);
40
- }
41
- if (message.force === true) {
42
- writer.uint32(16).bool(message.force);
43
- }
44
- return writer;
45
- },
46
-
47
- decode(input: _m0.Reader | Uint8Array, length?: number): BtrfsSubvolCreateRequest {
48
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
49
- let end = length === undefined ? reader.len : reader.pos + length;
50
- const message = createBaseBtrfsSubvolCreateRequest();
51
- while (reader.pos < end) {
52
- const tag = reader.uint32();
53
- switch (tag >>> 3) {
54
- case 1:
55
- message.path = reader.string();
56
- break;
57
- case 2:
58
- message.force = reader.bool();
59
- break;
60
- default:
61
- reader.skipType(tag & 7);
62
- break;
63
- }
64
- }
65
- return message;
66
- },
67
-
68
- fromJSON(object: any): BtrfsSubvolCreateRequest {
69
- return {
70
- path: isSet(object.path) ? String(object.path) : "",
71
- force: isSet(object.force) ? Boolean(object.force) : false,
72
- };
73
- },
74
-
75
- toJSON(message: BtrfsSubvolCreateRequest): unknown {
76
- const obj: any = {};
77
- message.path !== undefined && (obj.path = message.path);
78
- message.force !== undefined && (obj.force = message.force);
79
- return obj;
80
- },
81
-
82
- fromPartial<I extends Exact<DeepPartial<BtrfsSubvolCreateRequest>, I>>(object: I): BtrfsSubvolCreateRequest {
83
- const message = createBaseBtrfsSubvolCreateRequest();
84
- message.path = object.path ?? "";
85
- message.force = object.force ?? false;
86
- return message;
87
- },
88
- };
89
-
90
- function createBaseBtrfsSubvolInfoRequest(): BtrfsSubvolInfoRequest {
91
- return { path: "" };
92
- }
93
-
94
- export const BtrfsSubvolInfoRequest = {
95
- encode(message: BtrfsSubvolInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
96
- if (message.path !== "") {
97
- writer.uint32(10).string(message.path);
98
- }
99
- return writer;
100
- },
101
-
102
- decode(input: _m0.Reader | Uint8Array, length?: number): BtrfsSubvolInfoRequest {
103
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
104
- let end = length === undefined ? reader.len : reader.pos + length;
105
- const message = createBaseBtrfsSubvolInfoRequest();
106
- while (reader.pos < end) {
107
- const tag = reader.uint32();
108
- switch (tag >>> 3) {
109
- case 1:
110
- message.path = reader.string();
111
- break;
112
- default:
113
- reader.skipType(tag & 7);
114
- break;
115
- }
116
- }
117
- return message;
118
- },
119
-
120
- fromJSON(object: any): BtrfsSubvolInfoRequest {
121
- return { path: isSet(object.path) ? String(object.path) : "" };
122
- },
123
-
124
- toJSON(message: BtrfsSubvolInfoRequest): unknown {
125
- const obj: any = {};
126
- message.path !== undefined && (obj.path = message.path);
127
- return obj;
128
- },
129
-
130
- fromPartial<I extends Exact<DeepPartial<BtrfsSubvolInfoRequest>, I>>(object: I): BtrfsSubvolInfoRequest {
131
- const message = createBaseBtrfsSubvolInfoRequest();
132
- message.path = object.path ?? "";
133
- return message;
134
- },
135
- };
136
-
137
- function createBaseBtrfsSubvolInfoResponse(): BtrfsSubvolInfoResponse {
138
- return { uuid: "", gen: 0 };
139
- }
140
-
141
- export const BtrfsSubvolInfoResponse = {
142
- encode(message: BtrfsSubvolInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
143
- if (message.uuid !== "") {
144
- writer.uint32(10).string(message.uuid);
145
- }
146
- if (message.gen !== 0) {
147
- writer.uint32(16).uint64(message.gen);
148
- }
149
- return writer;
150
- },
151
-
152
- decode(input: _m0.Reader | Uint8Array, length?: number): BtrfsSubvolInfoResponse {
153
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
154
- let end = length === undefined ? reader.len : reader.pos + length;
155
- const message = createBaseBtrfsSubvolInfoResponse();
156
- while (reader.pos < end) {
157
- const tag = reader.uint32();
158
- switch (tag >>> 3) {
159
- case 1:
160
- message.uuid = reader.string();
161
- break;
162
- case 2:
163
- message.gen = longToNumber(reader.uint64() as Long);
164
- break;
165
- default:
166
- reader.skipType(tag & 7);
167
- break;
168
- }
169
- }
170
- return message;
171
- },
172
-
173
- fromJSON(object: any): BtrfsSubvolInfoResponse {
174
- return { uuid: isSet(object.uuid) ? String(object.uuid) : "", gen: isSet(object.gen) ? Number(object.gen) : 0 };
175
- },
176
-
177
- toJSON(message: BtrfsSubvolInfoResponse): unknown {
178
- const obj: any = {};
179
- message.uuid !== undefined && (obj.uuid = message.uuid);
180
- message.gen !== undefined && (obj.gen = Math.round(message.gen));
181
- return obj;
182
- },
183
-
184
- fromPartial<I extends Exact<DeepPartial<BtrfsSubvolInfoResponse>, I>>(object: I): BtrfsSubvolInfoResponse {
185
- const message = createBaseBtrfsSubvolInfoResponse();
186
- message.uuid = object.uuid ?? "";
187
- message.gen = object.gen ?? 0;
188
- return message;
189
- },
190
- };
191
-
192
- function createBaseBtrfsSubvolFindNewRequest(): BtrfsSubvolFindNewRequest {
193
- return { path: "", gen: 0 };
194
- }
195
-
196
- export const BtrfsSubvolFindNewRequest = {
197
- encode(message: BtrfsSubvolFindNewRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
198
- if (message.path !== "") {
199
- writer.uint32(10).string(message.path);
200
- }
201
- if (message.gen !== 0) {
202
- writer.uint32(16).uint64(message.gen);
203
- }
204
- return writer;
205
- },
206
-
207
- decode(input: _m0.Reader | Uint8Array, length?: number): BtrfsSubvolFindNewRequest {
208
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
209
- let end = length === undefined ? reader.len : reader.pos + length;
210
- const message = createBaseBtrfsSubvolFindNewRequest();
211
- while (reader.pos < end) {
212
- const tag = reader.uint32();
213
- switch (tag >>> 3) {
214
- case 1:
215
- message.path = reader.string();
216
- break;
217
- case 2:
218
- message.gen = longToNumber(reader.uint64() as Long);
219
- break;
220
- default:
221
- reader.skipType(tag & 7);
222
- break;
223
- }
224
- }
225
- return message;
226
- },
227
-
228
- fromJSON(object: any): BtrfsSubvolFindNewRequest {
229
- return { path: isSet(object.path) ? String(object.path) : "", gen: isSet(object.gen) ? Number(object.gen) : 0 };
230
- },
231
-
232
- toJSON(message: BtrfsSubvolFindNewRequest): unknown {
233
- const obj: any = {};
234
- message.path !== undefined && (obj.path = message.path);
235
- message.gen !== undefined && (obj.gen = Math.round(message.gen));
236
- return obj;
237
- },
238
-
239
- fromPartial<I extends Exact<DeepPartial<BtrfsSubvolFindNewRequest>, I>>(object: I): BtrfsSubvolFindNewRequest {
240
- const message = createBaseBtrfsSubvolFindNewRequest();
241
- message.path = object.path ?? "";
242
- message.gen = object.gen ?? 0;
243
- return message;
244
- },
245
- };
246
-
247
- function createBaseBtrfsSubvolFindNewResponse(): BtrfsSubvolFindNewResponse {
248
- return { files: [], gen: 0 };
249
- }
250
-
251
- export const BtrfsSubvolFindNewResponse = {
252
- encode(message: BtrfsSubvolFindNewResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
253
- for (const v of message.files) {
254
- writer.uint32(10).string(v!);
255
- }
256
- if (message.gen !== 0) {
257
- writer.uint32(16).uint64(message.gen);
258
- }
259
- return writer;
260
- },
261
-
262
- decode(input: _m0.Reader | Uint8Array, length?: number): BtrfsSubvolFindNewResponse {
263
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
264
- let end = length === undefined ? reader.len : reader.pos + length;
265
- const message = createBaseBtrfsSubvolFindNewResponse();
266
- while (reader.pos < end) {
267
- const tag = reader.uint32();
268
- switch (tag >>> 3) {
269
- case 1:
270
- message.files.push(reader.string());
271
- break;
272
- case 2:
273
- message.gen = longToNumber(reader.uint64() as Long);
274
- break;
275
- default:
276
- reader.skipType(tag & 7);
277
- break;
278
- }
279
- }
280
- return message;
281
- },
282
-
283
- fromJSON(object: any): BtrfsSubvolFindNewResponse {
284
- return {
285
- files: Array.isArray(object?.files) ? object.files.map((e: any) => String(e)) : [],
286
- gen: isSet(object.gen) ? Number(object.gen) : 0,
287
- };
288
- },
289
-
290
- toJSON(message: BtrfsSubvolFindNewResponse): unknown {
291
- const obj: any = {};
292
- if (message.files) {
293
- obj.files = message.files.map((e) => e);
294
- } else {
295
- obj.files = [];
296
- }
297
- message.gen !== undefined && (obj.gen = Math.round(message.gen));
298
- return obj;
299
- },
300
-
301
- fromPartial<I extends Exact<DeepPartial<BtrfsSubvolFindNewResponse>, I>>(object: I): BtrfsSubvolFindNewResponse {
302
- const message = createBaseBtrfsSubvolFindNewResponse();
303
- message.files = object.files?.map((e) => e) || [];
304
- message.gen = object.gen ?? 0;
305
- return message;
306
- },
307
- };
308
-
309
- export interface BtrfsUtil {
310
- SubvolCreate(request: DeepPartial<BtrfsSubvolCreateRequest>, metadata?: grpc.Metadata): Promise<Empty>;
311
- SubvolInfo(request: DeepPartial<BtrfsSubvolInfoRequest>, metadata?: grpc.Metadata): Promise<BtrfsSubvolInfoResponse>;
312
- SubvolFindNew(
313
- request: DeepPartial<BtrfsSubvolFindNewRequest>,
314
- metadata?: grpc.Metadata,
315
- ): Promise<BtrfsSubvolFindNewResponse>;
316
- }
317
-
318
- export class BtrfsUtilClientImpl implements BtrfsUtil {
319
- private readonly rpc: Rpc;
320
-
321
- constructor(rpc: Rpc) {
322
- this.rpc = rpc;
323
- this.SubvolCreate = this.SubvolCreate.bind(this);
324
- this.SubvolInfo = this.SubvolInfo.bind(this);
325
- this.SubvolFindNew = this.SubvolFindNew.bind(this);
326
- }
327
-
328
- SubvolCreate(request: DeepPartial<BtrfsSubvolCreateRequest>, metadata?: grpc.Metadata): Promise<Empty> {
329
- return this.rpc.unary(BtrfsUtilSubvolCreateDesc, BtrfsSubvolCreateRequest.fromPartial(request), metadata);
330
- }
331
-
332
- SubvolInfo(request: DeepPartial<BtrfsSubvolInfoRequest>, metadata?: grpc.Metadata): Promise<BtrfsSubvolInfoResponse> {
333
- return this.rpc.unary(BtrfsUtilSubvolInfoDesc, BtrfsSubvolInfoRequest.fromPartial(request), metadata);
334
- }
335
-
336
- SubvolFindNew(
337
- request: DeepPartial<BtrfsSubvolFindNewRequest>,
338
- metadata?: grpc.Metadata,
339
- ): Promise<BtrfsSubvolFindNewResponse> {
340
- return this.rpc.unary(BtrfsUtilSubvolFindNewDesc, BtrfsSubvolFindNewRequest.fromPartial(request), metadata);
341
- }
342
- }
343
-
344
- export const BtrfsUtilDesc = { serviceName: "cloud.lazycat.apis.sys.BtrfsUtil" };
345
-
346
- export const BtrfsUtilSubvolCreateDesc: UnaryMethodDefinitionish = {
347
- methodName: "SubvolCreate",
348
- service: BtrfsUtilDesc,
349
- requestStream: false,
350
- responseStream: false,
351
- requestType: {
352
- serializeBinary() {
353
- return BtrfsSubvolCreateRequest.encode(this).finish();
354
- },
355
- } as any,
356
- responseType: {
357
- deserializeBinary(data: Uint8Array) {
358
- return {
359
- ...Empty.decode(data),
360
- toObject() {
361
- return this;
362
- },
363
- };
364
- },
365
- } as any,
366
- };
367
-
368
- export const BtrfsUtilSubvolInfoDesc: UnaryMethodDefinitionish = {
369
- methodName: "SubvolInfo",
370
- service: BtrfsUtilDesc,
371
- requestStream: false,
372
- responseStream: false,
373
- requestType: {
374
- serializeBinary() {
375
- return BtrfsSubvolInfoRequest.encode(this).finish();
376
- },
377
- } as any,
378
- responseType: {
379
- deserializeBinary(data: Uint8Array) {
380
- return {
381
- ...BtrfsSubvolInfoResponse.decode(data),
382
- toObject() {
383
- return this;
384
- },
385
- };
386
- },
387
- } as any,
388
- };
389
-
390
- export const BtrfsUtilSubvolFindNewDesc: UnaryMethodDefinitionish = {
391
- methodName: "SubvolFindNew",
392
- service: BtrfsUtilDesc,
393
- requestStream: false,
394
- responseStream: false,
395
- requestType: {
396
- serializeBinary() {
397
- return BtrfsSubvolFindNewRequest.encode(this).finish();
398
- },
399
- } as any,
400
- responseType: {
401
- deserializeBinary(data: Uint8Array) {
402
- return {
403
- ...BtrfsSubvolFindNewResponse.decode(data),
404
- toObject() {
405
- return this;
406
- },
407
- };
408
- },
409
- } as any,
410
- };
411
-
412
- interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition<any, any> {
413
- requestStream: any;
414
- responseStream: any;
415
- }
416
-
417
- type UnaryMethodDefinitionish = UnaryMethodDefinitionishR;
418
-
419
- interface Rpc {
420
- unary<T extends UnaryMethodDefinitionish>(
421
- methodDesc: T,
422
- request: any,
423
- metadata: grpc.Metadata | undefined,
424
- ): Promise<any>;
425
- }
426
-
427
- export class GrpcWebImpl {
428
- private host: string;
429
- private options: {
430
- transport?: grpc.TransportFactory;
431
-
432
- debug?: boolean;
433
- metadata?: grpc.Metadata;
434
- upStreamRetryCodes?: number[];
435
- };
436
-
437
- constructor(
438
- host: string,
439
- options: {
440
- transport?: grpc.TransportFactory;
441
-
442
- debug?: boolean;
443
- metadata?: grpc.Metadata;
444
- upStreamRetryCodes?: number[];
445
- },
446
- ) {
447
- this.host = host;
448
- this.options = options;
449
- }
450
-
451
- unary<T extends UnaryMethodDefinitionish>(
452
- methodDesc: T,
453
- _request: any,
454
- metadata: grpc.Metadata | undefined,
455
- ): Promise<any> {
456
- const request = { ..._request, ...methodDesc.requestType };
457
- const maybeCombinedMetadata = metadata && this.options.metadata
458
- ? new BrowserHeaders({ ...this.options?.metadata.headersMap, ...metadata?.headersMap })
459
- : metadata || this.options.metadata;
460
- return new Promise((resolve, reject) => {
461
- grpc.unary(methodDesc, {
462
- request,
463
- host: this.host,
464
- metadata: maybeCombinedMetadata,
465
- transport: this.options.transport,
466
- debug: this.options.debug,
467
- onEnd: function (response) {
468
- if (response.status === grpc.Code.OK) {
469
- resolve(response.message);
470
- } else {
471
- const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
472
- reject(err);
473
- }
474
- },
475
- });
476
- });
477
- }
478
- }
479
-
480
- declare var self: any | undefined;
481
- declare var window: any | undefined;
482
- declare var global: any | undefined;
483
- var globalThis: any = (() => {
484
- if (typeof globalThis !== "undefined") {
485
- return globalThis;
486
- }
487
- if (typeof self !== "undefined") {
488
- return self;
489
- }
490
- if (typeof window !== "undefined") {
491
- return window;
492
- }
493
- if (typeof global !== "undefined") {
494
- return global;
495
- }
496
- throw "Unable to locate global object";
497
- })();
498
-
499
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
500
-
501
- type DeepPartial<T> = T extends Builtin ? T
502
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
503
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
504
- : Partial<T>;
505
-
506
- type KeysOfUnion<T> = T extends T ? keyof T : never;
507
- type Exact<P, I extends P> = P extends Builtin ? P
508
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
509
-
510
- function longToNumber(long: Long): number {
511
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
512
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
513
- }
514
- return long.toNumber();
515
- }
516
-
517
- if (_m0.util.Long !== Long) {
518
- _m0.util.Long = Long as any;
519
- _m0.configure();
520
- }
521
-
522
- function isSet(value: any): boolean {
523
- return value !== null && value !== undefined;
524
- }
525
-
526
- export class GrpcWebError extends Error {
527
- constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) {
528
- super(message);
529
- }
530
- }