@geastack/core 0.1.52 → 0.1.54
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/README.md
CHANGED
|
@@ -59,8 +59,9 @@ changes need to preserve the shared component and native-type contracts.
|
|
|
59
59
|
|
|
60
60
|
## Native WebSocket connection headers
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
On ESP32 native hosts the WebSocket constructor takes an optional third
|
|
63
|
+
argument with connection headers (since `@geastack/core` 0.1.41 and
|
|
64
|
+
`@geastack/host` 0.1.16):
|
|
64
65
|
|
|
65
66
|
```ts
|
|
66
67
|
const socket = new WebSocket("wss://api.openai.com/v1/live/sessions", "", {
|
|
@@ -70,8 +71,8 @@ const socket = new WebSocket("wss://api.openai.com/v1/live/sessions", "", {
|
|
|
70
71
|
});
|
|
71
72
|
```
|
|
72
73
|
|
|
73
|
-
Use
|
|
74
|
-
|
|
74
|
+
Use it when a service requires bearer authentication in the WebSocket
|
|
75
|
+
handshake. Header names and values are validated before the
|
|
75
76
|
connection starts. This native option is unavailable in browser WebSockets.
|
|
76
77
|
|
|
77
78
|
## File-backed native assets
|
|
@@ -165,8 +166,10 @@ bubble through the UI tree, and focus and `preventDefault` work as for any key.
|
|
|
165
166
|
## Digital pins: `Gpio` and `Digital`
|
|
166
167
|
|
|
167
168
|
Two classes drive and read pins. Use whichever you prefer; they are two TS
|
|
168
|
-
front ends over one native backend
|
|
169
|
-
|
|
169
|
+
front ends over one native backend in `@geastack/host`
|
|
170
|
+
(`packages/host/include/host/gpio.h`, `packages/host/host/gpio.cpp`), which
|
|
171
|
+
drives the platform contract in `packages/core/include/gpio.h`, and behave the
|
|
172
|
+
same way underneath.
|
|
170
173
|
|
|
171
174
|
- `Gpio` is the GeaStack class: string options, boolean levels, and an
|
|
172
175
|
`onChange(value)` callback.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geastack/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.54",
|
|
4
4
|
"description": "GeaStack app API, reactivity headers, runtime sources, and type declarations.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -65,12 +65,13 @@
|
|
|
65
65
|
"@babel/types": "^7.23.0",
|
|
66
66
|
"@geajs/core": "1.5.1",
|
|
67
67
|
"@geajs/vite-plugin": "1.5.0",
|
|
68
|
-
"@geastack/compiler": "^1.0.
|
|
68
|
+
"@geastack/compiler": "^1.0.49",
|
|
69
69
|
"@geastack/geatsc-plugin-gea": "0.1.28",
|
|
70
70
|
"opentype.js": "^2.0.0",
|
|
71
71
|
"vite": "^8.0.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"jsdom": "^26.1.0"
|
|
74
|
+
"jsdom": "^26.1.0",
|
|
75
|
+
"typescript": "^5.9.3"
|
|
75
76
|
}
|
|
76
77
|
}
|
|
@@ -4724,14 +4724,16 @@ if (hasFlag('--gea-ir-backend') || hasFlag('--gea-replace-renderers')) {
|
|
|
4724
4724
|
// compiles in under 1 GiB of live heap) while stopping V8 from growing the heap
|
|
4725
4725
|
// freely: under a 32 GiB cap the same compile held ~1.8 GB resident, mostly
|
|
4726
4726
|
// uncollected garbage.
|
|
4727
|
-
//
|
|
4728
|
-
//
|
|
4729
|
-
//
|
|
4727
|
+
// An app whose analysis needs more (three.js and a game on top of it peaks
|
|
4728
|
+
// past 4 GiB) states its own limit in package.json: compiler.heapMiB in its
|
|
4729
|
+
// target's build settings. GEA_GEATSC_MAX_OLD_SPACE_SIZE (MiB) overrides both
|
|
4730
|
+
// for a machine with less memory to spare; a heap the analysis outgrows then
|
|
4731
|
+
// fails the build instead of exhausting the machine.
|
|
4730
4732
|
// Native interface call graphs can exceed V8's default ~1 MiB stack during
|
|
4731
4733
|
// closure analysis; keep the compiler stack below the host's 8 MiB limit.
|
|
4732
4734
|
const geatscHeapMiB = (() => {
|
|
4733
4735
|
const stated = process.env.GEA_GEATSC_MAX_OLD_SPACE_SIZE
|
|
4734
|
-
if (stated === undefined || stated === '') return 4096
|
|
4736
|
+
if (stated === undefined || stated === '') return compilerSettings.heapMiB ?? 4096
|
|
4735
4737
|
const value = Number(stated)
|
|
4736
4738
|
if (!Number.isInteger(value) || value < 512) fail(`GEA_GEATSC_MAX_OLD_SPACE_SIZE must be a whole number of MiB (at least 512): ${stated}`)
|
|
4737
4739
|
return value
|
|
@@ -70,7 +70,7 @@ export function geaAppleNativeModuleAliases(options = {}) {
|
|
|
70
70
|
// typed TypeScript, with a native software renderer) by setting
|
|
71
71
|
// `"gea": { "geaThreejs": true }` gets three's import surface redirected to
|
|
72
72
|
// the port on non-apple native targets: bare `three`,
|
|
73
|
-
// every `three/src/*.js` path (to its `.ts` source), and `troika-three-text`
|
|
73
|
+
// every `three/src/*.js` and `three/addons/*.js` path (to its `.ts` source), and `troika-three-text`
|
|
74
74
|
// (to the native atlas text, whose own `three/src` imports land on the port
|
|
75
75
|
// through the same aliases).
|
|
76
76
|
export function geaThreeModuleAliases(options = {}) {
|
|
@@ -81,6 +81,11 @@ export function geaThreeModuleAliases(options = {}) {
|
|
|
81
81
|
}
|
|
82
82
|
aliases.push({ find: /^three$/, replacement: path.join(options.geaThreeSrcDir, 'Three.ts') })
|
|
83
83
|
aliases.push({ find: /^three\/src\/(.+)\.js$/, replacement: path.join(options.geaThreeSrcDir, '$1.ts') })
|
|
84
|
+
// three's addons, under either of the two spellings upstream publishes.
|
|
85
|
+
aliases.push({
|
|
86
|
+
find: /^three\/(?:addons|examples\/jsm)\/(.+)\.js$/,
|
|
87
|
+
replacement: path.join(options.geaThreeSrcDir, 'addons/$1.ts'),
|
|
88
|
+
})
|
|
84
89
|
if (options.troikaThreeTextModule) {
|
|
85
90
|
if (!path.isAbsolute(options.troikaThreeTextModule)) {
|
|
86
91
|
throw new TypeError('troikaThreeTextModule must be an absolute module resolved from the application package boundary')
|