@plyaz/config 1.0.4 → 1.0.6

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.
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Network-related Constants
3
+ *
4
+ * Constants for network operations including IP addresses,
5
+ * byte ranges, and process identifiers.
6
+ *
7
+ * @module network/constants
8
+ */
9
+ /**
10
+ * Network and connection constants
11
+ */
12
+ export declare const NETWORK_CONSTANTS: {
13
+ /**
14
+ * Minimum value for an IPv4 octet (excluding 0 for first octet)
15
+ */
16
+ readonly IPV4_OCTET_MIN: 1;
17
+ /**
18
+ * Maximum value for an IPv4 octet
19
+ */
20
+ readonly IPV4_OCTET_MAX: 255;
21
+ /**
22
+ * Number of octets in an IPv4 address
23
+ */
24
+ readonly IPV4_OCTET_COUNT: 4;
25
+ /**
26
+ * Maximum value for a random byte (256 exclusive)
27
+ */
28
+ readonly RANDOM_BYTE_MAX: 256;
29
+ /**
30
+ * Default maximum process ID for testing
31
+ */
32
+ readonly DEFAULT_PROCESS_ID_MAX: 10000;
33
+ };
34
+ /**
35
+ * Type for network constant values
36
+ */
37
+ export type NetworkConstant = (typeof NETWORK_CONSTANTS)[keyof typeof NETWORK_CONSTANTS];
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Network Module Exports
3
+ *
4
+ * @module network
5
+ */
6
+ export * from './constants';
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Performance Module
3
+ *
4
+ * Performance monitoring and benchmarking constants used for
5
+ * measuring application performance, detecting memory leaks,
6
+ * and configuring performance tests.
7
+ *
8
+ * @module performance
9
+ */
10
+ /**
11
+ * Performance measurement constants
12
+ */
13
+ export declare const PERFORMANCE_CONSTANTS: {
14
+ /**
15
+ * Threshold for detecting memory leaks (10% growth)
16
+ */
17
+ readonly MEMORY_LEAK_THRESHOLD: 0.1;
18
+ /**
19
+ * Default number of benchmark runs for performance testing
20
+ */
21
+ readonly DEFAULT_BENCHMARK_RUNS: 100;
22
+ /**
23
+ * Default number of warmup runs before benchmarking
24
+ */
25
+ readonly DEFAULT_WARMUP_RUNS: 10;
26
+ };
27
+ /**
28
+ * Type for performance constant values
29
+ */
30
+ export type PerformanceConstant = (typeof PERFORMANCE_CONSTANTS)[keyof typeof PERFORMANCE_CONSTANTS];
@@ -0,0 +1,11 @@
1
+ export declare const ALCHEMY_CONFIG: {
2
+ apiKey: string;
3
+ rpcUrls: {
4
+ ethereum: string;
5
+ polygon: string;
6
+ arbitrum: string;
7
+ optimism: string;
8
+ base: string;
9
+ solana: string;
10
+ };
11
+ };
@@ -0,0 +1,2 @@
1
+ export * from './alchemy';
2
+ export * from './oauth';
@@ -0,0 +1,20 @@
1
+ export declare const OAUTH_PROVIDERS: {
2
+ readonly google: {
3
+ readonly clientId: string;
4
+ readonly clientSecret: string;
5
+ readonly redirectUri: string;
6
+ readonly scopes: readonly ["openid", "profile", "email"];
7
+ };
8
+ readonly discord: {
9
+ readonly clientId: string;
10
+ readonly clientSecret: string;
11
+ readonly redirectUri: string;
12
+ readonly scopes: readonly ["identify", "email"];
13
+ };
14
+ readonly facebook: {
15
+ readonly clientId: string;
16
+ readonly clientSecret: string;
17
+ readonly redirectUri: string;
18
+ readonly scopes: readonly ["public_profile", "email"];
19
+ };
20
+ };
@@ -0,0 +1,3 @@
1
+ export declare const SECURITY: {
2
+ readonly BLOCKED_REGIONS: readonly ["KP", "SY", "IR", "CU", "SD", "SO", "UA-CR", "UA-DP", "UA-LU"];
3
+ };
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Time-related Constants
3
+ *
4
+ * Common time values and durations used throughout the application
5
+ * for timeouts, delays, caching, and other time-based operations.
6
+ *
7
+ * @module time/constants
8
+ */
9
+ /**
10
+ * Time conversion and duration constants
11
+ */
12
+ export declare const TIME_CONSTANTS: {
13
+ /**
14
+ * Number of milliseconds in one second
15
+ */
16
+ readonly MILLISECONDS_PER_SECOND: 1000;
17
+ /**
18
+ * Number of seconds in one minute
19
+ */
20
+ readonly SECONDS_PER_MINUTE: 60;
21
+ /**
22
+ * Number of minutes in one hour
23
+ */
24
+ readonly MINUTES_PER_HOUR: 60;
25
+ /**
26
+ * Number of hours in one day
27
+ */
28
+ readonly HOURS_PER_DAY: 24;
29
+ /**
30
+ * Default timeout duration in milliseconds (5 seconds)
31
+ */
32
+ readonly DEFAULT_TIMEOUT: 5000;
33
+ /**
34
+ * Default retry delay in milliseconds (100ms)
35
+ */
36
+ readonly DEFAULT_RETRY_DELAY: 100;
37
+ /**
38
+ * Default number of retry attempts
39
+ */
40
+ readonly DEFAULT_RETRY_ATTEMPTS: 3;
41
+ /**
42
+ * Default debounce delay in milliseconds (50ms)
43
+ */
44
+ readonly DEFAULT_DEBOUNCE_DELAY: 50;
45
+ /**
46
+ * Default animation frame duration in milliseconds (~60fps)
47
+ */
48
+ readonly DEFAULT_ANIMATION_FRAME: 16.67;
49
+ /**
50
+ * Default cache time-to-live in seconds (5 minutes)
51
+ */
52
+ readonly DEFAULT_CACHE_TTL: 300;
53
+ /**
54
+ * Default port number for servers
55
+ */
56
+ readonly DEFAULT_PORT: 3000;
57
+ /**
58
+ * WebSocket abnormal closure code
59
+ */
60
+ readonly WEBSOCKET_CLOSE_ABNORMAL: 1006;
61
+ /**
62
+ * WebSocket retry delay in milliseconds (500ms)
63
+ */
64
+ readonly WEBSOCKET_RETRY_DELAY: 500;
65
+ };
66
+ /**
67
+ * Type for time constant values
68
+ */
69
+ export type TimeConstant = (typeof TIME_CONSTANTS)[keyof typeof TIME_CONSTANTS];
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Time Module Exports
3
+ *
4
+ * @module time
5
+ */
6
+ export * from './constants';
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Collection and Array Constants
3
+ *
4
+ * Constants for array operations, pagination,
5
+ * and collection manipulation.
6
+ *
7
+ * @module utils/collection/constants
8
+ */
9
+ /**
10
+ * Array and collection operation constants
11
+ */
12
+ export declare const COLLECTION_CONSTANTS: {
13
+ /**
14
+ * Center point for array splitting (50%)
15
+ */
16
+ readonly ARRAY_SPLIT_CENTER: 0.5;
17
+ /**
18
+ * Default page size for pagination
19
+ */
20
+ readonly DEFAULT_PAGE_SIZE: 10;
21
+ /**
22
+ * Default maximum number of retries for operations
23
+ */
24
+ readonly DEFAULT_MAX_RETRIES: 3;
25
+ /**
26
+ * Constant for three items (used in various contexts)
27
+ */
28
+ readonly THREE_ITEMS: 3;
29
+ };
30
+ /**
31
+ * Type for collection constant values
32
+ */
33
+ export type CollectionConstant = (typeof COLLECTION_CONSTANTS)[keyof typeof COLLECTION_CONSTANTS];
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Collection Utils Module Exports
3
+ *
4
+ * @module utils/collection
5
+ */
6
+ export * from './constants';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Utilities - Main Export
3
+ *
4
+ * Exports all utility constants organized by category.
5
+ * These utilities can be reused across different parts of the application.
6
+ *
7
+ * @fileoverview Main utilities export
8
+ * @version 1.0.0
9
+ */
10
+ export * from './string';
11
+ export * from './collection';
@@ -0,0 +1,37 @@
1
+ /**
2
+ * String Manipulation Constants
3
+ *
4
+ * Constants used for string generation, manipulation,
5
+ * and UUID-related operations.
6
+ *
7
+ * @module utils/string/constants
8
+ */
9
+ /**
10
+ * String generation and manipulation constants
11
+ */
12
+ export declare const STRING_CONSTANTS: {
13
+ /**
14
+ * Starting position for random string extraction
15
+ */
16
+ readonly RANDOM_STRING_START: 2;
17
+ /**
18
+ * Length of random string segment
19
+ */
20
+ readonly RANDOM_STRING_LENGTH: 9;
21
+ /**
22
+ * Multiplier for UUID random value generation
23
+ */
24
+ readonly UUID_RANDOM_MULTIPLIER: 16;
25
+ /**
26
+ * Hexadecimal mask for UUID generation
27
+ */
28
+ readonly UUID_HEX_MASK: 3;
29
+ /**
30
+ * OR value for UUID hexadecimal operations
31
+ */
32
+ readonly UUID_HEX_OR_VALUE: 8;
33
+ };
34
+ /**
35
+ * Type for string constant values
36
+ */
37
+ export type StringConstant = (typeof STRING_CONSTANTS)[keyof typeof STRING_CONSTANTS];
@@ -0,0 +1,6 @@
1
+ /**
2
+ * String Utils Module Exports
3
+ *
4
+ * @module utils/string
5
+ */
6
+ export * from './constants';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/config",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared configs and constants for @playz ecosystem.",
@@ -29,6 +29,9 @@
29
29
  },
30
30
  "keywords": [],
31
31
  "packageManager": "pnpm@10.11.0",
32
+ "dependencies": {
33
+ "viem": "^2.31.7"
34
+ },
32
35
  "devDependencies": {
33
36
  "@changesets/cli": "^2.29.5",
34
37
  "@darraghor/eslint-plugin-nestjs-typed": "^6.6.2",
@@ -85,7 +88,6 @@
85
88
  "tsup": "8.5.0",
86
89
  "typescript": "^5",
87
90
  "typescript-eslint": "^8.34.0",
88
- "viem": "^2.31.7",
89
91
  "vitest": "3.2.4"
90
92
  },
91
93
  "peerDependenciesMeta": {
@@ -102,7 +104,7 @@
102
104
  "scripts": {
103
105
  "build": "pnpm clean && pnpm build:js && pnpm build:types",
104
106
  "build:js": "tsup",
105
- "build:types": "tsc -p tsconfig.build.json",
107
+ "build:types": "tsc src/index.ts --emitDeclarationOnly --esModuleInterop --outDir dist --declaration --skipLibCheck",
106
108
  "build:watch": "tsup --watch",
107
109
  "dev": "tsup --watch",
108
110
  "lint": "eslint ./src ./tests",