@veloxts/client 0.6.87 → 0.6.88
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/CHANGELOG.md +6 -0
- package/dist/client.js +5 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/client.js
CHANGED
|
@@ -13,7 +13,11 @@ import { NetworkError, parseErrorResponse } from './errors.js';
|
|
|
13
13
|
/**
|
|
14
14
|
* Maps procedure naming convention to HTTP method
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* IMPORTANT: This must stay in sync with @veloxts/validation's PROCEDURE_METHOD_MAP.
|
|
17
|
+
* We duplicate it here to avoid adding @veloxts/validation as a dependency for the
|
|
18
|
+
* lightweight frontend client package.
|
|
19
|
+
*
|
|
20
|
+
* @see {@link @veloxts/validation!PROCEDURE_METHOD_MAP} for the canonical definition
|
|
17
21
|
*/
|
|
18
22
|
const PROCEDURE_METHOD_MAP = {
|
|
19
23
|
get: 'GET',
|
|
@@ -51,19 +55,6 @@ function inferMethodFromName(procedureName) {
|
|
|
51
55
|
// Default to POST for mutations (conservative default)
|
|
52
56
|
return 'POST';
|
|
53
57
|
}
|
|
54
|
-
// Note: extractResourceFromName is reserved for future use in path building enhancements
|
|
55
|
-
// Keeping it commented for now to avoid unused code warnings
|
|
56
|
-
// function extractResourceFromName(procedureName: string): string | undefined {
|
|
57
|
-
// for (const prefix of Object.keys(PROCEDURE_METHOD_MAP)) {
|
|
58
|
-
// if (procedureName.startsWith(prefix)) {
|
|
59
|
-
// const remainder = procedureName.slice(prefix.length);
|
|
60
|
-
// if (remainder.length > 0) {
|
|
61
|
-
// return remainder.charAt(0).toLowerCase() + remainder.slice(1);
|
|
62
|
-
// }
|
|
63
|
-
// }
|
|
64
|
-
// }
|
|
65
|
-
// return undefined;
|
|
66
|
-
// }
|
|
67
58
|
/**
|
|
68
59
|
* Type guard for RouteEntry objects
|
|
69
60
|
*
|