@adonis-agora/payments-dashboard 0.2.1 → 0.3.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/CHANGELOG.md +31 -0
- package/README.md +16 -0
- package/dist/spa/assets/index-BQtKssQN.js +10 -0
- package/dist/spa/assets/index-BQtKssQN.js.map +1 -0
- package/dist/spa/assets/index-BqeSOw2s.css +2 -0
- package/dist/spa/index.html +8 -2
- package/package.json +1 -1
- package/dist/spa/assets/index-B7rU8eIL.css +0 -2
- package/dist/spa/assets/index-BcM2VH5k.js +0 -10
- package/dist/spa/assets/index-BcM2VH5k.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @adonis-agora/payments-dashboard
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#14](https://github.com/DavideCarvalho/adonis-agora-payments/pull/14) [`3a885c4`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/3a885c478dec80ca1b112e318ec3890b6a1bd77c) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Dashboard: survives a strict CSP, fits on a phone, has URLs, and no longer links to a 404.
|
|
8
|
+
|
|
9
|
+
- **Every API request 404 under a nonce CSP — fixed.** The provider used to hand the SPA its
|
|
10
|
+
mount/API base as an inline `<script>` setting `window.__PAYMENTS_*__`. A host with
|
|
11
|
+
`script-src 'self' 'nonce-…'` (`@adonisjs/shield`'s `@nonce`) drops that script silently; the SPA
|
|
12
|
+
then fell back to `/payments-dashboard/api` and every request from a console that rendered fine
|
|
13
|
+
answered 404. The config now travels as a `<script type="application/json">` data block, which
|
|
14
|
+
is never executed and so cannot be refused. Nothing to change on the host. The globals are still
|
|
15
|
+
honoured as a fallback for tests/embedding.
|
|
16
|
+
|
|
17
|
+
- **Hash routes.** The current screen lives in the URL fragment (`#/webhooks`,
|
|
18
|
+
`#/webhooks?status=failed`, `#/payments?customer=cus_…`, `#/payments/<gatewayId>` for one payment
|
|
19
|
+
open in full), so the back button works, a reload comes back to the same screen, and a view can be
|
|
20
|
+
pasted into a ticket. The health panel's buttons write the same hashes they used to set in state.
|
|
21
|
+
A fragment rather than a path because the provider deliberately registers no SPA catch-all.
|
|
22
|
+
- **Mobile.** Every pill row (the tab bar, the status filters) scrolls sideways instead of pushing
|
|
23
|
+
the page wider than the viewport; the detail and confirm dialogs no longer overflow on a long
|
|
24
|
+
gateway id; tighter page padding under `sm`.
|
|
25
|
+
- **Sign out only where it can work.** The config block now carries the auth surface
|
|
26
|
+
(`auth: { modes } | null`), and the SPA shows the Sign out link only
|
|
27
|
+
when `dashboardAuth` is configured — that is the only configuration that registers
|
|
28
|
+
`<path>/logout`; on every other deployment the link was a 404 one click away.
|
|
29
|
+
- **Favicon.** Inline SVG icon, so the browser's automatic `/favicon.ico` probe stops 404ing in the
|
|
30
|
+
host app's log.
|
|
31
|
+
|
|
32
|
+
`renderIndexHtml` gains an optional fifth argument (`InjectedAuth`) and now emits the JSON block instead of the globals; `CONFIG_ELEMENT_ID`/`InjectedConfig` are exported. Existing callers are unaffected.
|
|
33
|
+
|
|
3
34
|
## 0.2.1
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -50,6 +50,22 @@ when that variable is unset. Replace `authorize` with your own guard, and/or add
|
|
|
50
50
|
`dashboardAuth` session gate (a built-in login page and/or an "open the console from your app"
|
|
51
51
|
endpoint) on top of it.
|
|
52
52
|
|
|
53
|
+
## URLs
|
|
54
|
+
|
|
55
|
+
The current screen lives in the hash — `#/payments`, `#/webhooks?status=failed`,
|
|
56
|
+
`#/payments/<gatewayId>` for one payment open in full — so the back button, reload and copy-paste
|
|
57
|
+
all work (`src/app/routes.ts`). A fragment and not a path, because the provider registers no SPA
|
|
58
|
+
catch-all: `<path>` is an exact route, and anything under it that is not `/api` or `/assets` is a
|
|
59
|
+
404 by design. It also fits on a phone: every pill row scrolls sideways rather than pushing the page
|
|
60
|
+
wider than the viewport.
|
|
61
|
+
|
|
62
|
+
## CSP
|
|
63
|
+
|
|
64
|
+
The provider hands the SPA its config as a `<script type="application/json">` data block, never an
|
|
65
|
+
executable inline script, so `script-src 'self'` (with or without a nonce) is all the console needs.
|
|
66
|
+
The `window.__PAYMENTS_*__` globals `src/client/payments-client.ts` also reads are a test/embedding
|
|
67
|
+
escape hatch, consulted only when the block is absent.
|
|
68
|
+
|
|
53
69
|
## Money
|
|
54
70
|
|
|
55
71
|
Amounts are integer cents everywhere — in the store, in `billingOverview()`, and on the wire. The only
|