@jetstart/shared 1.1.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 (67) hide show
  1. package/README.md +108 -0
  2. package/dist/index.d.ts +4 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +23 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/protocols/events.d.ts +114 -0
  7. package/dist/protocols/events.d.ts.map +1 -0
  8. package/dist/protocols/events.js +7 -0
  9. package/dist/protocols/events.js.map +1 -0
  10. package/dist/protocols/index.d.ts +3 -0
  11. package/dist/protocols/index.d.ts.map +1 -0
  12. package/dist/protocols/index.js +20 -0
  13. package/dist/protocols/index.js.map +1 -0
  14. package/dist/protocols/websocket.d.ts +110 -0
  15. package/dist/protocols/websocket.d.ts.map +1 -0
  16. package/dist/protocols/websocket.js +28 -0
  17. package/dist/protocols/websocket.js.map +1 -0
  18. package/dist/types/build.d.ts +76 -0
  19. package/dist/types/build.d.ts.map +1 -0
  20. package/dist/types/build.js +30 -0
  21. package/dist/types/build.js.map +1 -0
  22. package/dist/types/device.d.ts +45 -0
  23. package/dist/types/device.d.ts.map +1 -0
  24. package/dist/types/device.js +27 -0
  25. package/dist/types/device.js.map +1 -0
  26. package/dist/types/index.d.ts +5 -0
  27. package/dist/types/index.d.ts.map +1 -0
  28. package/dist/types/index.js +22 -0
  29. package/dist/types/index.js.map +1 -0
  30. package/dist/types/log.d.ts +47 -0
  31. package/dist/types/log.d.ts.map +1 -0
  32. package/dist/types/log.js +26 -0
  33. package/dist/types/log.js.map +1 -0
  34. package/dist/types/session.d.ts +51 -0
  35. package/dist/types/session.d.ts.map +1 -0
  36. package/dist/types/session.js +22 -0
  37. package/dist/types/session.js.map +1 -0
  38. package/dist/utils/constants.d.ts +105 -0
  39. package/dist/utils/constants.d.ts.map +1 -0
  40. package/dist/utils/constants.js +123 -0
  41. package/dist/utils/constants.js.map +1 -0
  42. package/dist/utils/index.d.ts +3 -0
  43. package/dist/utils/index.d.ts.map +1 -0
  44. package/dist/utils/index.js +20 -0
  45. package/dist/utils/index.js.map +1 -0
  46. package/dist/utils/validation.d.ts +50 -0
  47. package/dist/utils/validation.d.ts.map +1 -0
  48. package/dist/utils/validation.js +111 -0
  49. package/dist/utils/validation.js.map +1 -0
  50. package/package.json +63 -0
  51. package/src/index.ts +8 -0
  52. package/src/protocols/events.ts +50 -0
  53. package/src/protocols/index.ts +3 -0
  54. package/src/protocols/websocket.ts +149 -0
  55. package/src/types/build.ts +85 -0
  56. package/src/types/device.ts +50 -0
  57. package/src/types/index.ts +5 -0
  58. package/src/types/log.ts +51 -0
  59. package/src/types/session.ts +57 -0
  60. package/src/utils/constants.ts +135 -0
  61. package/src/utils/index.ts +3 -0
  62. package/src/utils/validation.ts +115 -0
  63. package/tests/protocols.test.ts +121 -0
  64. package/tests/setup.ts +16 -0
  65. package/tests/types.test.ts +103 -0
  66. package/tests/validation.test.ts +226 -0
  67. package/tsconfig.json +22 -0
package/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # @jetstart/shared
2
+
3
+ Shared types, protocols, and utilities for the JetStart ecosystem.
4
+
5
+ ## Overview
6
+
7
+ This package contains common code shared across all JetStart packages:
8
+
9
+ - **Types**: TypeScript interfaces and type definitions
10
+ - **Protocols**: WebSocket message protocols and event systems
11
+ - **Utils**: Validation functions and constants
12
+
13
+ ## Usage
14
+ ```typescript
15
+ import {
16
+ Session,
17
+ SessionStatus,
18
+ BuildConfig,
19
+ LogLevel,
20
+ ClientMessage,
21
+ CoreMessage,
22
+ isValidSessionId,
23
+ DEFAULT_CORE_PORT,
24
+ } from '@jetstart/shared';
25
+ ```
26
+
27
+ ## Structure
28
+ ```
29
+ src/
30
+ ├── types/ # Type definitions
31
+ │ ├── session.ts # Session management types
32
+ │ ├── build.ts # Build system types
33
+ │ ├── device.ts # Device information types
34
+ │ └── log.ts # Logging types
35
+ ├── protocols/ # Communication protocols
36
+ │ ├── websocket.ts # WebSocket messages
37
+ │ └── events.ts # Event system
38
+ └── utils/ # Utilities
39
+ ├── validation.ts # Validation functions
40
+ └── constants.ts # Shared constants
41
+ ```
42
+
43
+ ## Key Types
44
+
45
+ ### Session Management
46
+ - `Session` - Development session state
47
+ - `SessionStatus` - Connection status enum
48
+ - `SessionToken` - Authentication token
49
+ - `QRCodeData` - QR code payload
50
+
51
+ ### Build System
52
+ - `BuildConfig` - Build configuration
53
+ - `BuildResult` - Build output
54
+ - `BuildStatus` - Build progress
55
+ - `APKInfo` - APK metadata
56
+
57
+ ### Device Information
58
+ - `DeviceInfo` - Device details
59
+ - `Platform` - Platform enum
60
+ - `Architecture` - CPU architecture
61
+
62
+ ### Logging
63
+ - `LogEntry` - Log message structure
64
+ - `LogLevel` - Log severity levels
65
+ - `LogSource` - Log origin
66
+
67
+ ## Protocols
68
+
69
+ ### WebSocket Messages
70
+
71
+ **Client → Core:**
72
+ - `client:connect` - Initial connection
73
+ - `client:status` - Status update
74
+ - `client:log` - Log message
75
+ - `client:heartbeat` - Keep-alive
76
+
77
+ **Core → Client:**
78
+ - `core:connected` - Connection confirmed
79
+ - `core:build-start` - Build started
80
+ - `core:build-status` - Build progress
81
+ - `core:build-complete` - Build finished
82
+ - `core:build-error` - Build failed
83
+ - `core:reload` - Trigger reload
84
+
85
+ ## Validation
86
+ ```typescript
87
+ import { isValidSessionId, isValidProjectName } from '@jetstart/shared';
88
+
89
+ if (isValidSessionId(sessionId)) {
90
+ // Valid session ID
91
+ }
92
+
93
+ if (isValidProjectName(name)) {
94
+ // Valid project name
95
+ }
96
+ ```
97
+
98
+ ## Constants
99
+ ```typescript
100
+ import { DEFAULT_CORE_PORT, JETSTART_VERSION } from '@jetstart/shared';
101
+
102
+ console.log(`JetStart v${JETSTART_VERSION}`);
103
+ console.log(`Core server on port ${DEFAULT_CORE_PORT}`);
104
+ ```
105
+
106
+ ## License
107
+
108
+ Apache-2.0
@@ -0,0 +1,4 @@
1
+ export * from './types';
2
+ export * from './protocols';
3
+ export * from './utils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC;AAG5B,cAAc,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Export all types
18
+ __exportStar(require("./types"), exports);
19
+ // Export all protocols
20
+ __exportStar(require("./protocols"), exports);
21
+ // Export all utils
22
+ __exportStar(require("./utils"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAmB;AACnB,0CAAwB;AAExB,uBAAuB;AACvB,8CAA4B;AAE5B,mBAAmB;AACnB,0CAAwB"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Event System
3
+ * Event types for internal communication within packages
4
+ */
5
+ export interface JetStartEvent<T = any> {
6
+ type: string;
7
+ payload: T;
8
+ timestamp: number;
9
+ }
10
+ /**
11
+ * CLI Events
12
+ */
13
+ export type CLIEvent = {
14
+ type: 'cli:command:start';
15
+ payload: {
16
+ command: string;
17
+ args: string[];
18
+ };
19
+ } | {
20
+ type: 'cli:command:complete';
21
+ payload: {
22
+ command: string;
23
+ success: boolean;
24
+ };
25
+ } | {
26
+ type: 'cli:command:error';
27
+ payload: {
28
+ command: string;
29
+ error: string;
30
+ };
31
+ };
32
+ /**
33
+ * Core Events
34
+ */
35
+ export type CoreEvent = {
36
+ type: 'core:server:start';
37
+ payload: {
38
+ port: number;
39
+ };
40
+ } | {
41
+ type: 'core:server:stop';
42
+ payload: {};
43
+ } | {
44
+ type: 'core:session:created';
45
+ payload: {
46
+ sessionId: string;
47
+ };
48
+ } | {
49
+ type: 'core:session:ended';
50
+ payload: {
51
+ sessionId: string;
52
+ };
53
+ } | {
54
+ type: 'core:build:queued';
55
+ payload: {
56
+ sessionId: string;
57
+ };
58
+ } | {
59
+ type: 'core:build:started';
60
+ payload: {
61
+ sessionId: string;
62
+ };
63
+ } | {
64
+ type: 'core:build:completed';
65
+ payload: {
66
+ sessionId: string;
67
+ duration: number;
68
+ };
69
+ } | {
70
+ type: 'core:build:failed';
71
+ payload: {
72
+ sessionId: string;
73
+ error: string;
74
+ };
75
+ };
76
+ /**
77
+ * Client Events
78
+ */
79
+ export type ClientEvent = {
80
+ type: 'client:connected';
81
+ payload: {
82
+ sessionId: string;
83
+ };
84
+ } | {
85
+ type: 'client:disconnected';
86
+ payload: {
87
+ sessionId: string;
88
+ };
89
+ } | {
90
+ type: 'client:apk:downloaded';
91
+ payload: {
92
+ apkPath: string;
93
+ size: number;
94
+ };
95
+ } | {
96
+ type: 'client:apk:installed';
97
+ payload: {
98
+ packageName: string;
99
+ };
100
+ } | {
101
+ type: 'client:app:launched';
102
+ payload: {
103
+ packageName: string;
104
+ };
105
+ };
106
+ /**
107
+ * Event emitter interface
108
+ */
109
+ export interface EventEmitter {
110
+ on(event: string, handler: (data: any) => void): void;
111
+ off(event: string, handler: (data: any) => void): void;
112
+ emit(event: string, data: any): void;
113
+ }
114
+ //# sourceMappingURL=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AG,IAAI,CAAC;IACvD,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;CACtC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Event System
4
+ * Event types for internal communication within packages
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/protocols/events.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
@@ -0,0 +1,3 @@
1
+ export * from './websocket';
2
+ export * from './events';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/protocols/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Re-export all protocol definitions
18
+ __exportStar(require("./websocket"), exports);
19
+ __exportStar(require("./events"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/protocols/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qCAAqC;AACrC,8CAA4B;AAC5B,2CAAyB"}
@@ -0,0 +1,110 @@
1
+ /**
2
+ * WebSocket Protocol
3
+ * Message types for real-time communication between Core, Client, and Logs
4
+ */
5
+ import { DeviceInfo, SessionStatus, BuildStatus, LogEntry, APKInfo } from '../types/index';
6
+ /**
7
+ * Base message structure
8
+ */
9
+ export interface BaseMessage {
10
+ type: string;
11
+ timestamp: number;
12
+ sessionId?: string;
13
+ }
14
+ /**
15
+ * Messages from Client to Core
16
+ */
17
+ export type ClientMessage = ClientConnectMessage | ClientStatusMessage | ClientLogMessage | ClientHeartbeatMessage | ClientDisconnectMessage;
18
+ export interface ClientConnectMessage extends BaseMessage {
19
+ type: 'client:connect';
20
+ sessionId: string;
21
+ token: string;
22
+ deviceInfo: DeviceInfo;
23
+ }
24
+ export interface ClientStatusMessage extends BaseMessage {
25
+ type: 'client:status';
26
+ status: SessionStatus;
27
+ message?: string;
28
+ }
29
+ export interface ClientLogMessage extends BaseMessage {
30
+ type: 'client:log';
31
+ log: LogEntry;
32
+ }
33
+ export interface ClientHeartbeatMessage extends BaseMessage {
34
+ type: 'client:heartbeat';
35
+ }
36
+ export interface ClientDisconnectMessage extends BaseMessage {
37
+ type: 'client:disconnect';
38
+ reason?: string;
39
+ }
40
+ /**
41
+ * Messages from Core to Client
42
+ */
43
+ export type CoreMessage = CoreConnectedMessage | CoreBuildStartMessage | CoreBuildStatusMessage | CoreBuildCompleteMessage | CoreBuildErrorMessage | CoreReloadMessage | CoreUIUpdateMessage | CoreDisconnectMessage;
44
+ export interface CoreConnectedMessage extends BaseMessage {
45
+ type: 'core:connected';
46
+ sessionId: string;
47
+ projectName: string;
48
+ }
49
+ export interface CoreBuildStartMessage extends BaseMessage {
50
+ type: 'core:build-start';
51
+ }
52
+ export interface CoreBuildStatusMessage extends BaseMessage {
53
+ type: 'core:build-status';
54
+ status: BuildStatus;
55
+ }
56
+ export interface CoreBuildCompleteMessage extends BaseMessage {
57
+ type: 'core:build-complete';
58
+ apkInfo: APKInfo;
59
+ downloadUrl: string;
60
+ }
61
+ export interface CoreBuildErrorMessage extends BaseMessage {
62
+ type: 'core:build-error';
63
+ error: string;
64
+ details?: any;
65
+ }
66
+ export interface CoreReloadMessage extends BaseMessage {
67
+ type: 'core:reload';
68
+ reloadType: 'full' | 'hot';
69
+ }
70
+ export interface CoreUIUpdateMessage extends BaseMessage {
71
+ type: 'core:ui-update';
72
+ dslContent: string;
73
+ screens?: string[];
74
+ hash?: string;
75
+ }
76
+ export interface CoreDisconnectMessage extends BaseMessage {
77
+ type: 'core:disconnect';
78
+ reason: string;
79
+ }
80
+ /**
81
+ * Union type of all messages
82
+ */
83
+ export type WSMessage = ClientMessage | CoreMessage;
84
+ /**
85
+ * WebSocket connection state
86
+ */
87
+ export declare enum WSState {
88
+ CONNECTING = "connecting",
89
+ CONNECTED = "connected",
90
+ DISCONNECTING = "disconnecting",
91
+ DISCONNECTED = "disconnected",
92
+ ERROR = "error"
93
+ }
94
+ /**
95
+ * WebSocket error types
96
+ */
97
+ export interface WSError {
98
+ code: WSErrorCode;
99
+ message: string;
100
+ timestamp: number;
101
+ }
102
+ export declare enum WSErrorCode {
103
+ CONNECTION_FAILED = "connection_failed",
104
+ AUTHENTICATION_FAILED = "authentication_failed",
105
+ TIMEOUT = "timeout",
106
+ INVALID_MESSAGE = "invalid_message",
107
+ SESSION_EXPIRED = "session_expired",
108
+ UNKNOWN = "unknown"
109
+ }
110
+ //# sourceMappingURL=websocket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../src/protocols/websocket.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,UAAU,EACV,aAAa,EACb,WAAW,EACX,QAAQ,EACR,OAAO,EACR,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MA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**
3
+ * WebSocket Protocol
4
+ * Message types for real-time communication between Core, Client, and Logs
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.WSErrorCode = exports.WSState = void 0;
8
+ /**
9
+ * WebSocket connection state
10
+ */
11
+ var WSState;
12
+ (function (WSState) {
13
+ WSState["CONNECTING"] = "connecting";
14
+ WSState["CONNECTED"] = "connected";
15
+ WSState["DISCONNECTING"] = "disconnecting";
16
+ WSState["DISCONNECTED"] = "disconnected";
17
+ WSState["ERROR"] = "error";
18
+ })(WSState || (exports.WSState = WSState = {}));
19
+ var WSErrorCode;
20
+ (function (WSErrorCode) {
21
+ WSErrorCode["CONNECTION_FAILED"] = "connection_failed";
22
+ WSErrorCode["AUTHENTICATION_FAILED"] = "authentication_failed";
23
+ WSErrorCode["TIMEOUT"] = "timeout";
24
+ WSErrorCode["INVALID_MESSAGE"] = "invalid_message";
25
+ WSErrorCode["SESSION_EXPIRED"] = "session_expired";
26
+ WSErrorCode["UNKNOWN"] = "unknown";
27
+ })(WSErrorCode || (exports.WSErrorCode = WSErrorCode = {}));
28
+ //# sourceMappingURL=websocket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../src/protocols/websocket.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAsHH;;GAEG;AACH,IAAY,OAMX;AAND,WAAY,OAAO;IACjB,oCAAyB,CAAA;IACzB,kCAAuB,CAAA;IACvB,0CAA+B,CAAA;IAC/B,wCAA6B,CAAA;IAC7B,0BAAe,CAAA;AACjB,CAAC,EANW,OAAO,uBAAP,OAAO,QAMlB;AAWD,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,sDAAuC,CAAA;IACvC,8DAA+C,CAAA;IAC/C,kCAAmB,CAAA;IACnB,kDAAmC,CAAA;IACnC,kDAAmC,CAAA;IACnC,kCAAmB,CAAA;AACrB,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Build System Types
3
+ * Types related to compilation, building, and APK generation
4
+ */
5
+ export interface BuildConfig {
6
+ projectPath: string;
7
+ outputPath: string;
8
+ buildType: BuildType;
9
+ minifyEnabled: boolean;
10
+ debuggable: boolean;
11
+ versionCode: number;
12
+ versionName: string;
13
+ applicationId: string;
14
+ }
15
+ export declare enum BuildType {
16
+ DEBUG = "debug",
17
+ RELEASE = "release"
18
+ }
19
+ export interface BuildResult {
20
+ success: boolean;
21
+ apkPath?: string;
22
+ apkSize?: number;
23
+ buildTime: number;
24
+ errors?: BuildError[];
25
+ warnings?: BuildWarning[];
26
+ }
27
+ export interface BuildError {
28
+ file: string;
29
+ line: number;
30
+ column: number;
31
+ message: string;
32
+ severity: ErrorSeverity;
33
+ }
34
+ export interface BuildWarning {
35
+ message: string;
36
+ file?: string;
37
+ line?: number;
38
+ }
39
+ export declare enum ErrorSeverity {
40
+ ERROR = "error",
41
+ WARNING = "warning",
42
+ INFO = "info"
43
+ }
44
+ export interface BuildStatus {
45
+ phase: BuildPhase;
46
+ progress: number;
47
+ message: string;
48
+ timestamp: number;
49
+ }
50
+ export declare enum BuildPhase {
51
+ IDLE = "idle",
52
+ INITIALIZING = "initializing",
53
+ COMPILING = "compiling",
54
+ PACKAGING = "packaging",
55
+ SIGNING = "signing",
56
+ OPTIMIZING = "optimizing",
57
+ COMPLETE = "complete",
58
+ FAILED = "failed"
59
+ }
60
+ export interface APKInfo {
61
+ path: string;
62
+ size: number;
63
+ hash: string;
64
+ versionCode: number;
65
+ versionName: string;
66
+ minSdkVersion: number;
67
+ targetSdkVersion: number;
68
+ applicationId: string;
69
+ }
70
+ export interface CacheInfo {
71
+ enabled: boolean;
72
+ size: number;
73
+ lastCleared: number;
74
+ hitRate: number;
75
+ }
76
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/types/build.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM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IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /**
3
+ * Build System Types
4
+ * Types related to compilation, building, and APK generation
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.BuildPhase = exports.ErrorSeverity = exports.BuildType = void 0;
8
+ var BuildType;
9
+ (function (BuildType) {
10
+ BuildType["DEBUG"] = "debug";
11
+ BuildType["RELEASE"] = "release";
12
+ })(BuildType || (exports.BuildType = BuildType = {}));
13
+ var ErrorSeverity;
14
+ (function (ErrorSeverity) {
15
+ ErrorSeverity["ERROR"] = "error";
16
+ ErrorSeverity["WARNING"] = "warning";
17
+ ErrorSeverity["INFO"] = "info";
18
+ })(ErrorSeverity || (exports.ErrorSeverity = ErrorSeverity = {}));
19
+ var BuildPhase;
20
+ (function (BuildPhase) {
21
+ BuildPhase["IDLE"] = "idle";
22
+ BuildPhase["INITIALIZING"] = "initializing";
23
+ BuildPhase["COMPILING"] = "compiling";
24
+ BuildPhase["PACKAGING"] = "packaging";
25
+ BuildPhase["SIGNING"] = "signing";
26
+ BuildPhase["OPTIMIZING"] = "optimizing";
27
+ BuildPhase["COMPLETE"] = "complete";
28
+ BuildPhase["FAILED"] = "failed";
29
+ })(BuildPhase || (exports.BuildPhase = BuildPhase = {}));
30
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/types/build.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAaH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,gCAAmB,CAAA;AACrB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAyBD,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,oCAAmB,CAAA;IACnB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AASD,IAAY,UASX;AATD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,2CAA6B,CAAA;IAC7B,qCAAuB,CAAA;IACvB,qCAAuB,CAAA;IACvB,iCAAmB,CAAA;IACnB,uCAAyB,CAAA;IACzB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;AACnB,CAAC,EATW,UAAU,0BAAV,UAAU,QASrB"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Device Information Types
3
+ * Device and platform-related information
4
+ */
5
+ export interface DeviceInfo {
6
+ id: string;
7
+ name: string;
8
+ model: string;
9
+ manufacturer: string;
10
+ platform: Platform;
11
+ osVersion: string;
12
+ apiLevel: number;
13
+ screenResolution: ScreenResolution;
14
+ density: number;
15
+ isEmulator: boolean;
16
+ architecture: Architecture;
17
+ locale: string;
18
+ timezone: string;
19
+ }
20
+ export declare enum Platform {
21
+ ANDROID = "android",
22
+ WEB = "web"
23
+ }
24
+ export interface ScreenResolution {
25
+ width: number;
26
+ height: number;
27
+ }
28
+ export declare enum Architecture {
29
+ ARM64_V8A = "arm64-v8a",
30
+ ARMEABI_V7A = "armeabi-v7a",
31
+ X86 = "x86",
32
+ X86_64 = "x86_64"
33
+ }
34
+ export interface NetworkInfo {
35
+ ipAddress: string;
36
+ networkType: NetworkType;
37
+ isConnected: boolean;
38
+ }
39
+ export declare enum NetworkType {
40
+ WIFI = "wifi",
41
+ CELLULAR = "cellular",
42
+ ETHERNET = "ethernet",
43
+ UNKNOWN = "unknown"
44
+ }
45
+ //# sourceMappingURL=device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/types/device.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,oBAAY,YAAY;IACtB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * Device Information Types
4
+ * Device and platform-related information
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.NetworkType = exports.Architecture = exports.Platform = void 0;
8
+ var Platform;
9
+ (function (Platform) {
10
+ Platform["ANDROID"] = "android";
11
+ Platform["WEB"] = "web";
12
+ })(Platform || (exports.Platform = Platform = {}));
13
+ var Architecture;
14
+ (function (Architecture) {
15
+ Architecture["ARM64_V8A"] = "arm64-v8a";
16
+ Architecture["ARMEABI_V7A"] = "armeabi-v7a";
17
+ Architecture["X86"] = "x86";
18
+ Architecture["X86_64"] = "x86_64";
19
+ })(Architecture || (exports.Architecture = Architecture = {}));
20
+ var NetworkType;
21
+ (function (NetworkType) {
22
+ NetworkType["WIFI"] = "wifi";
23
+ NetworkType["CELLULAR"] = "cellular";
24
+ NetworkType["ETHERNET"] = "ethernet";
25
+ NetworkType["UNKNOWN"] = "unknown";
26
+ })(NetworkType || (exports.NetworkType = NetworkType = {}));
27
+ //# sourceMappingURL=device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device.js","sourceRoot":"","sources":["../../src/types/device.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAkBH,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,uBAAW,CAAA;AACb,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB;AAOD,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,2CAA2B,CAAA;IAC3B,2BAAW,CAAA;IACX,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAQD,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACrB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB"}
@@ -0,0 +1,5 @@
1
+ export * from './session';
2
+ export * from './build';
3
+ export * from './device';
4
+ export * from './log';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC"}