@loaders.gl/bson 3.4.11 → 3.4.12

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.
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
11
11
  var _parseBson = require("./lib/parsers/parse-bson");
12
12
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
13
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
14
- var VERSION = typeof "3.4.11" !== 'undefined' ? "3.4.11" : 'latest';
14
+ var VERSION = typeof "3.4.12" !== 'undefined' ? "3.4.12" : 'latest';
15
15
  var DEFAULT_BSON_LOADER_OPTIONS = {
16
16
  bson: {}
17
17
  };
@@ -8,7 +8,7 @@ exports.BSONWriter = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _encodeBson = require("./lib/encoders/encode-bson");
11
- var VERSION = typeof "3.4.11" !== 'undefined' ? "3.4.11" : 'latest';
11
+ var VERSION = typeof "3.4.12" !== 'undefined' ? "3.4.12" : 'latest';
12
12
  var BSONWriter = {
13
13
  name: 'BSON',
14
14
  id: 'bson',
@@ -1,5 +1,5 @@
1
1
  import { parseBSONSync } from './lib/parsers/parse-bson';
2
- const VERSION = typeof "3.4.11" !== 'undefined' ? "3.4.11" : 'latest';
2
+ const VERSION = typeof "3.4.12" !== 'undefined' ? "3.4.12" : 'latest';
3
3
  const DEFAULT_BSON_LOADER_OPTIONS = {
4
4
  bson: {}
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { encodeBSONSync } from './lib/encoders/encode-bson';
2
- const VERSION = typeof "3.4.11" !== 'undefined' ? "3.4.11" : 'latest';
2
+ const VERSION = typeof "3.4.12" !== 'undefined' ? "3.4.12" : 'latest';
3
3
  export const BSONWriter = {
4
4
  name: 'BSON',
5
5
  id: 'bson',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/bson",
3
- "version": "3.4.11",
3
+ "version": "3.4.12",
4
4
  "description": "Framework-independent loader for JSON and streaming JSON formats",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -34,11 +34,11 @@
34
34
  "build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
35
35
  },
36
36
  "dependencies": {
37
- "@loaders.gl/gis": "3.4.11",
38
- "@loaders.gl/loader-utils": "3.4.11",
39
- "@loaders.gl/schema": "3.4.11",
37
+ "@loaders.gl/gis": "3.4.12",
38
+ "@loaders.gl/loader-utils": "3.4.12",
39
+ "@loaders.gl/schema": "3.4.12",
40
40
  "@types/bson": "4.2.0",
41
41
  "bson": "4.2.0"
42
42
  },
43
- "gitHead": "2b8d490d2372e70dd89eef8f6b215a5205c16621"
43
+ "gitHead": "85254762ae3082f608a863291deef09f2b40c6cf"
44
44
  }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BSONLoader = void 0;
4
- const parse_bson_1 = require("./lib/parsers/parse-bson");
5
- // __VERSION__ is injected by babel-plugin-version-inline
6
- // @ts-ignore TS2304: Cannot find name '__VERSION__'.
7
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
8
- const DEFAULT_BSON_LOADER_OPTIONS = {
9
- bson: {}
10
- };
11
- exports.BSONLoader = {
12
- name: 'BSON',
13
- id: 'bson',
14
- module: 'bson',
15
- version: VERSION,
16
- extensions: ['bson'],
17
- mimeTypes: ['application/bson'],
18
- category: 'json',
19
- binary: true,
20
- parse,
21
- parseSync,
22
- options: DEFAULT_BSON_LOADER_OPTIONS
23
- };
24
- async function parse(arrayBuffer, options) {
25
- const bsonOptions = { ...DEFAULT_BSON_LOADER_OPTIONS.bson, ...options?.bson };
26
- return (0, parse_bson_1.parseBSONSync)(arrayBuffer, bsonOptions);
27
- }
28
- function parseSync(arrayBuffer, options) {
29
- const bsonOptions = { ...DEFAULT_BSON_LOADER_OPTIONS.bson, ...options?.bson };
30
- return (0, parse_bson_1.parseBSONSync)(arrayBuffer, bsonOptions);
31
- }
@@ -1,27 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.BSONWriter = void 0;
5
- const encode_bson_1 = require("./lib/encoders/encode-bson");
6
- // import type {Writer} from '@loaders.gl/loader-utils';
7
- // __VERSION__ is injected by babel-plugin-version-inline
8
- // @ts-ignore TS2304: Cannot find name '__VERSION__'.
9
- const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
10
- exports.BSONWriter = {
11
- name: 'BSON',
12
- id: 'bson',
13
- module: 'bson',
14
- version: VERSION,
15
- extensions: ['bson'],
16
- options: {
17
- image: {
18
- mimeType: 'application/bson'
19
- }
20
- },
21
- async encode(data, options) {
22
- return (0, encode_bson_1.encodeBSONSync)(data, {}); // options
23
- },
24
- encodeSync(data, options) {
25
- return (0, encode_bson_1.encodeBSONSync)(data, {}); // options
26
- }
27
- };
package/dist/bundle.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- // @ts-nocheck
3
- const moduleExports = require('./index');
4
- globalThis.loaders = globalThis.loaders || {};
5
- module.exports = Object.assign(globalThis.loaders, moduleExports);
package/dist/index.js DELETED
@@ -1,8 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.BSONWriter = exports.BSONLoader = void 0;
5
- var bson_loader_1 = require("./bson-loader");
6
- Object.defineProperty(exports, "BSONLoader", { enumerable: true, get: function () { return bson_loader_1.BSONLoader; } });
7
- var bson_writer_1 = require("./bson-writer");
8
- Object.defineProperty(exports, "BSONWriter", { enumerable: true, get: function () { return bson_writer_1.BSONWriter; } });
@@ -1,11 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.encodeBSONSync = void 0;
5
- const bson_1 = require("bson");
6
- function encodeBSONSync(value, options) {
7
- const uint8Array = (0, bson_1.serialize)(value);
8
- // TODO - make sure the uint8array occupies the entire buffer.
9
- return uint8Array.buffer;
10
- }
11
- exports.encodeBSONSync = encodeBSONSync;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- // loaders.gl, MIT license
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.parseBSONSync = void 0;
5
- const bson_1 = require("bson");
6
- function parseBSONSync(value, options) {
7
- const parsedData = (0, bson_1.deserialize)(new Uint8Array(value), options);
8
- return parsedData;
9
- }
10
- exports.parseBSONSync = parseBSONSync;