@quatrain/backend-sqlite 1.1.4 → 1.1.5

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.
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.SQLiteAdapter = void 0;
16
16
  const core_1 = require("@quatrain/core");
17
17
  const backend_1 = require("@quatrain/backend");
18
- const crypto_1 = require("crypto");
18
+ const node_crypto_1 = require("node:crypto");
19
19
  const sqlite3_1 = __importDefault(require("sqlite3"));
20
20
  const sqlite_1 = require("sqlite");
21
21
  const operatorsMap = {
@@ -187,7 +187,7 @@ class SQLiteAdapter extends backend_1.AbstractBackendAdapter {
187
187
  if (dataObject.uid) {
188
188
  throw new backend_1.BackendError(`Data object already has an uid and can't be created`);
189
189
  }
190
- const uid = desiredUid || (0, crypto_1.randomUUID)();
190
+ const uid = desiredUid || (0, node_crypto_1.randomUUID)();
191
191
  // Make sure table exists
192
192
  yield this._ensureTable(dataObject);
193
193
  // Set uid before middlewares so they can use it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/backend-sqlite",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "license": "AGPL-3.0-only",
5
5
  "description": "Backend adapter for SQLite",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "author": "Quatrain Développement SAS <developers@quatrain.com>",
22
22
  "dependencies": {
23
23
  "@quatrain/backend": "^1.2.3",
24
- "@quatrain/core": "^1.2.3",
24
+ "@quatrain/core": "^1.2.4",
25
25
  "sqlite": "^5.1.1",
26
26
  "sqlite3": "^5.1.7"
27
27
  },
@@ -19,7 +19,7 @@ import {
19
19
  Sorting,
20
20
  CollectionHierarchy,
21
21
  } from '@quatrain/backend'
22
- import { randomUUID } from 'crypto'
22
+ import { randomUUID } from 'node:crypto'
23
23
  import sqlite3, { Statement } from 'sqlite3'
24
24
  import { open, Database } from 'sqlite'
25
25
 
@@ -3,8 +3,8 @@ import { BackendError, Filter, OperatorKeys } from '@quatrain/backend'
3
3
  import { NotFoundError } from '@quatrain/core'
4
4
  import { SQLiteAdapter } from '../SQLiteAdapter'
5
5
  import { createUser, createEntity, setup, Entity } from './common'
6
- import fs from 'fs'
7
- import path from 'path'
6
+ import fs from 'node:fs'
7
+ import path from 'node:path'
8
8
 
9
9
  describe('SQLiteAdapter Tests', () => {
10
10
  let adapter: SQLiteAdapter