@mentra/sdk 2.1.29-beta.2 → 2.1.31-beta.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.
- package/dist/app/server/index.d.ts +2 -1
- package/dist/app/server/index.d.ts.map +1 -1
- package/dist/app/session/device-state.d.ts +83 -0
- package/dist/app/session/device-state.d.ts.map +1 -0
- package/dist/app/session/events.d.ts +9 -0
- package/dist/app/session/events.d.ts.map +1 -1
- package/dist/app/session/index.d.ts +23 -3
- package/dist/app/session/index.d.ts.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +251 -38
- package/dist/index.js.map +13 -11
- package/dist/types/capabilities.d.ts +3 -90
- package/dist/types/capabilities.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/message-types.d.ts +3 -1
- package/dist/types/message-types.d.ts.map +1 -1
- package/dist/types/messages/app-to-cloud.d.ts +15 -1
- package/dist/types/messages/app-to-cloud.d.ts.map +1 -1
- package/dist/types/messages/cloud-to-app.d.ts +14 -1
- package/dist/types/messages/cloud-to-app.d.ts.map +1 -1
- package/dist/utils/Observable.d.ts +92 -0
- package/dist/utils/Observable.d.ts.map +1 -0
- package/node_modules/@mentra/types/README.md +134 -0
- package/node_modules/@mentra/types/dist/applet.d.ts +39 -0
- package/node_modules/@mentra/types/dist/applet.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/applet.js +5 -0
- package/node_modules/@mentra/types/dist/capabilities/even-realities-g1.d.ts +12 -0
- package/node_modules/@mentra/types/dist/capabilities/even-realities-g1.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/even-realities-g1.js +54 -0
- package/node_modules/@mentra/types/dist/capabilities/mentra-live.d.ts +12 -0
- package/node_modules/@mentra/types/dist/capabilities/mentra-live.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/mentra-live.js +94 -0
- package/node_modules/@mentra/types/dist/capabilities/simulated-glasses.d.ts +13 -0
- package/node_modules/@mentra/types/dist/capabilities/simulated-glasses.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/simulated-glasses.js +67 -0
- package/node_modules/@mentra/types/dist/capabilities/vuzix-z100.d.ts +12 -0
- package/node_modules/@mentra/types/dist/capabilities/vuzix-z100.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/capabilities/vuzix-z100.js +51 -0
- package/node_modules/@mentra/types/dist/cli.d.ts +130 -0
- package/node_modules/@mentra/types/dist/cli.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/cli.js +7 -0
- package/node_modules/@mentra/types/dist/device.d.ts +32 -0
- package/node_modules/@mentra/types/dist/device.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/device.js +6 -0
- package/node_modules/@mentra/types/dist/enums.d.ts +34 -0
- package/node_modules/@mentra/types/dist/enums.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/enums.js +39 -0
- package/node_modules/@mentra/types/dist/hardware.d.ts +141 -0
- package/node_modules/@mentra/types/dist/hardware.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/hardware.js +33 -0
- package/node_modules/@mentra/types/dist/index.d.ts +18 -0
- package/node_modules/@mentra/types/dist/index.d.ts.map +1 -0
- package/node_modules/@mentra/types/dist/index.js +25 -0
- package/node_modules/@mentra/types/package.json +31 -0
- package/package.json +6 -6
- package/dist/display-utils/test/ScrollView.test.d.ts +0 -2
- package/dist/display-utils/test/ScrollView.test.d.ts.map +0 -1
- package/dist/display-utils/test/TextMeasurer.test.d.ts +0 -2
- package/dist/display-utils/test/TextMeasurer.test.d.ts.map +0 -1
- package/dist/display-utils/test/TextWrapper.test.d.ts +0 -2
- package/dist/display-utils/test/TextWrapper.test.d.ts.map +0 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @mentra/types - Hardware capability types
|
|
3
|
+
*/
|
|
4
|
+
import { evenRealitiesG1 } from "./capabilities/even-realities-g1";
|
|
5
|
+
import { mentraLive } from "./capabilities/mentra-live";
|
|
6
|
+
import { simulatedGlasses } from "./capabilities/simulated-glasses";
|
|
7
|
+
import { vuzixZ100 } from "./capabilities/vuzix-z100";
|
|
8
|
+
import { DeviceTypes, HardwareRequirementLevel, HardwareType } from "./enums";
|
|
9
|
+
/**
|
|
10
|
+
* Hardware requirement for an app
|
|
11
|
+
* Specifies what hardware components an app needs
|
|
12
|
+
*/
|
|
13
|
+
export interface HardwareRequirement {
|
|
14
|
+
type: HardwareType;
|
|
15
|
+
level: HardwareRequirementLevel;
|
|
16
|
+
description?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Camera capabilities
|
|
20
|
+
*/
|
|
21
|
+
export interface CameraCapabilities {
|
|
22
|
+
resolution?: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
hasHDR?: boolean;
|
|
27
|
+
hasFocus?: boolean;
|
|
28
|
+
video: {
|
|
29
|
+
canRecord: boolean;
|
|
30
|
+
canStream: boolean;
|
|
31
|
+
supportedStreamTypes?: string[];
|
|
32
|
+
supportedResolutions?: {
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
}[];
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Display capabilities
|
|
40
|
+
*/
|
|
41
|
+
export interface DisplayCapabilities {
|
|
42
|
+
count?: number;
|
|
43
|
+
isColor?: boolean;
|
|
44
|
+
color?: string;
|
|
45
|
+
canDisplayBitmap?: boolean;
|
|
46
|
+
resolution?: {
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
};
|
|
50
|
+
fieldOfView?: {
|
|
51
|
+
horizontal?: number;
|
|
52
|
+
vertical?: number;
|
|
53
|
+
};
|
|
54
|
+
maxTextLines?: number;
|
|
55
|
+
adjustBrightness?: boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Microphone capabilities
|
|
59
|
+
*/
|
|
60
|
+
export interface MicrophoneCapabilities {
|
|
61
|
+
count?: number;
|
|
62
|
+
hasVAD?: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Speaker capabilities
|
|
66
|
+
*/
|
|
67
|
+
export interface SpeakerCapabilities {
|
|
68
|
+
count?: number;
|
|
69
|
+
isPrivate?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* IMU (Inertial Measurement Unit) capabilities
|
|
73
|
+
*/
|
|
74
|
+
export interface IMUCapabilities {
|
|
75
|
+
axisCount?: number;
|
|
76
|
+
hasAccelerometer?: boolean;
|
|
77
|
+
hasCompass?: boolean;
|
|
78
|
+
hasGyroscope?: boolean;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Button capabilities
|
|
82
|
+
*/
|
|
83
|
+
export interface ButtonCapabilities {
|
|
84
|
+
count?: number;
|
|
85
|
+
buttons?: {
|
|
86
|
+
type: "press" | "swipe1d" | "swipe2d";
|
|
87
|
+
events: string[];
|
|
88
|
+
isCapacitive?: boolean;
|
|
89
|
+
}[];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Light capabilities
|
|
93
|
+
*/
|
|
94
|
+
export interface LightCapabilities {
|
|
95
|
+
count?: number;
|
|
96
|
+
lights?: {
|
|
97
|
+
id: string;
|
|
98
|
+
purpose: "privacy" | "user_feedback" | "general";
|
|
99
|
+
isFullColor: boolean;
|
|
100
|
+
color?: string;
|
|
101
|
+
position?: "front_facing" | "user_facing" | "side" | "unknown";
|
|
102
|
+
}[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Power capabilities
|
|
106
|
+
*/
|
|
107
|
+
export interface PowerCapabilities {
|
|
108
|
+
hasExternalBattery: boolean;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Device hardware capabilities
|
|
112
|
+
* Complete information about what hardware a device has
|
|
113
|
+
*/
|
|
114
|
+
export interface Capabilities {
|
|
115
|
+
modelName: string;
|
|
116
|
+
hasCamera: boolean;
|
|
117
|
+
camera: CameraCapabilities | null;
|
|
118
|
+
hasDisplay: boolean;
|
|
119
|
+
display: DisplayCapabilities | null;
|
|
120
|
+
hasMicrophone: boolean;
|
|
121
|
+
microphone: MicrophoneCapabilities | null;
|
|
122
|
+
hasSpeaker: boolean;
|
|
123
|
+
speaker: SpeakerCapabilities | null;
|
|
124
|
+
hasIMU: boolean;
|
|
125
|
+
imu: IMUCapabilities | null;
|
|
126
|
+
hasButton: boolean;
|
|
127
|
+
button: ButtonCapabilities | null;
|
|
128
|
+
hasLight: boolean;
|
|
129
|
+
light: LightCapabilities | null;
|
|
130
|
+
power: PowerCapabilities;
|
|
131
|
+
hasWifi: boolean;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Hardware capability profiles for supported glasses models
|
|
135
|
+
* Key: model_name string (e.g., "Even Realities G1", "Mentra Live")
|
|
136
|
+
* Value: Capabilities object defining device features
|
|
137
|
+
*/
|
|
138
|
+
export declare const HARDWARE_CAPABILITIES: Record<string, Capabilities>;
|
|
139
|
+
export declare const getModelCapabilities: (deviceType: DeviceTypes) => Capabilities;
|
|
140
|
+
export { simulatedGlasses, evenRealitiesG1, mentraLive, vuzixZ100 };
|
|
141
|
+
//# sourceMappingURL=hardware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hardware.d.ts","sourceRoot":"","sources":["../src/hardware.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,YAAY,EAAE,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G1C,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAGpC,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,eAAe,GAAG,IAAI,CAAC;IAG5B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAGlC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAGhC,KAAK,EAAE,iBAAiB,CAAC;IAGzB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAK9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,YAAY,WAAW,KAAG,YAM9D,CAAC;AAGF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @mentra/types - Hardware capability types
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.vuzixZ100 = exports.mentraLive = exports.evenRealitiesG1 = exports.simulatedGlasses = exports.getModelCapabilities = exports.HARDWARE_CAPABILITIES = void 0;
|
|
7
|
+
const even_realities_g1_1 = require("./capabilities/even-realities-g1");
|
|
8
|
+
Object.defineProperty(exports, "evenRealitiesG1", { enumerable: true, get: function () { return even_realities_g1_1.evenRealitiesG1; } });
|
|
9
|
+
const mentra_live_1 = require("./capabilities/mentra-live");
|
|
10
|
+
Object.defineProperty(exports, "mentraLive", { enumerable: true, get: function () { return mentra_live_1.mentraLive; } });
|
|
11
|
+
const simulated_glasses_1 = require("./capabilities/simulated-glasses");
|
|
12
|
+
Object.defineProperty(exports, "simulatedGlasses", { enumerable: true, get: function () { return simulated_glasses_1.simulatedGlasses; } });
|
|
13
|
+
const vuzix_z100_1 = require("./capabilities/vuzix-z100");
|
|
14
|
+
Object.defineProperty(exports, "vuzixZ100", { enumerable: true, get: function () { return vuzix_z100_1.vuzixZ100; } });
|
|
15
|
+
/**
|
|
16
|
+
* Hardware capability profiles for supported glasses models
|
|
17
|
+
* Key: model_name string (e.g., "Even Realities G1", "Mentra Live")
|
|
18
|
+
* Value: Capabilities object defining device features
|
|
19
|
+
*/
|
|
20
|
+
exports.HARDWARE_CAPABILITIES = {
|
|
21
|
+
[even_realities_g1_1.evenRealitiesG1.modelName]: even_realities_g1_1.evenRealitiesG1,
|
|
22
|
+
[mentra_live_1.mentraLive.modelName]: mentra_live_1.mentraLive,
|
|
23
|
+
[simulated_glasses_1.simulatedGlasses.modelName]: simulated_glasses_1.simulatedGlasses,
|
|
24
|
+
[vuzix_z100_1.vuzixZ100.modelName]: vuzix_z100_1.vuzixZ100,
|
|
25
|
+
};
|
|
26
|
+
const getModelCapabilities = (deviceType) => {
|
|
27
|
+
const modelName = deviceType;
|
|
28
|
+
if (!exports.HARDWARE_CAPABILITIES[modelName]) {
|
|
29
|
+
return exports.HARDWARE_CAPABILITIES[simulated_glasses_1.simulatedGlasses.modelName];
|
|
30
|
+
}
|
|
31
|
+
return exports.HARDWARE_CAPABILITIES[modelName];
|
|
32
|
+
};
|
|
33
|
+
exports.getModelCapabilities = getModelCapabilities;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @mentra/types - Shared types for MentraOS
|
|
3
|
+
*
|
|
4
|
+
* IMPORTANT: Uses explicit exports for Bun compatibility
|
|
5
|
+
* DO NOT use `export *` - Bun runtime can't handle type re-exports
|
|
6
|
+
* See: cloud/issues/todo/sdk-type-exports/README.md
|
|
7
|
+
*
|
|
8
|
+
* Pattern:
|
|
9
|
+
* - Enums (runtime values) → export { ... }
|
|
10
|
+
* - Types/Interfaces (compile-time only) → export type { ... }
|
|
11
|
+
*/
|
|
12
|
+
export { HardwareType, HardwareRequirementLevel, DeviceTypes } from "./enums";
|
|
13
|
+
export type { HardwareRequirement, CameraCapabilities, DisplayCapabilities, MicrophoneCapabilities, SpeakerCapabilities, IMUCapabilities, ButtonCapabilities, LightCapabilities, PowerCapabilities, Capabilities, } from "./hardware";
|
|
14
|
+
export { HARDWARE_CAPABILITIES, getModelCapabilities } from "./hardware";
|
|
15
|
+
export type { AppletType, AppPermissionType, AppletPermission, AppletInterface } from "./applet";
|
|
16
|
+
export type { GlassesInfo } from "./device";
|
|
17
|
+
export type { CLIApiKey, CLIApiKeyListItem, GenerateCLIKeyRequest, GenerateCLIKeyResponse, UpdateCLIKeyRequest, CLITokenPayload, CLICredentials, Cloud, } from "./cli";
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,WAAW,EAAC,MAAM,SAAS,CAAA;AAM3E,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,GACb,MAAM,YAAY,CAAA;AAGnB,OAAO,EAAC,qBAAqB,EAAE,oBAAoB,EAAC,MAAM,YAAY,CAAA;AAMtE,YAAY,EAAC,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAC,MAAM,UAAU,CAAA;AAM9F,YAAY,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAMzC,YAAY,EACV,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,KAAK,GACN,MAAM,OAAO,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @mentra/types - Shared types for MentraOS
|
|
4
|
+
*
|
|
5
|
+
* IMPORTANT: Uses explicit exports for Bun compatibility
|
|
6
|
+
* DO NOT use `export *` - Bun runtime can't handle type re-exports
|
|
7
|
+
* See: cloud/issues/todo/sdk-type-exports/README.md
|
|
8
|
+
*
|
|
9
|
+
* Pattern:
|
|
10
|
+
* - Enums (runtime values) → export { ... }
|
|
11
|
+
* - Types/Interfaces (compile-time only) → export type { ... }
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.getModelCapabilities = exports.HARDWARE_CAPABILITIES = exports.DeviceTypes = exports.HardwareRequirementLevel = exports.HardwareType = void 0;
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Enums (runtime values)
|
|
17
|
+
// ============================================================================
|
|
18
|
+
var enums_1 = require("./enums");
|
|
19
|
+
Object.defineProperty(exports, "HardwareType", { enumerable: true, get: function () { return enums_1.HardwareType; } });
|
|
20
|
+
Object.defineProperty(exports, "HardwareRequirementLevel", { enumerable: true, get: function () { return enums_1.HardwareRequirementLevel; } });
|
|
21
|
+
Object.defineProperty(exports, "DeviceTypes", { enumerable: true, get: function () { return enums_1.DeviceTypes; } });
|
|
22
|
+
// not a type:
|
|
23
|
+
var hardware_1 = require("./hardware");
|
|
24
|
+
Object.defineProperty(exports, "HARDWARE_CAPABILITIES", { enumerable: true, get: function () { return hardware_1.HARDWARE_CAPABILITIES; } });
|
|
25
|
+
Object.defineProperty(exports, "getModelCapabilities", { enumerable: true, get: function () { return hardware_1.getModelCapabilities; } });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mentra/types",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Shared TypeScript types for MentraOS client and cloud",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
"development": {
|
|
9
|
+
"import": "./src/index.ts",
|
|
10
|
+
"require": "./src/index.ts",
|
|
11
|
+
"types": "./src/index.ts"
|
|
12
|
+
},
|
|
13
|
+
"default": {
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"require": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "rm -rf dist && bun x tsc -p tsconfig.json",
|
|
21
|
+
"dev": "bun x tsc --watch",
|
|
22
|
+
"typecheck": "bun x tsc --noEmit",
|
|
23
|
+
"prepare": "bun run build"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"typescript": "^5.0.0"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
]
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mentra/sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.31-beta.1",
|
|
4
4
|
"description": "Build apps for MentraOS smartglasses. This SDK provides everything you need to create real-time smartglasses applications.",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,22 +31,20 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
"bin": {
|
|
35
|
-
"mentra": "./dist/cli.js"
|
|
36
|
-
},
|
|
37
34
|
"scripts": {
|
|
38
35
|
"build": "bun run clean && bun run build:js && bun run build:types",
|
|
39
36
|
"build:js-only": "bun run clean && bun run build:js",
|
|
40
37
|
"build:full": "bun run clean && bun run build:js && bun run build:types",
|
|
41
38
|
"clean": "rm -rf dist",
|
|
42
39
|
"build:js": "bun build src/index.ts src/display-utils.ts --outdir dist --target node --format esm --sourcemap=external --external @logtail/pino --external axios --external boxen --external chalk --external cookie-parser --external dotenv --external express --external jimp --external jsonwebtoken --external jsrsasign --external multer --external pino --external pino-pretty --external strip-ansi --external ws",
|
|
43
|
-
"build:types": "bun x tsc --
|
|
40
|
+
"build:types": "bun x tsc --build --force",
|
|
44
41
|
"dev": "echo 'No build needed in dev mode - using source files directly'",
|
|
45
42
|
"prepare": "bun run build",
|
|
46
43
|
"link-pkg": "bun link"
|
|
47
44
|
},
|
|
48
45
|
"dependencies": {
|
|
49
46
|
"@logtail/pino": "^0.5.4",
|
|
47
|
+
"@mentra/types": "workspace:*",
|
|
50
48
|
"axios": "^1.8.1",
|
|
51
49
|
"boxen": "^8.0.1",
|
|
52
50
|
"chalk": "^5.6.2",
|
|
@@ -62,8 +60,10 @@
|
|
|
62
60
|
"strip-ansi": "^7.1.2",
|
|
63
61
|
"ws": "^8.18.2"
|
|
64
62
|
},
|
|
63
|
+
"bundledDependencies": [
|
|
64
|
+
"@mentra/types"
|
|
65
|
+
],
|
|
65
66
|
"devDependencies": {
|
|
66
|
-
"@mentra/types": "1.0.0",
|
|
67
67
|
"@types/babel__core": "^7.20.5",
|
|
68
68
|
"@types/express": "^4.17.17",
|
|
69
69
|
"@types/jsonwebtoken": "^9.0.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollView.test.d.ts","sourceRoot":"","sources":["../../../src/display-utils/test/ScrollView.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextMeasurer.test.d.ts","sourceRoot":"","sources":["../../../src/display-utils/test/TextMeasurer.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextWrapper.test.d.ts","sourceRoot":"","sources":["../../../src/display-utils/test/TextWrapper.test.ts"],"names":[],"mappings":""}
|