@swirepay-developer/sparo-embed-sdk 1.0.2 → 1.0.3
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 +21 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
- guest-token auth via `postMessage`
|
|
7
7
|
- automatic token refresh before expiry
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
**Gateway React developers:** start with [GATEWAY-REACT-GUIDE.md](./GATEWAY-REACT-GUIDE.md).
|
|
10
|
+
|
|
11
|
+
For backend architecture, see [SPARO-EMBEDDING.md](./SPARO-EMBEDDING.md).
|
|
12
|
+
For Maven/WebJar distribution, see [MAVEN-PUBLISH.md](./MAVEN-PUBLISH.md).
|
|
11
13
|
|
|
12
14
|
## Install
|
|
13
15
|
|
|
@@ -77,14 +79,28 @@ npm pack --dry-run
|
|
|
77
79
|
|
|
78
80
|
`npm run build` generates:
|
|
79
81
|
|
|
80
|
-
- `dist/index.
|
|
81
|
-
- `dist/index.
|
|
82
|
+
- `dist/index.cjs` (CommonJS — used by CRA/webpack `require`)
|
|
83
|
+
- `dist/index.js` (ES module)
|
|
82
84
|
- `dist/sparo-embed-sdk.global.js` (browser global: `window.SparoEmbedSDK`)
|
|
83
85
|
|
|
84
86
|
## Publish Checklist
|
|
85
87
|
|
|
88
|
+
Scoped packages (`@swirepay/...`) do **not** appear on registry.npmjs.org until you publish successfully.
|
|
89
|
+
|
|
86
90
|
```bash
|
|
87
91
|
npm run verify
|
|
88
92
|
npm pack --dry-run
|
|
89
|
-
|
|
93
|
+
npm login
|
|
94
|
+
# Private to @swirepay org (gateway devs need npm login + org access):
|
|
95
|
+
npm publish --access restricted
|
|
96
|
+
# OR public on npmjs (anyone can npm install):
|
|
97
|
+
npm publish --access public
|
|
90
98
|
```
|
|
99
|
+
|
|
100
|
+
After publish, confirm from any machine:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npm view @swirepay/sparo-embed-sdk version
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
If this returns **404**, gateway `npm install` will fail and CRA will keep reporting **Module not found**.
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swirepay-developer/sparo-embed-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "SPARO embedding SDK for guest-token based iframe integration",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"author": "Swirepay",
|
|
8
8
|
"sideEffects": false,
|
|
9
|
-
"type": "module",
|
|
10
9
|
"main": "./dist/index.cjs",
|
|
11
10
|
"module": "./dist/index.js",
|
|
12
11
|
"types": "./types/index.d.ts",
|
|
13
12
|
"unpkg": "./dist/sparo-embed-sdk.global.js",
|
|
13
|
+
"type": "module",
|
|
14
14
|
"jsdelivr": "./dist/sparo-embed-sdk.global.js",
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|