hazo_files 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.
- package/CLAUDE.md +6 -6
- package/README.md +12 -12
- package/SETUP_CHECKLIST.md +9 -9
- package/hazo_files_config.ini +1 -1
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -129,12 +129,12 @@ if (result.success) {
|
|
|
129
129
|
4. Defaults
|
|
130
130
|
|
|
131
131
|
**Environment Variable Mapping**:
|
|
132
|
-
- `
|
|
133
|
-
- `
|
|
134
|
-
- `
|
|
135
|
-
- `
|
|
136
|
-
- `
|
|
137
|
-
- `
|
|
132
|
+
- `HAZO_GOOGLE_DRIVE_CLIENT_ID` → `google_drive.clientId`
|
|
133
|
+
- `HAZO_GOOGLE_DRIVE_CLIENT_SECRET` → `google_drive.clientSecret`
|
|
134
|
+
- `HAZO_GOOGLE_DRIVE_REDIRECT_URI` → `google_drive.redirectUri`
|
|
135
|
+
- `HAZO_GOOGLE_DRIVE_REFRESH_TOKEN` → `google_drive.refreshToken`
|
|
136
|
+
- `HAZO_GOOGLE_DRIVE_ACCESS_TOKEN` → `google_drive.accessToken`
|
|
137
|
+
- `HAZO_GOOGLE_DRIVE_ROOT_FOLDER_ID` → `google_drive.rootFolderId`
|
|
138
138
|
|
|
139
139
|
**Config Loading**:
|
|
140
140
|
```typescript
|
package/README.md
CHANGED
|
@@ -157,9 +157,9 @@ function MyFileBrowser() {
|
|
|
157
157
|
Create `.env.local`:
|
|
158
158
|
|
|
159
159
|
```env
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
HAZO_GOOGLE_DRIVE_CLIENT_ID=your-client-id.apps.googleusercontent.com
|
|
161
|
+
HAZO_GOOGLE_DRIVE_CLIENT_SECRET=your-client-secret
|
|
162
|
+
HAZO_GOOGLE_DRIVE_REDIRECT_URI=http://localhost:3000/api/auth/callback/google
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
#### 3. Configure hazo_files
|
|
@@ -187,9 +187,9 @@ const fileManager = createFileManager({
|
|
|
187
187
|
config: {
|
|
188
188
|
provider: 'google_drive',
|
|
189
189
|
google_drive: {
|
|
190
|
-
clientId: process.env.
|
|
191
|
-
clientSecret: process.env.
|
|
192
|
-
redirectUri: process.env.
|
|
190
|
+
clientId: process.env.HAZO_GOOGLE_DRIVE_CLIENT_ID!,
|
|
191
|
+
clientSecret: process.env.HAZO_GOOGLE_DRIVE_CLIENT_SECRET!,
|
|
192
|
+
redirectUri: process.env.HAZO_GOOGLE_DRIVE_REDIRECT_URI!,
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
});
|
|
@@ -444,12 +444,12 @@ date_formats = YYYY,YY,MM,M,DD,D,MMM,MMMM,YYYY-MM-DD,YYYY-MMM-DD,DD-MM-YYYY,MM-D
|
|
|
444
444
|
|
|
445
445
|
The following environment variables can override configuration file values:
|
|
446
446
|
|
|
447
|
-
- `
|
|
448
|
-
- `
|
|
449
|
-
- `
|
|
450
|
-
- `
|
|
451
|
-
- `
|
|
452
|
-
- `
|
|
447
|
+
- `HAZO_GOOGLE_DRIVE_CLIENT_ID`
|
|
448
|
+
- `HAZO_GOOGLE_DRIVE_CLIENT_SECRET`
|
|
449
|
+
- `HAZO_GOOGLE_DRIVE_REDIRECT_URI`
|
|
450
|
+
- `HAZO_GOOGLE_DRIVE_REFRESH_TOKEN`
|
|
451
|
+
- `HAZO_GOOGLE_DRIVE_ACCESS_TOKEN`
|
|
452
|
+
- `HAZO_GOOGLE_DRIVE_ROOT_FOLDER_ID`
|
|
453
453
|
|
|
454
454
|
### Configuration via Code
|
|
455
455
|
|
package/SETUP_CHECKLIST.md
CHANGED
|
@@ -651,9 +651,9 @@ Step-by-step guide to get hazo_files up and running in your project. Check off e
|
|
|
651
651
|
|
|
652
652
|
- [ ] Create `.env.local` file:
|
|
653
653
|
```bash
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
654
|
+
HAZO_GOOGLE_DRIVE_CLIENT_ID=your-client-id.apps.googleusercontent.com
|
|
655
|
+
HAZO_GOOGLE_DRIVE_CLIENT_SECRET=GOCSPX-xxxxx
|
|
656
|
+
HAZO_GOOGLE_DRIVE_REDIRECT_URI=http://localhost:3000/api/auth/google/callback
|
|
657
657
|
```
|
|
658
658
|
|
|
659
659
|
- [ ] Update `hazo_files_config.ini`:
|
|
@@ -759,9 +759,9 @@ Step-by-step guide to get hazo_files up and running in your project. Check off e
|
|
|
759
759
|
config: {
|
|
760
760
|
provider: 'google_drive',
|
|
761
761
|
google_drive: {
|
|
762
|
-
clientId: process.env.
|
|
763
|
-
clientSecret: process.env.
|
|
764
|
-
redirectUri: process.env.
|
|
762
|
+
clientId: process.env.HAZO_GOOGLE_DRIVE_CLIENT_ID!,
|
|
763
|
+
clientSecret: process.env.HAZO_GOOGLE_DRIVE_CLIENT_SECRET!,
|
|
764
|
+
redirectUri: process.env.HAZO_GOOGLE_DRIVE_REDIRECT_URI!,
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
767
|
});
|
|
@@ -791,9 +791,9 @@ Step-by-step guide to get hazo_files up and running in your project. Check off e
|
|
|
791
791
|
config: {
|
|
792
792
|
provider: 'google_drive',
|
|
793
793
|
google_drive: {
|
|
794
|
-
clientId: process.env.
|
|
795
|
-
clientSecret: process.env.
|
|
796
|
-
redirectUri: process.env.
|
|
794
|
+
clientId: process.env.HAZO_GOOGLE_DRIVE_CLIENT_ID!,
|
|
795
|
+
clientSecret: process.env.HAZO_GOOGLE_DRIVE_CLIENT_SECRET!,
|
|
796
|
+
redirectUri: process.env.HAZO_GOOGLE_DRIVE_REDIRECT_URI!,
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
});
|
package/hazo_files_config.ini
CHANGED
|
@@ -16,7 +16,7 @@ max_file_size = 0
|
|
|
16
16
|
[google_drive]
|
|
17
17
|
; Google Drive OAuth credentials
|
|
18
18
|
; These can also be set via environment variables:
|
|
19
|
-
;
|
|
19
|
+
; HAZO_GOOGLE_DRIVE_CLIENT_ID, HAZO_GOOGLE_DRIVE_CLIENT_SECRET, etc.
|
|
20
20
|
client_id =
|
|
21
21
|
client_secret =
|
|
22
22
|
redirect_uri = http://localhost:3000/api/auth/callback/google
|