Skip to content

Commit 5bc7482

Browse files
Updated bundle prefix to 'persist' and upped version to 1.1.5
Updated bundle prefix to 'persist' and upped version to 1.1.5
1 parent e14a4b7 commit 5bc7482

File tree

40 files changed

+212
-201
lines changed

40 files changed

+212
-201
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
dist
22
node_modules
3+
temp

Gruntfile.js

+80-70
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = function (grunt) {
1515
dist_bundles: 'dist/bundles',
1616
dist_bundles_debug: 'dist/bundles-debug',
1717
node_modules: 'node_modules',
18+
temp: 'temp',
1819
docs: 'docs',
1920
config: 'config'
2021
},
@@ -33,7 +34,8 @@ module.exports = function (grunt) {
3334
'<%= paths.dist_min %>',
3435
'<%= paths.dist_bundles %>',
3536
'<%= paths.dist_bundles_debug %>',
36-
'<%= paths.docs %>'],
37+
'<%= paths.docs %>',
38+
'<%= paths.temp %>'],
3739
bundles_debug: '<%= paths.dist_bundles_debug %>',
3840
bundles: '<%= paths.dist_bundles %>'
3941
},
@@ -52,39 +54,39 @@ module.exports = function (grunt) {
5254
compileBundles: {
5355
options: {
5456
mainConfigFile: 'config/config.js',
55-
baseUrl: '<%= paths.dist_debug %>',
57+
baseUrl: '<%= paths.temp %>/debug',
5658
modules: [
5759
{
58-
name: 'persistenceManager'
60+
name: 'persist/persistenceManager'
5961
},
6062
{
61-
name: 'pouchDBPersistenceStoreFactory',
62-
include: ['persistenceStoreFactory'],
63-
excludeShallow: ['impl/logger']
63+
name: 'persist/pouchDBPersistenceStoreFactory',
64+
include: ['persist/persistenceStoreFactory'],
65+
excludeShallow: ['persist/impl/logger']
6466
},
6567
{
66-
name: 'localPersistenceStoreFactory',
67-
include: ['persistenceStoreFactory'],
68-
excludeShallow: ['impl/logger']
68+
name: 'persist/localPersistenceStoreFactory',
69+
include: ['persist/persistenceStoreFactory'],
70+
excludeShallow: ['persist/impl/logger']
6971
},
7072
{
71-
name: 'fileSystemPersistenceStoreFactory',
72-
include: ['persistenceStoreFactory'],
73-
excludeShallow: ['impl/logger', 'persistenceStoreManager']
73+
name: 'persist/fileSystemPersistenceStoreFactory',
74+
include: ['persist/persistenceStoreFactory'],
75+
excludeShallow: ['persist/impl/logger', 'persist/persistenceStoreManager']
7476
},
7577
{
76-
name: 'defaultResponseProxy',
77-
include: ['simpleJsonShredding', 'oracleRestJsonShredding', 'simpleBinaryDataShredding', 'queryHandlers'],
78-
excludeShallow: ['persistenceUtils',
79-
'impl/logger',
80-
'impl/PersistenceXMLHttpRequest',
81-
'persistenceStoreManager',
82-
'impl/defaultCacheHandler',
83-
'impl/PersistenceSyncManager',
84-
'impl/OfflineCache',
85-
'impl/offlineCacheManager',
86-
'impl/fetch',
87-
'persistenceManager']
78+
name: 'persist/defaultResponseProxy',
79+
include: ['persist/simpleJsonShredding', 'persist/oracleRestJsonShredding', 'persist/simpleBinaryDataShredding', 'persist/queryHandlers'],
80+
excludeShallow: ['persist/persistenceUtils',
81+
'persist/impl/logger',
82+
'persist/impl/PersistenceXMLHttpRequest',
83+
'persist/persistenceStoreManager',
84+
'persist/impl/defaultCacheHandler',
85+
'persist/impl/PersistenceSyncManager',
86+
'persist/impl/OfflineCache',
87+
'persist/impl/offlineCacheManager',
88+
'persist/impl/fetch',
89+
'persist/persistenceManager']
8890
}
8991
],
9092
dir: '<%= paths.dist_bundles %>',
@@ -94,39 +96,39 @@ module.exports = function (grunt) {
9496
compileBundles_debug: {
9597
options: {
9698
mainConfigFile: 'config/config.js',
97-
baseUrl: '<%= paths.dist_debug %>',
99+
baseUrl: '<%= paths.temp %>/debug',
98100
modules: [
99101
{
100-
name: 'persistenceManager'
102+
name: 'persist/persistenceManager'
101103
},
102104
{
103-
name: 'pouchDBPersistenceStoreFactory',
104-
include: ['persistenceStoreFactory'],
105-
excludeShallow: ['impl/logger']
105+
name: 'persist/pouchDBPersistenceStoreFactory',
106+
include: ['persist/persistenceStoreFactory'],
107+
excludeShallow: ['persist/impl/logger']
106108
},
107109
{
108-
name: 'localPersistenceStoreFactory',
109-
include: ['persistenceStoreFactory'],
110-
excludeShallow: ['impl/logger']
110+
name: 'persist/localPersistenceStoreFactory',
111+
include: ['persist/persistenceStoreFactory'],
112+
excludeShallow: ['persist/impl/logger']
111113
},
112114
{
113-
name: 'fileSystemPersistenceStoreFactory',
114-
include: ['persistenceStoreFactory'],
115-
excludeShallow: ['impl/logger', 'persistenceStoreManager']
115+
name: 'persist/fileSystemPersistenceStoreFactory',
116+
include: ['persist/persistenceStoreFactory'],
117+
excludeShallow: ['persist/impl/logger', 'persist/persistenceStoreManager']
116118
},
117119
{
118-
name: 'defaultResponseProxy',
119-
include: ['simpleJsonShredding', 'oracleRestJsonShredding', 'simpleBinaryDataShredding', 'queryHandlers'],
120-
excludeShallow: ['persistenceUtils',
121-
'impl/logger',
122-
'impl/PersistenceXMLHttpRequest',
123-
'persistenceStoreManager',
124-
'impl/defaultCacheHandler',
125-
'impl/PersistenceSyncManager',
126-
'impl/OfflineCache',
127-
'impl/offlineCacheManager',
128-
'impl/fetch',
129-
'persistenceManager']
120+
name: 'persist/defaultResponseProxy',
121+
include: ['persist/simpleJsonShredding', 'persist/oracleRestJsonShredding', 'persist/simpleBinaryDataShredding', 'persist/queryHandlers'],
122+
excludeShallow: ['persist/persistenceUtils',
123+
'persist/impl/logger',
124+
'persist/impl/PersistenceXMLHttpRequest',
125+
'persist/persistenceStoreManager',
126+
'persist/impl/defaultCacheHandler',
127+
'persist/impl/PersistenceSyncManager',
128+
'persist/impl/OfflineCache',
129+
'persist/impl/offlineCacheManager',
130+
'persist/impl/fetch',
131+
'persist/persistenceManager']
130132
}],
131133
dir: '<%= paths.dist_bundles_debug %>',
132134
removeCombined: true,
@@ -138,44 +140,44 @@ module.exports = function (grunt) {
138140
main: {
139141
files: [
140142
{
141-
src: '<%= paths.dist_bundles %>/persistenceManager.js',
142-
dest: '<%= paths.dist_bundles %>/offline-persistence-toolkit-core-<%= pkg.version %>.js'
143+
src: '<%= paths.dist_bundles %>/persist/persistenceManager.js',
144+
dest: '<%= paths.dist_bundles %>/persist/offline-persistence-toolkit-core-<%= pkg.version %>.js'
143145
},
144146
{
145-
src: '<%= paths.dist_bundles %>/localPersistenceStoreFactory.js',
146-
dest: '<%= paths.dist_bundles %>/offline-persistence-toolkit-localstore-<%= pkg.version %>.js'
147+
src: '<%= paths.dist_bundles %>/persist/localPersistenceStoreFactory.js',
148+
dest: '<%= paths.dist_bundles %>/persist/offline-persistence-toolkit-localstore-<%= pkg.version %>.js'
147149
},
148150
{
149-
src: '<%= paths.dist_bundles %>/pouchDBPersistenceStoreFactory.js',
150-
dest: '<%= paths.dist_bundles %>/offline-persistence-toolkit-pouchdbstore-<%= pkg.version %>.js'
151+
src: '<%= paths.dist_bundles %>/persist/pouchDBPersistenceStoreFactory.js',
152+
dest: '<%= paths.dist_bundles %>/persist/offline-persistence-toolkit-pouchdbstore-<%= pkg.version %>.js'
151153
},
152154
{
153-
src: '<%= paths.dist_bundles %>/fileSystemPersistenceStoreFactory.js',
154-
dest: '<%= paths.dist_bundles %>/offline-persistence-toolkit-filesystemstore-<%= pkg.version %>.js'
155+
src: '<%= paths.dist_bundles %>/persist/fileSystemPersistenceStoreFactory.js',
156+
dest: '<%= paths.dist_bundles %>/persist/offline-persistence-toolkit-filesystemstore-<%= pkg.version %>.js'
155157
},
156158
{
157-
src: '<%= paths.dist_bundles %>/defaultResponseProxy.js',
158-
dest: '<%= paths.dist_bundles %>/offline-persistence-toolkit-responseproxy-<%= pkg.version %>.js'
159+
src: '<%= paths.dist_bundles %>/persist/defaultResponseProxy.js',
160+
dest: '<%= paths.dist_bundles %>/persist/offline-persistence-toolkit-responseproxy-<%= pkg.version %>.js'
159161
},
160162
{
161-
src: '<%= paths.dist_bundles_debug %>/persistenceManager.js',
162-
dest: '<%= paths.dist_bundles_debug %>/offline-persistence-toolkit-core-<%= pkg.version %>.js'
163+
src: '<%= paths.dist_bundles_debug %>/persist/persistenceManager.js',
164+
dest: '<%= paths.dist_bundles_debug %>/persist/offline-persistence-toolkit-core-<%= pkg.version %>.js'
163165
},
164166
{
165-
src: '<%= paths.dist_bundles_debug %>/localPersistenceStoreFactory.js',
166-
dest: '<%= paths.dist_bundles_debug %>/offline-persistence-toolkit-localstore-<%= pkg.version %>.js'
167+
src: '<%= paths.dist_bundles_debug %>/persist/localPersistenceStoreFactory.js',
168+
dest: '<%= paths.dist_bundles_debug %>/persist/offline-persistence-toolkit-localstore-<%= pkg.version %>.js'
167169
},
168170
{
169-
src: '<%= paths.dist_bundles_debug %>/pouchDBPersistenceStoreFactory.js',
170-
dest: '<%= paths.dist_bundles_debug %>/offline-persistence-toolkit-pouchdbstore-<%= pkg.version %>.js'
171+
src: '<%= paths.dist_bundles_debug %>/persist/pouchDBPersistenceStoreFactory.js',
172+
dest: '<%= paths.dist_bundles_debug %>/persist/offline-persistence-toolkit-pouchdbstore-<%= pkg.version %>.js'
171173
},
172174
{
173-
src: '<%= paths.dist_bundles_debug %>/fileSystemPersistenceStoreFactory.js',
174-
dest: '<%= paths.dist_bundles_debug %>/offline-persistence-toolkit-filesystemstore-<%= pkg.version %>.js'
175+
src: '<%= paths.dist_bundles_debug %>/persist/fileSystemPersistenceStoreFactory.js',
176+
dest: '<%= paths.dist_bundles_debug %>/persist/offline-persistence-toolkit-filesystemstore-<%= pkg.version %>.js'
175177
},
176178
{
177-
src: '<%= paths.dist_bundles_debug %>/defaultResponseProxy.js',
178-
dest: '<%= paths.dist_bundles_debug %>/offline-persistence-toolkit-responseproxy-<%= pkg.version %>.js'
179+
src: '<%= paths.dist_bundles_debug %>/persist/defaultResponseProxy.js',
180+
dest: '<%= paths.dist_bundles_debug %>/persist/offline-persistence-toolkit-responseproxy-<%= pkg.version %>.js'
179181
},
180182
{
181183
src: 'coverage/dist/debug/require-config-coverage.js',
@@ -247,18 +249,26 @@ module.exports = function (grunt) {
247249
dest: 'coverage/lib'}
248250
]
249251
},
252+
temp_debug: {
253+
files: [
254+
{expand: true,
255+
cwd: '<%= paths.dist_debug %>',
256+
src: ['*.js', '*/**'],
257+
dest: '<%= paths.temp %>/debug/persist'}
258+
]
259+
},
250260
dist_bundles_debug: {
251261
files: [
252262
{expand: true,
253-
cwd: '<%= paths.dist_bundles_debug %>',
263+
cwd: '<%= paths.dist_bundles_debug %>/persist',
254264
src: ['offline*.js', '*/**'],
255265
dest: '<%= paths.dist_debug %>'}
256266
]
257267
},
258268
dist_bundles_min: {
259269
files: [
260270
{expand: true,
261-
cwd: '<%= paths.dist_bundles %>',
271+
cwd: '<%= paths.dist_bundles %>/persist',
262272
src: ['offline*.js', '*/**'],
263273
dest: '<%= paths.dist_min %>'}
264274
]
@@ -314,5 +324,5 @@ module.exports = function (grunt) {
314324
grunt.loadNpmTasks('grunt-string-replace');
315325

316326
// Default task.
317-
grunt.registerTask('build', ['clean:all', 'browserify', 'copy:dist_debug', 'copy:dist_ext_lib', 'copy:config_coverage', 'copy:test_coverage', 'copy:lib_coverage', 'eslint', 'requirejs:compileBundles', 'requirejs:compileBundles_debug', 'run_java', 'rename', 'string-replace', 'copy:dist_bundles_debug', 'clean:bundles_debug', 'qunit', 'uglify', 'copy:dist_bundles_min', 'clean:bundles', 'jsdoc']);
327+
grunt.registerTask('build', ['clean:all', 'browserify', 'copy:dist_debug', 'copy:dist_ext_lib', 'copy:config_coverage', 'copy:test_coverage', 'copy:lib_coverage', 'eslint', 'copy:temp_debug', 'requirejs:compileBundles', 'requirejs:compileBundles_debug', 'run_java', 'rename', 'string-replace', 'copy:dist_bundles_debug', 'clean:bundles_debug', 'qunit', 'uglify', 'copy:dist_bundles_min', 'clean:bundles', 'jsdoc']);
318328
};

JSDOC.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# offline-persistence-toolkit 1.1.4 #
1+
# offline-persistence-toolkit 1.1.5 #
22

33
## Introduction ##
44

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# offline-persistence-toolkit 1.1.4 #
1+
# offline-persistence-toolkit 1.1.5 #
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

@@ -58,16 +58,16 @@ If your app uses [RequireJS](http://www.requirejs.org/ "RequireJS"), update the
5858
```javascript
5959
requirejs.config({
6060
paths: {
61-
'persist' : 'js/libs/persist/v1.1.4/min'
61+
'persist' : 'js/libs/persist/v1.1.5/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.1.4/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.1.5/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.1.4/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.1.5/min'`.
7171
7272
Versions of the toolkit are also available on CDN under the latest JET release. e.g.
7373
@@ -91,7 +91,7 @@ And again, if you are using RequireJS, you will need to map paths for these pack
9191
paths: {
9292
'pouchdb': 'js/libs/pouchdb-6.3.4',
9393
'pouchfind': 'js/libs/pouchdb.find',
94-
'persist' : 'js/libs/persist/v1.1.4/min'
94+
'persist' : 'js/libs/persist/v1.1.5/min'
9595

9696
// Other path mappings here
9797
}

USAGE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# offline-persistence-toolkit 1.1.4 #
1+
# offline-persistence-toolkit 1.1.5 #
22

33
# Introduction #
44

config/bundles-config.js

+38-38
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,48 @@
22
requirejs.config({
33
bundles:
44
{
5-
'opt/offline-persistence-toolkit-core-{pkg.version}': [
6-
'persistenceUtils',
7-
'impl/logger',
8-
'impl/PersistenceXMLHttpRequest',
9-
'persistenceStoreManager',
10-
'impl/defaultCacheHandler',
11-
'impl/PersistenceSyncManager',
12-
'impl/OfflineCache',
13-
'impl/offlineCacheManager',
14-
'impl/fetch',
15-
'persistenceManager'
5+
'persist/offline-persistence-toolkit-core-{pkg.version}': [
6+
'persist/persistenceUtils',
7+
'persist/impl/logger',
8+
'persist/impl/PersistenceXMLHttpRequest',
9+
'persist/persistenceStoreManager',
10+
'persist/impl/defaultCacheHandler',
11+
'persist/impl/PersistenceSyncManager',
12+
'persist/impl/OfflineCache',
13+
'persist/impl/offlineCacheManager',
14+
'persist/impl/fetch',
15+
'persist/persistenceManager'
1616
],
17-
'opt/offline-persistence-toolkit-pouchdbstore-{pkg.version}': [
18-
'PersistenceStore',
19-
'impl/storageUtils',
20-
'pouchdb-browser-6.3.4',
21-
'impl/pouchDBPersistenceStore',
22-
'pouchDBPersistenceStoreFactory',
23-
'persistenceStoreFactory'
17+
'persist/offline-persistence-toolkit-pouchdbstore-{pkg.version}': [
18+
'persist/PersistenceStore',
19+
'persist/impl/storageUtils',
20+
'persist/pouchdb-browser-6.3.4',
21+
'persist/impl/pouchDBPersistenceStore',
22+
'persist/pouchDBPersistenceStoreFactory',
23+
'persist/persistenceStoreFactory'
2424
],
25-
'opt/offline-persistence-toolkit-localstore-{pkg.version}': [
26-
'PersistenceStore',
27-
'impl/storageUtils',
28-
'impl/keyValuePersistenceStore',
29-
'impl/localPersistenceStore',
30-
'localPersistenceStoreFactory',
31-
'persistenceStoreFactory'
25+
'persist/offline-persistence-toolkit-localstore-{pkg.version}': [
26+
'persist/PersistenceStore',
27+
'persist/impl/storageUtils',
28+
'persist/impl/keyValuePersistenceStore',
29+
'persist/impl/localPersistenceStore',
30+
'persist/localPersistenceStoreFactory',
31+
'persist/persistenceStoreFactory'
3232
],
33-
'opt/offline-persistence-toolkit-filesystemstore-{pkg.version}': [
34-
'impl/storageUtils',
35-
'impl/keyValuePersistenceStore',
36-
'impl/fileSystemPersistenceStore',
37-
'fileSystemPersistenceStoreFactory'
33+
'persist/offline-persistence-toolkit-filesystemstore-{pkg.version}': [
34+
'persist/impl/storageUtils',
35+
'persist/impl/keyValuePersistenceStore',
36+
'persist/impl/fileSystemPersistenceStore',
37+
'persist/fileSystemPersistenceStoreFactory'
3838
],
39-
'opt/offline-persistence-toolkit-responseproxy-{pkg.version}': [
40-
'fetchStrategies',
41-
'cacheStrategies',
42-
'defaultResponseProxy',
43-
'simpleJsonShredding',
44-
'oracleRestJsonShredding',
45-
'simpleBinaryDataShredding',
46-
'queryHandlers'
39+
'persist/offline-persistence-toolkit-responseproxy-{pkg.version}': [
40+
'persist/fetchStrategies',
41+
'persist/cacheStrategies',
42+
'persist/defaultResponseProxy',
43+
'persist/simpleJsonShredding',
44+
'persist/oracleRestJsonShredding',
45+
'persist/simpleBinaryDataShredding',
46+
'persist/queryHandlers'
4747
]
4848
}
4949
})

config/config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ requirejs.config({
22
// Path mappings for the logical module names
33
baseUrl: "js",
44
paths: {
5-
'promise': 'es6-promise.min',
6-
'fetch' : 'fetch',
7-
'pouchdb' : 'pouchdb-browser-6.3.4'
5+
'promise': 'persist/es6-promise.min',
6+
'fetch' : 'persist/fetch',
7+
'pouchdb' : 'persist/pouchdb-browser-6.3.4'
88
},
99
// Shim configurations for modules that do not expose AMD
1010
shim: {

0 commit comments

Comments
 (0)