@oada/list-lib
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -21,2 +21,3 @@ "use strict"; | ||
exports.ListWatch = exports.pathFromTree = exports.ItemState = void 0; | ||
const path_1 = require("path"); | ||
const bluebird_1 = __importDefault(require("bluebird")); | ||
@@ -218,3 +219,3 @@ const json_pointer_1 = __importDefault(require("json-pointer")); | ||
const { data: item } = await __classPrivateFieldGet(this, _conn).get({ | ||
path: `${this.path}/${id}`, | ||
path: path_1.join(this.path, id), | ||
}); | ||
@@ -290,3 +291,3 @@ assertItem(item); | ||
const { data: item } = await conn.get({ | ||
path: `${path}/${id}`, | ||
path: path_1.join(path, id), | ||
}); | ||
@@ -314,3 +315,3 @@ assertItem(item); | ||
const { data: item } = (await conn.get({ | ||
path: `${path}/${id}`, | ||
path: path_1.join(path, id), | ||
})); | ||
@@ -374,3 +375,3 @@ await this.handleNewItem(rev + '', id, item); | ||
const { data: item } = (await __classPrivateFieldGet(this, _conn).get({ | ||
path: `${path}/${id}`, | ||
path: path_1.join(path, id), | ||
})); | ||
@@ -383,3 +384,3 @@ await this.handleNewItem(list._rev + '', id, item); | ||
const { data: item } = await __classPrivateFieldGet(this, _conn).get({ | ||
path: `${path}/${id}`, | ||
path: path_1.join(path, id), | ||
}); | ||
@@ -386,0 +387,0 @@ const change = { |
@@ -12,3 +12,3 @@ "use strict"; | ||
const name = 'oada-list-lib-test'; | ||
const delay = 11; | ||
const delay = 100; | ||
ava_1.default('it should create JSON Path from simple OADA tree', (t) => { | ||
@@ -15,0 +15,0 @@ const tree = { |
@@ -21,2 +21,3 @@ "use strict"; | ||
exports.Metadata = void 0; | ||
const path_1 = require("path"); | ||
const object_assign_deep_1 = __importDefault(require("object-assign-deep")); | ||
@@ -48,3 +49,3 @@ /** | ||
__classPrivateFieldSet(this, _conn, conn); | ||
__classPrivateFieldSet(this, _path, `${path}/_meta/${Metadata.META_KEY}/${name}`); | ||
__classPrivateFieldSet(this, _path, path_1.join(path, '_meta', Metadata.META_KEY, name)); | ||
// Periodically persist state to _meta | ||
@@ -116,3 +117,3 @@ if (persistInterval) { | ||
await __classPrivateFieldGet(this, _conn).delete({ | ||
path: `${__classPrivateFieldGet(this, _path)}/${id}`, | ||
path: path_1.join(__classPrivateFieldGet(this, _path), id), | ||
}); | ||
@@ -119,0 +120,0 @@ delete this.handled[id]; |
{ | ||
"name": "@oada/list-lib", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Library for processing items in an OADA list", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -15,3 +15,3 @@ import test from 'ava'; | ||
const delay = 11; | ||
const delay = 100; | ||
@@ -18,0 +18,0 @@ test('it should create JSON Path from simple OADA tree', (t) => { |
@@ -0,1 +1,3 @@ | ||
import { join } from 'path'; | ||
import Bluebird from 'bluebird'; | ||
@@ -345,3 +347,3 @@ import pointer from 'json-pointer'; | ||
const { data: item } = await this.#conn.get({ | ||
path: `${this.path}/${id}`, | ||
path: join(this.path, id), | ||
}); | ||
@@ -424,3 +426,3 @@ assertItem(item); | ||
const { data: item } = await conn.get({ | ||
path: `${path}/${id}`, | ||
path: join(path, id), | ||
}); | ||
@@ -454,3 +456,3 @@ assertItem(item); | ||
const { data: item } = (await conn.get({ | ||
path: `${path}/${id}`, | ||
path: join(path, id), | ||
})) as GetResponse<Resource>; | ||
@@ -524,3 +526,3 @@ await this.handleNewItem(rev + '', id, item); | ||
const { data: item } = (await this.#conn.get({ | ||
path: `${path}/${id}`, | ||
path: join(path, id), | ||
})) as GetResponse<Resource>; | ||
@@ -533,3 +535,3 @@ await this.handleNewItem(list._rev + '', id, item); | ||
const { data: item } = await this.#conn.get({ | ||
path: `${path}/${id}`, | ||
path: join(path, id), | ||
}); | ||
@@ -536,0 +538,0 @@ const change: Change = { |
@@ -0,1 +1,3 @@ | ||
import { join } from 'path'; | ||
import assign from 'object-assign-deep'; | ||
@@ -99,3 +101,3 @@ | ||
this.#conn = conn; | ||
this.#path = `${path}/_meta/${Metadata.META_KEY}/${name}`; | ||
this.#path = join(path, '_meta', Metadata.META_KEY, name); | ||
@@ -149,3 +151,3 @@ // Periodically persist state to _meta | ||
await this.#conn.delete({ | ||
path: `${this.#path}/${id}`, | ||
path: join(this.#path, id), | ||
}); | ||
@@ -152,0 +154,0 @@ delete this.handled[id]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
113557
2534