Spaces:
Running
Running
deploy: taboard API (overwrite)
Browse files- Dockerfile +11 -8
- README.md +18 -7
- package-lock.json +984 -0
- package.json +21 -0
- public/css/styles.css +253 -0
- public/index.html +65 -0
- public/js/api.js +94 -0
- public/js/app.js +28 -0
- public/js/projects.js +128 -0
- public/js/tickets.js +336 -0
- server.js +34 -0
- src/routes/flow.js +68 -0
- src/routes/projects.js +85 -0
- src/routes/tickets.js +206 -0
- src/status.js +6 -0
- src/supabase.js +18 -0
Dockerfile
CHANGED
|
@@ -1,15 +1,18 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
| 6 |
-
COPY
|
|
|
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
|
|
|
|
|
|
|
| 10 |
|
|
|
|
|
|
|
| 11 |
EXPOSE 7860
|
| 12 |
|
| 13 |
-
|
| 14 |
-
WORKDIR /app/backend
|
| 15 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
FROM node:20-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install dependencies first (better layer caching)
|
| 6 |
+
COPY package.json package-lock.json ./
|
| 7 |
+
RUN npm ci --omit=dev
|
| 8 |
|
| 9 |
+
# Copy application source
|
| 10 |
+
COPY server.js ./
|
| 11 |
+
COPY src/ ./src/
|
| 12 |
+
COPY public/ ./public/
|
| 13 |
|
| 14 |
+
# HF Spaces routes traffic to port 7860 by default
|
| 15 |
+
ENV PORT=7860
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
+
CMD ["node", "server.js"]
|
|
|
|
|
|
README.md
CHANGED
|
@@ -1,12 +1,23 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
|
|
|
| 7 |
pinned: false
|
| 8 |
-
license: apache-2.0
|
| 9 |
-
short_description: API
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Taboard API
|
| 3 |
+
emoji: 🗂️
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
pinned: false
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Taboard
|
| 12 |
+
|
| 13 |
+
Jira-style admin board + API backed by Supabase.
|
| 14 |
+
|
| 15 |
+
## Required secrets
|
| 16 |
+
|
| 17 |
+
Set these in the Space **Settings → Variables and secrets**:
|
| 18 |
+
|
| 19 |
+
- `SUPABASE_URL` — your Supabase project URL
|
| 20 |
+
- `SUPABASE_KEY` — Supabase service-role key (server-side only)
|
| 21 |
+
- `STORAGE_BUCKET` — storage bucket name (default: `ticket-images`)
|
| 22 |
+
|
| 23 |
+
`PORT` is provided automatically by the Space (7860).
|
package-lock.json
ADDED
|
@@ -0,0 +1,984 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "taboard",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"lockfileVersion": 3,
|
| 5 |
+
"requires": true,
|
| 6 |
+
"packages": {
|
| 7 |
+
"": {
|
| 8 |
+
"name": "taboard",
|
| 9 |
+
"version": "1.0.0",
|
| 10 |
+
"dependencies": {
|
| 11 |
+
"@supabase/supabase-js": "^2.45.0",
|
| 12 |
+
"cors": "^2.8.5",
|
| 13 |
+
"dotenv": "^16.4.5",
|
| 14 |
+
"express": "^4.19.2",
|
| 15 |
+
"multer": "^2.0.1"
|
| 16 |
+
},
|
| 17 |
+
"engines": {
|
| 18 |
+
"node": ">=18"
|
| 19 |
+
}
|
| 20 |
+
},
|
| 21 |
+
"node_modules/@supabase/auth-js": {
|
| 22 |
+
"version": "2.110.6",
|
| 23 |
+
"resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.110.6.tgz",
|
| 24 |
+
"integrity": "sha512-20v99wV4dodllbDOsD8AUVkQ7Ie+vwcgPeORY9YlC9YyJSmVgWff9gRTdgmyfE6GJHoSMJuQ4HZokSLHA/7YUg==",
|
| 25 |
+
"dependencies": {
|
| 26 |
+
"tslib": "2.8.1"
|
| 27 |
+
},
|
| 28 |
+
"engines": {
|
| 29 |
+
"node": ">=22.0.0"
|
| 30 |
+
}
|
| 31 |
+
},
|
| 32 |
+
"node_modules/@supabase/functions-js": {
|
| 33 |
+
"version": "2.110.6",
|
| 34 |
+
"resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-2.110.6.tgz",
|
| 35 |
+
"integrity": "sha512-Ih/I766vc579WfNzXSv1ERssCHKzaPj9rpST/j9wsMuUv+AfmRteKrJn3sVmrJIwQU5qJya2+aWTlvhf4WoMsg==",
|
| 36 |
+
"dependencies": {
|
| 37 |
+
"tslib": "2.8.1"
|
| 38 |
+
},
|
| 39 |
+
"engines": {
|
| 40 |
+
"node": ">=22.0.0"
|
| 41 |
+
}
|
| 42 |
+
},
|
| 43 |
+
"node_modules/@supabase/phoenix": {
|
| 44 |
+
"version": "0.4.4",
|
| 45 |
+
"resolved": "https://registry.npmjs.org/@supabase/phoenix/-/phoenix-0.4.4.tgz",
|
| 46 |
+
"integrity": "sha512-Gt0pqoXuIqX/8dvG0OKp/wMCobXNH3klNbUPBNyOfN0YA1IswrM3HyWFMOPk1Jy+BRaIyDPcFx4jLBwHNmlyfQ=="
|
| 47 |
+
},
|
| 48 |
+
"node_modules/@supabase/postgrest-js": {
|
| 49 |
+
"version": "2.110.6",
|
| 50 |
+
"resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-2.110.6.tgz",
|
| 51 |
+
"integrity": "sha512-kDNKncLtYBI/QT8HuVGSui/F3KrC3iWy7KM5M3EvWbEujf1cL+fdwMr2eeA8PEZUIPBeNbDxRzdFZo5t86iqUQ==",
|
| 52 |
+
"dependencies": {
|
| 53 |
+
"tslib": "2.8.1"
|
| 54 |
+
},
|
| 55 |
+
"engines": {
|
| 56 |
+
"node": ">=22.0.0"
|
| 57 |
+
}
|
| 58 |
+
},
|
| 59 |
+
"node_modules/@supabase/realtime-js": {
|
| 60 |
+
"version": "2.110.6",
|
| 61 |
+
"resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.110.6.tgz",
|
| 62 |
+
"integrity": "sha512-F2BhRmbC1dJlNA6cdjtbIWQJNV112TYbzEc0/0UFZYvKL52mL0PR0ZrlpIPEludV85WEmjA1RpjW2H5tNQka9g==",
|
| 63 |
+
"dependencies": {
|
| 64 |
+
"@supabase/phoenix": "0.4.4",
|
| 65 |
+
"tslib": "2.8.1"
|
| 66 |
+
},
|
| 67 |
+
"engines": {
|
| 68 |
+
"node": ">=22.0.0"
|
| 69 |
+
}
|
| 70 |
+
},
|
| 71 |
+
"node_modules/@supabase/storage-js": {
|
| 72 |
+
"version": "2.110.6",
|
| 73 |
+
"resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-2.110.6.tgz",
|
| 74 |
+
"integrity": "sha512-DHS7Jy8MCu2sltDBjANu6oGjeUBUY+bowBnga6CySwtAF2BBKCTJGULnt7wyKPSLSXsoiCyzTwyU1r3SAx++Rg==",
|
| 75 |
+
"dependencies": {
|
| 76 |
+
"iceberg-js": "^0.8.1",
|
| 77 |
+
"tslib": "2.8.1"
|
| 78 |
+
},
|
| 79 |
+
"engines": {
|
| 80 |
+
"node": ">=22.0.0"
|
| 81 |
+
}
|
| 82 |
+
},
|
| 83 |
+
"node_modules/@supabase/supabase-js": {
|
| 84 |
+
"version": "2.110.6",
|
| 85 |
+
"resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.110.6.tgz",
|
| 86 |
+
"integrity": "sha512-UJTAz1NUiSRI2mQYhUPvNMwqfkSucV1iSCcMJz8jgsSUTOfic9C3D6LGNOrH6KTvYUhxRvnf3ktq2Sd3IXIQzQ==",
|
| 87 |
+
"dependencies": {
|
| 88 |
+
"@supabase/auth-js": "2.110.6",
|
| 89 |
+
"@supabase/functions-js": "2.110.6",
|
| 90 |
+
"@supabase/postgrest-js": "2.110.6",
|
| 91 |
+
"@supabase/realtime-js": "2.110.6",
|
| 92 |
+
"@supabase/storage-js": "2.110.6"
|
| 93 |
+
},
|
| 94 |
+
"engines": {
|
| 95 |
+
"node": ">=22.0.0"
|
| 96 |
+
}
|
| 97 |
+
},
|
| 98 |
+
"node_modules/accepts": {
|
| 99 |
+
"version": "1.3.8",
|
| 100 |
+
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
| 101 |
+
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
| 102 |
+
"dependencies": {
|
| 103 |
+
"mime-types": "~2.1.34",
|
| 104 |
+
"negotiator": "0.6.3"
|
| 105 |
+
},
|
| 106 |
+
"engines": {
|
| 107 |
+
"node": ">= 0.6"
|
| 108 |
+
}
|
| 109 |
+
},
|
| 110 |
+
"node_modules/append-field": {
|
| 111 |
+
"version": "1.0.0",
|
| 112 |
+
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
|
| 113 |
+
"integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw=="
|
| 114 |
+
},
|
| 115 |
+
"node_modules/array-flatten": {
|
| 116 |
+
"version": "1.1.1",
|
| 117 |
+
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
| 118 |
+
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
|
| 119 |
+
},
|
| 120 |
+
"node_modules/body-parser": {
|
| 121 |
+
"version": "1.20.6",
|
| 122 |
+
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.6.tgz",
|
| 123 |
+
"integrity": "sha512-p5tAzS57i5MV9fZFDj9LeIiTZEufbSe2eDozP+ElheSUq1m74CRq1jI4mYNDdVs9vQztXFLuk/Gd6BWTdwRJ5g==",
|
| 124 |
+
"dependencies": {
|
| 125 |
+
"bytes": "~3.1.2",
|
| 126 |
+
"content-type": "~1.0.5",
|
| 127 |
+
"debug": "2.6.9",
|
| 128 |
+
"depd": "2.0.0",
|
| 129 |
+
"destroy": "~1.2.0",
|
| 130 |
+
"http-errors": "~2.0.1",
|
| 131 |
+
"iconv-lite": "~0.4.24",
|
| 132 |
+
"on-finished": "~2.4.1",
|
| 133 |
+
"qs": "~6.15.1",
|
| 134 |
+
"raw-body": "~2.5.3",
|
| 135 |
+
"type-is": "~1.6.18",
|
| 136 |
+
"unpipe": "~1.0.0"
|
| 137 |
+
},
|
| 138 |
+
"engines": {
|
| 139 |
+
"node": ">= 0.8",
|
| 140 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
| 141 |
+
}
|
| 142 |
+
},
|
| 143 |
+
"node_modules/buffer-from": {
|
| 144 |
+
"version": "1.1.2",
|
| 145 |
+
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
|
| 146 |
+
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
|
| 147 |
+
},
|
| 148 |
+
"node_modules/busboy": {
|
| 149 |
+
"version": "1.6.0",
|
| 150 |
+
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
|
| 151 |
+
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
|
| 152 |
+
"dependencies": {
|
| 153 |
+
"streamsearch": "^1.1.0"
|
| 154 |
+
},
|
| 155 |
+
"engines": {
|
| 156 |
+
"node": ">=10.16.0"
|
| 157 |
+
}
|
| 158 |
+
},
|
| 159 |
+
"node_modules/bytes": {
|
| 160 |
+
"version": "3.1.2",
|
| 161 |
+
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
| 162 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
| 163 |
+
"engines": {
|
| 164 |
+
"node": ">= 0.8"
|
| 165 |
+
}
|
| 166 |
+
},
|
| 167 |
+
"node_modules/call-bind-apply-helpers": {
|
| 168 |
+
"version": "1.0.2",
|
| 169 |
+
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
| 170 |
+
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
| 171 |
+
"dependencies": {
|
| 172 |
+
"es-errors": "^1.3.0",
|
| 173 |
+
"function-bind": "^1.1.2"
|
| 174 |
+
},
|
| 175 |
+
"engines": {
|
| 176 |
+
"node": ">= 0.4"
|
| 177 |
+
}
|
| 178 |
+
},
|
| 179 |
+
"node_modules/call-bound": {
|
| 180 |
+
"version": "1.0.4",
|
| 181 |
+
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
|
| 182 |
+
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
| 183 |
+
"dependencies": {
|
| 184 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 185 |
+
"get-intrinsic": "^1.3.0"
|
| 186 |
+
},
|
| 187 |
+
"engines": {
|
| 188 |
+
"node": ">= 0.4"
|
| 189 |
+
},
|
| 190 |
+
"funding": {
|
| 191 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 192 |
+
}
|
| 193 |
+
},
|
| 194 |
+
"node_modules/concat-stream": {
|
| 195 |
+
"version": "2.0.0",
|
| 196 |
+
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz",
|
| 197 |
+
"integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
|
| 198 |
+
"engines": [
|
| 199 |
+
"node >= 6.0"
|
| 200 |
+
],
|
| 201 |
+
"dependencies": {
|
| 202 |
+
"buffer-from": "^1.0.0",
|
| 203 |
+
"inherits": "^2.0.3",
|
| 204 |
+
"readable-stream": "^3.0.2",
|
| 205 |
+
"typedarray": "^0.0.6"
|
| 206 |
+
}
|
| 207 |
+
},
|
| 208 |
+
"node_modules/content-disposition": {
|
| 209 |
+
"version": "0.5.4",
|
| 210 |
+
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
| 211 |
+
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
| 212 |
+
"dependencies": {
|
| 213 |
+
"safe-buffer": "5.2.1"
|
| 214 |
+
},
|
| 215 |
+
"engines": {
|
| 216 |
+
"node": ">= 0.6"
|
| 217 |
+
}
|
| 218 |
+
},
|
| 219 |
+
"node_modules/content-type": {
|
| 220 |
+
"version": "1.0.5",
|
| 221 |
+
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
| 222 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
| 223 |
+
"engines": {
|
| 224 |
+
"node": ">= 0.6"
|
| 225 |
+
}
|
| 226 |
+
},
|
| 227 |
+
"node_modules/cookie": {
|
| 228 |
+
"version": "0.7.2",
|
| 229 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
|
| 230 |
+
"integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
|
| 231 |
+
"engines": {
|
| 232 |
+
"node": ">= 0.6"
|
| 233 |
+
}
|
| 234 |
+
},
|
| 235 |
+
"node_modules/cookie-signature": {
|
| 236 |
+
"version": "1.0.7",
|
| 237 |
+
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
|
| 238 |
+
"integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA=="
|
| 239 |
+
},
|
| 240 |
+
"node_modules/cors": {
|
| 241 |
+
"version": "2.8.6",
|
| 242 |
+
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz",
|
| 243 |
+
"integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==",
|
| 244 |
+
"dependencies": {
|
| 245 |
+
"object-assign": "^4",
|
| 246 |
+
"vary": "^1"
|
| 247 |
+
},
|
| 248 |
+
"engines": {
|
| 249 |
+
"node": ">= 0.10"
|
| 250 |
+
},
|
| 251 |
+
"funding": {
|
| 252 |
+
"type": "opencollective",
|
| 253 |
+
"url": "https://opencollective.com/express"
|
| 254 |
+
}
|
| 255 |
+
},
|
| 256 |
+
"node_modules/debug": {
|
| 257 |
+
"version": "2.6.9",
|
| 258 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
| 259 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
| 260 |
+
"dependencies": {
|
| 261 |
+
"ms": "2.0.0"
|
| 262 |
+
}
|
| 263 |
+
},
|
| 264 |
+
"node_modules/depd": {
|
| 265 |
+
"version": "2.0.0",
|
| 266 |
+
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
| 267 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
| 268 |
+
"engines": {
|
| 269 |
+
"node": ">= 0.8"
|
| 270 |
+
}
|
| 271 |
+
},
|
| 272 |
+
"node_modules/destroy": {
|
| 273 |
+
"version": "1.2.0",
|
| 274 |
+
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
| 275 |
+
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
| 276 |
+
"engines": {
|
| 277 |
+
"node": ">= 0.8",
|
| 278 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
| 279 |
+
}
|
| 280 |
+
},
|
| 281 |
+
"node_modules/dotenv": {
|
| 282 |
+
"version": "16.6.1",
|
| 283 |
+
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
|
| 284 |
+
"integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
|
| 285 |
+
"engines": {
|
| 286 |
+
"node": ">=12"
|
| 287 |
+
},
|
| 288 |
+
"funding": {
|
| 289 |
+
"url": "https://dotenvx.com"
|
| 290 |
+
}
|
| 291 |
+
},
|
| 292 |
+
"node_modules/dunder-proto": {
|
| 293 |
+
"version": "1.0.1",
|
| 294 |
+
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
| 295 |
+
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
| 296 |
+
"dependencies": {
|
| 297 |
+
"call-bind-apply-helpers": "^1.0.1",
|
| 298 |
+
"es-errors": "^1.3.0",
|
| 299 |
+
"gopd": "^1.2.0"
|
| 300 |
+
},
|
| 301 |
+
"engines": {
|
| 302 |
+
"node": ">= 0.4"
|
| 303 |
+
}
|
| 304 |
+
},
|
| 305 |
+
"node_modules/ee-first": {
|
| 306 |
+
"version": "1.1.1",
|
| 307 |
+
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
| 308 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
| 309 |
+
},
|
| 310 |
+
"node_modules/encodeurl": {
|
| 311 |
+
"version": "2.0.0",
|
| 312 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
| 313 |
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
| 314 |
+
"engines": {
|
| 315 |
+
"node": ">= 0.8"
|
| 316 |
+
}
|
| 317 |
+
},
|
| 318 |
+
"node_modules/es-define-property": {
|
| 319 |
+
"version": "1.0.1",
|
| 320 |
+
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
| 321 |
+
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
| 322 |
+
"engines": {
|
| 323 |
+
"node": ">= 0.4"
|
| 324 |
+
}
|
| 325 |
+
},
|
| 326 |
+
"node_modules/es-errors": {
|
| 327 |
+
"version": "1.3.0",
|
| 328 |
+
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
| 329 |
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
| 330 |
+
"engines": {
|
| 331 |
+
"node": ">= 0.4"
|
| 332 |
+
}
|
| 333 |
+
},
|
| 334 |
+
"node_modules/es-object-atoms": {
|
| 335 |
+
"version": "1.1.2",
|
| 336 |
+
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
|
| 337 |
+
"integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
|
| 338 |
+
"dependencies": {
|
| 339 |
+
"es-errors": "^1.3.0"
|
| 340 |
+
},
|
| 341 |
+
"engines": {
|
| 342 |
+
"node": ">= 0.4"
|
| 343 |
+
}
|
| 344 |
+
},
|
| 345 |
+
"node_modules/escape-html": {
|
| 346 |
+
"version": "1.0.3",
|
| 347 |
+
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
| 348 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
|
| 349 |
+
},
|
| 350 |
+
"node_modules/etag": {
|
| 351 |
+
"version": "1.8.1",
|
| 352 |
+
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
| 353 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
| 354 |
+
"engines": {
|
| 355 |
+
"node": ">= 0.6"
|
| 356 |
+
}
|
| 357 |
+
},
|
| 358 |
+
"node_modules/express": {
|
| 359 |
+
"version": "4.22.2",
|
| 360 |
+
"resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz",
|
| 361 |
+
"integrity": "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==",
|
| 362 |
+
"dependencies": {
|
| 363 |
+
"accepts": "~1.3.8",
|
| 364 |
+
"array-flatten": "1.1.1",
|
| 365 |
+
"body-parser": "~1.20.5",
|
| 366 |
+
"content-disposition": "~0.5.4",
|
| 367 |
+
"content-type": "~1.0.4",
|
| 368 |
+
"cookie": "~0.7.1",
|
| 369 |
+
"cookie-signature": "~1.0.6",
|
| 370 |
+
"debug": "2.6.9",
|
| 371 |
+
"depd": "2.0.0",
|
| 372 |
+
"encodeurl": "~2.0.0",
|
| 373 |
+
"escape-html": "~1.0.3",
|
| 374 |
+
"etag": "~1.8.1",
|
| 375 |
+
"finalhandler": "~1.3.1",
|
| 376 |
+
"fresh": "~0.5.2",
|
| 377 |
+
"http-errors": "~2.0.0",
|
| 378 |
+
"merge-descriptors": "1.0.3",
|
| 379 |
+
"methods": "~1.1.2",
|
| 380 |
+
"on-finished": "~2.4.1",
|
| 381 |
+
"parseurl": "~1.3.3",
|
| 382 |
+
"path-to-regexp": "~0.1.12",
|
| 383 |
+
"proxy-addr": "~2.0.7",
|
| 384 |
+
"qs": "~6.15.1",
|
| 385 |
+
"range-parser": "~1.2.1",
|
| 386 |
+
"safe-buffer": "5.2.1",
|
| 387 |
+
"send": "~0.19.0",
|
| 388 |
+
"serve-static": "~1.16.2",
|
| 389 |
+
"setprototypeof": "1.2.0",
|
| 390 |
+
"statuses": "~2.0.1",
|
| 391 |
+
"type-is": "~1.6.18",
|
| 392 |
+
"utils-merge": "1.0.1",
|
| 393 |
+
"vary": "~1.1.2"
|
| 394 |
+
},
|
| 395 |
+
"engines": {
|
| 396 |
+
"node": ">= 0.10.0"
|
| 397 |
+
},
|
| 398 |
+
"funding": {
|
| 399 |
+
"type": "opencollective",
|
| 400 |
+
"url": "https://opencollective.com/express"
|
| 401 |
+
}
|
| 402 |
+
},
|
| 403 |
+
"node_modules/finalhandler": {
|
| 404 |
+
"version": "1.3.2",
|
| 405 |
+
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz",
|
| 406 |
+
"integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==",
|
| 407 |
+
"dependencies": {
|
| 408 |
+
"debug": "2.6.9",
|
| 409 |
+
"encodeurl": "~2.0.0",
|
| 410 |
+
"escape-html": "~1.0.3",
|
| 411 |
+
"on-finished": "~2.4.1",
|
| 412 |
+
"parseurl": "~1.3.3",
|
| 413 |
+
"statuses": "~2.0.2",
|
| 414 |
+
"unpipe": "~1.0.0"
|
| 415 |
+
},
|
| 416 |
+
"engines": {
|
| 417 |
+
"node": ">= 0.8"
|
| 418 |
+
}
|
| 419 |
+
},
|
| 420 |
+
"node_modules/forwarded": {
|
| 421 |
+
"version": "0.2.0",
|
| 422 |
+
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
| 423 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
| 424 |
+
"engines": {
|
| 425 |
+
"node": ">= 0.6"
|
| 426 |
+
}
|
| 427 |
+
},
|
| 428 |
+
"node_modules/fresh": {
|
| 429 |
+
"version": "0.5.2",
|
| 430 |
+
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
| 431 |
+
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
| 432 |
+
"engines": {
|
| 433 |
+
"node": ">= 0.6"
|
| 434 |
+
}
|
| 435 |
+
},
|
| 436 |
+
"node_modules/function-bind": {
|
| 437 |
+
"version": "1.1.2",
|
| 438 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
| 439 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
| 440 |
+
"funding": {
|
| 441 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 442 |
+
}
|
| 443 |
+
},
|
| 444 |
+
"node_modules/get-intrinsic": {
|
| 445 |
+
"version": "1.3.0",
|
| 446 |
+
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
| 447 |
+
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
| 448 |
+
"dependencies": {
|
| 449 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 450 |
+
"es-define-property": "^1.0.1",
|
| 451 |
+
"es-errors": "^1.3.0",
|
| 452 |
+
"es-object-atoms": "^1.1.1",
|
| 453 |
+
"function-bind": "^1.1.2",
|
| 454 |
+
"get-proto": "^1.0.1",
|
| 455 |
+
"gopd": "^1.2.0",
|
| 456 |
+
"has-symbols": "^1.1.0",
|
| 457 |
+
"hasown": "^2.0.2",
|
| 458 |
+
"math-intrinsics": "^1.1.0"
|
| 459 |
+
},
|
| 460 |
+
"engines": {
|
| 461 |
+
"node": ">= 0.4"
|
| 462 |
+
},
|
| 463 |
+
"funding": {
|
| 464 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 465 |
+
}
|
| 466 |
+
},
|
| 467 |
+
"node_modules/get-proto": {
|
| 468 |
+
"version": "1.0.1",
|
| 469 |
+
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
| 470 |
+
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
| 471 |
+
"dependencies": {
|
| 472 |
+
"dunder-proto": "^1.0.1",
|
| 473 |
+
"es-object-atoms": "^1.0.0"
|
| 474 |
+
},
|
| 475 |
+
"engines": {
|
| 476 |
+
"node": ">= 0.4"
|
| 477 |
+
}
|
| 478 |
+
},
|
| 479 |
+
"node_modules/gopd": {
|
| 480 |
+
"version": "1.2.0",
|
| 481 |
+
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
| 482 |
+
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
| 483 |
+
"engines": {
|
| 484 |
+
"node": ">= 0.4"
|
| 485 |
+
},
|
| 486 |
+
"funding": {
|
| 487 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 488 |
+
}
|
| 489 |
+
},
|
| 490 |
+
"node_modules/has-symbols": {
|
| 491 |
+
"version": "1.1.0",
|
| 492 |
+
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
| 493 |
+
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
| 494 |
+
"engines": {
|
| 495 |
+
"node": ">= 0.4"
|
| 496 |
+
},
|
| 497 |
+
"funding": {
|
| 498 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 499 |
+
}
|
| 500 |
+
},
|
| 501 |
+
"node_modules/hasown": {
|
| 502 |
+
"version": "2.0.4",
|
| 503 |
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
|
| 504 |
+
"integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
|
| 505 |
+
"dependencies": {
|
| 506 |
+
"function-bind": "^1.1.2"
|
| 507 |
+
},
|
| 508 |
+
"engines": {
|
| 509 |
+
"node": ">= 0.4"
|
| 510 |
+
}
|
| 511 |
+
},
|
| 512 |
+
"node_modules/http-errors": {
|
| 513 |
+
"version": "2.0.1",
|
| 514 |
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
| 515 |
+
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
| 516 |
+
"dependencies": {
|
| 517 |
+
"depd": "~2.0.0",
|
| 518 |
+
"inherits": "~2.0.4",
|
| 519 |
+
"setprototypeof": "~1.2.0",
|
| 520 |
+
"statuses": "~2.0.2",
|
| 521 |
+
"toidentifier": "~1.0.1"
|
| 522 |
+
},
|
| 523 |
+
"engines": {
|
| 524 |
+
"node": ">= 0.8"
|
| 525 |
+
},
|
| 526 |
+
"funding": {
|
| 527 |
+
"type": "opencollective",
|
| 528 |
+
"url": "https://opencollective.com/express"
|
| 529 |
+
}
|
| 530 |
+
},
|
| 531 |
+
"node_modules/iceberg-js": {
|
| 532 |
+
"version": "0.8.1",
|
| 533 |
+
"resolved": "https://registry.npmjs.org/iceberg-js/-/iceberg-js-0.8.1.tgz",
|
| 534 |
+
"integrity": "sha512-1dhVQZXhcHje7798IVM+xoo/1ZdVfzOMIc8/rgVSijRK38EDqOJoGula9N/8ZI5RD8QTxNQtK/Gozpr+qUqRRA==",
|
| 535 |
+
"engines": {
|
| 536 |
+
"node": ">=20.0.0"
|
| 537 |
+
}
|
| 538 |
+
},
|
| 539 |
+
"node_modules/iconv-lite": {
|
| 540 |
+
"version": "0.4.24",
|
| 541 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
| 542 |
+
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
| 543 |
+
"dependencies": {
|
| 544 |
+
"safer-buffer": ">= 2.1.2 < 3"
|
| 545 |
+
},
|
| 546 |
+
"engines": {
|
| 547 |
+
"node": ">=0.10.0"
|
| 548 |
+
}
|
| 549 |
+
},
|
| 550 |
+
"node_modules/inherits": {
|
| 551 |
+
"version": "2.0.4",
|
| 552 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
| 553 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
| 554 |
+
},
|
| 555 |
+
"node_modules/ipaddr.js": {
|
| 556 |
+
"version": "1.9.1",
|
| 557 |
+
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
| 558 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
| 559 |
+
"engines": {
|
| 560 |
+
"node": ">= 0.10"
|
| 561 |
+
}
|
| 562 |
+
},
|
| 563 |
+
"node_modules/math-intrinsics": {
|
| 564 |
+
"version": "1.1.0",
|
| 565 |
+
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
| 566 |
+
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
| 567 |
+
"engines": {
|
| 568 |
+
"node": ">= 0.4"
|
| 569 |
+
}
|
| 570 |
+
},
|
| 571 |
+
"node_modules/media-typer": {
|
| 572 |
+
"version": "0.3.0",
|
| 573 |
+
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
| 574 |
+
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
| 575 |
+
"engines": {
|
| 576 |
+
"node": ">= 0.6"
|
| 577 |
+
}
|
| 578 |
+
},
|
| 579 |
+
"node_modules/merge-descriptors": {
|
| 580 |
+
"version": "1.0.3",
|
| 581 |
+
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
|
| 582 |
+
"integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
|
| 583 |
+
"funding": {
|
| 584 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 585 |
+
}
|
| 586 |
+
},
|
| 587 |
+
"node_modules/methods": {
|
| 588 |
+
"version": "1.1.2",
|
| 589 |
+
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
| 590 |
+
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
| 591 |
+
"engines": {
|
| 592 |
+
"node": ">= 0.6"
|
| 593 |
+
}
|
| 594 |
+
},
|
| 595 |
+
"node_modules/mime": {
|
| 596 |
+
"version": "1.6.0",
|
| 597 |
+
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
| 598 |
+
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
| 599 |
+
"bin": {
|
| 600 |
+
"mime": "cli.js"
|
| 601 |
+
},
|
| 602 |
+
"engines": {
|
| 603 |
+
"node": ">=4"
|
| 604 |
+
}
|
| 605 |
+
},
|
| 606 |
+
"node_modules/mime-db": {
|
| 607 |
+
"version": "1.52.0",
|
| 608 |
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
| 609 |
+
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
| 610 |
+
"engines": {
|
| 611 |
+
"node": ">= 0.6"
|
| 612 |
+
}
|
| 613 |
+
},
|
| 614 |
+
"node_modules/mime-types": {
|
| 615 |
+
"version": "2.1.35",
|
| 616 |
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
| 617 |
+
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
| 618 |
+
"dependencies": {
|
| 619 |
+
"mime-db": "1.52.0"
|
| 620 |
+
},
|
| 621 |
+
"engines": {
|
| 622 |
+
"node": ">= 0.6"
|
| 623 |
+
}
|
| 624 |
+
},
|
| 625 |
+
"node_modules/ms": {
|
| 626 |
+
"version": "2.0.0",
|
| 627 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
| 628 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
| 629 |
+
},
|
| 630 |
+
"node_modules/multer": {
|
| 631 |
+
"version": "2.2.0",
|
| 632 |
+
"resolved": "https://registry.npmjs.org/multer/-/multer-2.2.0.tgz",
|
| 633 |
+
"integrity": "sha512-6rdyFg2kLrMh9Jee7/BMPuV9lEAd7lLW2YUpF9/YxR7njyoUwwQ0ZPh3TaIY50Sw6vlyD2HW3wGOkTS4P79xrQ==",
|
| 634 |
+
"dependencies": {
|
| 635 |
+
"append-field": "^1.0.0",
|
| 636 |
+
"busboy": "^1.6.0",
|
| 637 |
+
"concat-stream": "^2.0.0",
|
| 638 |
+
"type-is": "^1.6.18"
|
| 639 |
+
},
|
| 640 |
+
"engines": {
|
| 641 |
+
"node": ">= 10.16.0"
|
| 642 |
+
},
|
| 643 |
+
"funding": {
|
| 644 |
+
"type": "opencollective",
|
| 645 |
+
"url": "https://opencollective.com/express"
|
| 646 |
+
}
|
| 647 |
+
},
|
| 648 |
+
"node_modules/negotiator": {
|
| 649 |
+
"version": "0.6.3",
|
| 650 |
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
| 651 |
+
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
|
| 652 |
+
"engines": {
|
| 653 |
+
"node": ">= 0.6"
|
| 654 |
+
}
|
| 655 |
+
},
|
| 656 |
+
"node_modules/object-assign": {
|
| 657 |
+
"version": "4.1.1",
|
| 658 |
+
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
| 659 |
+
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
| 660 |
+
"engines": {
|
| 661 |
+
"node": ">=0.10.0"
|
| 662 |
+
}
|
| 663 |
+
},
|
| 664 |
+
"node_modules/object-inspect": {
|
| 665 |
+
"version": "1.13.4",
|
| 666 |
+
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
| 667 |
+
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
|
| 668 |
+
"engines": {
|
| 669 |
+
"node": ">= 0.4"
|
| 670 |
+
},
|
| 671 |
+
"funding": {
|
| 672 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 673 |
+
}
|
| 674 |
+
},
|
| 675 |
+
"node_modules/on-finished": {
|
| 676 |
+
"version": "2.4.1",
|
| 677 |
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
| 678 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
| 679 |
+
"dependencies": {
|
| 680 |
+
"ee-first": "1.1.1"
|
| 681 |
+
},
|
| 682 |
+
"engines": {
|
| 683 |
+
"node": ">= 0.8"
|
| 684 |
+
}
|
| 685 |
+
},
|
| 686 |
+
"node_modules/parseurl": {
|
| 687 |
+
"version": "1.3.3",
|
| 688 |
+
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
| 689 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
| 690 |
+
"engines": {
|
| 691 |
+
"node": ">= 0.8"
|
| 692 |
+
}
|
| 693 |
+
},
|
| 694 |
+
"node_modules/path-to-regexp": {
|
| 695 |
+
"version": "0.1.13",
|
| 696 |
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",
|
| 697 |
+
"integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA=="
|
| 698 |
+
},
|
| 699 |
+
"node_modules/proxy-addr": {
|
| 700 |
+
"version": "2.0.7",
|
| 701 |
+
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
| 702 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
| 703 |
+
"dependencies": {
|
| 704 |
+
"forwarded": "0.2.0",
|
| 705 |
+
"ipaddr.js": "1.9.1"
|
| 706 |
+
},
|
| 707 |
+
"engines": {
|
| 708 |
+
"node": ">= 0.10"
|
| 709 |
+
}
|
| 710 |
+
},
|
| 711 |
+
"node_modules/qs": {
|
| 712 |
+
"version": "6.15.3",
|
| 713 |
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz",
|
| 714 |
+
"integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==",
|
| 715 |
+
"dependencies": {
|
| 716 |
+
"es-define-property": "^1.0.1",
|
| 717 |
+
"side-channel": "^1.1.1"
|
| 718 |
+
},
|
| 719 |
+
"engines": {
|
| 720 |
+
"node": ">=0.6"
|
| 721 |
+
},
|
| 722 |
+
"funding": {
|
| 723 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 724 |
+
}
|
| 725 |
+
},
|
| 726 |
+
"node_modules/range-parser": {
|
| 727 |
+
"version": "1.2.1",
|
| 728 |
+
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
| 729 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
| 730 |
+
"engines": {
|
| 731 |
+
"node": ">= 0.6"
|
| 732 |
+
}
|
| 733 |
+
},
|
| 734 |
+
"node_modules/raw-body": {
|
| 735 |
+
"version": "2.5.3",
|
| 736 |
+
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",
|
| 737 |
+
"integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==",
|
| 738 |
+
"dependencies": {
|
| 739 |
+
"bytes": "~3.1.2",
|
| 740 |
+
"http-errors": "~2.0.1",
|
| 741 |
+
"iconv-lite": "~0.4.24",
|
| 742 |
+
"unpipe": "~1.0.0"
|
| 743 |
+
},
|
| 744 |
+
"engines": {
|
| 745 |
+
"node": ">= 0.8"
|
| 746 |
+
}
|
| 747 |
+
},
|
| 748 |
+
"node_modules/readable-stream": {
|
| 749 |
+
"version": "3.6.2",
|
| 750 |
+
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
| 751 |
+
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
| 752 |
+
"dependencies": {
|
| 753 |
+
"inherits": "^2.0.3",
|
| 754 |
+
"string_decoder": "^1.1.1",
|
| 755 |
+
"util-deprecate": "^1.0.1"
|
| 756 |
+
},
|
| 757 |
+
"engines": {
|
| 758 |
+
"node": ">= 6"
|
| 759 |
+
}
|
| 760 |
+
},
|
| 761 |
+
"node_modules/safe-buffer": {
|
| 762 |
+
"version": "5.2.1",
|
| 763 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
| 764 |
+
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
| 765 |
+
"funding": [
|
| 766 |
+
{
|
| 767 |
+
"type": "github",
|
| 768 |
+
"url": "https://github.com/sponsors/feross"
|
| 769 |
+
},
|
| 770 |
+
{
|
| 771 |
+
"type": "patreon",
|
| 772 |
+
"url": "https://www.patreon.com/feross"
|
| 773 |
+
},
|
| 774 |
+
{
|
| 775 |
+
"type": "consulting",
|
| 776 |
+
"url": "https://feross.org/support"
|
| 777 |
+
}
|
| 778 |
+
]
|
| 779 |
+
},
|
| 780 |
+
"node_modules/safer-buffer": {
|
| 781 |
+
"version": "2.1.2",
|
| 782 |
+
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
| 783 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
| 784 |
+
},
|
| 785 |
+
"node_modules/send": {
|
| 786 |
+
"version": "0.19.2",
|
| 787 |
+
"resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz",
|
| 788 |
+
"integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==",
|
| 789 |
+
"dependencies": {
|
| 790 |
+
"debug": "2.6.9",
|
| 791 |
+
"depd": "2.0.0",
|
| 792 |
+
"destroy": "1.2.0",
|
| 793 |
+
"encodeurl": "~2.0.0",
|
| 794 |
+
"escape-html": "~1.0.3",
|
| 795 |
+
"etag": "~1.8.1",
|
| 796 |
+
"fresh": "~0.5.2",
|
| 797 |
+
"http-errors": "~2.0.1",
|
| 798 |
+
"mime": "1.6.0",
|
| 799 |
+
"ms": "2.1.3",
|
| 800 |
+
"on-finished": "~2.4.1",
|
| 801 |
+
"range-parser": "~1.2.1",
|
| 802 |
+
"statuses": "~2.0.2"
|
| 803 |
+
},
|
| 804 |
+
"engines": {
|
| 805 |
+
"node": ">= 0.8.0"
|
| 806 |
+
}
|
| 807 |
+
},
|
| 808 |
+
"node_modules/send/node_modules/ms": {
|
| 809 |
+
"version": "2.1.3",
|
| 810 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 811 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
| 812 |
+
},
|
| 813 |
+
"node_modules/serve-static": {
|
| 814 |
+
"version": "1.16.3",
|
| 815 |
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz",
|
| 816 |
+
"integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==",
|
| 817 |
+
"dependencies": {
|
| 818 |
+
"encodeurl": "~2.0.0",
|
| 819 |
+
"escape-html": "~1.0.3",
|
| 820 |
+
"parseurl": "~1.3.3",
|
| 821 |
+
"send": "~0.19.1"
|
| 822 |
+
},
|
| 823 |
+
"engines": {
|
| 824 |
+
"node": ">= 0.8.0"
|
| 825 |
+
}
|
| 826 |
+
},
|
| 827 |
+
"node_modules/setprototypeof": {
|
| 828 |
+
"version": "1.2.0",
|
| 829 |
+
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
| 830 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
|
| 831 |
+
},
|
| 832 |
+
"node_modules/side-channel": {
|
| 833 |
+
"version": "1.1.1",
|
| 834 |
+
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",
|
| 835 |
+
"integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",
|
| 836 |
+
"dependencies": {
|
| 837 |
+
"es-errors": "^1.3.0",
|
| 838 |
+
"object-inspect": "^1.13.4",
|
| 839 |
+
"side-channel-list": "^1.0.1",
|
| 840 |
+
"side-channel-map": "^1.0.1",
|
| 841 |
+
"side-channel-weakmap": "^1.0.2"
|
| 842 |
+
},
|
| 843 |
+
"engines": {
|
| 844 |
+
"node": ">= 0.4"
|
| 845 |
+
},
|
| 846 |
+
"funding": {
|
| 847 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 848 |
+
}
|
| 849 |
+
},
|
| 850 |
+
"node_modules/side-channel-list": {
|
| 851 |
+
"version": "1.0.1",
|
| 852 |
+
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
|
| 853 |
+
"integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
|
| 854 |
+
"dependencies": {
|
| 855 |
+
"es-errors": "^1.3.0",
|
| 856 |
+
"object-inspect": "^1.13.4"
|
| 857 |
+
},
|
| 858 |
+
"engines": {
|
| 859 |
+
"node": ">= 0.4"
|
| 860 |
+
},
|
| 861 |
+
"funding": {
|
| 862 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 863 |
+
}
|
| 864 |
+
},
|
| 865 |
+
"node_modules/side-channel-map": {
|
| 866 |
+
"version": "1.0.1",
|
| 867 |
+
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
| 868 |
+
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
| 869 |
+
"dependencies": {
|
| 870 |
+
"call-bound": "^1.0.2",
|
| 871 |
+
"es-errors": "^1.3.0",
|
| 872 |
+
"get-intrinsic": "^1.2.5",
|
| 873 |
+
"object-inspect": "^1.13.3"
|
| 874 |
+
},
|
| 875 |
+
"engines": {
|
| 876 |
+
"node": ">= 0.4"
|
| 877 |
+
},
|
| 878 |
+
"funding": {
|
| 879 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 880 |
+
}
|
| 881 |
+
},
|
| 882 |
+
"node_modules/side-channel-weakmap": {
|
| 883 |
+
"version": "1.0.2",
|
| 884 |
+
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
| 885 |
+
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
| 886 |
+
"dependencies": {
|
| 887 |
+
"call-bound": "^1.0.2",
|
| 888 |
+
"es-errors": "^1.3.0",
|
| 889 |
+
"get-intrinsic": "^1.2.5",
|
| 890 |
+
"object-inspect": "^1.13.3",
|
| 891 |
+
"side-channel-map": "^1.0.1"
|
| 892 |
+
},
|
| 893 |
+
"engines": {
|
| 894 |
+
"node": ">= 0.4"
|
| 895 |
+
},
|
| 896 |
+
"funding": {
|
| 897 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 898 |
+
}
|
| 899 |
+
},
|
| 900 |
+
"node_modules/statuses": {
|
| 901 |
+
"version": "2.0.2",
|
| 902 |
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
| 903 |
+
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
| 904 |
+
"engines": {
|
| 905 |
+
"node": ">= 0.8"
|
| 906 |
+
}
|
| 907 |
+
},
|
| 908 |
+
"node_modules/streamsearch": {
|
| 909 |
+
"version": "1.1.0",
|
| 910 |
+
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
|
| 911 |
+
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
|
| 912 |
+
"engines": {
|
| 913 |
+
"node": ">=10.0.0"
|
| 914 |
+
}
|
| 915 |
+
},
|
| 916 |
+
"node_modules/string_decoder": {
|
| 917 |
+
"version": "1.3.0",
|
| 918 |
+
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
| 919 |
+
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
| 920 |
+
"dependencies": {
|
| 921 |
+
"safe-buffer": "~5.2.0"
|
| 922 |
+
}
|
| 923 |
+
},
|
| 924 |
+
"node_modules/toidentifier": {
|
| 925 |
+
"version": "1.0.1",
|
| 926 |
+
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
| 927 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
| 928 |
+
"engines": {
|
| 929 |
+
"node": ">=0.6"
|
| 930 |
+
}
|
| 931 |
+
},
|
| 932 |
+
"node_modules/tslib": {
|
| 933 |
+
"version": "2.8.1",
|
| 934 |
+
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
| 935 |
+
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="
|
| 936 |
+
},
|
| 937 |
+
"node_modules/type-is": {
|
| 938 |
+
"version": "1.6.18",
|
| 939 |
+
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
| 940 |
+
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
| 941 |
+
"dependencies": {
|
| 942 |
+
"media-typer": "0.3.0",
|
| 943 |
+
"mime-types": "~2.1.24"
|
| 944 |
+
},
|
| 945 |
+
"engines": {
|
| 946 |
+
"node": ">= 0.6"
|
| 947 |
+
}
|
| 948 |
+
},
|
| 949 |
+
"node_modules/typedarray": {
|
| 950 |
+
"version": "0.0.6",
|
| 951 |
+
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
| 952 |
+
"integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="
|
| 953 |
+
},
|
| 954 |
+
"node_modules/unpipe": {
|
| 955 |
+
"version": "1.0.0",
|
| 956 |
+
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
| 957 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
| 958 |
+
"engines": {
|
| 959 |
+
"node": ">= 0.8"
|
| 960 |
+
}
|
| 961 |
+
},
|
| 962 |
+
"node_modules/util-deprecate": {
|
| 963 |
+
"version": "1.0.2",
|
| 964 |
+
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
| 965 |
+
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
| 966 |
+
},
|
| 967 |
+
"node_modules/utils-merge": {
|
| 968 |
+
"version": "1.0.1",
|
| 969 |
+
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
| 970 |
+
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
| 971 |
+
"engines": {
|
| 972 |
+
"node": ">= 0.4.0"
|
| 973 |
+
}
|
| 974 |
+
},
|
| 975 |
+
"node_modules/vary": {
|
| 976 |
+
"version": "1.1.2",
|
| 977 |
+
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
| 978 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
| 979 |
+
"engines": {
|
| 980 |
+
"node": ">= 0.8"
|
| 981 |
+
}
|
| 982 |
+
}
|
| 983 |
+
}
|
| 984 |
+
}
|
package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "taboard",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"description": "Jira-style admin board + API backed by Supabase",
|
| 5 |
+
"type": "module",
|
| 6 |
+
"main": "server.js",
|
| 7 |
+
"scripts": {
|
| 8 |
+
"start": "node server.js",
|
| 9 |
+
"dev": "node --watch server.js"
|
| 10 |
+
},
|
| 11 |
+
"engines": {
|
| 12 |
+
"node": ">=18"
|
| 13 |
+
},
|
| 14 |
+
"dependencies": {
|
| 15 |
+
"@supabase/supabase-js": "^2.45.0",
|
| 16 |
+
"cors": "^2.8.5",
|
| 17 |
+
"dotenv": "^16.4.5",
|
| 18 |
+
"express": "^4.19.2",
|
| 19 |
+
"multer": "^2.0.1"
|
| 20 |
+
}
|
| 21 |
+
}
|
public/css/styles.css
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
:root {
|
| 2 |
+
/* Atlassian design tokens */
|
| 3 |
+
--ds-blue: #0052cc;
|
| 4 |
+
--ds-blue-hover: #0065ff;
|
| 5 |
+
--ds-blue-dark: #0747a6;
|
| 6 |
+
--ds-nav-bg: #ffffff;
|
| 7 |
+
--ds-sidebar-bg: #f4f5f7;
|
| 8 |
+
--ds-page-bg: #ffffff;
|
| 9 |
+
--ds-border: #dfe1e6;
|
| 10 |
+
--ds-border-strong: #c1c7d0;
|
| 11 |
+
--ds-text: #172b4d;
|
| 12 |
+
--ds-subtle: #6b778c;
|
| 13 |
+
--ds-subtlest: #97a0af;
|
| 14 |
+
--ds-hover: #ebecf0;
|
| 15 |
+
--ds-selected: #e6effc;
|
| 16 |
+
--ds-danger: #de350b;
|
| 17 |
+
--ds-danger-hover: #bf2600;
|
| 18 |
+
--ds-green: #00875a;
|
| 19 |
+
--ds-radius: 3px;
|
| 20 |
+
--topnav-h: 56px;
|
| 21 |
+
--sidebar-w: 240px;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
* { box-sizing: border-box; }
|
| 25 |
+
|
| 26 |
+
html, body {
|
| 27 |
+
margin: 0;
|
| 28 |
+
padding: 0;
|
| 29 |
+
height: 100%;
|
| 30 |
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
| 31 |
+
color: var(--ds-text);
|
| 32 |
+
background: var(--ds-page-bg);
|
| 33 |
+
font-size: 14px;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
/* ============ Top nav ============ */
|
| 37 |
+
.topnav {
|
| 38 |
+
height: var(--topnav-h);
|
| 39 |
+
display: flex;
|
| 40 |
+
align-items: center;
|
| 41 |
+
justify-content: space-between;
|
| 42 |
+
padding: 0 16px;
|
| 43 |
+
background: var(--ds-nav-bg);
|
| 44 |
+
border-bottom: 1px solid var(--ds-border);
|
| 45 |
+
position: sticky;
|
| 46 |
+
top: 0;
|
| 47 |
+
z-index: 100;
|
| 48 |
+
}
|
| 49 |
+
.topnav-left { display: flex; align-items: center; gap: 8px; }
|
| 50 |
+
.app-switcher {
|
| 51 |
+
display: flex; flex-direction: column; gap: 3px;
|
| 52 |
+
background: transparent; border: none; cursor: pointer;
|
| 53 |
+
padding: 8px; border-radius: var(--ds-radius);
|
| 54 |
+
}
|
| 55 |
+
.app-switcher:hover { background: var(--ds-hover); }
|
| 56 |
+
.app-switcher span { width: 4px; height: 4px; border-radius: 50%; background: var(--ds-subtle); }
|
| 57 |
+
.brand { display: flex; align-items: center; gap: 8px; }
|
| 58 |
+
.brand-logo {
|
| 59 |
+
width: 28px; height: 28px; border-radius: 6px;
|
| 60 |
+
background: var(--ds-blue); color: #fff;
|
| 61 |
+
display: grid; place-items: center; font-weight: 700;
|
| 62 |
+
}
|
| 63 |
+
.brand-name { font-weight: 700; font-size: 16px; }
|
| 64 |
+
.topnav-center { flex: 1; display: flex; justify-content: center; }
|
| 65 |
+
.global-search {
|
| 66 |
+
width: 100%; max-width: 420px;
|
| 67 |
+
padding: 6px 12px;
|
| 68 |
+
border: 1px solid var(--ds-border-strong);
|
| 69 |
+
border-radius: var(--ds-radius);
|
| 70 |
+
background: #fafbfc;
|
| 71 |
+
font-size: 14px;
|
| 72 |
+
}
|
| 73 |
+
.global-search:focus { outline: none; border-color: var(--ds-blue); background: #fff; }
|
| 74 |
+
.avatar {
|
| 75 |
+
width: 32px; height: 32px; border-radius: 50%;
|
| 76 |
+
background: var(--ds-blue-dark); color: #fff;
|
| 77 |
+
display: grid; place-items: center; font-weight: 600; cursor: pointer;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
/* ============ Layout ============ */
|
| 81 |
+
.layout { display: flex; height: calc(100vh - var(--topnav-h)); }
|
| 82 |
+
.sidebar {
|
| 83 |
+
width: var(--sidebar-w);
|
| 84 |
+
background: var(--ds-sidebar-bg);
|
| 85 |
+
border-right: 1px solid var(--ds-border);
|
| 86 |
+
padding: 12px 8px;
|
| 87 |
+
flex-shrink: 0;
|
| 88 |
+
}
|
| 89 |
+
.side-menu { display: flex; flex-direction: column; gap: 2px; }
|
| 90 |
+
.side-item {
|
| 91 |
+
display: flex; align-items: center; gap: 10px;
|
| 92 |
+
padding: 8px 12px; border-radius: var(--ds-radius);
|
| 93 |
+
color: var(--ds-text); text-decoration: none; font-weight: 500;
|
| 94 |
+
}
|
| 95 |
+
.side-item:hover { background: var(--ds-hover); }
|
| 96 |
+
.side-item.active { background: var(--ds-selected); color: var(--ds-blue); }
|
| 97 |
+
.side-icon { width: 18px; text-align: center; color: var(--ds-subtle); }
|
| 98 |
+
.side-item.active .side-icon { color: var(--ds-blue); }
|
| 99 |
+
|
| 100 |
+
.content { flex: 1; overflow-y: auto; padding: 24px 32px; }
|
| 101 |
+
|
| 102 |
+
/* ============ Page header ============ */
|
| 103 |
+
.page-head {
|
| 104 |
+
display: flex; align-items: center; justify-content: space-between;
|
| 105 |
+
margin-bottom: 20px;
|
| 106 |
+
}
|
| 107 |
+
.page-title { font-size: 24px; font-weight: 600; margin: 0; }
|
| 108 |
+
.page-sub { color: var(--ds-subtle); font-size: 13px; margin-top: 2px; }
|
| 109 |
+
|
| 110 |
+
/* ============ Buttons ============ */
|
| 111 |
+
.btn {
|
| 112 |
+
display: inline-flex; align-items: center; gap: 6px;
|
| 113 |
+
padding: 6px 12px; border-radius: var(--ds-radius);
|
| 114 |
+
border: none; cursor: pointer; font-size: 14px; font-weight: 500;
|
| 115 |
+
font-family: inherit;
|
| 116 |
+
}
|
| 117 |
+
.btn-primary { background: var(--ds-blue); color: #fff; }
|
| 118 |
+
.btn-primary:hover { background: var(--ds-blue-hover); }
|
| 119 |
+
.btn-subtle { background: transparent; color: var(--ds-text); }
|
| 120 |
+
.btn-subtle:hover { background: var(--ds-hover); }
|
| 121 |
+
.btn-default { background: #f4f5f7; color: var(--ds-text); }
|
| 122 |
+
.btn-default:hover { background: var(--ds-hover); }
|
| 123 |
+
.btn-danger { background: transparent; color: var(--ds-danger); }
|
| 124 |
+
.btn-danger:hover { background: #ffebe6; }
|
| 125 |
+
.btn-sm { padding: 3px 8px; font-size: 13px; }
|
| 126 |
+
|
| 127 |
+
/* ============ Table ============ */
|
| 128 |
+
.table-wrap { border: 1px solid var(--ds-border); border-radius: var(--ds-radius); overflow: hidden; }
|
| 129 |
+
table.data { width: 100%; border-collapse: collapse; background: #fff; }
|
| 130 |
+
table.data th {
|
| 131 |
+
text-align: left; font-size: 12px; text-transform: uppercase;
|
| 132 |
+
letter-spacing: .04em; color: var(--ds-subtle); font-weight: 600;
|
| 133 |
+
padding: 10px 14px; border-bottom: 2px solid var(--ds-border); background: #fafbfc;
|
| 134 |
+
}
|
| 135 |
+
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--ds-border); vertical-align: middle; }
|
| 136 |
+
table.data tr:last-child td { border-bottom: none; }
|
| 137 |
+
table.data tbody tr:hover { background: #fafbfc; }
|
| 138 |
+
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
|
| 139 |
+
.muted { color: var(--ds-subtle); }
|
| 140 |
+
.mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 12px; }
|
| 141 |
+
|
| 142 |
+
/* ============ Badges ============ */
|
| 143 |
+
.badge {
|
| 144 |
+
display: inline-flex; align-items: center;
|
| 145 |
+
padding: 2px 8px; border-radius: 3px;
|
| 146 |
+
font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
|
| 147 |
+
}
|
| 148 |
+
/* status */
|
| 149 |
+
.st-open { background: #dfe1e6; color: #42526e; }
|
| 150 |
+
.st-queued { background: #deebff; color: #0747a6; }
|
| 151 |
+
.st-processing { background: #fffae6; color: #974f0c; }
|
| 152 |
+
.st-done { background: #e3fcef; color: #006644; }
|
| 153 |
+
.st-failed { background: #ffebe6; color: #bf2600; }
|
| 154 |
+
.st-close { background: #eae6ff; color: #403294; }
|
| 155 |
+
/* type */
|
| 156 |
+
.ty-backend { background: #eae6ff; color: #403294; }
|
| 157 |
+
.ty-api { background: #e6fcff; color: #206a83; }
|
| 158 |
+
.ty-frontend { background: #e3fcef; color: #006644; }
|
| 159 |
+
.ty-ui { background: #fff0f6; color: #943d73; }
|
| 160 |
+
|
| 161 |
+
/* ============ Modal ============ */
|
| 162 |
+
.modal-overlay {
|
| 163 |
+
position: fixed; inset: 0; background: rgba(9,30,66,.54);
|
| 164 |
+
display: grid; place-items: start center; z-index: 200; padding: 48px 16px; overflow-y: auto;
|
| 165 |
+
}
|
| 166 |
+
.modal {
|
| 167 |
+
background: #fff; border-radius: 6px; width: 100%; max-width: 640px;
|
| 168 |
+
box-shadow: 0 8px 24px rgba(9,30,66,.25); padding: 24px;
|
| 169 |
+
}
|
| 170 |
+
.modal.wide { max-width: 900px; }
|
| 171 |
+
.modal-title { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
|
| 172 |
+
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
|
| 173 |
+
|
| 174 |
+
/* ============ Forms ============ */
|
| 175 |
+
.field { margin-bottom: 14px; }
|
| 176 |
+
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ds-subtle); margin-bottom: 4px; }
|
| 177 |
+
.field input[type=text],
|
| 178 |
+
.field input[type=number],
|
| 179 |
+
.field select,
|
| 180 |
+
.field textarea {
|
| 181 |
+
width: 100%; padding: 8px 10px;
|
| 182 |
+
border: 1px solid var(--ds-border-strong); border-radius: var(--ds-radius);
|
| 183 |
+
font-size: 14px; font-family: inherit; background: #fafbfc; color: var(--ds-text);
|
| 184 |
+
}
|
| 185 |
+
.field input:focus, .field select:focus, .field textarea:focus {
|
| 186 |
+
outline: none; border-color: var(--ds-blue); background: #fff;
|
| 187 |
+
}
|
| 188 |
+
.field textarea { resize: vertical; min-height: 80px; }
|
| 189 |
+
.field-row { display: flex; gap: 12px; }
|
| 190 |
+
.field-row .field { flex: 1; }
|
| 191 |
+
|
| 192 |
+
/* ============ Ticket tree ============ */
|
| 193 |
+
.ticket-row td.title-cell { display: flex; align-items: center; gap: 6px; }
|
| 194 |
+
.tree-toggle {
|
| 195 |
+
width: 18px; height: 18px; display: inline-grid; place-items: center;
|
| 196 |
+
cursor: pointer; border-radius: 3px; color: var(--ds-subtle); user-select: none;
|
| 197 |
+
}
|
| 198 |
+
.tree-toggle:hover { background: var(--ds-hover); }
|
| 199 |
+
.tree-toggle.empty { visibility: hidden; }
|
| 200 |
+
.child-indent { display: inline-block; width: 24px; }
|
| 201 |
+
.ticket-key { color: var(--ds-subtle); font-size: 12px; margin-right: 6px; }
|
| 202 |
+
|
| 203 |
+
/* ============ Detail panel ============ */
|
| 204 |
+
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
|
| 205 |
+
.detail-main {}
|
| 206 |
+
.detail-side { border-left: 1px solid var(--ds-border); padding-left: 20px; }
|
| 207 |
+
.detail-side .field label { text-transform: uppercase; letter-spacing: .04em; }
|
| 208 |
+
.log-box {
|
| 209 |
+
background: #172b4d; color: #c7d1e0; font-family: 'SFMono-Regular', Consolas, monospace;
|
| 210 |
+
font-size: 12px; padding: 12px; border-radius: var(--ds-radius);
|
| 211 |
+
white-space: pre-wrap; max-height: 220px; overflow-y: auto;
|
| 212 |
+
}
|
| 213 |
+
.msg-box {
|
| 214 |
+
background: #f4f5f7; border-left: 3px solid var(--ds-blue);
|
| 215 |
+
padding: 10px 12px; border-radius: var(--ds-radius); font-size: 13px; white-space: pre-wrap;
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
/* ============ Screenshots ============ */
|
| 219 |
+
.shots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
|
| 220 |
+
.shot {
|
| 221 |
+
position: relative; width: 120px; height: 90px; border-radius: var(--ds-radius);
|
| 222 |
+
overflow: hidden; border: 1px solid var(--ds-border); background: #fafbfc;
|
| 223 |
+
}
|
| 224 |
+
.shot img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
|
| 225 |
+
.shot .shot-del {
|
| 226 |
+
position: absolute; top: 2px; right: 2px;
|
| 227 |
+
background: rgba(9,30,66,.7); color: #fff; border: none;
|
| 228 |
+
width: 20px; height: 20px; border-radius: 3px; cursor: pointer; font-size: 12px; line-height: 1;
|
| 229 |
+
}
|
| 230 |
+
.upload-drop {
|
| 231 |
+
border: 2px dashed var(--ds-border-strong); border-radius: var(--ds-radius);
|
| 232 |
+
padding: 16px; text-align: center; color: var(--ds-subtle); cursor: pointer; margin-top: 8px;
|
| 233 |
+
}
|
| 234 |
+
.upload-drop:hover { border-color: var(--ds-blue); color: var(--ds-blue); }
|
| 235 |
+
|
| 236 |
+
/* ============ Misc ============ */
|
| 237 |
+
.empty-state { text-align: center; padding: 60px 20px; color: var(--ds-subtle); }
|
| 238 |
+
.empty-state h3 { color: var(--ds-text); }
|
| 239 |
+
.toast {
|
| 240 |
+
position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
|
| 241 |
+
background: #172b4d; color: #fff; padding: 10px 18px; border-radius: var(--ds-radius);
|
| 242 |
+
z-index: 300; box-shadow: 0 4px 12px rgba(9,30,66,.3); font-size: 14px;
|
| 243 |
+
}
|
| 244 |
+
.toast.error { background: var(--ds-danger); }
|
| 245 |
+
.lightbox {
|
| 246 |
+
position: fixed; inset: 0; background: rgba(9,30,66,.8);
|
| 247 |
+
display: grid; place-items: center; z-index: 400; cursor: zoom-out;
|
| 248 |
+
}
|
| 249 |
+
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 4px; }
|
| 250 |
+
.spinner { padding: 40px; text-align: center; color: var(--ds-subtle); }
|
| 251 |
+
.link { color: var(--ds-blue); cursor: pointer; text-decoration: none; }
|
| 252 |
+
.link:hover { text-decoration: underline; }
|
| 253 |
+
[hidden] { display: none !important; }
|
public/index.html
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>Taboard</title>
|
| 7 |
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
| 9 |
+
<link rel="stylesheet" href="css/styles.css" />
|
| 10 |
+
</head>
|
| 11 |
+
<body>
|
| 12 |
+
<!-- Top navigation -->
|
| 13 |
+
<header class="topnav">
|
| 14 |
+
<div class="topnav-left">
|
| 15 |
+
<button class="app-switcher" title="Menu">
|
| 16 |
+
<span></span><span></span><span></span>
|
| 17 |
+
</button>
|
| 18 |
+
<div class="brand">
|
| 19 |
+
<span class="brand-logo">T</span>
|
| 20 |
+
<span class="brand-name">Taboard</span>
|
| 21 |
+
</div>
|
| 22 |
+
</div>
|
| 23 |
+
<div class="topnav-center">
|
| 24 |
+
<input id="global-search" class="global-search" type="text" placeholder="Search" />
|
| 25 |
+
</div>
|
| 26 |
+
<div class="topnav-right">
|
| 27 |
+
<div class="avatar" title="admin">A</div>
|
| 28 |
+
</div>
|
| 29 |
+
</header>
|
| 30 |
+
|
| 31 |
+
<div class="layout">
|
| 32 |
+
<!-- Sidebar -->
|
| 33 |
+
<aside class="sidebar">
|
| 34 |
+
<nav class="side-menu">
|
| 35 |
+
<a href="#/projects" class="side-item" data-view="projects">
|
| 36 |
+
<span class="side-icon">▦</span>
|
| 37 |
+
<span>Projects</span>
|
| 38 |
+
</a>
|
| 39 |
+
<a href="#/tickets" class="side-item" data-view="tickets">
|
| 40 |
+
<span class="side-icon">✔</span>
|
| 41 |
+
<span>Tickets</span>
|
| 42 |
+
</a>
|
| 43 |
+
</nav>
|
| 44 |
+
</aside>
|
| 45 |
+
|
| 46 |
+
<!-- Main content -->
|
| 47 |
+
<main class="content" id="app">
|
| 48 |
+
<!-- Views render here -->
|
| 49 |
+
</main>
|
| 50 |
+
</div>
|
| 51 |
+
|
| 52 |
+
<!-- Modal container -->
|
| 53 |
+
<div class="modal-overlay" id="modal-overlay" hidden>
|
| 54 |
+
<div class="modal" id="modal"></div>
|
| 55 |
+
</div>
|
| 56 |
+
|
| 57 |
+
<!-- Toast -->
|
| 58 |
+
<div class="toast" id="toast" hidden></div>
|
| 59 |
+
|
| 60 |
+
<script src="js/api.js"></script>
|
| 61 |
+
<script src="js/projects.js"></script>
|
| 62 |
+
<script src="js/tickets.js"></script>
|
| 63 |
+
<script src="js/app.js"></script>
|
| 64 |
+
</body>
|
| 65 |
+
</html>
|
public/js/api.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Thin fetch wrapper around the backend API + shared UI helpers.
|
| 2 |
+
const API = {
|
| 3 |
+
base: '/api',
|
| 4 |
+
|
| 5 |
+
async request(method, path, body) {
|
| 6 |
+
const opts = { method, headers: {} };
|
| 7 |
+
if (body !== undefined) {
|
| 8 |
+
opts.headers['Content-Type'] = 'application/json';
|
| 9 |
+
opts.body = JSON.stringify(body);
|
| 10 |
+
}
|
| 11 |
+
const res = await fetch(this.base + path, opts);
|
| 12 |
+
if (res.status === 204) return null;
|
| 13 |
+
const data = await res.json().catch(() => ({}));
|
| 14 |
+
if (!res.ok) throw new Error(data.error || `Request failed (${res.status})`);
|
| 15 |
+
return data;
|
| 16 |
+
},
|
| 17 |
+
|
| 18 |
+
// Projects
|
| 19 |
+
listProjects() { return this.request('GET', '/projects'); },
|
| 20 |
+
getProject(id) { return this.request('GET', `/projects/${id}`); },
|
| 21 |
+
createProject(p) { return this.request('POST', '/projects', p); },
|
| 22 |
+
updateProject(id, p) { return this.request('PUT', `/projects/${id}`, p); },
|
| 23 |
+
deleteProject(id) { return this.request('DELETE', `/projects/${id}`); },
|
| 24 |
+
|
| 25 |
+
// Tickets
|
| 26 |
+
listTickets(params = {}) {
|
| 27 |
+
const qs = new URLSearchParams(params).toString();
|
| 28 |
+
return this.request('GET', `/tickets${qs ? '?' + qs : ''}`);
|
| 29 |
+
},
|
| 30 |
+
getTicket(id) { return this.request('GET', `/tickets/${id}`); },
|
| 31 |
+
createTicket(t) { return this.request('POST', '/tickets', t); },
|
| 32 |
+
updateTicket(id, t) { return this.request('PUT', `/tickets/${id}`, t); },
|
| 33 |
+
deleteTicket(id) { return this.request('DELETE', `/tickets/${id}`); },
|
| 34 |
+
deleteTicketImage(id, url) { return this.request('DELETE', `/tickets/${id}/images`, { url }); },
|
| 35 |
+
|
| 36 |
+
async uploadImages(id, files) {
|
| 37 |
+
const fd = new FormData();
|
| 38 |
+
for (const f of files) fd.append('images', f);
|
| 39 |
+
const res = await fetch(`${this.base}/tickets/${id}/images`, { method: 'POST', body: fd });
|
| 40 |
+
const data = await res.json().catch(() => ({}));
|
| 41 |
+
if (!res.ok) throw new Error(data.error || 'Upload failed');
|
| 42 |
+
return data;
|
| 43 |
+
}
|
| 44 |
+
};
|
| 45 |
+
|
| 46 |
+
// ---------- UI helpers ----------
|
| 47 |
+
const UI = {
|
| 48 |
+
el(html) {
|
| 49 |
+
const t = document.createElement('template');
|
| 50 |
+
t.innerHTML = html.trim();
|
| 51 |
+
return t.content.firstElementChild;
|
| 52 |
+
},
|
| 53 |
+
esc(s) {
|
| 54 |
+
return String(s ?? '').replace(/[&<>"']/g, (c) => ({
|
| 55 |
+
'&': '&', '<': '<', '>': '>', '"': '"', "'": '''
|
| 56 |
+
})[c]);
|
| 57 |
+
},
|
| 58 |
+
fmtDate(v) {
|
| 59 |
+
if (!v) return '—';
|
| 60 |
+
const d = new Date(v);
|
| 61 |
+
if (isNaN(d)) return UI.esc(v);
|
| 62 |
+
return d.toLocaleString();
|
| 63 |
+
},
|
| 64 |
+
toast(msg, isError = false) {
|
| 65 |
+
const t = document.getElementById('toast');
|
| 66 |
+
t.textContent = msg;
|
| 67 |
+
t.className = 'toast' + (isError ? ' error' : '');
|
| 68 |
+
t.hidden = false;
|
| 69 |
+
clearTimeout(this._toastTimer);
|
| 70 |
+
this._toastTimer = setTimeout(() => (t.hidden = true), 2600);
|
| 71 |
+
},
|
| 72 |
+
openModal(html, wide = false) {
|
| 73 |
+
const overlay = document.getElementById('modal-overlay');
|
| 74 |
+
const modal = document.getElementById('modal');
|
| 75 |
+
modal.className = 'modal' + (wide ? ' wide' : '');
|
| 76 |
+
modal.innerHTML = '';
|
| 77 |
+
modal.appendChild(typeof html === 'string' ? UI.el(html) : html);
|
| 78 |
+
overlay.hidden = false;
|
| 79 |
+
return modal;
|
| 80 |
+
},
|
| 81 |
+
closeModal() {
|
| 82 |
+
document.getElementById('modal-overlay').hidden = true;
|
| 83 |
+
},
|
| 84 |
+
lightbox(url) {
|
| 85 |
+
const lb = UI.el(`<div class="lightbox"><img src="${UI.esc(url)}" alt="screenshot" /></div>`);
|
| 86 |
+
lb.addEventListener('click', () => lb.remove());
|
| 87 |
+
document.body.appendChild(lb);
|
| 88 |
+
}
|
| 89 |
+
};
|
| 90 |
+
|
| 91 |
+
// Close modal on overlay click
|
| 92 |
+
document.addEventListener('click', (e) => {
|
| 93 |
+
if (e.target.id === 'modal-overlay') UI.closeModal();
|
| 94 |
+
});
|
public/js/app.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Simple hash router + sidebar highlighting.
|
| 2 |
+
const App = {
|
| 3 |
+
routes: {
|
| 4 |
+
projects: ProjectsView,
|
| 5 |
+
tickets: TicketsView
|
| 6 |
+
},
|
| 7 |
+
|
| 8 |
+
start() {
|
| 9 |
+
window.addEventListener('hashchange', () => this.route());
|
| 10 |
+
this.route();
|
| 11 |
+
},
|
| 12 |
+
|
| 13 |
+
currentView() {
|
| 14 |
+
const hash = location.hash.replace(/^#\//, '') || 'projects';
|
| 15 |
+
return this.routes[hash] ? hash : 'projects';
|
| 16 |
+
},
|
| 17 |
+
|
| 18 |
+
route() {
|
| 19 |
+
const view = this.currentView();
|
| 20 |
+
document.querySelectorAll('.side-item').forEach((a) =>
|
| 21 |
+
a.classList.toggle('active', a.dataset.view === view)
|
| 22 |
+
);
|
| 23 |
+
const app = document.getElementById('app');
|
| 24 |
+
this.routes[view].render(app);
|
| 25 |
+
}
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
document.addEventListener('DOMContentLoaded', () => App.start());
|
public/js/projects.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Projects view — CRUD list styled like a Jira projects page.
|
| 2 |
+
const ProjectsView = {
|
| 3 |
+
async render(container) {
|
| 4 |
+
container.innerHTML = `
|
| 5 |
+
<div class="page-head">
|
| 6 |
+
<div>
|
| 7 |
+
<h1 class="page-title">Projects</h1>
|
| 8 |
+
<div class="page-sub">Manage your projects and their structure</div>
|
| 9 |
+
</div>
|
| 10 |
+
<button class="btn btn-primary" id="new-project">+ Create project</button>
|
| 11 |
+
</div>
|
| 12 |
+
<div id="projects-body"><div class="spinner">Loading…</div></div>
|
| 13 |
+
`;
|
| 14 |
+
container.querySelector('#new-project').addEventListener('click', () => this.openForm());
|
| 15 |
+
await this.load();
|
| 16 |
+
},
|
| 17 |
+
|
| 18 |
+
async load() {
|
| 19 |
+
const body = document.getElementById('projects-body');
|
| 20 |
+
try {
|
| 21 |
+
const projects = await API.listProjects();
|
| 22 |
+
if (!projects.length) {
|
| 23 |
+
body.innerHTML = `
|
| 24 |
+
<div class="empty-state">
|
| 25 |
+
<h3>No projects yet</h3>
|
| 26 |
+
<p>Create your first project to get started.</p>
|
| 27 |
+
</div>`;
|
| 28 |
+
return;
|
| 29 |
+
}
|
| 30 |
+
body.innerHTML = `
|
| 31 |
+
<div class="table-wrap">
|
| 32 |
+
<table class="data">
|
| 33 |
+
<thead>
|
| 34 |
+
<tr>
|
| 35 |
+
<th style="width:60px">ID</th>
|
| 36 |
+
<th>Name</th>
|
| 37 |
+
<th>Note</th>
|
| 38 |
+
<th>Created</th>
|
| 39 |
+
<th style="width:140px;text-align:right">Actions</th>
|
| 40 |
+
</tr>
|
| 41 |
+
</thead>
|
| 42 |
+
<tbody>
|
| 43 |
+
${projects.map((p) => this.row(p)).join('')}
|
| 44 |
+
</tbody>
|
| 45 |
+
</table>
|
| 46 |
+
</div>`;
|
| 47 |
+
body.querySelectorAll('[data-edit]').forEach((b) =>
|
| 48 |
+
b.addEventListener('click', () => this.openForm(Number(b.dataset.edit)))
|
| 49 |
+
);
|
| 50 |
+
body.querySelectorAll('[data-del]').forEach((b) =>
|
| 51 |
+
b.addEventListener('click', () => this.remove(Number(b.dataset.del)))
|
| 52 |
+
);
|
| 53 |
+
} catch (e) {
|
| 54 |
+
body.innerHTML = `<div class="empty-state"><h3>Failed to load</h3><p>${UI.esc(e.message)}</p></div>`;
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
|
| 58 |
+
row(p) {
|
| 59 |
+
return `
|
| 60 |
+
<tr>
|
| 61 |
+
<td class="muted mono">${p.id}</td>
|
| 62 |
+
<td><strong>${UI.esc(p.name)}</strong></td>
|
| 63 |
+
<td class="muted">${UI.esc(p.note || '—')}</td>
|
| 64 |
+
<td class="muted">${UI.fmtDate(p.creatid)}</td>
|
| 65 |
+
<td>
|
| 66 |
+
<div class="row-actions">
|
| 67 |
+
<button class="btn btn-subtle btn-sm" data-edit="${p.id}">Edit</button>
|
| 68 |
+
<button class="btn btn-danger btn-sm" data-del="${p.id}">Delete</button>
|
| 69 |
+
</div>
|
| 70 |
+
</td>
|
| 71 |
+
</tr>`;
|
| 72 |
+
},
|
| 73 |
+
|
| 74 |
+
async openForm(id) {
|
| 75 |
+
let p = { name: '', note: '', struc: {} };
|
| 76 |
+
if (id) {
|
| 77 |
+
try { p = await API.getProject(id); } catch (e) { return UI.toast(e.message, true); }
|
| 78 |
+
}
|
| 79 |
+
const strucText = typeof p.struc === 'object' ? JSON.stringify(p.struc ?? {}, null, 2) : (p.struc || '');
|
| 80 |
+
const modal = UI.openModal(`
|
| 81 |
+
<div>
|
| 82 |
+
<h2 class="modal-title">${id ? 'Edit project' : 'Create project'}</h2>
|
| 83 |
+
<div class="field">
|
| 84 |
+
<label>Name *</label>
|
| 85 |
+
<input type="text" id="f-name" value="${UI.esc(p.name)}" placeholder="Project name" />
|
| 86 |
+
</div>
|
| 87 |
+
<div class="field">
|
| 88 |
+
<label>Note</label>
|
| 89 |
+
<textarea id="f-note" placeholder="Short description">${UI.esc(p.note || '')}</textarea>
|
| 90 |
+
</div>
|
| 91 |
+
<div class="field">
|
| 92 |
+
<label>Structure (JSON)</label>
|
| 93 |
+
<textarea id="f-struc" class="mono" placeholder='{ "columns": ["todo","doing","done"] }'>${UI.esc(strucText)}</textarea>
|
| 94 |
+
</div>
|
| 95 |
+
<div class="modal-actions">
|
| 96 |
+
<button class="btn btn-subtle" id="f-cancel">Cancel</button>
|
| 97 |
+
<button class="btn btn-primary" id="f-save">${id ? 'Save' : 'Create'}</button>
|
| 98 |
+
</div>
|
| 99 |
+
</div>
|
| 100 |
+
`);
|
| 101 |
+
modal.querySelector('#f-cancel').addEventListener('click', UI.closeModal);
|
| 102 |
+
modal.querySelector('#f-save').addEventListener('click', async () => {
|
| 103 |
+
const name = modal.querySelector('#f-name').value.trim();
|
| 104 |
+
if (!name) return UI.toast('Name is required', true);
|
| 105 |
+
const payload = {
|
| 106 |
+
name,
|
| 107 |
+
note: modal.querySelector('#f-note').value.trim(),
|
| 108 |
+
struc: modal.querySelector('#f-struc').value.trim()
|
| 109 |
+
};
|
| 110 |
+
try {
|
| 111 |
+
if (id) await API.updateProject(id, payload);
|
| 112 |
+
else await API.createProject(payload);
|
| 113 |
+
UI.closeModal();
|
| 114 |
+
UI.toast(id ? 'Project updated' : 'Project created');
|
| 115 |
+
this.load();
|
| 116 |
+
} catch (e) { UI.toast(e.message, true); }
|
| 117 |
+
});
|
| 118 |
+
},
|
| 119 |
+
|
| 120 |
+
async remove(id) {
|
| 121 |
+
if (!confirm('Delete this project? Tickets linked to it will be unlinked.')) return;
|
| 122 |
+
try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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Tickets view — Jira-like list with sub-ticket tree, detail panel, image upload.
|
| 2 |
+
const TYPES = ['backend', 'api', 'frontend', 'ui'];
|
| 3 |
+
const STATUSES = ['open', 'queued', 'processing', 'done', 'failed', 'close'];
|
| 4 |
+
|
| 5 |
+
const TicketsView = {
|
| 6 |
+
expanded: new Set(),
|
| 7 |
+
projects: [],
|
| 8 |
+
|
| 9 |
+
async render(container) {
|
| 10 |
+
container.innerHTML = `
|
| 11 |
+
<div class="page-head">
|
| 12 |
+
<div>
|
| 13 |
+
<h1 class="page-title">Tickets</h1>
|
| 14 |
+
<div class="page-sub">Track work items and their sub-tasks</div>
|
| 15 |
+
</div>
|
| 16 |
+
<button class="btn btn-primary" id="new-ticket">+ Create ticket</button>
|
| 17 |
+
</div>
|
| 18 |
+
<div id="tickets-body"><div class="spinner">Loading…</div></div>
|
| 19 |
+
`;
|
| 20 |
+
container.querySelector('#new-ticket').addEventListener('click', () => this.openForm());
|
| 21 |
+
await this.load();
|
| 22 |
+
},
|
| 23 |
+
|
| 24 |
+
async load() {
|
| 25 |
+
const body = document.getElementById('tickets-body');
|
| 26 |
+
try {
|
| 27 |
+
const [tickets, projects] = await Promise.all([API.listTickets(), API.listProjects()]);
|
| 28 |
+
this.projects = projects;
|
| 29 |
+
this.all = tickets;
|
| 30 |
+
if (!tickets.length) {
|
| 31 |
+
body.innerHTML = `
|
| 32 |
+
<div class="empty-state">
|
| 33 |
+
<h3>No tickets yet</h3>
|
| 34 |
+
<p>Create your first ticket to get started.</p>
|
| 35 |
+
</div>`;
|
| 36 |
+
return;
|
| 37 |
+
}
|
| 38 |
+
body.innerHTML = `
|
| 39 |
+
<div class="table-wrap">
|
| 40 |
+
<table class="data">
|
| 41 |
+
<thead>
|
| 42 |
+
<tr>
|
| 43 |
+
<th>Title</th>
|
| 44 |
+
<th style="width:110px">Type</th>
|
| 45 |
+
<th style="width:120px">Status</th>
|
| 46 |
+
<th style="width:70px">Sort</th>
|
| 47 |
+
<th style="width:170px;text-align:right">Actions</th>
|
| 48 |
+
</tr>
|
| 49 |
+
</thead>
|
| 50 |
+
<tbody id="ticket-rows"></tbody>
|
| 51 |
+
</table>
|
| 52 |
+
</div>`;
|
| 53 |
+
this.renderRows();
|
| 54 |
+
} catch (e) {
|
| 55 |
+
body.innerHTML = `<div class="empty-state"><h3>Failed to load</h3><p>${UI.esc(e.message)}</p></div>`;
|
| 56 |
+
}
|
| 57 |
+
},
|
| 58 |
+
|
| 59 |
+
renderRows() {
|
| 60 |
+
const tbody = document.getElementById('ticket-rows');
|
| 61 |
+
const byParent = new Map();
|
| 62 |
+
for (const t of this.all) {
|
| 63 |
+
const key = t.subtic || 0;
|
| 64 |
+
if (!byParent.has(key)) byParent.set(key, []);
|
| 65 |
+
byParent.get(key).push(t);
|
| 66 |
+
}
|
| 67 |
+
const rows = [];
|
| 68 |
+
const walk = (parentId, depth) => {
|
| 69 |
+
const children = byParent.get(parentId) || [];
|
| 70 |
+
for (const t of children) {
|
| 71 |
+
rows.push(this.row(t, depth, byParent.has(t.id)));
|
| 72 |
+
if (this.expanded.has(t.id)) walk(t.id, depth + 1);
|
| 73 |
+
}
|
| 74 |
+
};
|
| 75 |
+
walk(0, 0);
|
| 76 |
+
tbody.innerHTML = rows.join('');
|
| 77 |
+
|
| 78 |
+
tbody.querySelectorAll('[data-toggle]').forEach((b) =>
|
| 79 |
+
b.addEventListener('click', () => {
|
| 80 |
+
const id = Number(b.dataset.toggle);
|
| 81 |
+
if (this.expanded.has(id)) this.expanded.delete(id);
|
| 82 |
+
else this.expanded.add(id);
|
| 83 |
+
this.renderRows();
|
| 84 |
+
})
|
| 85 |
+
);
|
| 86 |
+
tbody.querySelectorAll('[data-open]').forEach((b) =>
|
| 87 |
+
b.addEventListener('click', () => this.openDetail(Number(b.dataset.open)))
|
| 88 |
+
);
|
| 89 |
+
tbody.querySelectorAll('[data-sub]').forEach((b) =>
|
| 90 |
+
b.addEventListener('click', () => this.openForm(null, Number(b.dataset.sub)))
|
| 91 |
+
);
|
| 92 |
+
tbody.querySelectorAll('[data-del]').forEach((b) =>
|
| 93 |
+
b.addEventListener('click', () => this.remove(Number(b.dataset.del)))
|
| 94 |
+
);
|
| 95 |
+
},
|
| 96 |
+
|
| 97 |
+
row(t, depth, hasChildren) {
|
| 98 |
+
const indent = Array(depth).fill('<span class="child-indent"></span>').join('');
|
| 99 |
+
const toggle = hasChildren
|
| 100 |
+
? `<span class="tree-toggle" data-toggle="${t.id}">${this.expanded.has(t.id) ? '▾' : '▸'}</span>`
|
| 101 |
+
: `<span class="tree-toggle empty">▸</span>`;
|
| 102 |
+
return `
|
| 103 |
+
<tr class="ticket-row">
|
| 104 |
+
<td>
|
| 105 |
+
<div class="title-cell">
|
| 106 |
+
${indent}${toggle}
|
| 107 |
+
<span class="ticket-key mono">TIC-${t.id}</span>
|
| 108 |
+
<a class="link" data-open="${t.id}">${UI.esc(t.title)}</a>
|
| 109 |
+
</div>
|
| 110 |
+
</td>
|
| 111 |
+
<td><span class="badge ty-${t.type}">${t.type}</span></td>
|
| 112 |
+
<td><span class="badge st-${t.status}">${t.status}</span></td>
|
| 113 |
+
<td class="muted mono">${t.sort ?? 0}</td>
|
| 114 |
+
<td>
|
| 115 |
+
<div class="row-actions">
|
| 116 |
+
<button class="btn btn-subtle btn-sm" data-sub="${t.id}" title="Add sub-ticket">+ Sub</button>
|
| 117 |
+
<button class="btn btn-subtle btn-sm" data-open="${t.id}">Open</button>
|
| 118 |
+
<button class="btn btn-danger btn-sm" data-del="${t.id}">Delete</button>
|
| 119 |
+
</div>
|
| 120 |
+
</td>
|
| 121 |
+
</tr>`;
|
| 122 |
+
},
|
| 123 |
+
|
| 124 |
+
projectOptions(selected) {
|
| 125 |
+
const opts = ['<option value="">— None —</option>'];
|
| 126 |
+
for (const p of this.projects) {
|
| 127 |
+
opts.push(`<option value="${p.id}" ${p.id === selected ? 'selected' : ''}>${UI.esc(p.name)}</option>`);
|
| 128 |
+
}
|
| 129 |
+
return opts.join('');
|
| 130 |
+
},
|
| 131 |
+
|
| 132 |
+
parentOptions(selected, excludeId) {
|
| 133 |
+
const opts = ['<option value="">— None (top-level) —</option>'];
|
| 134 |
+
for (const t of this.all || []) {
|
| 135 |
+
if (t.id === excludeId) continue;
|
| 136 |
+
opts.push(`<option value="${t.id}" ${t.id === selected ? 'selected' : ''}>TIC-${t.id} · ${UI.esc(t.title)}</option>`);
|
| 137 |
+
}
|
| 138 |
+
return opts.join('');
|
| 139 |
+
},
|
| 140 |
+
|
| 141 |
+
// Create / edit form
|
| 142 |
+
async openForm(id, parentId) {
|
| 143 |
+
let t = {
|
| 144 |
+
title: '', detail: '', type: 'backend', status: 'open',
|
| 145 |
+
message: '', logs: '', sort: 0, subtic: parentId || '', projectid: ''
|
| 146 |
+
};
|
| 147 |
+
if (id) {
|
| 148 |
+
try { t = await API.getTicket(id); } catch (e) { return UI.toast(e.message, true); }
|
| 149 |
+
}
|
| 150 |
+
const modal = UI.openModal(`
|
| 151 |
+
<div>
|
| 152 |
+
<h2 class="modal-title">${id ? 'Edit ticket' : (parentId ? 'Create sub-ticket' : 'Create ticket')}</h2>
|
| 153 |
+
<div class="field">
|
| 154 |
+
<label>Title *</label>
|
| 155 |
+
<input type="text" id="f-title" value="${UI.esc(t.title)}" placeholder="Ticket title" />
|
| 156 |
+
</div>
|
| 157 |
+
<div class="field">
|
| 158 |
+
<label>Detail</label>
|
| 159 |
+
<textarea id="f-detail" placeholder="Describe the work…">${UI.esc(t.detail || '')}</textarea>
|
| 160 |
+
</div>
|
| 161 |
+
<div class="field-row">
|
| 162 |
+
<div class="field">
|
| 163 |
+
<label>Type</label>
|
| 164 |
+
<select id="f-type">${TYPES.map((v) => `<option value="${v}" ${t.type === v ? 'selected' : ''}>${v}</option>`).join('')}</select>
|
| 165 |
+
</div>
|
| 166 |
+
<div class="field">
|
| 167 |
+
<label>Status</label>
|
| 168 |
+
<select id="f-status">${STATUSES.map((v) => `<option value="${v}" ${t.status === v ? 'selected' : ''}>${v}</option>`).join('')}</select>
|
| 169 |
+
</div>
|
| 170 |
+
<div class="field">
|
| 171 |
+
<label>Sort</label>
|
| 172 |
+
<input type="number" id="f-sort" value="${t.sort ?? 0}" />
|
| 173 |
+
</div>
|
| 174 |
+
</div>
|
| 175 |
+
<div class="field-row">
|
| 176 |
+
<div class="field">
|
| 177 |
+
<label>Project</label>
|
| 178 |
+
<select id="f-project">${this.projectOptions(t.projectid)}</select>
|
| 179 |
+
</div>
|
| 180 |
+
<div class="field">
|
| 181 |
+
<label>Parent ticket (subtic)</label>
|
| 182 |
+
<select id="f-parent">${this.parentOptions(t.subtic ? Number(t.subtic) : '', id)}</select>
|
| 183 |
+
</div>
|
| 184 |
+
</div>
|
| 185 |
+
<div class="modal-actions">
|
| 186 |
+
<button class="btn btn-subtle" id="f-cancel">Cancel</button>
|
| 187 |
+
<button class="btn btn-primary" id="f-save">${id ? 'Save' : 'Create'}</button>
|
| 188 |
+
</div>
|
| 189 |
+
</div>
|
| 190 |
+
`);
|
| 191 |
+
modal.querySelector('#f-cancel').addEventListener('click', UI.closeModal);
|
| 192 |
+
modal.querySelector('#f-save').addEventListener('click', async () => {
|
| 193 |
+
const title = modal.querySelector('#f-title').value.trim();
|
| 194 |
+
if (!title) return UI.toast('Title is required', true);
|
| 195 |
+
const payload = {
|
| 196 |
+
title,
|
| 197 |
+
detail: modal.querySelector('#f-detail').value,
|
| 198 |
+
type: modal.querySelector('#f-type').value,
|
| 199 |
+
status: modal.querySelector('#f-status').value,
|
| 200 |
+
sort: Number(modal.querySelector('#f-sort').value) || 0,
|
| 201 |
+
projectid: modal.querySelector('#f-project').value || null,
|
| 202 |
+
subtic: modal.querySelector('#f-parent').value || null
|
| 203 |
+
};
|
| 204 |
+
try {
|
| 205 |
+
if (id) await API.updateTicket(id, payload);
|
| 206 |
+
else await API.createTicket(payload);
|
| 207 |
+
UI.closeModal();
|
| 208 |
+
UI.toast(id ? 'Ticket updated' : 'Ticket created');
|
| 209 |
+
if (payload.subtic) this.expanded.add(Number(payload.subtic));
|
| 210 |
+
this.load();
|
| 211 |
+
} catch (e) { UI.toast(e.message, true); }
|
| 212 |
+
});
|
| 213 |
+
},
|
| 214 |
+
|
| 215 |
+
// Detail panel with message, logs, screenshots
|
| 216 |
+
async openDetail(id) {
|
| 217 |
+
let t;
|
| 218 |
+
try { t = await API.getTicket(id); } catch (e) { return UI.toast(e.message, true); }
|
| 219 |
+
const project = this.projects.find((p) => p.id === t.projectid);
|
| 220 |
+
const images = Array.isArray(t.images) ? t.images : [];
|
| 221 |
+
|
| 222 |
+
const modal = UI.openModal(`
|
| 223 |
+
<div>
|
| 224 |
+
<h2 class="modal-title">
|
| 225 |
+
<span class="ticket-key mono">TIC-${t.id}</span> ${UI.esc(t.title)}
|
| 226 |
+
</h2>
|
| 227 |
+
<div class="detail-grid">
|
| 228 |
+
<div class="detail-main">
|
| 229 |
+
<div class="field">
|
| 230 |
+
<label>Detail</label>
|
| 231 |
+
<div class="msg-box">${UI.esc(t.detail || '—')}</div>
|
| 232 |
+
</div>
|
| 233 |
+
<div class="field">
|
| 234 |
+
<label>Last message from agent</label>
|
| 235 |
+
<div class="msg-box">${UI.esc(t.message || '—')}</div>
|
| 236 |
+
</div>
|
| 237 |
+
<div class="field">
|
| 238 |
+
<label>Logs</label>
|
| 239 |
+
<div class="log-box">${UI.esc(t.logs || '(no logs)')}</div>
|
| 240 |
+
</div>
|
| 241 |
+
<div class="field">
|
| 242 |
+
<label>Screenshots</label>
|
| 243 |
+
<div class="shots" id="shots">
|
| 244 |
+
${images.map((u) => this.shot(u)).join('') || '<span class="muted">No screenshots</span>'}
|
| 245 |
+
</div>
|
| 246 |
+
<div class="upload-drop" id="drop">Click or drop images to upload</div>
|
| 247 |
+
<input type="file" id="file-input" accept="image/*" multiple hidden />
|
| 248 |
+
</div>
|
| 249 |
+
</div>
|
| 250 |
+
<div class="detail-side">
|
| 251 |
+
<div class="field"><label>Status</label><div><span class="badge st-${t.status}">${t.status}</span></div></div>
|
| 252 |
+
<div class="field"><label>Type</label><div><span class="badge ty-${t.type}">${t.type}</span></div></div>
|
| 253 |
+
<div class="field"><label>Project</label><div>${project ? UI.esc(project.name) : '<span class="muted">—</span>'}</div></div>
|
| 254 |
+
<div class="field"><label>Parent</label><div>${t.subtic ? `TIC-${t.subtic}` : '<span class="muted">—</span>'}</div></div>
|
| 255 |
+
<div class="field"><label>Sort</label><div class="mono">${t.sort ?? 0}</div></div>
|
| 256 |
+
<div class="field"><label>Created</label><div>${UI.fmtDate(t.creatid)}</div></div>
|
| 257 |
+
</div>
|
| 258 |
+
</div>
|
| 259 |
+
<div class="modal-actions">
|
| 260 |
+
<button class="btn btn-subtle" id="d-close">Close</button>
|
| 261 |
+
<button class="btn btn-default" id="d-sub">+ Sub-ticket</button>
|
| 262 |
+
<button class="btn btn-primary" id="d-edit">Edit</button>
|
| 263 |
+
</div>
|
| 264 |
+
</div>
|
| 265 |
+
`, true);
|
| 266 |
+
|
| 267 |
+
modal.querySelector('#d-close').addEventListener('click', UI.closeModal);
|
| 268 |
+
modal.querySelector('#d-edit').addEventListener('click', () => this.openForm(id));
|
| 269 |
+
modal.querySelector('#d-sub').addEventListener('click', () => this.openForm(null, id));
|
| 270 |
+
|
| 271 |
+
// screenshots interactions
|
| 272 |
+
const bindShots = () => {
|
| 273 |
+
modal.querySelectorAll('#shots img').forEach((img) =>
|
| 274 |
+
img.addEventListener('click', () => UI.lightbox(img.src))
|
| 275 |
+
);
|
| 276 |
+
modal.querySelectorAll('#shots [data-delimg]').forEach((b) =>
|
| 277 |
+
b.addEventListener('click', async () => {
|
| 278 |
+
if (!confirm('Remove this screenshot?')) return;
|
| 279 |
+
try {
|
| 280 |
+
const updated = await API.deleteTicketImage(id, b.dataset.delimg);
|
| 281 |
+
this.refreshShots(modal, id, updated.images || []);
|
| 282 |
+
} catch (e) { UI.toast(e.message, true); }
|
| 283 |
+
})
|
| 284 |
+
);
|
| 285 |
+
};
|
| 286 |
+
bindShots();
|
| 287 |
+
|
| 288 |
+
// upload
|
| 289 |
+
const input = modal.querySelector('#file-input');
|
| 290 |
+
const drop = modal.querySelector('#drop');
|
| 291 |
+
drop.addEventListener('click', () => input.click());
|
| 292 |
+
input.addEventListener('change', () => this.doUpload(modal, id, input.files));
|
| 293 |
+
drop.addEventListener('dragover', (e) => { e.preventDefault(); drop.style.borderColor = 'var(--ds-blue)'; });
|
| 294 |
+
drop.addEventListener('dragleave', () => { drop.style.borderColor = ''; });
|
| 295 |
+
drop.addEventListener('drop', (e) => {
|
| 296 |
+
e.preventDefault();
|
| 297 |
+
drop.style.borderColor = '';
|
| 298 |
+
if (e.dataTransfer.files.length) this.doUpload(modal, id, e.dataTransfer.files);
|
| 299 |
+
});
|
| 300 |
+
this._bindShots = bindShots;
|
| 301 |
+
},
|
| 302 |
+
|
| 303 |
+
shot(url) {
|
| 304 |
+
return `
|
| 305 |
+
<div class="shot">
|
| 306 |
+
<img src="${UI.esc(url)}" alt="screenshot" />
|
| 307 |
+
<button class="shot-del" data-delimg="${UI.esc(url)}" title="Remove">✕</button>
|
| 308 |
+
</div>`;
|
| 309 |
+
},
|
| 310 |
+
|
| 311 |
+
refreshShots(modal, id, images) {
|
| 312 |
+
const shots = modal.querySelector('#shots');
|
| 313 |
+
shots.innerHTML = images.length ? images.map((u) => this.shot(u)).join('') : '<span class="muted">No screenshots</span>';
|
| 314 |
+
this._bindShots && this._bindShots();
|
| 315 |
+
this.load();
|
| 316 |
+
},
|
| 317 |
+
|
| 318 |
+
async doUpload(modal, id, files) {
|
| 319 |
+
if (!files || !files.length) return;
|
| 320 |
+
UI.toast('Uploading…');
|
| 321 |
+
try {
|
| 322 |
+
const updated = await API.uploadImages(id, files);
|
| 323 |
+
this.refreshShots(modal, id, updated.images || []);
|
| 324 |
+
UI.toast('Uploaded');
|
| 325 |
+
} catch (e) { UI.toast(e.message, true); }
|
| 326 |
+
},
|
| 327 |
+
|
| 328 |
+
async remove(id) {
|
| 329 |
+
if (!confirm('Delete this ticket? Its sub-tickets will also be deleted.')) return;
|
| 330 |
+
try {
|
| 331 |
+
await API.deleteTicket(id);
|
| 332 |
+
UI.toast('Ticket deleted');
|
| 333 |
+
this.load();
|
| 334 |
+
} catch (e) { UI.toast(e.message, true); }
|
| 335 |
+
}
|
| 336 |
+
};
|
server.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import express from 'express';
|
| 2 |
+
import cors from 'cors';
|
| 3 |
+
import { fileURLToPath } from 'url';
|
| 4 |
+
import path from 'path';
|
| 5 |
+
import dotenv from 'dotenv';
|
| 6 |
+
|
| 7 |
+
import projectsRouter from './src/routes/projects.js';
|
| 8 |
+
import ticketsRouter from './src/routes/tickets.js';
|
| 9 |
+
import flowRouter from './src/routes/flow.js';
|
| 10 |
+
|
| 11 |
+
dotenv.config();
|
| 12 |
+
|
| 13 |
+
const __filename = fileURLToPath(import.meta.url);
|
| 14 |
+
const __dirname = path.dirname(__filename);
|
| 15 |
+
|
| 16 |
+
const app = express();
|
| 17 |
+
const PORT = process.env.PORT || 3000;
|
| 18 |
+
|
| 19 |
+
app.use(cors());
|
| 20 |
+
app.use(express.json({ limit: '5mb' }));
|
| 21 |
+
|
| 22 |
+
// API routes
|
| 23 |
+
app.use('/api/projects', projectsRouter);
|
| 24 |
+
app.use('/api/tickets', ticketsRouter);
|
| 25 |
+
app.use('/flow/tickets', flowRouter);
|
| 26 |
+
|
| 27 |
+
app.get('/api/health', (req, res) => res.json({ ok: true }));
|
| 28 |
+
|
| 29 |
+
// Static frontend
|
| 30 |
+
app.use(express.static(path.join(__dirname, 'public')));
|
| 31 |
+
|
| 32 |
+
app.listen(PORT, () => {
|
| 33 |
+
console.log(`Taboard running at http://localhost:${PORT}`);
|
| 34 |
+
});
|
src/routes/flow.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Router } from 'express';
|
| 2 |
+
import { supabase } from '../supabase.js';
|
| 3 |
+
import { STATUSES, statusToInt, intToStatus } from '../status.js';
|
| 4 |
+
|
| 5 |
+
// Lightweight "flow" API for agents. Mounted at /flow/tickets.
|
| 6 |
+
const router = Router();
|
| 7 |
+
const TABLE = 'ztickets';
|
| 8 |
+
|
| 9 |
+
// GET /flow/tickets -> [{ id, title, status }]
|
| 10 |
+
router.get('/', async (req, res) => {
|
| 11 |
+
const { data, error } = await supabase
|
| 12 |
+
.from(TABLE)
|
| 13 |
+
.select('id, title, status')
|
| 14 |
+
.order('sort', { ascending: true })
|
| 15 |
+
.order('id', { ascending: true });
|
| 16 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 17 |
+
res.json(data.map((t) => ({ id: t.id, title: t.title, status: intToStatus(t.status) })));
|
| 18 |
+
});
|
| 19 |
+
|
| 20 |
+
// GET /flow/tickets/:id -> { id, title, detail, status, message }
|
| 21 |
+
router.get('/:id', async (req, res) => {
|
| 22 |
+
const { data, error } = await supabase
|
| 23 |
+
.from(TABLE)
|
| 24 |
+
.select('id, title, detail, status, message')
|
| 25 |
+
.eq('id', req.params.id)
|
| 26 |
+
.single();
|
| 27 |
+
if (error) return res.status(404).json({ error: error.message });
|
| 28 |
+
res.json({
|
| 29 |
+
id: data.id,
|
| 30 |
+
title: data.title,
|
| 31 |
+
detail: data.detail,
|
| 32 |
+
status: intToStatus(data.status),
|
| 33 |
+
message: data.message
|
| 34 |
+
});
|
| 35 |
+
});
|
| 36 |
+
|
| 37 |
+
// PUT /flow/tickets body: { id, status?, message?, detail? } -> updated ticket
|
| 38 |
+
router.put('/', async (req, res) => {
|
| 39 |
+
const { id, status, message, detail } = req.body;
|
| 40 |
+
if (id === undefined || id === null || id === '') {
|
| 41 |
+
return res.status(400).json({ error: 'id is required' });
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
const payload = {};
|
| 45 |
+
if (status !== undefined) {
|
| 46 |
+
if (!STATUSES.includes(status)) {
|
| 47 |
+
return res.status(400).json({ error: `status must be one of ${STATUSES.join(', ')}` });
|
| 48 |
+
}
|
| 49 |
+
payload.status = statusToInt(status);
|
| 50 |
+
}
|
| 51 |
+
if (message !== undefined) payload.message = message;
|
| 52 |
+
if (detail !== undefined) payload.detail = detail;
|
| 53 |
+
|
| 54 |
+
if (Object.keys(payload).length === 0) {
|
| 55 |
+
return res.status(400).json({ error: 'nothing to update (provide status, message or detail)' });
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
const { data, error } = await supabase
|
| 59 |
+
.from(TABLE)
|
| 60 |
+
.update(payload)
|
| 61 |
+
.eq('id', id)
|
| 62 |
+
.select()
|
| 63 |
+
.single();
|
| 64 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 65 |
+
res.json({ ...data, status: intToStatus(data.status) });
|
| 66 |
+
});
|
| 67 |
+
|
| 68 |
+
export default router;
|
src/routes/projects.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Router } from 'express';
|
| 2 |
+
import { supabase } from '../supabase.js';
|
| 3 |
+
|
| 4 |
+
const router = Router();
|
| 5 |
+
const TABLE = 'zprojects';
|
| 6 |
+
|
| 7 |
+
// List all projects
|
| 8 |
+
router.get('/', async (req, res) => {
|
| 9 |
+
const { data, error } = await supabase
|
| 10 |
+
.from(TABLE)
|
| 11 |
+
.select('*')
|
| 12 |
+
.order('id', { ascending: true });
|
| 13 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 14 |
+
res.json(data);
|
| 15 |
+
});
|
| 16 |
+
|
| 17 |
+
// Get one project
|
| 18 |
+
router.get('/:id', async (req, res) => {
|
| 19 |
+
const { data, error } = await supabase
|
| 20 |
+
.from(TABLE)
|
| 21 |
+
.select('*')
|
| 22 |
+
.eq('id', req.params.id)
|
| 23 |
+
.single();
|
| 24 |
+
if (error) return res.status(404).json({ error: error.message });
|
| 25 |
+
res.json(data);
|
| 26 |
+
});
|
| 27 |
+
|
| 28 |
+
// Create project
|
| 29 |
+
router.post('/', async (req, res) => {
|
| 30 |
+
const { name, note, struc } = req.body;
|
| 31 |
+
if (!name) return res.status(400).json({ error: 'name is required' });
|
| 32 |
+
|
| 33 |
+
const payload = {
|
| 34 |
+
name,
|
| 35 |
+
note: note ?? null,
|
| 36 |
+
struc: normalizeStruc(struc)
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
const { data, error } = await supabase
|
| 40 |
+
.from(TABLE)
|
| 41 |
+
.insert(payload)
|
| 42 |
+
.select()
|
| 43 |
+
.single();
|
| 44 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 45 |
+
res.status(201).json(data);
|
| 46 |
+
});
|
| 47 |
+
|
| 48 |
+
// Update project
|
| 49 |
+
router.put('/:id', async (req, res) => {
|
| 50 |
+
const { name, note, struc } = req.body;
|
| 51 |
+
const payload = {};
|
| 52 |
+
if (name !== undefined) payload.name = name;
|
| 53 |
+
if (note !== undefined) payload.note = note;
|
| 54 |
+
if (struc !== undefined) payload.struc = normalizeStruc(struc);
|
| 55 |
+
|
| 56 |
+
const { data, error } = await supabase
|
| 57 |
+
.from(TABLE)
|
| 58 |
+
.update(payload)
|
| 59 |
+
.eq('id', req.params.id)
|
| 60 |
+
.select()
|
| 61 |
+
.single();
|
| 62 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 63 |
+
res.json(data);
|
| 64 |
+
});
|
| 65 |
+
|
| 66 |
+
// Delete project
|
| 67 |
+
router.delete('/:id', async (req, res) => {
|
| 68 |
+
const { error } = await supabase.from(TABLE).delete().eq('id', req.params.id);
|
| 69 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 70 |
+
res.status(204).end();
|
| 71 |
+
});
|
| 72 |
+
|
| 73 |
+
// struc may arrive as a JSON string from a textarea; store it as an object.
|
| 74 |
+
function normalizeStruc(struc) {
|
| 75 |
+
if (struc === undefined || struc === null || struc === '') return {};
|
| 76 |
+
if (typeof struc === 'object') return struc;
|
| 77 |
+
try {
|
| 78 |
+
return JSON.parse(struc);
|
| 79 |
+
} catch {
|
| 80 |
+
// Keep raw text under a key rather than failing the request.
|
| 81 |
+
return { raw: String(struc) };
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
export default router;
|
src/routes/tickets.js
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Router } from 'express';
|
| 2 |
+
import multer from 'multer';
|
| 3 |
+
import { supabase, STORAGE_BUCKET } from '../supabase.js';
|
| 4 |
+
import { STATUSES, statusToInt, intToStatus } from '../status.js';
|
| 5 |
+
|
| 6 |
+
const router = Router();
|
| 7 |
+
const TABLE = 'ztickets';
|
| 8 |
+
|
| 9 |
+
const upload = multer({
|
| 10 |
+
storage: multer.memoryStorage(),
|
| 11 |
+
limits: { fileSize: 10 * 1024 * 1024 } // 10 MB
|
| 12 |
+
});
|
| 13 |
+
|
| 14 |
+
const TYPES = ['backend', 'api', 'frontend', 'ui'];
|
| 15 |
+
|
| 16 |
+
// DB stores images as text (JSON array of URLs). Expose as an array to the client.
|
| 17 |
+
function parseImages(v) {
|
| 18 |
+
if (!v) return [];
|
| 19 |
+
if (Array.isArray(v)) return v;
|
| 20 |
+
try {
|
| 21 |
+
const a = JSON.parse(v);
|
| 22 |
+
return Array.isArray(a) ? a : [];
|
| 23 |
+
} catch {
|
| 24 |
+
return String(v).split(/[\n,]+/).map((s) => s.trim()).filter(Boolean);
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
const serializeImages = (arr) => JSON.stringify(arr || []);
|
| 28 |
+
|
| 29 |
+
// Convert a DB row into the shape the frontend expects.
|
| 30 |
+
function toApi(row) {
|
| 31 |
+
if (!row) return row;
|
| 32 |
+
return { ...row, status: intToStatus(row.status), images: parseImages(row.images) };
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
// List tickets. Optional filters: ?subtic=<id> (children), ?subtic=null (top-level),
|
| 36 |
+
// ?projectid=<id>
|
| 37 |
+
router.get('/', async (req, res) => {
|
| 38 |
+
let query = supabase.from(TABLE).select('*');
|
| 39 |
+
|
| 40 |
+
if (req.query.subtic === 'null') {
|
| 41 |
+
query = query.is('subtic', null);
|
| 42 |
+
} else if (req.query.subtic !== undefined) {
|
| 43 |
+
query = query.eq('subtic', req.query.subtic);
|
| 44 |
+
}
|
| 45 |
+
if (req.query.projectid !== undefined) {
|
| 46 |
+
query = query.eq('projectid', req.query.projectid);
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
query = query.order('sort', { ascending: true }).order('id', { ascending: true });
|
| 50 |
+
|
| 51 |
+
const { data, error } = await query;
|
| 52 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 53 |
+
res.json(data.map(toApi));
|
| 54 |
+
});
|
| 55 |
+
|
| 56 |
+
// Get one ticket
|
| 57 |
+
router.get('/:id', async (req, res) => {
|
| 58 |
+
const { data, error } = await supabase
|
| 59 |
+
.from(TABLE)
|
| 60 |
+
.select('*')
|
| 61 |
+
.eq('id', req.params.id)
|
| 62 |
+
.single();
|
| 63 |
+
if (error) return res.status(404).json({ error: error.message });
|
| 64 |
+
res.json(toApi(data));
|
| 65 |
+
});
|
| 66 |
+
|
| 67 |
+
// Create ticket
|
| 68 |
+
router.post('/', async (req, res) => {
|
| 69 |
+
const { title } = req.body;
|
| 70 |
+
if (!title) return res.status(400).json({ error: 'title is required' });
|
| 71 |
+
|
| 72 |
+
const payload = buildPayload(req.body, true);
|
| 73 |
+
const bad = validate(req.body);
|
| 74 |
+
if (bad) return res.status(400).json({ error: bad });
|
| 75 |
+
|
| 76 |
+
const { data, error } = await supabase
|
| 77 |
+
.from(TABLE)
|
| 78 |
+
.insert(payload)
|
| 79 |
+
.select()
|
| 80 |
+
.single();
|
| 81 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 82 |
+
res.status(201).json(toApi(data));
|
| 83 |
+
});
|
| 84 |
+
|
| 85 |
+
// Update ticket
|
| 86 |
+
router.put('/:id', async (req, res) => {
|
| 87 |
+
const payload = buildPayload(req.body, false);
|
| 88 |
+
const bad = validate(req.body);
|
| 89 |
+
if (bad) return res.status(400).json({ error: bad });
|
| 90 |
+
|
| 91 |
+
const { data, error } = await supabase
|
| 92 |
+
.from(TABLE)
|
| 93 |
+
.update(payload)
|
| 94 |
+
.eq('id', req.params.id)
|
| 95 |
+
.select()
|
| 96 |
+
.single();
|
| 97 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 98 |
+
res.json(toApi(data));
|
| 99 |
+
});
|
| 100 |
+
|
| 101 |
+
// Delete ticket (sub-tickets cascade via FK)
|
| 102 |
+
router.delete('/:id', async (req, res) => {
|
| 103 |
+
const { error } = await supabase.from(TABLE).delete().eq('id', req.params.id);
|
| 104 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 105 |
+
res.status(204).end();
|
| 106 |
+
});
|
| 107 |
+
|
| 108 |
+
// Upload one or more images for a ticket -> Supabase Storage, append URLs to images[]
|
| 109 |
+
router.post('/:id/images', upload.array('images', 10), async (req, res) => {
|
| 110 |
+
const id = req.params.id;
|
| 111 |
+
if (!req.files || req.files.length === 0) {
|
| 112 |
+
return res.status(400).json({ error: 'no files uploaded' });
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
// Load current images
|
| 116 |
+
const { data: ticket, error: getErr } = await supabase
|
| 117 |
+
.from(TABLE)
|
| 118 |
+
.select('images')
|
| 119 |
+
.eq('id', id)
|
| 120 |
+
.single();
|
| 121 |
+
if (getErr) return res.status(404).json({ error: getErr.message });
|
| 122 |
+
|
| 123 |
+
const urls = parseImages(ticket.images);
|
| 124 |
+
|
| 125 |
+
for (const file of req.files) {
|
| 126 |
+
const ext = (file.originalname.split('.').pop() || 'png').toLowerCase();
|
| 127 |
+
const path = `ticket-${id}/${Date.now()}-${Math.random().toString(36).slice(2)}.${ext}`;
|
| 128 |
+
const { error: upErr } = await supabase.storage
|
| 129 |
+
.from(STORAGE_BUCKET)
|
| 130 |
+
.upload(path, file.buffer, { contentType: file.mimetype, upsert: false });
|
| 131 |
+
if (upErr) return res.status(500).json({ error: upErr.message });
|
| 132 |
+
|
| 133 |
+
const { data: pub } = supabase.storage.from(STORAGE_BUCKET).getPublicUrl(path);
|
| 134 |
+
urls.push(pub.publicUrl);
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
const { data, error } = await supabase
|
| 138 |
+
.from(TABLE)
|
| 139 |
+
.update({ images: serializeImages(urls) })
|
| 140 |
+
.eq('id', id)
|
| 141 |
+
.select()
|
| 142 |
+
.single();
|
| 143 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 144 |
+
res.status(201).json(toApi(data));
|
| 145 |
+
});
|
| 146 |
+
|
| 147 |
+
// Remove one image URL from a ticket
|
| 148 |
+
router.delete('/:id/images', async (req, res) => {
|
| 149 |
+
const { url } = req.body;
|
| 150 |
+
if (!url) return res.status(400).json({ error: 'url is required' });
|
| 151 |
+
|
| 152 |
+
const { data: ticket, error: getErr } = await supabase
|
| 153 |
+
.from(TABLE)
|
| 154 |
+
.select('images')
|
| 155 |
+
.eq('id', req.params.id)
|
| 156 |
+
.single();
|
| 157 |
+
if (getErr) return res.status(404).json({ error: getErr.message });
|
| 158 |
+
|
| 159 |
+
const urls = parseImages(ticket.images).filter((u) => u !== url);
|
| 160 |
+
|
| 161 |
+
const { data, error } = await supabase
|
| 162 |
+
.from(TABLE)
|
| 163 |
+
.update({ images: serializeImages(urls) })
|
| 164 |
+
.eq('id', req.params.id)
|
| 165 |
+
.select()
|
| 166 |
+
.single();
|
| 167 |
+
if (error) return res.status(500).json({ error: error.message });
|
| 168 |
+
res.json(toApi(data));
|
| 169 |
+
});
|
| 170 |
+
|
| 171 |
+
function buildPayload(body, isCreate) {
|
| 172 |
+
const {
|
| 173 |
+
title, detail, type, status, message, logs,
|
| 174 |
+
sort, subtic, projectid
|
| 175 |
+
} = body;
|
| 176 |
+
|
| 177 |
+
const payload = {};
|
| 178 |
+
if (title !== undefined) payload.title = title;
|
| 179 |
+
if (detail !== undefined) payload.detail = detail;
|
| 180 |
+
if (type !== undefined) payload.type = type;
|
| 181 |
+
if (status !== undefined) payload.status = statusToInt(status);
|
| 182 |
+
if (message !== undefined) payload.message = message;
|
| 183 |
+
if (logs !== undefined) payload.logs = logs;
|
| 184 |
+
if (sort !== undefined) payload.sort = Number(sort) || 0;
|
| 185 |
+
if (subtic !== undefined) payload.subtic = subtic === '' || subtic === null ? null : Number(subtic);
|
| 186 |
+
if (projectid !== undefined) payload.projectid = projectid === '' || projectid === null ? null : Number(projectid);
|
| 187 |
+
|
| 188 |
+
if (isCreate) {
|
| 189 |
+
if (payload.type === undefined) payload.type = 'backend';
|
| 190 |
+
if (payload.status === undefined) payload.status = 0;
|
| 191 |
+
if (payload.sort === undefined) payload.sort = 0;
|
| 192 |
+
}
|
| 193 |
+
return payload;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
function validate(body) {
|
| 197 |
+
if (body.type !== undefined && !TYPES.includes(body.type)) {
|
| 198 |
+
return `type must be one of ${TYPES.join(', ')}`;
|
| 199 |
+
}
|
| 200 |
+
if (body.status !== undefined && !STATUSES.includes(body.status)) {
|
| 201 |
+
return `status must be one of ${STATUSES.join(', ')}`;
|
| 202 |
+
}
|
| 203 |
+
return null;
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
export default router;
|
src/status.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Shared ticket status mapping. DB stores status as an int; APIs use labels.
|
| 2 |
+
// Index in STATUSES = the stored integer value.
|
| 3 |
+
export const STATUSES = ['open', 'queued', 'processing', 'done', 'failed', 'close'];
|
| 4 |
+
|
| 5 |
+
export const statusToInt = (label) => STATUSES.indexOf(label);
|
| 6 |
+
export const intToStatus = (n) => STATUSES[n] ?? 'open';
|
src/supabase.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { createClient } from '@supabase/supabase-js';
|
| 2 |
+
import dotenv from 'dotenv';
|
| 3 |
+
|
| 4 |
+
dotenv.config();
|
| 5 |
+
|
| 6 |
+
const { SUPABASE_URL, SUPABASE_KEY } = process.env;
|
| 7 |
+
|
| 8 |
+
if (!SUPABASE_URL || !SUPABASE_KEY) {
|
| 9 |
+
console.error('Missing SUPABASE_URL or SUPABASE_KEY in environment (.env).');
|
| 10 |
+
process.exit(1);
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
// Service-role client — server-side only. Never expose the key to the browser.
|
| 14 |
+
export const supabase = createClient(SUPABASE_URL, SUPABASE_KEY, {
|
| 15 |
+
auth: { persistSession: false }
|
| 16 |
+
});
|
| 17 |
+
|
| 18 |
+
export const STORAGE_BUCKET = process.env.STORAGE_BUCKET || 'ticket-images';
|