@superwall/runtime 1.1.0 → 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.
- package/README.md +47 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://superwall.com/">
|
|
3
|
+
<img src="https://user-images.githubusercontent.com/3296904/158817914-144c66d0-572d-43a4-9d47-d7d0b711c6d7.png" alt="Superwall" height="100" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
<h1 align="center">@superwall/runtime</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
The framework-agnostic runtime core behind every Superwall paywall: SDK
|
|
11
|
+
messaging, product state, localization, and purchases — no React.
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @superwall/runtime
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
You will not usually install this directly: the
|
|
21
|
+
[`superwall`](https://www.npmjs.com/package/superwall) framework depends on
|
|
22
|
+
it and exposes everything here through its hooks. Reach for it alone when a
|
|
23
|
+
paywall is not React, or when a host (the studio, the dashboard, a test
|
|
24
|
+
harness) needs the session model without a UI.
|
|
25
|
+
|
|
26
|
+
## What's here
|
|
4
27
|
|
|
5
28
|
This package is the runtime boundary shared by every paywall Superwall
|
|
6
29
|
serves — built with this framework or with the visual editor. It owns
|
|
@@ -8,8 +31,6 @@ transport selection, message logging, base64 message ingestion, product
|
|
|
8
31
|
state, localization, SDK action dispatch, and purchase promise resolution.
|
|
9
32
|
It must not import React, or anything above it in the stack.
|
|
10
33
|
|
|
11
|
-
## Layers
|
|
12
|
-
|
|
13
34
|
- **`SuperwallBridge`** — transport auto-detection (WebKit / Android / editor
|
|
14
35
|
iframe), message log, `accept` / `accept64` ingestion, `postMessage`.
|
|
15
36
|
- **`SuperwallSession`** — the runtime model on top of the bridge:
|
|
@@ -87,7 +108,26 @@ with transactions including `freeTrial_start`; grants permissions; answers
|
|
|
87
108
|
callbacks. `detectNativeSuperwallHost()` reports whether a real host is
|
|
88
109
|
present — used by `SuperwallProvider`'s `mock="auto"`.
|
|
89
110
|
|
|
90
|
-
##
|
|
111
|
+
## Develop
|
|
112
|
+
|
|
113
|
+
This package lives in the [`superwall/superwall`](https://github.com/superwall/superwall)
|
|
114
|
+
monorepo. **Read [AGENTS.md](https://github.com/superwall/superwall/blob/main/AGENTS.md)
|
|
115
|
+
first** - the conventions in it are decided, not suggested.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
bun install
|
|
119
|
+
bun run test # fixture tests drive the session through recorded
|
|
120
|
+
# message sequences and assert snapshot state — they
|
|
121
|
+
# are the protocol contract
|
|
122
|
+
bun run typecheck
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
There is no compile step in day-to-day development — `exports` point straight
|
|
126
|
+
at `src/`, so tests and consumers resolve the sources directly.
|
|
127
|
+
|
|
128
|
+
## License
|
|
91
129
|
|
|
92
|
-
|
|
93
|
-
|
|
130
|
+
[Functional Source License](https://github.com/superwall/superwall/blob/main/packages/superwall/LICENSE)
|
|
131
|
+
(FSL-1.1-ALv2): use it, modify it, embed it, ship it — anything except
|
|
132
|
+
building a competing product with it — and every release becomes Apache 2.0
|
|
133
|
+
two years after publication.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superwall/runtime",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Framework-agnostic runtime for headless Superwall paywalls: bridge, session, products, localization, mock host.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"paywall",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"clean": "rm -rf dist coverage"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@superwall/protocol": "1.1.
|
|
42
|
+
"@superwall/protocol": "1.1.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^22.0.0",
|