starpro-plugin-sdk 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +3 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -15,9 +15,6 @@ yarn add starpro-plugin-sdk
15
15
 
16
16
  # Menggunakan pnpm
17
17
  pnpm add starpro-plugin-sdk
18
-
19
- # Atau langsung dari repository Git internal:
20
- npm install git+https://github.com/suryacipta/starpro-plugin-sdk.git
21
18
  ```
22
19
 
23
20
  ---
@@ -44,7 +41,7 @@ defineStarProPlugin({
44
41
  root.render(
45
42
  <StarProPluginWrapper payload={payload}>
46
43
  <TenantDashboard />
47
- </StarProPluginWrapper>
44
+ </StarProPluginWrapper>,
48
45
  );
49
46
 
50
47
  // Cleanup unmount saat tab plugin ditutup di StarPro
@@ -64,9 +61,7 @@ export function ProfileWidget() {
64
61
  const { accessToken, user, isPlugin } = useStarProAuth();
65
62
 
66
63
  return (
67
- <div>
68
- {isPlugin && <p>Berjalan di StarPro sebagai: {user?.email}</p>}
69
- </div>
64
+ <div>{isPlugin && <p>Berjalan di StarPro sebagai: {user?.email}</p>}</div>
70
65
  );
71
66
  }
72
67
  ```
@@ -108,6 +103,7 @@ defineStarProPlugin({
108
103
  ---
109
104
 
110
105
  ## ⚙️ Fitur yang Dijalankan Otomatis oleh SDK:
106
+
111
107
  1. **Auto Storage Sync**: Menyimpan `accessToken` dan `refreshToken` ke `localStorage` dan `sessionStorage`.
112
108
  2. **Auto Axios Interceptor**: Menyuntikkan `Authorization: Bearer <accessToken>` ke semua request Axios.
113
109
  3. **Auto Fetch Interceptor**: Menyuntikkan header `Authorization` ke fungsi `fetch()` native browser.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starpro-plugin-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Universal SDK to turn any React, Next.js, Vue, or JavaScript web app into a native StarPro plugin with automatic authentication & login bypass.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",