@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,48 @@
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-3HDKHFYE.js";
17
+ import "../chunk-6HD35RPW.js";
18
+ import "../chunk-4AHM55IO.js";
19
+ import "../chunk-X4LTH2UN.js";
20
+ import "../chunk-ZXF5DGTC.js";
21
+ import "../chunk-7YGA6EOV.js";
22
+ import "../chunk-O52JGDU7.js";
23
+ import "../chunk-H7Z6XFBF.js";
24
+ import "../chunk-WFQEBPE6.js";
25
+ import "../chunk-7XF22HAW.js";
26
+ import "../chunk-XAX5BZL3.js";
27
+ import "../chunk-QXMPY6EE.js";
28
+ import "../chunk-SBFKX3ZY.js";
29
+ import "../chunk-3JBDAA2H.js";
30
+ import "../chunk-KJKSI2WL.js";
31
+ import "../chunk-ORXTTWPB.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
+ };
@@ -0,0 +1,161 @@
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
+ });
@@ -0,0 +1,31 @@
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 };
@@ -0,0 +1,31 @@
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 };
@@ -0,0 +1,15 @@
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
+ };
@@ -0,0 +1,326 @@
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
+ });
@@ -0,0 +1,36 @@
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 };
@@ -0,0 +1,36 @@
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 };
@@ -0,0 +1,13 @@
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
+ };