@spytecgps/nova-orm 1.4.215 → 1.4.217
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/dist/cache/LruQueryResultCache.d.ts +19 -0
- package/dist/cache/LruQueryResultCache.js +1 -0
- package/dist/cache/index.d.ts +1 -0
- package/dist/cache/index.js +1 -0
- package/dist/entities/acumaticaOrderShipmentDetails.d.ts +18 -0
- package/dist/entities/acumaticaOrderShipmentDetails.js +1 -1
- package/dist/entities/boundary.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/migration/_virtual/_virtual_multi-entry.js +2 -2
- package/dist/novaDataSource.js +1 -1
- package/package.json +2 -1
- package/schema.sql +21 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { QueryResultCache } from 'typeorm/cache/QueryResultCache';
|
|
2
|
+
import { QueryResultCacheOptions } from 'typeorm/cache/QueryResultCacheOptions';
|
|
3
|
+
export interface LruQueryResultCacheConfig {
|
|
4
|
+
max?: number;
|
|
5
|
+
maxTtlMs?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class LruQueryResultCache implements QueryResultCache {
|
|
8
|
+
private readonly cache;
|
|
9
|
+
constructor(config?: LruQueryResultCacheConfig);
|
|
10
|
+
connect(): Promise<void>;
|
|
11
|
+
disconnect(): Promise<void>;
|
|
12
|
+
synchronize(): Promise<void>;
|
|
13
|
+
getFromCache(options: QueryResultCacheOptions): Promise<QueryResultCacheOptions | undefined>;
|
|
14
|
+
storeInCache(options: QueryResultCacheOptions): Promise<void>;
|
|
15
|
+
isExpired(saved: QueryResultCacheOptions): boolean;
|
|
16
|
+
remove(identifiers: string[]): Promise<void>;
|
|
17
|
+
clear(): Promise<void>;
|
|
18
|
+
private keyFor;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("lru-cache");exports.LruQueryResultCache=class LruQueryResultCache{cache;constructor(c={}){this.cache=new e.LRUCache({max:c.max??1e3,ttl:c.maxTtlMs})}async connect(){}async disconnect(){this.cache.clear()}async synchronize(){}async getFromCache(e){const c=this.keyFor(e);if(c)return this.cache.get(c)}async storeInCache(e){const c=this.keyFor(e);if(!c)return;const t={...e,time:e.time??Date.now()};this.cache.set(c,t)}isExpired(e){const c=e.time??0;return Date.now()-c>=e.duration}async remove(e){for(const c of e)this.cache.delete(c)}async clear(){this.cache.clear()}keyFor(e){return e.identifier??e.query}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LruQueryResultCache, LruQueryResultCacheConfig } from './LruQueryResultCache';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./LruQueryResultCache.js");exports.LruQueryResultCache=e.LruQueryResultCache;
|
|
@@ -8,4 +8,22 @@ export declare class AcumaticaOrderShipmentDetails {
|
|
|
8
8
|
orderStatus: string | null;
|
|
9
9
|
iccid: string | null;
|
|
10
10
|
sku: string | null;
|
|
11
|
+
customer: string | null;
|
|
12
|
+
orderNumber: string | null;
|
|
13
|
+
customerOrderNumber: string | null;
|
|
14
|
+
orderDate: Date | null;
|
|
15
|
+
orderedQty: number | null;
|
|
16
|
+
orderTotal: number | null;
|
|
17
|
+
currency: string | null;
|
|
18
|
+
createdBy: string | null;
|
|
19
|
+
createdOn: Date | null;
|
|
20
|
+
lastModifiedBy: string | null;
|
|
21
|
+
lastModifiedOn: Date | null;
|
|
22
|
+
shipVia: string | null;
|
|
23
|
+
gpsDeviceQty: number | null;
|
|
24
|
+
shiplineQty: number | null;
|
|
25
|
+
warehouse: string | null;
|
|
26
|
+
location: string | null;
|
|
27
|
+
carrier: string | null;
|
|
28
|
+
lastModifiedDateTime: Date | null;
|
|
11
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm");exports.AcumaticaOrderShipmentDetails=class AcumaticaOrderShipmentDetails{id;imei;shipmentNumber;shipmentStatus;shipmentDate;orderType;orderStatus;iccid;sku},e.__decorate([t.PrimaryGeneratedColumn({type:"bigint",name:"id"}),e.__metadata("design:type",Number)],exports.AcumaticaOrderShipmentDetails.prototype,"id",void 0),e.__decorate([t.Column("varchar",{name:"imei",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"imei",void 0),e.__decorate([t.Column("varchar",{name:"shipmentNumber",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"shipmentNumber",void 0),e.__decorate([t.Column("varchar",{name:"shipmentStatus",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"shipmentStatus",void 0),e.__decorate([t.Column("datetime",{name:"shipmentDate",nullable:!0,precision:0}),e.__metadata("design:type",Date)],exports.AcumaticaOrderShipmentDetails.prototype,"shipmentDate",void 0),e.__decorate([t.Column("varchar",{name:"orderType",nullable:!0,length:10}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"orderType",void 0),e.__decorate([t.Column("varchar",{name:"orderStatus",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"orderStatus",void 0),e.__decorate([t.Column("varchar",{name:"iccid",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"iccid",void 0),e.__decorate([t.Column("varchar",{name:"sku",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"sku",void 0),exports.AcumaticaOrderShipmentDetails=e.__decorate([t.Entity("acumaticaOrderShipmentDetails",{schema:"nova"}),t.Index("ixAcumaticaOrderShipmentDetails_imei_shipmentDate",["imei","shipmentDate"],{})],exports.AcumaticaOrderShipmentDetails);
|
|
1
|
+
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm");exports.AcumaticaOrderShipmentDetails=class AcumaticaOrderShipmentDetails{id;imei;shipmentNumber;shipmentStatus;shipmentDate;orderType;orderStatus;iccid;sku;customer;orderNumber;customerOrderNumber;orderDate;orderedQty;orderTotal;currency;createdBy;createdOn;lastModifiedBy;lastModifiedOn;shipVia;gpsDeviceQty;shiplineQty;warehouse;location;carrier;lastModifiedDateTime},e.__decorate([t.PrimaryGeneratedColumn({type:"bigint",name:"id"}),e.__metadata("design:type",Number)],exports.AcumaticaOrderShipmentDetails.prototype,"id",void 0),e.__decorate([t.Column("varchar",{name:"imei",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"imei",void 0),e.__decorate([t.Column("varchar",{name:"shipmentNumber",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"shipmentNumber",void 0),e.__decorate([t.Column("varchar",{name:"shipmentStatus",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"shipmentStatus",void 0),e.__decorate([t.Column("datetime",{name:"shipmentDate",nullable:!0,precision:0}),e.__metadata("design:type",Date)],exports.AcumaticaOrderShipmentDetails.prototype,"shipmentDate",void 0),e.__decorate([t.Column("varchar",{name:"orderType",nullable:!0,length:10}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"orderType",void 0),e.__decorate([t.Column("varchar",{name:"orderStatus",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"orderStatus",void 0),e.__decorate([t.Column("varchar",{name:"iccid",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"iccid",void 0),e.__decorate([t.Column("varchar",{name:"sku",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"sku",void 0),e.__decorate([t.Column("varchar",{name:"customer",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"customer",void 0),e.__decorate([t.Column("varchar",{name:"orderNumber",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"orderNumber",void 0),e.__decorate([t.Column("varchar",{name:"customerOrderNumber",nullable:!0,length:100}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"customerOrderNumber",void 0),e.__decorate([t.Column("datetime",{name:"orderDate",nullable:!0,precision:0}),e.__metadata("design:type",Date)],exports.AcumaticaOrderShipmentDetails.prototype,"orderDate",void 0),e.__decorate([t.Column("decimal",{name:"orderedQty",nullable:!0,precision:18,scale:6}),e.__metadata("design:type",Number)],exports.AcumaticaOrderShipmentDetails.prototype,"orderedQty",void 0),e.__decorate([t.Column("decimal",{name:"orderTotal",nullable:!0,precision:18,scale:4}),e.__metadata("design:type",Number)],exports.AcumaticaOrderShipmentDetails.prototype,"orderTotal",void 0),e.__decorate([t.Column("varchar",{name:"currency",nullable:!0,length:10}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"currency",void 0),e.__decorate([t.Column("varchar",{name:"createdBy",nullable:!0,length:100}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"createdBy",void 0),e.__decorate([t.Column("datetime",{name:"createdOn",nullable:!0,precision:0}),e.__metadata("design:type",Date)],exports.AcumaticaOrderShipmentDetails.prototype,"createdOn",void 0),e.__decorate([t.Column("varchar",{name:"lastModifiedBy",nullable:!0,length:100}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"lastModifiedBy",void 0),e.__decorate([t.Column("datetime",{name:"lastModifiedOn",nullable:!0,precision:0}),e.__metadata("design:type",Date)],exports.AcumaticaOrderShipmentDetails.prototype,"lastModifiedOn",void 0),e.__decorate([t.Column("varchar",{name:"shipVia",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"shipVia",void 0),e.__decorate([t.Column("decimal",{name:"gpsDeviceQty",nullable:!0,precision:18,scale:6}),e.__metadata("design:type",Number)],exports.AcumaticaOrderShipmentDetails.prototype,"gpsDeviceQty",void 0),e.__decorate([t.Column("decimal",{name:"shiplineQty",nullable:!0,precision:18,scale:6}),e.__metadata("design:type",Number)],exports.AcumaticaOrderShipmentDetails.prototype,"shiplineQty",void 0),e.__decorate([t.Column("varchar",{name:"warehouse",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"warehouse",void 0),e.__decorate([t.Column("varchar",{name:"location",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"location",void 0),e.__decorate([t.Column("varchar",{name:"carrier",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.AcumaticaOrderShipmentDetails.prototype,"carrier",void 0),e.__decorate([t.Column("datetime",{name:"lastModifiedDateTime",nullable:!0,precision:0}),e.__metadata("design:type",Date)],exports.AcumaticaOrderShipmentDetails.prototype,"lastModifiedDateTime",void 0),exports.AcumaticaOrderShipmentDetails=e.__decorate([t.Entity("acumaticaOrderShipmentDetails",{schema:"nova"}),t.Index("ixAcumaticaOrderShipmentDetails_imei_shipmentDate",["imei","shipmentDate"],{})],exports.AcumaticaOrderShipmentDetails);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/boolToNumberTransformer.js");exports.Boundary=class Boundary{id;name;type;buffer;createdAt;modifiedAt;createdBy;modifiedBy;clientId;location;status;radiusDisplayUnit;dataSourceTypeId;geometry;color;isUserCreated;area;centerLat;centerLon;securityGroupEntityTags},e.__decorate([t.PrimaryGeneratedColumn({type:"int",name:"id"}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"id",void 0),e.__decorate([t.Column("varchar",{name:"name",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.Boundary.prototype,"name",void 0),e.__decorate([t.Column("char",{name:"type",nullable:!0,length:1}),e.__metadata("design:type",String)],exports.Boundary.prototype,"type",void 0),e.__decorate([t.Column("varchar",{name:"buffer",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.Boundary.prototype,"buffer",void 0),e.__decorate([t.Column("datetime",{name:"createdAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Boundary.prototype,"createdAt",void 0),e.__decorate([t.Column("datetime",{name:"modifiedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Boundary.prototype,"modifiedAt",void 0),e.__decorate([t.Column("varchar",{name:"createdBy",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.Boundary.prototype,"createdBy",void 0),e.__decorate([t.Column("varchar",{name:"modifiedBy",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.Boundary.prototype,"modifiedBy",void 0),e.__decorate([t.Column("int",{name:"clientId",default:()=>"'0'"}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"clientId",void 0),e.__decorate([t.Column("varchar",{name:"location",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.Boundary.prototype,"location",void 0),e.__decorate([t.Column("tinyint",{name:"status",default:()=>"'1'"}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"status",void 0),e.__decorate([t.Column("char",{name:"radiusDisplayUnit",nullable:!0,length:2}),e.__metadata("design:type",String)],exports.Boundary.prototype,"radiusDisplayUnit",void 0),e.__decorate([t.Column("tinyint",{name:"dataSourceTypeId",nullable:!0}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"dataSourceTypeId",void 0),e.__decorate([t.Column("
|
|
1
|
+
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/boolToNumberTransformer.js");exports.Boundary=class Boundary{id;name;type;buffer;createdAt;modifiedAt;createdBy;modifiedBy;clientId;location;status;radiusDisplayUnit;dataSourceTypeId;geometry;color;isUserCreated;area;centerLat;centerLon;securityGroupEntityTags},e.__decorate([t.PrimaryGeneratedColumn({type:"int",name:"id"}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"id",void 0),e.__decorate([t.Column("varchar",{name:"name",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.Boundary.prototype,"name",void 0),e.__decorate([t.Column("char",{name:"type",nullable:!0,length:1}),e.__metadata("design:type",String)],exports.Boundary.prototype,"type",void 0),e.__decorate([t.Column("varchar",{name:"buffer",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.Boundary.prototype,"buffer",void 0),e.__decorate([t.Column("datetime",{name:"createdAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Boundary.prototype,"createdAt",void 0),e.__decorate([t.Column("datetime",{name:"modifiedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Boundary.prototype,"modifiedAt",void 0),e.__decorate([t.Column("varchar",{name:"createdBy",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.Boundary.prototype,"createdBy",void 0),e.__decorate([t.Column("varchar",{name:"modifiedBy",nullable:!0,length:50}),e.__metadata("design:type",String)],exports.Boundary.prototype,"modifiedBy",void 0),e.__decorate([t.Column("int",{name:"clientId",default:()=>"'0'"}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"clientId",void 0),e.__decorate([t.Column("varchar",{name:"location",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.Boundary.prototype,"location",void 0),e.__decorate([t.Column("tinyint",{name:"status",default:()=>"'1'"}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"status",void 0),e.__decorate([t.Column("char",{name:"radiusDisplayUnit",nullable:!0,length:2}),e.__metadata("design:type",String)],exports.Boundary.prototype,"radiusDisplayUnit",void 0),e.__decorate([t.Column("tinyint",{name:"dataSourceTypeId",nullable:!0}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"dataSourceTypeId",void 0),e.__decorate([t.Column("mediumtext",{name:"geometry",nullable:!0}),e.__metadata("design:type",String)],exports.Boundary.prototype,"geometry",void 0),e.__decorate([t.Column("varchar",{name:"color",nullable:!0,length:25}),e.__metadata("design:type",String)],exports.Boundary.prototype,"color",void 0),e.__decorate([t.Column("tinyint",{name:"isUserCreated",width:1,default:()=>"'1'",transformer:new a.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.Boundary.prototype,"isUserCreated",void 0),e.__decorate([t.Column("float",{name:"area",nullable:!0}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"area",void 0),e.__decorate([t.Column("decimal",{name:"centerLat",nullable:!0,precision:8,scale:6}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"centerLat",void 0),e.__decorate([t.Column("decimal",{name:"centerLon",nullable:!0,precision:9,scale:6}),e.__metadata("design:type",Number)],exports.Boundary.prototype,"centerLon",void 0),exports.Boundary=e.__decorate([t.Index("ixBoundaryClientIdStatus",["clientId","status"],{}),t.Index("ixBoundaryStatus",["status"],{}),t.Entity("boundary",{schema:"nova"})],exports.Boundary);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Repository } from 'typeorm';
|
|
2
|
+
import * as Cache from './cache';
|
|
2
3
|
import * as Entities from './entities';
|
|
3
4
|
import { NovaDataSource, NovaDataSourceConfig } from './novaDataSource';
|
|
4
5
|
import { syncSchemaFromDump, SyncSchemaFromDumpConfig } from './syncSchemaFromDump';
|
|
@@ -23,4 +24,4 @@ declare const Utils: {
|
|
|
23
24
|
addMonthsToNow: (months: number) => Date;
|
|
24
25
|
mapRawEntityToEntity: <T>(rawEntity: any, columnsPrefix?: string) => T;
|
|
25
26
|
};
|
|
26
|
-
export { ConsoleLogger, Entities, Enums, NovaDataSource, NovaDataSourceConfig, Repository, syncSchemaFromDump, SyncSchemaFromDumpConfig, Types, Utils, };
|
|
27
|
+
export { Cache, ConsoleLogger, Entities, Enums, NovaDataSource, NovaDataSourceConfig, Repository, syncSchemaFromDump, SyncSchemaFromDumpConfig, Types, Utils, };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("typeorm"),t=require("./entities/index.js"),
|
|
1
|
+
"use strict";var e=require("typeorm"),r=require("./cache/index.js"),t=require("./entities/index.js"),o=require("./novaDataSource.js"),a=require("./syncSchemaFromDump.js"),n=require("./types/index.js"),s=require("./types/enums.js"),i=require("./utils/consoleLogger.js"),u=require("./utils/dateTool.js"),l=require("./utils/mapRawEntityToEntity.js"),y=require("./utils/paramsValidators.js"),m=require("./utils/parsingTools.js"),g=require("./utils/randomizer.js"),d=require("./utils/uuidHelpers.js");const p={uuidStringToBinaryBuffer:d.uuidStringToBinaryBuffer,binaryBufferToUuidString:d.binaryBufferToUuidString,getRandomBoolean:g.getRandomBoolean,getRandomImei:g.getRandomImei,getRandomDateInRange:g.getRandomDateInRange,getRandomInteger:g.getRandomInteger,getRandomString:g.getRandomString,tryParseBoolean:m.tryParseBoolean,tryParseDate:m.tryParseDate,tryParseFloat:m.tryParseFloat,allAttributesAreNull:y.allAttributesAreNull,anyAttributeInArrayIsNull:y.anyAttributeInArrayIsNull,anyAttributeIsNull:y.anyAttributeIsNull,now:u.now,addMonthsToNow:u.addMonthsToNow,mapRawEntityToEntity:l.mapRawEntityToEntity};Object.defineProperty(exports,"Repository",{enumerable:!0,get:function(){return e.Repository}}),exports.Cache=r,exports.Entities=t,exports.NovaDataSource=o.NovaDataSource,exports.syncSchemaFromDump=a.syncSchemaFromDump,exports.Types=n,exports.Enums=s,exports.ConsoleLogger=i.ConsoleLogger,exports.Utils=p;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _1684483704434AddLowerCaseIndex = require('../1684483704434-addLowerCaseIndex.js');
|
|
4
|
-
var _1684483705002UpdateSecurityUserViewsV2 = require('../1684483705002-updateSecurityUserViewsV2.js');
|
|
5
4
|
var _1684483705001UpdateSecurityUserViewsV1 = require('../1684483705001-updateSecurityUserViewsV1.js');
|
|
5
|
+
var _1684483705002UpdateSecurityUserViewsV2 = require('../1684483705002-updateSecurityUserViewsV2.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
exports.addLowerCaseIndex1684483704434 = _1684483704434AddLowerCaseIndex.addLowerCaseIndex1684483704434;
|
|
10
|
-
exports.updateSecurityUserViewsV21684483705002 = _1684483705002UpdateSecurityUserViewsV2.updateSecurityUserViewsV21684483705002;
|
|
11
10
|
exports.updateSecurityUserViewsV11684483705001 = _1684483705001UpdateSecurityUserViewsV1.updateSecurityUserViewsV11684483705001;
|
|
11
|
+
exports.updateSecurityUserViewsV21684483705002 = _1684483705002UpdateSecurityUserViewsV2.updateSecurityUserViewsV21684483705002;
|
package/dist/novaDataSource.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("typeorm")
|
|
1
|
+
"use strict";var e=require("typeorm");require("lru-cache");var r=require("./entities/index.js"),t=require("./subscribers/index.js"),a=require("./utils/queryLogger.js"),i=require("./utils/spanSubscriber.js");require("fs"),require("mysql2/promise"),require("path"),require("./types/enums.js"),require("./types/logger.js"),require("./entities/retailAlertExternalRecipient.js"),require("./utils/dateTool.js");exports.NovaDataSource=class NovaDataSource{dataSource;logger;constructor(i,s,o){this.logger=s;const c=[];for(const e in r){const t=r[e];c.push(t)}const n=[];for(const e in t){const r=t[e];n.push(r)}const u={host:"aws.connect.psdb.cloud",port:3306,database:"nova",ssl:{rejectUnauthorized:!0}};this.dataSource=new e.DataSource({type:"mysql",connectorPackage:"mysql2",synchronize:!1,logging:!0,logger:new a.QueryLogger(this.logger,i.logging),entities:c,subscribers:n,migrations:["node_modules/@spytecgps/nova-orm/dist/migration/*.js"],supportBigNumbers:!0,bigNumberStrings:!1,extra:{decimalNumbers:!0},...u,...i,replication:{master:{...u,...i},slaves:o?[{...u,...o}]:[{...u,...i}],defaultMode:i.replicationMode??"master"}})}async connect(){if(this.dataSource.isInitialized||await this.dataSource.initialize(),!this.dataSource.subscribers.some((e=>e._spanSubscriber))){const e=i.createSpanSubscriber(this.logger);e._spanSubscriber=!0,this.dataSource.subscribers.push(e)}}async disconnect(){try{this.dataSource.isInitialized&&await this.dataSource.destroy()}catch(e){this.logger.error({error:e},"Failed to close connection to database")}}getRepository(e){return this.dataSource.getRepository(e)}async query(e,r){return this.dataSource.query(e,r,null)}async createQueryBuilder(e,r){return this.dataSource.createQueryBuilder(e,r,null)}createQueryRunner(e){return this.dataSource.createQueryRunner(e)}createQueryRunnerFromParams(e){const r=e?.queryOptions?.forceUseReplica?"slave":"master";return this.logger.trace({replicationMode:r},"Creating query runner with replication mode"),this.dataSource.createQueryRunner(r)}async safeQuery(e,r,t){try{await this.connect();return await e(this,t)}catch(e){throw this.logger.error({error:e},r?r+" ":"Error while executing query"),e}finally{t&&await t.release(),await this.disconnect()}}async safeQuery2(e,r,t){try{this.dataSource.isInitialized||(this.logger.info("nova-orm new connection"),await this.connect());return await e(this,t)}catch(e){throw this.logger.error({error:e},r?r+" ":"Error while executing query"),e}finally{t&&await t.release()}}async safeQuery3(e,r,t,{replicationMode:a,tag:i}={}){return(async()=>{let s;try{await this.connect(),a?(this.logger.trace({replicationMode:a},"Creating query runner with replication mode"),s=this.dataSource.createQueryRunner(a)):this.logger.trace({replicationMode:this.dataSource.defaultReplicationModeForReads},"Creating query builder with default replication mode for reads");const o=this.dataSource.createQueryBuilder(e,r,s);i&&o.comment(i);return await t(o)}catch(e){throw this.logger.error({error:e},i?i+" ":"Error while executing query"),e}finally{s&&await s.release()}})()}async syncSchema(e=!0){this.logger.warn("Initiating schema sync"),await this.connect(),await this.dataSource.synchronize(e),await this.dataSource.runMigrations()}async clearCache(){this.dataSource.queryResultCache?(this.logger.info("Clearing query result cache"),await this.dataSource.queryResultCache.clear()):this.logger.info("No query result cache to clear")}async invalidateCacheKey(e){this.dataSource.queryResultCache&&(this.logger.info("Invalidating cache key",{key:e}),await this.dataSource.queryResultCache.remove([e]))}};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spytecgps/nova-orm",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.217",
|
|
4
4
|
"description": "ORM with PlanetScale",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"dayjs": "^1.11.11",
|
|
38
38
|
"dotenv": "^16.4.7",
|
|
39
|
+
"lru-cache": "^11.0.0",
|
|
39
40
|
"mysql2": "^3.2.3",
|
|
40
41
|
"reflect-metadata": "^0.1.13",
|
|
41
42
|
"typeorm": "0.3.19",
|
package/schema.sql
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
-- nova-orm-schema-checksum:
|
|
1
|
+
-- nova-orm-schema-checksum: cce10c0e6d76192a36d7e248eedadfe8
|
|
2
2
|
-- Nova ORM Schema Dump
|
|
3
|
-
-- Generated at: 2026-04-
|
|
3
|
+
-- Generated at: 2026-04-19T08:31:54.169Z
|
|
4
4
|
|
|
5
5
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
6
6
|
|
|
@@ -52,6 +52,24 @@ CREATE TABLE `acumaticaOrderShipmentDetails` (
|
|
|
52
52
|
`orderStatus` varchar(50) DEFAULT NULL,
|
|
53
53
|
`iccid` varchar(255) DEFAULT NULL,
|
|
54
54
|
`sku` varchar(50) DEFAULT NULL,
|
|
55
|
+
`customer` varchar(50) DEFAULT NULL,
|
|
56
|
+
`orderNumber` varchar(50) DEFAULT NULL,
|
|
57
|
+
`customerOrderNumber` varchar(100) DEFAULT NULL,
|
|
58
|
+
`orderDate` datetime DEFAULT NULL,
|
|
59
|
+
`orderedQty` decimal(18,6) DEFAULT NULL,
|
|
60
|
+
`orderTotal` decimal(18,4) DEFAULT NULL,
|
|
61
|
+
`currency` varchar(10) DEFAULT NULL,
|
|
62
|
+
`createdBy` varchar(100) DEFAULT NULL,
|
|
63
|
+
`createdOn` datetime DEFAULT NULL,
|
|
64
|
+
`lastModifiedBy` varchar(100) DEFAULT NULL,
|
|
65
|
+
`lastModifiedOn` datetime DEFAULT NULL,
|
|
66
|
+
`shipVia` varchar(50) DEFAULT NULL,
|
|
67
|
+
`gpsDeviceQty` decimal(18,6) DEFAULT NULL,
|
|
68
|
+
`shiplineQty` decimal(18,6) DEFAULT NULL,
|
|
69
|
+
`warehouse` varchar(50) DEFAULT NULL,
|
|
70
|
+
`location` varchar(50) DEFAULT NULL,
|
|
71
|
+
`carrier` varchar(50) DEFAULT NULL,
|
|
72
|
+
`lastModifiedDateTime` datetime DEFAULT NULL,
|
|
55
73
|
PRIMARY KEY (`id`),
|
|
56
74
|
KEY `ixAcumaticaOrderShipmentDetails_imei_shipmentDate` (`imei`,`shipmentDate`)
|
|
57
75
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
@@ -889,7 +907,7 @@ CREATE TABLE `boundary` (
|
|
|
889
907
|
`status` tinyint NOT NULL DEFAULT '1',
|
|
890
908
|
`radiusDisplayUnit` char(2) DEFAULT NULL,
|
|
891
909
|
`dataSourceTypeId` tinyint DEFAULT NULL,
|
|
892
|
-
`geometry`
|
|
910
|
+
`geometry` mediumtext,
|
|
893
911
|
`color` varchar(25) DEFAULT NULL,
|
|
894
912
|
`isUserCreated` tinyint(1) NOT NULL DEFAULT '1',
|
|
895
913
|
`area` float DEFAULT NULL,
|