@glassly/jspolyfill 0.1.0-dev.0
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 +31 -0
- package/assets/startup.js +804 -0
- package/dist/startup.js +804 -0
- package/package.json +40 -0
- package/src/index.ts +14 -0
- package/src/startup.ts +1054 -0
- package/src/types.ts +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @glassly/jspolyfill
|
|
2
|
+
|
|
3
|
+
The GlasslyJS polyfill bundle. Glassly runs each miniapp in its own bare JS
|
|
4
|
+
context (JavaScriptCore on iOS, QuickJS on Android); this package provides the
|
|
5
|
+
browser-like standard library those contexts lack — `console`, timers,
|
|
6
|
+
`fetch`, `WebSocket`, `localStorage`, `crypto.getRandomValues`, and
|
|
7
|
+
`crypto.randomUUID` — implemented over a single `__dispatch` native bridge,
|
|
8
|
+
plus the `__deliver` / `signalReady` plumbing the host runtime relies on.
|
|
9
|
+
`crypto.subtle` is not implemented.
|
|
10
|
+
|
|
11
|
+
You don't import this package from app code: it's a **peer of the runtime
|
|
12
|
+
stack**. [`@glassly/crust`](https://www.npmjs.com/package/@glassly/crust)'s
|
|
13
|
+
Android build reads the bundle from this package's `assets/` at build time,
|
|
14
|
+
and the engine injects it into each miniapp context at spawn.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
Installed automatically alongside
|
|
19
|
+
[`@glassly/engine`](https://www.npmjs.com/package/@glassly/engine) /
|
|
20
|
+
`@glassly/crust`. For direct use:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install @glassly/jspolyfill@dev
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
> Currently published on the `dev` dist-tag (prerelease channel).
|
|
27
|
+
|
|
28
|
+
## Part of Glassly
|
|
29
|
+
|
|
30
|
+
Source lives in the [Glassly monorepo](https://github.com/tetramo-labs/glassly)
|
|
31
|
+
under `mobile/modules/jspolyfill`. Issues and contributions welcome there.
|