@juspay/shooter 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/hooks/notifier.cjs +1431 -0
- package/.claude/settings.json +162 -0
- package/README.md +515 -0
- package/bin/shooter.cjs +141 -0
- package/build/client/_app/immutable/assets/0.CM9Hl6d-.css +1 -0
- package/build/client/_app/immutable/assets/0.CM9Hl6d-.css.br +0 -0
- package/build/client/_app/immutable/assets/0.CM9Hl6d-.css.gz +0 -0
- package/build/client/_app/immutable/assets/2.CAShZ7lQ.css +1 -0
- package/build/client/_app/immutable/assets/2.CAShZ7lQ.css.br +1 -0
- package/build/client/_app/immutable/assets/2.CAShZ7lQ.css.gz +0 -0
- package/build/client/_app/immutable/assets/3.C0uFg0IS.css +1 -0
- package/build/client/_app/immutable/assets/3.C0uFg0IS.css.br +0 -0
- package/build/client/_app/immutable/assets/3.C0uFg0IS.css.gz +0 -0
- package/build/client/_app/immutable/assets/4.cJuCkJKZ.css +1 -0
- package/build/client/_app/immutable/assets/4.cJuCkJKZ.css.br +0 -0
- package/build/client/_app/immutable/assets/4.cJuCkJKZ.css.gz +0 -0
- package/build/client/_app/immutable/assets/5.DRjApZQW.css +1 -0
- package/build/client/_app/immutable/assets/5.DRjApZQW.css.br +0 -0
- package/build/client/_app/immutable/assets/5.DRjApZQW.css.gz +0 -0
- package/build/client/_app/immutable/assets/6.AraZrY8I.css +1 -0
- package/build/client/_app/immutable/assets/6.AraZrY8I.css.br +0 -0
- package/build/client/_app/immutable/assets/6.AraZrY8I.css.gz +0 -0
- package/build/client/_app/immutable/assets/7.BCJ1IuMx.css +1 -0
- package/build/client/_app/immutable/assets/7.BCJ1IuMx.css.br +0 -0
- package/build/client/_app/immutable/assets/7.BCJ1IuMx.css.gz +0 -0
- package/build/client/_app/immutable/assets/ChatView.CsdBAOKx.css +1 -0
- package/build/client/_app/immutable/assets/ChatView.CsdBAOKx.css.br +0 -0
- package/build/client/_app/immutable/assets/ChatView.CsdBAOKx.css.gz +0 -0
- package/build/client/_app/immutable/assets/markdown.B0b5w2tq.css +1 -0
- package/build/client/_app/immutable/assets/markdown.B0b5w2tq.css.br +0 -0
- package/build/client/_app/immutable/assets/markdown.B0b5w2tq.css.gz +0 -0
- package/build/client/_app/immutable/assets/xterm.DFuMZ0ql.css +1 -0
- package/build/client/_app/immutable/assets/xterm.DFuMZ0ql.css.br +0 -0
- package/build/client/_app/immutable/assets/xterm.DFuMZ0ql.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BNJphC1q.js +56 -0
- package/build/client/_app/immutable/chunks/BNJphC1q.js.br +0 -0
- package/build/client/_app/immutable/chunks/BNJphC1q.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BTGVxaYV.js +9 -0
- package/build/client/_app/immutable/chunks/BTGVxaYV.js.br +0 -0
- package/build/client/_app/immutable/chunks/BTGVxaYV.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BlxrFPDK.js +1 -0
- package/build/client/_app/immutable/chunks/BlxrFPDK.js.br +0 -0
- package/build/client/_app/immutable/chunks/BlxrFPDK.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bvk7mfPM.js +1 -0
- package/build/client/_app/immutable/chunks/Bvk7mfPM.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bvk7mfPM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CAokzuPQ.js +1 -0
- package/build/client/_app/immutable/chunks/CAokzuPQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/CAokzuPQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CGLrx-H5.js +1 -0
- package/build/client/_app/immutable/chunks/CGLrx-H5.js.br +0 -0
- package/build/client/_app/immutable/chunks/CGLrx-H5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CgCpWzEA.js +1 -0
- package/build/client/_app/immutable/chunks/CgCpWzEA.js.br +0 -0
- package/build/client/_app/immutable/chunks/CgCpWzEA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cjwk_cGO.js +6 -0
- package/build/client/_app/immutable/chunks/Cjwk_cGO.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cjwk_cGO.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CtQ8EED1.js +11 -0
- package/build/client/_app/immutable/chunks/CtQ8EED1.js.br +0 -0
- package/build/client/_app/immutable/chunks/CtQ8EED1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DERQCisl.js +1 -0
- package/build/client/_app/immutable/chunks/DERQCisl.js.br +0 -0
- package/build/client/_app/immutable/chunks/DERQCisl.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DKrg8TQs.js +1 -0
- package/build/client/_app/immutable/chunks/DKrg8TQs.js.br +0 -0
- package/build/client/_app/immutable/chunks/DKrg8TQs.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DLu6yJIZ.js +1 -0
- package/build/client/_app/immutable/chunks/DLu6yJIZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/DLu6yJIZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dkkpz_4D.js +126 -0
- package/build/client/_app/immutable/chunks/Dkkpz_4D.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dkkpz_4D.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DoczjQhA.js +1 -0
- package/build/client/_app/immutable/chunks/DoczjQhA.js.br +0 -0
- package/build/client/_app/immutable/chunks/DoczjQhA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/PPVm8Dsz.js +1 -0
- package/build/client/_app/immutable/chunks/PPVm8Dsz.js.br +0 -0
- package/build/client/_app/immutable/chunks/PPVm8Dsz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/RpcNruLP.js +2 -0
- package/build/client/_app/immutable/chunks/RpcNruLP.js.br +0 -0
- package/build/client/_app/immutable/chunks/RpcNruLP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/a-St0Zwo.js +1 -0
- package/build/client/_app/immutable/chunks/a-St0Zwo.js.br +0 -0
- package/build/client/_app/immutable/chunks/a-St0Zwo.js.gz +0 -0
- package/build/client/_app/immutable/chunks/bo70OQUZ.js +1 -0
- package/build/client/_app/immutable/chunks/bo70OQUZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/bo70OQUZ.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.QvGgdvTI.js +2 -0
- package/build/client/_app/immutable/entry/app.QvGgdvTI.js.br +0 -0
- package/build/client/_app/immutable/entry/app.QvGgdvTI.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BntDNRMC.js +1 -0
- package/build/client/_app/immutable/entry/start.BntDNRMC.js.br +0 -0
- package/build/client/_app/immutable/entry/start.BntDNRMC.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.CzkdvJ7j.js +1 -0
- package/build/client/_app/immutable/nodes/0.CzkdvJ7j.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.CzkdvJ7j.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.MG1QhfrI.js +1 -0
- package/build/client/_app/immutable/nodes/1.MG1QhfrI.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.MG1QhfrI.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.B4MlOSh6.js +1 -0
- package/build/client/_app/immutable/nodes/2.B4MlOSh6.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.B4MlOSh6.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.DIwYkjDn.js +3 -0
- package/build/client/_app/immutable/nodes/3.DIwYkjDn.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.DIwYkjDn.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.D-cIe70D.js +1 -0
- package/build/client/_app/immutable/nodes/4.D-cIe70D.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.D-cIe70D.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.D7zPRe3L.js +1 -0
- package/build/client/_app/immutable/nodes/5.D7zPRe3L.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.D7zPRe3L.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.BB7QE48r.js +2 -0
- package/build/client/_app/immutable/nodes/6.BB7QE48r.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BB7QE48r.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.D8mqsrZG.js +2 -0
- package/build/client/_app/immutable/nodes/7.D8mqsrZG.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.D8mqsrZG.js.gz +0 -0
- package/build/client/_app/version.json +1 -0
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/client/app-icon.png +0 -0
- package/build/client/apple-touch-icon.png +0 -0
- package/build/client/favicon.png +0 -0
- package/build/client/favicon.svg +10 -0
- package/build/client/favicon.svg.br +0 -0
- package/build/client/favicon.svg.gz +0 -0
- package/build/client/manifest.webmanifest +1 -0
- package/build/client/pwa-192x192.png +0 -0
- package/build/client/pwa-512x512.png +0 -0
- package/build/client/registerSW.js +1 -0
- package/build/client/registerSW.js.br +0 -0
- package/build/client/registerSW.js.gz +0 -0
- package/build/client/sw.js +222 -0
- package/build/client/sw.js.br +0 -0
- package/build/client/sw.js.gz +0 -0
- package/build/client/workbox-5119daf5.js +3395 -0
- package/build/client/workbox-5119daf5.js.br +0 -0
- package/build/client/workbox-5119daf5.js.gz +0 -0
- package/build/env.js +94 -0
- package/build/handler.js +1494 -0
- package/build/index.js +345 -0
- package/build/pty-holder.cjs +510 -0
- package/build/server/chunks/0-q2IUp76Y.js +9 -0
- package/build/server/chunks/0-q2IUp76Y.js.map +1 -0
- package/build/server/chunks/1-CU50G5wZ.js +9 -0
- package/build/server/chunks/1-CU50G5wZ.js.map +1 -0
- package/build/server/chunks/2-D01t9s8T.js +9 -0
- package/build/server/chunks/2-D01t9s8T.js.map +1 -0
- package/build/server/chunks/3-5PUQ04wC.js +9 -0
- package/build/server/chunks/3-5PUQ04wC.js.map +1 -0
- package/build/server/chunks/4-e7gywnSG.js +9 -0
- package/build/server/chunks/4-e7gywnSG.js.map +1 -0
- package/build/server/chunks/5-CA1SA6KZ.js +9 -0
- package/build/server/chunks/5-CA1SA6KZ.js.map +1 -0
- package/build/server/chunks/6-71H221sV.js +9 -0
- package/build/server/chunks/6-71H221sV.js.map +1 -0
- package/build/server/chunks/7-Bo-vmdyz.js +9 -0
- package/build/server/chunks/7-Bo-vmdyz.js.map +1 -0
- package/build/server/chunks/_layout.svelte-SFHOxs74.js +132 -0
- package/build/server/chunks/_layout.svelte-SFHOxs74.js.map +1 -0
- package/build/server/chunks/_page.svelte-B4w-2wD-.js +120 -0
- package/build/server/chunks/_page.svelte-B4w-2wD-.js.map +1 -0
- package/build/server/chunks/_page.svelte-B_qAXjkh.js +213 -0
- package/build/server/chunks/_page.svelte-B_qAXjkh.js.map +1 -0
- package/build/server/chunks/_page.svelte-CsF1_TRG.js +50 -0
- package/build/server/chunks/_page.svelte-CsF1_TRG.js.map +1 -0
- package/build/server/chunks/_page.svelte-DJC6U-P0.js +68 -0
- package/build/server/chunks/_page.svelte-DJC6U-P0.js.map +1 -0
- package/build/server/chunks/_page.svelte-DQ6HBtsz.js +407 -0
- package/build/server/chunks/_page.svelte-DQ6HBtsz.js.map +1 -0
- package/build/server/chunks/_page.svelte-LbhhjP21.js +148 -0
- package/build/server/chunks/_page.svelte-LbhhjP21.js.map +1 -0
- package/build/server/chunks/_server.ts-BL2FGb5Z.js +387 -0
- package/build/server/chunks/_server.ts-BL2FGb5Z.js.map +1 -0
- package/build/server/chunks/_server.ts-BgdjBZco.js +47 -0
- package/build/server/chunks/_server.ts-BgdjBZco.js.map +1 -0
- package/build/server/chunks/_server.ts-BihKSdj_.js +59 -0
- package/build/server/chunks/_server.ts-BihKSdj_.js.map +1 -0
- package/build/server/chunks/_server.ts-BjOJsoy4.js +63 -0
- package/build/server/chunks/_server.ts-BjOJsoy4.js.map +1 -0
- package/build/server/chunks/_server.ts-C29xzfaw.js +77 -0
- package/build/server/chunks/_server.ts-C29xzfaw.js.map +1 -0
- package/build/server/chunks/_server.ts-CPa6DgIt.js +71 -0
- package/build/server/chunks/_server.ts-CPa6DgIt.js.map +1 -0
- package/build/server/chunks/_server.ts-CbDRDIoP.js +36 -0
- package/build/server/chunks/_server.ts-CbDRDIoP.js.map +1 -0
- package/build/server/chunks/_server.ts-Cl1OEWL4.js +54 -0
- package/build/server/chunks/_server.ts-Cl1OEWL4.js.map +1 -0
- package/build/server/chunks/_server.ts-ColfDHW8.js +60 -0
- package/build/server/chunks/_server.ts-ColfDHW8.js.map +1 -0
- package/build/server/chunks/_server.ts-Cv_OrRuL.js +494 -0
- package/build/server/chunks/_server.ts-Cv_OrRuL.js.map +1 -0
- package/build/server/chunks/_server.ts-D4MNi4cD.js +25 -0
- package/build/server/chunks/_server.ts-D4MNi4cD.js.map +1 -0
- package/build/server/chunks/_server.ts-DRVbgm6k.js +125 -0
- package/build/server/chunks/_server.ts-DRVbgm6k.js.map +1 -0
- package/build/server/chunks/_server.ts-DfajWaqh.js +39 -0
- package/build/server/chunks/_server.ts-DfajWaqh.js.map +1 -0
- package/build/server/chunks/_server.ts-y9-WYDMa.js +35 -0
- package/build/server/chunks/_server.ts-y9-WYDMa.js.map +1 -0
- package/build/server/chunks/auth-CEgFis71.js +32 -0
- package/build/server/chunks/auth-CEgFis71.js.map +1 -0
- package/build/server/chunks/client-CxCatAKr.js +255 -0
- package/build/server/chunks/client-CxCatAKr.js.map +1 -0
- package/build/server/chunks/error.svelte-BqdwMWdK.js +26 -0
- package/build/server/chunks/error.svelte-BqdwMWdK.js.map +1 -0
- package/build/server/chunks/exports-CJ0Q5XmL.js +4081 -0
- package/build/server/chunks/exports-CJ0Q5XmL.js.map +1 -0
- package/build/server/chunks/index2-DAxIoAO-.js +36 -0
- package/build/server/chunks/index2-DAxIoAO-.js.map +1 -0
- package/build/server/chunks/jsonl-parser-dmZU_Hyu.js +137 -0
- package/build/server/chunks/jsonl-parser-dmZU_Hyu.js.map +1 -0
- package/build/server/chunks/library-apns-BHxLmuIx.js +104 -0
- package/build/server/chunks/library-apns-BHxLmuIx.js.map +1 -0
- package/build/server/chunks/markdown-Bxrl3cCF.js +1241 -0
- package/build/server/chunks/markdown-Bxrl3cCF.js.map +1 -0
- package/build/server/chunks/pending-requests-D8UiTw7L.js +44 -0
- package/build/server/chunks/pending-requests-D8UiTw7L.js.map +1 -0
- package/build/server/chunks/pty-manager-C0FhBiVq.js +1697 -0
- package/build/server/chunks/pty-manager-C0FhBiVq.js.map +1 -0
- package/build/server/chunks/shared-server-BDY8jh20.js +200 -0
- package/build/server/chunks/shared-server-BDY8jh20.js.map +1 -0
- package/build/server/chunks/stores-D0HorpgL.js +36 -0
- package/build/server/chunks/stores-D0HorpgL.js.map +1 -0
- package/build/server/index.js +6466 -0
- package/build/server/index.js.map +1 -0
- package/build/server/manifest.js +184 -0
- package/build/server/manifest.js.map +1 -0
- package/build/shims.js +32 -0
- package/package.json +94 -0
- package/scripts/clipboard-shims/wl-paste +48 -0
- package/scripts/clipboard-shims/xclip +31 -0
- package/scripts/install.sh +477 -0
- package/scripts/setup-node-pty.sh +63 -0
- package/scripts/setup.cjs +571 -0
- package/scripts/test-runner.ts +243 -0
- package/scripts/vercel-env-commands.sh +60 -0
- package/server.ts +139 -0
- package/src/app.css +1835 -0
- package/src/app.d.ts +31 -0
- package/src/app.html +24 -0
- package/src/generated/types/APN.ts +305 -0
- package/src/generated/types/CLI.ts +52 -0
- package/src/generated/types/JWT.ts +92 -0
- package/src/generated/types/Terminal.ts +2736 -0
- package/src/generated/types/index.ts +6 -0
- package/src/lib/assets/icons/alert-triangle.svg +5 -0
- package/src/lib/assets/icons/bell.svg +4 -0
- package/src/lib/assets/icons/check-circle.svg +4 -0
- package/src/lib/assets/icons/file.svg +4 -0
- package/src/lib/assets/icons/folder.svg +3 -0
- package/src/lib/assets/icons/play.svg +3 -0
- package/src/lib/assets/icons/refresh.svg +4 -0
- package/src/lib/assets/icons/settings.svg +4 -0
- package/src/lib/assets/icons/terminal.svg +1 -0
- package/src/lib/assets/icons/tool.svg +3 -0
- package/src/lib/assets/icons/x-circle.svg +5 -0
- package/src/lib/modules/client/common/Card.svelte +26 -0
- package/src/lib/modules/client/common/EmptyState.svelte +36 -0
- package/src/lib/modules/client/common/Icon.svelte +61 -0
- package/src/lib/modules/client/common/StatusBadge.svelte +38 -0
- package/src/lib/modules/client/common/cache.ts +31 -0
- package/src/lib/modules/client/common/config-guard.ts +18 -0
- package/src/lib/modules/client/common/index.ts +12 -0
- package/src/lib/modules/client/common/markdown.ts +23 -0
- package/src/lib/modules/client/common/native-bridge.ts +50 -0
- package/src/lib/modules/client/common/time.ts +22 -0
- package/src/lib/modules/client/common/tool-title.ts +28 -0
- package/src/lib/modules/client/terminal/ChatView.svelte +400 -0
- package/src/lib/modules/client/terminal/CommandPalette.svelte +60 -0
- package/src/lib/modules/client/terminal/ConnectionStatus.svelte +99 -0
- package/src/lib/modules/client/terminal/LaunchSheet.svelte +294 -0
- package/src/lib/modules/client/terminal/QuickKeys.svelte +71 -0
- package/src/lib/modules/client/terminal/ShortcutsHelp.svelte +79 -0
- package/src/lib/modules/client/terminal/keyboard-shortcuts.ts +70 -0
- package/src/lib/modules/client/terminal/xterm-wrapper.ts +243 -0
- package/src/lib/modules/server/apn/library-apns.ts +137 -0
- package/src/lib/modules/server/apn/notification-history.ts +35 -0
- package/src/lib/modules/server/apn/notification-sessions.ts +117 -0
- package/src/lib/modules/server/apn/pending-requests.ts +65 -0
- package/src/lib/modules/server/apn/types.ts +51 -0
- package/src/lib/modules/server/auth.ts +34 -0
- package/src/lib/modules/server/cli/index.ts +79 -0
- package/src/lib/modules/server/cli/runner.ts +162 -0
- package/src/lib/modules/server/fcm/fcm-service.ts +72 -0
- package/src/lib/modules/server/sessions/jsonl-parser.ts +197 -0
- package/src/lib/modules/server/sessions/jsonl-reader.ts +301 -0
- package/src/lib/modules/server/sessions/opencode-reader.ts +264 -0
- package/src/lib/modules/server/sessions/types.ts +53 -0
- package/src/lib/modules/server/terminal/holder-client.ts +273 -0
- package/src/lib/modules/server/terminal/opencode-watcher.ts +661 -0
- package/src/lib/modules/server/terminal/pty-holder.cjs +510 -0
- package/src/lib/modules/server/terminal/pty-manager.ts +1012 -0
- package/src/lib/modules/server/terminal/session-watcher.ts +320 -0
- package/src/lib/modules/server/terminal/terminal-store.ts +198 -0
- package/src/lib/modules/server/ws/events-handler.ts +73 -0
- package/src/lib/modules/server/ws/keepalive.ts +108 -0
- package/src/lib/modules/server/ws/server.ts +93 -0
- package/src/lib/modules/server/ws/session-handler.ts +462 -0
- package/src/lib/modules/server/ws/terminal-handler.ts +197 -0
- package/src/lib/modules/server/ws/ticket-store.ts +58 -0
- package/src/lib/theme.css +529 -0
- package/src/lib/types/config.ts +6 -0
- package/src/routes/+layout.svelte +218 -0
- package/src/routes/+page.svelte +261 -0
- package/src/routes/api/debug/+server.ts +33 -0
- package/src/routes/api/device-token/+server.ts +85 -0
- package/src/routes/api/health/+server.ts +100 -0
- package/src/routes/api/notify/+server.ts +418 -0
- package/src/routes/api/qr-config/+server.ts +45 -0
- package/src/routes/api/response/+server.ts +73 -0
- package/src/routes/api/sessions/+server.ts +120 -0
- package/src/routes/api/terminals/+server.ts +141 -0
- package/src/routes/api/terminals/[id]/+server.ts +75 -0
- package/src/routes/api/terminals/[id]/paste-image/+server.ts +61 -0
- package/src/routes/api/terminals/[id]/resize/+server.ts +60 -0
- package/src/routes/api/webhook/+server.ts +42 -0
- package/src/routes/api/ws-status/+server.ts +23 -0
- package/src/routes/api/ws-ticket/+server.ts +86 -0
- package/src/routes/config/+page.svelte +600 -0
- package/src/routes/project/+page.svelte +274 -0
- package/src/routes/session/[id]/+page.svelte +434 -0
- package/src/routes/terminals/+page.svelte +618 -0
- package/src/routes/terminals/[id]/+page.svelte +968 -0
- package/svelte.config.js +18 -0
- package/tsconfig.json +14 -0
package/src/app.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// See https://svelte.dev/docs/kit/types#app.d.ts
|
|
2
|
+
// for information about these interfaces
|
|
3
|
+
|
|
4
|
+
interface ShooterBridgeScanner {
|
|
5
|
+
scan: () => Promise<string>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ShooterBridge {
|
|
9
|
+
scanner?: ShooterBridgeScanner;
|
|
10
|
+
getConfig?: () => string;
|
|
11
|
+
saveConfig?: (config: string) => void;
|
|
12
|
+
getFcmToken?: () => string;
|
|
13
|
+
getPlatform?: () => string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare global {
|
|
17
|
+
namespace App {
|
|
18
|
+
// interface Error {}
|
|
19
|
+
// interface Locals {}
|
|
20
|
+
// interface PageData {}
|
|
21
|
+
// interface PageState {}
|
|
22
|
+
// interface Platform {}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface Window {
|
|
26
|
+
ShooterBridge?: ShooterBridge;
|
|
27
|
+
handleNativeResponse?: (callbackId: string, response: string) => void;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {};
|
package/src/app.html
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="%sveltekit.assets%/favicon.svg" />
|
|
6
|
+
<link rel="icon" type="image/png" href="%sveltekit.assets%/favicon.png" />
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
8
|
+
<meta name="theme-color" content="#0a0a0a" />
|
|
9
|
+
<link rel="apple-touch-icon" href="%sveltekit.assets%/apple-touch-icon.png" />
|
|
10
|
+
<link rel="manifest" href="%sveltekit.assets%/manifest.webmanifest" />
|
|
11
|
+
<title>Shooter</title>
|
|
12
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
13
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
14
|
+
<link
|
|
15
|
+
href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap"
|
|
16
|
+
rel="stylesheet"
|
|
17
|
+
/>
|
|
18
|
+
%sveltekit.head%
|
|
19
|
+
</head>
|
|
20
|
+
<body data-sveltekit-preload-data="hover">
|
|
21
|
+
<div style="display: contents">%sveltekit.body%</div>
|
|
22
|
+
<script src="%sveltekit.assets%/registerSW.js"></script>
|
|
23
|
+
</body>
|
|
24
|
+
</html>
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { _decodeBoolean, _decodeNumber, _decodeString , decodeBoolean, decodeNumber , decodeString, isJSON } from 'type-decoder';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @type { Error }
|
|
5
|
+
* @description Individual notification error for a specific device
|
|
6
|
+
*/
|
|
7
|
+
export interface Error {
|
|
8
|
+
/**
|
|
9
|
+
* @description Device token that failed to receive notification
|
|
10
|
+
* @type { string }
|
|
11
|
+
* @memberof Error
|
|
12
|
+
*/
|
|
13
|
+
device: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description Error response from APNs
|
|
16
|
+
* @type { ErrorResponse }
|
|
17
|
+
* @memberof Error
|
|
18
|
+
*/
|
|
19
|
+
response: ErrorResponse | null;
|
|
20
|
+
/**
|
|
21
|
+
* @description HTTP status code from APNs
|
|
22
|
+
* @type { number }
|
|
23
|
+
* @memberof Error
|
|
24
|
+
*/
|
|
25
|
+
status: null | number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @type { ErrorData }
|
|
30
|
+
* @description Error details returned from APNs server
|
|
31
|
+
*/
|
|
32
|
+
export interface ErrorData {
|
|
33
|
+
/**
|
|
34
|
+
* @description Specific error reason code from APNs
|
|
35
|
+
* @type { string }
|
|
36
|
+
* @memberof ErrorData
|
|
37
|
+
*/
|
|
38
|
+
reason: null | string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @type { ErrorResponse }
|
|
44
|
+
* @description Full error response from APNs
|
|
45
|
+
*/
|
|
46
|
+
export interface ErrorResponse {
|
|
47
|
+
/**
|
|
48
|
+
* @description Specific error reason code from APNs
|
|
49
|
+
* @type { string }
|
|
50
|
+
* @memberof ErrorResponse
|
|
51
|
+
*/
|
|
52
|
+
reason: null | string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @type { LibraryFailedItem }
|
|
57
|
+
* @description Individual failed notification item from apn library
|
|
58
|
+
*/
|
|
59
|
+
export interface LibraryFailedItem {
|
|
60
|
+
/**
|
|
61
|
+
* @description Device token that failed
|
|
62
|
+
* @type { string }
|
|
63
|
+
* @memberof LibraryFailedItem
|
|
64
|
+
*/
|
|
65
|
+
device: string;
|
|
66
|
+
/**
|
|
67
|
+
* @description Error response from APNs
|
|
68
|
+
* @type { ErrorResponse }
|
|
69
|
+
* @memberof LibraryFailedItem
|
|
70
|
+
*/
|
|
71
|
+
response: ErrorResponse | null;
|
|
72
|
+
/**
|
|
73
|
+
* @description HTTP status code
|
|
74
|
+
* @type { number }
|
|
75
|
+
* @memberof LibraryFailedItem
|
|
76
|
+
*/
|
|
77
|
+
status: null | number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @type { LibrarySentItem }
|
|
83
|
+
* @description Individual sent notification item from apn library
|
|
84
|
+
*/
|
|
85
|
+
export interface LibrarySentItem {
|
|
86
|
+
/**
|
|
87
|
+
* @description Device token that received notification
|
|
88
|
+
* @type { string }
|
|
89
|
+
* @memberof LibrarySentItem
|
|
90
|
+
*/
|
|
91
|
+
device: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @type { RawResponse }
|
|
96
|
+
* @description Raw HTTP response from APNs server
|
|
97
|
+
*/
|
|
98
|
+
export interface RawResponse {
|
|
99
|
+
/**
|
|
100
|
+
* @description Unique identifier for this notification from APNs
|
|
101
|
+
* @type { string }
|
|
102
|
+
* @memberof RawResponse
|
|
103
|
+
*/
|
|
104
|
+
apnsId: null | string;
|
|
105
|
+
/**
|
|
106
|
+
* @description Response body data (nullable - null on success)
|
|
107
|
+
* @type { ErrorData }
|
|
108
|
+
* @memberof RawResponse
|
|
109
|
+
*/
|
|
110
|
+
data: ErrorData | null;
|
|
111
|
+
/**
|
|
112
|
+
* @description HTTP response headers from APNs
|
|
113
|
+
* @type { RawResponseHeaders }
|
|
114
|
+
* @memberof RawResponse
|
|
115
|
+
*/
|
|
116
|
+
headers: RawResponseHeaders;
|
|
117
|
+
/**
|
|
118
|
+
* @description HTTP status code from APNs
|
|
119
|
+
* @type { number }
|
|
120
|
+
* @memberof RawResponse
|
|
121
|
+
*/
|
|
122
|
+
statusCode: number;
|
|
123
|
+
/**
|
|
124
|
+
* @description Whether the notification was successfully sent
|
|
125
|
+
* @type { boolean }
|
|
126
|
+
* @memberof RawResponse
|
|
127
|
+
*/
|
|
128
|
+
success: boolean;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @type { RawResponseHeaders }
|
|
133
|
+
* @description HTTP response headers from APNs
|
|
134
|
+
*/
|
|
135
|
+
export type RawResponseHeaders = Record<string, unknown>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @type { SentDetail }
|
|
139
|
+
* @description Details about a successfully sent notification
|
|
140
|
+
*/
|
|
141
|
+
export interface SentDetail {
|
|
142
|
+
/**
|
|
143
|
+
* @description Unique APNs identifier for the notification
|
|
144
|
+
* @type { string }
|
|
145
|
+
* @memberof SentDetail
|
|
146
|
+
*/
|
|
147
|
+
'apns-unique-id': null | string;
|
|
148
|
+
/**
|
|
149
|
+
* @description Device token that received the notification
|
|
150
|
+
* @type { string }
|
|
151
|
+
* @memberof SentDetail
|
|
152
|
+
*/
|
|
153
|
+
device: null | string;
|
|
154
|
+
/**
|
|
155
|
+
* @description Delivery status
|
|
156
|
+
* @type { string }
|
|
157
|
+
* @memberof SentDetail
|
|
158
|
+
*/
|
|
159
|
+
status: null | string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
export function decodeError(rawInput: unknown): Error | null {
|
|
164
|
+
if (isJSON(rawInput)) {
|
|
165
|
+
const decodedDevice = decodeString(rawInput.device);
|
|
166
|
+
const decodedResponse = decodeErrorResponse(rawInput.response);
|
|
167
|
+
const decodedStatus = decodeNumber(rawInput.status);
|
|
168
|
+
|
|
169
|
+
if (
|
|
170
|
+
decodedDevice === null
|
|
171
|
+
) {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return {
|
|
176
|
+
device: decodedDevice,
|
|
177
|
+
response: decodedResponse,
|
|
178
|
+
status: decodedStatus
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export function decodeErrorData(rawInput: unknown): ErrorData | null {
|
|
185
|
+
if (isJSON(rawInput)) {
|
|
186
|
+
const decodedReason = decodeString(rawInput.reason);
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
return {
|
|
190
|
+
reason: decodedReason
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
export function decodeErrorResponse(rawInput: unknown): ErrorResponse | null {
|
|
198
|
+
if (isJSON(rawInput)) {
|
|
199
|
+
const decodedReason = decodeString(rawInput.reason);
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
return {
|
|
203
|
+
reason: decodedReason
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function decodeLibraryFailedItem(rawInput: unknown): LibraryFailedItem | null {
|
|
210
|
+
if (isJSON(rawInput)) {
|
|
211
|
+
const decodedDevice = decodeString(rawInput.device);
|
|
212
|
+
const decodedResponse = decodeErrorResponse(rawInput.response);
|
|
213
|
+
const decodedStatus = decodeNumber(rawInput.status);
|
|
214
|
+
|
|
215
|
+
if (
|
|
216
|
+
decodedDevice === null
|
|
217
|
+
) {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return {
|
|
222
|
+
device: decodedDevice,
|
|
223
|
+
response: decodedResponse,
|
|
224
|
+
status: decodedStatus
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
export function decodeLibrarySentItem(rawInput: unknown): LibrarySentItem | null {
|
|
232
|
+
if (isJSON(rawInput)) {
|
|
233
|
+
const decodedDevice = decodeString(rawInput.device);
|
|
234
|
+
|
|
235
|
+
if (
|
|
236
|
+
decodedDevice === null
|
|
237
|
+
) {
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return {
|
|
242
|
+
device: decodedDevice
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export function decodeRawResponse(rawInput: unknown): null | RawResponse {
|
|
249
|
+
if (isJSON(rawInput)) {
|
|
250
|
+
const decodedStatusCode = decodeNumber(rawInput.statusCode);
|
|
251
|
+
const decodedHeaders = decodeRawResponseHeaders(rawInput.headers);
|
|
252
|
+
const decodedData = decodeErrorData(rawInput.data);
|
|
253
|
+
const decodedSuccess = decodeBoolean(rawInput.success);
|
|
254
|
+
const decodedApnsId = decodeString(rawInput.apnsId);
|
|
255
|
+
|
|
256
|
+
if (
|
|
257
|
+
decodedStatusCode === null ||
|
|
258
|
+
decodedHeaders === null ||
|
|
259
|
+
decodedSuccess === null
|
|
260
|
+
) {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return {
|
|
265
|
+
apnsId: decodedApnsId,
|
|
266
|
+
data: decodedData,
|
|
267
|
+
headers: decodedHeaders,
|
|
268
|
+
statusCode: decodedStatusCode,
|
|
269
|
+
success: decodedSuccess
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
export function decodeRawResponseHeaders(rawInput: unknown): null | RawResponseHeaders {
|
|
277
|
+
if (isJSON(rawInput)) {
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
return {
|
|
281
|
+
...rawInput,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
return null;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export function decodeSentDetail(rawInput: unknown): null | SentDetail {
|
|
288
|
+
if (isJSON(rawInput)) {
|
|
289
|
+
const decodedDevice = decodeString(rawInput.device);
|
|
290
|
+
const decodedStatus = decodeString(rawInput.status);
|
|
291
|
+
const decodedApnsUniqueId = decodeString(rawInput['apns-unique-id']);
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
return {
|
|
295
|
+
'apns-unique-id': decodedApnsUniqueId,
|
|
296
|
+
device: decodedDevice,
|
|
297
|
+
status: decodedStatus
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { _decodeBoolean, _decodeNumber, decodeBoolean , decodeNumber, isJSON } from 'type-decoder';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @type { Options }
|
|
5
|
+
* @description Configuration options for CLI command execution
|
|
6
|
+
*/
|
|
7
|
+
export interface Options {
|
|
8
|
+
/**
|
|
9
|
+
* @description Simulate execution without making changes
|
|
10
|
+
* @type { boolean }
|
|
11
|
+
* @memberof Options
|
|
12
|
+
*/
|
|
13
|
+
dryRun: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @description Command timeout in milliseconds
|
|
16
|
+
* @type { number }
|
|
17
|
+
* @memberof Options
|
|
18
|
+
*/
|
|
19
|
+
timeout: null | number;
|
|
20
|
+
/**
|
|
21
|
+
* @description Enable verbose output logging
|
|
22
|
+
* @type { boolean }
|
|
23
|
+
* @memberof Options
|
|
24
|
+
*/
|
|
25
|
+
verbose: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function decodeOptions(rawInput: unknown): null | Options {
|
|
29
|
+
if (isJSON(rawInput)) {
|
|
30
|
+
const decodedVerbose = decodeBoolean(rawInput.verbose);
|
|
31
|
+
const decodedDryRun = decodeBoolean(rawInput.dryRun);
|
|
32
|
+
const decodedTimeout = decodeNumber(rawInput.timeout);
|
|
33
|
+
|
|
34
|
+
if (
|
|
35
|
+
decodedVerbose === null ||
|
|
36
|
+
decodedDryRun === null
|
|
37
|
+
) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
dryRun: decodedDryRun,
|
|
43
|
+
timeout: decodedTimeout,
|
|
44
|
+
verbose: decodedVerbose
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { _decodeNumber, _decodeString, decodeNumber , decodeString, isJSON } from 'type-decoder';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @type { Header }
|
|
5
|
+
* @description JWT header for APNs authentication token
|
|
6
|
+
*/
|
|
7
|
+
export interface Header {
|
|
8
|
+
/**
|
|
9
|
+
* @description Algorithm used for signing (ES256 for APNs)
|
|
10
|
+
* @type { string }
|
|
11
|
+
* @memberof Header
|
|
12
|
+
*/
|
|
13
|
+
alg: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description Key ID from Apple Developer account
|
|
16
|
+
* @type { string }
|
|
17
|
+
* @memberof Header
|
|
18
|
+
*/
|
|
19
|
+
kid: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @type { Payload }
|
|
24
|
+
* @description JWT payload containing token claims
|
|
25
|
+
*/
|
|
26
|
+
export interface Payload {
|
|
27
|
+
/**
|
|
28
|
+
* @description Expiration time (Unix timestamp, optional)
|
|
29
|
+
* @type { number }
|
|
30
|
+
* @memberof Payload
|
|
31
|
+
*/
|
|
32
|
+
exp: null | number;
|
|
33
|
+
/**
|
|
34
|
+
* @description Issued at time (Unix timestamp)
|
|
35
|
+
* @type { number }
|
|
36
|
+
* @memberof Payload
|
|
37
|
+
*/
|
|
38
|
+
iat: number;
|
|
39
|
+
/**
|
|
40
|
+
* @description Issuer - your Apple Team ID
|
|
41
|
+
* @type { string }
|
|
42
|
+
* @memberof Payload
|
|
43
|
+
*/
|
|
44
|
+
iss: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export function decodeHeader(rawInput: unknown): Header | null {
|
|
49
|
+
if (isJSON(rawInput)) {
|
|
50
|
+
const decodedAlg = decodeString(rawInput.alg);
|
|
51
|
+
const decodedKid = decodeString(rawInput.kid);
|
|
52
|
+
|
|
53
|
+
if (
|
|
54
|
+
decodedAlg === null ||
|
|
55
|
+
decodedKid === null
|
|
56
|
+
) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
alg: decodedAlg,
|
|
62
|
+
kid: decodedKid
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function decodePayload(rawInput: unknown): null | Payload {
|
|
69
|
+
if (isJSON(rawInput)) {
|
|
70
|
+
const decodedIss = decodeString(rawInput.iss);
|
|
71
|
+
const decodedIat = decodeNumber(rawInput.iat);
|
|
72
|
+
const decodedExp = decodeNumber(rawInput.exp);
|
|
73
|
+
|
|
74
|
+
if (
|
|
75
|
+
decodedIss === null ||
|
|
76
|
+
decodedIat === null
|
|
77
|
+
) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
exp: decodedExp,
|
|
83
|
+
iat: decodedIat,
|
|
84
|
+
iss: decodedIss
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|