ag-timemachine
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -89,4 +89,4 @@ "use strict"; | ||
id = existing_1[_i]; | ||
table = new TmTable_1.TmTable(this._db.collection(id)); | ||
objects[id] = new TmObject_1.TmObject(table); | ||
table = new TmTable_1.AgTmTable(this._db.collection(id)); | ||
objects[id] = new TmObject_1.AgTmObject(table); | ||
return [4 /*yield*/, objects[id].loadLatest()]; | ||
@@ -106,3 +106,3 @@ case 3: | ||
if (!objects[id]) { | ||
objects[id] = new TmObject_1.TmObject(new TmTable_1.TmTable(this._db.collection(id))); | ||
objects[id] = new TmObject_1.AgTmObject(new TmTable_1.AgTmTable(this._db.collection(id))); | ||
} | ||
@@ -109,0 +109,0 @@ return objects[id]; |
{ | ||
"name": "ag-timemachine", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import { TmData, TmFrequence } from "./AgTypes"; | ||
import { TmTable } from "./TmTable"; | ||
import { AgTmTable } from "./TmTable"; | ||
import { Ref } from "ag-utilities/AgVueWrap"; | ||
export declare class TmObject { | ||
table: TmTable; | ||
constructor(table: TmTable); | ||
export declare class AgTmObject { | ||
table: AgTmTable; | ||
constructor(table: AgTmTable); | ||
recentDatas: Ref<TmData[]>; | ||
@@ -8,0 +8,0 @@ recentFrequence: Ref<TmFrequence>; |
@@ -50,3 +50,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TmObject = void 0; | ||
exports.AgTmObject = void 0; | ||
var AgHelper_1 = require("ag-utilities/AgHelper"); | ||
@@ -56,4 +56,4 @@ var AgVueWrap_1 = require("ag-utilities/AgVueWrap"); | ||
var snapshotSpan = 60; | ||
var TmObject = /** @class */ (function () { | ||
function TmObject(table) { | ||
var AgTmObject = /** @class */ (function () { | ||
function AgTmObject(table) { | ||
this.table = table; | ||
@@ -69,3 +69,3 @@ this.recentDatas = (0, AgVueWrap_1.ref)([]); | ||
} | ||
TmObject.prototype.loadLatest = function () { | ||
AgTmObject.prototype.loadLatest = function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -89,3 +89,3 @@ var _a, _b; | ||
}; | ||
TmObject.prototype.updateLifeTime = function (time) { | ||
AgTmObject.prototype.updateLifeTime = function (time) { | ||
if (this.lifetime.value) { | ||
@@ -98,3 +98,3 @@ this.lifetime.value[1] = time; | ||
}; | ||
TmObject.prototype.updateDeltas = function (delta) { | ||
AgTmObject.prototype.updateDeltas = function (delta) { | ||
var datas = this.recentDatas.value; | ||
@@ -113,3 +113,3 @@ if (datas.length > 0) { | ||
}; | ||
TmObject.prototype.updateFrequence = function (time) { | ||
AgTmObject.prototype.updateFrequence = function (time) { | ||
var recent = this.recentFrequence.value; | ||
@@ -125,3 +125,3 @@ if (!recent || AgHelper_1.AgHelper.compareTime(recent.time, time, 'date') != 0) { | ||
}; | ||
TmObject.prototype.bind = function (dataSource) { | ||
AgTmObject.prototype.bind = function (dataSource) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -174,3 +174,3 @@ var datas, _a; | ||
}; | ||
TmObject.prototype.unbind = function () { | ||
AgTmObject.prototype.unbind = function () { | ||
var _a; | ||
@@ -210,4 +210,4 @@ return __awaiter(this, void 0, void 0, function () { | ||
}; | ||
return TmObject; | ||
return AgTmObject; | ||
}()); | ||
exports.TmObject = TmObject; | ||
exports.AgTmObject = AgTmObject; |
import { WebStateProxy } from "ag-remote/AgRemoteTypes"; | ||
import { ServerBufferApi, TmPlayerBuffer } from "./TmPlayerBuffer"; | ||
import { ServerBufferApi, AgTmPlayerBuffer } from "./TmPlayerBuffer"; | ||
import { AgPoll } from "ag-utilities/AgPoll"; | ||
import { TmPlayerCursor } from "./TmPlayerCursor"; | ||
export declare class TmPlayer { | ||
buffer: TmPlayerBuffer; | ||
cursor: TmPlayerCursor; | ||
import { AgTmPlayerCursor } from "./TmPlayerCursor"; | ||
export declare class AgTmPlayer { | ||
buffer: AgTmPlayerBuffer; | ||
cursor: AgTmPlayerCursor; | ||
constructor(id: string, api: WebStateProxy<ServerBufferApi>); | ||
@@ -9,0 +9,0 @@ pollHandle?: ReturnType<typeof AgPoll.poll>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TmPlayer = void 0; | ||
exports.AgTmPlayer = void 0; | ||
var TmPlayerBuffer_1 = require("./TmPlayerBuffer"); | ||
@@ -9,4 +9,4 @@ var AgPoll_1 = require("ag-utilities/AgPoll"); | ||
var TmPlayerCursor_1 = require("./TmPlayerCursor"); | ||
var TmPlayer = /** @class */ (function () { | ||
function TmPlayer(id, api) { | ||
var AgTmPlayer = /** @class */ (function () { | ||
function AgTmPlayer(id, api) { | ||
this.speed = (0, AgVueWrap_1.ref)(0); | ||
@@ -18,6 +18,6 @@ this.checkpoint = (0, AgVueWrap_1.ref)({ | ||
this.play = (0, AgVueWrap_1.ref)(true); | ||
this.buffer = new TmPlayerBuffer_1.TmPlayerBuffer(id, api); | ||
this.cursor = new TmPlayerCursor_1.TmPlayerCursor(this.buffer); | ||
this.buffer = new TmPlayerBuffer_1.AgTmPlayerBuffer(id, api); | ||
this.cursor = new TmPlayerCursor_1.AgTmPlayerCursor(this.buffer); | ||
} | ||
TmPlayer.prototype.align = function () { | ||
AgTmPlayer.prototype.align = function () { | ||
this.checkpoint.value = { | ||
@@ -28,3 +28,3 @@ time: new Date(), | ||
}; | ||
TmPlayer.prototype.speedup = function () { | ||
AgTmPlayer.prototype.speedup = function () { | ||
if (this.speed.value >= 9) | ||
@@ -35,3 +35,3 @@ return; | ||
}; | ||
TmPlayer.prototype.slowdown = function () { | ||
AgTmPlayer.prototype.slowdown = function () { | ||
if (this.speed.value <= -9) | ||
@@ -42,3 +42,3 @@ return; | ||
}; | ||
TmPlayer.prototype.forward = function () { | ||
AgTmPlayer.prototype.forward = function () { | ||
var span = 5 * 1000; | ||
@@ -52,3 +52,3 @@ if (this.speed.value > 0) | ||
}; | ||
TmPlayer.prototype.backward = function () { | ||
AgTmPlayer.prototype.backward = function () { | ||
var span = -5 * 1000; | ||
@@ -62,3 +62,3 @@ if (this.speed.value > 0) | ||
}; | ||
TmPlayer.prototype.start = function () { | ||
AgTmPlayer.prototype.start = function () { | ||
var _this = this; | ||
@@ -77,3 +77,3 @@ this.buffer.start(); | ||
}; | ||
TmPlayer.prototype.stop = function () { | ||
AgTmPlayer.prototype.stop = function () { | ||
var _a; | ||
@@ -83,4 +83,4 @@ this.buffer.stop(); | ||
}; | ||
return TmPlayer; | ||
return AgTmPlayer; | ||
}()); | ||
exports.TmPlayer = TmPlayer; | ||
exports.AgTmPlayer = AgTmPlayer; |
@@ -12,3 +12,3 @@ import { type WebStateProxy } from 'ag-remote/AgRemoteTypes'; | ||
}; | ||
export declare class TmPlayerBuffer { | ||
export declare class AgTmPlayerBuffer { | ||
private id; | ||
@@ -15,0 +15,0 @@ private api; |
@@ -39,3 +39,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TmPlayerBuffer = void 0; | ||
exports.AgTmPlayerBuffer = void 0; | ||
var AgVueWrap_1 = require("ag-utilities/AgVueWrap"); | ||
@@ -52,4 +52,4 @@ var AgPoll_1 = require("ag-utilities/AgPoll"); | ||
}; | ||
var TmPlayerBuffer = /** @class */ (function () { | ||
function TmPlayerBuffer(id, api) { | ||
var AgTmPlayerBuffer = /** @class */ (function () { | ||
function AgTmPlayerBuffer(id, api) { | ||
var _this = this; | ||
@@ -92,3 +92,3 @@ this.id = id; | ||
} | ||
TmPlayerBuffer.prototype.start = function () { | ||
AgTmPlayerBuffer.prototype.start = function () { | ||
var _this = this; | ||
@@ -109,3 +109,3 @@ this.pollhandle = AgPoll_1.AgPoll.poll(100, function () { return __awaiter(_this, void 0, void 0, function () { | ||
}; | ||
TmPlayerBuffer.prototype.tryUpdateDatas = function () { | ||
AgTmPlayerBuffer.prototype.tryUpdateDatas = function () { | ||
var _a; | ||
@@ -147,3 +147,3 @@ return __awaiter(this, void 0, void 0, function () { | ||
}; | ||
TmPlayerBuffer.prototype.tryUpdateFrequence = function () { | ||
AgTmPlayerBuffer.prototype.tryUpdateFrequence = function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -169,8 +169,8 @@ var target, cached, _a; | ||
}; | ||
TmPlayerBuffer.prototype.stop = function () { | ||
AgTmPlayerBuffer.prototype.stop = function () { | ||
var _a; | ||
(_a = this.pollhandle) === null || _a === void 0 ? void 0 : _a.stop(); | ||
}; | ||
return TmPlayerBuffer; | ||
return AgTmPlayerBuffer; | ||
}()); | ||
exports.TmPlayerBuffer = TmPlayerBuffer; | ||
exports.AgTmPlayerBuffer = AgTmPlayerBuffer; |
@@ -1,5 +0,5 @@ | ||
import { TmPlayerBuffer } from "./TmPlayerBuffer"; | ||
export declare class TmPlayerCursor { | ||
import { AgTmPlayerBuffer } from "./TmPlayerBuffer"; | ||
export declare class AgTmPlayerCursor { | ||
private buffer; | ||
constructor(buffer: TmPlayerBuffer); | ||
constructor(buffer: AgTmPlayerBuffer); | ||
current: import("ag-utilities/AgVueWrap").ComputedRef<any> & { | ||
@@ -6,0 +6,0 @@ stop(): void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TmPlayerCursor = void 0; | ||
exports.AgTmPlayerCursor = void 0; | ||
var AgVueWrap_1 = require("ag-utilities/AgVueWrap"); | ||
var AgHelper_1 = require("ag-utilities/AgHelper"); | ||
var TmPlayerCursor = /** @class */ (function () { | ||
function TmPlayerCursor(buffer) { | ||
var AgTmPlayerCursor = /** @class */ (function () { | ||
function AgTmPlayerCursor(buffer) { | ||
var _this = this; | ||
@@ -55,4 +55,4 @@ this.buffer = buffer; | ||
} | ||
return TmPlayerCursor; | ||
return AgTmPlayerCursor; | ||
}()); | ||
exports.TmPlayerCursor = TmPlayerCursor; | ||
exports.AgTmPlayerCursor = AgTmPlayerCursor; |
import { Collection } from 'mongodb'; | ||
import { TmDelta, TmFrequence } from './AgTypes'; | ||
export declare class TmTable { | ||
export declare class AgTmTable { | ||
private datatable; | ||
@@ -5,0 +5,0 @@ constructor(datatable: Collection<TmDelta & { |
@@ -39,8 +39,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TmTable = void 0; | ||
exports.AgTmTable = void 0; | ||
var AgLodashWrap_1 = require("ag-utilities/AgLodashWrap"); | ||
var AgHelper_1 = require("ag-utilities/AgHelper"); | ||
var AgDiff_1 = require("ag-utilities/AgDiff"); | ||
var TmTable = /** @class */ (function () { | ||
function TmTable(datatable) { | ||
var AgTmTable = /** @class */ (function () { | ||
function AgTmTable(datatable) { | ||
this.datatable = datatable; | ||
@@ -50,3 +50,3 @@ datatable.createIndex([{ time: 1 }]); | ||
} | ||
TmTable.prototype.getRecent = function (spanMin) { | ||
AgTmTable.prototype.getRecent = function (spanMin) { | ||
var _a; | ||
@@ -86,3 +86,3 @@ return __awaiter(this, void 0, void 0, function () { | ||
}; | ||
TmTable.prototype.getDeltas = function (from, to) { | ||
AgTmTable.prototype.getDeltas = function (from, to) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -97,3 +97,3 @@ return __generator(this, function (_a) { | ||
}; | ||
TmTable.prototype.getSnapshot = function (time) { | ||
AgTmTable.prototype.getSnapshot = function (time) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -117,3 +117,3 @@ var ret; | ||
}; | ||
TmTable.prototype.flush = function (datas) { | ||
AgTmTable.prototype.flush = function (datas) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -144,3 +144,3 @@ var err_1; | ||
}; | ||
TmTable.prototype.getTodayFrequence = function () { | ||
AgTmTable.prototype.getTodayFrequence = function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -155,3 +155,3 @@ return __generator(this, function (_a) { | ||
}; | ||
TmTable.prototype.getFrequence = function (date) { | ||
AgTmTable.prototype.getFrequence = function (date) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -183,3 +183,3 @@ var start, end, minutes, result; | ||
}; | ||
TmTable.prototype.getLifetime = function () { | ||
AgTmTable.prototype.getLifetime = function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -202,3 +202,3 @@ var dbstart, dbend; | ||
}; | ||
TmTable.prototype.getHistory = function (from, to) { | ||
AgTmTable.prototype.getHistory = function (from, to) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -270,4 +270,4 @@ var lastSnapshot, snapshot; | ||
}; | ||
return TmTable; | ||
return AgTmTable; | ||
}()); | ||
exports.TmTable = TmTable; | ||
exports.AgTmTable = AgTmTable; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70895