@salesforce/nimbus-plugin-lds 1.314.0 → 1.316.0
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/index.js
CHANGED
|
@@ -550,4 +550,34 @@ class MockNimbusBinaryStorePlugin {
|
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
-
|
|
553
|
+
function mockJSLoggerPlugin(plugin) {
|
|
554
|
+
var _a;
|
|
555
|
+
globalThis.__nimbus = {
|
|
556
|
+
...(globalThis.__nimbus || {}),
|
|
557
|
+
plugins: {
|
|
558
|
+
// eslint-disable-next-line @salesforce/lds/no-optional-chaining
|
|
559
|
+
...(((_a = globalThis.__nimbus) === null || _a === void 0 ? void 0 : _a.plugins) || {}),
|
|
560
|
+
JSLoggerPlugin: plugin,
|
|
561
|
+
},
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
// simple JSLoggerPlugin implementation
|
|
565
|
+
class MockJSLoggerPlugin {
|
|
566
|
+
constructor() {
|
|
567
|
+
this.messages = [];
|
|
568
|
+
}
|
|
569
|
+
logInfo(msg) {
|
|
570
|
+
this.messages.push(msg);
|
|
571
|
+
}
|
|
572
|
+
logWarning(msg) {
|
|
573
|
+
this.messages.push(msg);
|
|
574
|
+
}
|
|
575
|
+
logError(msg) {
|
|
576
|
+
this.messages.push(msg);
|
|
577
|
+
}
|
|
578
|
+
clearMockMessages() {
|
|
579
|
+
this.messages.length = 0;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export { JsSqliteStorePlugin, JsSqliteStoreWebWorkerPlugin, MockJSLoggerPlugin, MockNimbusBinaryStorePlugin, MockNimbusNetworkAdapter, isUpsertOperation, mockJSLoggerPlugin, mockNimbusBinaryStorePlugin, sortedSchemaMigrations };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,8 +5,10 @@ export type { DraftQueue } from './DraftQueue';
|
|
|
5
5
|
export type { SqliteStorePlugin, SqliteOperation } from './SqliteStorePlugin';
|
|
6
6
|
export type { BinaryStorePlugin } from './BinaryStorePlugin';
|
|
7
7
|
export type { LdsObserverPlugin } from './LdsObserverPlugin';
|
|
8
|
+
export type { JSLoggerPlugin } from './JSLoggerPlugin';
|
|
8
9
|
export { sortedSchemaMigrations, isUpsertOperation } from './SqliteStorePlugin';
|
|
9
10
|
export { JsSqliteStorePlugin } from './JsSqliteStorePlugin/JsSqliteStorePlugin';
|
|
10
11
|
export { JsSqliteStoreWebWorkerPlugin } from './JsSqliteStorePlugin/JsWorkerSqliteStorePlugin';
|
|
11
12
|
export { MockNimbusNetworkAdapter } from './mocks/MockNimbusNetworkAdapter';
|
|
12
13
|
export { MockNimbusBinaryStorePlugin, mockNimbusBinaryStorePlugin, } from './mocks/MockNimbusBinaryStorePlugin';
|
|
14
|
+
export { MockJSLoggerPlugin, mockJSLoggerPlugin } from './mocks/MockJSLoggerPlugin';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { JSLoggerPlugin } from '../JSLoggerPlugin';
|
|
2
|
+
export declare function mockJSLoggerPlugin(plugin: JSLoggerPlugin): void;
|
|
3
|
+
export declare class MockJSLoggerPlugin implements JSLoggerPlugin {
|
|
4
|
+
messages: string[];
|
|
5
|
+
logInfo(msg: string): void;
|
|
6
|
+
logWarning(msg: string): void;
|
|
7
|
+
logError(msg: string): void;
|
|
8
|
+
clearMockMessages(): void;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/nimbus-plugin-lds",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.316.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Nimbus plugins for LDS on Mobile native integrations: durable store, networking, and draft queue.",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@rollup/plugin-wasm": "^5.2.0",
|
|
28
|
-
"@salesforce/lds-store-sql": "^1.
|
|
28
|
+
"@salesforce/lds-store-sql": "^1.316.0",
|
|
29
29
|
"@types/sql.js": "1.4.4",
|
|
30
30
|
"nimbus-types": "^2.0.0-alpha1",
|
|
31
31
|
"rollup-plugin-string": "^3.0.0",
|