@onehat/data 1.8.25 → 1.8.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.8.25",
3
+ "version": "1.8.27",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/Entity.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /** @module Entity */
2
2
 
3
3
  import EventEmitter from '@onehat/events';
4
- import PropertyTypes from './Property';
4
+ import PropertyTypes from './Property/index.js';
5
5
  import moment from 'moment';
6
6
  import _ from 'lodash';
7
7
 
package/src/OneHatData.js CHANGED
@@ -1,16 +1,16 @@
1
1
  /** @module OneHatData */
2
2
 
3
3
  import EventEmitter from '@onehat/events';
4
- import CoreRepositoryTypes from './Repository';
4
+ import CoreRepositoryTypes from './Repository/index.js';
5
5
  import {
6
6
  MODE_LOCAL_MIRROR,
7
7
  MODE_COMMAND_QUEUE,
8
8
  MODE_REMOTE_WITH_OFFLINE,
9
- } from './Repository/LocalFromRemote/LocalFromRemote';
9
+ } from './Repository/LocalFromRemote/index.js';
10
10
  import {
11
11
  default as Schema,
12
12
  CoreSchemas,
13
- } from './Schema';
13
+ } from './Schema/index.js';
14
14
  import _ from 'lodash';
15
15
 
16
16
  /**
@@ -1,6 +1,6 @@
1
1
  /** @module Property */
2
2
 
3
- import Property from './Property';
3
+ import Property from './Property.js';
4
4
  import { Base64 } from 'js-base64';
5
5
  import _ from 'lodash';
6
6
 
@@ -1,8 +1,8 @@
1
1
  /** @module Property */
2
2
 
3
- import Property from './Property';
4
- import Formatters from '../Util/Formatters';
5
- import Parsers from '../Util/Parsers';
3
+ import Property from './Property.js';
4
+ import Formatters from '../Util/Formatters.js';
5
+ import Parsers from '../Util/Parsers.js';
6
6
  import _ from 'lodash';
7
7
 
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  /** @module Property */
2
2
 
3
- import Property from './Property';
3
+ import Property from './Property.js';
4
4
  import accounting from 'accounting-js';
5
5
  import _ from 'lodash';
6
6
 
@@ -1,8 +1,8 @@
1
1
  /** @module Property */
2
2
 
3
- import Property from './Property';
4
- import Formatters from '../Util/Formatters';
5
- import Parsers from '../Util/Parsers';
3
+ import Property from './Property.js';
4
+ import Formatters from '../Util/Formatters.js';
5
+ import Parsers from '../Util/Parsers.js';
6
6
  import _ from 'lodash';
7
7
 
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  /** @module Property */
2
2
 
3
- import DateProperty from './Date';
3
+ import DateProperty from './Date.js';
4
4
  import _ from 'lodash';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  /** @module Property */
2
2
 
3
- import Base64Property from './Base64';
3
+ import Base64Property from './Base64.js';
4
4
  import _ from 'lodash';
5
5
 
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  /** @module Property */
2
2
 
3
- import Property from './Property';
4
- import Parsers from '../Util/Parsers';
3
+ import Property from './Property.js';
4
+ import Parsers from '../Util/Parsers.js';
5
5
  import _ from 'lodash';
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /** @module Property */
2
2
 
3
- import Property from './Property';
4
- import Parsers from '../Util/Parsers';
3
+ import Property from './Property.js';
4
+ import Parsers from '../Util/Parsers.js';
5
5
  import _ from 'lodash';
6
6
 
7
7
  let lastId = 0;
@@ -1,6 +1,6 @@
1
1
  /** @module Property */
2
2
 
3
- import Property from './Property';
3
+ import Property from './Property.js';
4
4
  import _ from 'lodash';
5
5
 
6
6
  /**
@@ -1,8 +1,8 @@
1
1
  /** @module Property */
2
2
 
3
- import PercentIntProperty from './PercentInt';
4
- import Formatters from '../Util/Formatters';
5
- import Parsers from '../Util/Parsers';
3
+ import PercentIntProperty from './PercentInt.js';
4
+ import Formatters from '../Util/Formatters.js';
5
+ import Parsers from '../Util/Parsers.js';
6
6
 
7
7
  /**
8
8
  * Class represents a Property that stores a percentage value.
@@ -1,7 +1,7 @@
1
1
  /** @module Property */
2
2
 
3
- import FloatProperty from './Float';
4
- import Formatters from '../Util/Formatters';
3
+ import FloatProperty from './Float.js';
4
+ import Formatters from '../Util/Formatters.js';
5
5
  import _ from 'lodash';
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /** @module Property */
2
2
 
3
- import Property from './Property';
4
- import Parsers from '../Util/Parsers';
3
+ import Property from './Property.js';
4
+ import Parsers from '../Util/Parsers.js';
5
5
  import _ from 'lodash';
6
6
 
7
7
  const TEMP_PREFIX = 'TEMP-';
@@ -1,6 +1,6 @@
1
1
  /** @module Property */
2
2
 
3
- import DateProperty from './Date';
3
+ import DateProperty from './Date.js';
4
4
  import _ from 'lodash';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  /** @module Property */
2
2
 
3
- import Property from './Property';
3
+ import Property from './Property.js';
4
4
  import {
5
5
  v4 as uuid,
6
6
  validate,
@@ -1,19 +1,19 @@
1
1
  /** @module Property */
2
2
 
3
- import Base64Property from './Base64';
4
- import BooleanProperty from './Boolean';
5
- import CurrencyProperty from './Currency';
6
- import DateProperty from './Date';
7
- import DateTimeProperty from './DateTime';
8
- import FileProperty from './File';
9
- import FloatProperty from './Float';
10
- import IntegerProperty from './Integer';
11
- import JsonProperty from './Json';
12
- import PercentProperty from './Percent';
13
- import PercentIntProperty from './PercentInt';
14
- import StringProperty from './String';
15
- import TimeProperty from './Time';
16
- import UuidProperty from './Uuid';
3
+ import Base64Property from './Base64.js';
4
+ import BooleanProperty from './Boolean.js';
5
+ import CurrencyProperty from './Currency.js';
6
+ import DateProperty from './Date.js';
7
+ import DateTimeProperty from './DateTime.js';
8
+ import FileProperty from './File.js';
9
+ import FloatProperty from './Float.js';
10
+ import IntegerProperty from './Integer.js';
11
+ import JsonProperty from './Json.js';
12
+ import PercentProperty from './Percent.js';
13
+ import PercentIntProperty from './PercentInt.js';
14
+ import StringProperty from './String.js';
15
+ import TimeProperty from './Time.js';
16
+ import UuidProperty from './Uuid.js';
17
17
 
18
18
  const PropertyTypes = {
19
19
  [Base64Property.type]: Base64Property,
@@ -1,6 +1,6 @@
1
1
  /** @module Reader */
2
2
 
3
- import Reader from './Reader';
3
+ import Reader from './Reader.js';
4
4
  import _ from 'lodash';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  /** @module Reader */
2
2
 
3
- import Reader from './Reader';
3
+ import Reader from './Reader.js';
4
4
  import parser from 'fast-xml-parser';
5
5
  import he from 'he';
6
6
  import _ from 'lodash';
@@ -1,7 +1,7 @@
1
1
  /** @module Reader */
2
2
 
3
- import JsonReader from './JsonReader';
4
- import XmlReader from './XmlReader';
3
+ import JsonReader from './JsonReader.js';
4
+ import XmlReader from './XmlReader.js';
5
5
 
6
6
  const ReaderTypes = {
7
7
  [JsonReader.type]: JsonReader,
@@ -1,8 +1,8 @@
1
1
  /** @module Repository */
2
2
 
3
- import Repository from './Repository';
4
- import ReaderTypes from '../Reader';
5
- import WriterTypes from '../Writer';
3
+ import Repository from './Repository.js';
4
+ import ReaderTypes from '../Reader/index.js';
5
+ import WriterTypes from '../Writer/index.js';
6
6
  import axios from 'axios';
7
7
  import qs from 'qs';
8
8
  import _ from 'lodash';
@@ -1,6 +1,6 @@
1
1
  /** @module Repository */
2
2
 
3
- import OneBuildRepository from '../OneBuild';
3
+ import OneBuildRepository from '../OneBuild.js';
4
4
  import _ from 'lodash';
5
5
 
6
6
  /**
@@ -1,8 +1,8 @@
1
1
  /** @module Repository */
2
2
 
3
3
  import EventEmitter from '@onehat/events';
4
- import Repository from '../Repository';
5
- import Command from './Command';
4
+ import Repository from '../Repository.js';
5
+ import Command from './Command.js';
6
6
  import moment from 'relative-time-parser'; // Notice this version of moment is imported from 'relative-time-parser', and may be out of sync with our general 'moment' package
7
7
  import {
8
8
  v4 as uuid,
@@ -4,9 +4,9 @@ import LocalFromRemote, {
4
4
  MODE_LOCAL_MIRROR,
5
5
  MODE_COMMAND_QUEUE,
6
6
  MODE_REMOTE_WITH_OFFLINE,
7
- } from './LocalFromRemote';
8
- import Command from './Command';
9
- import CommandRepository from './CommandRepository';
7
+ } from './LocalFromRemote.js';
8
+ import Command from './Command.js';
9
+ import CommandRepository from './CommandRepository.js';
10
10
 
11
11
  export {
12
12
  LocalFromRemote as default,
@@ -1,7 +1,7 @@
1
1
  /** @module Repository */
2
2
 
3
- import Repository from './Repository';
4
- import Entity from '../Entity';
3
+ import Repository from './Repository.js';
4
+ import Entity from '../Entity.js';
5
5
  import _ from 'lodash';
6
6
 
7
7
  const MEM_PREFIX = 'MEM-';
@@ -1,7 +1,7 @@
1
1
  /** @module Repository */
2
2
 
3
- import Repository from './Repository';
4
- import Entity from '../Entity';
3
+ import Repository from './Repository.js';
4
+ import Entity from '../Entity.js';
5
5
  import _ from 'lodash';
6
6
 
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  /** @module Repository */
2
2
 
3
- import MemoryRepository from './Memory';
3
+ import MemoryRepository from './Memory.js';
4
4
  import _ from 'lodash';
5
5
  import moment from 'moment';
6
6
 
@@ -1,6 +1,6 @@
1
1
  /** @module Repository */
2
2
 
3
- import AjaxRepository from './Ajax';
3
+ import AjaxRepository from './Ajax.js';
4
4
  import qs from 'qs';
5
5
  import _ from 'lodash';
6
6
 
@@ -1,7 +1,7 @@
1
1
  /** @module Repository */
2
2
 
3
3
  import EventEmitter from '@onehat/events';
4
- import Entity from '../Entity';
4
+ import Entity from '../Entity.js';
5
5
  import {
6
6
  v4 as uuid,
7
7
  } from 'uuid';
@@ -1,6 +1,6 @@
1
1
  /** @module Repository */
2
2
 
3
- import AjaxRepository from './Ajax';
3
+ import AjaxRepository from './Ajax.js';
4
4
  import _ from 'lodash';
5
5
 
6
6
  /**
@@ -1,12 +1,12 @@
1
1
  /** @module Repository */
2
2
 
3
- import AjaxRepository from './Ajax';
4
- import CommandRepository from './LocalFromRemote/CommandRepository';
5
- import LocalFromRemoteRepository from './LocalFromRemote';
6
- import MemoryRepository from './Memory';
7
- import NullRepository from './Null';
8
- import OneBuildRepository from './OneBuild';
9
- import RestRepository from './Rest';
3
+ import AjaxRepository from './Ajax.js';
4
+ import CommandRepository from './LocalFromRemote/CommandRepository.js';
5
+ import LocalFromRemoteRepository from './LocalFromRemote/index.js';
6
+ import MemoryRepository from './Memory.js';
7
+ import NullRepository from './Null.js';
8
+ import OneBuildRepository from './OneBuild.js';
9
+ import RestRepository from './Rest.js';
10
10
 
11
11
  const CoreRepositoryTypes = {
12
12
  [AjaxRepository.type]: AjaxRepository,
@@ -1,6 +1,6 @@
1
1
  /** @module Schema */
2
2
 
3
- import Schema from './Schema';
3
+ import Schema from './Schema.js';
4
4
 
5
5
  const KeyValues = new Schema({
6
6
  name: 'KeyValues',
@@ -1,7 +1,7 @@
1
1
  /** @module Schema */
2
2
 
3
- import Schema from './Schema';
4
- import KeyValues from './KeyValues';
3
+ import Schema from './Schema.js';
4
+ import KeyValues from './KeyValues.js';
5
5
 
6
6
  const CoreSchemas = {
7
7
  // [KeyValues.name]: KeyValues,
@@ -1,6 +1,6 @@
1
1
  /** @module Writer */
2
2
 
3
- import Writer from './Writer'
3
+ import Writer from './Writer.js'
4
4
  import _ from 'lodash';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  /** @module Writer */
2
2
 
3
- import Writer from './Writer'
3
+ import Writer from './Writer.js'
4
4
  import { j2xParser as Parser } from 'fast-xml-parser';
5
5
  import he from 'he';
6
6
 
@@ -1,7 +1,7 @@
1
1
  /** @module Writer */
2
2
 
3
- import JsonWriter from './JsonWriter';
4
- import XmlWriter from './XmlWriter';
3
+ import JsonWriter from './JsonWriter.js';
4
+ import XmlWriter from './XmlWriter.js';
5
5
 
6
6
  const WriterTypes = {
7
7
  [JsonWriter.type]: JsonWriter,
package/src/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  import {
6
6
  default as oneHatData,
7
7
  OneHatData,
8
- } from './OneHatData';
8
+ } from './OneHatData.js';
9
9
 
10
10
  export default oneHatData;
11
11
  export {