podverse-helpers 5.1.24-alpha.0 → 5.1.27-alpha.0

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 (63) hide show
  1. package/dist/dtos/account/accountDataExport.d.ts +119 -0
  2. package/dist/dtos/account/accountDataExport.d.ts.map +1 -0
  3. package/dist/dtos/account/accountDataExport.js +2 -0
  4. package/dist/dtos/account/accountMembershipStatus.d.ts +1 -0
  5. package/dist/dtos/account/accountMembershipStatus.d.ts.map +1 -1
  6. package/dist/dtos/index.d.ts +1 -0
  7. package/dist/dtos/index.d.ts.map +1 -1
  8. package/dist/dtos/index.js +1 -0
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -0
  12. package/dist/lib/accountMembership.d.ts +15 -0
  13. package/dist/lib/accountMembership.d.ts.map +1 -1
  14. package/dist/lib/accountMembership.js +20 -0
  15. package/dist/lib/accountSignupMode.d.ts +2 -0
  16. package/dist/lib/accountSignupMode.d.ts.map +1 -0
  17. package/dist/lib/accountSignupMode.js +2 -0
  18. package/dist/lib/constants/index.d.ts +2 -0
  19. package/dist/lib/constants/index.d.ts.map +1 -0
  20. package/dist/lib/constants/index.js +17 -0
  21. package/dist/lib/constants/locales.d.ts +10 -0
  22. package/dist/lib/constants/locales.d.ts.map +1 -0
  23. package/dist/lib/constants/locales.js +12 -0
  24. package/dist/lib/i18n/timeFormatter.d.ts.map +1 -1
  25. package/dist/lib/i18n/timeFormatter.js +2 -2
  26. package/dist/lib/requests/_request.d.ts.map +1 -1
  27. package/dist/lib/requests/_request.js +7 -4
  28. package/dist/lib/requests/api/_request.d.ts +50 -1
  29. package/dist/lib/requests/api/_request.d.ts.map +1 -1
  30. package/dist/lib/requests/api/_request.js +107 -3
  31. package/dist/lib/requests/api/account/account.d.ts +26 -1
  32. package/dist/lib/requests/api/account/account.d.ts.map +1 -1
  33. package/dist/lib/requests/api/account/account.js +147 -3
  34. package/dist/lib/requests/api/account/follow/account.d.ts +8 -0
  35. package/dist/lib/requests/api/account/follow/account.d.ts.map +1 -1
  36. package/dist/lib/requests/api/account/follow/account.js +39 -0
  37. package/dist/lib/requests/api/membership/membership.d.ts +16 -0
  38. package/dist/lib/requests/api/membership/membership.d.ts.map +1 -0
  39. package/dist/lib/requests/api/membership/membership.js +20 -0
  40. package/dist/lib/requests/api/profile/profile.d.ts +16 -0
  41. package/dist/lib/requests/api/profile/profile.d.ts.map +1 -0
  42. package/dist/lib/requests/api/profile/profile.js +117 -0
  43. package/dist/lib/requests/api/queryParams.d.ts +14 -0
  44. package/dist/lib/requests/api/queryParams.d.ts.map +1 -1
  45. package/dist/lib/sharableStatus.d.ts +1 -0
  46. package/dist/lib/sharableStatus.d.ts.map +1 -1
  47. package/dist/lib/sharableStatus.js +11 -0
  48. package/dist/lib/time.d.ts +16 -0
  49. package/dist/lib/time.d.ts.map +1 -1
  50. package/dist/lib/time.js +41 -0
  51. package/dist/lib/validation/configValidation.d.ts +121 -0
  52. package/dist/lib/validation/configValidation.d.ts.map +1 -0
  53. package/dist/lib/validation/configValidation.js +204 -0
  54. package/dist/lib/validation/index.d.ts +2 -0
  55. package/dist/lib/validation/index.d.ts.map +1 -1
  56. package/dist/lib/validation/index.js +2 -0
  57. package/dist/lib/validation/startupValidation.d.ts +116 -0
  58. package/dist/lib/validation/startupValidation.d.ts.map +1 -0
  59. package/dist/lib/validation/startupValidation.js +497 -0
  60. package/dist/lib/validation/url.d.ts +36 -0
  61. package/dist/lib/validation/url.d.ts.map +1 -1
  62. package/dist/lib/validation/url.js +113 -0
  63. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"queryParams.d.ts","sourceRoot":"","sources":["../../../../src/lib/requests/api/queryParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACh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AM,cAAc,QAAO,MAMjC,CAAC"}
@@ -3,4 +3,5 @@ export declare enum SharableStatusEnum {
3
3
  Unlisted = 2,
4
4
  Private = 3
5
5
  }
6
+ export declare function getSharableStatusIdsForProfileType(type: 'global' | 'subscribed'): number[];
6
7
  //# sourceMappingURL=sharableStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sharableStatus.d.ts","sourceRoot":"","sources":["../../src/lib/sharableStatus.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB;IAC5B,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,OAAO,IAAI;CACZ"}
1
+ {"version":3,"file":"sharableStatus.d.ts","sourceRoot":"","sources":["../../src/lib/sharableStatus.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB;IAC5B,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,OAAO,IAAI;CACZ;AAED,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,MAAM,EAAE,CAS1F"}
@@ -1,9 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SharableStatusEnum = void 0;
4
+ exports.getSharableStatusIdsForProfileType = getSharableStatusIdsForProfileType;
4
5
  var SharableStatusEnum;
5
6
  (function (SharableStatusEnum) {
6
7
  SharableStatusEnum[SharableStatusEnum["Public"] = 1] = "Public";
7
8
  SharableStatusEnum[SharableStatusEnum["Unlisted"] = 2] = "Unlisted";
8
9
  SharableStatusEnum[SharableStatusEnum["Private"] = 3] = "Private";
9
10
  })(SharableStatusEnum || (exports.SharableStatusEnum = SharableStatusEnum = {}));
11
+ function getSharableStatusIdsForProfileType(type) {
12
+ switch (type) {
13
+ case 'global':
14
+ return [SharableStatusEnum.Public];
15
+ case 'subscribed':
16
+ return [SharableStatusEnum.Public, SharableStatusEnum.Unlisted];
17
+ default:
18
+ return [SharableStatusEnum.Public];
19
+ }
20
+ }
@@ -8,4 +8,20 @@ export declare function formatNumericToHHMMSS(sec: string): string;
8
8
  export declare function formatInputToHHMMSS(input: string): string;
9
9
  export declare function hhmmssToSecondsNumeric(time: string): string;
10
10
  export declare function hhmmssToSecondsNumber(time: string): number;
11
+ export type TimeRemaining = {
12
+ daysLeft: number | null;
13
+ hoursLeft: number | null;
14
+ minutesLeft: number | null;
15
+ };
16
+ /**
17
+ * Calculates the time remaining until an expiration date.
18
+ * Returns an object with days, hours, or minutes left based on the remaining time:
19
+ * - If less than 1 hour: sets minutes only
20
+ * - If less than 24 hours: sets hours only
21
+ * - If 24 hours or more: sets days only
22
+ *
23
+ * @param expirationDate - The expiration date as a Date object or ISO string
24
+ * @returns Object with daysLeft, hoursLeft, and minutesLeft
25
+ */
26
+ export declare function calculateTimeRemaining(expirationDate: Date | string | null | undefined): TimeRemaining;
11
27
  //# sourceMappingURL=time.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/lib/time.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,UAWvC;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAYzD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAmBzD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ3D;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ1D"}
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/lib/time.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,UAWvC;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAYzD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAmBzD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ3D;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ1D;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAC/C,aAAa,CA+Bf"}
package/dist/lib/time.js CHANGED
@@ -6,6 +6,7 @@ exports.formatNumericToHHMMSS = formatNumericToHHMMSS;
6
6
  exports.formatInputToHHMMSS = formatInputToHHMMSS;
7
7
  exports.hhmmssToSecondsNumeric = hhmmssToSecondsNumeric;
8
8
  exports.hhmmssToSecondsNumber = hhmmssToSecondsNumber;
9
+ exports.calculateTimeRemaining = calculateTimeRemaining;
9
10
  exports.TIME_CONSTANTS = {
10
11
  ONE_DAY_IN_MINUTES: 1440,
11
12
  ONE_WEEK_IN_MINUTES: 10080,
@@ -77,3 +78,43 @@ function hhmmssToSecondsNumber(time) {
77
78
  seconds += parts[2] * 3600;
78
79
  return Number(seconds.toFixed(2));
79
80
  }
81
+ /**
82
+ * Calculates the time remaining until an expiration date.
83
+ * Returns an object with days, hours, or minutes left based on the remaining time:
84
+ * - If less than 1 hour: sets minutes only
85
+ * - If less than 24 hours: sets hours only
86
+ * - If 24 hours or more: sets days only
87
+ *
88
+ * @param expirationDate - The expiration date as a Date object or ISO string
89
+ * @returns Object with daysLeft, hoursLeft, and minutesLeft
90
+ */
91
+ function calculateTimeRemaining(expirationDate) {
92
+ const result = {
93
+ daysLeft: null,
94
+ hoursLeft: null,
95
+ minutesLeft: null,
96
+ };
97
+ if (!expirationDate) {
98
+ return result;
99
+ }
100
+ const expiration = typeof expirationDate === 'string' ? new Date(expirationDate) : expirationDate;
101
+ const now = new Date();
102
+ const diffTime = Math.max(0, expiration.getTime() - now.getTime());
103
+ const diffHours = diffTime / (1000 * 60 * 60);
104
+ const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
105
+ const diffMinutes = Math.ceil(diffTime / (1000 * 60));
106
+ const diffHoursRounded = Math.ceil(diffTime / (1000 * 60 * 60));
107
+ if (diffHours < 1) {
108
+ // Less than an hour left - show minutes
109
+ result.minutesLeft = diffMinutes;
110
+ }
111
+ else if (diffHours < 24) {
112
+ // Less than a day but at least an hour - show hours
113
+ result.hoursLeft = diffHoursRounded;
114
+ }
115
+ else {
116
+ // At least a day left - show days
117
+ result.daysLeft = diffDays;
118
+ }
119
+ return result;
120
+ }
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Configuration validation utilities for podverse modules.
3
+ *
4
+ * These functions validate configuration objects that are passed to module factories.
5
+ * They should be called at app startup BEFORE creating module contexts.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * const ormConfig: ORMConfig = { database: {...}, log: {...}, defaults: {...} };
10
+ * validateORMConfig(ormConfig); // Throws if invalid
11
+ * const ormContext = createORMContext(ormConfig);
12
+ * ```
13
+ */
14
+ export type ConfigValidationError = {
15
+ field: string;
16
+ message: string;
17
+ required: boolean;
18
+ };
19
+ export type ConfigValidationResult = {
20
+ valid: boolean;
21
+ errors: ConfigValidationError[];
22
+ };
23
+ /**
24
+ * Validates ORM configuration
25
+ */
26
+ export type ORMConfig = {
27
+ nodeEnv?: string;
28
+ database: {
29
+ host: string;
30
+ port: number;
31
+ read_username: string;
32
+ read_password: string;
33
+ read_write_username: string;
34
+ read_write_password: string;
35
+ database: string;
36
+ ssl_connection: boolean;
37
+ };
38
+ log: {
39
+ level: string;
40
+ dir?: string;
41
+ timer?: boolean;
42
+ };
43
+ defaults: {
44
+ account: {
45
+ settings: {
46
+ locale: string;
47
+ };
48
+ };
49
+ };
50
+ };
51
+ export declare function validateORMConfig(config: ORMConfig): ConfigValidationResult;
52
+ /**
53
+ * Validates Notifications configuration
54
+ */
55
+ export type NotificationsConfig = {
56
+ brandName: string;
57
+ web: {
58
+ protocol: string;
59
+ host: string;
60
+ icon_image_path: string;
61
+ };
62
+ webpush: {
63
+ enabled: boolean;
64
+ vapid_public_key: string;
65
+ vapid_private_key: string;
66
+ vapid_subject: string;
67
+ };
68
+ };
69
+ export declare function validateNotificationsConfig(config: NotificationsConfig): ConfigValidationResult;
70
+ /**
71
+ * Validates External Services configuration
72
+ */
73
+ export type ExternalServicesConfig = {
74
+ firebase: {
75
+ notifications_enabled: boolean;
76
+ admin_json_key_path: string;
77
+ };
78
+ web: {
79
+ protocol: string;
80
+ host: string;
81
+ icon_image_url: string;
82
+ };
83
+ };
84
+ export declare function validateExternalServicesConfig(config: ExternalServicesConfig): ConfigValidationResult;
85
+ /**
86
+ * Validates Parser configuration
87
+ */
88
+ export type ParserConfig = {
89
+ userAgent: string;
90
+ log: {
91
+ level: string;
92
+ dir?: string;
93
+ timer?: boolean;
94
+ };
95
+ firebase: {
96
+ notifications_enabled: boolean;
97
+ authJsonPath?: string;
98
+ };
99
+ podcastIndex: {
100
+ authKey: string;
101
+ baseUrl: string;
102
+ secretKey: string;
103
+ rateLimitDelay?: number;
104
+ };
105
+ parser: {
106
+ addRemoteItemsToMQ: boolean;
107
+ };
108
+ defaults: {
109
+ account: {
110
+ settings: {
111
+ locale: string;
112
+ };
113
+ };
114
+ };
115
+ };
116
+ export declare function validateParserConfig(config: ParserConfig): ConfigValidationResult;
117
+ /**
118
+ * Helper function to throw an error if validation fails
119
+ */
120
+ export declare function assertConfigValid(result: ConfigValidationResult, configName: string): void;
121
+ //# sourceMappingURL=configValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configValidation.d.ts","sourceRoot":"","sources":["../../../src/lib/validation/configValidation.ts"],"names":[],"mappings":"AAAA;;;;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,MAAM,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAK1F"}
@@ -0,0 +1,204 @@
1
+ "use strict";
2
+ /**
3
+ * Configuration validation utilities for podverse modules.
4
+ *
5
+ * These functions validate configuration objects that are passed to module factories.
6
+ * They should be called at app startup BEFORE creating module contexts.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const ormConfig: ORMConfig = { database: {...}, log: {...}, defaults: {...} };
11
+ * validateORMConfig(ormConfig); // Throws if invalid
12
+ * const ormContext = createORMContext(ormConfig);
13
+ * ```
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.validateORMConfig = validateORMConfig;
17
+ exports.validateNotificationsConfig = validateNotificationsConfig;
18
+ exports.validateExternalServicesConfig = validateExternalServicesConfig;
19
+ exports.validateParserConfig = validateParserConfig;
20
+ exports.assertConfigValid = assertConfigValid;
21
+ function createError(field, message, required = true) {
22
+ return { field, message, required };
23
+ }
24
+ function validateORMConfig(config) {
25
+ var _a, _b;
26
+ const errors = [];
27
+ // Database config validation
28
+ if (!config.database) {
29
+ errors.push(createError('database', 'Database configuration is required'));
30
+ }
31
+ else {
32
+ if (!config.database.host || config.database.host.trim() === '') {
33
+ errors.push(createError('database.host', 'Database host is required'));
34
+ }
35
+ if (!config.database.port || config.database.port <= 0) {
36
+ errors.push(createError('database.port', 'Database port must be a positive number'));
37
+ }
38
+ if (!config.database.read_username || config.database.read_username.trim() === '') {
39
+ errors.push(createError('database.read_username', 'Database read username is required'));
40
+ }
41
+ if (!config.database.read_password) {
42
+ errors.push(createError('database.read_password', 'Database read password is required'));
43
+ }
44
+ if (!config.database.read_write_username || config.database.read_write_username.trim() === '') {
45
+ errors.push(createError('database.read_write_username', 'Database read-write username is required'));
46
+ }
47
+ if (!config.database.read_write_password) {
48
+ errors.push(createError('database.read_write_password', 'Database read-write password is required'));
49
+ }
50
+ if (!config.database.database || config.database.database.trim() === '') {
51
+ errors.push(createError('database.database', 'Database name is required'));
52
+ }
53
+ }
54
+ // Log config validation
55
+ if (!config.log) {
56
+ errors.push(createError('log', 'Log configuration is required'));
57
+ }
58
+ else {
59
+ if (!config.log.level || config.log.level.trim() === '') {
60
+ errors.push(createError('log.level', 'Log level is required'));
61
+ }
62
+ }
63
+ // Defaults validation
64
+ if (!config.defaults) {
65
+ errors.push(createError('defaults', 'Defaults configuration is required'));
66
+ }
67
+ else {
68
+ if (!((_b = (_a = config.defaults.account) === null || _a === void 0 ? void 0 : _a.settings) === null || _b === void 0 ? void 0 : _b.locale)) {
69
+ errors.push(createError('defaults.account.settings.locale', 'Default account locale is required'));
70
+ }
71
+ }
72
+ return {
73
+ valid: errors.length === 0,
74
+ errors
75
+ };
76
+ }
77
+ function validateNotificationsConfig(config) {
78
+ var _a;
79
+ const errors = [];
80
+ // Brand name validation
81
+ if (!config.brandName || config.brandName.trim() === '') {
82
+ errors.push(createError('brandName', 'Brand name is required'));
83
+ }
84
+ // Web config validation
85
+ if (!config.web) {
86
+ errors.push(createError('web', 'Web configuration is required'));
87
+ }
88
+ else {
89
+ if (!config.web.protocol || config.web.protocol.trim() === '') {
90
+ errors.push(createError('web.protocol', 'Web protocol is required'));
91
+ }
92
+ if (!config.web.host || config.web.host.trim() === '') {
93
+ errors.push(createError('web.host', 'Web host is required'));
94
+ }
95
+ if (!config.web.icon_image_path || config.web.icon_image_path.trim() === '') {
96
+ errors.push(createError('web.icon_image_path', 'Web icon image path is required'));
97
+ }
98
+ }
99
+ // WebPush config validation (only required fields if enabled)
100
+ if ((_a = config.webpush) === null || _a === void 0 ? void 0 : _a.enabled) {
101
+ if (!config.webpush.vapid_public_key || config.webpush.vapid_public_key.trim() === '') {
102
+ errors.push(createError('webpush.vapid_public_key', 'VAPID public key is required when WebPush is enabled'));
103
+ }
104
+ if (!config.webpush.vapid_private_key || config.webpush.vapid_private_key.trim() === '') {
105
+ errors.push(createError('webpush.vapid_private_key', 'VAPID private key is required when WebPush is enabled'));
106
+ }
107
+ if (!config.webpush.vapid_subject || config.webpush.vapid_subject.trim() === '') {
108
+ errors.push(createError('webpush.vapid_subject', 'VAPID subject is required when WebPush is enabled'));
109
+ }
110
+ }
111
+ return {
112
+ valid: errors.length === 0,
113
+ errors
114
+ };
115
+ }
116
+ function validateExternalServicesConfig(config) {
117
+ var _a;
118
+ const errors = [];
119
+ // Firebase config validation (only required fields if enabled)
120
+ if ((_a = config.firebase) === null || _a === void 0 ? void 0 : _a.notifications_enabled) {
121
+ if (!config.firebase.admin_json_key_path || config.firebase.admin_json_key_path.trim() === '') {
122
+ errors.push(createError('firebase.admin_json_key_path', 'Firebase admin JSON key path is required when Firebase is enabled'));
123
+ }
124
+ }
125
+ // Web config validation
126
+ if (!config.web) {
127
+ errors.push(createError('web', 'Web configuration is required'));
128
+ }
129
+ else {
130
+ if (!config.web.protocol || config.web.protocol.trim() === '') {
131
+ errors.push(createError('web.protocol', 'Web protocol is required'));
132
+ }
133
+ if (!config.web.host || config.web.host.trim() === '') {
134
+ errors.push(createError('web.host', 'Web host is required'));
135
+ }
136
+ if (!config.web.icon_image_url || config.web.icon_image_url.trim() === '') {
137
+ errors.push(createError('web.icon_image_url', 'Web icon image URL is required'));
138
+ }
139
+ }
140
+ return {
141
+ valid: errors.length === 0,
142
+ errors
143
+ };
144
+ }
145
+ function validateParserConfig(config) {
146
+ var _a, _b, _c;
147
+ const errors = [];
148
+ // User agent validation
149
+ if (!config.userAgent || config.userAgent.trim() === '') {
150
+ errors.push(createError('userAgent', 'User agent is required'));
151
+ }
152
+ // Log config validation
153
+ if (!config.log) {
154
+ errors.push(createError('log', 'Log configuration is required'));
155
+ }
156
+ else {
157
+ if (!config.log.level || config.log.level.trim() === '') {
158
+ errors.push(createError('log.level', 'Log level is required'));
159
+ }
160
+ }
161
+ // Firebase config validation (only required fields if enabled)
162
+ if ((_a = config.firebase) === null || _a === void 0 ? void 0 : _a.notifications_enabled) {
163
+ if (!config.firebase.authJsonPath || config.firebase.authJsonPath.trim() === '') {
164
+ errors.push(createError('firebase.authJsonPath', 'Firebase auth JSON path is required when Firebase is enabled'));
165
+ }
166
+ }
167
+ // Podcast Index config validation
168
+ if (!config.podcastIndex) {
169
+ errors.push(createError('podcastIndex', 'Podcast Index configuration is required'));
170
+ }
171
+ else {
172
+ if (!config.podcastIndex.authKey || config.podcastIndex.authKey.trim() === '') {
173
+ errors.push(createError('podcastIndex.authKey', 'Podcast Index auth key is required'));
174
+ }
175
+ if (!config.podcastIndex.baseUrl || config.podcastIndex.baseUrl.trim() === '') {
176
+ errors.push(createError('podcastIndex.baseUrl', 'Podcast Index base URL is required'));
177
+ }
178
+ if (!config.podcastIndex.secretKey || config.podcastIndex.secretKey.trim() === '') {
179
+ errors.push(createError('podcastIndex.secretKey', 'Podcast Index secret key is required'));
180
+ }
181
+ }
182
+ // Defaults validation
183
+ if (!config.defaults) {
184
+ errors.push(createError('defaults', 'Defaults configuration is required'));
185
+ }
186
+ else {
187
+ if (!((_c = (_b = config.defaults.account) === null || _b === void 0 ? void 0 : _b.settings) === null || _c === void 0 ? void 0 : _c.locale)) {
188
+ errors.push(createError('defaults.account.settings.locale', 'Default account locale is required'));
189
+ }
190
+ }
191
+ return {
192
+ valid: errors.length === 0,
193
+ errors
194
+ };
195
+ }
196
+ /**
197
+ * Helper function to throw an error if validation fails
198
+ */
199
+ function assertConfigValid(result, configName) {
200
+ if (!result.valid) {
201
+ const errorMessages = result.errors.map(e => ` - ${e.field}: ${e.message}`).join('\n');
202
+ throw new Error(`FATAL: ${configName} validation failed:\n${errorMessages}`);
203
+ }
204
+ }
@@ -1,6 +1,8 @@
1
+ export * from './configValidation';
1
2
  export * from './databaseConstants';
2
3
  export * from './email';
3
4
  export * from './password';
4
5
  export * from './signUpValidation';
6
+ export * from './startupValidation';
5
7
  export * from './url';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,OAAO,CAAC"}
@@ -14,8 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./configValidation"), exports);
17
18
  __exportStar(require("./databaseConstants"), exports);
18
19
  __exportStar(require("./email"), exports);
19
20
  __exportStar(require("./password"), exports);
20
21
  __exportStar(require("./signUpValidation"), exports);
22
+ __exportStar(require("./startupValidation"), exports);
21
23
  __exportStar(require("./url"), exports);
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Types and functions for validating environment variables at application startup.
3
+ * These utilities can be used across different projects to validate required and optional environment variables.
4
+ */
5
+ export type ValidationResult = {
6
+ name: string;
7
+ isSet: boolean;
8
+ isValid: boolean;
9
+ isRequired: boolean;
10
+ message: string;
11
+ category: string;
12
+ };
13
+ export type ValidationSummary = {
14
+ total: number;
15
+ passed: number;
16
+ failed: number;
17
+ requiredMissing: number;
18
+ skipped: number;
19
+ defaultsUsed: number;
20
+ results: ValidationResult[];
21
+ };
22
+ /**
23
+ * Validates a required environment variable
24
+ * @param varName - The name of the environment variable to validate
25
+ * @param category - The category/group this variable belongs to (for display purposes)
26
+ * @returns ValidationResult indicating whether the variable is set and valid
27
+ */
28
+ export declare function validateRequired(varName: string, category: string): ValidationResult;
29
+ /**
30
+ * Validates an optional environment variable
31
+ * @param varName - The name of the environment variable to validate
32
+ * @param category - The category/group this variable belongs to (for display purposes)
33
+ * @param defaultMessage - Optional message to display when variable is not set (defaults to "Skipped")
34
+ * @returns ValidationResult indicating whether the variable is set and valid (optional vars are always valid even if not set)
35
+ */
36
+ export declare function validateOptional(varName: string, category: string, defaultMessage?: string): ValidationResult;
37
+ /**
38
+ * Validates a conditionally optional environment variable (only logs if set but not needed)
39
+ * Returns null if variable is not set (so it won't be included in results)
40
+ * @param varName - The name of the environment variable to validate
41
+ * @param category - The category/group this variable belongs to (for display purposes)
42
+ * @returns ValidationResult if variable is set, null otherwise
43
+ */
44
+ export declare function validateConditionalOptional(varName: string, category: string): ValidationResult | null;
45
+ /**
46
+ * Generates a validation error message for variables that accept "all-available" or comma-delimited list
47
+ * @param validValues - Array of valid values that can be used in the comma-delimited list
48
+ * @returns Error message string
49
+ */
50
+ export declare function getAllAvailableOrListMessage(validValues: string[]): string;
51
+ /**
52
+ * Displays validation results silently - only logs failures.
53
+ * This is intended for modules (not apps) that should not show validation output unless there are errors.
54
+ * @param summary - The validation summary to display
55
+ */
56
+ export declare function displayValidationResultsSilent(summary: ValidationSummary): void;
57
+ /**
58
+ * Validates a single locale value against supported locales
59
+ * @param varName - The name of the environment variable to validate
60
+ * @param category - The category/group this variable belongs to (for display purposes)
61
+ * @param isRequired - Whether the variable is required (default: true)
62
+ * @returns ValidationResult indicating whether the locale is valid
63
+ */
64
+ export declare function validateLocale(varName: string, category: string, isRequired?: boolean): ValidationResult;
65
+ /**
66
+ * Validates NEXT_PUBLIC_FEATURES_SUPPORTED_LOCALES
67
+ * Must be "all-available" or comma-delimited list of valid locales
68
+ * @param varName - The name of the environment variable to validate (defaults to 'NEXT_PUBLIC_FEATURES_SUPPORTED_LOCALES')
69
+ * @param category - The category/group this variable belongs to (for display purposes)
70
+ * @returns ValidationResult indicating whether the supported locales list is valid
71
+ */
72
+ export declare function validateSupportedLocalesList(varName: string | undefined, category: string): ValidationResult;
73
+ /**
74
+ * Validates an optional environment variable - if set, must not be empty
75
+ * @param varName - The name of the environment variable to validate
76
+ * @param category - The category/group this variable belongs to (for display purposes)
77
+ * @returns ValidationResult indicating whether the variable is valid (optional, but if set must not be empty)
78
+ */
79
+ export declare function validateOptionalNonEmpty(varName: string, category: string): ValidationResult;
80
+ /**
81
+ * Validates a boolean environment variable - must be "true" or "false" if set
82
+ * @param varName - The name of the environment variable to validate
83
+ * @param category - The category/group this variable belongs to (for display purposes)
84
+ * @param isRequired - Whether the variable is required (default: false)
85
+ * @param defaultValue - Optional default value message if not set (e.g., "Use Default (false)")
86
+ * @returns ValidationResult indicating whether the boolean value is valid
87
+ */
88
+ export declare function validateBoolean(varName: string, category: string, isRequired?: boolean, defaultValue?: string): ValidationResult;
89
+ /**
90
+ * Validates WEB_PROTOCOL - must be "http" or "https" if set
91
+ * @param varName - The name of the environment variable to validate (defaults to 'WEB_PROTOCOL')
92
+ * @param category - The category/group this variable belongs to (for display purposes)
93
+ * @param isRequired - Whether the variable is required (default: false)
94
+ * @returns ValidationResult indicating whether the protocol is valid
95
+ */
96
+ export declare function validateWebProtocol(varName: string | undefined, category: string, isRequired?: boolean): ValidationResult;
97
+ /**
98
+ * Validates LOG_LEVEL - must be a valid winston log level
99
+ * @param varName - The name of the environment variable to validate (defaults to 'LOG_LEVEL')
100
+ * @param category - The category/group this variable belongs to (for display purposes)
101
+ * @param isRequired - Whether the variable is required (default: true)
102
+ * @param validLevels - Optional array of valid log levels (defaults to winston levels)
103
+ * @returns ValidationResult indicating whether the log level is valid
104
+ */
105
+ export declare function validateLogLevel(varName: string | undefined, category: string, isRequired?: boolean, validLevels?: string[]): ValidationResult;
106
+ /**
107
+ * Validates a positive number environment variable
108
+ * @param varName - The name of the environment variable to validate
109
+ * @param category - The category/group this variable belongs to (for display purposes)
110
+ * @param isRequired - Whether the variable is required (default: false)
111
+ * @param min - Optional minimum value (default: 1)
112
+ * @param max - Optional maximum value (no limit if not specified)
113
+ * @returns ValidationResult indicating whether the number is valid
114
+ */
115
+ export declare function validatePositiveNumber(varName: string, category: string, isRequired?: boolean, min?: number, max?: number): ValidationResult;
116
+ //# sourceMappingURL=startupValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"startupValidation.d.ts","sourceRoot":"","sources":["../../../src/lib/validation/startupValidation.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CA0CpF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,GAAE,MAAkB,GAAG,gBAAgB,CA2BxH;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAgCtG;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B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