@alwatr/nitrobase-helper 7.2.0 → 7.3.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 +35 -0
- package/README.md +4 -4
- package/dist/main.cjs +51 -2
- package/dist/main.cjs.map +3 -3
- package/dist/main.d.ts.map +1 -1
- package/dist/main.mjs +26 -2
- package/dist/main.mjs.map +3 -3
- package/package.json +11 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
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
|
+
## [7.3.0](https://github.com/Alwatr/nitrobase/compare/v7.2.1...v7.3.0) (2024-10-11)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* update `import`s & packages based on the latest changes of `nanolib` & prevent side-effects ([0d66f89](https://github.com/Alwatr/nitrobase/commit/0d66f894dc4ff615ab73ebd27c275f98dc384fbe)) by @mohammadhonarvar
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **helper:** Update dependencies and packages for @alwatr/type-helper ([b57a97d](https://github.com/Alwatr/nitrobase/commit/b57a97da61af4217b6a0aeaa82190fbc132f61b7)) by @AliMD
|
|
15
|
+
|
|
16
|
+
### Code Refactoring
|
|
17
|
+
|
|
18
|
+
* update `import`s & packages based on the latest changes of `nanolib` ([ce990a2](https://github.com/Alwatr/nitrobase/commit/ce990a2fedc5545e971c3bb6e58b55bfba8c0bd9)) by @mohammadhonarvar
|
|
19
|
+
|
|
20
|
+
### Miscellaneous Chores
|
|
21
|
+
|
|
22
|
+
* **deps-dev:** bump the development-dependencies group with 10 updates ([7bdcf3f](https://github.com/Alwatr/nitrobase/commit/7bdcf3f47ddb8e1376a1c7ae6e221811182bae58)) by @dependabot[bot]
|
|
23
|
+
* **deps:** bump the alwatr-dependencies group with 10 updates ([60afdde](https://github.com/Alwatr/nitrobase/commit/60afdde98562f3023e6624ee0579d6bdee80bc32)) by @dependabot[bot]
|
|
24
|
+
* **deps:** bump the alwatr-dependencies group with 6 updates ([1cf29b2](https://github.com/Alwatr/nitrobase/commit/1cf29b20055554945cd669ea9d022ab7c503d9fc)) by @dependabot[bot]
|
|
25
|
+
|
|
26
|
+
### Dependencies update
|
|
27
|
+
|
|
28
|
+
* cleanup dependencies ([91eab0b](https://github.com/Alwatr/nitrobase/commit/91eab0b0fc570b2493cccd5ccd891b01405450d7)) by @AliMD
|
|
29
|
+
|
|
30
|
+
## [7.2.1](https://github.com/Alwatr/nitrobase/compare/v7.2.0...v7.2.1) (2024-09-29)
|
|
31
|
+
|
|
32
|
+
### Miscellaneous Chores
|
|
33
|
+
|
|
34
|
+
* **deps-dev:** bump @types/node in the development-dependencies group ([9b146d2](https://github.com/Alwatr/nitrobase/commit/9b146d2f6cf7d1d79a2a6f46a5e8f50e7fb2ac75)) by @dependabot[bot]
|
|
35
|
+
* **helper:** change the license to AGPL-3.0 ([1fe19df](https://github.com/Alwatr/nitrobase/commit/1fe19dfdb234bf4510c1e62453beccb767d373e5)) by @ArmanAsadian
|
|
36
|
+
|
|
37
|
+
### Dependencies update
|
|
38
|
+
|
|
39
|
+
* update ([90a0fe1](https://github.com/Alwatr/nitrobase/commit/90a0fe146eb703c183c116776d7c5748918282da)) by @
|
|
40
|
+
|
|
6
41
|
## [7.2.0](https://github.com/Alwatr/nitrobase/compare/v7.1.1...v7.2.0) (2024-09-24)
|
|
7
42
|
|
|
8
43
|
### Code Refactoring
|
package/README.md
CHANGED
|
@@ -80,10 +80,10 @@ The following companies, organizations, and individuals support Nitrobase ongoin
|
|
|
80
80
|
|
|
81
81
|
[](https://exirstudio.com)
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
### Contributing
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request.
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
### License
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
This project is licensed under the [AGPL-3.0 License](LICENSE).
|
package/dist/main.cjs
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
/* @alwatr/nitrobase-helper v7.
|
|
2
|
-
"use strict";
|
|
1
|
+
/* @alwatr/nitrobase-helper v7.3.0 */
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/main.ts
|
|
22
|
+
var main_exports = {};
|
|
23
|
+
__export(main_exports, {
|
|
24
|
+
getStoreId: () => getStoreId,
|
|
25
|
+
getStorePath: () => getStorePath
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(main_exports);
|
|
28
|
+
var import_nanolib = require("@alwatr/nanolib");
|
|
29
|
+
var import_nitrobase_types = require("@alwatr/nitrobase-types");
|
|
30
|
+
__dev_mode__: import_nanolib.packageTracer.add("@alwatr/nitrobase-helper", "7.3.0");
|
|
31
|
+
function getStoreId(storeId) {
|
|
32
|
+
let id = storeId.region + "/" + storeId.name;
|
|
33
|
+
if (storeId.ownerId !== void 0) {
|
|
34
|
+
id += "/" + storeId.ownerId;
|
|
35
|
+
}
|
|
36
|
+
return (0, import_nanolib.flatString)(id);
|
|
37
|
+
}
|
|
38
|
+
function getStorePath(storeStat) {
|
|
39
|
+
let path = storeStat.region;
|
|
40
|
+
if (storeStat.ownerId !== void 0) {
|
|
41
|
+
path += "/" + storeStat.ownerId.slice(0, 3) + "/" + storeStat.ownerId;
|
|
42
|
+
}
|
|
43
|
+
path += `/${storeStat.name}.${storeStat.type}.${storeStat.extension ?? import_nitrobase_types.StoreFileExtension.Json}`;
|
|
44
|
+
return (0, import_nanolib.flatString)(path);
|
|
45
|
+
}
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
getStoreId,
|
|
49
|
+
getStorePath
|
|
50
|
+
});
|
|
51
|
+
/*! For license information please see main.cjs.LEGAL.txt */
|
|
3
52
|
//# 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} from '@alwatr/
|
|
5
|
-
"mappings": ";
|
|
6
|
-
"names": [
|
|
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,EAChE;AACA,UAAQ,IAAI,UAAU,IAAI,IAAI,UAAU,IAAI,IAAI,UAAU,aAAa,0CAAmB,IAAI;AAC9F,aAAO,2BAAW,IAAI;AACxB;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,WAAW,EAAE,KAAK,aAAa,EAAC,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,WAAW,EAAE,KAAK,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAIjG;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAMvD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,aAAa,GAAG,MAAM,CAO7D"}
|
package/dist/main.mjs
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
-
/* @alwatr/nitrobase-helper v7.
|
|
2
|
-
|
|
1
|
+
/* @alwatr/nitrobase-helper v7.3.0 */
|
|
2
|
+
|
|
3
|
+
// src/main.ts
|
|
4
|
+
import { flatString, packageTracer } from "@alwatr/nanolib";
|
|
5
|
+
import { StoreFileExtension } from "@alwatr/nitrobase-types";
|
|
6
|
+
__dev_mode__: packageTracer.add("@alwatr/nitrobase-helper", "7.3.0");
|
|
7
|
+
function getStoreId(storeId) {
|
|
8
|
+
let id = storeId.region + "/" + storeId.name;
|
|
9
|
+
if (storeId.ownerId !== void 0) {
|
|
10
|
+
id += "/" + storeId.ownerId;
|
|
11
|
+
}
|
|
12
|
+
return flatString(id);
|
|
13
|
+
}
|
|
14
|
+
function getStorePath(storeStat) {
|
|
15
|
+
let path = storeStat.region;
|
|
16
|
+
if (storeStat.ownerId !== void 0) {
|
|
17
|
+
path += "/" + storeStat.ownerId.slice(0, 3) + "/" + storeStat.ownerId;
|
|
18
|
+
}
|
|
19
|
+
path += `/${storeStat.name}.${storeStat.type}.${storeStat.extension ?? StoreFileExtension.Json}`;
|
|
20
|
+
return flatString(path);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
getStoreId,
|
|
24
|
+
getStorePath
|
|
25
|
+
};
|
|
26
|
+
/*! For license information please see main.mjs.LEGAL.txt */
|
|
3
27
|
//# 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} from '@alwatr/
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
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,EAChE;AACA,UAAQ,IAAI,UAAU,IAAI,IAAI,UAAU,IAAI,IAAI,UAAU,aAAa,mBAAmB,IAAI;AAC9F,SAAO,WAAW,IAAI;AACxB;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/nitrobase-helper",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.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": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"require": "./dist/main.cjs"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
"license": "
|
|
30
|
+
"license": "AGPL-3.0-only",
|
|
31
31
|
"files": [
|
|
32
32
|
"**/*.{js,mjs,cjs,map,d.ts,html,md}",
|
|
33
33
|
"!demo/**/*"
|
|
@@ -60,17 +60,16 @@
|
|
|
60
60
|
"clean": "rm -rfv dist *.tsbuildinfo"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@alwatr/
|
|
64
|
-
"@alwatr/nitrobase-types": "^7.
|
|
63
|
+
"@alwatr/nanolib": "^1.2.0",
|
|
64
|
+
"@alwatr/nitrobase-types": "^7.3.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@alwatr/
|
|
68
|
-
"@alwatr/
|
|
69
|
-
"@alwatr/
|
|
70
|
-
"@alwatr/
|
|
71
|
-
"@
|
|
72
|
-
"
|
|
73
|
-
"typescript": "^5.6.2"
|
|
67
|
+
"@alwatr/nano-build": "^2.0.1",
|
|
68
|
+
"@alwatr/prettier-config": "^1.0.6",
|
|
69
|
+
"@alwatr/tsconfig-base": "^1.3.2",
|
|
70
|
+
"@alwatr/type-helper": "^2.0.2",
|
|
71
|
+
"@types/node": "^22.7.5",
|
|
72
|
+
"typescript": "^5.6.3"
|
|
74
73
|
},
|
|
75
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "e80e7aa8f61ba048d91f1d4fe1433a7bfa27d28c"
|
|
76
75
|
}
|