@constructor-io/constructorio-client-javascript 2.55.0 → 2.55.1
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/lib/modules/autocomplete.js +3 -3
- package/lib/modules/browse.js +14 -14
- package/lib/modules/quizzes.js +7 -7
- package/lib/modules/recommendations.js +3 -3
- package/lib/modules/search.js +10 -10
- package/lib/modules/tracker.js +1 -1
- package/lib/utils/botlist.js +1 -1
- package/lib/utils/store.js +11 -13
- package/lib/version.js +1 -1
- package/package.json +1 -1
|
@@ -144,14 +144,14 @@ var Autocomplete = /*#__PURE__*/function () {
|
|
|
144
144
|
* @param {object} [parameters.filters] - Key / value mapping (dictionary) of filters used to refine results
|
|
145
145
|
* @param {object} [parameters.filtersPerSection] - Filters used to refine results per section
|
|
146
146
|
* @param {object} [parameters.resultsPerSection] - Number of results to return (value) per section (key)
|
|
147
|
-
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope autocomplete results. Please refer to https://docs.constructor.
|
|
147
|
+
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope autocomplete results. Please refer to https://docs.constructor.com/reference/configuration-collections for details
|
|
148
148
|
* @param {string[]} [parameters.hiddenFields] - Hidden metadata fields to return
|
|
149
|
-
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.
|
|
149
|
+
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.com/reference/shared-variations-mapping for details
|
|
150
150
|
* @param {object} [parameters.qsParam] - object of additional query parameters to be appended to requests for results
|
|
151
151
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
152
152
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
153
153
|
* @returns {Promise}
|
|
154
|
-
* @see https://docs.constructor.
|
|
154
|
+
* @see https://docs.constructor.com/reference/autocomplete-autocomplete-results
|
|
155
155
|
* @example
|
|
156
156
|
* constructorio.autocomplete.getAutocompleteResults('t-shirt', {
|
|
157
157
|
* resultsPerSection: {
|
package/lib/modules/browse.js
CHANGED
|
@@ -227,16 +227,16 @@ var Browse = /*#__PURE__*/function () {
|
|
|
227
227
|
* @param {string} [parameters.sortBy='relevance'] - The sort method for results
|
|
228
228
|
* @param {string} [parameters.sortOrder='descending'] - The sort order for results
|
|
229
229
|
* @param {string} [parameters.section='Products'] - The section name for results
|
|
230
|
-
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.
|
|
231
|
-
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope browse results. Please refer to https://docs.constructor.
|
|
230
|
+
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/browse-browse-results for details
|
|
231
|
+
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope browse results. Please refer to https://docs.constructor.com/reference/configuration-collections
|
|
232
232
|
* @param {string[]} [parameters.hiddenFields] - Hidden metadata fields to return
|
|
233
233
|
* @param {string[]} [parameters.hiddenFacets] - Hidden facets to return
|
|
234
|
-
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.
|
|
235
|
-
* @param {object} [parameters.qsParam] - Parameters listed above can be serialized into a JSON object and parsed through this parameter. Please refer to https://docs.constructor.
|
|
234
|
+
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.com/reference/shared-variations-mapping for details
|
|
235
|
+
* @param {object} [parameters.qsParam] - Parameters listed above can be serialized into a JSON object and parsed through this parameter. Please refer to https://docs.constructor.com/reference/browse-browse-results
|
|
236
236
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
237
237
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
238
238
|
* @returns {Promise}
|
|
239
|
-
* @see https://docs.constructor.
|
|
239
|
+
* @see https://docs.constructor.com/reference/shared-results-response-structure
|
|
240
240
|
* @example
|
|
241
241
|
* constructorio.browse.getBrowseResults('group_id', 't-shirts', {
|
|
242
242
|
* resultsPerPage: 40,
|
|
@@ -296,14 +296,14 @@ var Browse = /*#__PURE__*/function () {
|
|
|
296
296
|
* @param {string} [parameters.sortBy='relevance'] - The sort method for results
|
|
297
297
|
* @param {string} [parameters.sortOrder='descending'] - The sort order for results
|
|
298
298
|
* @param {string} [parameters.section='Products'] - The section name for results
|
|
299
|
-
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.
|
|
299
|
+
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/browse-browse-results for details
|
|
300
300
|
* @param {string[]} [parameters.hiddenFields] - Hidden metadata fields to return
|
|
301
301
|
* @param {string[]} [parameters.hiddenFacets] - Hidden facets to return
|
|
302
|
-
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.
|
|
302
|
+
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.com/reference/shared-variations-mapping for details
|
|
303
303
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
304
304
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
305
305
|
* @returns {Promise}
|
|
306
|
-
* @see https://docs.constructor.
|
|
306
|
+
* @see https://docs.constructor.com/reference/v1-browse-get-browse-items-results
|
|
307
307
|
* @example
|
|
308
308
|
* constructorio.browse.getBrowseResultsForItemIds(['shirt-123', 'shirt-456', 'shirt-789'], {
|
|
309
309
|
* filters: {
|
|
@@ -355,11 +355,11 @@ var Browse = /*#__PURE__*/function () {
|
|
|
355
355
|
* @function getBrowseGroups
|
|
356
356
|
* @param {object} [parameters.filters] - Filters used to refine results
|
|
357
357
|
* @param {string} [parameters.section='Products'] - The section name for results
|
|
358
|
-
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.
|
|
358
|
+
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/v1-browse-get-browse-groups/ for details
|
|
359
359
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
360
360
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
361
361
|
* @returns {Promise}
|
|
362
|
-
* @see https://docs.constructor.
|
|
362
|
+
* @see https://docs.constructor.com/reference/v1-browse-get-browse-groups
|
|
363
363
|
* @example
|
|
364
364
|
* constructorio.browse.getBrowseGroups({
|
|
365
365
|
* filters: {
|
|
@@ -408,12 +408,12 @@ var Browse = /*#__PURE__*/function () {
|
|
|
408
408
|
* @param {number} [parameters.page] - The page number of the results (Can't be used together with offset)
|
|
409
409
|
* @param {number} [parameters.offset] - The number of results to skip from the beginning (Can't be used together with page)
|
|
410
410
|
* @param {string} [parameters.section='Products'] - The section name for results
|
|
411
|
-
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.
|
|
411
|
+
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/browse-browse-facets/ for details
|
|
412
412
|
* @param {number} [parameters.resultsPerPage] - The number of results per page to return
|
|
413
413
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
414
414
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
415
415
|
* @returns {Promise}
|
|
416
|
-
* @see https://docs.constructor.
|
|
416
|
+
* @see https://docs.constructor.com/reference/browse-browse-facets
|
|
417
417
|
* @example
|
|
418
418
|
* constructorio.browse.getBrowseFacets({
|
|
419
419
|
* page: 1,
|
|
@@ -459,10 +459,10 @@ var Browse = /*#__PURE__*/function () {
|
|
|
459
459
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
460
460
|
* @param {object} [parameters] - Additional parameters to refine result set
|
|
461
461
|
* @param {string} [parameters.section='Products'] - The section name for results
|
|
462
|
-
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.
|
|
462
|
+
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/v1-browse-get-browse-facet-options for details
|
|
463
463
|
* @param {}
|
|
464
464
|
* @returns {Promise}
|
|
465
|
-
* @see https://docs.constructor.
|
|
465
|
+
* @see https://docs.constructor.com/reference/v1-browse-get-browse-facet-options
|
|
466
466
|
* @example
|
|
467
467
|
* constructorio.browse.getBrowseFacetOptions('price', {
|
|
468
468
|
* });
|
package/lib/modules/quizzes.js
CHANGED
|
@@ -134,12 +134,12 @@ var Quizzes = /*#__PURE__*/function () {
|
|
|
134
134
|
* @param {string} [parameters] - Additional parameters to refine result set
|
|
135
135
|
* @param {string} [parameters.section] - Product catalog section
|
|
136
136
|
* @param {array} [parameters.answers] - An array of answers in the format [[1,2],[1]]
|
|
137
|
-
* @param {string} [parameters.quizVersionId] - Version identifier for the quiz. Version ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.
|
|
138
|
-
* @param {string} [parameters.quizSessionId] - Session identifier for the quiz. Session ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.
|
|
137
|
+
* @param {string} [parameters.quizVersionId] - Version identifier for the quiz. Version ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.com/reference/configuration-quizzes
|
|
138
|
+
* @param {string} [parameters.quizSessionId] - Session identifier for the quiz. Session ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.com/reference/configuration-quizzes
|
|
139
139
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
140
140
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
141
141
|
* @returns {Promise}
|
|
142
|
-
* @see https://docs.constructor.
|
|
142
|
+
* @see https://docs.constructor.com/reference/v1-quizzes-get-quiz-results
|
|
143
143
|
* @example
|
|
144
144
|
* constructorio.quizzes.getQuizNextQuestion('quizId', {
|
|
145
145
|
* answers: [[1,2],[1]],
|
|
@@ -185,8 +185,8 @@ var Quizzes = /*#__PURE__*/function () {
|
|
|
185
185
|
* @param {string} parameters - Additional parameters to refine result set
|
|
186
186
|
* @param {array} parameters.answers - An array of answers in the format [[1,2],[1]]
|
|
187
187
|
* @param {string} [parameters.section] - Product catalog section
|
|
188
|
-
* @param {string} [parameters.quizVersionId] - Version identifier for the quiz. Version ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.
|
|
189
|
-
* @param {string} [parameters.quizSessionId] - Session identifier for the quiz. Session ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.
|
|
188
|
+
* @param {string} [parameters.quizVersionId] - Version identifier for the quiz. Version ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.com/reference/configuration-quizzes
|
|
189
|
+
* @param {string} [parameters.quizSessionId] - Session identifier for the quiz. Session ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.com/reference/configuration-quizzes
|
|
190
190
|
* @param {number} [parameters.page] - The page number of the results
|
|
191
191
|
* @param {number} [parameters.resultsPerPage] - The number of results per page to return
|
|
192
192
|
* @param {object} [parameters.filters] - Key / value mapping (dictionary) of filters used to refine results
|
|
@@ -195,7 +195,7 @@ var Quizzes = /*#__PURE__*/function () {
|
|
|
195
195
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
196
196
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
197
197
|
* @returns {Promise}
|
|
198
|
-
* @see https://docs.constructor.
|
|
198
|
+
* @see https://docs.constructor.com/reference/v1-quizzes-get-quiz-results
|
|
199
199
|
* @example
|
|
200
200
|
* constructorio.quizzes.getQuizResults('quizId', {
|
|
201
201
|
* answers: [[1,2],[1]],
|
|
@@ -240,7 +240,7 @@ var Quizzes = /*#__PURE__*/function () {
|
|
|
240
240
|
* @param {string} quizId - The identifier of the quiz
|
|
241
241
|
* @param {string} parameters - Additional parameters
|
|
242
242
|
* @param {string} [parameters.section] - Product catalog section
|
|
243
|
-
* @param {string} [parameters.quizVersionId] - Version identifier for the quiz. Version ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.
|
|
243
|
+
* @param {string} [parameters.quizVersionId] - Version identifier for the quiz. Version ID will be returned with the first request and it should be passed with subsequent requests. More information can be found: https://docs.constructor.com/reference/configuration-quizzes
|
|
244
244
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
245
245
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
246
246
|
* @returns {Promise}
|
|
@@ -124,13 +124,13 @@ var Recommendations = /*#__PURE__*/function () {
|
|
|
124
124
|
* @param {string} [parameters.section] - The section to return results from
|
|
125
125
|
* @param {string} [parameters.term] - The term to use to refine results (strategy specific)
|
|
126
126
|
* @param {object} [parameters.filters] - Key / value mapping of filters used to refine results
|
|
127
|
-
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.
|
|
128
|
-
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope search results. Please refer to https://docs.constructor.
|
|
127
|
+
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.com/reference/shared-variations-mapping for details
|
|
128
|
+
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope search results. Please refer to https://docs.constructor.com/reference/configuration-collections
|
|
129
129
|
* @param {string[]} [parameters.hiddenFields] - Hidden metadata fields to return
|
|
130
130
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
131
131
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
132
132
|
* @returns {Promise}
|
|
133
|
-
* @see https://docs.constructor.
|
|
133
|
+
* @see https://docs.constructor.com/reference/recommendations-recommendation-results
|
|
134
134
|
* @example
|
|
135
135
|
* constructorio.recommendations.getRecommendations('t-shirt-best-sellers', {
|
|
136
136
|
* numResults: 5,
|
package/lib/modules/search.js
CHANGED
|
@@ -175,16 +175,16 @@ var Search = /*#__PURE__*/function () {
|
|
|
175
175
|
* @param {string} [parameters.sortBy='relevance'] - The sort method for results
|
|
176
176
|
* @param {string} [parameters.sortOrder='descending'] - The sort order for results
|
|
177
177
|
* @param {string} [parameters.section='Products'] - The section name for results
|
|
178
|
-
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.
|
|
179
|
-
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope search results. Please refer to https://docs.constructor.
|
|
178
|
+
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/search-search-resultsqueries for details
|
|
179
|
+
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope search results. Please refer to https://docs.constructor.com/reference/configuration-collections
|
|
180
180
|
* @param {string[]} [parameters.hiddenFields] - Hidden metadata fields to return
|
|
181
181
|
* @param {string[]} [parameters.hiddenFacets] - Hidden facets to return
|
|
182
|
-
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.
|
|
183
|
-
* @param {object} [parameters.qsParam] - Parameters listed above can be serialized into a JSON object and parsed through this parameter. Please refer to https://docs.constructor.
|
|
182
|
+
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.com/reference/shared-variations-mapping for details
|
|
183
|
+
* @param {object} [parameters.qsParam] - Parameters listed above can be serialized into a JSON object and parsed through this parameter. Please refer to https://docs.constructor.com/reference/v1-search-get-search-results
|
|
184
184
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
185
185
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
186
186
|
* @returns {Promise}
|
|
187
|
-
* @see https://docs.constructor.
|
|
187
|
+
* @see https://docs.constructor.com/reference/search-search-results
|
|
188
188
|
* @example
|
|
189
189
|
* constructorio.search.getSearchResults('t-shirt', {
|
|
190
190
|
* resultsPerPage: 40,
|
|
@@ -249,16 +249,16 @@ var Search = /*#__PURE__*/function () {
|
|
|
249
249
|
* @param {number} [parameters.offset] - The number of results to skip from the beginning (Can't be used together with page)
|
|
250
250
|
* @param {number} [parameters.resultsPerPage] - The number of results per page to return
|
|
251
251
|
* @param {string} [parameters.section='Products'] - The section name for results
|
|
252
|
-
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.
|
|
253
|
-
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope search results. Please refer to https://docs.constructor.
|
|
254
|
-
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.
|
|
252
|
+
* @param {object} [parameters.fmtOptions] - The format options used to refine result groups. Please refer to https://docs.constructor.com/reference/search-search-resultsqueries for details
|
|
253
|
+
* @param {object} [parameters.preFilterExpression] - Faceting expression to scope search results. Please refer to https://docs.constructor.com/reference/configuration-collections
|
|
254
|
+
* @param {object} [parameters.variationsMap] - The variations map object to aggregate variations. Please refer to https://docs.constructor.com/reference/shared-variations-mapping for details
|
|
255
255
|
* @param {string[]} [parameters.hiddenFields] - Hidden metadata fields to return
|
|
256
256
|
* @param {string[]} [parameters.hiddenFacets] - Hidden facets to return
|
|
257
|
-
* @param {object} [parameters.qsParam] - Parameters listed above can be serialized into a JSON object and parsed through this parameter. Please refer to https://docs.constructor.
|
|
257
|
+
* @param {object} [parameters.qsParam] - Parameters listed above can be serialized into a JSON object and parsed through this parameter. Please refer to https://docs.constructor.com/reference/v1-search-get-search-results
|
|
258
258
|
* @param {object} [networkParameters] - Parameters relevant to the network request
|
|
259
259
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
260
260
|
* @returns {Promise}
|
|
261
|
-
* @see https://docs.constructor.
|
|
261
|
+
* @see https://docs.constructor.com/docs/products-search-learn-about-search
|
|
262
262
|
* @example
|
|
263
263
|
* constructorio.search.getVoiceSearchResults('show me lipstick');
|
|
264
264
|
*/
|
package/lib/modules/tracker.js
CHANGED
|
@@ -962,7 +962,7 @@ var Tracker = /*#__PURE__*/function () {
|
|
|
962
962
|
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
|
|
963
963
|
* @returns {(true|Error)}
|
|
964
964
|
* @description User performed an action indicating interest in an item (add to cart, add to wishlist, etc.)
|
|
965
|
-
* @see https://docs.constructor.
|
|
965
|
+
* @see https://docs.constructor.com/docs/integrating-with-constructor-behavioral-tracking-data-driven-event-tracking
|
|
966
966
|
* @example
|
|
967
967
|
* constructorio.tracker.trackConversion(
|
|
968
968
|
* 'T-Shirt',
|
package/lib/utils/botlist.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
/* eslint-disable no-useless-escape */
|
|
4
4
|
/* cspell:disable */
|
|
5
5
|
|
|
6
|
-
module.exports = ['Googlebot\/', 'Googlebot-Mobile', 'Googlebot-Image', 'Googlebot-News', 'Googlebot-Video', 'AdsBot-Google([^-]|$)', 'AdsBot-Google-Mobile', 'Feedfetcher-Google', 'Mediapartners-Google', 'Mediapartners \\(Googlebot\\)', 'APIs-Google', 'bingbot', 'Slurp', '[wW]get', 'curl', 'LinkedInBot', 'Python-urllib', 'python-requests', 'libwww', 'httpunit', 'nutch', 'Go-http-client', 'phpcrawl', 'msnbot', 'jyxobot', 'FAST-WebCrawler', 'FAST Enterprise Crawler', 'BIGLOTRON', 'Teoma', 'convera', 'seekbot', 'Gigabot', 'Gigablast', 'exabot', 'ia_archiver', 'GingerCrawler', 'webmon ', 'HTTrack', 'grub\\.org', 'UsineNouvelleCrawler', 'antibot', 'netresearchserver', 'speedy', 'fluffy', 'bibnum\\.bnf', 'findlink', 'msrbot', 'panscient', 'yacybot', 'AISearchBot', 'ips-agent', 'tagoobot', 'MJ12bot', 'woriobot', 'yanga', 'buzzbot', 'mlbot', 'YandexBot', 'yandex\\.com\/bots', 'purebot', 'Linguee Bot', 'CyberPatrol', 'voilabot', 'Baiduspider', 'citeseerxbot', 'spbot', 'twengabot', 'postrank', 'turnitinbot', 'scribdbot', 'page2rss', 'sitebot', 'linkdex', 'Adidxbot', 'blekkobot', 'ezooms', 'dotbot', 'Mail\\.RU_Bot', 'discobot', 'heritrix', 'findthatfile', 'europarchive\\.org', 'NerdByNature\\.Bot', 'sistrix crawler', 'Ahrefs(Bot|SiteAudit)', 'fuelbot', 'CrunchBot', 'centurybot9', 'IndeedBot', 'mappydata', 'woobot', 'ZoominfoBot', 'PrivacyAwareBot', 'Multiviewbot', 'SWIMGBot', 'Grobbot', 'eright', 'Apercite', 'semanticbot', 'Aboundex', 'domaincrawler', 'wbsearchbot', 'summify', 'CCBot', 'edisterbot', 'seznambot', 'ec2linkfinder', 'gslfbot', 'aiHitBot', 'intelium_bot', 'facebookexternalhit', 'Yeti', 'RetrevoPageAnalyzer', 'lb-spider', 'Sogou', 'lssbot', 'careerbot', 'wotbox', 'wocbot', 'ichiro', 'DuckDuckBot', 'lssrocketcrawler', 'drupact', 'webcompanycrawler', 'acoonbot', 'openindexspider', 'gnam gnam spider', 'web-archive-net\\.com\\.bot', 'backlinkcrawler', 'coccoc', 'integromedb', 'content crawler spider', 'toplistbot', 'it2media-domain-crawler', 'ip-web-crawler\\.com', 'siteexplorer\\.info', 'elisabot', 'proximic', 'changedetection', 'arabot', 'WeSEE:Search', 'niki-bot', 'CrystalSemanticsBot', 'rogerbot', '360Spider', 'psbot', 'InterfaxScanBot', 'CC Metadata Scaper', 'g00g1e\\.net', 'GrapeshotCrawler', 'urlappendbot', 'brainobot', 'fr-crawler', 'binlar', 'SimpleCrawler', 'Twitterbot', 'cXensebot', 'smtbot', 'bnf\\.fr_bot', 'A6-Indexer', 'ADmantX', 'Facebot', 'OrangeBot\/', 'memorybot', 'AdvBot', 'MegaIndex', 'SemanticScholarBot', 'ltx71', 'nerdybot', 'xovibot', 'BUbiNG', 'Qwantify', 'archive\\.org_bot', 'Applebot', 'TweetmemeBot', 'crawler4j', 'findxbot', 'S[eE][mM]rushBot', 'yoozBot', 'lipperhey', 'Y!J', 'Domain Re-Animator Bot', 'AddThis', 'Screaming Frog SEO Spider', 'MetaURI', 'Scrapy', 'Livelap[bB]ot', 'OpenHoseBot', 'CapsuleChecker', 'collection@infegy\\.com', 'IstellaBot', 'DeuSu\/', 'betaBot', 'Cliqzbot\/', 'MojeekBot\/', 'netEstate NE Crawler', 'SafeSearch microdata crawler', 'Gluten Free Crawler\/', 'Sonic', 'Sysomos', 'Trove', 'deadlinkchecker', 'Slack-ImgProxy', 'Embedly', 'RankActiveLinkBot', 'iskanie', 'SafeDNSBot', 'SkypeUriPreview', 'Veoozbot', 'Slackbot', 'redditbot', 'datagnionbot', 'Google-Adwords-Instant', 'adbeat_bot', 'WhatsApp', 'contxbot', 'pinterest', 'electricmonk', 'GarlikCrawler', 'BingPreview\/', 'vebidoobot', 'FemtosearchBot', 'Yahoo Link Preview', 'MetaJobBot', 'DomainStatsBot', 'mindUpBot', 'Daum\/', 'Jugendschutzprogramm-Crawler', 'Xenu Link Sleuth', 'Pcore-HTTP', 'moatbot', 'KosmioBot', 'pingdom', 'PhantomJS', 'Gowikibot', 'PiplBot', 'Discordbot', 'TelegramBot', 'Jetslide', 'newsharecounts', 'James BOT', 'Barkrowler', 'TinEye', 'SocialRankIOBot', 'trendictionbot', 'Ocarinabot', 'epicbot', 'Primalbot', 'DuckDuckGo-Favicons-Bot', 'GnowitNewsbot', 'Leikibot', 'LinkArchiver', 'YaK\/', 'PaperLiBot', 'Digg Deeper', 'dcrawl', 'Snacktory', 'AndersPinkBot', 'Fyrebot', 'EveryoneSocialBot', 'Mediatoolkitbot', 'Luminator-robots', 'ExtLinksBot', 'SurveyBot', 'NING\/', 'okhttp', 'Nuzzel', 'omgili', 'PocketParser', 'YisouSpider', 'um-LN', 'ToutiaoSpider', 'MuckRack', "Jamie's Spider", 'AHC\/', 'NetcraftSurveyAgent', 'Laserlikebot', 'Apache-HttpClient', 'AppEngine-Google', 'Jetty', 'Upflow', 'Thinklab', 'Traackr\\.com', 'Twurly', 'Mastodon', 'http_get', 'DnyzBot', 'botify', '007ac9 Crawler', 'BehloolBot', 'BrandVerity', 'check_http', 'BDCbot', 'ZumBot', 'EZID', 'ICC-Crawler', 'ArchiveBot', '^LCC ', 'filterdb\\.iss\\.net\/crawler', 'BLP_bbot', 'BomboraBot', 'Buck\/', 'Companybook-Crawler', 'Genieo', 'magpie-crawler', 'MeltwaterNews', 'Moreover', 'newspaper\/', 'ScoutJet', '(^| )sentry\/', 'StorygizeBot', 'UptimeRobot', 'OutclicksBot', 'seoscanners', 'Hatena', 'Google Web Preview', 'MauiBot', 'AlphaBot', 'SBL-BOT', 'IAS crawler', 'adscanner', 'Netvibes', 'acapbot', 'Baidu-YunGuanCe', 'bitlybot', 'blogmuraBot', 'Bot\\.AraTurka\\.com', 'bot-pge\\.chlooe\\.com', 'BoxcarBot', 'BTWebClient', 'ContextAd Bot', 'Digincore bot', 'Disqus', 'Feedly', 'Fetch\/', 'Fever', 'Flamingo_SearchEngine', 'FlipboardProxy', 'g2reader-bot', 'imrbot', 'K7MLWCBot', 'Kemvibot', 'Landau-Media-Spider', 'linkapediabot', 'vkShare', 'Siteimprove\\.com', 'BLEXBot\/', 'DareBoost', 'ZuperlistBot\/', 'Miniflux\/', 'Feedspotbot\/', 'Diffbot\/', 'SEOkicks', 'tracemyfile', 'Nimbostratus-Bot', 'Bytespider'];
|
|
6
|
+
module.exports = ['Googlebot\/', 'Googlebot-Mobile', 'Googlebot-Image', 'Googlebot-News', 'Googlebot-Video', 'AdsBot-Google([^-]|$)', 'AdsBot-Google-Mobile', 'Feedfetcher-Google', 'Mediapartners-Google', 'Mediapartners \\(Googlebot\\)', 'APIs-Google', 'bingbot', 'Slurp', '[wW]get', 'curl', 'LinkedInBot', 'Python-urllib', 'python-requests', 'libwww', 'httpunit', 'nutch', 'Go-http-client', 'phpcrawl', 'msnbot', 'jyxobot', 'FAST-WebCrawler', 'FAST Enterprise Crawler', 'BIGLOTRON', 'Teoma', 'convera', 'seekbot', 'Gigabot', 'Gigablast', 'exabot', 'ia_archiver', 'GingerCrawler', 'webmon ', 'HTTrack', 'grub\\.org', 'UsineNouvelleCrawler', 'antibot', 'netresearchserver', 'speedy', 'fluffy', 'bibnum\\.bnf', 'findlink', 'msrbot', 'panscient', 'yacybot', 'AISearchBot', 'ips-agent', 'tagoobot', 'MJ12bot', 'woriobot', 'yanga', 'buzzbot', 'mlbot', 'YandexBot', 'yandex\\.com\/bots', 'purebot', 'Linguee Bot', 'CyberPatrol', 'voilabot', 'Baiduspider', 'citeseerxbot', 'spbot', 'twengabot', 'postrank', 'turnitinbot', 'scribdbot', 'page2rss', 'sitebot', 'linkdex', 'Adidxbot', 'blekkobot', 'ezooms', 'dotbot', 'Mail\\.RU_Bot', 'discobot', 'heritrix', 'findthatfile', 'europarchive\\.org', 'NerdByNature\\.Bot', 'sistrix crawler', 'Ahrefs(Bot|SiteAudit)', 'fuelbot', 'CrunchBot', 'centurybot9', 'IndeedBot', 'mappydata', 'woobot', 'ZoominfoBot', 'PrivacyAwareBot', 'Multiviewbot', 'SWIMGBot', 'Grobbot', 'eright', 'Apercite', 'semanticbot', 'Aboundex', 'domaincrawler', 'wbsearchbot', 'summify', 'CCBot', 'edisterbot', 'seznambot', 'ec2linkfinder', 'gslfbot', 'aiHitBot', 'intelium_bot', 'facebookexternalhit', 'Yeti', 'RetrevoPageAnalyzer', 'lb-spider', 'Sogou', 'lssbot', 'careerbot', 'wotbox', 'wocbot', 'ichiro', 'DuckDuckBot', 'lssrocketcrawler', 'drupact', 'webcompanycrawler', 'acoonbot', 'openindexspider', 'gnam gnam spider', 'web-archive-net\\.com\\.bot', 'backlinkcrawler', 'coccoc', 'integromedb', 'content crawler spider', 'toplistbot', 'it2media-domain-crawler', 'ip-web-crawler\\.com', 'siteexplorer\\.info', 'elisabot', 'proximic', 'changedetection', 'arabot', 'WeSEE:Search', 'niki-bot', 'CrystalSemanticsBot', 'rogerbot', '360Spider', 'psbot', 'InterfaxScanBot', 'CC Metadata Scaper', 'g00g1e\\.net', 'GrapeshotCrawler', 'urlappendbot', 'brainobot', 'fr-crawler', 'binlar', 'SimpleCrawler', 'Twitterbot', 'cXensebot', 'smtbot', 'bnf\\.fr_bot', 'A6-Indexer', 'ADmantX', 'Facebot', 'OrangeBot\/', 'memorybot', 'AdvBot', 'MegaIndex', 'SemanticScholarBot', 'ltx71', 'nerdybot', 'xovibot', 'BUbiNG', 'Qwantify', 'archive\\.org_bot', 'Applebot', 'TweetmemeBot', 'crawler4j', 'findxbot', 'S[eE][mM]rushBot', 'yoozBot', 'lipperhey', 'Y!J', 'Domain Re-Animator Bot', 'AddThis', 'Screaming Frog SEO Spider', 'MetaURI', 'Scrapy', 'Livelap[bB]ot', 'OpenHoseBot', 'CapsuleChecker', 'collection@infegy\\.com', 'IstellaBot', 'DeuSu\/', 'betaBot', 'Cliqzbot\/', 'MojeekBot\/', 'netEstate NE Crawler', 'SafeSearch microdata crawler', 'Gluten Free Crawler\/', 'Sonic', 'Sysomos', 'Trove', 'deadlinkchecker', 'Slack-ImgProxy', 'Embedly', 'RankActiveLinkBot', 'iskanie', 'SafeDNSBot', 'SkypeUriPreview', 'Veoozbot', 'Slackbot', 'redditbot', 'datagnionbot', 'Google-Adwords-Instant', 'adbeat_bot', 'WhatsApp', 'contxbot', 'pinterest', 'electricmonk', 'GarlikCrawler', 'BingPreview\/', 'vebidoobot', 'FemtosearchBot', 'Yahoo Link Preview', 'MetaJobBot', 'DomainStatsBot', 'mindUpBot', 'Daum\/', 'Jugendschutzprogramm-Crawler', 'Xenu Link Sleuth', 'Pcore-HTTP', 'moatbot', 'KosmioBot', 'pingdom', 'PhantomJS', 'Gowikibot', 'PiplBot', 'Discordbot', 'TelegramBot', 'Jetslide', 'newsharecounts', 'James BOT', 'Barkrowler', 'TinEye', 'SocialRankIOBot', 'trendictionbot', 'Ocarinabot', 'epicbot', 'Primalbot', 'DuckDuckGo-Favicons-Bot', 'GnowitNewsbot', 'Leikibot', 'LinkArchiver', 'YaK\/', 'PaperLiBot', 'Digg Deeper', 'dcrawl', 'Snacktory', 'AndersPinkBot', 'Fyrebot', 'EveryoneSocialBot', 'Mediatoolkitbot', 'Luminator-robots', 'ExtLinksBot', 'SurveyBot', 'NING\/', 'okhttp', 'Nuzzel', 'omgili', 'PocketParser', 'YisouSpider', 'um-LN', 'ToutiaoSpider', 'MuckRack', "Jamie's Spider", 'AHC\/', 'NetcraftSurveyAgent', 'Laserlikebot', 'Apache-HttpClient', 'AppEngine-Google', 'Jetty', 'Upflow', 'Thinklab', 'Traackr\\.com', 'Twurly', 'Mastodon', 'http_get', 'DnyzBot', 'botify', '007ac9 Crawler', 'BehloolBot', 'BrandVerity', 'check_http', 'BDCbot', 'ZumBot', 'EZID', 'ICC-Crawler', 'ArchiveBot', '^LCC ', 'filterdb\\.iss\\.net\/crawler', 'BLP_bbot', 'BomboraBot', 'Buck\/', 'Companybook-Crawler', 'Genieo', 'magpie-crawler', 'MeltwaterNews', 'Moreover', 'newspaper\/', 'ScoutJet', '(^| )sentry\/', 'StorygizeBot', 'UptimeRobot', 'OutclicksBot', 'seoscanners', 'Hatena', 'Google Web Preview', 'MauiBot', 'AlphaBot', 'SBL-BOT', 'IAS crawler', 'adscanner', 'Netvibes', 'acapbot', 'Baidu-YunGuanCe', 'bitlybot', 'blogmuraBot', 'Bot\\.AraTurka\\.com', 'bot-pge\\.chlooe\\.com', 'BoxcarBot', 'BTWebClient', 'ContextAd Bot', 'Digincore bot', 'Disqus', 'Feedly', 'Fetch\/', 'Fever', 'Flamingo_SearchEngine', 'FlipboardProxy', 'g2reader-bot', 'imrbot', 'K7MLWCBot', 'Kemvibot', 'Landau-Media-Spider', 'linkapediabot', 'vkShare', 'Siteimprove\\.com', 'BLEXBot\/', 'DareBoost', 'ZuperlistBot\/', 'Miniflux\/', 'Feedspotbot\/', 'Diffbot\/', 'SEOkicks', 'tracemyfile', 'Nimbostratus-Bot', 'Bytespider', 'BTTAgent'];
|
package/lib/utils/store.js
CHANGED
|
@@ -9,9 +9,7 @@ function canUseStorage(type) {
|
|
|
9
9
|
storage.removeItem(x);
|
|
10
10
|
return true;
|
|
11
11
|
} catch (e) {
|
|
12
|
-
return e instanceof DOMException && e.name === 'QuotaExceededError'
|
|
13
|
-
// acknowledge QuotaExceededError only if there's something already stored
|
|
14
|
-
&& storage && storage.length !== 0;
|
|
12
|
+
return e instanceof DOMException && (e.name === 'QuotaExceededError' || e.name === 'QUOTA_EXCEEDED_ERR' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED' || e.toString().indexOf('QUOTA_EXCEEDED_ERR') !== -1 || e.toString().indexOf('QuotaExceededError') !== -1) && storage && storage.length !== 0;
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
var session = {
|
|
@@ -22,7 +20,7 @@ var session = {
|
|
|
22
20
|
if (valueFromOverflow) {
|
|
23
21
|
return valueFromOverflow;
|
|
24
22
|
}
|
|
25
|
-
if (!canUseStorage('sessionStorage')
|
|
23
|
+
if (!canUseStorage('sessionStorage')) {
|
|
26
24
|
return null;
|
|
27
25
|
}
|
|
28
26
|
var valueFromSession = sessionStorage.getItem(key);
|
|
@@ -49,13 +47,13 @@ var session = {
|
|
|
49
47
|
if ((_this$overflow = this.overflow) !== null && _this$overflow !== void 0 && _this$overflow[key]) {
|
|
50
48
|
delete this.overflow[key];
|
|
51
49
|
}
|
|
52
|
-
if (canUseStorage('sessionStorage')
|
|
50
|
+
if (canUseStorage('sessionStorage')) {
|
|
53
51
|
sessionStorage.removeItem(key);
|
|
54
52
|
}
|
|
55
53
|
},
|
|
56
54
|
key: function key(i) {
|
|
57
55
|
var _sessionStorage, _sessionStorage2;
|
|
58
|
-
if (!canUseStorage('sessionStorage')
|
|
56
|
+
if (!canUseStorage('sessionStorage')) {
|
|
59
57
|
var _Object$keys;
|
|
60
58
|
return (_Object$keys = Object.keys(this.overflow)) === null || _Object$keys === void 0 ? void 0 : _Object$keys[i];
|
|
61
59
|
}
|
|
@@ -70,14 +68,14 @@ var session = {
|
|
|
70
68
|
},
|
|
71
69
|
length: function length() {
|
|
72
70
|
var overflowLength = Object.keys(this.overflow).length;
|
|
73
|
-
if (!canUseStorage('sessionStorage')
|
|
71
|
+
if (!canUseStorage('sessionStorage')) {
|
|
74
72
|
return overflowLength;
|
|
75
73
|
}
|
|
76
74
|
return sessionStorage.length + overflowLength;
|
|
77
75
|
},
|
|
78
76
|
clear: function clear() {
|
|
79
77
|
this.overflow = {};
|
|
80
|
-
if (canUseStorage('sessionStorage')
|
|
78
|
+
if (canUseStorage('sessionStorage')) {
|
|
81
79
|
sessionStorage.clear();
|
|
82
80
|
}
|
|
83
81
|
}
|
|
@@ -90,7 +88,7 @@ var local = {
|
|
|
90
88
|
if (valueFromOverflow) {
|
|
91
89
|
return valueFromOverflow;
|
|
92
90
|
}
|
|
93
|
-
if (!canUseStorage('localStorage')
|
|
91
|
+
if (!canUseStorage('localStorage')) {
|
|
94
92
|
return null;
|
|
95
93
|
}
|
|
96
94
|
var valueFromLocal = localStorage.getItem(key);
|
|
@@ -117,13 +115,13 @@ var local = {
|
|
|
117
115
|
if ((_this$overflow2 = this.overflow) !== null && _this$overflow2 !== void 0 && _this$overflow2[key]) {
|
|
118
116
|
delete this.overflow[key];
|
|
119
117
|
}
|
|
120
|
-
if (canUseStorage('localStorage')
|
|
118
|
+
if (canUseStorage('localStorage')) {
|
|
121
119
|
localStorage.removeItem(key);
|
|
122
120
|
}
|
|
123
121
|
},
|
|
124
122
|
key: function key(i) {
|
|
125
123
|
var _localStorage, _localStorage2;
|
|
126
|
-
if (!canUseStorage('localStorage')
|
|
124
|
+
if (!canUseStorage('localStorage')) {
|
|
127
125
|
var _Object$keys3;
|
|
128
126
|
return (_Object$keys3 = Object.keys(this.overflow)) === null || _Object$keys3 === void 0 ? void 0 : _Object$keys3[i];
|
|
129
127
|
}
|
|
@@ -138,14 +136,14 @@ var local = {
|
|
|
138
136
|
},
|
|
139
137
|
length: function length() {
|
|
140
138
|
var overflowLength = Object.keys(this.overflow).length;
|
|
141
|
-
if (!canUseStorage('localStorage')
|
|
139
|
+
if (!canUseStorage('localStorage')) {
|
|
142
140
|
return overflowLength;
|
|
143
141
|
}
|
|
144
142
|
return localStorage.length + overflowLength;
|
|
145
143
|
},
|
|
146
144
|
clear: function clear() {
|
|
147
145
|
this.overflow = {};
|
|
148
|
-
if (canUseStorage('localStorage')
|
|
146
|
+
if (canUseStorage('localStorage')) {
|
|
149
147
|
localStorage.clear();
|
|
150
148
|
}
|
|
151
149
|
}
|
package/lib/version.js
CHANGED