@sudobility/types 1.8.21
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.
- package/CLAUDE.md +285 -0
- package/README.md +310 -0
- package/dist/index.cjs +62 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -0
- package/dist/types/blockchain/common.cjs +102 -0
- package/dist/types/blockchain/common.d.ts +262 -0
- package/dist/types/blockchain/common.d.ts.map +1 -0
- package/dist/types/blockchain/common.js +102 -0
- package/dist/types/blockchain/common.js.map +1 -0
- package/dist/types/blockchain/index.cjs +18 -0
- package/dist/types/blockchain/index.d.ts +4 -0
- package/dist/types/blockchain/index.d.ts.map +1 -0
- package/dist/types/blockchain/index.js +18 -0
- package/dist/types/blockchain/index.js.map +1 -0
- package/dist/types/blockchain/validation.cjs +88 -0
- package/dist/types/blockchain/validation.d.ts +9 -0
- package/dist/types/blockchain/validation.d.ts.map +1 -0
- package/dist/types/blockchain/validation.js +88 -0
- package/dist/types/blockchain/validation.js.map +1 -0
- package/dist/types/business/enums.cjs +314 -0
- package/dist/types/business/enums.d.ts +227 -0
- package/dist/types/business/enums.d.ts.map +1 -0
- package/dist/types/business/enums.js +314 -0
- package/dist/types/business/enums.js.map +1 -0
- package/dist/types/business/index.cjs +33 -0
- package/dist/types/business/index.d.ts +5 -0
- package/dist/types/business/index.d.ts.map +1 -0
- package/dist/types/business/index.js +33 -0
- package/dist/types/business/index.js.map +1 -0
- package/dist/types/business/wallet-status.cjs +38 -0
- package/dist/types/business/wallet-status.d.ts +32 -0
- package/dist/types/business/wallet-status.d.ts.map +1 -0
- package/dist/types/business/wallet-status.js +38 -0
- package/dist/types/business/wallet-status.js.map +1 -0
- package/dist/types/common.cjs +6 -0
- package/dist/types/common.d.ts +142 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +6 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/config/app-config.cjs +6 -0
- package/dist/types/config/app-config.d.ts +67 -0
- package/dist/types/config/app-config.d.ts.map +1 -0
- package/dist/types/config/app-config.js +6 -0
- package/dist/types/config/app-config.js.map +1 -0
- package/dist/types/config/environment.cjs +24 -0
- package/dist/types/config/environment.d.ts +68 -0
- package/dist/types/config/environment.d.ts.map +1 -0
- package/dist/types/config/environment.js +24 -0
- package/dist/types/config/environment.js.map +1 -0
- package/dist/types/config/index.cjs +6 -0
- package/dist/types/config/index.d.ts +4 -0
- package/dist/types/config/index.d.ts.map +1 -0
- package/dist/types/config/index.js +6 -0
- package/dist/types/config/index.js.map +1 -0
- package/dist/types/index.cjs +35 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +35 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/indexer/index.cjs +19 -0
- package/dist/types/indexer/index.d.ts +3 -0
- package/dist/types/indexer/index.d.ts.map +1 -0
- package/dist/types/indexer/index.js +19 -0
- package/dist/types/indexer/index.js.map +1 -0
- package/dist/types/indexer/indexer-guards.cjs +145 -0
- package/dist/types/indexer/indexer-guards.d.ts +26 -0
- package/dist/types/indexer/indexer-guards.d.ts.map +1 -0
- package/dist/types/indexer/indexer-guards.js +145 -0
- package/dist/types/indexer/indexer-guards.js.map +1 -0
- package/dist/types/indexer/indexer-responses.cjs +8 -0
- package/dist/types/indexer/indexer-responses.d.ts +136 -0
- package/dist/types/indexer/indexer-responses.d.ts.map +1 -0
- package/dist/types/indexer/indexer-responses.js +8 -0
- package/dist/types/indexer/indexer-responses.js.map +1 -0
- package/dist/types/infrastructure/analytics.cjs +212 -0
- package/dist/types/infrastructure/analytics.d.ts +449 -0
- package/dist/types/infrastructure/analytics.d.ts.map +1 -0
- package/dist/types/infrastructure/analytics.js +212 -0
- package/dist/types/infrastructure/analytics.js.map +1 -0
- package/dist/types/infrastructure/api.cjs +17 -0
- package/dist/types/infrastructure/api.d.ts +152 -0
- package/dist/types/infrastructure/api.d.ts.map +1 -0
- package/dist/types/infrastructure/api.js +17 -0
- package/dist/types/infrastructure/api.js.map +1 -0
- package/dist/types/infrastructure/index.cjs +14 -0
- package/dist/types/infrastructure/index.d.ts +9 -0
- package/dist/types/infrastructure/index.d.ts.map +1 -0
- package/dist/types/infrastructure/index.js +14 -0
- package/dist/types/infrastructure/index.js.map +1 -0
- package/dist/types/infrastructure/navigation.cjs +3 -0
- package/dist/types/infrastructure/navigation.d.ts +56 -0
- package/dist/types/infrastructure/navigation.d.ts.map +1 -0
- package/dist/types/infrastructure/navigation.js +3 -0
- package/dist/types/infrastructure/navigation.js.map +1 -0
- package/dist/types/infrastructure/network.cjs +18 -0
- package/dist/types/infrastructure/network.d.ts +48 -0
- package/dist/types/infrastructure/network.d.ts.map +1 -0
- package/dist/types/infrastructure/network.js +18 -0
- package/dist/types/infrastructure/network.js.map +1 -0
- package/dist/types/infrastructure/wallet.cjs +37 -0
- package/dist/types/infrastructure/wallet.d.ts +33 -0
- package/dist/types/infrastructure/wallet.d.ts.map +1 -0
- package/dist/types/infrastructure/wallet.js +37 -0
- package/dist/types/infrastructure/wallet.js.map +1 -0
- package/dist/types/kyc/index.cjs +19 -0
- package/dist/types/kyc/index.d.ts +2 -0
- package/dist/types/kyc/index.d.ts.map +1 -0
- package/dist/types/kyc/index.js +19 -0
- package/dist/types/kyc/index.js.map +1 -0
- package/dist/types/kyc/kyc-types.cjs +12 -0
- package/dist/types/kyc/kyc-types.d.ts +260 -0
- package/dist/types/kyc/kyc-types.d.ts.map +1 -0
- package/dist/types/kyc/kyc-types.js +12 -0
- package/dist/types/kyc/kyc-types.js.map +1 -0
- package/dist/types/mailer/index.cjs +19 -0
- package/dist/types/mailer/index.d.ts +2 -0
- package/dist/types/mailer/index.d.ts.map +1 -0
- package/dist/types/mailer/index.js +19 -0
- package/dist/types/mailer/index.js.map +1 -0
- package/dist/types/mailer/mail-types.cjs +38 -0
- package/dist/types/mailer/mail-types.d.ts +296 -0
- package/dist/types/mailer/mail-types.d.ts.map +1 -0
- package/dist/types/mailer/mail-types.js +38 -0
- package/dist/types/mailer/mail-types.js.map +1 -0
- package/dist/types/wildduck/index.cjs +19 -0
- package/dist/types/wildduck/index.d.ts +2 -0
- package/dist/types/wildduck/index.d.ts.map +1 -0
- package/dist/types/wildduck/index.js +19 -0
- package/dist/types/wildduck/index.js.map +1 -0
- package/dist/types/wildduck/wildduck-types.cjs +48 -0
- package/dist/types/wildduck/wildduck-types.d.ts +1239 -0
- package/dist/types/wildduck/wildduck-types.d.ts.map +1 -0
- package/dist/types/wildduck/wildduck-types.js +48 -0
- package/dist/types/wildduck/wildduck-types.js.map +1 -0
- package/dist/utils/async-helpers.cjs +130 -0
- package/dist/utils/async-helpers.d.ts +35 -0
- package/dist/utils/async-helpers.d.ts.map +1 -0
- package/dist/utils/async-helpers.js +130 -0
- package/dist/utils/async-helpers.js.map +1 -0
- package/dist/utils/auth/auth.cjs +96 -0
- package/dist/utils/auth/auth.d.ts +40 -0
- package/dist/utils/auth/auth.d.ts.map +1 -0
- package/dist/utils/auth/auth.js +96 -0
- package/dist/utils/auth/auth.js.map +1 -0
- package/dist/utils/auth/index.cjs +14 -0
- package/dist/utils/auth/index.d.ts +2 -0
- package/dist/utils/auth/index.d.ts.map +1 -0
- package/dist/utils/auth/index.js +14 -0
- package/dist/utils/auth/index.js.map +1 -0
- package/dist/utils/blockchain/address.cjs +231 -0
- package/dist/utils/blockchain/address.d.ts +65 -0
- package/dist/utils/blockchain/address.d.ts.map +1 -0
- package/dist/utils/blockchain/address.js +231 -0
- package/dist/utils/blockchain/address.js.map +1 -0
- package/dist/utils/blockchain/event-helpers.cjs +143 -0
- package/dist/utils/blockchain/event-helpers.d.ts +87 -0
- package/dist/utils/blockchain/event-helpers.d.ts.map +1 -0
- package/dist/utils/blockchain/event-helpers.js +143 -0
- package/dist/utils/blockchain/event-helpers.js.map +1 -0
- package/dist/utils/blockchain/index.cjs +30 -0
- package/dist/utils/blockchain/index.d.ts +8 -0
- package/dist/utils/blockchain/index.d.ts.map +1 -0
- package/dist/utils/blockchain/index.js +30 -0
- package/dist/utils/blockchain/index.js.map +1 -0
- package/dist/utils/blockchain/rpc-helpers.cjs +865 -0
- package/dist/utils/blockchain/rpc-helpers.d.ts +251 -0
- package/dist/utils/blockchain/rpc-helpers.d.ts.map +1 -0
- package/dist/utils/blockchain/rpc-helpers.js +865 -0
- package/dist/utils/blockchain/rpc-helpers.js.map +1 -0
- package/dist/utils/constants/application.cjs +158 -0
- package/dist/utils/constants/application.d.ts +119 -0
- package/dist/utils/constants/application.d.ts.map +1 -0
- package/dist/utils/constants/application.js +158 -0
- package/dist/utils/constants/application.js.map +1 -0
- package/dist/utils/constants/index.cjs +30 -0
- package/dist/utils/constants/index.d.ts +7 -0
- package/dist/utils/constants/index.d.ts.map +1 -0
- package/dist/utils/constants/index.js +30 -0
- package/dist/utils/constants/index.js.map +1 -0
- package/dist/utils/constants/status-values.cjs +14 -0
- package/dist/utils/constants/status-values.d.ts +12 -0
- package/dist/utils/constants/status-values.d.ts.map +1 -0
- package/dist/utils/constants/status-values.js +14 -0
- package/dist/utils/constants/status-values.js.map +1 -0
- package/dist/utils/formatting/currency.cjs +36 -0
- package/dist/utils/formatting/currency.d.ts +26 -0
- package/dist/utils/formatting/currency.d.ts.map +1 -0
- package/dist/utils/formatting/currency.js +36 -0
- package/dist/utils/formatting/currency.js.map +1 -0
- package/dist/utils/formatting/date.cjs +138 -0
- package/dist/utils/formatting/date.d.ts +33 -0
- package/dist/utils/formatting/date.d.ts.map +1 -0
- package/dist/utils/formatting/date.js +138 -0
- package/dist/utils/formatting/date.js.map +1 -0
- package/dist/utils/formatting/index.cjs +37 -0
- package/dist/utils/formatting/index.d.ts +4 -0
- package/dist/utils/formatting/index.d.ts.map +1 -0
- package/dist/utils/formatting/index.js +37 -0
- package/dist/utils/formatting/index.js.map +1 -0
- package/dist/utils/formatting/string.cjs +193 -0
- package/dist/utils/formatting/string.d.ts +69 -0
- package/dist/utils/formatting/string.d.ts.map +1 -0
- package/dist/utils/formatting/string.js +193 -0
- package/dist/utils/formatting/string.js.map +1 -0
- package/dist/utils/index.cjs +28 -0
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +28 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logging/index.cjs +16 -0
- package/dist/utils/logging/index.d.ts +5 -0
- package/dist/utils/logging/index.d.ts.map +1 -0
- package/dist/utils/logging/index.js +16 -0
- package/dist/utils/logging/index.js.map +1 -0
- package/dist/utils/logging/logger.cjs +92 -0
- package/dist/utils/logging/logger.d.ts +70 -0
- package/dist/utils/logging/logger.d.ts.map +1 -0
- package/dist/utils/logging/logger.js +92 -0
- package/dist/utils/logging/logger.js.map +1 -0
- package/dist/utils/url/index.cjs +13 -0
- package/dist/utils/url/index.d.ts +5 -0
- package/dist/utils/url/index.d.ts.map +1 -0
- package/dist/utils/url/index.js +13 -0
- package/dist/utils/url/index.js.map +1 -0
- package/dist/utils/url/url-params.cjs +128 -0
- package/dist/utils/url/url-params.d.ts +36 -0
- package/dist/utils/url/url-params.d.ts.map +1 -0
- package/dist/utils/url/url-params.js +128 -0
- package/dist/utils/url/url-params.js.map +1 -0
- package/dist/utils/validation/index.cjs +25 -0
- package/dist/utils/validation/index.d.ts +5 -0
- package/dist/utils/validation/index.d.ts.map +1 -0
- package/dist/utils/validation/index.js +25 -0
- package/dist/utils/validation/index.js.map +1 -0
- package/dist/utils/validation/type-validation.cjs +167 -0
- package/dist/utils/validation/type-validation.d.ts +68 -0
- package/dist/utils/validation/type-validation.d.ts.map +1 -0
- package/dist/utils/validation/type-validation.js +167 -0
- package/dist/utils/validation/type-validation.js.map +1 -0
- package/dist/utils/validation/web3-username-validator.cjs +132 -0
- package/dist/utils/validation/web3-username-validator.d.ts +43 -0
- package/dist/utils/validation/web3-username-validator.d.ts.map +1 -0
- package/dist/utils/validation/web3-username-validator.js +132 -0
- package/dist/utils/validation/web3-username-validator.js.map +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Centralized logging utility
|
|
4
|
+
* Provides consistent logging across the application with proper formatting
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.storageLogger = exports.ensLogger = exports.contractLogger = exports.apiLogger = exports.authLogger = exports.logger = exports.LogLevel = void 0;
|
|
8
|
+
var LogLevel;
|
|
9
|
+
(function (LogLevel) {
|
|
10
|
+
LogLevel["ERROR"] = "error";
|
|
11
|
+
LogLevel["WARN"] = "warn";
|
|
12
|
+
LogLevel["INFO"] = "info";
|
|
13
|
+
LogLevel["DEBUG"] = "debug";
|
|
14
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
15
|
+
class Logger {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.isDevelopment = process.env.NODE_ENV === 'development';
|
|
18
|
+
}
|
|
19
|
+
formatTimestamp() {
|
|
20
|
+
return new Date().toISOString();
|
|
21
|
+
}
|
|
22
|
+
formatMessage(_level, message, context) {
|
|
23
|
+
const timestamp = this.formatTimestamp();
|
|
24
|
+
const contextStr = context ? ` [${context}]` : '';
|
|
25
|
+
return `[${timestamp}]${contextStr} ${message}`;
|
|
26
|
+
}
|
|
27
|
+
shouldLog(level) {
|
|
28
|
+
// In production, only log warnings and errors
|
|
29
|
+
if (!this.isDevelopment) {
|
|
30
|
+
return level === LogLevel.ERROR || level === LogLevel.WARN;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
error(message, context, data) {
|
|
35
|
+
if (this.shouldLog(LogLevel.ERROR)) {
|
|
36
|
+
console.error(this.formatMessage(LogLevel.ERROR, message, context));
|
|
37
|
+
if (data) {
|
|
38
|
+
console.error(data);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
warn(message, context, data) {
|
|
43
|
+
if (this.shouldLog(LogLevel.WARN)) {
|
|
44
|
+
console.warn(this.formatMessage(LogLevel.WARN, message, context));
|
|
45
|
+
if (data) {
|
|
46
|
+
console.warn(data);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
info(message, context, data) {
|
|
51
|
+
if (this.shouldLog(LogLevel.INFO)) {
|
|
52
|
+
console.log(this.formatMessage(LogLevel.INFO, message, context));
|
|
53
|
+
if (data) {
|
|
54
|
+
console.log(data);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
debug(message, context, data) {
|
|
59
|
+
if (this.shouldLog(LogLevel.DEBUG)) {
|
|
60
|
+
console.log(this.formatMessage(LogLevel.DEBUG, message, context));
|
|
61
|
+
if (data) {
|
|
62
|
+
console.log(data);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Create a contextual logger that automatically includes context in all calls
|
|
68
|
+
*/
|
|
69
|
+
withContext(context) {
|
|
70
|
+
return {
|
|
71
|
+
error: (message, data) => this.error(message, context, data),
|
|
72
|
+
warn: (message, data) => this.warn(message, context, data),
|
|
73
|
+
info: (message, data) => this.info(message, context, data),
|
|
74
|
+
debug: (message, data) => this.debug(message, context, data),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// Export singleton instance
|
|
79
|
+
const logger = new Logger();
|
|
80
|
+
exports.logger = logger;
|
|
81
|
+
// Export contextual loggers for common areas
|
|
82
|
+
const authLogger = logger.withContext('AUTH');
|
|
83
|
+
exports.authLogger = authLogger;
|
|
84
|
+
const apiLogger = logger.withContext('API');
|
|
85
|
+
exports.apiLogger = apiLogger;
|
|
86
|
+
const contractLogger = logger.withContext('CONTRACT');
|
|
87
|
+
exports.contractLogger = contractLogger;
|
|
88
|
+
const ensLogger = logger.withContext('ENS');
|
|
89
|
+
exports.ensLogger = ensLogger;
|
|
90
|
+
const storageLogger = logger.withContext('STORAGE');
|
|
91
|
+
exports.storageLogger = storageLogger;
|
|
92
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized logging utility
|
|
3
|
+
* Provides consistent logging across the application with proper formatting
|
|
4
|
+
*/
|
|
5
|
+
import { Optional } from '../../types/common';
|
|
6
|
+
declare enum LogLevel {
|
|
7
|
+
ERROR = "error",
|
|
8
|
+
WARN = "warn",
|
|
9
|
+
INFO = "info",
|
|
10
|
+
DEBUG = "debug"
|
|
11
|
+
}
|
|
12
|
+
interface LogEntry {
|
|
13
|
+
level: LogLevel;
|
|
14
|
+
message: string;
|
|
15
|
+
context?: Optional<string>;
|
|
16
|
+
data?: Optional<unknown>;
|
|
17
|
+
timestamp: string;
|
|
18
|
+
}
|
|
19
|
+
declare class Logger {
|
|
20
|
+
private isDevelopment;
|
|
21
|
+
private formatTimestamp;
|
|
22
|
+
private formatMessage;
|
|
23
|
+
private shouldLog;
|
|
24
|
+
error(message: string, context?: Optional<string>, data?: Optional<unknown>): void;
|
|
25
|
+
warn(message: string, context?: Optional<string>, data?: Optional<unknown>): void;
|
|
26
|
+
info(message: string, context?: Optional<string>, data?: Optional<unknown>): void;
|
|
27
|
+
debug(message: string, context?: Optional<string>, data?: Optional<unknown>): void;
|
|
28
|
+
/**
|
|
29
|
+
* Create a contextual logger that automatically includes context in all calls
|
|
30
|
+
*/
|
|
31
|
+
withContext(context: string): {
|
|
32
|
+
error: (message: string, data?: Optional<unknown>) => void;
|
|
33
|
+
warn: (message: string, data?: Optional<unknown>) => void;
|
|
34
|
+
info: (message: string, data?: Optional<unknown>) => void;
|
|
35
|
+
debug: (message: string, data?: Optional<unknown>) => void;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
declare const logger: Logger;
|
|
39
|
+
declare const authLogger: {
|
|
40
|
+
error: (message: string, data?: Optional<unknown>) => void;
|
|
41
|
+
warn: (message: string, data?: Optional<unknown>) => void;
|
|
42
|
+
info: (message: string, data?: Optional<unknown>) => void;
|
|
43
|
+
debug: (message: string, data?: Optional<unknown>) => void;
|
|
44
|
+
};
|
|
45
|
+
declare const apiLogger: {
|
|
46
|
+
error: (message: string, data?: Optional<unknown>) => void;
|
|
47
|
+
warn: (message: string, data?: Optional<unknown>) => void;
|
|
48
|
+
info: (message: string, data?: Optional<unknown>) => void;
|
|
49
|
+
debug: (message: string, data?: Optional<unknown>) => void;
|
|
50
|
+
};
|
|
51
|
+
declare const contractLogger: {
|
|
52
|
+
error: (message: string, data?: Optional<unknown>) => void;
|
|
53
|
+
warn: (message: string, data?: Optional<unknown>) => void;
|
|
54
|
+
info: (message: string, data?: Optional<unknown>) => void;
|
|
55
|
+
debug: (message: string, data?: Optional<unknown>) => void;
|
|
56
|
+
};
|
|
57
|
+
declare const ensLogger: {
|
|
58
|
+
error: (message: string, data?: Optional<unknown>) => void;
|
|
59
|
+
warn: (message: string, data?: Optional<unknown>) => void;
|
|
60
|
+
info: (message: string, data?: Optional<unknown>) => void;
|
|
61
|
+
debug: (message: string, data?: Optional<unknown>) => void;
|
|
62
|
+
};
|
|
63
|
+
declare const storageLogger: {
|
|
64
|
+
error: (message: string, data?: Optional<unknown>) => void;
|
|
65
|
+
warn: (message: string, data?: Optional<unknown>) => void;
|
|
66
|
+
info: (message: string, data?: Optional<unknown>) => void;
|
|
67
|
+
debug: (message: string, data?: Optional<unknown>) => void;
|
|
68
|
+
};
|
|
69
|
+
export { LogLevel, type LogEntry, logger, authLogger, apiLogger, contractLogger, ensLogger, storageLogger, };
|
|
70
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logging/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,aAAK,QAAQ;IACX,KAAK,UAAU;IACf,IAAI,SAAS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C"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Centralized logging utility
|
|
4
|
+
* Provides consistent logging across the application with proper formatting
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.storageLogger = exports.ensLogger = exports.contractLogger = exports.apiLogger = exports.authLogger = exports.logger = exports.LogLevel = void 0;
|
|
8
|
+
var LogLevel;
|
|
9
|
+
(function (LogLevel) {
|
|
10
|
+
LogLevel["ERROR"] = "error";
|
|
11
|
+
LogLevel["WARN"] = "warn";
|
|
12
|
+
LogLevel["INFO"] = "info";
|
|
13
|
+
LogLevel["DEBUG"] = "debug";
|
|
14
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
15
|
+
class Logger {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.isDevelopment = process.env.NODE_ENV === 'development';
|
|
18
|
+
}
|
|
19
|
+
formatTimestamp() {
|
|
20
|
+
return new Date().toISOString();
|
|
21
|
+
}
|
|
22
|
+
formatMessage(_level, message, context) {
|
|
23
|
+
const timestamp = this.formatTimestamp();
|
|
24
|
+
const contextStr = context ? ` [${context}]` : '';
|
|
25
|
+
return `[${timestamp}]${contextStr} ${message}`;
|
|
26
|
+
}
|
|
27
|
+
shouldLog(level) {
|
|
28
|
+
// In production, only log warnings and errors
|
|
29
|
+
if (!this.isDevelopment) {
|
|
30
|
+
return level === LogLevel.ERROR || level === LogLevel.WARN;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
error(message, context, data) {
|
|
35
|
+
if (this.shouldLog(LogLevel.ERROR)) {
|
|
36
|
+
console.error(this.formatMessage(LogLevel.ERROR, message, context));
|
|
37
|
+
if (data) {
|
|
38
|
+
console.error(data);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
warn(message, context, data) {
|
|
43
|
+
if (this.shouldLog(LogLevel.WARN)) {
|
|
44
|
+
console.warn(this.formatMessage(LogLevel.WARN, message, context));
|
|
45
|
+
if (data) {
|
|
46
|
+
console.warn(data);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
info(message, context, data) {
|
|
51
|
+
if (this.shouldLog(LogLevel.INFO)) {
|
|
52
|
+
console.log(this.formatMessage(LogLevel.INFO, message, context));
|
|
53
|
+
if (data) {
|
|
54
|
+
console.log(data);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
debug(message, context, data) {
|
|
59
|
+
if (this.shouldLog(LogLevel.DEBUG)) {
|
|
60
|
+
console.log(this.formatMessage(LogLevel.DEBUG, message, context));
|
|
61
|
+
if (data) {
|
|
62
|
+
console.log(data);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Create a contextual logger that automatically includes context in all calls
|
|
68
|
+
*/
|
|
69
|
+
withContext(context) {
|
|
70
|
+
return {
|
|
71
|
+
error: (message, data) => this.error(message, context, data),
|
|
72
|
+
warn: (message, data) => this.warn(message, context, data),
|
|
73
|
+
info: (message, data) => this.info(message, context, data),
|
|
74
|
+
debug: (message, data) => this.debug(message, context, data),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// Export singleton instance
|
|
79
|
+
const logger = new Logger();
|
|
80
|
+
exports.logger = logger;
|
|
81
|
+
// Export contextual loggers for common areas
|
|
82
|
+
const authLogger = logger.withContext('AUTH');
|
|
83
|
+
exports.authLogger = authLogger;
|
|
84
|
+
const apiLogger = logger.withContext('API');
|
|
85
|
+
exports.apiLogger = apiLogger;
|
|
86
|
+
const contractLogger = logger.withContext('CONTRACT');
|
|
87
|
+
exports.contractLogger = contractLogger;
|
|
88
|
+
const ensLogger = logger.withContext('ENS');
|
|
89
|
+
exports.ensLogger = ensLogger;
|
|
90
|
+
const storageLogger = logger.withContext('STORAGE');
|
|
91
|
+
exports.storageLogger = storageLogger;
|
|
92
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/utils/logging/logger.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,IAAK,QAKJ;AALD,WAAK,QAAQ;IACX,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EALI,QAAQ,wBAAR,QAAQ,QAKZ;AAUD,MAAM,MAAM;IAAZ;QACU,kBAAa,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;IA2FjE,CAAC;IAzFS,eAAe;QACrB,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAEO,aAAa,CACnB,MAAgB,EAChB,OAAe,EACf,OAA0B;QAE1B,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QACzC,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,OAAO,IAAI,SAAS,IAAI,UAAU,IAAI,OAAO,EAAE,CAAC;IAClD,CAAC;IAEO,SAAS,CAAC,KAAe;QAC/B,8CAA8C;QAC9C,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,OAAO,KAAK,KAAK,QAAQ,CAAC,KAAK,IAAI,KAAK,KAAK,QAAQ,CAAC,IAAI,CAAC;QAC7D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CACH,OAAe,EACf,OAA0B,EAC1B,IAAwB;QAExB,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CA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EAAE,CAAC,OAAe,EAAE,IAAwB,EAAE,EAAE,CACnD,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC;YACpC,IAAI,EAAE,CAAC,OAAe,EAAE,IAAwB,EAAE,EAAE,CAClD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC;YACnC,IAAI,EAAE,CAAC,OAAe,EAAE,IAAwB,EAAE,EAAE,CAClD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC;YACnC,KAAK,EAAE,CAAC,OAAe,EAAE,IAAwB,EAAE,EAAE,CACnD,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC;SACrC,CAAC;IACJ,CAAC;CACF;AAED,4BAA4B;AAC5B,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;AAY1B,wBAAM;AAVR,6CAA6C;AAC7C,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AAU5C,gCAAU;AATZ,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAU1C,8BAAS;AATX,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAUpD,wCAAc;AAThB,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAU1C,8BAAS;AATX,MAAM,aAAa,GAAG,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AAUlD,sCAAa"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* URL utilities export
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.parseSearchParams = exports.searchParamsToString = exports.createSearchParams = exports.createURLSearchParams = void 0;
|
|
7
|
+
// URL parameter utilities
|
|
8
|
+
var url_params_1 = require("./url-params");
|
|
9
|
+
Object.defineProperty(exports, "createURLSearchParams", { enumerable: true, get: function () { return url_params_1.createURLSearchParams; } });
|
|
10
|
+
Object.defineProperty(exports, "createSearchParams", { enumerable: true, get: function () { return url_params_1.createSearchParams; } });
|
|
11
|
+
Object.defineProperty(exports, "searchParamsToString", { enumerable: true, get: function () { return url_params_1.searchParamsToString; } });
|
|
12
|
+
Object.defineProperty(exports, "parseSearchParams", { enumerable: true, get: function () { return url_params_1.parseSearchParams; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/url/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* URL utilities export
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.parseSearchParams = exports.searchParamsToString = exports.createSearchParams = exports.createURLSearchParams = void 0;
|
|
7
|
+
// URL parameter utilities
|
|
8
|
+
var url_params_1 = require("./url-params");
|
|
9
|
+
Object.defineProperty(exports, "createURLSearchParams", { enumerable: true, get: function () { return url_params_1.createURLSearchParams; } });
|
|
10
|
+
Object.defineProperty(exports, "createSearchParams", { enumerable: true, get: function () { return url_params_1.createSearchParams; } });
|
|
11
|
+
Object.defineProperty(exports, "searchParamsToString", { enumerable: true, get: function () { return url_params_1.searchParamsToString; } });
|
|
12
|
+
Object.defineProperty(exports, "parseSearchParams", { enumerable: true, get: function () { return url_params_1.parseSearchParams; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/url/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0BAA0B;AAC1B,2CAMsB;AALpB,mHAAA,qBAAqB,OAAA;AACrB,gHAAA,kBAAkB,OAAA;AAClB,kHAAA,oBAAoB,OAAA;AACpB,+GAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Platform-agnostic URLSearchParams wrapper
|
|
4
|
+
* Provides URLSearchParams functionality with React Native compatibility
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.createURLSearchParams = createURLSearchParams;
|
|
8
|
+
exports.createSearchParams = createSearchParams;
|
|
9
|
+
exports.searchParamsToString = searchParamsToString;
|
|
10
|
+
exports.parseSearchParams = parseSearchParams;
|
|
11
|
+
/**
|
|
12
|
+
* Simple URLSearchParams implementation for environments that don't have it
|
|
13
|
+
*/
|
|
14
|
+
class SimpleURLSearchParams {
|
|
15
|
+
constructor(init) {
|
|
16
|
+
this.params = new Map();
|
|
17
|
+
if (init) {
|
|
18
|
+
if (typeof init === 'string') {
|
|
19
|
+
this.parseString(init);
|
|
20
|
+
}
|
|
21
|
+
else if (Array.isArray(init)) {
|
|
22
|
+
for (const [key, value] of init) {
|
|
23
|
+
this.append(key, value);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
for (const [key, value] of Object.entries(init)) {
|
|
28
|
+
if (value !== undefined) {
|
|
29
|
+
this.append(key, value);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
parseString(str) {
|
|
36
|
+
const params = str.startsWith('?') ? str.slice(1) : str;
|
|
37
|
+
if (!params)
|
|
38
|
+
return;
|
|
39
|
+
for (const pair of params.split('&')) {
|
|
40
|
+
const [key, value = ''] = pair.split('=');
|
|
41
|
+
if (key) {
|
|
42
|
+
this.append(decodeURIComponent(key), decodeURIComponent(value));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
append(name, value) {
|
|
47
|
+
if (!this.params.has(name)) {
|
|
48
|
+
this.params.set(name, []);
|
|
49
|
+
}
|
|
50
|
+
const existingValues = this.params.get(name);
|
|
51
|
+
if (existingValues) {
|
|
52
|
+
existingValues.push(value);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
delete(name) {
|
|
56
|
+
this.params.delete(name);
|
|
57
|
+
}
|
|
58
|
+
get(name) {
|
|
59
|
+
const values = this.params.get(name);
|
|
60
|
+
return values && values.length > 0 ? values[0] : null;
|
|
61
|
+
}
|
|
62
|
+
getAll(name) {
|
|
63
|
+
return this.params.get(name) || [];
|
|
64
|
+
}
|
|
65
|
+
has(name) {
|
|
66
|
+
return this.params.has(name);
|
|
67
|
+
}
|
|
68
|
+
set(name, value) {
|
|
69
|
+
this.params.set(name, [value]);
|
|
70
|
+
}
|
|
71
|
+
toString() {
|
|
72
|
+
const pairs = [];
|
|
73
|
+
this.params.forEach((values, key) => {
|
|
74
|
+
for (const value of values) {
|
|
75
|
+
pairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return pairs.join('&');
|
|
79
|
+
}
|
|
80
|
+
forEach(callback) {
|
|
81
|
+
this.params.forEach((values, key) => {
|
|
82
|
+
for (const value of values) {
|
|
83
|
+
callback(value, key);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Create a URLSearchParams instance with cross-platform compatibility
|
|
90
|
+
*/
|
|
91
|
+
function createURLSearchParams(init) {
|
|
92
|
+
// Check if native URLSearchParams is available
|
|
93
|
+
if (typeof URLSearchParams !== 'undefined') {
|
|
94
|
+
return new URLSearchParams(init);
|
|
95
|
+
}
|
|
96
|
+
// Fall back to our implementation for React Native or other environments
|
|
97
|
+
return new SimpleURLSearchParams(init);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Convenience function to create URL search params from an object
|
|
101
|
+
*/
|
|
102
|
+
function createSearchParams(params) {
|
|
103
|
+
const searchParams = createURLSearchParams(undefined);
|
|
104
|
+
for (const [key, value] of Object.entries(params)) {
|
|
105
|
+
if (value !== undefined && value !== null) {
|
|
106
|
+
searchParams.append(key, String(value));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return searchParams;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Convert search params to a query string
|
|
113
|
+
*/
|
|
114
|
+
function searchParamsToString(params) {
|
|
115
|
+
return params.toString();
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Parse a query string into an object
|
|
119
|
+
*/
|
|
120
|
+
function parseSearchParams(queryString) {
|
|
121
|
+
const params = createURLSearchParams(queryString);
|
|
122
|
+
const result = {};
|
|
123
|
+
params.forEach((value, key) => {
|
|
124
|
+
result[key] = value;
|
|
125
|
+
});
|
|
126
|
+
return result;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=url-params.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-agnostic URLSearchParams wrapper
|
|
3
|
+
* Provides URLSearchParams functionality with React Native compatibility
|
|
4
|
+
*/
|
|
5
|
+
import { Optional } from '../../types/common';
|
|
6
|
+
/**
|
|
7
|
+
* URLSearchParams interface for cross-platform compatibility
|
|
8
|
+
*/
|
|
9
|
+
interface URLSearchParamsLike {
|
|
10
|
+
append(name: string, value: string): void;
|
|
11
|
+
delete(name: string): void;
|
|
12
|
+
get(name: string): Optional<string>;
|
|
13
|
+
getAll(name: string): string[];
|
|
14
|
+
has(name: string): boolean;
|
|
15
|
+
set(name: string, value: string): void;
|
|
16
|
+
toString(): string;
|
|
17
|
+
forEach(callback: (value: string, key: string) => void): void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create a URLSearchParams instance with cross-platform compatibility
|
|
21
|
+
*/
|
|
22
|
+
declare function createURLSearchParams(init?: Optional<string | Record<string, string> | string[][]>): URLSearchParamsLike;
|
|
23
|
+
/**
|
|
24
|
+
* Convenience function to create URL search params from an object
|
|
25
|
+
*/
|
|
26
|
+
declare function createSearchParams(params: Record<string, string | number | boolean>): URLSearchParamsLike;
|
|
27
|
+
/**
|
|
28
|
+
* Convert search params to a query string
|
|
29
|
+
*/
|
|
30
|
+
declare function searchParamsToString(params: URLSearchParamsLike): string;
|
|
31
|
+
/**
|
|
32
|
+
* Parse a query string into an object
|
|
33
|
+
*/
|
|
34
|
+
declare function parseSearchParams(queryString: string): Record<string, string>;
|
|
35
|
+
export { createURLSearchParams, createSearchParams, searchParamsToString, parseSearchParams, type URLSearchParamsLike, };
|
|
36
|
+
//# sourceMappingURL=url-params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-params.d.ts","sourceRoot":"","sources":["../../../src/utils/url/url-params.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;GAEG;AACH,UAAU,mBAAmB;IAC3B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,IAAI,MAAM,CAAC;IACnB,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;CAC/D;AAwFD;;GAEG;AACH,iBAAS,qBAAqB,CAC5B,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,EAAE,CAAC,GAC5D,mBAAmB,CAUrB;AAED;;GAEG;AACH,iBAAS,kBAAkB,CACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAChD,mBAAmB,CAUrB;AAED;;GAEG;AACH,iBAAS,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAEjE;AAED;;GAEG;AACH,iBAAS,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAStE;AAED,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,mBAAmB,GACzB,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Platform-agnostic URLSearchParams wrapper
|
|
4
|
+
* Provides URLSearchParams functionality with React Native compatibility
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.createURLSearchParams = createURLSearchParams;
|
|
8
|
+
exports.createSearchParams = createSearchParams;
|
|
9
|
+
exports.searchParamsToString = searchParamsToString;
|
|
10
|
+
exports.parseSearchParams = parseSearchParams;
|
|
11
|
+
/**
|
|
12
|
+
* Simple URLSearchParams implementation for environments that don't have it
|
|
13
|
+
*/
|
|
14
|
+
class SimpleURLSearchParams {
|
|
15
|
+
constructor(init) {
|
|
16
|
+
this.params = new Map();
|
|
17
|
+
if (init) {
|
|
18
|
+
if (typeof init === 'string') {
|
|
19
|
+
this.parseString(init);
|
|
20
|
+
}
|
|
21
|
+
else if (Array.isArray(init)) {
|
|
22
|
+
for (const [key, value] of init) {
|
|
23
|
+
this.append(key, value);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
for (const [key, value] of Object.entries(init)) {
|
|
28
|
+
if (value !== undefined) {
|
|
29
|
+
this.append(key, value);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
parseString(str) {
|
|
36
|
+
const params = str.startsWith('?') ? str.slice(1) : str;
|
|
37
|
+
if (!params)
|
|
38
|
+
return;
|
|
39
|
+
for (const pair of params.split('&')) {
|
|
40
|
+
const [key, value = ''] = pair.split('=');
|
|
41
|
+
if (key) {
|
|
42
|
+
this.append(decodeURIComponent(key), decodeURIComponent(value));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
append(name, value) {
|
|
47
|
+
if (!this.params.has(name)) {
|
|
48
|
+
this.params.set(name, []);
|
|
49
|
+
}
|
|
50
|
+
const existingValues = this.params.get(name);
|
|
51
|
+
if (existingValues) {
|
|
52
|
+
existingValues.push(value);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
delete(name) {
|
|
56
|
+
this.params.delete(name);
|
|
57
|
+
}
|
|
58
|
+
get(name) {
|
|
59
|
+
const values = this.params.get(name);
|
|
60
|
+
return values && values.length > 0 ? values[0] : null;
|
|
61
|
+
}
|
|
62
|
+
getAll(name) {
|
|
63
|
+
return this.params.get(name) || [];
|
|
64
|
+
}
|
|
65
|
+
has(name) {
|
|
66
|
+
return this.params.has(name);
|
|
67
|
+
}
|
|
68
|
+
set(name, value) {
|
|
69
|
+
this.params.set(name, [value]);
|
|
70
|
+
}
|
|
71
|
+
toString() {
|
|
72
|
+
const pairs = [];
|
|
73
|
+
this.params.forEach((values, key) => {
|
|
74
|
+
for (const value of values) {
|
|
75
|
+
pairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return pairs.join('&');
|
|
79
|
+
}
|
|
80
|
+
forEach(callback) {
|
|
81
|
+
this.params.forEach((values, key) => {
|
|
82
|
+
for (const value of values) {
|
|
83
|
+
callback(value, key);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Create a URLSearchParams instance with cross-platform compatibility
|
|
90
|
+
*/
|
|
91
|
+
function createURLSearchParams(init) {
|
|
92
|
+
// Check if native URLSearchParams is available
|
|
93
|
+
if (typeof URLSearchParams !== 'undefined') {
|
|
94
|
+
return new URLSearchParams(init);
|
|
95
|
+
}
|
|
96
|
+
// Fall back to our implementation for React Native or other environments
|
|
97
|
+
return new SimpleURLSearchParams(init);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Convenience function to create URL search params from an object
|
|
101
|
+
*/
|
|
102
|
+
function createSearchParams(params) {
|
|
103
|
+
const searchParams = createURLSearchParams(undefined);
|
|
104
|
+
for (const [key, value] of Object.entries(params)) {
|
|
105
|
+
if (value !== undefined && value !== null) {
|
|
106
|
+
searchParams.append(key, String(value));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return searchParams;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Convert search params to a query string
|
|
113
|
+
*/
|
|
114
|
+
function searchParamsToString(params) {
|
|
115
|
+
return params.toString();
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Parse a query string into an object
|
|
119
|
+
*/
|
|
120
|
+
function parseSearchParams(queryString) {
|
|
121
|
+
const params = createURLSearchParams(queryString);
|
|
122
|
+
const result = {};
|
|
123
|
+
params.forEach((value, key) => {
|
|
124
|
+
result[key] = value;
|
|
125
|
+
});
|
|
126
|
+
return result;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=url-params.js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AAE,CAAC;YAC1C,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,SAAS,oBAAoB,CAAC,MAA2B;IACvD,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,WAAmB;IAC5C,MAAM,MAAM,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAClD,MAAM,MAAM,GAA2B,EAAE,CAAC;IAE1C,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAC5B,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACtB,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateArray = exports.parseJson = exports.optional = exports.isValidDate = exports.isUrl = exports.isSuccessResponse = exports.isString = exports.isObject = exports.isNumber = exports.isNullish = exports.isErrorResponse = exports.isEmail = exports.isBoolean = exports.isArray = exports.isApiResponse = exports.hasRequiredProperties = exports.createValidator = exports.createAssertion = exports.Web3UsernameValidator = void 0;
|
|
4
|
+
var web3_username_validator_1 = require("./web3-username-validator");
|
|
5
|
+
Object.defineProperty(exports, "Web3UsernameValidator", { enumerable: true, get: function () { return web3_username_validator_1.Web3UsernameValidator; } });
|
|
6
|
+
var type_validation_1 = require("./type-validation");
|
|
7
|
+
Object.defineProperty(exports, "createAssertion", { enumerable: true, get: function () { return type_validation_1.createAssertion; } });
|
|
8
|
+
Object.defineProperty(exports, "createValidator", { enumerable: true, get: function () { return type_validation_1.createValidator; } });
|
|
9
|
+
Object.defineProperty(exports, "hasRequiredProperties", { enumerable: true, get: function () { return type_validation_1.hasRequiredProperties; } });
|
|
10
|
+
Object.defineProperty(exports, "isApiResponse", { enumerable: true, get: function () { return type_validation_1.isApiResponse; } });
|
|
11
|
+
Object.defineProperty(exports, "isArray", { enumerable: true, get: function () { return type_validation_1.isArray; } });
|
|
12
|
+
Object.defineProperty(exports, "isBoolean", { enumerable: true, get: function () { return type_validation_1.isBoolean; } });
|
|
13
|
+
Object.defineProperty(exports, "isEmail", { enumerable: true, get: function () { return type_validation_1.isEmail; } });
|
|
14
|
+
Object.defineProperty(exports, "isErrorResponse", { enumerable: true, get: function () { return type_validation_1.isErrorResponse; } });
|
|
15
|
+
Object.defineProperty(exports, "isNullish", { enumerable: true, get: function () { return type_validation_1.isNullish; } });
|
|
16
|
+
Object.defineProperty(exports, "isNumber", { enumerable: true, get: function () { return type_validation_1.isNumber; } });
|
|
17
|
+
Object.defineProperty(exports, "isObject", { enumerable: true, get: function () { return type_validation_1.isObject; } });
|
|
18
|
+
Object.defineProperty(exports, "isString", { enumerable: true, get: function () { return type_validation_1.isString; } });
|
|
19
|
+
Object.defineProperty(exports, "isSuccessResponse", { enumerable: true, get: function () { return type_validation_1.isSuccessResponse; } });
|
|
20
|
+
Object.defineProperty(exports, "isUrl", { enumerable: true, get: function () { return type_validation_1.isUrl; } });
|
|
21
|
+
Object.defineProperty(exports, "isValidDate", { enumerable: true, get: function () { return type_validation_1.isValidDate; } });
|
|
22
|
+
Object.defineProperty(exports, "optional", { enumerable: true, get: function () { return type_validation_1.optional; } });
|
|
23
|
+
Object.defineProperty(exports, "parseJson", { enumerable: true, get: function () { return type_validation_1.parseJson; } });
|
|
24
|
+
Object.defineProperty(exports, "validateArray", { enumerable: true, get: function () { return type_validation_1.validateArray; } });
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { AddressValidationResult } from './web3-username-validator';
|
|
2
|
+
export { Web3UsernameValidator } from './web3-username-validator';
|
|
3
|
+
export type { ValidationResult } from './type-validation';
|
|
4
|
+
export { createAssertion, createValidator, hasRequiredProperties, isApiResponse, isArray, isBoolean, isEmail, isErrorResponse, isNullish, isNumber, isObject, isString, isSuccessResponse, isUrl, isValidDate, optional, parseJson, validateArray, } from './type-validation';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/validation/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EACL,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,OAAO,EACP,SAAS,EACT,OAAO,EACP,eAAe,EACf,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,aAAa,GACd,MAAM,mBAAmB,CAAC"}
|