@_linked/server 2.12.0 → 2.12.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,5 +1,19 @@
1
1
  # @\_linked/server
2
2
 
3
+ ## 2.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#75](https://github.com/linked-fw/server/pull/75) [`b285519`](https://github.com/linked-fw/server/commit/b285519430e2e7d1e0daef655c91066af6bd72fd) Thanks [@flyon](https://github.com/flyon)! - Compile the whole `src` folder, and let a bare import resolve under Node10.
8
+
9
+ The build only emitted what an entry transitively reached, so any module
10
+ nothing imported was never built — and never type-checked, so it rotted
11
+ quietly. `include` now covers `src/**/*` with tests excluded explicitly.
12
+
13
+ `typesVersions` maps every specifier through `lib/esm/*`, so a `types` value
14
+ that already carried that prefix had it applied twice and no consumer on
15
+ classic Node10 resolution could `import` the package by its bare name.
16
+
3
17
  ## 2.12.0
4
18
 
5
19
  ### Minor Changes
@@ -0,0 +1,7 @@
1
+ export declare const STORAGE_PATH: string;
2
+ /**
3
+ * @deprecated — URI generation for old quad stores. Will be removed.
4
+ */
5
+ export declare function setURIs(nodeToCurrentUriMap: Map<{
6
+ id: string;
7
+ }, string>, prefix?: string): Promise<[string, string][]>;
@@ -0,0 +1,31 @@
1
+ export const STORAGE_PATH = './data/filestores/';
2
+ function hashString(str) {
3
+ let hash = 0;
4
+ for (let charIndex = 0; charIndex < str.length; ++charIndex) {
5
+ hash += str.charCodeAt(charIndex);
6
+ hash += hash << 10;
7
+ hash ^= hash >> 6;
8
+ }
9
+ hash += hash << 3;
10
+ hash ^= hash >> 11;
11
+ return (((hash + (hash << 15)) & 4294967295) >>> 0).toString(16);
12
+ }
13
+ const newUris = new Set();
14
+ /**
15
+ * @deprecated — URI generation for old quad stores. Will be removed.
16
+ */
17
+ export function setURIs(nodeToCurrentUriMap, prefix = process.env.DATA_ROOT) {
18
+ let counter = 0;
19
+ let res = [];
20
+ let currentTimestamp = Date.now();
21
+ nodeToCurrentUriMap.forEach((currentUri, node) => {
22
+ let newUri = `${prefix}${hashString(currentTimestamp + '.' + counter++)}`;
23
+ while (newUris.has(newUri)) {
24
+ newUri = `${prefix}${hashString(currentTimestamp + '.' + counter++)}`;
25
+ }
26
+ newUris.add(newUri);
27
+ res.push([currentUri, newUri]);
28
+ });
29
+ return Promise.resolve(res);
30
+ }
31
+ //# sourceMappingURL=NodeQuadStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeQuadStore.js","sourceRoot":"","sources":["../../../src/utils/NodeQuadStore.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAW,oBAAoB,CAAC;AAEzD,SAAS,UAAU,CAAC,GAAW;IAC7B,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC;QAC5D,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAClC,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACnB,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC;IAClB,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;IACnB,OAAO,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;AAElC;;GAEG;AACH,MAAM,UAAU,OAAO,CACrB,mBAAgD,EAChD,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS;IAE9B,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,GAAG,GAAuB,EAAE,CAAC;IACjC,IAAI,gBAAgB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAClC,mBAAmB,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE;QAC/C,IAAI,MAAM,GAAG,GAAG,MAAM,GAAG,UAAU,CAAC,gBAAgB,GAAG,GAAG,GAAG,OAAO,EAAE,CAAC,EAAE,CAAC;QAC1E,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,MAAM,GAAG,GAAG,MAAM,GAAG,UAAU,CAAC,gBAAgB,GAAG,GAAG,GAAG,OAAO,EAAE,CAAC,EAAE,CAAC;QACxE,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,GAAG,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC"}
File without changes
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=syncShapes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syncShapes.js","sourceRoot":"","sources":["../../../src/utils/syncShapes.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -10,12 +10,12 @@
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/linked-fw/server.git"
12
12
  },
13
- "version": "2.12.0",
13
+ "version": "2.12.1",
14
14
  "packageManager": "npm@11.19.1",
15
15
  "linkedPackage": true,
16
16
  "type": "module",
17
17
  "main": "lib/esm/index.js",
18
- "types": "./lib/esm/index.d.ts",
18
+ "types": "index.d.ts",
19
19
  "license": "ISC",
20
20
  "scripts": {
21
21
  "start": "npm exec linked dev",
@@ -50,8 +50,8 @@
50
50
  "node-addon-api": "^8.2.2",
51
51
  "open": "^8.4.0",
52
52
  "proper-lockfile": "^4.1.2",
53
- "react": "^18.2",
54
- "react-dom": "^18.2",
53
+ "react": "^19.3.0",
54
+ "react-dom": "^19.3.0",
55
55
  "react-error-boundary": "^4.0.13",
56
56
  "react-router-dom": "^6.22.3",
57
57
  "rimraf": "^5.0.5",
@@ -69,7 +69,7 @@
69
69
  "@jest/globals": "^29.7.0",
70
70
  "@types/jest": "^29.5.14",
71
71
  "@types/node": "^20.12.7",
72
- "@types/react-dom": "^18.0.6",
72
+ "@types/react-dom": "^19.3.0",
73
73
  "copyfiles": "^2.4.1",
74
74
  "cross-env": "^7.0.3",
75
75
  "jest": "^29.7.0",