hazo_files 1.5.2 → 2.0.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/CHANGE_LOG.md +16 -0
- package/README.md +185 -0
- package/SETUP_CHECKLIST.md +96 -0
- package/dist/index.d.mts +223 -10
- package/dist/index.d.ts +223 -10
- package/dist/index.js +406 -169
- package/dist/index.mjs +406 -169
- package/dist/server/index.d.mts +514 -11
- package/dist/server/index.d.ts +514 -11
- package/dist/server/index.js +947 -171
- package/dist/server/index.mjs +939 -171
- package/docs/superpowers/plans/2026-05-23-test-app-v2-providers.md +968 -0
- package/migrations/004_changed_by.sql +10 -0
- package/migrations/005_source_url.sql +10 -0
- package/migrations/006_quota_tracking.sql +20 -0
- package/package.json +14 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
-- hazo_files schema — migration 004: actor tracking
|
|
2
|
+
-- Adds changed_by column to track who performed each mutation.
|
|
3
|
+
--
|
|
4
|
+
-- SQLite version (commented):
|
|
5
|
+
-- ALTER TABLE hazo_files ADD COLUMN changed_by TEXT;
|
|
6
|
+
-- CREATE INDEX IF NOT EXISTS idx_hazo_files_changed_by ON hazo_files (changed_by);
|
|
7
|
+
|
|
8
|
+
-- PostgreSQL version (active):
|
|
9
|
+
ALTER TABLE hazo_files ADD COLUMN IF NOT EXISTS changed_by UUID;
|
|
10
|
+
CREATE INDEX IF NOT EXISTS idx_hazo_files_changed_by ON hazo_files (changed_by);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
-- hazo_files schema — migration 005: URL import provenance
|
|
2
|
+
-- Adds source_url column to track where a file was imported from.
|
|
3
|
+
--
|
|
4
|
+
-- SQLite version (commented):
|
|
5
|
+
-- ALTER TABLE hazo_files ADD COLUMN source_url TEXT;
|
|
6
|
+
-- CREATE INDEX IF NOT EXISTS idx_hazo_files_source_url ON hazo_files (source_url);
|
|
7
|
+
|
|
8
|
+
-- PostgreSQL version (active):
|
|
9
|
+
ALTER TABLE hazo_files ADD COLUMN IF NOT EXISTS source_url TEXT;
|
|
10
|
+
CREATE INDEX IF NOT EXISTS idx_hazo_files_source_url ON hazo_files (source_url);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
-- hazo_files schema — migration 006: per-scope quota tracking
|
|
2
|
+
-- Opt-in table. A scope without a row has no quota and uploads succeed (fail-open).
|
|
3
|
+
--
|
|
4
|
+
-- SQLite version (commented):
|
|
5
|
+
-- CREATE TABLE IF NOT EXISTS hazo_file_quotas (
|
|
6
|
+
-- scope_id TEXT PRIMARY KEY,
|
|
7
|
+
-- byte_limit INTEGER NOT NULL,
|
|
8
|
+
-- byte_used INTEGER NOT NULL DEFAULT 0,
|
|
9
|
+
-- updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
10
|
+
-- );
|
|
11
|
+
-- CREATE INDEX IF NOT EXISTS idx_hazo_file_quotas_used ON hazo_file_quotas (byte_used);
|
|
12
|
+
|
|
13
|
+
-- PostgreSQL version (active):
|
|
14
|
+
CREATE TABLE IF NOT EXISTS hazo_file_quotas (
|
|
15
|
+
scope_id UUID PRIMARY KEY,
|
|
16
|
+
byte_limit BIGINT NOT NULL,
|
|
17
|
+
byte_used BIGINT NOT NULL DEFAULT 0,
|
|
18
|
+
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
19
|
+
);
|
|
20
|
+
CREATE INDEX IF NOT EXISTS idx_hazo_file_quotas_used ON hazo_file_quotas (byte_used);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_files",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "File management including integration to cloud files",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -80,7 +80,9 @@
|
|
|
80
80
|
},
|
|
81
81
|
"homepage": "https://github.com/pub12/hazo_files#readme",
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"ini": "^4.1.3"
|
|
83
|
+
"ini": "^4.1.3",
|
|
84
|
+
"googleapis": "^140",
|
|
85
|
+
"mime-types": "^2.1.35"
|
|
84
86
|
},
|
|
85
87
|
"devDependencies": {
|
|
86
88
|
"@dnd-kit/core": "^6.3.1",
|
|
@@ -89,11 +91,12 @@
|
|
|
89
91
|
"@testing-library/jest-dom": "^6.9.1",
|
|
90
92
|
"@testing-library/react": "^14.3.1",
|
|
91
93
|
"@types/ini": "^4.1.1",
|
|
94
|
+
"@types/mime-types": "^2.1.4",
|
|
92
95
|
"@types/node": "^20.14.10",
|
|
93
96
|
"@types/react": "^18.3.3",
|
|
94
97
|
"@types/react-dom": "^18.3.0",
|
|
95
98
|
"dropbox": "^10.34.0",
|
|
96
|
-
"
|
|
99
|
+
"hazo_jobs": "^0.8.0",
|
|
97
100
|
"hazo_llm_api": "^1.2.7",
|
|
98
101
|
"jsdom": "^28.1.0",
|
|
99
102
|
"react": "^18.2.0",
|
|
@@ -112,8 +115,10 @@
|
|
|
112
115
|
"googleapis": "^140.0.0",
|
|
113
116
|
"hazo_connect": "^2.6.0",
|
|
114
117
|
"hazo_debug": "^2.0.0",
|
|
118
|
+
"hazo_jobs": "^0.8.0",
|
|
115
119
|
"hazo_llm_api": "^1.2.0",
|
|
116
120
|
"hazo_logs": "^1.0.13",
|
|
121
|
+
"hazo_secure": "^0.5.0",
|
|
117
122
|
"react": "^18.0.0",
|
|
118
123
|
"react-dom": "^18.0.0",
|
|
119
124
|
"server-only": ">=0.0.1",
|
|
@@ -151,6 +156,12 @@
|
|
|
151
156
|
"server-only": {
|
|
152
157
|
"optional": true
|
|
153
158
|
},
|
|
159
|
+
"hazo_jobs": {
|
|
160
|
+
"optional": true
|
|
161
|
+
},
|
|
162
|
+
"hazo_secure": {
|
|
163
|
+
"optional": true
|
|
164
|
+
},
|
|
154
165
|
"sonner": {
|
|
155
166
|
"optional": true
|
|
156
167
|
},
|