Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@annotation-studio/redux

Package Overview
Dependencies
Maintainers
1
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@annotation-studio/redux - npm Package Compare versions

Comparing version 1.0.0-rc.19 to 1.0.0-rc.20

5

es/actions/elucidate.js

@@ -39,2 +39,3 @@ import md5 from 'blueimp-md5';

var elucidateServer = getServer(state());
return createElucidateCollection(elucidateServer, label, md5(resourceId)).then(function (collection) {

@@ -82,4 +83,4 @@ dispatch(setCollection(resourceId, collection));

dispatch(addElucidateAnnotation(annotation));
return annotation;
dispatch(addElucidateAnnotation(postedAnnotation));
return postedAnnotation;
});

@@ -86,0 +87,0 @@ };

4

es/lib/annotation/mapping.js

@@ -156,4 +156,4 @@ import _extends from 'babel-runtime/helpers/extends';

}).reduce(function (state, field) {
if (field && field.omekaMetaData && field.omekaMetaData && field.omekaMetaData.bodyType.id && field.omekaMetaData.bodyType.id === 'oa:TextualBody' && field.inputType === 'madoc:textarea') {
var body = new AnnotationBody(null, draft.input[field.id], 'text/plain', 'TextualBody');
if (field && field.omekaMetaData && field.omekaMetaData && field.omekaMetaData.bodyType.id && field.omekaMetaData.bodyType.id === 'oa:TextualBody' && (field.inputType === 'madoc:textarea' || field.inputType === 'madoc:htmlfield')) {
var body = new AnnotationBody(null, draft.input[field.id], field.inputType === 'madoc:textarea' ? 'text/plain' : 'text/html', 'TextualBody');
body.purpose = field.omekaMetaData.purpose ? field.omekaMetaData.purpose.label : null;

@@ -160,0 +160,0 @@ state.push(body);

@@ -110,3 +110,3 @@ import _asyncIterator from 'babel-runtime/helpers/asyncIterator';

body: JSON.stringify(body),
credentials: withoutCredentials ? null : process.env.NODE_ENV === 'production' ? 'include' : null,
credentials: withoutCredentials ? 'omit' : process.env.NODE_ENV === 'production' ? 'include' : 'omit',
cache: process.env.NODE_ENV === 'production' ? 'default' : 'force-cache',

@@ -138,6 +138,8 @@ redirect: 'follow'

try {
return makeRequest('POST', uri, body);
return makeRequest('POST', uri, body, headers);
} catch (e) {
console.warn('Request failed, trying again without credentials', e);
return makeRequest('POST', uri, body, { withoutCredentials: true });
return makeRequest('POST', uri, body, headers, {
withoutCredentials: true
});
}

@@ -150,6 +152,6 @@ }

try {
return makeRequest('PUT', uri, body);
return makeRequest('PUT', uri, body, headers);
} catch (e) {
console.warn('Request failed, trying again without credentials', e);
return makeRequest('PUT', uri, body, { withoutCredentials: true });
return makeRequest('PUT', uri, body, headers, { withoutCredentials: true });
}

@@ -156,0 +158,0 @@ }

@@ -65,2 +65,3 @@ 'use strict';

var elucidateServer = (0, _elucidateQuery.getServer)(state());
return (0, _elucidate.createElucidateCollection)(elucidateServer, label, (0, _blueimpMd2.default)(resourceId)).then(function (collection) {

@@ -108,4 +109,4 @@ dispatch(setCollection(resourceId, collection));

dispatch(addElucidateAnnotation(annotation));
return annotation;
dispatch(addElucidateAnnotation(postedAnnotation));
return postedAnnotation;
});

@@ -112,0 +113,0 @@ };

@@ -194,4 +194,4 @@ 'use strict';

}).reduce(function (state, field) {
if (field && field.omekaMetaData && field.omekaMetaData && field.omekaMetaData.bodyType.id && field.omekaMetaData.bodyType.id === 'oa:TextualBody' && field.inputType === 'madoc:textarea') {
var body = new _AnnotationBody2.default(null, draft.input[field.id], 'text/plain', 'TextualBody');
if (field && field.omekaMetaData && field.omekaMetaData && field.omekaMetaData.bodyType.id && field.omekaMetaData.bodyType.id === 'oa:TextualBody' && (field.inputType === 'madoc:textarea' || field.inputType === 'madoc:htmlfield')) {
var body = new _AnnotationBody2.default(null, draft.input[field.id], field.inputType === 'madoc:textarea' ? 'text/plain' : 'text/html', 'TextualBody');
body.purpose = field.omekaMetaData.purpose ? field.omekaMetaData.purpose.label : null;

@@ -198,0 +198,0 @@ state.push(body);

@@ -251,3 +251,3 @@ 'use strict';

body: JSON.stringify(body),
credentials: withoutCredentials ? null : process.env.NODE_ENV === 'production' ? 'include' : null,
credentials: withoutCredentials ? 'omit' : process.env.NODE_ENV === 'production' ? 'include' : 'omit',
cache: process.env.NODE_ENV === 'production' ? 'default' : 'force-cache',

@@ -279,6 +279,8 @@ redirect: 'follow'

try {
return makeRequest('POST', uri, body);
return makeRequest('POST', uri, body, headers);
} catch (e) {
console.warn('Request failed, trying again without credentials', e);
return makeRequest('POST', uri, body, { withoutCredentials: true });
return makeRequest('POST', uri, body, headers, {
withoutCredentials: true
});
}

@@ -291,6 +293,6 @@ }

try {
return makeRequest('PUT', uri, body);
return makeRequest('PUT', uri, body, headers);
} catch (e) {
console.warn('Request failed, trying again without credentials', e);
return makeRequest('PUT', uri, body, { withoutCredentials: true });
return makeRequest('PUT', uri, body, headers, { withoutCredentials: true });
}

@@ -297,0 +299,0 @@ }

{
"name": "@annotation-studio/redux",
"version": "1.0.0-rc.19",
"version": "1.0.0-rc.20",
"description": "Describe annotation-redux here",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc