@alwatr/nitrobase-types 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 CHANGED
@@ -3,6 +3,33 @@
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
+ ### Code Refactoring
13
+
14
+ * update `import`s & packages based on the latest changes of `nanolib` ([ce990a2](https://github.com/Alwatr/nitrobase/commit/ce990a2fedc5545e971c3bb6e58b55bfba8c0bd9)) by @mohammadhonarvar
15
+
16
+ ### Miscellaneous Chores
17
+
18
+ * **deps-dev:** bump the development-dependencies group with 10 updates ([7bdcf3f](https://github.com/Alwatr/nitrobase/commit/7bdcf3f47ddb8e1376a1c7ae6e221811182bae58)) by @dependabot[bot]
19
+ * **deps:** bump the alwatr-dependencies group with 10 updates ([60afdde](https://github.com/Alwatr/nitrobase/commit/60afdde98562f3023e6624ee0579d6bdee80bc32)) by @dependabot[bot]
20
+ * **deps:** bump the alwatr-dependencies group with 6 updates ([1cf29b2](https://github.com/Alwatr/nitrobase/commit/1cf29b20055554945cd669ea9d022ab7c503d9fc)) by @dependabot[bot]
21
+
22
+ ## [7.2.1](https://github.com/Alwatr/nitrobase/compare/v7.2.0...v7.2.1) (2024-09-29)
23
+
24
+ ### Miscellaneous Chores
25
+
26
+ * **deps-dev:** bump @types/node in the development-dependencies group ([9b146d2](https://github.com/Alwatr/nitrobase/commit/9b146d2f6cf7d1d79a2a6f46a5e8f50e7fb2ac75)) by @dependabot[bot]
27
+ * **types:** change the license to AGPL-3.0 ([b45e0a4](https://github.com/Alwatr/nitrobase/commit/b45e0a417b5d00735bc893236e72111e4caac63d)) by @ArmanAsadian
28
+
29
+ ### Dependencies update
30
+
31
+ * update ([90a0fe1](https://github.com/Alwatr/nitrobase/commit/90a0fe146eb703c183c116776d7c5748918282da)) by @
32
+
6
33
  ## [7.2.0](https://github.com/Alwatr/nitrobase/compare/v7.1.1...v7.2.0) (2024-09-24)
7
34
 
8
35
  ### Code Refactoring
package/README.md CHANGED
@@ -80,10 +80,10 @@ The following companies, organizations, and individuals support Nitrobase ongoin
80
80
 
81
81
  [![Exir Studio](https://avatars.githubusercontent.com/u/181194967?s=200&v=4)](https://exirstudio.com)
82
82
 
83
- ## License
83
+ ### Contributing
84
84
 
85
- This project is licensed under the AGPL-3.0 License.
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
- ## Contributing
87
+ ### License
88
88
 
89
- Contributions are welcome! Please feel free to submit issues and pull requests.
89
+ This project is licensed under the [AGPL-3.0 License](LICENSE).
package/dist/main.cjs CHANGED
@@ -1,3 +1,57 @@
1
- /* @alwatr/nitrobase-types v7.2.0 */
2
- "use strict";var l=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var b=(t,e)=>{for(var a in e)l(t,a,{get:e[a],enumerable:!0})},x=(t,e,a,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of s(e))!y.call(t,n)&&n!==a&&l(t,n,{get:()=>e[n],enumerable:!(o=m(e,n))||o.enumerable});return t};var u=t=>x(l({},"__esModule",{value:!0}),t);var O={};b(O,{Region:()=>c,StoreFileExtension:()=>i,StoreFileType:()=>p});module.exports=u(O);var d=require("@alwatr/dedupe");(0,d.definePackage)("@alwatr/nitrobase-types","7.2.0");var c=(r=>(r.Public="p",r.Authenticated="a",r.Managers="m",r.PerUser="u",r.PerOwner="o",r.Secret=".s",r))(c||{}),p=(o=>(o.Document="doc",o.Collection="col",o.AppendOnlyCollection="aoc",o))(p||{}),i=(e=>(e.Json="asj",e))(i||{});0&&(module.exports={Region,StoreFileExtension,StoreFileType});
1
+ /* @alwatr/nitrobase-types 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
+ Region: () => Region,
25
+ StoreFileExtension: () => StoreFileExtension,
26
+ StoreFileType: () => StoreFileType
27
+ });
28
+ module.exports = __toCommonJS(main_exports);
29
+ var import_nanolib = require("@alwatr/nanolib");
30
+ __dev_mode__: import_nanolib.packageTracer.add("@alwatr/nitrobase-types", "7.3.0");
31
+ var Region = /* @__PURE__ */ ((Region2) => {
32
+ Region2["Public"] = "p";
33
+ Region2["Authenticated"] = "a";
34
+ Region2["Managers"] = "m";
35
+ Region2["PerUser"] = "u";
36
+ Region2["PerOwner"] = "o";
37
+ Region2["Secret"] = ".s";
38
+ return Region2;
39
+ })(Region || {});
40
+ var StoreFileType = /* @__PURE__ */ ((StoreFileType2) => {
41
+ StoreFileType2["Document"] = "doc";
42
+ StoreFileType2["Collection"] = "col";
43
+ StoreFileType2["AppendOnlyCollection"] = "aoc";
44
+ return StoreFileType2;
45
+ })(StoreFileType || {});
46
+ var StoreFileExtension = /* @__PURE__ */ ((StoreFileExtension2) => {
47
+ StoreFileExtension2["Json"] = "asj";
48
+ return StoreFileExtension2;
49
+ })(StoreFileExtension || {});
50
+ // Annotate the CommonJS export names for ESM import in node:
51
+ 0 && (module.exports = {
52
+ Region,
53
+ StoreFileExtension,
54
+ StoreFileType
55
+ });
56
+ /*! For license information please see main.cjs.LEGAL.txt */
3
57
  //# 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 {definePackage} from '@alwatr/dedupe';\n\nimport type {} from '@alwatr/nano-build';\nimport type {Dictionary, JsonObject} from '@alwatr/type-helper';\n\ndefinePackage('@alwatr/nitrobase-types', __package_version__);\n\n// *** Nitrobase File ***\n\n/**\n * The subdirectory location for each nitrobase file.\n */\nexport enum Region {\n /**\n * Nitrobase file location that can be accessed by anyone. e.g. Product list.\n */\n Public = 'p',\n\n /**\n * Nitrobase file location that can be accessed by authenticated users. e.g. Special price list for dealers\n */\n Authenticated = 'a',\n\n /**\n * Nitrobase file location that can be accessed by admins and managers only. e.g. User list.\n */\n Managers = 'm',\n\n /**\n * Nitrobase file location specific to each user id. Can be accessed using the user token. e.g. User profile and User orders.\n */\n PerUser = 'u',\n\n /**\n * Nitrobase file location specific to each owner id. e.g. user token or device id.\n */\n PerOwner = 'o',\n\n /**\n * Private nitrobase file location. Cannot be accessed publicly and must be directly accessed by the admin API only.\n * e.g. User secret data.\n */\n Secret = '.s',\n}\n\n/**\n * The different types of nitrobase file formats.\n */\nexport enum StoreFileType {\n /**\n * Type used for `single document` storage.\n */\n Document = 'doc',\n\n /**\n * Type used for storing a `collection` of simpler documents, referred to as collection items.\n */\n Collection = 'col',\n\n /**\n * Type used for storing a collection of items that are `append-only`.\n */\n AppendOnlyCollection = 'aoc',\n}\n\n/**\n * Nitrobase file extension (encode).\n */\nexport enum StoreFileExtension {\n /**\n * AlwatrNitrobase JSON format.\n */\n Json = 'asj',\n}\n\n/**\n * Unique identifier of the nitrobase file.\n *\n * Get from user for select nitrobase file.\n */\nexport type StoreFileId = {\n /**\n * The nitrobase filename.\n */\n readonly name: string;\n\n /**\n * The region where the nitrobase file is located.\n * @see {@link Region}\n */\n readonly region: Region;\n\n /**\n * The owner of the nitrobase file.\n * If the region is `Region.PerX` then this is the user id, device id, or token id etc.\n * @see {@link Region}\n *\n */\n readonly ownerId?: string;\n\n /**\n * The schema version for easy migration by user.\n * If not specified, the default value is `1`.\n */\n schemaVer?: number;\n};\n\n/**\n * Nitrobase the complete metadata of the file in the root database.\n */\nexport type StoreFileStat = StoreFileId & {\n /**\n * The type of the nitrobase file.\n *\n * @see {@link StoreFileType}\n */\n readonly type: StoreFileType;\n\n /**\n * The extension used for the nitrobase file.\n *\n * @see {@link StoreFileExtension}\n */\n readonly extension?: StoreFileExtension;\n\n /**\n * The save debounce timeout in milliseconds for minimal disk I/O usage.\n * This is used to limit the frequency of disk writes for performance reasons.\n * The recommended value is `40`.\n * If not specified, the default value get from AlwatrNitrobase `defaultChangeDebounce`.\n */\n readonly changeDebounce?: number;\n\n /**\n * The name of the migration process.\n * This is used to migrate the nitrobase file to a new schema version.\n */\n readonly migrateName?: string;\n\n /**\n * The time-to-live (TTL) of the nitrobase file in memory.\n */\n // readonly ttl?: number;\n};\n\n/**\n * Represents the metadata of a nitrobase file.\n */\nexport type StoreFileMeta = StoreFileStat & {\n /**\n * Nitrobase file format version.\n */\n fv: number;\n\n /**\n * The revision number of the nitrobase file.\n *\n * This number is incremented every time the nitrobase file is updated.\n */\n rev: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the nitrobase file was created.\n */\n readonly created: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the nitrobase file was updated.\n */\n updated: number;\n\n /**\n * Last auto increment id.\n */\n lastAutoId?: number;\n\n /**\n * The extra metadata for the nitrobase file.\n */\n extra: JsonObject;\n};\n\nexport type StoreFileData<T extends JsonObject = JsonObject> = T;\n\n/**\n * Represents the context of a nitrobase file.\n * @template TData The type of the data content in the nitrobase file.\n */\nexport type StoreFileContext<TData extends JsonObject = JsonObject> = {\n /**\n * The status of the nitrobase file.\n *\n * if false, the Alwatr nitrobase throws an error.\n */\n readonly ok: true;\n\n /**\n * The metadata of the nitrobase file.\n * @see {@link StoreFileMeta}\n */\n readonly meta: StoreFileMeta;\n\n /**\n * The data content of the nitrobase file.\n */\n readonly data: TData;\n};\n\n/**\n * Nitrobase file meta only content type.\n */\nexport type StoreFileMetaOnlyContext = Omit<StoreFileContext<never>, 'data'>;\n\n// *** Documents ***\n\n/**\n * StoreFileContext for document type.\n */\nexport type DocumentContext<T extends JsonObject = JsonObject> = StoreFileContext<T>;\n\n// *** Collections ***\n\n/**\n * The metadata of an item in a collection.\n */\nexport type CollectionItemMeta = {\n /**\n * The unique identifier for the collection item.\n */\n readonly id: string | number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the collection item was created.\n */\n readonly created: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the collection item was updated.\n */\n updated: number;\n\n /**\n * The revision number for the collection item.\n *\n * This number is incremented each time the item is updated.\n */\n rev: number;\n};\n\n/**\n * Collection item context type.\n */\nexport type CollectionItem<TData extends JsonObject = JsonObject> = {\n /**\n * Collection item's metadata.\n */\n readonly meta: CollectionItemMeta;\n\n /**\n * Collection item data.\n */\n readonly data: TData;\n};\n\n/**\n * Collection item context type.\n */\nexport type CollectionContext<T extends JsonObject = JsonObject> = StoreFileContext<Dictionary<CollectionItem<T>>>;\n"],
5
- "mappings": ";yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,uBAAAC,EAAA,kBAAAC,IAAA,eAAAC,EAAAL,GAAA,IAAAM,EAA4B,6BAK5B,iBAAc,0BAA2B,OAAmB,EAOrD,IAAKJ,OAIVA,EAAA,OAAS,IAKTA,EAAA,cAAgB,IAKhBA,EAAA,SAAW,IAKXA,EAAA,QAAU,IAKVA,EAAA,SAAW,IAMXA,EAAA,OAAS,KA9BCA,OAAA,IAoCAE,OAIVA,EAAA,SAAW,MAKXA,EAAA,WAAa,MAKbA,EAAA,qBAAuB,MAdbA,OAAA,IAoBAD,OAIVA,EAAA,KAAO,MAJGA,OAAA",
6
- "names": ["main_exports", "__export", "Region", "StoreFileExtension", "StoreFileType", "__toCommonJS", "import_dedupe"]
4
+ "sourcesContent": ["import {packageTracer} from '@alwatr/nanolib';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\n// *** Nitrobase File ***\n\n/**\n * The subdirectory location for each nitrobase file.\n */\nexport enum Region {\n /**\n * Nitrobase file location that can be accessed by anyone. e.g. Product list.\n */\n Public = 'p',\n\n /**\n * Nitrobase file location that can be accessed by authenticated users. e.g. Special price list for dealers\n */\n Authenticated = 'a',\n\n /**\n * Nitrobase file location that can be accessed by admins and managers only. e.g. User list.\n */\n Managers = 'm',\n\n /**\n * Nitrobase file location specific to each user id. Can be accessed using the user token. e.g. User profile and User orders.\n */\n PerUser = 'u',\n\n /**\n * Nitrobase file location specific to each owner id. e.g. user token or device id.\n */\n PerOwner = 'o',\n\n /**\n * Private nitrobase file location. Cannot be accessed publicly and must be directly accessed by the admin API only.\n * e.g. User secret data.\n */\n Secret = '.s',\n}\n\n/**\n * The different types of nitrobase file formats.\n */\nexport enum StoreFileType {\n /**\n * Type used for `single document` storage.\n */\n Document = 'doc',\n\n /**\n * Type used for storing a `collection` of simpler documents, referred to as collection items.\n */\n Collection = 'col',\n\n /**\n * Type used for storing a collection of items that are `append-only`.\n */\n AppendOnlyCollection = 'aoc',\n}\n\n/**\n * Nitrobase file extension (encode).\n */\nexport enum StoreFileExtension {\n /**\n * AlwatrNitrobase JSON format.\n */\n Json = 'asj',\n}\n\n/**\n * Unique identifier of the nitrobase file.\n *\n * Get from user for select nitrobase file.\n */\nexport type StoreFileId = {\n /**\n * The nitrobase filename.\n */\n readonly name: string;\n\n /**\n * The region where the nitrobase file is located.\n * @see {@link Region}\n */\n readonly region: Region;\n\n /**\n * The owner of the nitrobase file.\n * If the region is `Region.PerX` then this is the user id, device id, or token id etc.\n * @see {@link Region}\n *\n */\n readonly ownerId?: string;\n\n /**\n * The schema version for easy migration by user.\n * If not specified, the default value is `1`.\n */\n schemaVer?: number;\n};\n\n/**\n * Nitrobase the complete metadata of the file in the root database.\n */\nexport type StoreFileStat = StoreFileId & {\n /**\n * The type of the nitrobase file.\n *\n * @see {@link StoreFileType}\n */\n readonly type: StoreFileType;\n\n /**\n * The extension used for the nitrobase file.\n *\n * @see {@link StoreFileExtension}\n */\n readonly extension?: StoreFileExtension;\n\n /**\n * The save debounce timeout in milliseconds for minimal disk I/O usage.\n * This is used to limit the frequency of disk writes for performance reasons.\n * The recommended value is `40`.\n * If not specified, the default value get from AlwatrNitrobase `defaultChangeDebounce`.\n */\n readonly changeDebounce?: number;\n\n /**\n * The name of the migration process.\n * This is used to migrate the nitrobase file to a new schema version.\n */\n readonly migrateName?: string;\n\n /**\n * The time-to-live (TTL) of the nitrobase file in memory.\n */\n // readonly ttl?: number;\n};\n\n/**\n * Represents the metadata of a nitrobase file.\n */\nexport type StoreFileMeta = StoreFileStat & {\n /**\n * Nitrobase file format version.\n */\n fv: number;\n\n /**\n * The revision number of the nitrobase file.\n *\n * This number is incremented every time the nitrobase file is updated.\n */\n rev: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the nitrobase file was created.\n */\n readonly created: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the nitrobase file was updated.\n */\n updated: number;\n\n /**\n * Last auto increment id.\n */\n lastAutoId?: number;\n\n /**\n * The extra metadata for the nitrobase file.\n */\n extra: JsonObject;\n};\n\nexport type StoreFileData<T extends JsonObject = JsonObject> = T;\n\n/**\n * Represents the context of a nitrobase file.\n * @template TData The type of the data content in the nitrobase file.\n */\nexport type StoreFileContext<TData extends JsonObject = JsonObject> = {\n /**\n * The status of the nitrobase file.\n *\n * if false, the Alwatr nitrobase throws an error.\n */\n readonly ok: true;\n\n /**\n * The metadata of the nitrobase file.\n * @see {@link StoreFileMeta}\n */\n readonly meta: StoreFileMeta;\n\n /**\n * The data content of the nitrobase file.\n */\n readonly data: TData;\n};\n\n/**\n * Nitrobase file meta only content type.\n */\nexport type StoreFileMetaOnlyContext = Omit<StoreFileContext<never>, 'data'>;\n\n// *** Documents ***\n\n/**\n * StoreFileContext for document type.\n */\nexport type DocumentContext<T extends JsonObject = JsonObject> = StoreFileContext<T>;\n\n// *** Collections ***\n\n/**\n * The metadata of an item in a collection.\n */\nexport type CollectionItemMeta = {\n /**\n * The unique identifier for the collection item.\n */\n readonly id: string | number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the collection item was created.\n */\n readonly created: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the collection item was updated.\n */\n updated: number;\n\n /**\n * The revision number for the collection item.\n *\n * This number is incremented each time the item is updated.\n */\n rev: number;\n};\n\n/**\n * Collection item context type.\n */\nexport type CollectionItem<TData extends JsonObject = JsonObject> = {\n /**\n * Collection item's metadata.\n */\n readonly meta: CollectionItemMeta;\n\n /**\n * Collection item data.\n */\n readonly data: TData;\n};\n\n/**\n * Collection item context type.\n */\nexport type CollectionContext<T extends JsonObject = JsonObject> = StoreFileContext<DictionaryReq<CollectionItem<T>>>;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA4B;AAE5B,aAAc,8BAAc,IAAI,2BAAkB,OAAmB;AAO9D,IAAK,SAAL,kBAAKA,YAAL;AAIL,EAAAA,QAAA,YAAS;AAKT,EAAAA,QAAA,mBAAgB;AAKhB,EAAAA,QAAA,cAAW;AAKX,EAAAA,QAAA,aAAU;AAKV,EAAAA,QAAA,cAAW;AAMX,EAAAA,QAAA,YAAS;AA9BC,SAAAA;AAAA,GAAA;AAoCL,IAAK,gBAAL,kBAAKC,mBAAL;AAIL,EAAAA,eAAA,cAAW;AAKX,EAAAA,eAAA,gBAAa;AAKb,EAAAA,eAAA,0BAAuB;AAdb,SAAAA;AAAA,GAAA;AAoBL,IAAK,qBAAL,kBAAKC,wBAAL;AAIL,EAAAA,oBAAA,UAAO;AAJG,SAAAA;AAAA,GAAA;",
6
+ "names": ["Region", "StoreFileType", "StoreFileExtension"]
7
7
  }
package/dist/main.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import type { Dictionary, JsonObject } from '@alwatr/type-helper';
2
1
  /**
3
2
  * The subdirectory location for each nitrobase file.
4
3
  */
@@ -212,5 +211,5 @@ export type CollectionItem<TData extends JsonObject = JsonObject> = {
212
211
  /**
213
212
  * Collection item context type.
214
213
  */
215
- export type CollectionContext<T extends JsonObject = JsonObject> = StoreFileContext<Dictionary<CollectionItem<T>>>;
214
+ export type CollectionContext<T extends JsonObject = JsonObject> = StoreFileContext<DictionaryReq<CollectionItem<T>>>;
216
215
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAMhE;;GAEG;AACH,oBAAY,MAAM;IAChB;;OAEG;IACH,MAAM,MAAM;IAEZ;;OAEG;IACH,aAAa,MAAM;IAEnB;;OAEG;IACH,QAAQ,MAAM;IAEd;;OAEG;IACH,OAAO,MAAM;IAEb;;OAEG;IACH,QAAQ,MAAM;IAEd;;;OAGG;IACH,MAAM,OAAO;CACd;AAED;;GAEG;AACH,oBAAY,aAAa;IACvB;;OAEG;IACH,QAAQ,QAAQ;IAEhB;;OAEG;IACH,UAAU,QAAQ;IAElB;;OAEG;IACH,oBAAoB,QAAQ;CAC7B;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC5B;;OAEG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=(e=>(e.Public="p",e.Authenticated="a",e.Managers="m",e.PerUser="u",e.PerOwner="o",e.Secret=".s",e))(n||{}),a=(t=>(t.Document="doc",t.Collection="col",t.AppendOnlyCollection="aoc",t))(a||{}),l=(o=>(o.Json="asj",o))(l||{});export{n as Region,l as StoreFileExtension,a as StoreFileType};
1
+ /* @alwatr/nitrobase-types v7.3.0 */
2
+
3
+ // src/main.ts
4
+ import { packageTracer } from "@alwatr/nanolib";
5
+ __dev_mode__: packageTracer.add("@alwatr/nitrobase-types", "7.3.0");
6
+ var Region = /* @__PURE__ */ ((Region2) => {
7
+ Region2["Public"] = "p";
8
+ Region2["Authenticated"] = "a";
9
+ Region2["Managers"] = "m";
10
+ Region2["PerUser"] = "u";
11
+ Region2["PerOwner"] = "o";
12
+ Region2["Secret"] = ".s";
13
+ return Region2;
14
+ })(Region || {});
15
+ var StoreFileType = /* @__PURE__ */ ((StoreFileType2) => {
16
+ StoreFileType2["Document"] = "doc";
17
+ StoreFileType2["Collection"] = "col";
18
+ StoreFileType2["AppendOnlyCollection"] = "aoc";
19
+ return StoreFileType2;
20
+ })(StoreFileType || {});
21
+ var StoreFileExtension = /* @__PURE__ */ ((StoreFileExtension2) => {
22
+ StoreFileExtension2["Json"] = "asj";
23
+ return StoreFileExtension2;
24
+ })(StoreFileExtension || {});
25
+ export {
26
+ Region,
27
+ StoreFileExtension,
28
+ StoreFileType
29
+ };
30
+ /*! For license information please see main.mjs.LEGAL.txt */
3
31
  //# 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 {definePackage} from '@alwatr/dedupe';\n\nimport type {} from '@alwatr/nano-build';\nimport type {Dictionary, JsonObject} from '@alwatr/type-helper';\n\ndefinePackage('@alwatr/nitrobase-types', __package_version__);\n\n// *** Nitrobase File ***\n\n/**\n * The subdirectory location for each nitrobase file.\n */\nexport enum Region {\n /**\n * Nitrobase file location that can be accessed by anyone. e.g. Product list.\n */\n Public = 'p',\n\n /**\n * Nitrobase file location that can be accessed by authenticated users. e.g. Special price list for dealers\n */\n Authenticated = 'a',\n\n /**\n * Nitrobase file location that can be accessed by admins and managers only. e.g. User list.\n */\n Managers = 'm',\n\n /**\n * Nitrobase file location specific to each user id. Can be accessed using the user token. e.g. User profile and User orders.\n */\n PerUser = 'u',\n\n /**\n * Nitrobase file location specific to each owner id. e.g. user token or device id.\n */\n PerOwner = 'o',\n\n /**\n * Private nitrobase file location. Cannot be accessed publicly and must be directly accessed by the admin API only.\n * e.g. User secret data.\n */\n Secret = '.s',\n}\n\n/**\n * The different types of nitrobase file formats.\n */\nexport enum StoreFileType {\n /**\n * Type used for `single document` storage.\n */\n Document = 'doc',\n\n /**\n * Type used for storing a `collection` of simpler documents, referred to as collection items.\n */\n Collection = 'col',\n\n /**\n * Type used for storing a collection of items that are `append-only`.\n */\n AppendOnlyCollection = 'aoc',\n}\n\n/**\n * Nitrobase file extension (encode).\n */\nexport enum StoreFileExtension {\n /**\n * AlwatrNitrobase JSON format.\n */\n Json = 'asj',\n}\n\n/**\n * Unique identifier of the nitrobase file.\n *\n * Get from user for select nitrobase file.\n */\nexport type StoreFileId = {\n /**\n * The nitrobase filename.\n */\n readonly name: string;\n\n /**\n * The region where the nitrobase file is located.\n * @see {@link Region}\n */\n readonly region: Region;\n\n /**\n * The owner of the nitrobase file.\n * If the region is `Region.PerX` then this is the user id, device id, or token id etc.\n * @see {@link Region}\n *\n */\n readonly ownerId?: string;\n\n /**\n * The schema version for easy migration by user.\n * If not specified, the default value is `1`.\n */\n schemaVer?: number;\n};\n\n/**\n * Nitrobase the complete metadata of the file in the root database.\n */\nexport type StoreFileStat = StoreFileId & {\n /**\n * The type of the nitrobase file.\n *\n * @see {@link StoreFileType}\n */\n readonly type: StoreFileType;\n\n /**\n * The extension used for the nitrobase file.\n *\n * @see {@link StoreFileExtension}\n */\n readonly extension?: StoreFileExtension;\n\n /**\n * The save debounce timeout in milliseconds for minimal disk I/O usage.\n * This is used to limit the frequency of disk writes for performance reasons.\n * The recommended value is `40`.\n * If not specified, the default value get from AlwatrNitrobase `defaultChangeDebounce`.\n */\n readonly changeDebounce?: number;\n\n /**\n * The name of the migration process.\n * This is used to migrate the nitrobase file to a new schema version.\n */\n readonly migrateName?: string;\n\n /**\n * The time-to-live (TTL) of the nitrobase file in memory.\n */\n // readonly ttl?: number;\n};\n\n/**\n * Represents the metadata of a nitrobase file.\n */\nexport type StoreFileMeta = StoreFileStat & {\n /**\n * Nitrobase file format version.\n */\n fv: number;\n\n /**\n * The revision number of the nitrobase file.\n *\n * This number is incremented every time the nitrobase file is updated.\n */\n rev: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the nitrobase file was created.\n */\n readonly created: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the nitrobase file was updated.\n */\n updated: number;\n\n /**\n * Last auto increment id.\n */\n lastAutoId?: number;\n\n /**\n * The extra metadata for the nitrobase file.\n */\n extra: JsonObject;\n};\n\nexport type StoreFileData<T extends JsonObject = JsonObject> = T;\n\n/**\n * Represents the context of a nitrobase file.\n * @template TData The type of the data content in the nitrobase file.\n */\nexport type StoreFileContext<TData extends JsonObject = JsonObject> = {\n /**\n * The status of the nitrobase file.\n *\n * if false, the Alwatr nitrobase throws an error.\n */\n readonly ok: true;\n\n /**\n * The metadata of the nitrobase file.\n * @see {@link StoreFileMeta}\n */\n readonly meta: StoreFileMeta;\n\n /**\n * The data content of the nitrobase file.\n */\n readonly data: TData;\n};\n\n/**\n * Nitrobase file meta only content type.\n */\nexport type StoreFileMetaOnlyContext = Omit<StoreFileContext<never>, 'data'>;\n\n// *** Documents ***\n\n/**\n * StoreFileContext for document type.\n */\nexport type DocumentContext<T extends JsonObject = JsonObject> = StoreFileContext<T>;\n\n// *** Collections ***\n\n/**\n * The metadata of an item in a collection.\n */\nexport type CollectionItemMeta = {\n /**\n * The unique identifier for the collection item.\n */\n readonly id: string | number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the collection item was created.\n */\n readonly created: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the collection item was updated.\n */\n updated: number;\n\n /**\n * The revision number for the collection item.\n *\n * This number is incremented each time the item is updated.\n */\n rev: number;\n};\n\n/**\n * Collection item context type.\n */\nexport type CollectionItem<TData extends JsonObject = JsonObject> = {\n /**\n * Collection item's metadata.\n */\n readonly meta: CollectionItemMeta;\n\n /**\n * Collection item data.\n */\n readonly data: TData;\n};\n\n/**\n * Collection item context type.\n */\nexport type CollectionContext<T extends JsonObject = JsonObject> = StoreFileContext<Dictionary<CollectionItem<T>>>;\n"],
5
- "mappings": ";AAAA,OAAQ,iBAAAA,MAAoB,iBAK5BA,EAAc,0BAA2B,OAAmB,EAOrD,IAAKC,OAIVA,EAAA,OAAS,IAKTA,EAAA,cAAgB,IAKhBA,EAAA,SAAW,IAKXA,EAAA,QAAU,IAKVA,EAAA,SAAW,IAMXA,EAAA,OAAS,KA9BCA,OAAA,IAoCAC,OAIVA,EAAA,SAAW,MAKXA,EAAA,WAAa,MAKbA,EAAA,qBAAuB,MAdbA,OAAA,IAoBAC,OAIVA,EAAA,KAAO,MAJGA,OAAA",
6
- "names": ["definePackage", "Region", "StoreFileType", "StoreFileExtension"]
4
+ "sourcesContent": ["import {packageTracer} from '@alwatr/nanolib';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\n// *** Nitrobase File ***\n\n/**\n * The subdirectory location for each nitrobase file.\n */\nexport enum Region {\n /**\n * Nitrobase file location that can be accessed by anyone. e.g. Product list.\n */\n Public = 'p',\n\n /**\n * Nitrobase file location that can be accessed by authenticated users. e.g. Special price list for dealers\n */\n Authenticated = 'a',\n\n /**\n * Nitrobase file location that can be accessed by admins and managers only. e.g. User list.\n */\n Managers = 'm',\n\n /**\n * Nitrobase file location specific to each user id. Can be accessed using the user token. e.g. User profile and User orders.\n */\n PerUser = 'u',\n\n /**\n * Nitrobase file location specific to each owner id. e.g. user token or device id.\n */\n PerOwner = 'o',\n\n /**\n * Private nitrobase file location. Cannot be accessed publicly and must be directly accessed by the admin API only.\n * e.g. User secret data.\n */\n Secret = '.s',\n}\n\n/**\n * The different types of nitrobase file formats.\n */\nexport enum StoreFileType {\n /**\n * Type used for `single document` storage.\n */\n Document = 'doc',\n\n /**\n * Type used for storing a `collection` of simpler documents, referred to as collection items.\n */\n Collection = 'col',\n\n /**\n * Type used for storing a collection of items that are `append-only`.\n */\n AppendOnlyCollection = 'aoc',\n}\n\n/**\n * Nitrobase file extension (encode).\n */\nexport enum StoreFileExtension {\n /**\n * AlwatrNitrobase JSON format.\n */\n Json = 'asj',\n}\n\n/**\n * Unique identifier of the nitrobase file.\n *\n * Get from user for select nitrobase file.\n */\nexport type StoreFileId = {\n /**\n * The nitrobase filename.\n */\n readonly name: string;\n\n /**\n * The region where the nitrobase file is located.\n * @see {@link Region}\n */\n readonly region: Region;\n\n /**\n * The owner of the nitrobase file.\n * If the region is `Region.PerX` then this is the user id, device id, or token id etc.\n * @see {@link Region}\n *\n */\n readonly ownerId?: string;\n\n /**\n * The schema version for easy migration by user.\n * If not specified, the default value is `1`.\n */\n schemaVer?: number;\n};\n\n/**\n * Nitrobase the complete metadata of the file in the root database.\n */\nexport type StoreFileStat = StoreFileId & {\n /**\n * The type of the nitrobase file.\n *\n * @see {@link StoreFileType}\n */\n readonly type: StoreFileType;\n\n /**\n * The extension used for the nitrobase file.\n *\n * @see {@link StoreFileExtension}\n */\n readonly extension?: StoreFileExtension;\n\n /**\n * The save debounce timeout in milliseconds for minimal disk I/O usage.\n * This is used to limit the frequency of disk writes for performance reasons.\n * The recommended value is `40`.\n * If not specified, the default value get from AlwatrNitrobase `defaultChangeDebounce`.\n */\n readonly changeDebounce?: number;\n\n /**\n * The name of the migration process.\n * This is used to migrate the nitrobase file to a new schema version.\n */\n readonly migrateName?: string;\n\n /**\n * The time-to-live (TTL) of the nitrobase file in memory.\n */\n // readonly ttl?: number;\n};\n\n/**\n * Represents the metadata of a nitrobase file.\n */\nexport type StoreFileMeta = StoreFileStat & {\n /**\n * Nitrobase file format version.\n */\n fv: number;\n\n /**\n * The revision number of the nitrobase file.\n *\n * This number is incremented every time the nitrobase file is updated.\n */\n rev: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the nitrobase file was created.\n */\n readonly created: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the nitrobase file was updated.\n */\n updated: number;\n\n /**\n * Last auto increment id.\n */\n lastAutoId?: number;\n\n /**\n * The extra metadata for the nitrobase file.\n */\n extra: JsonObject;\n};\n\nexport type StoreFileData<T extends JsonObject = JsonObject> = T;\n\n/**\n * Represents the context of a nitrobase file.\n * @template TData The type of the data content in the nitrobase file.\n */\nexport type StoreFileContext<TData extends JsonObject = JsonObject> = {\n /**\n * The status of the nitrobase file.\n *\n * if false, the Alwatr nitrobase throws an error.\n */\n readonly ok: true;\n\n /**\n * The metadata of the nitrobase file.\n * @see {@link StoreFileMeta}\n */\n readonly meta: StoreFileMeta;\n\n /**\n * The data content of the nitrobase file.\n */\n readonly data: TData;\n};\n\n/**\n * Nitrobase file meta only content type.\n */\nexport type StoreFileMetaOnlyContext = Omit<StoreFileContext<never>, 'data'>;\n\n// *** Documents ***\n\n/**\n * StoreFileContext for document type.\n */\nexport type DocumentContext<T extends JsonObject = JsonObject> = StoreFileContext<T>;\n\n// *** Collections ***\n\n/**\n * The metadata of an item in a collection.\n */\nexport type CollectionItemMeta = {\n /**\n * The unique identifier for the collection item.\n */\n readonly id: string | number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the collection item was created.\n */\n readonly created: number;\n\n /**\n * The Unix timestamp (in milliseconds since the epoch) for when the collection item was updated.\n */\n updated: number;\n\n /**\n * The revision number for the collection item.\n *\n * This number is incremented each time the item is updated.\n */\n rev: number;\n};\n\n/**\n * Collection item context type.\n */\nexport type CollectionItem<TData extends JsonObject = JsonObject> = {\n /**\n * Collection item's metadata.\n */\n readonly meta: CollectionItemMeta;\n\n /**\n * Collection item data.\n */\n readonly data: TData;\n};\n\n/**\n * Collection item context type.\n */\nexport type CollectionContext<T extends JsonObject = JsonObject> = StoreFileContext<DictionaryReq<CollectionItem<T>>>;\n"],
5
+ "mappings": ";;;AAAA,SAAQ,qBAAoB;AAE5B,aAAc,eAAc,IAAI,2BAAkB,OAAmB;AAO9D,IAAK,SAAL,kBAAKA,YAAL;AAIL,EAAAA,QAAA,YAAS;AAKT,EAAAA,QAAA,mBAAgB;AAKhB,EAAAA,QAAA,cAAW;AAKX,EAAAA,QAAA,aAAU;AAKV,EAAAA,QAAA,cAAW;AAMX,EAAAA,QAAA,YAAS;AA9BC,SAAAA;AAAA,GAAA;AAoCL,IAAK,gBAAL,kBAAKC,mBAAL;AAIL,EAAAA,eAAA,cAAW;AAKX,EAAAA,eAAA,gBAAa;AAKb,EAAAA,eAAA,0BAAuB;AAdb,SAAAA;AAAA,GAAA;AAoBL,IAAK,qBAAL,kBAAKC,wBAAL;AAIL,EAAAA,oBAAA,UAAO;AAJG,SAAAA;AAAA,GAAA;",
6
+ "names": ["Region", "StoreFileType", "StoreFileExtension"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwatr/nitrobase-types",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "description": "Nitrobase is a blazingly fast, lightweight database built on JSON. It stores data entirely in memory for lightning-quick access, while also providing a JSON file backup for persistence. You can easily serve your data over the web using our high-performance accelerated Nginx server.",
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": "MIT",
30
+ "license": "AGPL-3.0-only",
31
31
  "files": [
32
32
  "**/*.{js,mjs,cjs,map,d.ts,html,md}",
33
33
  "!demo/**/*"
@@ -60,15 +60,15 @@
60
60
  "clean": "rm -rfv dist *.tsbuildinfo"
61
61
  },
62
62
  "dependencies": {
63
- "@alwatr/dedupe": "^1.0.14"
63
+ "@alwatr/nanolib": "^1.2.0"
64
64
  },
65
65
  "devDependencies": {
66
- "@alwatr/nano-build": "^1.3.10",
67
- "@alwatr/prettier-config": "^1.0.4",
68
- "@alwatr/tsconfig-base": "^1.2.0",
69
- "@alwatr/type-helper": "^1.2.6",
70
- "@types/node": "^22.6.1",
71
- "typescript": "^5.6.2"
66
+ "@alwatr/nano-build": "^2.0.1",
67
+ "@alwatr/prettier-config": "^1.0.6",
68
+ "@alwatr/tsconfig-base": "^1.3.2",
69
+ "@alwatr/type-helper": "^2.0.2",
70
+ "@types/node": "^22.7.5",
71
+ "typescript": "^5.6.3"
72
72
  },
73
- "gitHead": "16721bc83c4c971ae03f8ab4ee4f66794e3ed5b6"
73
+ "gitHead": "e80e7aa8f61ba048d91f1d4fe1433a7bfa27d28c"
74
74
  }