@sigx/lynx-storage 0.4.0 → 0.4.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/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { Storage } from './storage';
1
+ export { Storage } from './storage.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,26 +1,2 @@
1
- import { callAsync as e, callSync as t, isModuleAvailable as n } from "@sigx/lynx-core";
2
- //#region src/storage.ts
3
- var r = "Storage", i = {
4
- setItem(e, n) {
5
- t(r, "setItem", e, n);
6
- },
7
- getItem(t) {
8
- return e(r, "getItem", t);
9
- },
10
- removeItem(e) {
11
- t(r, "removeItem", e);
12
- },
13
- clear() {
14
- t(r, "clear");
15
- },
16
- getAllKeys() {
17
- return e(r, "getAllKeys");
18
- },
19
- isAvailable() {
20
- return n(r);
21
- }
22
- };
23
- //#endregion
24
- export { i as Storage };
25
-
1
+ export { Storage } from './storage.js';
26
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/storage.ts"],"sourcesContent":["import { callSync, callAsync, isModuleAvailable } from '@sigx/lynx-core';\n\nconst MODULE = 'Storage';\n\n/**\n * Persistent key-value storage APIs.\n *\n * @example\n * ```ts\n * import { Storage } from '@sigx/lynx-storage';\n *\n * Storage.setItem('user', JSON.stringify({ name: 'Alice' }));\n * const user = await Storage.getItem('user');\n * ```\n */\nexport const Storage = {\n setItem(key: string, value: string): void {\n callSync(MODULE, 'setItem', key, value);\n },\n\n getItem(key: string): Promise<string | null> {\n return callAsync<string | null>(MODULE, 'getItem', key);\n },\n\n removeItem(key: string): void {\n callSync(MODULE, 'removeItem', key);\n },\n\n clear(): void {\n callSync(MODULE, 'clear');\n },\n\n getAllKeys(): Promise<string[]> {\n return callAsync<string[]>(MODULE, 'getAllKeys');\n },\n\n isAvailable(): boolean {\n return isModuleAvailable(MODULE);\n },\n} as const;\n"],"mappings":";;AAEA,IAAM,IAAS,WAaF,IAAU;CACnB,QAAQ,GAAa,GAAqB;EACtC,EAAS,GAAQ,WAAW,GAAK,EAAM;;CAG3C,QAAQ,GAAqC;EACzC,OAAO,EAAyB,GAAQ,WAAW,EAAI;;CAG3D,WAAW,GAAmB;EAC1B,EAAS,GAAQ,cAAc,EAAI;;CAGvC,QAAc;EACV,EAAS,GAAQ,QAAQ;;CAG7B,aAAgC;EAC5B,OAAO,EAAoB,GAAQ,aAAa;;CAGpD,cAAuB;EACnB,OAAO,EAAkB,EAAO;;CAEvC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { callSync, callAsync, isModuleAvailable } from '@sigx/lynx-core';
2
+ const MODULE = 'Storage';
3
+ /**
4
+ * Persistent key-value storage APIs.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { Storage } from '@sigx/lynx-storage';
9
+ *
10
+ * Storage.setItem('user', JSON.stringify({ name: 'Alice' }));
11
+ * const user = await Storage.getItem('user');
12
+ * ```
13
+ */
14
+ export const Storage = {
15
+ setItem(key, value) {
16
+ callSync(MODULE, 'setItem', key, value);
17
+ },
18
+ getItem(key) {
19
+ return callAsync(MODULE, 'getItem', key);
20
+ },
21
+ removeItem(key) {
22
+ callSync(MODULE, 'removeItem', key);
23
+ },
24
+ clear() {
25
+ callSync(MODULE, 'clear');
26
+ },
27
+ getAllKeys() {
28
+ return callAsync(MODULE, 'getAllKeys');
29
+ },
30
+ isAvailable() {
31
+ return isModuleAvailable(MODULE);
32
+ },
33
+ };
34
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,MAAM,MAAM,GAAG,SAAS,CAAC;AAEzB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB,OAAO,CAAC,GAAW,EAAE,KAAa;QAC9B,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,CAAC,GAAW;QACf,OAAO,SAAS,CAAgB,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;IAC5D,CAAC;IAED,UAAU,CAAC,GAAW;QAClB,QAAQ,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;IAED,KAAK;QACD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,UAAU;QACN,OAAO,SAAS,CAAW,MAAM,EAAE,YAAY,CAAC,CAAC;IACrD,CAAC;IAED,WAAW;QACP,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACK,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigx/lynx-storage",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Persistent key-value storage for sigx-lynx",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,11 +19,11 @@
19
19
  "signalx-module.json"
20
20
  ],
21
21
  "dependencies": {
22
- "@sigx/lynx-core": "^0.4.0"
22
+ "@sigx/lynx-core": "^0.4.1"
23
23
  },
24
24
  "devDependencies": {
25
- "typescript": "^6.0.3",
26
- "@sigx/vite": "^0.4.3"
25
+ "@typescript/native-preview": "7.0.0-dev.20260511.1",
26
+ "typescript": "^6.0.3"
27
27
  },
28
28
  "author": "Andreas Ekdahl",
29
29
  "license": "MIT",
@@ -49,7 +49,8 @@
49
49
  "storage"
50
50
  ],
51
51
  "scripts": {
52
- "build": "vite build && tsgo --emitDeclarationOnly",
53
- "dev": "vite build --watch"
52
+ "build": "node ../../scripts/clean.mjs dist && tsgo",
53
+ "dev": "tsgo --watch",
54
+ "clean": "node ../../scripts/clean.mjs dist .turbo"
54
55
  }
55
56
  }