@ekhein/lamda-node-sdk 1.0.3 → 2.0.1

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