@base44-preview/cli 0.1.8-pr.589.9d22ef2 → 0.1.9-pr.555.465f5ca

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 CHANGED
@@ -51,6 +51,8 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
51
51
  | [`login`](https://docs.base44.com/developers/references/cli/commands/login) | Authenticate with Base44 |
52
52
  | [`logout`](https://docs.base44.com/developers/references/cli/commands/logout) | Sign out and clear stored credentials |
53
53
  | [`whoami`](https://docs.base44.com/developers/references/cli/commands/whoami) | Display the current authenticated user |
54
+ | `actors deploy` | Deploy local actors to Base44 |
55
+ | `actors delete` | Delete deployed actors from Base44 |
54
56
  | [`agents pull`](https://docs.base44.com/developers/references/cli/commands/agents-pull) | Pull agents from Base44 to local files |
55
57
  | [`agents push`](https://docs.base44.com/developers/references/cli/commands/agents-push) | Push local agents to Base44 |
56
58
  | [`connectors initiate`](https://docs.base44.com/developers/references/cli/commands/connectors-initiate) | Initialize a connector on an app and start its OAuth flow |
@@ -9,7 +9,8 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@base44/sdk": "^0.8.3",
12
+ "@base44/sdk": "^0.8.40",
13
+ "@base44/vite-plugin": "^1.0.30",
13
14
  "lucide-react": "^0.475.0",
14
15
  "react": "^18.2.0",
15
16
  "react-dom": "^18.2.0"
@@ -0,0 +1,12 @@
1
+ import { createClient } from '@base44/sdk';
2
+ import { appParams } from '@/lib/app-params';
3
+
4
+ const { appId, token, functionsVersion, appBaseUrl } = appParams;
5
+
6
+ export const base44 = createClient({
7
+ appId,
8
+ token,
9
+ functionsVersion,
10
+ serverUrl: '',
11
+ appBaseUrl
12
+ });
@@ -0,0 +1,28 @@
1
+ import { getAccessToken } from '@base44/sdk';
2
+
3
+ const isNode = typeof window === 'undefined';
4
+
5
+ const isClearAccessTokenRequested = () =>
6
+ !isNode && new URLSearchParams(window.location.search).get("clear_access_token") === 'true';
7
+
8
+ const clearStoredAccessToken = () => {
9
+ window.localStorage.removeItem('base44_access_token');
10
+ window.localStorage.removeItem('token');
11
+ }
12
+
13
+ const getAppParams = () => {
14
+ if (isClearAccessTokenRequested()) {
15
+ clearStoredAccessToken();
16
+ }
17
+ return {
18
+ appId: import.meta.env.VITE_BASE44_APP_ID,
19
+ token: getAccessToken(),
20
+ functionsVersion: import.meta.env.VITE_BASE44_FUNCTIONS_VERSION,
21
+ appBaseUrl: import.meta.env.VITE_BASE44_APP_BASE_URL,
22
+ }
23
+ }
24
+
25
+
26
+ export const appParams = {
27
+ ...getAppParams()
28
+ }
@@ -1,12 +1,7 @@
1
- import { defineConfig } from 'vite';
1
+ import base44 from '@base44/vite-plugin';
2
2
  import react from '@vitejs/plugin-react';
3
- import path from 'path';
3
+ import { defineConfig } from 'vite';
4
4
 
5
5
  export default defineConfig({
6
- plugins: [react()],
7
- resolve: {
8
- alias: {
9
- '@': path.resolve(__dirname, './src'),
10
- },
11
- },
6
+ plugins: [base44(), react()],
12
7
  });