@oada/list-lib
Advanced tools
Comparing version 4.2.3 to 4.2.4
@@ -235,5 +235,5 @@ /** | ||
} | ||
const rev = await __classPrivateFieldGet(this, _ListWatch_meta, "f")?.init(); | ||
const foundMeta = await __classPrivateFieldGet(this, _ListWatch_meta, "f")?.init(); | ||
log.debug('Resuming watch from rev %s', __classPrivateFieldGet(this, _ListWatch_meta, "f")?.rev); | ||
if (rev === undefined) { | ||
if (!foundMeta) { | ||
switch (assume) { | ||
@@ -240,0 +240,0 @@ case 1 /* AssumeState.Handled */: { |
@@ -119,2 +119,3 @@ /** | ||
__classPrivateFieldSet(this, _Metadata_rev, Number(data.rev ?? 0), "f"); | ||
return true; | ||
} | ||
@@ -141,6 +142,6 @@ catch { | ||
}); | ||
return false; | ||
} | ||
finally { | ||
__classPrivateFieldSet(this, _Metadata_initialized, true, "f"); | ||
return __classPrivateFieldGet(this, _Metadata_rev, "f"); | ||
} | ||
@@ -147,0 +148,0 @@ } |
{ | ||
"name": "@oada/list-lib", | ||
"version": "4.2.3", | ||
"version": "4.2.4", | ||
"description": "Library for processing items in an OADA list", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -384,6 +384,6 @@ /** | ||
const rev = await this.#meta?.init(); | ||
const foundMeta = await this.#meta?.init(); | ||
log.debug('Resuming watch from rev %s', this.#meta?.rev); | ||
if (rev === undefined) { | ||
if (!foundMeta) { | ||
switch (assume) { | ||
@@ -390,0 +390,0 @@ case AssumeState.Handled: { |
@@ -186,3 +186,3 @@ /** | ||
*/ | ||
async init() { | ||
async init(): Promise<boolean> { | ||
// Try to get our metadata about this list | ||
@@ -195,2 +195,3 @@ try { | ||
this.#rev = Number(data.rev ?? 0); | ||
return true; | ||
} catch { | ||
@@ -222,7 +223,7 @@ // Create our metadata? | ||
}); | ||
return false; | ||
} finally { | ||
this.#initialized = true; | ||
return this.#rev; | ||
} | ||
} | ||
} |
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
102550
2071