@camera.ui/server 0.0.77 → 0.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/interface/assets/{About-DiX290Ba.js → About-C98439I4.js} +1 -1
  2. package/dist/interface/assets/{CameraConsole-D5QPkLzW.js → CameraConsole-Dp7Mgugu.js} +1 -1
  3. package/dist/interface/assets/{Console-gBmF-6p2.js → Console-DoN0meid.js} +1 -1
  4. package/dist/interface/assets/{CuiPluginCard-V2Gm7pfr.js → CuiPluginCard-86liZjK4.js} +2 -2
  5. package/dist/interface/assets/{Menu-DD_cREVS.js → Menu-bxyy0M9l.js} +1 -1
  6. package/dist/interface/assets/{Plugin-BgwfrbBH.js → Plugin-CXq6VmFm.js} +1 -1
  7. package/dist/interface/assets/{PluginConsole-Ba6GhN1X.js → PluginConsole-3BaS6Z25.js} +1 -1
  8. package/dist/interface/assets/{Plugins-grcgVS0w.js → Plugins-BBYkp0Lq.js} +2 -2
  9. package/dist/interface/assets/{Settings-BZ1_vx3z.js → Settings-DfwGoK3K.js} +1 -1
  10. package/dist/interface/assets/SettingsSystem-C7R6m_Ep.js +2 -0
  11. package/dist/interface/assets/{VersionsHandler-DEqO9lRf.js → VersionsHandler-Bhk8BMHL.js} +1 -1
  12. package/dist/interface/assets/main-B7bTtuPz.js +3 -0
  13. package/dist/interface/assets/{main-BqVSZVz1.css → main-OhiFNSpg.css} +1 -1
  14. package/dist/interface/assets/{router-BeAHAEXo.js → router-CAPegw-8.js} +2 -2
  15. package/dist/interface/assets/{useLogsSocket-C70Hd1fl.js → useLogsSocket-BJLXRz8a.js} +1 -1
  16. package/dist/interface/assets/useLogsSocket-DZ93-C8L.css +1 -0
  17. package/dist/interface/index.html +4 -3
  18. package/dist/interface/sw.js +1 -1
  19. package/dist/server/package.json +3 -3
  20. package/dist/server/src/camera/sensors/controller.js +1 -1
  21. package/dist/server/src/camera/sensors/controller.js.map +1 -1
  22. package/dist/server/src/services/config/constants.js +2 -2
  23. package/dist/server/src/services/config/constants.js.map +1 -1
  24. package/dist/server/src/services/config/defaults.d.ts +2 -1
  25. package/dist/server/src/services/config/defaults.js +11 -7
  26. package/dist/server/src/services/config/defaults.js.map +1 -1
  27. package/dist/server/src/utils/pythonInstaller.d.ts +2 -0
  28. package/dist/server/src/utils/pythonInstaller.js +28 -4
  29. package/dist/server/src/utils/pythonInstaller.js.map +1 -1
  30. package/package.json +3 -3
  31. package/CLAUDE.md +0 -91
  32. package/dist/interface/assets/SettingsSystem-CorHEoD1.js +0 -2
  33. package/dist/interface/assets/main-BBDURrXh.js +0 -3
  34. package/dist/interface/assets/useLogsSocket-DALNtd8_.css +0 -1
  35. /package/dist/interface/assets/{esm-C9lo7BUF.js → esm-C9lo7BUF2.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camera.ui/server",
3
- "version": "0.0.77",
3
+ "version": "0.0.79",
4
4
  "description": "camera.ui server",
5
5
  "author": "seydx (https://github.com/cameraui/camera.ui)",
6
6
  "type": "module",
@@ -51,14 +51,14 @@
51
51
  "express-useragent": "^2.2.0",
52
52
  "fastify": "^5.8.5",
53
53
  "fastify-plugin": "^6.0.0",
54
- "fastify-type-provider-zod": "6.1.0",
54
+ "fastify-type-provider-zod": "7.0.0",
55
55
  "fkill": "^10.0.3",
56
56
  "fs-extra": "^11.3.5",
57
57
  "get-port": "^7.2.0",
58
58
  "js-yaml": "^5.1.0",
59
59
  "jsonwebtoken": "^9.0.3",
60
60
  "lmdb": "^3.5.6",
61
- "node-av": "^6.1.0-beta.2",
61
+ "node-av": "^6.1.0-beta.3",
62
62
  "node-forge": "^1.4.0",
63
63
  "object-path": "^0.11.8",
64
64
  "otplib": "^13.4.1",
package/CLAUDE.md DELETED
@@ -1,91 +0,0 @@
1
- # camera.ui server — code style
2
-
3
- These rules apply to every `.ts` file under `server/src/` (excluding `_camera_ui_tools/`, `.tmp/`, `node_modules/`, `dist/`, `test/`). Apply them to new code automatically — no need to ask.
4
-
5
- ## Comments
6
-
7
- - **No JSDoc.** Never write `/** ... */` blocks — not on classes, not on functions, not on types, not as section banners.
8
- - **Inline `//` comments only when the *why* is non-obvious** — hidden constraint, subtle invariant, workaround for a specific bug, surprising behavior. Skip comments that restate what the code does or that just label sections (`// ── Foo ──`).
9
- - Preserve `// eslint-disable-*`, `// @ts-*`, `// prettier-ignore` directives — they are not regular comments.
10
-
11
- ## Exports
12
-
13
- - Top-level exported functions use the `function` keyword, not arrow form:
14
- ```ts
15
- // ✅
16
- export function foo(x: number): string { ... }
17
-
18
- // ❌
19
- export const foo = (x: number): string => { ... };
20
- ```
21
- - Arrow form is fine for non-function exports (constants, schemas, instances) and for exports that genuinely need to capture closure or be passed as values.
22
-
23
- ## Class member order
24
-
25
- Top-to-bottom inside every class:
26
-
27
- 1. public properties (incl. `public readonly`)
28
- 2. private / protected properties
29
- 3. constructor
30
- 4. public methods (getters/setters grouped with their visibility)
31
- 5. private / protected methods
32
-
33
- Static members stay grouped with their visibility tier. Decorators stay attached to their target.
34
-
35
- ## Constructor parameter properties
36
-
37
- Use the TS shorthand whenever a constructor parameter is just assigned to a same-named field:
38
-
39
- ```ts
40
- // ✅
41
- class Foo {
42
- constructor(private bar: Bar, public readonly baz: Baz) {}
43
- }
44
-
45
- // ❌
46
- class Foo {
47
- private bar: Bar;
48
- public readonly baz: Baz;
49
-
50
- constructor(bar: Bar, baz: Baz) {
51
- this.bar = bar;
52
- this.baz = baz;
53
- }
54
- }
55
- ```
56
-
57
- Skip the shorthand when the field is populated differently — `container.resolve<...>('foo')`, `new XService()`, transformations like `this.bar = bar.normalize()`, computed values, defaults via `??`, or `#privateField` syntax. Mix freely: convert the fields that qualify, leave the rest as field declarations.
58
-
59
- ## Imports
60
-
61
- Three groups, separated by exactly one blank line, top to bottom:
62
-
63
- 1. **External value imports** — any specifier NOT starting with `.` or `..` (npm packages, `node:*`, `@scope/*`)
64
- 2. **Internal / relative value imports** — `./`, `../`
65
- 3. **Type imports** — every `import type` line, external and internal mixed in one block
66
-
67
- ```ts
68
- import { container } from 'tsyringe';
69
- import { open } from 'lmdb';
70
-
71
- import { ConfigService } from '../services/config/index.js';
72
- import { LoggerService } from '../services/logger/index.js';
73
-
74
- import type { Database as DB } from 'lmdb';
75
- import type { ConfigServiceInterface } from '../services/config/index.js';
76
- ```
77
-
78
- ## Code reuse
79
-
80
- If a function body or 3+ line block is duplicated across files in the same folder, extract it into a helper file (next to the call sites or in an existing utils file). Don't extract just because something *looks* similar — only when the logic is identical and the abstraction is genuinely useful. Don't pre-design for hypothetical future reuse.
81
-
82
- ## After making changes
83
-
84
- When a refactor / cleanup pass is done, run from `server/`:
85
-
86
- ```bash
87
- npm run format
88
- npm run lint:fix
89
- ```
90
-
91
- Fix any remaining lint errors manually.
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/VersionsHandler-DEqO9lRf.js","assets/api-DG-9_slP.js","assets/rolldown-runtime-DAXXjFlN.js","assets/vendor-CF-D4B9g.js","assets/vendor-cameraui-tvNekvZ-.js","assets/vendor-core-DinQdIbm.js","assets/api-Cna9Poda.css","assets/useSharedComposables-CTXKSCVm.js","assets/ui-q3Xp2p6M.js","assets/vendor-primevue-D0-7UQst.js","assets/plugins--S_Q7XSz.js","assets/useLogsSocket-C70Hd1fl.js","assets/_plugin-vue_export-helper-BDNMzG2s.js","assets/vendor-xterm-BRN-hOYD.js","assets/vendor-xterm-BrP-ENHg.css","assets/useLogsSocket-DALNtd8_.css","assets/vendor-markdown-BZSidpyh.js","assets/vendor-markdown-DtOhvyRx.css","assets/server-DAHar4Ts.js"])))=>i.map(i=>d[i]);
2
- import{T as e,d as t}from"./api-DG-9_slP.js";import{$n as n,$t as r,Gt as ee,Qt as i,Rn as a,Sn as o,Vn as s,Xt as c,Yt as l,Zt as u,dr as d,in as f,kt as te,on as p,rn as m,sr as h,t as g,wn as _}from"./vendor-CF-D4B9g.js";import{Bn as ne,Vn as v,di as re,st as ie}from"./vendor-cameraui-tvNekvZ-.js";import{t as ae}from"./useElectron-mh8HQUAI.js";import{t as oe}from"./hasPermission-BTRA5070.js";import{n as se,t as ce}from"./useCuiDialog-C7VXcZOW.js";import{t as le}from"./useFileDownload-Et7NRBap.js";import{n as ue,t as de}from"./server-DAHar4Ts.js";import{t as fe}from"./api-D_KNNgZ1.js";var pe={class:`flex flex-col w-full gap-6`},me={class:`flex flex-col gap-6`},he={key:0,class:`flex flex-row items-center justify-between`},ge={class:`text-sm`},_e={key:1,class:`text-sm font-bold`},y={class:`flex flex-row items-center justify-between`},b={class:`text-sm`},ve={key:1,class:`text-sm font-bold`},ye={key:1,class:`flex w-full items-center gap-2`},be={key:0},xe={class:`card-title`},Se={class:`flex flex-col gap-6`},Ce={class:`text-sm`},x={class:`card-title`},S={class:`flex flex-col gap-6`},C={class:`text-sm`},w={key:1},T={class:`card-title`},E={class:`flex flex-col gap-6`},D={class:`text-sm`},O=p({__name:`SettingsSystem`,setup(p){let O=se(()=>te(()=>import(`./VersionsHandler-DEqO9lRf.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))),k=new fe,A=new de,j=ce(),{t:M}=re(),{isElectronApp:N,electron:P}=ae(),{isOnline:F}=e(),we=t();A.toggleQueryActivator(`checkVersionQuery`,!1);let{data:I,isBusy:Te}=k.apiInfoQuery(),{data:L,isBusy:Ee}=A.checkVersionQuery(),{mutate:De,isPending:Oe}=A.restartServerQuery(),{mutateAsync:ke,isPending:Ae}=A.resetServerQuery(),R=n(M(`views.settings.unknown`)),z=n(M(`views.settings.unknown`)),B=n(),V=n(),H=n(),U=n(!1),W=n(!1),G=n(!1),K=n(!1),q=l(()=>I.value?.electron??!1),J=l(()=>Oe.value||Ae.value||Te.value||Ee.value||K.value||W.value),Y=l(()=>I.value?.installedVersion||I.value?.version),X=l(()=>I.value?.restartRequired??!1),Z=l(()=>J.value||!F.value),je=l(()=>Y.value&&V.value?g(V.value,Y.value)===1:!1),Me=l(()=>Y.value&&B.value?g(B.value,Y.value)===1:!1),Q=l(()=>je.value?V.value:Me.value?B.value:void 0);async function Ne(){if(!U.value){U.value=!0;try{let e=await ue();await le({blob:new Blob([e],{type:`application/x-x509-ca-cert`}),filename:`cert.pem`,mimeType:`application/x-x509-ca-cert`})}catch(e){console.log(e)}U.value=!1}}function $(e){switch(e){case`restart`:j.openTextDialog({data:{title:M(`components.dialog.title.restart`),confirmText:M(`components.form.button.restart`),contentText:M(`components.dialog.message.confirm_restart_server`),loading:J},onConfirm:De});break;case`reset`:j.openTextDialog({data:{title:M(`components.dialog.title.reset_server`),confirmText:M(`components.form.button.reset`),contentText:M(`components.dialog.message.confirm_reset_server`),loading:J},onConfirm:async()=>{try{await ke()}catch{}finally{we.logout()}}});break;case`versions`:case`install`:j.openComponentDialog(O,{data:{title:M(`components.dialog.title.install_version`),confirmText:M(e===`install`?`components.form.button.restart`:`components.form.button.install`),loading:J,contentProps:{target:{type:`server`},installVersion:e===`install`?Q.value:void 0}}});break}}async function Pe(){if(N)try{G.value=!0,z.value=await P.invoke(`get-app-version`)??M(`views.settings.unknown`)}catch(e){console.error(`Error getting electron app version:`,e)}finally{G.value=!1}}async function Fe(){if(N)try{K.value=!0;let e=await P.invoke(`get-update-available`);H.value=e.isUpdateAvailable?e.version:void 0}catch(e){console.error(`Error checking for electron updates:`,e)}finally{K.value=!1}}async function Ie(){if(N)try{W.value=!0,await P.invoke(`quit-and-install`)}catch(e){console.error(`Error installing electron update:`,e)}finally{W.value=!1}}return a(I,()=>{R.value=I.value?.version||M(`views.settings.unknown`)},{deep:!0,immediate:!0}),a(L,()=>{V.value=L.value?.[`dist-tags`].latest,B.value=L.value?.[`dist-tags`].alpha},{deep:!0,immediate:!0}),a(F,(e,t)=>{e&&!t&&!N&&(k.queryClient.invalidateQueries({queryKey:[`api`]}),A.queryClient.invalidateQueries({queryKey:[`version`]}))}),o(()=>{A.toggleQueryActivator(`checkVersionQuery`,!N),N&&(Pe(),Fe())}),(e,t)=>{let n=ne,a=v,o=ie;return _(),r(`div`,null,[c(`div`,pe,[c(`div`,null,[t[6]||=c(`span`,{class:`card-title`},`camera.ui`,-1),f(o,{class:`cui-card`},{content:s(()=>[c(`div`,me,[h(N)?(_(),r(`div`,he,[c(`span`,ge,d(e.$t(`views.settings.app`)),1),h(J)?(_(),u(n,{key:0,class:`w-[15px] h-[15px] m-0`,"stroke-width":`5`})):(_(),r(`span`,_e,`v`+d(h(z)),1))])):i(``,!0),c(`div`,y,[c(`span`,b,d(e.$t(`views.settings.server`)),1),h(J)?(_(),u(n,{key:0,class:`w-[15px] h-[15px] m-0`,"stroke-width":`5`})):(_(),r(`span`,ve,[m(` v`+d(h(R)),1),h(X)?(_(),r(ee,{key:0},[m(` → v`+d(h(Y)),1)],64)):i(``,!0)]))]),h(N)&&h(H)||!h(q)?(_(),r(`div`,ye,[t[5]||=c(`div`,{class:`ml-auto`},null,-1),h(N)&&h(H)?(_(),u(a,{key:0,disabled:!h(N),loading:h(J),class:`cui-button-medium`,label:`${e.$t(`components.form.button.update`)} (v${h(H)})`,onClick:Ie},null,8,[`disabled`,`loading`,`label`])):i(``,!0),!h(q)&&h(X)?(_(),u(a,{key:1,loading:h(J),disabled:h(Z),class:`cui-button-medium`,label:`${e.$t(`components.form.button.restart`)} (v${h(Y)})`,onClick:t[0]||=e=>$(`restart`)},null,8,[`loading`,`disabled`,`label`])):!h(q)&&h(Q)?(_(),u(a,{key:2,loading:h(J),disabled:h(Z),class:`cui-button-medium`,label:`${e.$t(`components.form.button.update`)} (v${h(Q)})`,onClick:t[1]||=e=>$(`install`)},null,8,[`loading`,`disabled`,`label`])):i(``,!0),h(q)?i(``,!0):(_(),u(a,{key:3,loading:h(J),disabled:h(Z),class:`cui-button-medium`,label:e.$t(`components.form.button.manage`),onClick:t[2]||=e=>$(`versions`)},null,8,[`loading`,`disabled`,`label`]))])):i(``,!0)])]),_:1})]),h(N)?i(``,!0):(_(),r(`div`,be,[c(`span`,xe,d(e.$t(`views.settings.certificate`)),1),f(o,{class:`cui-card`},{content:s(()=>[c(`div`,Se,[c(`span`,Ce,d(e.$t(`views.settings.certificate_info`)),1),f(a,{loading:h(U)||h(J),disabled:h(Z),class:`cui-button-medium ml-auto`,label:e.$t(`components.form.button.download`),onClick:Ne},null,8,[`loading`,`disabled`,`label`])])]),_:1})])),c(`div`,null,[c(`span`,x,d(e.$t(`views.settings.restart_server`)),1),f(o,{class:`cui-card`},{content:s(()=>[c(`div`,S,[c(`span`,C,d(e.$t(`views.settings.restart_server_info`)),1),f(a,{loading:h(J),disabled:h(Z),class:`cui-button-medium ml-auto`,label:e.$t(`components.form.button.restart`),onClick:t[3]||=e=>$(`restart`)},null,8,[`loading`,`disabled`,`label`])])]),_:1})]),(`hasPermission`in e?e.hasPermission:h(oe))(void 0,`master`)?(_(),r(`div`,w,[c(`span`,T,d(e.$t(`views.settings.reset_server`)),1),f(o,{class:`cui-card !border-red-900`},{content:s(()=>[c(`div`,E,[c(`span`,D,d(e.$t(`views.settings.reset_server_info`)),1),f(a,{loading:h(J),disabled:h(Z),class:`cui-button-medium ml-auto`,label:e.$t(`components.form.button.reset`),onClick:t[4]||=e=>$(`reset`)},null,8,[`loading`,`disabled`,`label`])])]),_:1})])):i(``,!0)])])}}});export{O as default};