@candlerip/shared3 0.0.5 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/package.json +1 -1
  2. package/src/environment/environment-mode/configs/index.d.ts +1 -0
  3. package/src/environment/environment-mode/configs/index.js +1 -0
  4. package/src/environment/environment-mode/domains/index.d.ts +2 -0
  5. package/src/environment/environment-mode/domains/index.js +1 -0
  6. package/src/environment/environment-mode/index.d.ts +3 -0
  7. package/src/environment/environment-mode/index.js +3 -0
  8. package/src/environment/environment-mode/type-guards/index.d.ts +3 -0
  9. package/src/environment/environment-mode/type-guards/index.js +3 -0
  10. package/src/environment/environment-mode/type-guards/is-development/index.d.ts +1 -0
  11. package/src/environment/environment-mode/type-guards/is-development/index.js +1 -0
  12. package/src/environment/environment-mode/type-guards/is-environment-mode/index.d.ts +2 -0
  13. package/src/environment/environment-mode/type-guards/is-environment-mode/index.js +2 -0
  14. package/src/environment/environment-mode/type-guards/is-production/index.d.ts +1 -0
  15. package/src/environment/environment-mode/type-guards/is-production/index.js +1 -0
  16. package/src/environment/environment-variables/domains/index.d.ts +5 -0
  17. package/src/environment/environment-variables/domains/index.js +1 -0
  18. package/src/environment/environment-variables/index.d.ts +1 -0
  19. package/src/environment/environment-variables/index.js +1 -0
  20. package/src/error/custom-error/domains/index.d.ts +6 -0
  21. package/src/error/custom-error/domains/index.js +1 -0
  22. package/src/error/custom-error/index.d.ts +2 -0
  23. package/src/error/custom-error/index.js +2 -0
  24. package/src/error/custom-error/utils/console-custom-error/index.d.ts +2 -0
  25. package/src/error/custom-error/utils/console-custom-error/index.js +12 -0
  26. package/src/error/custom-error/utils/console-custom-error/types.d.ts +2 -0
  27. package/src/error/custom-error/utils/console-custom-error/types.js +1 -0
  28. package/src/error/custom-error/utils/index.d.ts +1 -0
  29. package/src/error/custom-error/utils/index.js +1 -0
  30. package/src/error/index.d.ts +1 -0
  31. package/src/error/index.js +1 -0
  32. package/src/index.d.ts +1 -0
  33. package/src/index.js +1 -0
  34. package/src/project/index.d.ts +1 -0
  35. package/src/project/index.js +1 -0
  36. package/src/project/service/index.d.ts +2 -0
  37. package/src/project/service/index.js +2 -0
  38. package/src/project/service/service-config/domains/index.d.ts +2 -0
  39. package/src/project/service/service-config/domains/index.js +1 -0
  40. package/src/project/service/service-config/index.d.ts +1 -0
  41. package/src/project/service/service-config/index.js +1 -0
  42. package/src/project/service/service-name/configs/index.d.ts +1 -0
  43. package/src/project/service/service-name/configs/index.js +1 -0
  44. package/src/project/service/service-name/domains/index.d.ts +2 -0
  45. package/src/project/service/service-name/domains/index.js +1 -0
  46. package/src/project/service/service-name/index.d.ts +2 -0
  47. package/src/project/service/service-name/index.js +2 -0
  48. package/src/project/stack/stack-name/configs/index.d.ts +1 -1
  49. package/src/project/stack/stack-name/configs/index.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candlerip/shared3",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -0,0 +1 @@
1
+ export declare const ENVIRONMENT_MODES: readonly ["development", "production"];
@@ -0,0 +1 @@
1
+ export const ENVIRONMENT_MODES = ['development', 'production'];
@@ -0,0 +1,2 @@
1
+ import { ENVIRONMENT_MODES } from '../configs/index.js';
2
+ export type EnvironmentMode = (typeof ENVIRONMENT_MODES)[number];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './configs/index.js';
2
+ export * from './domains/index.js';
3
+ export * from './type-guards/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './configs/index.js';
2
+ export * from './domains/index.js';
3
+ export * from './type-guards/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './is-development/index.js';
2
+ export * from './is-environment-mode/index.js';
3
+ export * from './is-production/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './is-development/index.js';
2
+ export * from './is-environment-mode/index.js';
3
+ export * from './is-production/index.js';
@@ -0,0 +1 @@
1
+ export declare const isDevelopment: (data?: unknown) => data is "development";
@@ -0,0 +1 @@
1
+ export const isDevelopment = (data) => data === 'development';
@@ -0,0 +1,2 @@
1
+ import { EnvironmentMode } from '../../index.js';
2
+ export declare const isEnvironmentMode: (data?: unknown) => data is EnvironmentMode;
@@ -0,0 +1,2 @@
1
+ import { ENVIRONMENT_MODES } from '../../configs/index.js';
2
+ export const isEnvironmentMode = (data) => ENVIRONMENT_MODES.some((it) => data === it);
@@ -0,0 +1 @@
1
+ export declare const isProduction: (data?: unknown) => data is "production";
@@ -0,0 +1 @@
1
+ export const isProduction = (data) => data === 'production';
@@ -0,0 +1,5 @@
1
+ export interface EnvironmentVariables {
2
+ DICTIONARY_SERVICE_PORT: number;
3
+ PROJECT_NAME: string;
4
+ S3_IMAGES_BUCKET_NAME: string;
5
+ }
@@ -0,0 +1 @@
1
+ export * from './domains/index.js';
@@ -0,0 +1 @@
1
+ export * from './domains/index.js';
@@ -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';
@@ -1 +1,2 @@
1
+ export * from './service/index.js';
1
2
  export * from './stack/index.js';
@@ -1 +1,2 @@
1
+ export * from './service/index.js';
1
2
  export * from './stack/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './service-config/index.js';
2
+ export * from './service-name/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './service-config/index.js';
2
+ export * from './service-name/index.js';
@@ -0,0 +1,2 @@
1
+ import { EnvironmentVariables } from '../../../../environment/environment-variables/index.js';
2
+ export type DictionaryServiceConfig = Pick<EnvironmentVariables, 'DICTIONARY_SERVICE_PORT'>;
@@ -0,0 +1 @@
1
+ export * from './domains/index.js';
@@ -0,0 +1 @@
1
+ export * from './domains/index.js';
@@ -0,0 +1 @@
1
+ export declare const SERVICE_NAMES: readonly ["dictionary-service"];
@@ -0,0 +1 @@
1
+ export const SERVICE_NAMES = ['dictionary-service'];
@@ -0,0 +1,2 @@
1
+ import { SERVICE_NAMES } from '../configs/index.js';
2
+ export type ServiceName = (typeof SERVICE_NAMES)[number];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './configs/index.js';
2
+ export * from './domains/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './configs/index.js';
2
+ export * from './domains/index.js';
@@ -1 +1 @@
1
- export declare const STACK_NAMES: readonly ["app-config", "backend-init", "dictionary-service"];
1
+ export declare const STACK_NAMES: readonly ["backend-init", "dictionary-service", "service-config"];
@@ -1 +1 @@
1
- export const STACK_NAMES = ['app-config', 'backend-init', 'dictionary-service'];
1
+ export const STACK_NAMES = ['backend-init', 'dictionary-service', 'service-config'];