@alwatr/nitrobase-helper 7.5.7 → 8.0.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.
- package/CHANGELOG.md +31 -0
- package/dist/main.cjs +3 -4
- package/dist/main.cjs.map +2 -2
- package/dist/main.mjs +3 -4
- package/dist/main.mjs.map +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,37 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.0.0](https://github.com/Alwatr/nitrobase/compare/v7.5.9...v8.0.0) (2025-02-24)
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* **helper:** existing db must be migrated
|
|
11
|
+
|
|
12
|
+
simple bash script to convert current db folder
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
for folder in o/*/ u/*/; do
|
|
16
|
+
echo "process $folder";
|
|
17
|
+
if [ -d "$folder" ]; then
|
|
18
|
+
lowercase_folder=$(echo "$folder" | tr '[:upper:]' '[:lower:]')
|
|
19
|
+
if [[ "$folder" != "$lowercase_folder" ]]; then
|
|
20
|
+
mv -v "$folder" "$lowercase_folder"
|
|
21
|
+
fi
|
|
22
|
+
fi
|
|
23
|
+
done
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **helper:** ensure ownerId is converted to lowercase in store path to prevent conflict in case insensitive file systems ([2f95566](https://github.com/Alwatr/nitrobase/commit/2f955663c907a185faaf41e9b114056a52c59def)) by @
|
|
29
|
+
|
|
30
|
+
## [7.5.8](https://github.com/Alwatr/nitrobase/compare/v7.5.7...v7.5.8) (2025-02-18)
|
|
31
|
+
|
|
32
|
+
### Dependencies update
|
|
33
|
+
|
|
34
|
+
* bump @alwatr/nanolib, @alwatr/nano-build, and @types/node to latest versions across multiple packages ([3e89c62](https://github.com/Alwatr/nitrobase/commit/3e89c62ad20f3afe0c38c6ae36d91bcb6199b231)) by @
|
|
35
|
+
* **deps-dev:** bump the dependencies group across 1 directory with 2 updates ([03715d0](https://github.com/Alwatr/nitrobase/commit/03715d0b5534b127dfb57ffe0ea713fb168eefe6)) by @dependabot[bot]
|
|
36
|
+
|
|
6
37
|
## [7.5.7](https://github.com/Alwatr/nitrobase/compare/v7.5.6...v7.5.7) (2025-02-03)
|
|
7
38
|
|
|
8
39
|
### Dependencies update
|
package/dist/main.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @alwatr/nitrobase-helper
|
|
1
|
+
/* @alwatr/nitrobase-helper v8.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -27,7 +27,7 @@ __export(main_exports, {
|
|
|
27
27
|
module.exports = __toCommonJS(main_exports);
|
|
28
28
|
var import_nanolib = require("@alwatr/nanolib");
|
|
29
29
|
var import_nitrobase_types = require("@alwatr/nitrobase-types");
|
|
30
|
-
__dev_mode__: import_nanolib.packageTracer.add("@alwatr/nitrobase-helper", "
|
|
30
|
+
__dev_mode__: import_nanolib.packageTracer.add("@alwatr/nitrobase-helper", "8.0.0");
|
|
31
31
|
function getStoreId(storeId) {
|
|
32
32
|
let id = storeId.region + "/" + storeId.name;
|
|
33
33
|
if (storeId.ownerId !== void 0) {
|
|
@@ -38,7 +38,7 @@ function getStoreId(storeId) {
|
|
|
38
38
|
function getStorePath(storeStat) {
|
|
39
39
|
let path = storeStat.region;
|
|
40
40
|
if (storeStat.ownerId !== void 0) {
|
|
41
|
-
path += "/" + storeStat.ownerId.slice(0, 3) + "/" + storeStat.ownerId;
|
|
41
|
+
path += "/" + storeStat.ownerId.slice(0, 3).toLowerCase() + "/" + storeStat.ownerId;
|
|
42
42
|
}
|
|
43
43
|
path += `/${storeStat.name}.${storeStat.type}.${storeStat.extension ?? import_nitrobase_types.StoreFileExtension.Json}`;
|
|
44
44
|
return (0, import_nanolib.flatString)(path);
|
|
@@ -48,5 +48,4 @@ function getStorePath(storeStat) {
|
|
|
48
48
|
getStoreId,
|
|
49
49
|
getStorePath
|
|
50
50
|
});
|
|
51
|
-
/*! For license information please see main.cjs.LEGAL.txt */
|
|
52
51
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["import {flatString, packageTracer} from '@alwatr/nanolib';\nimport {StoreFileExtension, type StoreFileId, type StoreFileStat} from '@alwatr/nitrobase-types';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\n/**\n * Convert StoreFileId to a string ID.\n *\n * @param storeId - The StoreFileId.\n * @returns The nitrobase ID as a string.\n */\nexport function getStoreId(storeId: StoreFileId): string {\n let id = storeId.region + '/' + storeId.name;\n if (storeId.ownerId !== undefined) {\n id += '/' + storeId.ownerId;\n }\n return flatString(id);\n}\n\n/**\n * Returns the nitrobase path based on the provided storeStat object.\n *\n * @param storeStat The nitrobase file stat object.\n * @returns The nitrobase path.\n */\nexport function getStorePath(storeStat: StoreFileStat): string {\n let path: string = storeStat.region;\n if (storeStat.ownerId !== undefined) {\n path += '/' + storeStat.ownerId.slice(0, 3) + '/' + storeStat.ownerId;\n }\n path += `/${storeStat.name}.${storeStat.type}.${storeStat.extension ?? StoreFileExtension.Json}`;\n return flatString(path);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAwC;AACxC,6BAAuE;AAEvE,aAAc,8BAAc,IAAI,4BAAkB,OAAmB;AAQ9D,SAAS,WAAW,SAA8B;AACvD,MAAI,KAAK,QAAQ,SAAS,MAAM,QAAQ;AACxC,MAAI,QAAQ,YAAY,QAAW;AACjC,UAAM,MAAM,QAAQ;AAAA,EACtB;AACA,aAAO,2BAAW,EAAE;AACtB;AAQO,SAAS,aAAa,WAAkC;AAC7D,MAAI,OAAe,UAAU;AAC7B,MAAI,UAAU,YAAY,QAAW;AACnC,YAAQ,MAAM,UAAU,QAAQ,MAAM,GAAG,CAAC,IAAI,MAAM,UAAU;AAAA,
|
|
4
|
+
"sourcesContent": ["import {flatString, packageTracer} from '@alwatr/nanolib';\nimport {StoreFileExtension, type StoreFileId, type StoreFileStat} from '@alwatr/nitrobase-types';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\n/**\n * Convert StoreFileId to a string ID.\n *\n * @param storeId - The StoreFileId.\n * @returns The nitrobase ID as a string.\n */\nexport function getStoreId(storeId: StoreFileId): string {\n let id = storeId.region + '/' + storeId.name;\n if (storeId.ownerId !== undefined) {\n id += '/' + storeId.ownerId;\n }\n return flatString(id);\n}\n\n/**\n * Returns the nitrobase path based on the provided storeStat object.\n *\n * @param storeStat The nitrobase file stat object.\n * @returns The nitrobase path.\n */\nexport function getStorePath(storeStat: StoreFileStat): string {\n let path: string = storeStat.region;\n if (storeStat.ownerId !== undefined) {\n path += '/' + storeStat.ownerId.slice(0, 3).toLowerCase() + '/' + storeStat.ownerId;\n }\n path += `/${storeStat.name}.${storeStat.type}.${storeStat.extension ?? StoreFileExtension.Json}`;\n return flatString(path);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAwC;AACxC,6BAAuE;AAEvE,aAAc,8BAAc,IAAI,4BAAkB,OAAmB;AAQ9D,SAAS,WAAW,SAA8B;AACvD,MAAI,KAAK,QAAQ,SAAS,MAAM,QAAQ;AACxC,MAAI,QAAQ,YAAY,QAAW;AACjC,UAAM,MAAM,QAAQ;AAAA,EACtB;AACA,aAAO,2BAAW,EAAE;AACtB;AAQO,SAAS,aAAa,WAAkC;AAC7D,MAAI,OAAe,UAAU;AAC7B,MAAI,UAAU,YAAY,QAAW;AACnC,YAAQ,MAAM,UAAU,QAAQ,MAAM,GAAG,CAAC,EAAE,YAAY,IAAI,MAAM,UAAU;AAAA,EAC9E;AACA,UAAQ,IAAI,UAAU,IAAI,IAAI,UAAU,IAAI,IAAI,UAAU,aAAa,0CAAmB,IAAI;AAC9F,aAAO,2BAAW,IAAI;AACxB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/main.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* @alwatr/nitrobase-helper
|
|
1
|
+
/* @alwatr/nitrobase-helper v8.0.0 */
|
|
2
2
|
|
|
3
3
|
// src/main.ts
|
|
4
4
|
import { flatString, packageTracer } from "@alwatr/nanolib";
|
|
5
5
|
import { StoreFileExtension } from "@alwatr/nitrobase-types";
|
|
6
|
-
__dev_mode__: packageTracer.add("@alwatr/nitrobase-helper", "
|
|
6
|
+
__dev_mode__: packageTracer.add("@alwatr/nitrobase-helper", "8.0.0");
|
|
7
7
|
function getStoreId(storeId) {
|
|
8
8
|
let id = storeId.region + "/" + storeId.name;
|
|
9
9
|
if (storeId.ownerId !== void 0) {
|
|
@@ -14,7 +14,7 @@ function getStoreId(storeId) {
|
|
|
14
14
|
function getStorePath(storeStat) {
|
|
15
15
|
let path = storeStat.region;
|
|
16
16
|
if (storeStat.ownerId !== void 0) {
|
|
17
|
-
path += "/" + storeStat.ownerId.slice(0, 3) + "/" + storeStat.ownerId;
|
|
17
|
+
path += "/" + storeStat.ownerId.slice(0, 3).toLowerCase() + "/" + storeStat.ownerId;
|
|
18
18
|
}
|
|
19
19
|
path += `/${storeStat.name}.${storeStat.type}.${storeStat.extension ?? StoreFileExtension.Json}`;
|
|
20
20
|
return flatString(path);
|
|
@@ -23,5 +23,4 @@ export {
|
|
|
23
23
|
getStoreId,
|
|
24
24
|
getStorePath
|
|
25
25
|
};
|
|
26
|
-
/*! For license information please see main.mjs.LEGAL.txt */
|
|
27
26
|
//# sourceMappingURL=main.mjs.map
|
package/dist/main.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["import {flatString, packageTracer} from '@alwatr/nanolib';\nimport {StoreFileExtension, type StoreFileId, type StoreFileStat} from '@alwatr/nitrobase-types';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\n/**\n * Convert StoreFileId to a string ID.\n *\n * @param storeId - The StoreFileId.\n * @returns The nitrobase ID as a string.\n */\nexport function getStoreId(storeId: StoreFileId): string {\n let id = storeId.region + '/' + storeId.name;\n if (storeId.ownerId !== undefined) {\n id += '/' + storeId.ownerId;\n }\n return flatString(id);\n}\n\n/**\n * Returns the nitrobase path based on the provided storeStat object.\n *\n * @param storeStat The nitrobase file stat object.\n * @returns The nitrobase path.\n */\nexport function getStorePath(storeStat: StoreFileStat): string {\n let path: string = storeStat.region;\n if (storeStat.ownerId !== undefined) {\n path += '/' + storeStat.ownerId.slice(0, 3) + '/' + storeStat.ownerId;\n }\n path += `/${storeStat.name}.${storeStat.type}.${storeStat.extension ?? StoreFileExtension.Json}`;\n return flatString(path);\n}\n"],
|
|
5
|
-
"mappings": ";;;AAAA,SAAQ,YAAY,qBAAoB;AACxC,SAAQ,0BAA+D;AAEvE,aAAc,eAAc,IAAI,4BAAkB,OAAmB;AAQ9D,SAAS,WAAW,SAA8B;AACvD,MAAI,KAAK,QAAQ,SAAS,MAAM,QAAQ;AACxC,MAAI,QAAQ,YAAY,QAAW;AACjC,UAAM,MAAM,QAAQ;AAAA,EACtB;AACA,SAAO,WAAW,EAAE;AACtB;AAQO,SAAS,aAAa,WAAkC;AAC7D,MAAI,OAAe,UAAU;AAC7B,MAAI,UAAU,YAAY,QAAW;AACnC,YAAQ,MAAM,UAAU,QAAQ,MAAM,GAAG,CAAC,IAAI,MAAM,UAAU;AAAA,
|
|
4
|
+
"sourcesContent": ["import {flatString, packageTracer} from '@alwatr/nanolib';\nimport {StoreFileExtension, type StoreFileId, type StoreFileStat} from '@alwatr/nitrobase-types';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\n/**\n * Convert StoreFileId to a string ID.\n *\n * @param storeId - The StoreFileId.\n * @returns The nitrobase ID as a string.\n */\nexport function getStoreId(storeId: StoreFileId): string {\n let id = storeId.region + '/' + storeId.name;\n if (storeId.ownerId !== undefined) {\n id += '/' + storeId.ownerId;\n }\n return flatString(id);\n}\n\n/**\n * Returns the nitrobase path based on the provided storeStat object.\n *\n * @param storeStat The nitrobase file stat object.\n * @returns The nitrobase path.\n */\nexport function getStorePath(storeStat: StoreFileStat): string {\n let path: string = storeStat.region;\n if (storeStat.ownerId !== undefined) {\n path += '/' + storeStat.ownerId.slice(0, 3).toLowerCase() + '/' + storeStat.ownerId;\n }\n path += `/${storeStat.name}.${storeStat.type}.${storeStat.extension ?? StoreFileExtension.Json}`;\n return flatString(path);\n}\n"],
|
|
5
|
+
"mappings": ";;;AAAA,SAAQ,YAAY,qBAAoB;AACxC,SAAQ,0BAA+D;AAEvE,aAAc,eAAc,IAAI,4BAAkB,OAAmB;AAQ9D,SAAS,WAAW,SAA8B;AACvD,MAAI,KAAK,QAAQ,SAAS,MAAM,QAAQ;AACxC,MAAI,QAAQ,YAAY,QAAW;AACjC,UAAM,MAAM,QAAQ;AAAA,EACtB;AACA,SAAO,WAAW,EAAE;AACtB;AAQO,SAAS,aAAa,WAAkC;AAC7D,MAAI,OAAe,UAAU;AAC7B,MAAI,UAAU,YAAY,QAAW;AACnC,YAAQ,MAAM,UAAU,QAAQ,MAAM,GAAG,CAAC,EAAE,YAAY,IAAI,MAAM,UAAU;AAAA,EAC9E;AACA,UAAQ,IAAI,UAAU,IAAI,IAAI,UAAU,IAAI,IAAI,UAAU,aAAa,mBAAmB,IAAI;AAC9F,SAAO,WAAW,IAAI;AACxB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/nitrobase-helper",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Extremely fast and compact JSON-based database that operates in memory, includes a JSON file backup, and serve over the highly accelerated Nginx.",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
6
|
"keywords": [
|
|
@@ -60,16 +60,16 @@
|
|
|
60
60
|
"clean": "rm -rfv dist *.tsbuildinfo"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@alwatr/nanolib": "^5.
|
|
64
|
-
"@alwatr/nitrobase-types": "^
|
|
63
|
+
"@alwatr/nanolib": "^5.4.0",
|
|
64
|
+
"@alwatr/nitrobase-types": "^8.0.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@alwatr/nano-build": "^5.
|
|
67
|
+
"@alwatr/nano-build": "^5.4.0",
|
|
68
68
|
"@alwatr/prettier-config": "^5.0.0",
|
|
69
69
|
"@alwatr/tsconfig-base": "^5.0.0",
|
|
70
70
|
"@alwatr/type-helper": "^5.3.0",
|
|
71
|
-
"@types/node": "^22.13.
|
|
71
|
+
"@types/node": "^22.13.4",
|
|
72
72
|
"typescript": "^5.7.3"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "2884426e9c5905be67a8b2e62de3c7084b349ec3"
|
|
75
75
|
}
|