Offline-capable data provider for Fable/Meadow applications that intercepts RestClient requests and routes them to an in-process SQLite database via Orator IPC. Wraps the existing Fable RestClient, handling Meadow CRUD operations (Create, Read, Update, Delete, Count) locally while passing through non-Meadow HTTP requests unchanged. Features dirty record tracking with coalescing, cache-through mode, negative ID assignment for offline-created records, binary/blob storage via IndexedDB, and native SQLite bridge for mobile. Supports proactive data seeding and works identically in browser (sql.js WASM) and mobile environments. Current stable version: 1.0.1, maintained by Fable ecosystem.
npm install meadow-provider-offlineNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes Fable app, registers offline provider, adds entities, connects RestClient interception, and seeds data.
npm uninstall meadow-provider-offline-browser && npm install meadow-provider-offline@latest
Use SessionDataSource: 'Internal' or provide a valid datasource name.
Pass the full schema object from your Meadow entity definition, e.g., tmpOffline.addEntity(bookSchema, callback);
Ensure initializeAsync callback has invoked all addEntity calls before calling connect().
Call seedEntity with an array, even for one record: tmpOffline.seedEntity('Book', [bookRecord]);Use disconnect() as before, but be prepared for rename.
Run: npm install meadow-provider-offline. If you have the old package, uninstall it first.
Ensure addEntity is called inside the initializeAsync callback, not outside.
Move connect() to after all addEntity calls in the callback.
Provide CustomerID, SessionID, DeviceID, UserID, UserRole, UserRoleIndex, LoggedIn in session object.
Wrap the object in an array: tmpOffline.seedEntity('Book', [myObject]);