@candlerip/shared 0.0.18 → 0.0.19

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.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/src/environment/environment-mode/constants.d.ts +1 -0
  3. package/src/environment/environment-mode/constants.js +1 -0
  4. package/src/environment/environment-mode/domains.d.ts +2 -0
  5. package/src/environment/environment-mode/domains.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.d.ts +1 -0
  11. package/src/environment/environment-mode/type-guards/is-development.js +1 -0
  12. package/src/environment/environment-mode/type-guards/is-environment-mode.d.ts +2 -0
  13. package/src/environment/environment-mode/type-guards/is-environment-mode.js +2 -0
  14. package/src/environment/environment-mode/type-guards/is-production.d.ts +1 -0
  15. package/src/environment/environment-mode/type-guards/is-production.js +1 -0
  16. package/src/environment/environment-variable/domains.d.ts +2 -0
  17. package/src/environment/environment-variable/domains.js +1 -0
  18. package/src/environment/environment-variable/index.d.ts +1 -0
  19. package/src/environment/environment-variable/index.js +1 -0
  20. package/src/environment/environment-variables/domains.d.ts +21 -0
  21. package/src/environment/environment-variables/domains.js +1 -0
  22. package/src/environment/environment-variables/index.d.ts +1 -0
  23. package/src/environment/environment-variables/index.js +1 -0
  24. package/src/environment/index.d.ts +3 -0
  25. package/src/environment/index.js +3 -0
  26. package/src/index.d.ts +1 -0
  27. package/src/index.js +1 -0
  28. package/src/service/index.d.ts +1 -0
  29. package/src/service/index.js +1 -0
  30. package/src/service/service-environment-variables/constants.d.ts +2 -0
  31. package/src/service/service-environment-variables/constants.js +5 -0
  32. package/src/service/service-environment-variables/index.d.ts +1 -0
  33. package/src/service/service-environment-variables/index.js +1 -0
  34. package/src/service/service-environment-variables/type.d.ts +5 -0
  35. package/src/service/service-environment-variables/type.js +1 -0
  36. package/src/service/service-name/constants.d.ts +1 -1
  37. package/src/service/service-name/constants.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candlerip/shared",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": "=22.19.0"
@@ -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 './constants.js';
2
+ export type EnvironmentMode = (typeof ENVIRONMENT_MODES)[number];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './constants.js';
2
+ export * from './domains.js';
3
+ export * from './type-guards/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './constants.js';
2
+ export * from './domains.js';
3
+ export * from './type-guards/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './is-development.js';
2
+ export * from './is-environment-mode.js';
3
+ export * from './is-production.js';
@@ -0,0 +1,3 @@
1
+ export * from './is-development.js';
2
+ export * from './is-environment-mode.js';
3
+ export * from './is-production.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 '../domains.js';
2
+ export declare const isEnvironmentMode: (data?: unknown) => data is EnvironmentMode;
@@ -0,0 +1,2 @@
1
+ import { ENVIRONMENT_MODES } from '../constants.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,2 @@
1
+ import { EnvironmentVariables } from '../environment-variables/index.js';
2
+ export type EnvironmentVariable = keyof EnvironmentVariables;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './domains.js';
@@ -0,0 +1 @@
1
+ export * from './domains.js';
@@ -0,0 +1,21 @@
1
+ import { EnvironmentMode } from '../environment-mode/index.js';
2
+ export type EnvironmentVariables = {
3
+ APP_NAME: string;
4
+ APP_PORT: number;
5
+ AWS_REGION: string;
6
+ AWS_S3_IMAGES_BUCKET_NAME: string;
7
+ CACHE_SERVICE_PORT: number;
8
+ CACHE_ENABLED: boolean;
9
+ DATABASE_URL: string;
10
+ DOMAIN_NAME: string;
11
+ EC2_IP_ADDRESS: string;
12
+ FRONTEND_URL: string;
13
+ LOGGER_SERVICE_PORT: number;
14
+ MOBILE_APP_URL: string;
15
+ NODE_ENV: EnvironmentMode;
16
+ RABBITMQ_URL: string;
17
+ REDIS_PWD: string;
18
+ REDIS_URL: string;
19
+ REDIS_URL_APP: string;
20
+ SSL_PRIVATE_KEY: string;
21
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './domains.js';
@@ -0,0 +1 @@
1
+ export * from './domains.js';
@@ -0,0 +1,3 @@
1
+ export * from './environment-mode/index.js';
2
+ export * from './environment-variable/index.js';
3
+ export * from './environment-variables/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './environment-mode/index.js';
2
+ export * from './environment-variable/index.js';
3
+ export * from './environment-variables/index.js';
package/src/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export * from './environment/index.js';
1
2
  export * from './service/index.js';
package/src/index.js CHANGED
@@ -1 +1,2 @@
1
+ export * from './environment/index.js';
1
2
  export * from './service/index.js';
@@ -1 +1,2 @@
1
+ export * from './service-environment-variables/index.js';
1
2
  export * from './service-name/index.js';
@@ -1 +1,2 @@
1
+ export * from './service-environment-variables/index.js';
1
2
  export * from './service-name/index.js';
@@ -0,0 +1,2 @@
1
+ import { ServiceEnvironmentVariables } from './type.js';
2
+ export declare const SERVICE_ENVIRONMENT_VARIABLES: ServiceEnvironmentVariables;
@@ -0,0 +1,5 @@
1
+ export const SERVICE_ENVIRONMENT_VARIABLES = {
2
+ 'environment-service': ['APP_NAME'],
3
+ 'cache-service': ['APP_NAME', 'MOBILE_APP_URL'],
4
+ nginx: ['APP_PORT', 'EC2_IP_ADDRESS', 'SSL_PRIVATE_KEY'],
5
+ };
@@ -0,0 +1 @@
1
+ export * from './constants.js';
@@ -0,0 +1 @@
1
+ export * from './constants.js';
@@ -0,0 +1,5 @@
1
+ import { EnvironmentVariable } from '../../environment/index.js';
2
+ import { ServiceName } from '../service-name/index.js';
3
+ export type ServiceEnvironmentVariables = {
4
+ [key in ServiceName]: EnvironmentVariable[];
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- export declare const SERVICE_NAMES: readonly ["cache-service", "environment-service"];
1
+ export declare const SERVICE_NAMES: readonly ["cache-service", "nginx", "environment-service"];
@@ -1 +1 @@
1
- export const SERVICE_NAMES = ['cache-service', 'environment-service'];
1
+ export const SERVICE_NAMES = ['cache-service', 'nginx', 'environment-service'];