@flowerforce/flowerbase 1.6.1-beta.2 → 1.6.1
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
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## 1.6.1 (2026-01-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🩹 Fixes
|
|
5
|
+
|
|
6
|
+
- upgrade s3 ([68fb6a3](https://github.com/flowerforce/flowerbase/commit/68fb6a3))
|
|
7
|
+
|
|
8
|
+
- add BSON.Binary.fromBase64 ([b9e3bdb](https://github.com/flowerforce/flowerbase/commit/b9e3bdb))
|
|
9
|
+
|
|
10
|
+
- fromBase64Binary ([0fbd7c3](https://github.com/flowerforce/flowerbase/commit/0fbd7c3))
|
|
11
|
+
|
|
12
|
+
- types ([9050ea0](https://github.com/flowerforce/flowerbase/commit/9050ea0))
|
|
13
|
+
|
|
14
|
+
- endpoints http methods ([ae7803c](https://github.com/flowerforce/flowerbase/commit/ae7803c))
|
|
15
|
+
|
|
1
16
|
## 1.6.0 (2026-01-28)
|
|
2
17
|
|
|
3
18
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/features/endpoints/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAKvE,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAU,gBAAuB,KAAG,OAAO,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/features/endpoints/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAKvE,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAU,gBAAuB,KAAG,OAAO,CAAC,SAAS,CA+B9E,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAC3B,KAAK,eAAe,EACpB,SAAS,UAAU,CAAC,OAAO,eAAe,CAAC,EAC3C,UAAU,MAAM;;;;;;;CAgChB,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,oDAK7B,qBAAqB,MACR,KAAK,cAAc,EAAE,KAAK,YAAY,gBA4CrD,CAAA"}
|
|
@@ -39,9 +39,14 @@ const loadEndpoints = (...args_1) => __awaiter(void 0, [...args_1], void 0, func
|
|
|
39
39
|
const endPointsFile = node_path_1.default.join(rootDir, endpointsDir, 'config.json');
|
|
40
40
|
if (fs_1.default.existsSync(endPointsFile)) {
|
|
41
41
|
const config = JSON.parse(fs_1.default.readFileSync(endPointsFile, 'utf-8'));
|
|
42
|
-
const configRemap = config.map((
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
const configRemap = config.map((endpoint) => {
|
|
43
|
+
const _a = endpoint, { http_method, httpMethod } = _a, rest = __rest(_a, ["http_method", "httpMethod"]);
|
|
44
|
+
const normalizedMethod = (http_method !== null && http_method !== void 0 ? http_method : httpMethod);
|
|
45
|
+
return Object.assign({ http_method: normalizedMethod === '*' || normalizedMethod === 'ALL' || normalizedMethod === 'ANY'
|
|
46
|
+
? 'ALL'
|
|
47
|
+
: !normalizedMethod
|
|
48
|
+
? 'POST'
|
|
49
|
+
: normalizedMethod }, rest);
|
|
45
50
|
});
|
|
46
51
|
endpoints.push(...configRemap);
|
|
47
52
|
}
|
package/package.json
CHANGED
|
@@ -20,10 +20,22 @@ export const loadEndpoints = async (rootDir = process.cwd()): Promise<Endpoints>
|
|
|
20
20
|
|
|
21
21
|
if (fs.existsSync(endPointsFile)) {
|
|
22
22
|
const config: Endpoints<'*'> = JSON.parse(fs.readFileSync(endPointsFile, 'utf-8'))
|
|
23
|
-
const configRemap: Endpoints = config.map((
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
const configRemap: Endpoints = config.map((endpoint) => {
|
|
24
|
+
const { http_method, httpMethod, ...rest } = endpoint as typeof endpoint & {
|
|
25
|
+
httpMethod?: string
|
|
26
|
+
}
|
|
27
|
+
const normalizedMethod = (http_method ?? httpMethod) as string | undefined
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
http_method:
|
|
31
|
+
normalizedMethod === '*' || normalizedMethod === 'ALL' || normalizedMethod === 'ANY'
|
|
32
|
+
? 'ALL'
|
|
33
|
+
: !normalizedMethod
|
|
34
|
+
? 'POST'
|
|
35
|
+
: (normalizedMethod as Endpoints[number]['http_method']),
|
|
36
|
+
...rest
|
|
37
|
+
}
|
|
38
|
+
})
|
|
27
39
|
|
|
28
40
|
endpoints.push(...configRemap)
|
|
29
41
|
}
|