beanbagdb 0.5.2 → 0.5.4

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.
@@ -1,12 +1,11 @@
1
- import { readFile } from 'fs/promises';
2
- import require$$0$3, { fileURLToPath } from 'url';
3
- import require$$1$2, { dirname, join } from 'path';
4
1
  import crypto$1, { scryptSync, randomBytes, createCipheriv, createDecipheriv } from 'crypto';
2
+ import require$$0$3 from 'url';
5
3
  import require$$3$1 from 'http';
6
4
  import require$$4 from 'https';
7
5
  import require$$4$1 from 'assert';
8
6
  import require$$0$2 from 'util';
9
7
  import Stream$3 from 'stream';
8
+ import require$$1$2 from 'path';
10
9
  import fs$2 from 'fs';
11
10
  import require$$0$4 from 'tty';
12
11
  import zlib$1 from 'zlib';
@@ -3284,8 +3283,8 @@ function getJsonPointer(parsedRef, { baseId, schema, root }) {
3284
3283
  }
3285
3284
 
3286
3285
  var $id$1 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#";
3287
- var description$1 = "Meta-schema for $data reference (JSON AnySchema extension proposal)";
3288
- var type$2 = "object";
3286
+ var description$2 = "Meta-schema for $data reference (JSON AnySchema extension proposal)";
3287
+ var type$3 = "object";
3289
3288
  var required$2 = [
3290
3289
  "$data"
3291
3290
  ];
@@ -3305,8 +3304,8 @@ var properties$2 = {
3305
3304
  var additionalProperties$1 = false;
3306
3305
  var require$$9 = {
3307
3306
  $id: $id$1,
3308
- description: description$1,
3309
- type: type$2,
3307
+ description: description$2,
3308
+ type: type$3,
3310
3309
  required: required$2,
3311
3310
  properties: properties$2,
3312
3311
  additionalProperties: additionalProperties$1
@@ -6191,7 +6190,7 @@ const def$c = {
6191
6190
  };
6192
6191
  contains.default = def$c;
6193
6192
 
6194
- var dependencies$1 = {};
6193
+ var dependencies$2 = {};
6195
6194
 
6196
6195
  (function (exports) {
6197
6196
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -6278,7 +6277,7 @@ var dependencies$1 = {};
6278
6277
  exports.validateSchemaDeps = validateSchemaDeps;
6279
6278
  exports.default = def;
6280
6279
 
6281
- } (dependencies$1));
6280
+ } (dependencies$2));
6282
6281
 
6283
6282
  var propertyNames = {};
6284
6283
 
@@ -6769,7 +6768,7 @@ const prefixItems_1 = prefixItems;
6769
6768
  const items_1 = items;
6770
6769
  const items2020_1 = items2020;
6771
6770
  const contains_1 = contains;
6772
- const dependencies_1 = dependencies$1;
6771
+ const dependencies_1 = dependencies$2;
6773
6772
  const propertyNames_1 = propertyNames;
6774
6773
  const additionalProperties_1 = additionalProperties;
6775
6774
  const properties_1 = properties$1;
@@ -7100,7 +7099,7 @@ var definitions = {
7100
7099
  ]
7101
7100
  }
7102
7101
  };
7103
- var type$1 = [
7102
+ var type$2 = [
7104
7103
  "object",
7105
7104
  "boolean"
7106
7105
  ];
@@ -7301,7 +7300,7 @@ var require$$3 = {
7301
7300
  $id: $id,
7302
7301
  title: title,
7303
7302
  definitions: definitions,
7304
- type: type$1,
7303
+ type: type$2,
7305
7304
  properties: properties,
7306
7305
  "default": true
7307
7306
  };
@@ -7540,38 +7539,105 @@ const editable_metadata_schema = {
7540
7539
  }
7541
7540
  };
7542
7541
 
7543
- // Get the current directory
7544
- const __filename = fileURLToPath(import.meta.url);
7545
- const __dirname$1 = dirname(__filename);
7542
+ var name$1 = "beanbagdb";
7543
+ var version$5 = "0.5.4";
7544
+ var description$1 = "A JS library to introduce a schema layer to a No-SQL local database";
7545
+ var main$1 = "dist/beanbagdb.esm.js";
7546
+ var module = "dist/beanbagdb.esm.js";
7547
+ var type$1 = "module";
7548
+ var scripts$1 = {
7549
+ test: "mocha",
7550
+ build: "rollup -c",
7551
+ prepublishOnly: "npm run build"
7552
+ };
7553
+ var repository$1 = {
7554
+ type: "git",
7555
+ url: "git+https://github.com/shubhvjain/beanbagdb.git"
7556
+ };
7557
+ var keywords$1 = [
7558
+ "couchdb",
7559
+ "pouchdb",
7560
+ "local",
7561
+ "database",
7562
+ "schema"
7563
+ ];
7564
+ var author$1 = "svj";
7565
+ var license$1 = "ISC";
7566
+ var bugs = {
7567
+ url: "https://github.com/shubhvjain/beanbagdb/issues"
7568
+ };
7569
+ var homepage$1 = "https://github.com/shubhvjain/beanbagdb#readme";
7570
+ var dependencies$1 = {
7571
+ ajv: "^8.12.0",
7572
+ dotenv: "^16.4.5",
7573
+ nano: "^10.1.3",
7574
+ pouchdb: "^9.0.0",
7575
+ "pouchdb-adapter-memory": "^9.0.0",
7576
+ "pouchdb-find": "^9.0.0"
7577
+ };
7578
+ var devDependencies$1 = {
7579
+ "@rollup/plugin-commonjs": "^26.0.1",
7580
+ "@rollup/plugin-json": "^6.1.0",
7581
+ "@rollup/plugin-node-resolve": "^15.2.3",
7582
+ "@rollup/plugin-replace": "^5.0.7",
7583
+ "@rollup/plugin-terser": "^0.4.4",
7584
+ chai: "^5.1.1",
7585
+ mocha: "^10.7.3",
7586
+ rollup: "^4.21.2"
7587
+ };
7588
+ var pkg = {
7589
+ name: name$1,
7590
+ version: version$5,
7591
+ description: description$1,
7592
+ main: main$1,
7593
+ module: module,
7594
+ type: type$1,
7595
+ scripts: scripts$1,
7596
+ repository: repository$1,
7597
+ keywords: keywords$1,
7598
+ author: author$1,
7599
+ license: license$1,
7600
+ bugs: bugs,
7601
+ homepage: homepage$1,
7602
+ dependencies: dependencies$1,
7603
+ devDependencies: devDependencies$1
7604
+ };
7546
7605
 
7547
- // Adjust path to point to the correct location of package.json (move up from /src)
7548
- const packageJsonPath = join(__dirname$1, '../package.json'); // Adjust to point to the correct folder
7606
+ // import { readFile } from 'fs/promises';
7607
+ // import { fileURLToPath } from 'url';
7608
+ // import { dirname, join } from 'path';
7549
7609
 
7550
- function isNode() {
7551
- return typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
7552
- }
7610
+ // // Get the current directory
7611
+ // const __filename = fileURLToPath(import.meta.url);
7612
+ // const __dirname = dirname(__filename);
7553
7613
 
7614
+ // // Adjust path to point to the correct location of package.json (move up from /src)
7615
+ // const packageJsonPath = join(__dirname, '../package.json'); // Adjust to point to the correct folder
7554
7616
 
7555
- // Function to read package.json and get the version
7556
- async function getPackageVersionNode() {
7557
- try {
7558
- const data = await readFile(packageJsonPath, 'utf-8');
7559
- const packageJson = JSON.parse(data);
7560
- return packageJson.version;
7561
- } catch (error) {
7562
- console.error('Error reading package.json:', error);
7563
- throw error;
7564
- }
7565
- }
7617
+ // function isNode() {
7618
+ // return typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
7619
+ // }
7566
7620
 
7567
7621
 
7622
+ // // Function to read package.json and get the version
7623
+ // async function getPackageVersionNode() {
7624
+ // try {
7625
+ // const data = await readFile(packageJsonPath, 'utf-8');
7626
+ // const packageJson = JSON.parse(data);
7627
+ // return packageJson.version;
7628
+ // } catch (error) {
7629
+ // console.error('Error reading package.json:', error);
7630
+ // throw error;
7631
+ // }
7632
+ // }
7568
7633
 
7569
7634
  async function getPackageVersion() {
7570
- if (isNode()) {
7571
- return await getPackageVersionNode(); // Node.js environment
7572
- } else {
7573
- return "0.5.2"; // Browser environment
7574
- }
7635
+ //if (isNode()) {
7636
+ // return await getPackageVersionNode(); // Node.js environment
7637
+ //} else {
7638
+ // return "0.5.4"; // Browser environment
7639
+ //}
7640
+ return pkg.version
7575
7641
  }
7576
7642
 
7577
7643
  // getPackageVersion().then(version => console.log('Package version:', version));