@candlerip/shared3 0.0.110 → 0.0.112
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +3 -2
- package/src/backend/database/model/error-log/index.d.ts +2 -0
- package/src/backend/database/model/error-log/index.js +2 -0
- package/src/backend/database/model/error-log/type.d.ts +7 -0
- package/src/backend/database/model/error-log/util.d.ts +7 -0
- package/src/backend/database/model/error-log/util.js +5 -0
- package/src/backend/database/model/index.d.ts +1 -0
- package/src/backend/database/model/index.js +1 -0
- package/src/backend/database/mutation/error-log/create-error-log/type.d.ts +7 -0
- package/src/backend/database/mutation/error-log/create-error-log/type.js +1 -0
- package/src/backend/database/mutation/error-log/create-error-log/util.d.ts +2 -0
- package/src/backend/database/mutation/error-log/create-error-log/util.js +15 -0
- package/src/backend/database/mutation/error-log/index.d.ts +1 -0
- package/src/backend/database/mutation/error-log/index.js +1 -0
- package/src/backend/database/mutation/index.d.ts +1 -0
- package/src/backend/database/mutation/index.js +1 -0
- package/src/backend/dictionary/compose-dictionary/util.js +1 -1
- package/src/backend/dictionary/index.d.ts +0 -1
- package/src/backend/dictionary/index.js +0 -1
- package/src/dictionary/get-excluded-translation-ids/index.d.ts +1 -0
- package/src/dictionary/get-excluded-translation-ids/index.js +1 -0
- package/src/{backend/dictionary → dictionary}/get-excluded-translation-ids/type.d.ts +2 -2
- package/src/dictionary/get-excluded-translation-ids/type.js +1 -0
- package/src/{backend/dictionary → dictionary}/get-excluded-translation-ids/util.js +1 -1
- package/src/dictionary/index.d.ts +1 -0
- package/src/dictionary/index.js +1 -0
- /package/src/backend/{dictionary/get-excluded-translation-ids → database/model/error-log}/type.js +0 -0
- /package/src/backend/{dictionary/get-excluded-translation-ids → database/mutation/error-log/create-error-log}/index.d.ts +0 -0
- /package/src/backend/{dictionary/get-excluded-translation-ids → database/mutation/error-log/create-error-log}/index.js +0 -0
- /package/src/{backend/dictionary → dictionary}/get-excluded-translation-ids/util.d.ts +0 -0
package/package.json
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@candlerip/shared3",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.112",
|
4
4
|
"type": "module",
|
5
5
|
"exports": {
|
6
6
|
".": "./src/index.js",
|
7
7
|
"./aws": "./src/aws/index.js",
|
8
|
-
"./backend": "./src/backend/index.js"
|
8
|
+
"./backend": "./src/backend/index.js",
|
9
|
+
"./backend/*": "./src/backend/*"
|
9
10
|
},
|
10
11
|
"bin": {
|
11
12
|
"crs-cdk-deploy": "./_devops/cdk/cdk-deploy.sh",
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as mongoose from 'mongoose';
|
2
|
+
import { ErrorLog } from './type.js';
|
3
|
+
export declare const ErrorLogModel: mongoose.Model<ErrorLog & mongoose.Document<unknown, any, any>, {}, {}, {}, mongoose.Document<unknown, {}, ErrorLog & mongoose.Document<unknown, any, any>> & ErrorLog & mongoose.Document<unknown, any, any> & Required<{
|
4
|
+
_id: string;
|
5
|
+
}> & {
|
6
|
+
__v: number;
|
7
|
+
}, any>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { customErrorWorker } from '../../../../../error/index.js';
|
2
|
+
import { ErrorLogModel } from '../../../model/error-log/index.js';
|
3
|
+
export const createErrorLog = async (customError) => {
|
4
|
+
let data;
|
5
|
+
const { composeCustomError } = customErrorWorker({ customError });
|
6
|
+
try {
|
7
|
+
data = await ErrorLogModel.create({ customError });
|
8
|
+
}
|
9
|
+
catch (err) {
|
10
|
+
return composeCustomError('Create error log failed', { err });
|
11
|
+
}
|
12
|
+
return {
|
13
|
+
data,
|
14
|
+
};
|
15
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './create-error-log/index.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './create-error-log/index.js';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DICTIONARY_CONFIG } from '../../../dictionary/index.js';
|
2
2
|
import { getTranslationsAsDictionary } from '../../database/mutation/translation/index.js';
|
3
|
-
import { getExcludedTranslationIds } from '
|
3
|
+
import { getExcludedTranslationIds } from '../../../dictionary/get-excluded-translation-ids/index.js';
|
4
4
|
export const composeDictionary = async (page, language, options) => {
|
5
5
|
let translationIds = [...DICTIONARY_CONFIG[page].translationIds];
|
6
6
|
const excludedIds = getExcludedTranslationIds(page, options);
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './util.js';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { TranslationId } from '
|
2
|
-
import { Page } from '
|
1
|
+
import { TranslationId } from '../index.js';
|
2
|
+
import { Page } from '../../page/index.js';
|
3
3
|
export type GetExcludedTranslationIds = (page: Page, options?: {
|
4
4
|
isAuthenticated?: boolean;
|
5
5
|
}) => TranslationId[];
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/src/dictionary/index.js
CHANGED
/package/src/backend/{dictionary/get-excluded-translation-ids → database/model/error-log}/type.js
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|