@adonis-agora/media-dashboard 9.0.0 → 10.0.0-rc.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/CHANGELOG.md +19 -0
- package/README.md +5 -22
- package/dist/index.d.ts +4 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -13
- package/dist/index.js.map +1 -1
- package/dist/spa/assets/index-C-7cKQuV.js +12 -0
- package/dist/spa/assets/index-C-7cKQuV.js.map +1 -0
- package/dist/spa/assets/index-Db6cSeO5.css +2 -0
- package/dist/spa/index.html +2 -2
- package/package.json +14 -25
- package/skills/media-dashboard-console/SKILL.md +3 -29
- package/dist/provider/media_dashboard_provider.d.ts +0 -42
- package/dist/provider/media_dashboard_provider.d.ts.map +0 -1
- package/dist/provider/media_dashboard_provider.js +0 -57
- package/dist/provider/media_dashboard_provider.js.map +0 -1
- package/dist/spa/assets/index-3HWw8Zsr.js +0 -12
- package/dist/spa/assets/index-3HWw8Zsr.js.map +0 -1
- package/dist/spa/assets/index-CrdjxPM5.css +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @adonis-agora/media-dashboard
|
|
2
2
|
|
|
3
|
+
## 10.0.0-rc.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#281](https://github.com/DavideCarvalho/adonis-agora-media/pull/281) [`94f8af1`](https://github.com/DavideCarvalho/adonis-agora-media/commit/94f8af12bb87bf614a8ff0262958dd6120708851) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Remove the standalone console provider. The console ships in `@adonis-agora/media`; register its provider instead.
|
|
8
|
+
|
|
9
|
+
- **Removed:** the `@adonis-agora/media-dashboard/media_dashboard_provider` subpath and the `MediaDashboardProvider` export from `@adonis-agora/media-dashboard`. Replace `() => import('@adonis-agora/media-dashboard/media_dashboard_provider')` with `() => import('@adonis-agora/media/dashboard_provider')` in `adonisrc.ts`. `config/media_dashboard.ts` is unchanged.
|
|
10
|
+
- The package now only exports the console's API types (`.` and `./types`).
|
|
11
|
+
- The console reads its runtime config only from the JSON data block the provider injects; a `window.__MEDIA_DASHBOARD__` global is no longer read.
|
|
12
|
+
- The `@adonis-agora/media` and `@adonisjs/core` peers are removed: the package no longer imports either, so installing it requires neither.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#281](https://github.com/DavideCarvalho/adonis-agora-media/pull/281) [`94f8af1`](https://github.com/DavideCarvalho/adonis-agora-media/commit/94f8af12bb87bf614a8ff0262958dd6120708851) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Console fixes:
|
|
17
|
+
|
|
18
|
+
- The console now sends shield's CSRF token (`x-xsrf-token`, from the `XSRF-TOKEN` cookie) on every POST, including uploads from the Upload tab, so actions work in apps that use `@adonisjs/shield`. A redirected or non-2xx response now shows as an error instead of a silent success.
|
|
19
|
+
- The Uploads tab shows `upload sessions table missing — run the media migration (node ace migration:run)` (HTTP 503) instead of a 500 when the `lucid` upload-session store's tables do not exist.
|
|
20
|
+
- `FolderBody` is exported from `@adonis-agora/media/dashboard` and `@adonis-agora/media-dashboard`.
|
|
21
|
+
|
|
3
22
|
## 9.0.0
|
|
4
23
|
|
|
5
24
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -10,8 +10,7 @@ is reimplemented; the upload UI reuses [`@adonis-agora/media-react`](../react).
|
|
|
10
10
|
|
|
11
11
|
## The console ships embedded in `@adonis-agora/media` — install that instead
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
SPA, and all of its server-side auth/service logic) is bundled straight into
|
|
13
|
+
The console (this React SPA, and all of its server-side auth/service logic) is bundled into
|
|
15
14
|
[`@adonis-agora/media`](../adonis) at build time; `node ace configure @adonis-agora/media` registers
|
|
16
15
|
its `dashboard_provider` for you, with no separate package to add:
|
|
17
16
|
|
|
@@ -37,26 +36,9 @@ See [`@adonis-agora/media`'s Dashboard section](../adonis#dashboard) for the ful
|
|
|
37
36
|
`defineConfig`, `DashboardService`, the session-auth helpers and `ObjectInsightProvider` all live under
|
|
38
37
|
`@adonis-agora/media/dashboard` now.
|
|
39
38
|
|
|
40
|
-
##
|
|
39
|
+
## Configuration
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
works, for hosts that already register it directly, or that prefer keeping the dashboard as an
|
|
44
|
-
explicit, separately-versioned install. Its provider is a thin delegate to the embedded one above (no
|
|
45
|
-
logic of its own), so both entry points stay identical in behavior. **Register only one of the two.**
|
|
46
|
-
|
|
47
|
-
```sh
|
|
48
|
-
pnpm add @adonis-agora/media-dashboard
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
```ts
|
|
52
|
-
providers: [
|
|
53
|
-
() => import('@adonis-agora/media/media_provider'),
|
|
54
|
-
() => import('@adonis-agora/media-dashboard/media_dashboard_provider'),
|
|
55
|
-
]
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
`config/media_dashboard.ts` is read from the SAME config key (`media_dashboard`) regardless of which
|
|
59
|
-
provider you register, authored against `@adonis-agora/media/dashboard`'s `defineConfig` either way:
|
|
41
|
+
`config/media_dashboard.ts`, authored against `@adonis-agora/media/dashboard`'s `defineConfig`:
|
|
60
42
|
|
|
61
43
|
```ts
|
|
62
44
|
import { defineConfig } from '@adonis-agora/media/dashboard'
|
|
@@ -71,7 +53,8 @@ export default defineConfig({
|
|
|
71
53
|
```
|
|
72
54
|
|
|
73
55
|
Mount the SPA under any path without rebuilding — the provider rewrites Vite's asset base and injects
|
|
74
|
-
the runtime
|
|
56
|
+
the runtime config into `index.html` at serve time, as a JSON data block
|
|
57
|
+
(`<script type="application/json" id="media-dashboard-config">`) that a strict CSP does not block.
|
|
75
58
|
|
|
76
59
|
## Routes
|
|
77
60
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@adonis-agora/media-dashboard`'s public surface
|
|
3
|
-
* `DashboardService
|
|
4
|
-
*
|
|
5
|
-
* package's provider (still exported below) is a thin delegate to it. Author `config/media_dashboard.ts`
|
|
6
|
-
* against `@adonis-agora/media/dashboard`'s `defineConfig` regardless of which provider you register;
|
|
7
|
-
* both read the SAME `media_dashboard` config key.
|
|
8
|
-
*
|
|
9
|
-
* What's left here: the standalone provider entry point, and the wire-format API types (kept as this
|
|
10
|
-
* package's own copy — the SPA needs them and importing `@adonis-agora/media`'s copy would reintroduce
|
|
11
|
-
* the workspace cycle the provider's delegation deliberately avoids; see that file's doc comment).
|
|
2
|
+
* `@adonis-agora/media-dashboard`'s public surface: the console's wire-format API types. The console
|
|
3
|
+
* itself (provider, `defineConfig`, `DashboardService`, session auth) ships in `@adonis-agora/media`
|
|
4
|
+
* under `./dashboard_provider` and `./dashboard`; this package is the SPA's build-time source.
|
|
12
5
|
*/
|
|
13
|
-
export {
|
|
14
|
-
export type { CollectionFilter, CollectionListResponse, CollectionSummary, CollectionsSummaryResponse, ConsoleSessionUserInfo, CopyMoveBody, CursorPage, CursorPageInfo, CursorParams, DeleteBody, DiskCapabilities, DiskInfo, DiskListResponse, LoginBody, MediaDetailResponse, MediaEntry, MediaVariant, MeResponse, ObjectDetailResponse, ObjectEntry, ObjectFolder, ObjectInsight, ObjectInsightFact, ObjectInsightLink, ObjectInsightsResponse, ObjectListResponse, Topology, UploadDetailResponse, UploadInfo, UploadListResponse, UploadPart, } from './types.js';
|
|
6
|
+
export type { CollectionFilter, CollectionListResponse, CollectionSummary, CollectionsSummaryResponse, ConsoleSessionUserInfo, CopyMoveBody, CursorPage, CursorPageInfo, CursorParams, DeleteBody, DiskCapabilities, DiskInfo, DiskListResponse, FolderBody, LoginBody, MediaDetailResponse, MediaEntry, MediaVariant, MeResponse, ObjectDetailResponse, ObjectEntry, ObjectFolder, ObjectInsight, ObjectInsightFact, ObjectInsightLink, ObjectInsightsResponse, ObjectListResponse, Topology, UploadDetailResponse, UploadInfo, UploadListResponse, UploadPart, } from './types.js';
|
|
15
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,YAAY,EACZ,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,QAAQ,EACR,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,UAAU,GACX,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* `@adonis-agora/media-dashboard`'s public surface, shrunk as of `7.0.0`: `defineConfig`,
|
|
3
|
-
* `DashboardService`/`DashboardError`, the session-auth helpers and `ObjectInsightProvider` all moved
|
|
4
|
-
* to `@adonis-agora/media`'s own `./dashboard` subpath — the console is now embedded there, and this
|
|
5
|
-
* package's provider (still exported below) is a thin delegate to it. Author `config/media_dashboard.ts`
|
|
6
|
-
* against `@adonis-agora/media/dashboard`'s `defineConfig` regardless of which provider you register;
|
|
7
|
-
* both read the SAME `media_dashboard` config key.
|
|
8
|
-
*
|
|
9
|
-
* What's left here: the standalone provider entry point, and the wire-format API types (kept as this
|
|
10
|
-
* package's own copy — the SPA needs them and importing `@adonis-agora/media`'s copy would reintroduce
|
|
11
|
-
* the workspace cycle the provider's delegation deliberately avoids; see that file's doc comment).
|
|
12
|
-
*/
|
|
13
|
-
export { default as MediaDashboardProvider } from './provider/media_dashboard_provider.js';
|
|
1
|
+
export {};
|
|
14
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|