Skip to content

Commit 7bcfac4

Browse files
committed
Updated version to 1.4.2
1 parent d023535 commit 7bcfac4

File tree

75 files changed

+2601
-1292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2601
-1292
lines changed

JSDOC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# offline-persistence-toolkit 1.4.1 #
1+
# offline-persistence-toolkit 1.4.2 #
22

33
## Introduction ##
44

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# offline-persistence-toolkit 1.4.1 #
1+
# offline-persistence-toolkit 1.4.2 #
22

33
offline-persistence-toolkit is a client-side JavaScript library that provides caching and offline support at the HTTP request layer. This support is transparent to the user and is done through the Fetch API and an XHR adapter. HTTP requests made while the client device is offline are captured for replay when connection to the server is restored. Additional capabilities include a persistent storage layer, synchronization manager, binary data support and various configuration APIs for customizing the default behavior. This framework can be used in both ServiceWorker and non-ServiceWorker contexts within web and hybrid mobile apps.
44

@@ -10,11 +10,11 @@ There are various approaches to addressing this issue, most of which involve cac
1010

1111
- Caching resources via the [HTML5 application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache "HTML5 application cache"). This feature is now deprecated.
1212
- Caching resources via the [HTML5 Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API "HTML5 Service Workers"). This Service Worker API is an excellent addition to the web platform that will help application developers address a range of connectivity requirements. However, this feature is [not available](http://caniuse.com/#feat=serviceworkers "not available") in some browsers (Safari, IE) and is still under development in others (Edge).
13-
- Application-specific managing of persistent storage. Applications have access to a range of local storage APIs, including those directly provided by the browsers ([localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage "localStorage"), [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API "IndexedDB")), along with various third party storage libraries (e.g. [PouchDB](https://pouchdb.com/ "PouchDB")). Industrious application developers can leverage these APIs to meet their caching needs, though this is typically a tedious manual exercise.
13+
- Application-specific managing of persistent storage. Applications have access to a range of local storage APIs, including those directly provided by the browsers ([localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage "localStorage"), [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API "IndexedDB")), along with various third party storage libraries (e.g. [PouchDB](https://pouchdb.com/ "PouchDB")). Industrious application developers can leverage these APIs to meet their caching needs, though this is typically a tedious manual exercise.
1414

1515
The Offline Persistence Toolkit simplifies life for application developers by providing a response caching solution that works well across modern browsers. The toolkit covers common caching cases with a minimal amount of application-specific coding, but provides flexibility to cover non-trivial cases as well. In addition to providing the ability to cache complete response payloads, the toolkit supports "shredding" of REST response payloads into objects that can be stored, queried and updated on the client while offline.
1616

17-
The following sections provide an introduction to the Offline Persistence Toolkit.
17+
The following sections provide an introduction to the Offline Persistence Toolkit.
1818

1919
After reading this document, you can find more information about how to implement a range of common and advanced use cases with the toolkit in the [Usage guide](https://github.com/oracle/offline-persistence-toolkit/blob/master/USAGE.md "Usage").
2020

@@ -53,23 +53,23 @@ copyCustomLibsToStaging: {
5353
```
5454

5555

56-
If your app uses [RequireJS](http://www.requirejs.org/ "RequireJS"), update the library configuration paths to reference the toolkit. To do this, open `appDir/src/js/main.js` and edit `requirejs.config()`, as illustrated by the following example.
56+
If your app uses [RequireJS](http://www.requirejs.org/ "RequireJS"), update the library configuration paths to reference the toolkit. To do this, open `appDir/src/js/main.js` and edit `requirejs.config()`, as illustrated by the following example.
5757

5858
```javascript
5959
requirejs.config({
6060
paths: {
61-
'persist' : 'js/libs/persist/v1.4.1/min'
61+
'persist' : 'js/libs/persist/v1.4.2/min'
6262

6363
// Other path mappings here
6464
}
6565
```
66-
For Oracle JET apps, also open `appDir/src/js/main-release-paths.json` and add the `'persist' : 'js/libs/persist/v1.4.1/min'` entry to the list of paths.
66+
For Oracle JET apps, also open `appDir/src/js/main-release-paths.json` and add the `'persist' : 'js/libs/persist/v1.4.2/min'` entry to the list of paths.
6767
6868
You can choose the name of the paths prefix. That is, you can use a different value to the ‘persist’ value shown in the examples.
6969
70-
It is recommended to add the version number as a convention in your application build step such as `'persist' : 'js/libs/persist/v1.4.1/min'`.
70+
It is recommended to add the version number as a convention in your application build step such as `'persist' : 'js/libs/persist/v1.4.2/min'`.
7171
72-
Versions of the toolkit are also available on CDN under the latest JET release. e.g.
72+
Versions of the toolkit are also available on CDN under the latest JET release. e.g.
7373
7474
https://static.oracle.com/cdn/jet/v6.2.0/3rdparty/opt/debug
7575
@@ -83,15 +83,15 @@ The toolkit does not have a dependency on a specific client-side storage solutio
8383
8484
npm install pouchdb pouchdb-find
8585
86-
And again, if you are using RequireJS, you will need to map paths for these packages, e.g.:
86+
And again, if you are using RequireJS, you will need to map paths for these packages, e.g.:
8787
8888
```javascript
8989

9090
requirejs.config({
9191
paths: {
9292
'pouchdb': 'js/libs/pouchdb-7.0.0',
9393
'pouchfind': 'js/libs/pouchdb.find',
94-
'persist' : 'js/libs/persist/v1.4.1/min'
94+
'persist' : 'js/libs/persist/v1.4.2/min'
9595

9696
// Other path mappings here
9797
}
@@ -188,10 +188,10 @@ The most trivial use of the DefaultResponseProxy looks like this:
188188
By default, the fetch event listener produced by the DefaultResponseProxy handles GET requests by first checking see whether the browser/device is online. If the browser is online, the GET request is sent to the endpoint and the response is cached by writing the response payload to local persistence storage. If the browser is offline, the default fetch listener will return a previously cached response, if one is available.
189189
190190
This is the simplest form of response caching supported by the Offline Persistence Toolkit. As we will see in later sections, this behavior is configurable, allowing the application to address more interesting use cases.
191-
192191
193192
194-
193+
194+
195195
196196
197197
### What Storage? ###
@@ -235,7 +235,7 @@ require([
235235
});
236236
});
237237
});
238-
238+
239239

240240
```
241241
@@ -324,7 +324,7 @@ _handlePost = function (request) {
324324
// application logic
325325
});
326326
};
327-
var responseProxy = defaultResponseProxy.getResponseProxy({requestHandlerOverride: {handlePost: _handlePost}});
327+
var responseProxy = defaultResponseProxy.getResponseProxy({requestHandlerOverride: {handlePost: _handlePost}});
328328

329329
```
330330
@@ -333,9 +333,9 @@ A common use case involving POST requests is for the creation of resources. Freq
333333
```javascript
334334
// register the listener with sync manager on 'syncRequest' to handle any cleanup.
335335
// For example, replace client generated id with server generated id
336-
336+
337337
self.afterRequestListener = function(event) {
338-
var statusCode = event.response.status;
338+
var statusCode = event.response.status;
339339
if (statusCode == 200) {
340340
// sync is successful, do any clean up as needed.
341341
}
@@ -403,7 +403,7 @@ var responseProxy = defaultResponseProxy.getResponseProxy(
403403
requestHandlerOverride.handleGet: customGetHandler,
404404
requestHandlerOverride.handlePost: customPostHandler,
405405
});
406-
406+
407407

408408
```
409409
@@ -414,7 +414,7 @@ To enable detailed logging information, please set the log level on the toolkit
414414

415415

416416
logger.option('level', logger.LEVEL_LOG);
417-
417+
418418

419419
```
420420

0 commit comments

Comments
 (0)