@nascentdigital/funnel-cms 4.5.3 → 4.5.4
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/errors/CMSError.d.ts +3 -0
- package/dist/errors/CMSErrors.js +4 -4
- package/dist/errors/LinkedDependantsError.d.ts +1 -1
- package/dist/errors/LinkedDependantsError.js +1 -1
- package/dist/errors/LockdownError.d.ts +1 -1
- package/dist/errors/LockdownError.js +1 -1
- package/dist/errors/SlugValidationError.d.ts +1 -1
- package/dist/errors/SlugValidationError.js +1 -1
- package/dist/errors/TranslateReferencesError.d.ts +1 -1
- package/dist/errors/TranslateReferencesError.js +1 -1
- package/package.json +2 -2
|
@@ -5,4 +5,7 @@ export declare class CMSError extends IsometricError {
|
|
|
5
5
|
export declare namespace CMSError {
|
|
6
6
|
const moduleId: IsometricErrorModule.Id;
|
|
7
7
|
type ConstructorArgs = IsometricError.ConstructorArgs.WithoutModuleId;
|
|
8
|
+
namespace ConstructorArgs {
|
|
9
|
+
type WithoutName = Omit<ConstructorArgs, 'name'>;
|
|
10
|
+
}
|
|
8
11
|
}
|
package/dist/errors/CMSErrors.js
CHANGED
|
@@ -19,13 +19,13 @@ class CMSErrors {
|
|
|
19
19
|
// convert
|
|
20
20
|
switch (data.name) {
|
|
21
21
|
// re-hydrate error
|
|
22
|
-
case
|
|
22
|
+
case 'LinkedDependantsError':
|
|
23
23
|
return new LinkedDependantsError_1.LinkedDependantsError(data);
|
|
24
|
-
case
|
|
24
|
+
case 'LockdownError':
|
|
25
25
|
return new LockdownError_1.LockdownError(data);
|
|
26
|
-
case
|
|
26
|
+
case 'TranslateReferencesError':
|
|
27
27
|
return new TranslateReferencesError_1.TranslateReferencesError(data);
|
|
28
|
-
case
|
|
28
|
+
case 'SlugValidationError':
|
|
29
29
|
return new SlugValidationError_1.SlugValidationError(data);
|
|
30
30
|
// or ignore if not matching
|
|
31
31
|
default:
|
|
@@ -9,7 +9,7 @@ export declare class LinkedDependantsError extends CMSError {
|
|
|
9
9
|
}
|
|
10
10
|
export declare namespace LinkedDependantsError {
|
|
11
11
|
type Reason = PageClient.ValidateSlug.InvalidResult | PageClient.ValidateSlug.UnavailableResult;
|
|
12
|
-
type ConstructorArgs = Omit<CMSError.ConstructorArgs, 'message'> & {
|
|
12
|
+
type ConstructorArgs = Omit<CMSError.ConstructorArgs.WithoutName, 'message'> & {
|
|
13
13
|
message?: string;
|
|
14
14
|
pages?: ReadonlyArray<Schema.Page.Data.AsLink>;
|
|
15
15
|
collections?: ReadonlyArray<Schema.Collection.Data.AsLink>;
|
|
@@ -18,7 +18,7 @@ class LinkedDependantsError extends CMSError_1.CMSError {
|
|
|
18
18
|
constructor(_a) {
|
|
19
19
|
var { message = 'This operation cannot be completed because it would break dependencies.', pages = [], collections = [] } = _a, args = __rest(_a, ["message", "pages", "collections"]);
|
|
20
20
|
// construct base
|
|
21
|
-
super(Object.assign(Object.assign({}, args), { message }));
|
|
21
|
+
super(Object.assign(Object.assign({}, args), { name: 'LinkedDependantsError', message }));
|
|
22
22
|
// initialize instance variables
|
|
23
23
|
this.pages = pages;
|
|
24
24
|
this.collections = collections;
|
|
@@ -6,7 +6,7 @@ const CMSError_1 = require("./CMSError");
|
|
|
6
6
|
class LockdownError extends CMSError_1.CMSError {
|
|
7
7
|
constructor(args) {
|
|
8
8
|
// construct base
|
|
9
|
-
super(args);
|
|
9
|
+
super(Object.assign(Object.assign({}, args), { name: 'LockdownError' }));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.LockdownError = LockdownError;
|
|
@@ -9,7 +9,7 @@ export declare class SlugValidationError extends CMSError {
|
|
|
9
9
|
}
|
|
10
10
|
export declare namespace SlugValidationError {
|
|
11
11
|
type Reason = PageClient.ValidateSlug.InvalidResult | PageClient.ValidateSlug.UnavailableResult;
|
|
12
|
-
type ConstructorArgs = Omit<CMSError.ConstructorArgs, 'message'> & {
|
|
12
|
+
type ConstructorArgs = Omit<CMSError.ConstructorArgs.WithoutName, 'message'> & {
|
|
13
13
|
slug: string;
|
|
14
14
|
reason: Reason;
|
|
15
15
|
message?: string;
|
|
@@ -7,7 +7,7 @@ class SlugValidationError extends CMSError_1.CMSError {
|
|
|
7
7
|
constructor(args) {
|
|
8
8
|
var _a;
|
|
9
9
|
// construct base
|
|
10
|
-
super(Object.assign(Object.assign({}, args), { message: (_a = args.message) !== null && _a !== void 0 ? _a : (args.reason.status === 'invalid'
|
|
10
|
+
super(Object.assign(Object.assign({}, args), { name: 'SlugValidationError', message: (_a = args.message) !== null && _a !== void 0 ? _a : (args.reason.status === 'invalid'
|
|
11
11
|
? `invalid format for slug "${args.slug}"`
|
|
12
12
|
: `slug "${args.slug}" is not available`) }));
|
|
13
13
|
// initialize instance variables
|
|
@@ -8,7 +8,7 @@ export declare class TranslateReferencesError extends CMSError {
|
|
|
8
8
|
serialize(): TranslateReferencesError.Serialized;
|
|
9
9
|
}
|
|
10
10
|
export declare namespace TranslateReferencesError {
|
|
11
|
-
type ConstructorArgs = CMSError.ConstructorArgs & {
|
|
11
|
+
type ConstructorArgs = CMSError.ConstructorArgs.WithoutName & {
|
|
12
12
|
targetLanguage: Language;
|
|
13
13
|
untranslatedPages: Schema.Page.Data.AsLink[];
|
|
14
14
|
untranslatedCollections: Schema.Collection.Data.AsRef[];
|
|
@@ -6,7 +6,7 @@ const CMSError_1 = require("./CMSError");
|
|
|
6
6
|
class TranslateReferencesError extends CMSError_1.CMSError {
|
|
7
7
|
constructor(args) {
|
|
8
8
|
// construct base
|
|
9
|
-
super(args);
|
|
9
|
+
super(Object.assign(Object.assign({}, args), { name: 'TranslateReferencesError' }));
|
|
10
10
|
// initialize instance variables
|
|
11
11
|
this.targetLanguage = args.targetLanguage;
|
|
12
12
|
this.untranslatedPages = args.untranslatedPages;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nascentdigital/funnel-cms",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/nascentdigital/funnel.git",
|
|
6
6
|
"directory": "libs/cms"
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"ts-jest": "^29",
|
|
43
43
|
"type-fest": "^4"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "d3d65564e0935e40c8b1e441316b63a126516bca"
|
|
46
46
|
}
|