@adonis-agora/media 0.30.0 → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +4 -5
- package/dist/assets/spa/assets/index-DOnygWEb.js +12 -0
- package/dist/assets/spa/assets/index-DOnygWEb.js.map +1 -0
- package/dist/assets/spa/assets/index-XkvYeRIj.css +2 -0
- package/dist/assets/spa/index.html +2 -2
- package/dist/configure.d.ts +1 -2
- package/dist/configure.d.ts.map +1 -1
- package/dist/configure.js +1 -2
- package/dist/configure.js.map +1 -1
- package/dist/providers/dashboard_provider.d.ts +1 -2
- package/dist/providers/dashboard_provider.d.ts.map +1 -1
- package/dist/providers/dashboard_provider.js +63 -220
- package/dist/providers/dashboard_provider.js.map +1 -1
- package/dist/src/dashboard/access_denied_page.d.ts +5 -7
- package/dist/src/dashboard/access_denied_page.d.ts.map +1 -1
- package/dist/src/dashboard/access_denied_page.js +2 -6
- package/dist/src/dashboard/access_denied_page.js.map +1 -1
- package/dist/src/dashboard/console_authorize.d.ts +75 -0
- package/dist/src/dashboard/console_authorize.d.ts.map +1 -0
- package/dist/src/dashboard/console_authorize.js +97 -0
- package/dist/src/dashboard/console_authorize.js.map +1 -0
- package/dist/src/dashboard/define_config.d.ts +20 -55
- package/dist/src/dashboard/define_config.d.ts.map +1 -1
- package/dist/src/dashboard/define_config.js.map +1 -1
- package/dist/src/dashboard/index.d.ts +4 -4
- package/dist/src/dashboard/index.d.ts.map +1 -1
- package/dist/src/dashboard/index.js +1 -2
- package/dist/src/dashboard/index.js.map +1 -1
- package/dist/src/dashboard/service.d.ts +7 -0
- package/dist/src/dashboard/service.d.ts.map +1 -1
- package/dist/src/dashboard/service.js +31 -5
- package/dist/src/dashboard/service.js.map +1 -1
- package/dist/src/dashboard/spa.d.ts +4 -9
- package/dist/src/dashboard/spa.d.ts.map +1 -1
- package/dist/src/dashboard/spa.js +4 -9
- package/dist/src/dashboard/spa.js.map +1 -1
- package/dist/src/dashboard/types.d.ts +0 -17
- package/dist/src/dashboard/types.d.ts.map +1 -1
- package/dist/src/stores/lucid-schema.d.ts.map +1 -1
- package/dist/src/stores/lucid-schema.js +11 -0
- package/dist/src/stores/lucid-schema.js.map +1 -1
- package/dist/stubs/config/media_dashboard.stub +8 -20
- package/package.json +10 -10
- package/dist/assets/spa/assets/index-B48tE8sr.js +0 -12
- package/dist/assets/spa/assets/index-B48tE8sr.js.map +0 -1
- package/dist/assets/spa/assets/index-CjblUKFX.css +0 -2
- package/dist/src/dashboard/auth.d.ts +0 -76
- package/dist/src/dashboard/auth.d.ts.map +0 -1
- package/dist/src/dashboard/auth.js +0 -134
- package/dist/src/dashboard/auth.js.map +0 -1
- package/dist/src/dashboard/cookie.d.ts +0 -20
- package/dist/src/dashboard/cookie.d.ts.map +0 -1
- package/dist/src/dashboard/cookie.js +0 -44
- package/dist/src/dashboard/cookie.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.4 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-gray-200:oklch(92.8% .006 264.531);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-xl:36rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--blur-xs:4px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentcolor)}::file-selector-button{border-color:var(--color-gray-200,currentcolor)}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.top-0{top:0}.top-1\/2{top:50%}.right-4{right:calc(var(--spacing) * 4)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-1\/2{left:50%}.z-10{z-index:10}.z-50{z-index:50}.z-60{z-index:60}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-px{margin-top:1px}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-14{height:calc(var(--spacing) * 14)}.h-\[86vh\]{height:86vh}.h-fit{height:fit-content}.h-full{height:100%}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-\[calc\(100vh-3rem\)\]{max-height:calc(100vh - 3rem)}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-\[320px\]{min-height:320px}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-14{width:calc(var(--spacing) * 14)}.w-28{width:calc(var(--spacing) * 28)}.w-80{width:calc(var(--spacing) * 80)}.w-full{width:100%}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-20{min-width:calc(var(--spacing) * 20)}.min-w-56{min-width:calc(var(--spacing) * 56)}.min-w-\[150px\]{min-width:150px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[110px_1fr\]{grid-template-columns:110px 1fr}.grid-cols-\[120px_1fr\]{grid-template-columns:120px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line-soft>:not(:last-child)){border-color:var(--line-soft)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent\/30{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\/30{border-color:color-mix(in oklab, var(--accent) 30%, transparent)}}.border-accent\/40{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\/40{border-color:color-mix(in oklab, var(--accent) 40%, transparent)}}.border-accent\/50{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\/50{border-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.border-accent\/60{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\/60{border-color:color-mix(in oklab, var(--accent) 60%, transparent)}}.border-bad\/30{border-color:var(--bad)}@supports (color:color-mix(in lab, red, red)){.border-bad\/30{border-color:color-mix(in oklab, var(--bad) 30%, transparent)}}.border-bad\/40{border-color:var(--bad)}@supports (color:color-mix(in lab, red, red)){.border-bad\/40{border-color:color-mix(in oklab, var(--bad) 40%, transparent)}}.border-border{border-color:var(--line)}.border-transparent{border-color:#0000}.border-warn\/30{border-color:var(--warn)}@supports (color:color-mix(in lab, red, red)){.border-warn\/30{border-color:color-mix(in oklab, var(--warn) 30%, transparent)}}.border-zinc-600{border-color:var(--color-zinc-600)}.bg-accent\/5{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\/5{background-color:color-mix(in oklab, var(--accent) 5%, transparent)}}.bg-accent\/10{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\/10{background-color:color-mix(in oklab, var(--accent) 10%, transparent)}}.bg-accent\/15{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\/15{background-color:color-mix(in oklab, var(--accent) 15%, transparent)}}.bg-accent\/80{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\/80{background-color:color-mix(in oklab, var(--accent) 80%, transparent)}}.bg-bad\/10{background-color:var(--bad)}@supports (color:color-mix(in lab, red, red)){.bg-bad\/10{background-color:color-mix(in oklab, var(--bad) 10%, transparent)}}.bg-bad\/15{background-color:var(--bad)}@supports (color:color-mix(in lab, red, red)){.bg-bad\/15{background-color:color-mix(in oklab, var(--bad) 15%, transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab, red, red)){.bg-black\/20{background-color:color-mix(in oklab, var(--color-black) 20%, transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.bg-black\/80{background-color:color-mix(in oklab, var(--color-black) 80%, transparent)}}.bg-panel{background-color:var(--panel)}.bg-panel-2{background-color:var(--panel-2)}.bg-transparent{background-color:#0000}.bg-warn\/10{background-color:var(--warn)}@supports (color:color-mix(in lab, red, red)){.bg-warn\/10{background-color:color-mix(in oklab, var(--warn) 10%, transparent)}}.bg-white{background-color:var(--color-white)}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\/40{background-color:#27272a66}@supports (color:color-mix(in lab, red, red)){.bg-zinc-800\/40{background-color:color-mix(in oklab, var(--color-zinc-800) 40%, transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.object-contain{object-fit:contain}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.pr-1\.5{padding-right:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.align-top{vertical-align:top}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.wrap-break-word{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent,.text-accent\/80{color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.text-accent\/80{color:color-mix(in oklab, var(--accent) 80%, transparent)}}.text-bad{color:var(--bad)}.text-foreground{color:var(--text)}.text-sky-400{color:var(--color-sky-400)}.text-warn{color:var(--warn)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-700{color:var(--color-zinc-700)}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.opacity-60{opacity:.6}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent\/50{--tw-ring-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.ring-accent\/50{--tw-ring-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ring-inset{--tw-ring-inset:inset}.placeholder\:text-zinc-600::placeholder{color:var(--color-zinc-600)}.placeholder\:text-zinc-700::placeholder{color:var(--color-zinc-700)}@media (hover:hover){.hover\:bg-accent\/20:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/20:hover{background-color:color-mix(in oklab, var(--accent) 20%, transparent)}}.hover\:bg-bad\/20:hover{background-color:var(--bad)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-bad\/20:hover{background-color:color-mix(in oklab, var(--bad) 20%, transparent)}}.hover\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\:bg-zinc-800\/60:hover{background-color:#27272a99}@supports (color:color-mix(in lab, red, red)){.hover\:bg-zinc-800\/60:hover{background-color:color-mix(in oklab, var(--color-zinc-800) 60%, transparent)}}.hover\:bg-zinc-900\/40:hover{background-color:#18181b66}@supports (color:color-mix(in lab, red, red)){.hover\:bg-zinc-900\/40:hover{background-color:color-mix(in oklab, var(--color-zinc-900) 40%, transparent)}}.hover\:bg-zinc-900\/50:hover{background-color:#18181b80}@supports (color:color-mix(in lab, red, red)){.hover\:bg-zinc-900\/50:hover{background-color:color-mix(in oklab, var(--color-zinc-900) 50%, transparent)}}.hover\:text-accent:hover{color:var(--accent)}.hover\:text-bad:hover{color:var(--bad)}.hover\:text-sky-300:hover{color:var(--color-sky-300)}.hover\:text-zinc-100:hover{color:var(--color-zinc-100)}.hover\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\:opacity-100:hover{opacity:1}}.focus\:border-accent\/40:focus{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.focus\:border-accent\/40:focus{border-color:color-mix(in oklab, var(--accent) 40%, transparent)}}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ring\/40:focus-visible{--tw-ring-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--accent) 40%, transparent)}}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-40:disabled{opacity:.4}@media (width>=48rem){.md\:grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}}}:root{--bg:#09090b;--panel:#0c0c0f;--panel-2:#101017;--line:#1c1c22;--line-soft:#16161a;--text:#e7e7ea;--muted:#76767f;--good:#34d399;--warn:#fbbf24;--bad:#f87171;--accent:#22d3ee}*{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;margin:0;font-family:Space Grotesk,ui-sans-serif,system-ui,sans-serif}.app-bg{z-index:0;pointer-events:none;background-image:radial-gradient(900px 400px at 78% -8%, var(--accent), transparent 70%), linear-gradient(to right, var(--line-soft) 1px, transparent 1px), linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);position:fixed;inset:0}@supports (color:color-mix(in lab, red, red)){.app-bg{background-image:radial-gradient(900px 400px at 78% -8%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%), linear-gradient(to right, var(--line-soft) 1px, transparent 1px), linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px)}}.app-bg{opacity:.5;background-size:100% 100%,44px 44px,44px 44px;-webkit-mask-image:linear-gradient(#000,#000 60%,#0000);mask-image:linear-gradient(#000,#000 60%,#0000)}.mono{font-family:JetBrains Mono,ui-monospace,monospace}.tnum{font-variant-numeric:tabular-nums}.s-ok{color:var(--good)}.s-live{color:#60a5fa}.s-warn{color:var(--warn)}.s-error{color:var(--bad)}.s-info{color:#a78bfa}.s-idle{color:#71717a}.dot{background:currentColor;border-radius:999px;width:7px;height:7px;box-shadow:0 0 0 3px}@supports (color:color-mix(in lab, red, red)){.dot{box-shadow:0 0 0 3px color-mix(in srgb, currentColor 18%, transparent)}}.pulse{animation:1.6s ease-in-out infinite pulse}@keyframes pulse{50%{opacity:.5}}@keyframes rise{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.rise{animation:.32s cubic-bezier(.2,.7,.2,1) both rise}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{border:3px solid var(--bg);background:#26262c;border-radius:999px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/** The validated console session decoded from a verified cookie. */
|
|
2
|
-
export interface ConsoleSession {
|
|
3
|
-
/** Stable user id (the session user's `id`). */
|
|
4
|
-
sub: string;
|
|
5
|
-
/** Optional display name. */
|
|
6
|
-
name?: string;
|
|
7
|
-
/** Free-form role strings; the console does not interpret them. */
|
|
8
|
-
roles: string[];
|
|
9
|
-
/** Issued-at, epoch milliseconds. */
|
|
10
|
-
iat: number;
|
|
11
|
-
/** Expiry, epoch milliseconds. */
|
|
12
|
-
exp: number;
|
|
13
|
-
}
|
|
14
|
-
/** The session user a host `login`/`session` hook returns to mint a cookie. */
|
|
15
|
-
export interface ConsoleSessionUser {
|
|
16
|
-
id: string;
|
|
17
|
-
name?: string;
|
|
18
|
-
roles?: string[];
|
|
19
|
-
}
|
|
20
|
-
export interface SignOptions {
|
|
21
|
-
secret: string;
|
|
22
|
-
ttlMs: number;
|
|
23
|
-
/** Injectable clock (epoch ms) for deterministic tests. Defaults to `Date.now()`. */
|
|
24
|
-
now?: number;
|
|
25
|
-
}
|
|
26
|
-
export interface VerifyOptions {
|
|
27
|
-
secret: string;
|
|
28
|
-
now?: number;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Sign a session into the cookie value `base64url(payload).base64url(hmac)`. Stateless
|
|
32
|
-
* HMAC-SHA256, no store — `node:crypto` only, no JWT dependency.
|
|
33
|
-
*/
|
|
34
|
-
export declare function signSessionCookie(user: ConsoleSessionUser, options: SignOptions): string;
|
|
35
|
-
/**
|
|
36
|
-
* Verify a cookie value and return the session, or `null` for anything tampered, malformed, or
|
|
37
|
-
* expired (past `exp` + a 30s grace). Constant-time signature comparison. NEVER throws — any parse
|
|
38
|
-
* failure yields `null`.
|
|
39
|
-
*/
|
|
40
|
-
export declare function verifySessionCookie(value: string, options: VerifyOptions): ConsoleSession | null;
|
|
41
|
-
/** Host hook for Mode A — validates the host's own auth on the raw AdonisJS request. */
|
|
42
|
-
export type SessionHook = (request: unknown) => Promise<ConsoleSessionUser | null> | ConsoleSessionUser | null;
|
|
43
|
-
/** Host hook for Mode B — validates submitted credentials from the built-in login screen. */
|
|
44
|
-
export type LoginHook = (username: string, password: string) => Promise<ConsoleSessionUser | null> | ConsoleSessionUser | null;
|
|
45
|
-
/** Re-checks a LIVE session when the cookie is slid forward. Return `false` to revoke. */
|
|
46
|
-
export type RevalidateHook = (session: ConsoleSessionUser) => Promise<boolean> | boolean;
|
|
47
|
-
export type AuthMode = 'session' | 'login';
|
|
48
|
-
/** Author-facing `auth` option on `config/media_dashboard.ts`. Mirrors the NestJS console's shape. */
|
|
49
|
-
export interface ConsoleAuthOptions {
|
|
50
|
-
/** REQUIRED HMAC-SHA256 signing key. Missing/empty => boot error (fail closed). */
|
|
51
|
-
secret: string;
|
|
52
|
-
/** Cookie TTL as a duration string (`'8h'`, `'30m'`, `'7d'`). Default `'8h'`. */
|
|
53
|
-
ttl?: string;
|
|
54
|
-
/** Mode A: validate the host's own auth on the raw request. */
|
|
55
|
-
session?: SessionHook;
|
|
56
|
-
/** Mode B: validate credentials from the built-in login screen. */
|
|
57
|
-
login?: LoginHook;
|
|
58
|
-
/** Re-checks the session on sliding renewal. Not a mode — it cannot mint a session on its own. */
|
|
59
|
-
revalidate?: RevalidateHook;
|
|
60
|
-
}
|
|
61
|
-
/** Resolved, validated console-auth config shared by the guard and the auth routes. */
|
|
62
|
-
export interface ResolvedConsoleAuth {
|
|
63
|
-
secret: string;
|
|
64
|
-
ttlMs: number;
|
|
65
|
-
modes: AuthMode[];
|
|
66
|
-
session?: SessionHook;
|
|
67
|
-
login?: LoginHook;
|
|
68
|
-
revalidate?: RevalidateHook;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Validate + resolve the `auth` option. Returns `null` when unconfigured (the console stays open —
|
|
72
|
-
* front it with your own `middleware`). Throws at boot (fail closed) when configured but missing a
|
|
73
|
-
* secret or any hook — the host learns immediately rather than shipping an un-mintable gate.
|
|
74
|
-
*/
|
|
75
|
-
export declare function resolveConsoleAuth(options: ConsoleAuthOptions | undefined): ResolvedConsoleAuth | null;
|
|
76
|
-
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/dashboard/auth.ts"],"names":[],"mappings":"AAcA,oEAAoE;AACpE,MAAM,WAAW,cAAc;IAC7B,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IAC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AAO,CAAC;AAE3C,sGAAsG;AACtG,MAAM,WAAW,kBAAkB;IACjC,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,mEAAmE;IACnE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kGAAkG;IAClG,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,uFAAuF;AACvF,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B;AAoBD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,kBAAkB,GAAG,SAAS,GACtC,mBAAmB,GAAG,IAAI,CAmB5B"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { createHmac, timingSafeEqual } from 'node:crypto';
|
|
2
|
-
/**
|
|
3
|
-
* Built-in session-cookie login for the dashboard, ported from the NestJS sibling console
|
|
4
|
-
* (`@dudousxd/nestjs-media-dashboard`'s `server/auth/*`) so both ecosystems gate the console the
|
|
5
|
-
* same way. Framework-free by design (no AdonisJS import here) — the provider is the only piece
|
|
6
|
-
* that knows about `HttpContext`/cookies; this module only signs and verifies a stateless
|
|
7
|
-
* HMAC-SHA256 session, exactly as the NestJS version does (same wire format, same TTL/grace rules),
|
|
8
|
-
* so a host running both consoles can share one mental model of "how the console gate works".
|
|
9
|
-
*/
|
|
10
|
-
/** Clock-skew grace applied to `exp` so a marginally-late clock doesn't bounce a valid cookie. */
|
|
11
|
-
const EXP_GRACE_MS = 30_000;
|
|
12
|
-
function base64urlEncode(value) {
|
|
13
|
-
return Buffer.from(value, 'utf8').toString('base64url');
|
|
14
|
-
}
|
|
15
|
-
function base64urlDecode(value) {
|
|
16
|
-
return Buffer.from(value, 'base64url').toString('utf8');
|
|
17
|
-
}
|
|
18
|
-
function hmac(secret, payload) {
|
|
19
|
-
return createHmac('sha256', secret).update(payload).digest('base64url');
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Sign a session into the cookie value `base64url(payload).base64url(hmac)`. Stateless
|
|
23
|
-
* HMAC-SHA256, no store — `node:crypto` only, no JWT dependency.
|
|
24
|
-
*/
|
|
25
|
-
export function signSessionCookie(user, options) {
|
|
26
|
-
const issuedAt = options.now ?? Date.now();
|
|
27
|
-
const session = {
|
|
28
|
-
sub: user.id,
|
|
29
|
-
...(user.name !== undefined ? { name: user.name } : {}),
|
|
30
|
-
roles: user.roles ?? [],
|
|
31
|
-
iat: issuedAt,
|
|
32
|
-
exp: issuedAt + options.ttlMs,
|
|
33
|
-
};
|
|
34
|
-
const encodedPayload = base64urlEncode(JSON.stringify(session));
|
|
35
|
-
return `${encodedPayload}.${hmac(options.secret, encodedPayload)}`;
|
|
36
|
-
}
|
|
37
|
-
/** Type guard for the decoded payload shape — defends against tampered/legacy payloads. */
|
|
38
|
-
function isSessionPayload(value) {
|
|
39
|
-
if (typeof value !== 'object' || value === null)
|
|
40
|
-
return false;
|
|
41
|
-
const record = value;
|
|
42
|
-
if (typeof record.sub !== 'string')
|
|
43
|
-
return false;
|
|
44
|
-
if (record.name !== undefined && typeof record.name !== 'string')
|
|
45
|
-
return false;
|
|
46
|
-
if (!Array.isArray(record.roles))
|
|
47
|
-
return false;
|
|
48
|
-
if (!record.roles.every((role) => typeof role === 'string'))
|
|
49
|
-
return false;
|
|
50
|
-
if (typeof record.iat !== 'number' || !Number.isFinite(record.iat))
|
|
51
|
-
return false;
|
|
52
|
-
if (typeof record.exp !== 'number' || !Number.isFinite(record.exp))
|
|
53
|
-
return false;
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Verify a cookie value and return the session, or `null` for anything tampered, malformed, or
|
|
58
|
-
* expired (past `exp` + a 30s grace). Constant-time signature comparison. NEVER throws — any parse
|
|
59
|
-
* failure yields `null`.
|
|
60
|
-
*/
|
|
61
|
-
export function verifySessionCookie(value, options) {
|
|
62
|
-
try {
|
|
63
|
-
const dot = value.indexOf('.');
|
|
64
|
-
if (dot <= 0 || dot === value.length - 1)
|
|
65
|
-
return null;
|
|
66
|
-
const encodedPayload = value.slice(0, dot);
|
|
67
|
-
const provided = Buffer.from(value.slice(dot + 1), 'base64url');
|
|
68
|
-
const expected = Buffer.from(hmac(options.secret, encodedPayload), 'base64url');
|
|
69
|
-
// timingSafeEqual throws on a length mismatch — guard it so a wrong-length (tampered)
|
|
70
|
-
// signature returns null instead of throwing.
|
|
71
|
-
if (provided.length !== expected.length)
|
|
72
|
-
return null;
|
|
73
|
-
if (!timingSafeEqual(provided, expected))
|
|
74
|
-
return null;
|
|
75
|
-
const decoded = JSON.parse(base64urlDecode(encodedPayload));
|
|
76
|
-
if (!isSessionPayload(decoded))
|
|
77
|
-
return null;
|
|
78
|
-
const now = options.now ?? Date.now();
|
|
79
|
-
if (now > decoded.exp + EXP_GRACE_MS)
|
|
80
|
-
return null;
|
|
81
|
-
return decoded;
|
|
82
|
-
}
|
|
83
|
-
catch {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
const DEFAULT_TTL_MS = 8 * 60 * 60 * 1000;
|
|
88
|
-
const DURATION_UNITS = {
|
|
89
|
-
s: 1000,
|
|
90
|
-
m: 60 * 1000,
|
|
91
|
-
h: 60 * 60 * 1000,
|
|
92
|
-
d: 24 * 60 * 60 * 1000,
|
|
93
|
-
};
|
|
94
|
-
/** Parse a `'<number><s|m|h|d>'` duration to ms; falls back to the 8h default on a bad value. */
|
|
95
|
-
function durationToMs(ttl) {
|
|
96
|
-
if (ttl === undefined)
|
|
97
|
-
return DEFAULT_TTL_MS;
|
|
98
|
-
const match = /^(\d+)([smhd])$/.exec(ttl.trim());
|
|
99
|
-
if (!match)
|
|
100
|
-
return DEFAULT_TTL_MS;
|
|
101
|
-
const unit = DURATION_UNITS[match[2] ?? ''];
|
|
102
|
-
if (unit === undefined)
|
|
103
|
-
return DEFAULT_TTL_MS;
|
|
104
|
-
return Number(match[1]) * unit;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Validate + resolve the `auth` option. Returns `null` when unconfigured (the console stays open —
|
|
108
|
-
* front it with your own `middleware`). Throws at boot (fail closed) when configured but missing a
|
|
109
|
-
* secret or any hook — the host learns immediately rather than shipping an un-mintable gate.
|
|
110
|
-
*/
|
|
111
|
-
export function resolveConsoleAuth(options) {
|
|
112
|
-
if (!options)
|
|
113
|
-
return null;
|
|
114
|
-
if (!options.secret) {
|
|
115
|
-
throw new Error('media-dashboard: auth.secret is required when `auth` is configured.');
|
|
116
|
-
}
|
|
117
|
-
const modes = [];
|
|
118
|
-
if (options.session)
|
|
119
|
-
modes.push('session');
|
|
120
|
-
if (options.login)
|
|
121
|
-
modes.push('login');
|
|
122
|
-
if (modes.length === 0) {
|
|
123
|
-
throw new Error('media-dashboard: auth needs a `login` and/or `session` hook.');
|
|
124
|
-
}
|
|
125
|
-
return {
|
|
126
|
-
secret: options.secret,
|
|
127
|
-
ttlMs: durationToMs(options.ttl),
|
|
128
|
-
modes,
|
|
129
|
-
...(options.session ? { session: options.session } : {}),
|
|
130
|
-
...(options.login ? { login: options.login } : {}),
|
|
131
|
-
...(options.revalidate ? { revalidate: options.revalidate } : {}),
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/dashboard/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE1D;;;;;;;GAOG;AAE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U,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClE,CAAC;AACJ,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal, framework-free `Cookie`/`Set-Cookie` header codec for the console's session cookie.
|
|
3
|
-
* Deliberately NOT using AdonisJS's own `plainCookie`/`cookie` helpers — this cookie is signed by
|
|
4
|
-
* `./auth.ts` itself (HMAC, matching the NestJS sibling console byte-for-byte), so it needs no
|
|
5
|
-
* further encoding, and writing the header directly keeps `./auth.ts` fully framework-free and
|
|
6
|
-
* trivially unit-testable (same reasoning as the NestJS console's `auth/cookie-header.ts`).
|
|
7
|
-
*/
|
|
8
|
-
export declare const SESSION_COOKIE_NAME = "media_dashboard_session";
|
|
9
|
-
/** Parse a `Cookie` request header into a `{name: value}` map. Malformed pairs are skipped. */
|
|
10
|
-
export declare function parseCookieHeader(header: string | undefined): Record<string, string>;
|
|
11
|
-
export interface SetCookieOptions {
|
|
12
|
-
path: string;
|
|
13
|
-
maxAgeSeconds: number;
|
|
14
|
-
secure: boolean;
|
|
15
|
-
/** When true, serializes an already-expired cookie (clears it) regardless of `maxAgeSeconds`. */
|
|
16
|
-
clear?: boolean;
|
|
17
|
-
}
|
|
18
|
-
/** Serialize one `Set-Cookie` header value: `HttpOnly`, `SameSite=Lax`, and `Secure` over https. */
|
|
19
|
-
export declare function serializeSetCookie(name: string, value: string, options: SetCookieOptions): string;
|
|
20
|
-
//# sourceMappingURL=cookie.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../src/dashboard/cookie.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,mBAAmB,4BAA4B,CAAC;AAE7D,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBpF;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,iGAAiG;IACjG,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,oGAAoG;AACpG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,CASjG"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal, framework-free `Cookie`/`Set-Cookie` header codec for the console's session cookie.
|
|
3
|
-
* Deliberately NOT using AdonisJS's own `plainCookie`/`cookie` helpers — this cookie is signed by
|
|
4
|
-
* `./auth.ts` itself (HMAC, matching the NestJS sibling console byte-for-byte), so it needs no
|
|
5
|
-
* further encoding, and writing the header directly keeps `./auth.ts` fully framework-free and
|
|
6
|
-
* trivially unit-testable (same reasoning as the NestJS console's `auth/cookie-header.ts`).
|
|
7
|
-
*/
|
|
8
|
-
export const SESSION_COOKIE_NAME = 'media_dashboard_session';
|
|
9
|
-
/** Parse a `Cookie` request header into a `{name: value}` map. Malformed pairs are skipped. */
|
|
10
|
-
export function parseCookieHeader(header) {
|
|
11
|
-
const cookies = {};
|
|
12
|
-
if (!header)
|
|
13
|
-
return cookies;
|
|
14
|
-
for (const pair of header.split(';')) {
|
|
15
|
-
const eq = pair.indexOf('=');
|
|
16
|
-
if (eq === -1)
|
|
17
|
-
continue;
|
|
18
|
-
const name = pair.slice(0, eq).trim();
|
|
19
|
-
if (!name)
|
|
20
|
-
continue;
|
|
21
|
-
const value = pair.slice(eq + 1).trim();
|
|
22
|
-
try {
|
|
23
|
-
cookies[name] = decodeURIComponent(value);
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
cookies[name] = value;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return cookies;
|
|
30
|
-
}
|
|
31
|
-
/** Serialize one `Set-Cookie` header value: `HttpOnly`, `SameSite=Lax`, and `Secure` over https. */
|
|
32
|
-
export function serializeSetCookie(name, value, options) {
|
|
33
|
-
const parts = [`${name}=${encodeURIComponent(value)}`];
|
|
34
|
-
parts.push(`Path=${options.path}`);
|
|
35
|
-
parts.push(`Max-Age=${Math.max(0, Math.floor(options.maxAgeSeconds))}`);
|
|
36
|
-
if (options.clear)
|
|
37
|
-
parts.push('Expires=Thu, 01 Jan 1970 00:00:00 GMT');
|
|
38
|
-
parts.push('HttpOnly');
|
|
39
|
-
parts.push('SameSite=Lax');
|
|
40
|
-
if (options.secure)
|
|
41
|
-
parts.push('Secure');
|
|
42
|
-
return parts.join('; ');
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=cookie.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.js","sourceRoot":"","sources":["../../../src/dashboard/cookie.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAE7D,+FAA+F;AAC/F,MAAM,UAAU,iBAAiB,CAAC,MAA0B;IAC1D,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,IAAI,CAAC,MAAM;QAAE,OAAO,OAAO,CAAC;IAC5B,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACrC,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,EAAE,KAAK,CAAC,CAAC;YAAE,SAAS;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACtC,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,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