@candlerip/shared3 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@candlerip/shared3",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
- "main": "index.js",
5
+ "main": "src/index.js",
6
6
  "bin": {
7
7
  "crs-cdk-deploy": "./_devops/cdk/cdk-deploy.sh",
8
8
  "crs-docker": "./_devops/docker/docker.sh",
@@ -0,0 +1,6 @@
1
+ export interface CustomError {
2
+ err?: unknown;
3
+ info?: Record<string, unknown>;
4
+ message: string;
5
+ props?: Record<string, unknown>;
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './domains/index.js';
2
+ export * from './utils/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './domains/index.js';
2
+ export * from './utils/index.js';
@@ -0,0 +1,2 @@
1
+ import { ConsoleCustomError } from './types.js';
2
+ export declare const consoleCustomError: ConsoleCustomError;
@@ -0,0 +1,12 @@
1
+ export const consoleCustomError = (customError) => {
2
+ console.error('***ERROR***:', customError.message);
3
+ if (customError.err) {
4
+ console.error('err:', JSON.stringify(customError.err));
5
+ }
6
+ if (customError.info) {
7
+ console.error('info:', customError.info);
8
+ }
9
+ if (customError.props) {
10
+ console.error('props:', customError.props);
11
+ }
12
+ };
@@ -0,0 +1,2 @@
1
+ import { CustomError } from '../../domains/index.js';
2
+ export type ConsoleCustomError = (customError: CustomError) => void;
@@ -0,0 +1 @@
1
+ export * from './console-custom-error/index.js';
@@ -0,0 +1 @@
1
+ export * from './console-custom-error/index.js';
@@ -0,0 +1 @@
1
+ export * from './custom-error/index.js';
@@ -0,0 +1 @@
1
+ export * from './custom-error/index.js';
package/src/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from './error/index.js';
1
2
  export * from './project/index.js';
package/src/index.js CHANGED
@@ -1 +1,2 @@
1
+ export * from './error/index.js';
1
2
  export * from './project/index.js';