@strapi/content-releases 4.20.5 → 5.0.0-alpha.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/dist/_chunks/{App-bpzO2Ljh.mjs → App-dbdAcsz_.mjs} +286 -288
- package/dist/_chunks/App-dbdAcsz_.mjs.map +1 -0
- package/dist/_chunks/{App-p8aKBitd.js → App-zwe_jKPv.js} +292 -294
- package/dist/_chunks/App-zwe_jKPv.js.map +1 -0
- package/dist/_chunks/{en-WuuhP6Bn.mjs → en-RdapH-9X.mjs} +1 -2
- package/dist/_chunks/en-RdapH-9X.mjs.map +1 -0
- package/dist/_chunks/{en-gcJJ5htG.js → en-faJDuv3q.js} +1 -2
- package/dist/_chunks/en-faJDuv3q.js.map +1 -0
- package/dist/_chunks/{index-AECgcaDa.mjs → index-RBaVMtyr.mjs} +78 -69
- package/dist/_chunks/index-RBaVMtyr.mjs.map +1 -0
- package/dist/_chunks/{index-fP3qoWZ4.js → index-TBrVNrv9.js} +76 -67
- package/dist/_chunks/index-TBrVNrv9.js.map +1 -0
- package/dist/admin/index.js +1 -14
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +1 -14
- package/dist/admin/index.mjs.map +1 -1
- package/dist/admin/src/components/CMReleasesContainer.d.ts +1 -0
- package/dist/admin/src/components/RelativeTime.d.ts +28 -0
- package/dist/admin/src/components/ReleaseActionMenu.d.ts +26 -0
- package/dist/admin/src/components/ReleaseActionOptions.d.ts +9 -0
- package/dist/admin/src/components/ReleaseModal.d.ts +16 -0
- package/dist/admin/src/constants.d.ts +58 -0
- package/dist/admin/src/index.d.ts +3 -0
- package/dist/admin/src/pages/App.d.ts +1 -0
- package/dist/admin/src/pages/PurchaseContentReleases.d.ts +2 -0
- package/dist/admin/src/pages/ReleaseDetailsPage.d.ts +2 -0
- package/dist/admin/src/pages/ReleasesPage.d.ts +8 -0
- package/dist/admin/src/pages/tests/mockReleaseDetailsPageData.d.ts +181 -0
- package/dist/admin/src/pages/tests/mockReleasesPageData.d.ts +39 -0
- package/dist/admin/src/pluginId.d.ts +1 -0
- package/dist/admin/src/services/axios.d.ts +29 -0
- package/dist/admin/src/services/release.d.ts +369 -0
- package/dist/admin/src/store/hooks.d.ts +7 -0
- package/dist/admin/src/utils/time.d.ts +1 -0
- package/dist/server/index.js +277 -232
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +278 -232
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/bootstrap.d.ts.map +1 -0
- package/dist/server/src/constants.d.ts +12 -0
- package/dist/server/src/constants.d.ts.map +1 -0
- package/dist/server/src/content-types/index.d.ts +99 -0
- package/dist/server/src/content-types/index.d.ts.map +1 -0
- package/dist/server/src/content-types/release/index.d.ts +48 -0
- package/dist/server/src/content-types/release/index.d.ts.map +1 -0
- package/dist/server/src/content-types/release/schema.d.ts +47 -0
- package/dist/server/src/content-types/release/schema.d.ts.map +1 -0
- package/dist/server/src/content-types/release-action/index.d.ts +50 -0
- package/dist/server/src/content-types/release-action/index.d.ts.map +1 -0
- package/dist/server/src/content-types/release-action/schema.d.ts +49 -0
- package/dist/server/src/content-types/release-action/schema.d.ts.map +1 -0
- package/dist/server/src/controllers/index.d.ts +19 -0
- package/dist/server/src/controllers/index.d.ts.map +1 -0
- package/dist/server/src/controllers/release-action.d.ts +10 -0
- package/dist/server/src/controllers/release-action.d.ts.map +1 -0
- package/dist/server/src/controllers/release.d.ts +11 -0
- package/dist/server/src/controllers/release.d.ts.map +1 -0
- package/dist/server/src/controllers/validation/release-action.d.ts +3 -0
- package/dist/server/src/controllers/validation/release-action.d.ts.map +1 -0
- package/dist/server/src/controllers/validation/release.d.ts +2 -0
- package/dist/server/src/controllers/validation/release.d.ts.map +1 -0
- package/dist/server/src/destroy.d.ts +5 -0
- package/dist/server/src/destroy.d.ts.map +1 -0
- package/dist/server/src/index.d.ts +2095 -0
- package/dist/server/src/index.d.ts.map +1 -0
- package/dist/server/src/migrations/index.d.ts +12 -0
- package/dist/server/src/migrations/index.d.ts.map +1 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/register.d.ts.map +1 -0
- package/dist/server/src/routes/index.d.ts +35 -0
- package/dist/server/src/routes/index.d.ts.map +1 -0
- package/dist/server/src/routes/release-action.d.ts +18 -0
- package/dist/server/src/routes/release-action.d.ts.map +1 -0
- package/dist/server/src/routes/release.d.ts +18 -0
- package/dist/server/src/routes/release.d.ts.map +1 -0
- package/dist/server/src/services/index.d.ts +1826 -0
- package/dist/server/src/services/index.d.ts.map +1 -0
- package/dist/server/src/services/release.d.ts +66 -0
- package/dist/server/src/services/release.d.ts.map +1 -0
- package/dist/server/src/services/scheduling.d.ts +18 -0
- package/dist/server/src/services/scheduling.d.ts.map +1 -0
- package/dist/server/src/services/validation.d.ts +18 -0
- package/dist/server/src/services/validation.d.ts.map +1 -0
- package/dist/server/src/utils/index.d.ts +14 -0
- package/dist/server/src/utils/index.d.ts.map +1 -0
- package/dist/shared/contracts/release-actions.d.ts +131 -0
- package/dist/shared/contracts/release-actions.d.ts.map +1 -0
- package/dist/shared/contracts/releases.d.ts +166 -0
- package/dist/shared/contracts/releases.d.ts.map +1 -0
- package/dist/shared/types.d.ts +24 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/validation-schemas.d.ts +2 -0
- package/dist/shared/validation-schemas.d.ts.map +1 -0
- package/package.json +22 -28
- package/dist/_chunks/App-bpzO2Ljh.mjs.map +0 -1
- package/dist/_chunks/App-p8aKBitd.js.map +0 -1
- package/dist/_chunks/en-WuuhP6Bn.mjs.map +0 -1
- package/dist/_chunks/en-gcJJ5htG.js.map +0 -1
- package/dist/_chunks/index-AECgcaDa.mjs.map +0 -1
- package/dist/_chunks/index-fP3qoWZ4.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/services/index.ts"],"names":[],"mappings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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import type { LoadedStrapi, EntityService, Schema } from '@strapi/types';
|
|
3
|
+
import { RELEASE_ACTION_MODEL_UID } from '../constants';
|
|
4
|
+
import type { GetReleases, CreateRelease, UpdateRelease, PublishRelease, GetRelease, Release, DeleteRelease, GetContentTypeEntryReleases } from '../../../shared/contracts/releases';
|
|
5
|
+
import type { CreateReleaseAction, GetReleaseActions, ReleaseAction, UpdateReleaseAction, DeleteReleaseAction, ReleaseActionGroupBy } from '../../../shared/contracts/release-actions';
|
|
6
|
+
import type { Entity, UserInfo } from '../../../shared/types';
|
|
7
|
+
export interface Locale extends Entity {
|
|
8
|
+
name: string;
|
|
9
|
+
code: string;
|
|
10
|
+
}
|
|
11
|
+
type LocaleDictionary = {
|
|
12
|
+
[key: Locale['code']]: Pick<Locale, 'name' | 'code'>;
|
|
13
|
+
};
|
|
14
|
+
declare const createReleaseService: ({ strapi }: {
|
|
15
|
+
strapi: LoadedStrapi;
|
|
16
|
+
}) => {
|
|
17
|
+
create(releaseData: CreateRelease.Request['body'], { user }: {
|
|
18
|
+
user: UserInfo;
|
|
19
|
+
}): Promise<any>;
|
|
20
|
+
findOne(id: GetRelease.Request['params']['id'], query?: {}): Promise<any>;
|
|
21
|
+
findPage(query?: GetReleases.Request['query']): Promise<{
|
|
22
|
+
results: any[];
|
|
23
|
+
pagination: {
|
|
24
|
+
page: number;
|
|
25
|
+
pageSize: number;
|
|
26
|
+
pageCount: number;
|
|
27
|
+
total: number;
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
findManyWithContentTypeEntryAttached(contentTypeUid: GetContentTypeEntryReleases.Request['query']['contentTypeUid'], entryId: GetContentTypeEntryReleases.Request['query']['entryId']): Promise<any[]>;
|
|
31
|
+
findManyWithoutContentTypeEntryAttached(contentTypeUid: GetContentTypeEntryReleases.Request['query']['contentTypeUid'], entryId: GetContentTypeEntryReleases.Request['query']['entryId']): Promise<any[]>;
|
|
32
|
+
update(id: number, releaseData: UpdateRelease.Request['body'], { user }: {
|
|
33
|
+
user: UserInfo;
|
|
34
|
+
}): Promise<any>;
|
|
35
|
+
createAction(releaseId: CreateReleaseAction.Request['params']['releaseId'], action: Pick<CreateReleaseAction.Request['body'], 'type' | 'entry'>): Promise<any>;
|
|
36
|
+
findActions(releaseId: GetReleaseActions.Request['params']['releaseId'], query?: GetReleaseActions.Request['query']): Promise<{
|
|
37
|
+
results: any[];
|
|
38
|
+
pagination: {
|
|
39
|
+
page: number;
|
|
40
|
+
pageSize: number;
|
|
41
|
+
pageCount: number;
|
|
42
|
+
total: number;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
countActions(query: EntityService.Params.Pick<typeof RELEASE_ACTION_MODEL_UID, 'filters'>): Promise<number>;
|
|
46
|
+
groupActions(actions: ReleaseAction[], groupBy: ReleaseActionGroupBy): Promise<import("lodash").Dictionary<(null | undefined)[]>>;
|
|
47
|
+
getLocalesDataForActions(): Promise<LocaleDictionary>;
|
|
48
|
+
getContentTypesDataForActions(contentTypesUids: ReleaseAction['contentType'][]): Promise<Record<`admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, {
|
|
49
|
+
mainField: string;
|
|
50
|
+
displayName: string;
|
|
51
|
+
}>>;
|
|
52
|
+
getContentTypeModelsFromActions(actions: ReleaseAction[]): {
|
|
53
|
+
[key: `admin::${string}`]: Schema.ContentType;
|
|
54
|
+
[key: `strapi::${string}`]: Schema.ContentType;
|
|
55
|
+
[key: `api::${string}.${string}`]: Schema.ContentType;
|
|
56
|
+
[key: `plugin::${string}.${string}`]: Schema.ContentType;
|
|
57
|
+
};
|
|
58
|
+
getAllComponents(): Promise<any>;
|
|
59
|
+
delete(releaseId: DeleteRelease.Request['params']['id']): Promise<Release>;
|
|
60
|
+
publish(releaseId: PublishRelease.Request['params']['id']): Promise<Pick<Release, "id" | "releasedAt" | "status"> | null>;
|
|
61
|
+
updateAction(actionId: UpdateReleaseAction.Request['params']['actionId'], releaseId: UpdateReleaseAction.Request['params']['releaseId'], update: UpdateReleaseAction.Request['body']): Promise<any>;
|
|
62
|
+
deleteAction(actionId: DeleteReleaseAction.Request['params']['actionId'], releaseId: DeleteReleaseAction.Request['params']['releaseId']): Promise<any>;
|
|
63
|
+
updateReleaseStatus(releaseId: Release['id']): Promise<any>;
|
|
64
|
+
};
|
|
65
|
+
export default createReleaseService;
|
|
66
|
+
//# sourceMappingURL=release.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../server/src/services/release.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAO,MAAM,EAAE,MAAM,eAAe,CAAC;AAI9E,OAAO,EAA0B,wBAAwB,EAAqB,MAAM,cAAc,CAAC;AACnG,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,UAAU,EACV,OAAO,EACP,aAAa,EACb,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG9D,MAAM,WAAW,MAAO,SAAQ,MAAM;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,KAAK,gBAAgB,GAAG;IACtB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CACtD,CAAC;AAeF,QAAA,MAAM,oBAAoB;YAA0B,YAAY;;wBA0JlC,qBAAqB,CAAC,MAAM,CAAC;cAAoB,QAAQ;;gBAiCjE,kBAAkB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;qBAUnC,mBAAmB,CAAC,OAAO,CAAC;;;;;;;;;yDAc3B,mCAAmC,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,WACrE,mCAAmC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;4DAyChD,mCAAmC,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,WACrE,mCAAmC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;eAmD5D,MAAM,eACG,qBAAqB,CAAC,MAAM,CAAC;cACxB,QAAQ;;4BAiDf,2BAA2B,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,UACrD,KAAK,2BAA2B,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;2BAkDxD,yBAAyB,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,UACnD,yBAAyB,CAAC,OAAO,CAAC;;;;;;;;;wBA8BnC,cAAc,MAAM,KAAK,CAAC,+BAA+B,EAAE,SAAS,CAAC;0BAUlD,aAAa,EAAE,WAAW,oBAAoB;;oDA4CpB,aAAa,CAAC,aAAa,CAAC,EAAE;mBAKrB,MAAM;qBAAe,MAAM;;6CAgBjD,aAAa,EAAE;;;;;;;sBA8ChC,qBAAqB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;uBA8CpC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;2BA4GnD,2BAA2B,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,aAChD,2BAA2B,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,UACrD,2BAA2B,CAAC,MAAM,CAAC;2BAyBjC,2BAA2B,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,aAChD,2BAA2B,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC;mCAyB1B,OAAO,CAAC,IAAI,CAAC;CA+CrD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Job } from 'node-schedule';
|
|
2
|
+
import { LoadedStrapi } from '@strapi/types';
|
|
3
|
+
import { Release } from '../../../shared/contracts/releases';
|
|
4
|
+
declare const createSchedulingService: ({ strapi }: {
|
|
5
|
+
strapi: LoadedStrapi;
|
|
6
|
+
}) => {
|
|
7
|
+
set(releaseId: Release['id'], scheduleDate: Date): Promise<Map<import("@strapi/types/dist/types/core/entity").ID, Job>>;
|
|
8
|
+
cancel(releaseId: Release['id']): Map<import("@strapi/types/dist/types/core/entity").ID, Job>;
|
|
9
|
+
getAll(): Map<import("@strapi/types/dist/types/core/entity").ID, Job>;
|
|
10
|
+
/**
|
|
11
|
+
* On bootstrap, we can use this function to make sure to sync the scheduled jobs from the database that are not yet released
|
|
12
|
+
* This is useful in case the server was restarted and the scheduled jobs were lost
|
|
13
|
+
* This also could be used to sync different Strapi instances in case of a cluster
|
|
14
|
+
*/
|
|
15
|
+
syncFromDatabase(): Promise<Map<import("@strapi/types/dist/types/core/entity").ID, Job>>;
|
|
16
|
+
};
|
|
17
|
+
export default createSchedulingService;
|
|
18
|
+
//# sourceMappingURL=scheduling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduling.d.ts","sourceRoot":"","sources":["../../../../server/src/services/scheduling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,GAAG,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAI7D,QAAA,MAAM,uBAAuB;YAA0B,YAAY;;mBAI1C,OAAO,CAAC,IAAI,CAAC,gBAAgB,IAAI;sBA6BpC,OAAO,CAAC,IAAI,CAAC;;IAa/B;;;;OAIG;;CAkBN,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { errors } from '@strapi/utils';
|
|
2
|
+
import { LoadedStrapi } from '@strapi/types';
|
|
3
|
+
import type { CreateRelease, UpdateRelease } from '../../../shared/contracts/releases';
|
|
4
|
+
import type { CreateReleaseAction } from '../../../shared/contracts/release-actions';
|
|
5
|
+
export declare class AlreadyOnReleaseError extends errors.ApplicationError<'AlreadyOnReleaseError'> {
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
declare const createReleaseValidationService: ({ strapi }: {
|
|
9
|
+
strapi: LoadedStrapi;
|
|
10
|
+
}) => {
|
|
11
|
+
validateUniqueEntry(releaseId: CreateReleaseAction.Request['params']['releaseId'], releaseActionArgs: CreateReleaseAction.Request['body']): Promise<void>;
|
|
12
|
+
validateEntryContentType(contentTypeUid: CreateReleaseAction.Request['body']['entry']['contentType']): void;
|
|
13
|
+
validatePendingReleasesLimit(): Promise<void>;
|
|
14
|
+
validateUniqueNameForPendingRelease(name: CreateRelease.Request['body']['name'], id?: UpdateRelease.Request['params']['id']): Promise<void>;
|
|
15
|
+
validateScheduledAtIsLaterThanNow(scheduledAt: CreateRelease.Request['body']['scheduledAt']): Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
export default createReleaseValidationService;
|
|
18
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../server/src/services/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAW,aAAa,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAChG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGrF,qBAAa,qBAAsB,SAAQ,MAAM,CAAC,gBAAgB,CAAC,uBAAuB,CAAC;gBAC7E,OAAO,EAAE,MAAM;CAI5B;AAED,QAAA,MAAM,8BAA8B;YAA0B,YAAY;;mCAE3D,2BAA2B,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,qBAC1C,2BAA2B,CAAC,MAAM,CAAC;6CA8BtC,2BAA2B,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC;;8CA2BrE,qBAAqB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OACtC,qBAAqB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;mDAmB7B,qBAAqB,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC;CAM3D,CAAC;AAEH,eAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Common, Entity } from '@strapi/types';
|
|
2
|
+
export declare const getService: (name: 'release' | 'release-validation' | 'scheduling' | 'release-action' | 'event-manager', { strapi }?: {
|
|
3
|
+
strapi: Required<import("@strapi/types").Strapi>;
|
|
4
|
+
}) => Common.Service;
|
|
5
|
+
export declare const getPopulatedEntry: (contentTypeUid: Common.UID.ContentType, entryId: Entity.ID, { strapi }?: {
|
|
6
|
+
strapi: Required<import("@strapi/types").Strapi>;
|
|
7
|
+
}) => Promise<any>;
|
|
8
|
+
export declare const getEntryValidStatus: (contentTypeUid: Common.UID.ContentType, entry: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
id: Entity.ID;
|
|
11
|
+
}, { strapi }?: {
|
|
12
|
+
strapi: Required<import("@strapi/types").Strapi>;
|
|
13
|
+
}) => Promise<boolean>;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,UAAU,SACf,SAAS,GAAG,oBAAoB,GAAG,YAAY,GAAG,gBAAgB,GAAG,eAAe;;oBAI3F,CAAC;AAEF,eAAO,MAAM,iBAAiB,mBACZ,OAAO,GAAG,CAAC,WAAW,WAC7B,OAAO,EAAE;;kBAanB,CAAC;AAEF,eAAO,MAAM,mBAAmB,mBACd,OAAO,GAAG,CAAC,WAAW;;QACzB,OAAO,EAAE;;;sBAiBvB,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Attribute, Common, Documents, Schema } from '@strapi/types';
|
|
2
|
+
import type { Release, Pagination } from './releases';
|
|
3
|
+
import type { Entity } from '../types';
|
|
4
|
+
import type { errors } from '@strapi/utils';
|
|
5
|
+
export type ReleaseActionEntry = Documents.AnyDocument & {
|
|
6
|
+
[key: string]: Attribute.Any;
|
|
7
|
+
} & {
|
|
8
|
+
locale?: string;
|
|
9
|
+
};
|
|
10
|
+
export interface ReleaseAction extends Entity {
|
|
11
|
+
type: 'publish' | 'unpublish';
|
|
12
|
+
entry: ReleaseActionEntry;
|
|
13
|
+
contentType: Common.UID.ContentType;
|
|
14
|
+
locale?: string;
|
|
15
|
+
release: Release;
|
|
16
|
+
isEntryValid: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface FormattedReleaseAction extends Entity {
|
|
19
|
+
type: 'publish' | 'unpublish';
|
|
20
|
+
entry: ReleaseActionEntry;
|
|
21
|
+
contentType: {
|
|
22
|
+
uid: Common.UID.ContentType;
|
|
23
|
+
mainFieldValue?: string;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
locale?: {
|
|
27
|
+
name: string;
|
|
28
|
+
code: string;
|
|
29
|
+
};
|
|
30
|
+
release: Release;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* POST /content-releases/:releaseId/actions - Create a release action
|
|
34
|
+
*/
|
|
35
|
+
export declare namespace CreateReleaseAction {
|
|
36
|
+
interface Request {
|
|
37
|
+
params: {
|
|
38
|
+
releaseId: Release['id'];
|
|
39
|
+
};
|
|
40
|
+
body: {
|
|
41
|
+
type: ReleaseAction['type'];
|
|
42
|
+
entry: {
|
|
43
|
+
id: ReleaseActionEntry['id'];
|
|
44
|
+
locale?: ReleaseActionEntry['locale'];
|
|
45
|
+
contentType: Common.UID.ContentType;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
interface Response {
|
|
50
|
+
data: ReleaseAction;
|
|
51
|
+
error?: errors.ApplicationError | errors.ValidationError | errors.NotFoundError;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* POST /content-releases/:releaseId/actions/bulk - Create multiple release actions
|
|
56
|
+
*/
|
|
57
|
+
export declare namespace CreateManyReleaseActions {
|
|
58
|
+
interface Request {
|
|
59
|
+
params: {
|
|
60
|
+
releaseId: Release['id'];
|
|
61
|
+
};
|
|
62
|
+
body: Array<{
|
|
63
|
+
type: ReleaseAction['type'];
|
|
64
|
+
entry: {
|
|
65
|
+
id: ReleaseActionEntry['id'];
|
|
66
|
+
locale?: ReleaseActionEntry['locale'];
|
|
67
|
+
contentType: Common.UID.ContentType;
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
70
|
+
}
|
|
71
|
+
interface Response {
|
|
72
|
+
data: Array<ReleaseAction>;
|
|
73
|
+
meta: {
|
|
74
|
+
totalEntries: number;
|
|
75
|
+
entriesAlreadyInRelease: number;
|
|
76
|
+
};
|
|
77
|
+
error?: errors.ApplicationError | errors.ValidationError | errors.NotFoundError;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* GET /content-releases/:id/actions - Get all release actions
|
|
82
|
+
*/
|
|
83
|
+
export type ReleaseActionGroupBy = 'contentType' | 'action' | 'locale';
|
|
84
|
+
export declare namespace GetReleaseActions {
|
|
85
|
+
interface Request {
|
|
86
|
+
params: {
|
|
87
|
+
releaseId: Release['id'];
|
|
88
|
+
};
|
|
89
|
+
query?: Partial<Pick<Pagination, 'page' | 'pageSize'>> & {
|
|
90
|
+
groupBy?: ReleaseActionGroupBy;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
interface Response {
|
|
94
|
+
data: {
|
|
95
|
+
[key: string]: Array<FormattedReleaseAction>;
|
|
96
|
+
};
|
|
97
|
+
meta: {
|
|
98
|
+
pagination: Pagination;
|
|
99
|
+
contentTypes: Record<Schema.ContentType['uid'], Schema.ContentType>;
|
|
100
|
+
components: Record<Schema.Component['uid'], Schema.Component>;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export declare namespace DeleteReleaseAction {
|
|
105
|
+
interface Request {
|
|
106
|
+
params: {
|
|
107
|
+
actionId: ReleaseAction['id'];
|
|
108
|
+
releaseId: Release['id'];
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
interface Response {
|
|
112
|
+
data: ReleaseAction;
|
|
113
|
+
error?: errors.ApplicationError | errors.NotFoundError;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
export declare namespace UpdateReleaseAction {
|
|
117
|
+
interface Request {
|
|
118
|
+
params: {
|
|
119
|
+
actionId: ReleaseAction['id'];
|
|
120
|
+
releaseId: ReleaseAction['id'];
|
|
121
|
+
};
|
|
122
|
+
body: {
|
|
123
|
+
type: ReleaseAction['type'];
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
interface Response {
|
|
127
|
+
data: ReleaseAction;
|
|
128
|
+
error?: errors.ApplicationError | errors.ValidationError | errors.NotFoundError;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=release-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-actions.d.ts","sourceRoot":"","sources":["../../../shared/contracts/release-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,SAAS,CAAC,WAAW,GAAG;IAEvD,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC;CAC9B,GAAG;IACF,MAAM,CAAC,EA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AAsB,CAAC,CAAC;SAC9C,CAAC;QACF,IAAI,EAAE;YACJ,UAAU,EAAE,UAAU,CAAC;YACvB,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;YACpE,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;SAC/D,CAAC;KACH;CACF;AAKD,MAAM,CAAC,OAAO,WAAW,mBAAmB,CAAC;IAC3C,UAAiB,OAAO;QACtB,MAAM,EAAE;YACN,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;YAC9B,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;SAC1B,CAAC;KACH;IAED,UAAiB,QAAQ;QACvB,IAAI,EAAE,aAAa,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,aAAa,CAAC;KACxD;CACF;AAKD,MAAM,CAAC,OAAO,WAAW,mBAAmB,CAAC;IAC3C,UAAiB,OAAO;QACtB,MAAM,EAAE;YACN,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;YAC9B,SAAS,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;SAChC,CAAC;QACF,IAAI,EAAE;YACJ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;SAC7B,CAAC;KACH;IAED,UAAiB,QAAQ;QACvB,IAAI,EAAE,aAAa,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,aAAa,CAAC;KACjF;CACF"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import type { Entity } from '../types';
|
|
2
|
+
import type { ReleaseAction } from './release-actions';
|
|
3
|
+
import type { UserInfo } from '../types';
|
|
4
|
+
import { errors } from '@strapi/utils';
|
|
5
|
+
import type { SanitizedAdminUser } from '@strapi/admin/strapi-admin';
|
|
6
|
+
export interface Release extends Entity {
|
|
7
|
+
name: string;
|
|
8
|
+
releasedAt: string | null;
|
|
9
|
+
scheduledAt: string | null;
|
|
10
|
+
status: 'ready' | 'blocked' | 'failed' | 'done' | 'empty';
|
|
11
|
+
timezone: string | null;
|
|
12
|
+
actions: ReleaseAction[];
|
|
13
|
+
}
|
|
14
|
+
export type Pagination = {
|
|
15
|
+
page: number;
|
|
16
|
+
pageSize: number;
|
|
17
|
+
pageCount: number;
|
|
18
|
+
total: number;
|
|
19
|
+
};
|
|
20
|
+
export interface ReleaseDataResponse extends Omit<Release, 'actions'> {
|
|
21
|
+
actions: {
|
|
22
|
+
meta: {
|
|
23
|
+
count: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
createdBy: SanitizedAdminUser;
|
|
27
|
+
}
|
|
28
|
+
export interface ReleaseForContentTypeEntryDataResponse extends Omit<Release, 'actions'> {
|
|
29
|
+
action: ReleaseAction;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* GET /content-releases/ - Get all releases
|
|
33
|
+
*/
|
|
34
|
+
export declare namespace GetReleases {
|
|
35
|
+
interface Request {
|
|
36
|
+
state: {
|
|
37
|
+
userAbility: {};
|
|
38
|
+
};
|
|
39
|
+
query?: Partial<Pick<Pagination, 'page' | 'pageSize'>>;
|
|
40
|
+
}
|
|
41
|
+
interface Response {
|
|
42
|
+
data: ReleaseDataResponse[];
|
|
43
|
+
meta: {
|
|
44
|
+
pagination?: Pagination;
|
|
45
|
+
pendingReleasesCount?: number;
|
|
46
|
+
};
|
|
47
|
+
error?: errors.ApplicationError;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* GET /content-releases/ - Get all releases for a given entry
|
|
52
|
+
*/
|
|
53
|
+
export declare namespace GetContentTypeEntryReleases {
|
|
54
|
+
interface Request {
|
|
55
|
+
state: {
|
|
56
|
+
userAbility: {};
|
|
57
|
+
};
|
|
58
|
+
query: {
|
|
59
|
+
contentTypeUid: ReleaseAction['contentType'];
|
|
60
|
+
entryId: ReleaseAction['entry']['id'];
|
|
61
|
+
hasEntryAttached?: boolean;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
interface Response {
|
|
65
|
+
data: ReleaseForContentTypeEntryDataResponse[];
|
|
66
|
+
error?: errors.ApplicationError;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* GET /content-releases/:id - Get a single release
|
|
71
|
+
*/
|
|
72
|
+
export declare namespace GetRelease {
|
|
73
|
+
interface Request {
|
|
74
|
+
state: {
|
|
75
|
+
userAbility: {};
|
|
76
|
+
};
|
|
77
|
+
params: {
|
|
78
|
+
id: Release['id'];
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
interface Response {
|
|
82
|
+
data: ReleaseDataResponse;
|
|
83
|
+
error?: errors.ApplicationError | errors.NotFoundError;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* POST /content-releases/ - Create a release
|
|
88
|
+
*/
|
|
89
|
+
export declare namespace CreateRelease {
|
|
90
|
+
interface Request {
|
|
91
|
+
state: {
|
|
92
|
+
user: UserInfo;
|
|
93
|
+
};
|
|
94
|
+
body: {
|
|
95
|
+
name: string;
|
|
96
|
+
scheduledAt: Date | null;
|
|
97
|
+
timezone: string | null;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
interface Response {
|
|
101
|
+
data: ReleaseDataResponse;
|
|
102
|
+
error?: errors.ApplicationError | errors.ValidationError;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* PUT /content-releases/:id - Update a release
|
|
107
|
+
*/
|
|
108
|
+
export declare namespace UpdateRelease {
|
|
109
|
+
interface Request {
|
|
110
|
+
state: {
|
|
111
|
+
user: UserInfo;
|
|
112
|
+
};
|
|
113
|
+
params: {
|
|
114
|
+
id: Release['id'];
|
|
115
|
+
};
|
|
116
|
+
body: {
|
|
117
|
+
name: string;
|
|
118
|
+
scheduledAt?: Date | null;
|
|
119
|
+
timezone?: string | null;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
interface Response {
|
|
123
|
+
data: ReleaseDataResponse;
|
|
124
|
+
error?: errors.ApplicationError | errors.ValidationError;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* DELETE /content-releases/:id - Delete a release
|
|
129
|
+
*/
|
|
130
|
+
export declare namespace DeleteRelease {
|
|
131
|
+
interface Request {
|
|
132
|
+
state: {
|
|
133
|
+
user: UserInfo;
|
|
134
|
+
};
|
|
135
|
+
params: {
|
|
136
|
+
id: Release['id'];
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
interface Response {
|
|
140
|
+
data: ReleaseDataResponse;
|
|
141
|
+
error?: errors.ApplicationError | errors.NotFoundError;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* POST /content-releases/:releaseId/publish - Publish a release
|
|
146
|
+
*/
|
|
147
|
+
export declare namespace PublishRelease {
|
|
148
|
+
interface Request {
|
|
149
|
+
state: {
|
|
150
|
+
user: UserInfo;
|
|
151
|
+
};
|
|
152
|
+
params: {
|
|
153
|
+
id: Release['id'];
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
interface Response {
|
|
157
|
+
data: ReleaseDataResponse;
|
|
158
|
+
meta: {
|
|
159
|
+
totalEntries: number;
|
|
160
|
+
totalPublishedEntries: number;
|
|
161
|
+
totalUnpublishedEntries: number;
|
|
162
|
+
};
|
|
163
|
+
error?: errors.ApplicationError | errors.ValidationError;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=releases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../../../shared/contracts/releases.ts"],"names":[],"mappings":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E,QAAQ,CAAC;SAChB,CAAC;QACF,MAAM,EAAE;YACN,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;SACnB,CAAC;KACH;IAED,UAAiB,QAAQ;QACvB,IAAI,EAAE,mBAAmB,CAAC;QAC1B,IAAI,EAAE;YACJ,YAAY,EAAE,MAAM,CAAC;YACrB,qBAAqB,EAAE,MAAM,CAAC;YAC9B,uBAAuB,EAAE,MAAM,CAAC;SACjC,CAAC;QACF,KAAK,CAAC,EAAE,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,eAAe,CAAC;KAC1D;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Entity as StrapiEntity } from '@strapi/types';
|
|
2
|
+
interface RoleInfo extends Omit<Entity, 'createdAt' | 'updatedAt'> {
|
|
3
|
+
name: string;
|
|
4
|
+
code: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
usersCount?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface UserInfo extends Entity {
|
|
9
|
+
firstname: string;
|
|
10
|
+
lastname?: string;
|
|
11
|
+
username?: null | string;
|
|
12
|
+
email: string;
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
blocked: boolean;
|
|
15
|
+
preferedLanguage: null | string;
|
|
16
|
+
roles: RoleInfo[];
|
|
17
|
+
}
|
|
18
|
+
export interface Entity {
|
|
19
|
+
id: StrapiEntity.ID;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../shared/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAG5D,UAAU,QAAS,SAAQ,IAAI,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAAC;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,QAAS,SAAQ,MAAM;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,EAAE,IAAI,GAAG,MAAM,CAAC;IAChC,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,YAAY,CAAC,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-schemas.d.ts","sourceRoot":"","sources":["../../shared/validation-schemas.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,KAuBb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/content-releases",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-alpha.0",
|
|
4
4
|
"description": "Strapi plugin for organizing and releasing content",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
],
|
|
22
22
|
"exports": {
|
|
23
23
|
"./strapi-admin": {
|
|
24
|
-
"types": "./dist/admin/index.d.ts",
|
|
24
|
+
"types": "./dist/admin/src/index.d.ts",
|
|
25
25
|
"source": "./admin/src/index.ts",
|
|
26
26
|
"import": "./dist/admin/index.mjs",
|
|
27
27
|
"require": "./dist/admin/index.js",
|
|
28
28
|
"default": "./dist/admin/index.js"
|
|
29
29
|
},
|
|
30
30
|
"./strapi-server": {
|
|
31
|
-
"types": "./dist/server/index.d.ts",
|
|
31
|
+
"types": "./dist/server/src/index.d.ts",
|
|
32
32
|
"source": "./server/src/index.ts",
|
|
33
33
|
"import": "./dist/server/index.mjs",
|
|
34
34
|
"require": "./dist/server/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
40
|
-
"
|
|
40
|
+
"dist/",
|
|
41
41
|
"strapi-server.js"
|
|
42
42
|
],
|
|
43
43
|
"scripts": {
|
|
@@ -56,54 +56,48 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@reduxjs/toolkit": "1.9.7",
|
|
58
58
|
"@strapi/design-system": "1.16.0",
|
|
59
|
-
"@strapi/helper-plugin": "
|
|
59
|
+
"@strapi/helper-plugin": "5.0.0-alpha.0",
|
|
60
60
|
"@strapi/icons": "1.16.0",
|
|
61
|
-
"@strapi/types": "
|
|
62
|
-
"@strapi/utils": "
|
|
63
|
-
"axios": "1.6.
|
|
61
|
+
"@strapi/types": "5.0.0-alpha.0",
|
|
62
|
+
"@strapi/utils": "5.0.0-alpha.0",
|
|
63
|
+
"axios": "1.6.8",
|
|
64
64
|
"date-fns": "2.30.0",
|
|
65
|
-
"date-fns-tz": "2.0.
|
|
66
|
-
"formik": "2.4.
|
|
65
|
+
"date-fns-tz": "2.0.1",
|
|
66
|
+
"formik": "2.4.5",
|
|
67
67
|
"lodash": "4.17.21",
|
|
68
68
|
"node-schedule": "2.1.0",
|
|
69
|
-
"react-intl": "6.
|
|
70
|
-
"react-redux": "8.1.
|
|
69
|
+
"react-intl": "6.6.2",
|
|
70
|
+
"react-redux": "8.1.3",
|
|
71
71
|
"yup": "0.32.9"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@strapi/admin": "
|
|
75
|
-
"@strapi/admin-test-utils": "
|
|
76
|
-
"@strapi/pack-up": "
|
|
77
|
-
"@strapi/strapi": "4.20.5",
|
|
74
|
+
"@strapi/admin": "5.0.0-alpha.0",
|
|
75
|
+
"@strapi/admin-test-utils": "5.0.0-alpha.0",
|
|
76
|
+
"@strapi/pack-up": "5.0.0-alpha.0",
|
|
78
77
|
"@testing-library/react": "14.0.0",
|
|
79
78
|
"@testing-library/user-event": "14.4.3",
|
|
80
79
|
"@types/koa": "2.13.4",
|
|
81
|
-
"@types/styled-components": "5.1.
|
|
80
|
+
"@types/styled-components": "5.1.34",
|
|
82
81
|
"koa": "2.13.4",
|
|
83
82
|
"msw": "1.3.0",
|
|
84
83
|
"react": "^18.2.0",
|
|
85
84
|
"react-dom": "^18.2.0",
|
|
86
|
-
"react-
|
|
87
|
-
"
|
|
85
|
+
"react-query": "3.39.3",
|
|
86
|
+
"react-router-dom": "6.22.3",
|
|
87
|
+
"styled-components": "5.3.11",
|
|
88
88
|
"typescript": "5.2.2"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@strapi/admin": "^4.
|
|
92
|
-
"@strapi/strapi": "^4.15.1",
|
|
91
|
+
"@strapi/admin": "^4.20.5",
|
|
93
92
|
"react": "^17.0.0 || ^18.0.0",
|
|
94
93
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
95
|
-
"react-router-dom": "
|
|
94
|
+
"react-router-dom": "^6.0.0",
|
|
96
95
|
"styled-components": "5.3.3"
|
|
97
96
|
},
|
|
98
97
|
"engines": {
|
|
99
98
|
"node": ">=16.0.0 <=20.x.x",
|
|
100
99
|
"npm": ">=6.0.0"
|
|
101
100
|
},
|
|
102
|
-
"nx": {
|
|
103
|
-
"implicitDependencies": [
|
|
104
|
-
"!@strapi/strapi"
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
101
|
"strapi": {
|
|
108
102
|
"name": "content-releases",
|
|
109
103
|
"description": "Organize and release content",
|
|
@@ -111,5 +105,5 @@
|
|
|
111
105
|
"displayName": "Releases",
|
|
112
106
|
"required": true
|
|
113
107
|
},
|
|
114
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "ceeb3f383cbaf51eeaa373750a27a2880a10f727"
|
|
115
109
|
}
|