mapexplorer-rails 1.0.0.pre.alpha → 1.0.0.pre.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mapexplorer/rails/version.rb +1 -1
- data/vendor/assets/babel-polyfill/README.md +0 -0
- data/vendor/assets/babel-polyfill/bower.json +22 -0
- data/vendor/assets/babel-polyfill/browser-polyfill.js +5 -0
- data/vendor/assets/d3/LICENSE +27 -0
- data/vendor/assets/d3/README.md +45 -0
- data/vendor/assets/d3/bower.json +7 -0
- data/vendor/assets/d3/d3.js +16383 -0
- data/vendor/assets/d3/d3.min.js +8 -0
- data/vendor/assets/jsrender/MIT-LICENSE.txt +20 -0
- data/vendor/assets/jsrender/bower.json +43 -0
- data/vendor/assets/jsrender/index.js +8 -0
- data/vendor/assets/jsrender/jsrender-node.js +2298 -0
- data/vendor/assets/jsrender/jsrender.js +2350 -0
- data/vendor/assets/jsrender/jsrender.min.js +4 -0
- data/vendor/assets/jsrender/jsrender.min.js.map +1 -0
- data/vendor/assets/jsrender/tmplify/index.js +64 -0
- data/vendor/assets/mapexplorer-core/LICENSE +21 -0
- data/vendor/assets/mapexplorer-core/README.md +235 -0
- data/vendor/assets/mapexplorer-core/assets/stylesheets/map.scss +38 -0
- data/vendor/assets/mapexplorer-core/assets/stylesheets/mapexplorer-core.scss +3 -0
- data/vendor/assets/mapexplorer-core/assets/stylesheets/merkle-path.scss +10 -0
- data/vendor/assets/mapexplorer-core/assets/stylesheets/variables.scss +14 -0
- data/vendor/assets/mapexplorer-core/bower.json +32 -0
- data/vendor/assets/mapexplorer-core/dist/mapexplorer-core.js +3872 -0
- data/vendor/assets/mapexplorer-core/dist/mapexplorer-core.js.map +1 -0
- data/vendor/assets/mapexplorer-core/dist/mapexplorer-core.min.js +35 -0
- data/vendor/assets/mapexplorer-core/karma.conf.js +117 -0
- data/vendor/assets/mapexplorer-core/package.json +85 -0
- data/vendor/assets/mapexplorer-core/rollup.bower.config.js +41 -0
- data/vendor/assets/mapexplorer-core/rollup.es.config.js +16 -0
- data/vendor/assets/mapexplorer-core/rollup.umd.config.js +25 -0
- data/vendor/assets/stratumn-sdk/LICENSE +21 -0
- data/vendor/assets/stratumn-sdk/README.md +267 -0
- data/vendor/assets/stratumn-sdk/bower.json +27 -0
- data/vendor/assets/stratumn-sdk/dist/stratumn-sdk.js +813 -0
- data/vendor/assets/stratumn-sdk/dist/stratumn-sdk.js.map +1 -0
- data/vendor/assets/stratumn-sdk/dist/stratumn-sdk.min.js +2 -0
- data/vendor/assets/stratumn-sdk/dist/stratumn-sdk.min.js.map +1 -0
- data/vendor/assets/stratumn-sdk/examples/browser/index.html +34 -0
- data/vendor/assets/stratumn-sdk/package.json +67 -0
- data/vendor/assets/stratumn-sdk/rollup.base.config.js +13 -0
- data/vendor/assets/stratumn-sdk/rollup.bower.config.js +18 -0
- data/vendor/assets/stratumn-sdk/rollup.bower.min.config.js +7 -0
- data/vendor/assets/stratumn-sdk/rollup.es.config.js +9 -0
- data/vendor/assets/stratumn-sdk/rollup.umd.config.js +10 -0
- metadata +46 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":null,"sources":["../src/deprecated.js","../src/makeQueryString.js","../node_modules/httpplease/plugins/jsonrequest.js","../node_modules/httpplease/plugins/jsonresponse.js","../node_modules/httpplease/plugins/json.js","../node_modules/httpplease/plugins/cleanurl.js","../node_modules/httpplease/lib/xhr-browser.js","../node_modules/httpplease/lib/utils/delay.js","../node_modules/httpplease/lib/request.js","../node_modules/xtend/index.js","../node_modules/httpplease/lib/utils/extractResponseProps.js","../node_modules/httpplease/lib/response.js","../node_modules/httpplease/lib/error.js","../node_modules/httpplease/lib/utils/once.js","../node_modules/httpplease/lib/index.js","../src/request.js","../src/findSegments.js","../src/getBranches.js","../src/segmentify.js","../src/createMap.js","../src/getSegment.js","../src/getMapIds.js","../src/getLink.js","../src/getMap.js","../src/getAgent.js","../src/fromSegment.js","../src/config.js","../src/getApplication.js","../src/loadLink.js"],"sourcesContent":["export default function deprecated(oldFunc, newFunc) {\n if (!newFunc) {\n console.warn(`WARNING: ${oldFunc} is deprecated.`);\n } else {\n console.warn(`WARNING: ${oldFunc} is deprecated. Please use ${newFunc} instead.`);\n }\n}\n","/**\n * Makes a query string.\n * @param {object} obj - an object of keys\n * @returns {string} a query string\n */\nexport default function makeQueryString(obj) {\n const parts = Object.keys(obj).reduce((curr, key) => {\n const val = Array.isArray(obj[key]) ? obj[key].join('+') : obj[key];\n curr.push(`${encodeURIComponent(key)}=${encodeURIComponent(val)}`);\n return curr;\n }, []);\n\n if (parts.length) {\n return `?${parts.join('&')}`;\n }\n\n return '';\n}\n","'use strict';\n\nmodule.exports = {\n processRequest: function(req) {\n var\n contentType = req.header('Content-Type'),\n hasJsonContentType = contentType &&\n contentType.indexOf('application/json') !== -1;\n\n if (contentType != null && !hasJsonContentType) {\n return;\n }\n\n if (req.body) {\n if (!contentType) {\n req.header('Content-Type', 'application/json');\n }\n\n req.body = JSON.stringify(req.body);\n }\n }\n};\n","'use strict';\n\nmodule.exports = {\n processRequest: function(req) {\n var accept = req.header('Accept');\n if (accept == null) {\n req.header('Accept', 'application/json');\n }\n },\n processResponse: function(res) {\n // Check to see if the contentype is \"something/json\" or\n // \"something/somethingelse+json\"\n if (res.contentType && /^.*\\/(?:.*\\+)?json(;|$)/i.test(res.contentType)) {\n var raw = typeof res.body === 'string' ? res.body : res.text;\n if (raw) {\n res.body = JSON.parse(raw);\n }\n }\n }\n};\n","'use strict';\n\nvar jsonrequest = require('./jsonrequest'),\n jsonresponse = require('./jsonresponse');\n\nmodule.exports = {\n processRequest: function(req) {\n jsonrequest.processRequest.call(this, req);\n jsonresponse.processRequest.call(this, req);\n },\n processResponse: function(res) {\n jsonresponse.processResponse.call(this, res);\n }\n};\n","'use strict';\n\nmodule.exports = {\n processRequest: function(req) {\n req.url = req.url.replace(/[^%]+/g, function(s) {\n return encodeURI(s);\n });\n }\n};\n","module.exports = window.XMLHttpRequest;\n","'use strict';\n\n// Wrap a function in a `setTimeout` call. This is used to guarantee async\n// behavior, which can avoid unexpected errors.\n\nmodule.exports = function(fn) {\n return function() {\n var\n args = Array.prototype.slice.call(arguments, 0),\n newFunc = function() {\n return fn.apply(null, args);\n };\n setTimeout(newFunc, 0);\n };\n};\n","'use strict';\n\nfunction Request(optsOrUrl) {\n var opts = typeof optsOrUrl === 'string' ? {url: optsOrUrl} : optsOrUrl || {};\n this.method = opts.method ? opts.method.toUpperCase() : 'GET';\n this.url = opts.url;\n this.headers = opts.headers || {};\n this.body = opts.body;\n this.timeout = opts.timeout || 0;\n this.errorOn404 = opts.errorOn404 != null ? opts.errorOn404 : true;\n this.onload = opts.onload;\n this.onerror = opts.onerror;\n}\n\nRequest.prototype.abort = function() {\n if (this.aborted) return;\n this.aborted = true;\n this.xhr.abort();\n return this;\n};\n\nRequest.prototype.header = function(name, value) {\n var k;\n for (k in this.headers) {\n if (this.headers.hasOwnProperty(k)) {\n if (name.toLowerCase() === k.toLowerCase()) {\n if (arguments.length === 1) {\n return this.headers[k];\n }\n\n delete this.headers[k];\n break;\n }\n }\n }\n if (value != null) {\n this.headers[name] = value;\n return value;\n }\n};\n\n\nmodule.exports = Request;\n","module.exports = extend\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","'use strict';\n\nvar extend = require('xtend');\n\nmodule.exports = function(req) {\n var xhr = req.xhr;\n var props = {request: req, xhr: xhr};\n\n // Try to create the response from the request. If the request was aborted,\n // accesssing properties of the XHR may throw an error, so we wrap in a\n // try/catch.\n try {\n var lines, i, m, headers = {};\n if (xhr.getAllResponseHeaders) {\n lines = xhr.getAllResponseHeaders().split('\\n');\n for (i = 0; i < lines.length; i++) {\n if ((m = lines[i].match(/\\s*([^\\s]+):\\s+([^\\s]+)/))) {\n headers[m[1]] = m[2];\n }\n }\n }\n\n props = extend(props, {\n status: xhr.status,\n contentType: xhr.contentType || (xhr.getResponseHeader && xhr.getResponseHeader('Content-Type')),\n headers: headers,\n text: xhr.responseText,\n body: xhr.response || xhr.responseText\n });\n } catch (err) {}\n\n return props;\n};\n","'use strict';\n\nvar Request = require('./request');\nvar extractResponseProps = require('./utils/extractResponseProps');\n\nfunction Response(props) {\n this.request = props.request;\n this.xhr = props.xhr;\n this.headers = props.headers || {};\n this.status = props.status || 0;\n this.text = props.text;\n this.body = props.body;\n this.contentType = props.contentType;\n this.isHttpError = props.status >= 400;\n}\n\nResponse.prototype.header = Request.prototype.header;\n\nResponse.fromRequest = function(req) {\n return new Response(extractResponseProps(req));\n};\n\n\nmodule.exports = Response;\n","'use strict';\n\nvar Response = require('./response');\nvar extractResponseProps = require('./utils/extractResponseProps');\nvar extend = require('xtend');\n\nfunction RequestError(message, props) {\n var err = new Error(message);\n err.name = 'RequestError';\n this.name = err.name;\n this.message = err.message;\n if (err.stack) {\n this.stack = err.stack;\n }\n\n this.toString = function() {\n return this.message;\n };\n\n for (var k in props) {\n if (props.hasOwnProperty(k)) {\n this[k] = props[k];\n }\n }\n}\n\nRequestError.prototype = extend(Error.prototype);\nRequestError.prototype.constructor = RequestError;\n\nRequestError.create = function(message, req, props) {\n var err = new RequestError(message, props);\n Response.call(err, extractResponseProps(req));\n return err;\n};\n\nmodule.exports = RequestError;\n","'use strict';\n\n// A \"once\" utility.\nmodule.exports = function(fn) {\n var result, called = false;\n return function() {\n if (!called) {\n called = true;\n result = fn.apply(this, arguments);\n }\n return result;\n };\n};\n","'use strict';\n\nvar\n cleanURL = require('../plugins/cleanurl'),\n XHR = require('./xhr'),\n delay = require('./utils/delay'),\n RequestError = require('./error'),\n Response = require('./response'),\n Request = require('./request'),\n extend = require('xtend'),\n once = require('./utils/once');\n\nvar i,\n createError = RequestError.create;\n\nfunction factory(defaults, plugins) {\n defaults = defaults || {};\n plugins = plugins || [];\n\n function http(req, cb) {\n var xhr, plugin, done, k, timeoutId, supportsLoadAndErrorEvents;\n\n req = new Request(extend(defaults, req));\n\n for (i = 0; i < plugins.length; i++) {\n plugin = plugins[i];\n if (plugin.processRequest) {\n plugin.processRequest(req);\n }\n }\n\n // Give the plugins a chance to create the XHR object\n for (i = 0; i < plugins.length; i++) {\n plugin = plugins[i];\n if (plugin.createXHR) {\n xhr = plugin.createXHR(req);\n break; // First come, first serve\n }\n }\n xhr = xhr || new XHR();\n\n req.xhr = xhr;\n\n // Use a single completion callback. This can be called with or without\n // an error. If no error is passed, the request will be examined to see\n // if it was successful.\n done = once(delay(function(rawError) {\n clearTimeout(timeoutId);\n xhr.onload = xhr.onerror = xhr.onabort = xhr.onreadystatechange = xhr.ontimeout = xhr.onprogress = null;\n\n var err = getError(req, rawError);\n\n var res = err || Response.fromRequest(req);\n for (i = 0; i < plugins.length; i++) {\n plugin = plugins[i];\n if (plugin.processResponse) {\n plugin.processResponse(res);\n }\n }\n\n // Invoke callbacks\n if (err && req.onerror) req.onerror(err);\n if (!err && req.onload) req.onload(res);\n if (cb) cb(err, err ? undefined : res);\n\n }));\n\n supportsLoadAndErrorEvents = ('onload' in xhr) && ('onerror' in xhr);\n xhr.onload = function() { done(); };\n xhr.onerror = done;\n xhr.onabort = function() { done(); };\n\n // We'd rather use `onload`, `onerror`, and `onabort` since they're the\n // only way to reliably detect successes and failures but, if they\n // aren't available, we fall back to using `onreadystatechange`.\n xhr.onreadystatechange = function() {\n if (xhr.readyState !== 4) return;\n\n if (req.aborted) return done();\n\n if (!supportsLoadAndErrorEvents) {\n // Assume a status of 0 is an error. This could be a false\n // positive, but there's no way to tell when using\n // `onreadystatechange` ):\n // See matthewwithanm/react-inlinesvg#10.\n\n // Some browsers don't like you reading XHR properties when the\n // XHR has been aborted. In case we've gotten here as a result\n // of that (either our calling `about()` in the timeout handler\n // or the user calling it directly even though they shouldn't),\n // be careful about accessing it.\n var status;\n try {\n status = xhr.status;\n } catch (err) {}\n var err = status === 0 ? new Error('Internal XHR Error') : null;\n return done(err);\n }\n };\n\n // IE sometimes fails if you don't specify every handler.\n // See http://social.msdn.microsoft.com/Forums/ie/en-US/30ef3add-767c-4436-b8a9-f1ca19b4812e/ie9-rtm-xdomainrequest-issued-requests-may-abort-if-all-event-handlers-not-specified?forum=iewebdevelopment\n xhr.ontimeout = function() { /* noop */ };\n xhr.onprogress = function() { /* noop */ };\n\n xhr.open(req.method, req.url);\n\n if (req.timeout) {\n // If we use the normal XHR timeout mechanism (`xhr.timeout` and\n // `xhr.ontimeout`), `onreadystatechange` will be triggered before\n // `ontimeout`. There's no way to recognize that it was triggered by\n // a timeout, and we'd be unable to dispatch the right error.\n timeoutId = setTimeout(function() {\n req.timedOut = true;\n done();\n try {\n xhr.abort();\n } catch (err) {}\n }, req.timeout);\n }\n\n for (k in req.headers) {\n if (req.headers.hasOwnProperty(k)) {\n xhr.setRequestHeader(k, req.headers[k]);\n }\n }\n\n xhr.send(req.body);\n\n return req;\n }\n\n var method,\n methods = ['get', 'post', 'put', 'head', 'patch', 'delete'],\n verb = function(method) {\n return function(req, cb) {\n req = new Request(req);\n req.method = method;\n return http(req, cb);\n };\n };\n for (i = 0; i < methods.length; i++) {\n method = methods[i];\n http[method] = verb(method);\n }\n\n http.plugins = function() {\n return plugins;\n };\n\n http.defaults = function(newValues) {\n if (newValues) {\n return factory(extend(defaults, newValues), plugins);\n }\n return defaults;\n };\n\n http.use = function() {\n var newPlugins = Array.prototype.slice.call(arguments, 0);\n return factory(defaults, plugins.concat(newPlugins));\n };\n\n http.bare = function() {\n return factory();\n };\n\n http.Request = Request;\n http.Response = Response;\n http.RequestError = RequestError;\n\n return http;\n}\n\nmodule.exports = factory({}, [cleanURL]);\n\n/**\n * Analyze the request to see if it represents an error. If so, return it! An\n * original error object can be passed as a hint.\n */\nfunction getError(req, err) {\n if (req.aborted) return createError('Request aborted', req, {name: 'Abort'});\n\n if (req.timedOut) return createError('Request timeout', req, {name: 'Timeout'});\n\n var xhr = req.xhr;\n var type = Math.floor(xhr.status / 100);\n\n var kind;\n switch (type) {\n case 0:\n case 2:\n // These don't represent errors unless the function was passed an\n // error object explicitly.\n if (!err) return;\n return createError(err.message, req);\n case 4:\n // Sometimes 4XX statuses aren't errors.\n if (xhr.status === 404 && !req.errorOn404) return;\n kind = 'Client';\n break;\n case 5:\n kind = 'Server';\n break;\n default:\n kind = 'HTTP';\n }\n var msg = kind + ' Error: ' +\n 'The server returned a status of ' + xhr.status +\n ' for the request \"' +\n req.method.toUpperCase() + ' ' + req.url + '\"';\n return createError(msg, req);\n}\n","import json from 'httpplease/plugins/json';\nimport httpplease from 'httpplease';\n\nconst request = httpplease.use(json);\n\nfunction send(method, url, args) {\n return new Promise((resolve, reject) => {\n request({ method, url, body: args }, (err, res) => {\n if (err) {\n const error = (err && err.body && err.body.meta && err.body.meta.errorMessage)\n ? new Error(err.body.meta.errorMessage)\n : err;\n error.status = err.status;\n reject(error);\n } else {\n resolve(res);\n }\n });\n });\n}\n\nexport function get(url) {\n return send('GET', url);\n}\n\nexport function post(url, args) {\n return send('POST', url, args);\n}\n","import segmentify from './segmentify';\nimport makeQueryString from './makeQueryString';\nimport { get } from './request';\n\nexport default function findSegments(agent, opts = {}) {\n return get(`${agent.url}/segments${makeQueryString(opts)}`)\n .then(res => res.body.map(obj => segmentify(agent, obj)));\n}\n","import findSegments from './findSegments';\nimport deprecated from './deprecated';\n\nexport default function getBranches(agent, prevLinkHash, tags = []) {\n deprecated(\n 'Agent#getBranches(agent, prevLinkHash, tags = [])',\n 'Agent#findSegments(agent, filter)'\n );\n\n return findSegments(agent, { prevLinkHash, tags });\n}\n","import deprecated from './deprecated';\nimport getBranches from './getBranches';\nimport { post } from './request';\n\nexport default function segmentify(agent, obj) {\n Object\n .keys(agent.agentInfo.actions)\n .filter(key => ['init'].indexOf(key) < 0)\n .forEach(key => {\n /*eslint-disable*/\n obj[key] = (...args) =>\n post(`${agent.url}/segments/${obj.meta.linkHash}/${key}`, args)\n .then(res => segmentify(agent, res.body))\n });\n\n /*eslint-disable*/\n obj.getPrev = () => {\n /*eslint-enable*/\n if (obj.link.meta.prevLinkHash) {\n return agent.getSegment(obj.link.meta.prevLinkHash);\n }\n\n return Promise.resolve(null);\n };\n\n // Deprecated.\n /*eslint-disable*/\n obj.load = () => {\n /*eslint-enable*/\n deprecated('segment#load()');\n return Promise.resolve(segmentify(agent, {\n link: JSON.parse(JSON.stringify(obj.link)),\n meta: JSON.parse(JSON.stringify(obj.meta))\n }));\n };\n\n // Deprecated.\n /*eslint-disable*/\n obj.getBranches = (...args) => {\n /*eslint-enable*/\n return getBranches(agent, obj.meta.linkHash, ...args);\n };\n\n return obj;\n}\n","import segmentify from './segmentify';\nimport { post } from './request';\n\nexport default function createMap(agent, ...args) {\n return post(`${agent.url}/segments`, args)\n .then(res => segmentify(agent, res.body));\n}\n","import segmentify from './segmentify';\nimport { get } from './request';\n\nexport default function getSegment(agent, linkHash) {\n return get(`${agent.url}/segments/${linkHash}`)\n .then(res => segmentify(agent, res.body));\n}\n","import makeQueryString from './makeQueryString';\nimport { get } from './request';\n\nexport default function getMapIds(agent, opts = {}) {\n return get(`${agent.url}/maps${makeQueryString(opts)}`)\n .then(res => res.body);\n}\n","import getSegment from './getSegment';\nimport deprecated from './deprecated';\n\nexport default function getLink(agent, hash) {\n deprecated('Agent#getLink(agent, hash)', 'Agent#getSegment(agent, hash)');\n\n return getSegment(agent, hash);\n}\n","import findSegments from './findSegments';\nimport deprecated from './deprecated';\n\nexport default function getMap(agent, mapId, tags = []) {\n deprecated('getMap(agent, mapId, tags = [])', 'findSegments(agent, filter)');\n\n return findSegments(agent, { mapId, tags });\n}\n","import createMap from './createMap';\nimport getSegment from './getSegment';\nimport findSegments from './findSegments';\nimport getMapIds from './getMapIds';\nimport { get } from './request';\n\n// Deprecated.\nimport getBranches from './getBranches';\nimport getLink from './getLink';\nimport getMap from './getMap';\n\nexport default function getAgent(url) {\n return get(url)\n .then(res => {\n const agent = res.body;\n\n agent.url = url;\n agent.createMap = createMap.bind(null, agent);\n agent.getSegment = getSegment.bind(null, agent);\n agent.findSegments = findSegments.bind(null, agent);\n agent.getMapIds = getMapIds.bind(null, agent);\n\n // Deprecated.\n agent.getBranches = getBranches.bind(null, agent);\n agent.getLink = getLink.bind(null, agent);\n agent.getMap = getMap.bind(null, agent);\n\n return agent;\n });\n}\n","import getAgent from './getAgent';\nimport segmentify from './segmentify';\n\nexport default function fromSegment(obj) {\n return getAgent(obj.meta.agentUrl || obj.meta.applicationLocation)\n .then(agent => {\n const segment = segmentify(agent, obj);\n return { agent, segment };\n });\n}\n","// Deprecated.\nexport default {\n applicationUrl: 'https://%s.stratumn.rocks'\n};\n","import getAgent from './getAgent';\nimport deprecated from './deprecated';\nimport config from './config';\n\nexport default function getApplication(name, url) {\n deprecated('getApplication(name, url)', 'getAgent(url)');\n\n return getAgent(url || config.applicationUrl.replace('%s', name));\n}\n","import fromSegment from './fromSegment';\nimport deprecated from './deprecated';\n\nexport default function loadLink(obj) {\n deprecated('loadLink(obj)', 'fromSegment(obj)');\n\n return fromSegment(obj)\n .then(({ segment }) => segment);\n}\n"],"names":["deprecated","oldFunc","newFunc","warn","makeQueryString","obj","parts","Object","keys","reduce","curr","key","val","Array","isArray","join","push","encodeURIComponent","length","commonjsHelpers.interopDefault","request","httpplease","use","json","send","method","url","args","Promise","resolve","reject","body","err","res","error","meta","errorMessage","Error","status","get","post","findSegments","agent","opts","then","map","segmentify","getBranches","prevLinkHash","tags","agentInfo","actions","filter","indexOf","forEach","linkHash","getPrev","link","getSegment","load","JSON","parse","stringify","createMap","getMapIds","getLink","hash","getMap","mapId","getAgent","bind","fromSegment","agentUrl","applicationLocation","segment","getApplication","name","config","applicationUrl","replace","loadLink"],"mappings":";;;;;;AAAe,SAASA,UAAT,CAAoBC,OAApB,EAA6BC,OAA7B,EAAsC;MAC/C,CAACA,OAAL,EAAc;YACJC,IAAR,eAAyBF,OAAzB;GADF,MAEO;YACGE,IAAR,eAAyBF,OAAzB,mCAA8DC,OAA9D;;;;ACJJ;;;;;AAKA,AAAe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AxB,CAArB;UACMsB,SAAN,GAAkBA,UAAUM,IAAV,CAAe,IAAf,EAAqB5B,KAArB,CAAlB;;;UAGMK,WAAN,GAAoBA,YAAYuB,IAAZ,CAAiB,IAAjB,EAAuB5B,KAAvB,CAApB;UACMuB,OAAN,GAAgBA,QAAQK,IAAR,CAAa,IAAb,EAAmB5B,KAAnB,CAAhB;UACMyB,MAAN,GAAeA,OAAOG,IAAP,CAAY,IAAZ,EAAkB5B,KAAlB,CAAf;;WAEOA,KAAP;GAfG,CAAP;;;ACTa,SAAS6B,WAAT,CAAqBlE,GAArB,EAA0B;SAChCgE,SAAShE,IAAI8B,IAAJ,CAASqC,QAAT,IAAqBnE,IAAI8B,IAAJ,CAASsC,mBAAvC,EACJ7B,IADI,CACC,iBAAS;QACP8B,UAAU5B,WAAWJ,KAAX,EAAkBrC,GAAlB,CAAhB;WACO,EAAEqC,YAAF,EAASgC,gBAAT,EAAP;GAHG,CAAP;;;ACJF;AACA,aAAe;kBACG;CADlB;;ACGe,SAASC,cAAT,CAAwBC,IAAxB,EAA8BlD,GAA9B,EAAmC;aACrC,2BAAX,EAAwC,eAAxC;;SAEO2C,SAAS3C,OAAOmD,OAAOC,cAAP,CAAsBC,OAAtB,CAA8B,IAA9B,EAAoCH,IAApC,CAAhB,CAAP;;;ACJa,SAASI,QAAT,CAAkB3E,GAAlB,EAAuB;aACzB,eAAX,EAA4B,kBAA5B;;SAEOkE,YAAYlE,GAAZ,EACJuC,IADI,CACC;QAAG8B,OAAH,QAAGA,OAAH;WAAiBA,OAAjB;GADD,CAAP;;;;;;;;;;;"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.StratumnSDK=e.StratumnSDK||{})}(this,function(e){"use strict";function t(e,t){t?console.warn("WARNING: "+e+" is deprecated. Please use "+t+" instead."):console.warn("WARNING: "+e+" is deprecated.")}function n(e){var t=Object.keys(e).reduce(function(t,n){var r=Array.isArray(e[n])?e[n].join("+"):e[n];return t.push(encodeURIComponent(n)+"="+encodeURIComponent(r)),t},[]);return t.length?"?"+t.join("&"):""}function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}function o(e,t){return t={exports:{}},e(t,t.exports),t.exports}function s(e,t,n){return new Promise(function(r,o){ae({method:e,url:t,body:n},function(e,t){if(e){var n=e&&e.body&&e.body.meta&&e.body.meta.errorMessage?new Error(e.body.meta.errorMessage):e;n.status=e.status,o(n)}else r(t)})})}function u(e){return s("GET",e)}function a(e,t){return s("POST",e,t)}function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return u(e.url+"/segments"+n(t)).then(function(t){return t.body.map(function(t){return f(e,t)})})}function c(e,n){var r=arguments.length<=2||void 0===arguments[2]?[]:arguments[2];return t("Agent#getBranches(agent, prevLinkHash, tags = [])","Agent#findSegments(agent, filter)"),i(e,{prevLinkHash:n,tags:r})}function f(e,n){return Object.keys(e.agentInfo.actions).filter(function(e){return["init"].indexOf(e)<0}).forEach(function(t){n[t]=function(){for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return a(e.url+"/segments/"+n.meta.linkHash+"/"+t,o).then(function(t){return f(e,t.body)})}}),n.getPrev=function(){return n.link.meta.prevLinkHash?e.getSegment(n.link.meta.prevLinkHash):Promise.resolve(null)},n.load=function(){return t("segment#load()"),Promise.resolve(f(e,{link:JSON.parse(JSON.stringify(n.link)),meta:JSON.parse(JSON.stringify(n.meta))}))},n.getBranches=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return c.apply(void 0,[e,n.meta.linkHash].concat(r))},n}function p(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return a(e.url+"/segments",n).then(function(t){return f(e,t.body)})}function l(e,t){return u(e.url+"/segments/"+t).then(function(t){return f(e,t.body)})}function d(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return u(e.url+"/maps"+n(t)).then(function(e){return e.body})}function h(e,n){return t("Agent#getLink(agent, hash)","Agent#getSegment(agent, hash)"),l(e,n)}function g(e,n){var r=arguments.length<=2||void 0===arguments[2]?[]:arguments[2];return t("getMap(agent, mapId, tags = [])","findSegments(agent, filter)"),i(e,{mapId:n,tags:r})}function m(e){return u(e).then(function(t){var n=t.body;return n.url=e,n.createMap=p.bind(null,n),n.getSegment=l.bind(null,n),n.findSegments=i.bind(null,n),n.getMapIds=d.bind(null,n),n.getBranches=c.bind(null,n),n.getLink=h.bind(null,n),n.getMap=g.bind(null,n),n})}function y(e){return m(e.meta.agentUrl||e.meta.applicationLocation).then(function(t){var n=f(t,e);return{agent:t,segment:n}})}function b(e,n){return t("getApplication(name, url)","getAgent(url)"),m(n||ie.applicationUrl.replace("%s",e))}function v(e){return t("loadLink(obj)","fromSegment(obj)"),y(e).then(function(e){var t=e.segment;return t})}var R=o(function(e){e.exports={processRequest:function(e){var t=e.header("Content-Type"),n=t&&t.indexOf("application/json")!==-1;(null==t||n)&&e.body&&(t||e.header("Content-Type","application/json"),e.body=JSON.stringify(e.body))}}}),x=r(R),O=R.processRequest,q=Object.freeze({default:x,processRequest:O}),j=o(function(e){e.exports={processRequest:function(e){var t=e.header("Accept");null==t&&e.header("Accept","application/json")},processResponse:function(e){if(e.contentType&&/^.*\/(?:.*\+)?json(;|$)/i.test(e.contentType)){var t="string"==typeof e.body?e.body:e.text;t&&(e.body=JSON.parse(t))}}}}),k=r(j),A=j.processRequest,S=j.processResponse,T=Object.freeze({default:k,processRequest:A,processResponse:S}),w=o(function(e){var t=r(q),n=r(T);e.exports={processRequest:function(e){t.processRequest.call(this,e),n.processRequest.call(this,e)},processResponse:function(e){n.processResponse.call(this,e)}}}),H=r(w),E=o(function(e){e.exports={processRequest:function(e){e.url=e.url.replace(/[^%]+/g,function(e){return encodeURI(e)})}}}),L=r(E),P=E.processRequest,z=Object.freeze({default:L,processRequest:P}),C=o(function(e){e.exports=window.XMLHttpRequest}),I=r(C),N=Object.freeze({default:I}),M=o(function(e){e.exports=function(e){return function(){var t=Array.prototype.slice.call(arguments,0),n=function(){return e.apply(null,t)};setTimeout(n,0)}}}),U=r(M),J=Object.freeze({default:U}),G=o(function(e){function t(e){var t="string"==typeof e?{url:e}:e||{};this.method=t.method?t.method.toUpperCase():"GET",this.url=t.url,this.headers=t.headers||{},this.body=t.body,this.timeout=t.timeout||0,this.errorOn404=null==t.errorOn404||t.errorOn404,this.onload=t.onload,this.onerror=t.onerror}t.prototype.abort=function(){if(!this.aborted)return this.aborted=!0,this.xhr.abort(),this},t.prototype.header=function(e,t){var n;for(n in this.headers)if(this.headers.hasOwnProperty(n)&&e.toLowerCase()===n.toLowerCase()){if(1===arguments.length)return this.headers[n];delete this.headers[n];break}if(null!=t)return this.headers[e]=t,t},e.exports=t}),X=r(G),B=Object.freeze({default:X}),D=o(function(e){function t(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}e.exports=t}),K=r(D),W=Object.freeze({default:K}),_=o(function(e){var t=r(W);e.exports=function(e){var n=e.xhr,r={request:e,xhr:n};try{var o,s,u,a={};if(n.getAllResponseHeaders)for(o=n.getAllResponseHeaders().split("\n"),s=0;s<o.length;s++)(u=o[s].match(/\s*([^\s]+):\s+([^\s]+)/))&&(a[u[1]]=u[2]);r=t(r,{status:n.status,contentType:n.contentType||n.getResponseHeader&&n.getResponseHeader("Content-Type"),headers:a,text:n.responseText,body:n.response||n.responseText})}catch(e){}return r}}),$=r(_),F=Object.freeze({default:$}),Q=o(function(e){function t(e){this.request=e.request,this.xhr=e.xhr,this.headers=e.headers||{},this.status=e.status||0,this.text=e.text,this.body=e.body,this.contentType=e.contentType,this.isHttpError=e.status>=400}var n=r(B),o=r(F);t.prototype.header=n.prototype.header,t.fromRequest=function(e){return new t(o(e))},e.exports=t}),V=r(Q),Y=Object.freeze({default:V}),Z=o(function(e){function t(e,t){var n=new Error(e);n.name="RequestError",this.name=n.name,this.message=n.message,n.stack&&(this.stack=n.stack),this.toString=function(){return this.message};for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r])}var n=r(Y),o=r(F),s=r(W);t.prototype=s(Error.prototype),t.prototype.constructor=t,t.create=function(e,r,s){var u=new t(e,s);return n.call(u,o(r)),u},e.exports=t}),ee=r(Z),te=Object.freeze({default:ee}),ne=o(function(e){e.exports=function(e){var t,n=!1;return function(){return n||(n=!0,t=e.apply(this,arguments)),t}}}),re=r(ne),oe=Object.freeze({default:re}),se=o(function(e){function t(e,r){function s(t,s){var i,d,h,g,m,y;for(t=new f(p(e,t)),o=0;o<r.length;o++)d=r[o],d.processRequest&&d.processRequest(t);for(o=0;o<r.length;o++)if(d=r[o],d.createXHR){i=d.createXHR(t);break}i=i||new u,t.xhr=i,h=l(a(function(e){clearTimeout(m),i.onload=i.onerror=i.onabort=i.onreadystatechange=i.ontimeout=i.onprogress=null;var u=n(t,e),a=u||c.fromRequest(t);for(o=0;o<r.length;o++)d=r[o],d.processResponse&&d.processResponse(a);u&&t.onerror&&t.onerror(u),!u&&t.onload&&t.onload(a),s&&s(u,u?void 0:a)})),y="onload"in i&&"onerror"in i,i.onload=function(){h()},i.onerror=h,i.onabort=function(){h()},i.onreadystatechange=function(){if(4===i.readyState){if(t.aborted)return h();if(!y){var e;try{e=i.status}catch(e){}var n=0===e?new Error("Internal XHR Error"):null;return h(n)}}},i.ontimeout=function(){},i.onprogress=function(){},i.open(t.method,t.url),t.timeout&&(m=setTimeout(function(){t.timedOut=!0,h();try{i.abort()}catch(e){}},t.timeout));for(g in t.headers)t.headers.hasOwnProperty(g)&&i.setRequestHeader(g,t.headers[g]);return i.send(t.body),t}e=e||{},r=r||[];var d,h=["get","post","put","head","patch","delete"],g=function(e){return function(t,n){return t=new f(t),t.method=e,s(t,n)}};for(o=0;o<h.length;o++)d=h[o],s[d]=g(d);return s.plugins=function(){return r},s.defaults=function(n){return n?t(p(e,n),r):e},s.use=function(){var n=Array.prototype.slice.call(arguments,0);return t(e,r.concat(n))},s.bare=function(){return t()},s.Request=f,s.Response=c,s.RequestError=i,s}function n(e,t){if(e.aborted)return d("Request aborted",e,{name:"Abort"});if(e.timedOut)return d("Request timeout",e,{name:"Timeout"});var n,r=e.xhr,o=Math.floor(r.status/100);switch(o){case 0:case 2:if(!t)return;return d(t.message,e);case 4:if(404===r.status&&!e.errorOn404)return;n="Client";break;case 5:n="Server";break;default:n="HTTP"}var s=n+" Error: The server returned a status of "+r.status+' for the request "'+e.method.toUpperCase()+" "+e.url+'"';return d(s,e)}var o,s=r(z),u=r(N),a=r(J),i=r(te),c=r(Y),f=r(B),p=r(W),l=r(oe),d=i.create;e.exports=t({},[s])}),ue=r(se),ae=ue.use(H),ie={applicationUrl:"https://%s.stratumn.rocks"};e.getAgent=m,e.fromSegment=y,e.getApplication=b,e.loadLink=v,e.config=ie,Object.defineProperty(e,"__esModule",{value:!0})});
|
2
|
+
//# sourceMappingURL=stratumn-sdk.min.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":null,"sources":["../src/deprecated.js","../src/makeQueryString.js","../src/request.js","../src/findSegments.js","../src/getBranches.js","../src/segmentify.js","../src/createMap.js","../src/getSegment.js","../src/getMapIds.js","../src/getLink.js","../src/getMap.js","../src/getAgent.js","../src/fromSegment.js","../src/getApplication.js","../src/loadLink.js","../node_modules/httpplease/plugins/jsonrequest.js","../node_modules/httpplease/plugins/jsonresponse.js","../node_modules/httpplease/plugins/json.js","../node_modules/httpplease/plugins/cleanurl.js","../node_modules/httpplease/lib/xhr-browser.js","../node_modules/httpplease/lib/utils/delay.js","../node_modules/httpplease/lib/request.js","../node_modules/xtend/index.js","../node_modules/httpplease/lib/utils/extractResponseProps.js","../node_modules/httpplease/lib/response.js","../node_modules/httpplease/lib/error.js","../node_modules/httpplease/lib/utils/once.js","../node_modules/httpplease/lib/index.js","../src/config.js"],"sourcesContent":["export default function deprecated(oldFunc, newFunc) {\n if (!newFunc) {\n console.warn(`WARNING: ${oldFunc} is deprecated.`);\n } else {\n console.warn(`WARNING: ${oldFunc} is deprecated. Please use ${newFunc} instead.`);\n }\n}\n","/**\n * Makes a query string.\n * @param {object} obj - an object of keys\n * @returns {string} a query string\n */\nexport default function makeQueryString(obj) {\n const parts = Object.keys(obj).reduce((curr, key) => {\n const val = Array.isArray(obj[key]) ? obj[key].join('+') : obj[key];\n curr.push(`${encodeURIComponent(key)}=${encodeURIComponent(val)}`);\n return curr;\n }, []);\n\n if (parts.length) {\n return `?${parts.join('&')}`;\n }\n\n return '';\n}\n","import json from 'httpplease/plugins/json';\nimport httpplease from 'httpplease';\n\nconst request = httpplease.use(json);\n\nfunction send(method, url, args) {\n return new Promise((resolve, reject) => {\n request({ method, url, body: args }, (err, res) => {\n if (err) {\n const error = (err && err.body && err.body.meta && err.body.meta.errorMessage)\n ? new Error(err.body.meta.errorMessage)\n : err;\n error.status = err.status;\n reject(error);\n } else {\n resolve(res);\n }\n });\n });\n}\n\nexport function get(url) {\n return send('GET', url);\n}\n\nexport function post(url, args) {\n return send('POST', url, args);\n}\n","import segmentify from './segmentify';\nimport makeQueryString from './makeQueryString';\nimport { get } from './request';\n\nexport default function findSegments(agent, opts = {}) {\n return get(`${agent.url}/segments${makeQueryString(opts)}`)\n .then(res => res.body.map(obj => segmentify(agent, obj)));\n}\n","import findSegments from './findSegments';\nimport deprecated from './deprecated';\n\nexport default function getBranches(agent, prevLinkHash, tags = []) {\n deprecated(\n 'Agent#getBranches(agent, prevLinkHash, tags = [])',\n 'Agent#findSegments(agent, filter)'\n );\n\n return findSegments(agent, { prevLinkHash, tags });\n}\n","import deprecated from './deprecated';\nimport getBranches from './getBranches';\nimport { post } from './request';\n\nexport default function segmentify(agent, obj) {\n Object\n .keys(agent.agentInfo.actions)\n .filter(key => ['init'].indexOf(key) < 0)\n .forEach(key => {\n /*eslint-disable*/\n obj[key] = (...args) =>\n post(`${agent.url}/segments/${obj.meta.linkHash}/${key}`, args)\n .then(res => segmentify(agent, res.body))\n });\n\n /*eslint-disable*/\n obj.getPrev = () => {\n /*eslint-enable*/\n if (obj.link.meta.prevLinkHash) {\n return agent.getSegment(obj.link.meta.prevLinkHash);\n }\n\n return Promise.resolve(null);\n };\n\n // Deprecated.\n /*eslint-disable*/\n obj.load = () => {\n /*eslint-enable*/\n deprecated('segment#load()');\n return Promise.resolve(segmentify(agent, {\n link: JSON.parse(JSON.stringify(obj.link)),\n meta: JSON.parse(JSON.stringify(obj.meta))\n }));\n };\n\n // Deprecated.\n /*eslint-disable*/\n obj.getBranches = (...args) => {\n /*eslint-enable*/\n return getBranches(agent, obj.meta.linkHash, ...args);\n };\n\n return obj;\n}\n","import segmentify from './segmentify';\nimport { post } from './request';\n\nexport default function createMap(agent, ...args) {\n return post(`${agent.url}/segments`, args)\n .then(res => segmentify(agent, res.body));\n}\n","import segmentify from './segmentify';\nimport { get } from './request';\n\nexport default function getSegment(agent, linkHash) {\n return get(`${agent.url}/segments/${linkHash}`)\n .then(res => segmentify(agent, res.body));\n}\n","import makeQueryString from './makeQueryString';\nimport { get } from './request';\n\nexport default function getMapIds(agent, opts = {}) {\n return get(`${agent.url}/maps${makeQueryString(opts)}`)\n .then(res => res.body);\n}\n","import getSegment from './getSegment';\nimport deprecated from './deprecated';\n\nexport default function getLink(agent, hash) {\n deprecated('Agent#getLink(agent, hash)', 'Agent#getSegment(agent, hash)');\n\n return getSegment(agent, hash);\n}\n","import findSegments from './findSegments';\nimport deprecated from './deprecated';\n\nexport default function getMap(agent, mapId, tags = []) {\n deprecated('getMap(agent, mapId, tags = [])', 'findSegments(agent, filter)');\n\n return findSegments(agent, { mapId, tags });\n}\n","import createMap from './createMap';\nimport getSegment from './getSegment';\nimport findSegments from './findSegments';\nimport getMapIds from './getMapIds';\nimport { get } from './request';\n\n// Deprecated.\nimport getBranches from './getBranches';\nimport getLink from './getLink';\nimport getMap from './getMap';\n\nexport default function getAgent(url) {\n return get(url)\n .then(res => {\n const agent = res.body;\n\n agent.url = url;\n agent.createMap = createMap.bind(null, agent);\n agent.getSegment = getSegment.bind(null, agent);\n agent.findSegments = findSegments.bind(null, agent);\n agent.getMapIds = getMapIds.bind(null, agent);\n\n // Deprecated.\n agent.getBranches = getBranches.bind(null, agent);\n agent.getLink = getLink.bind(null, agent);\n agent.getMap = getMap.bind(null, agent);\n\n return agent;\n });\n}\n","import getAgent from './getAgent';\nimport segmentify from './segmentify';\n\nexport default function fromSegment(obj) {\n return getAgent(obj.meta.agentUrl || obj.meta.applicationLocation)\n .then(agent => {\n const segment = segmentify(agent, obj);\n return { agent, segment };\n });\n}\n","import getAgent from './getAgent';\nimport deprecated from './deprecated';\nimport config from './config';\n\nexport default function getApplication(name, url) {\n deprecated('getApplication(name, url)', 'getAgent(url)');\n\n return getAgent(url || config.applicationUrl.replace('%s', name));\n}\n","import fromSegment from './fromSegment';\nimport deprecated from './deprecated';\n\nexport default function loadLink(obj) {\n deprecated('loadLink(obj)', 'fromSegment(obj)');\n\n return fromSegment(obj)\n .then(({ segment }) => segment);\n}\n","'use strict';\n\nmodule.exports = {\n processRequest: function(req) {\n var\n contentType = req.header('Content-Type'),\n hasJsonContentType = contentType &&\n contentType.indexOf('application/json') !== -1;\n\n if (contentType != null && !hasJsonContentType) {\n return;\n }\n\n if (req.body) {\n if (!contentType) {\n req.header('Content-Type', 'application/json');\n }\n\n req.body = JSON.stringify(req.body);\n }\n }\n};\n","'use strict';\n\nmodule.exports = {\n processRequest: function(req) {\n var accept = req.header('Accept');\n if (accept == null) {\n req.header('Accept', 'application/json');\n }\n },\n processResponse: function(res) {\n // Check to see if the contentype is \"something/json\" or\n // \"something/somethingelse+json\"\n if (res.contentType && /^.*\\/(?:.*\\+)?json(;|$)/i.test(res.contentType)) {\n var raw = typeof res.body === 'string' ? res.body : res.text;\n if (raw) {\n res.body = JSON.parse(raw);\n }\n }\n }\n};\n","'use strict';\n\nvar jsonrequest = require('./jsonrequest'),\n jsonresponse = require('./jsonresponse');\n\nmodule.exports = {\n processRequest: function(req) {\n jsonrequest.processRequest.call(this, req);\n jsonresponse.processRequest.call(this, req);\n },\n processResponse: function(res) {\n jsonresponse.processResponse.call(this, res);\n }\n};\n","'use strict';\n\nmodule.exports = {\n processRequest: function(req) {\n req.url = req.url.replace(/[^%]+/g, function(s) {\n return encodeURI(s);\n });\n }\n};\n","module.exports = window.XMLHttpRequest;\n","'use strict';\n\n// Wrap a function in a `setTimeout` call. This is used to guarantee async\n// behavior, which can avoid unexpected errors.\n\nmodule.exports = function(fn) {\n return function() {\n var\n args = Array.prototype.slice.call(arguments, 0),\n newFunc = function() {\n return fn.apply(null, args);\n };\n setTimeout(newFunc, 0);\n };\n};\n","'use strict';\n\nfunction Request(optsOrUrl) {\n var opts = typeof optsOrUrl === 'string' ? {url: optsOrUrl} : optsOrUrl || {};\n this.method = opts.method ? opts.method.toUpperCase() : 'GET';\n this.url = opts.url;\n this.headers = opts.headers || {};\n this.body = opts.body;\n this.timeout = opts.timeout || 0;\n this.errorOn404 = opts.errorOn404 != null ? opts.errorOn404 : true;\n this.onload = opts.onload;\n this.onerror = opts.onerror;\n}\n\nRequest.prototype.abort = function() {\n if (this.aborted) return;\n this.aborted = true;\n this.xhr.abort();\n return this;\n};\n\nRequest.prototype.header = function(name, value) {\n var k;\n for (k in this.headers) {\n if (this.headers.hasOwnProperty(k)) {\n if (name.toLowerCase() === k.toLowerCase()) {\n if (arguments.length === 1) {\n return this.headers[k];\n }\n\n delete this.headers[k];\n break;\n }\n }\n }\n if (value != null) {\n this.headers[name] = value;\n return value;\n }\n};\n\n\nmodule.exports = Request;\n","module.exports = extend\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","'use strict';\n\nvar extend = require('xtend');\n\nmodule.exports = function(req) {\n var xhr = req.xhr;\n var props = {request: req, xhr: xhr};\n\n // Try to create the response from the request. If the request was aborted,\n // accesssing properties of the XHR may throw an error, so we wrap in a\n // try/catch.\n try {\n var lines, i, m, headers = {};\n if (xhr.getAllResponseHeaders) {\n lines = xhr.getAllResponseHeaders().split('\\n');\n for (i = 0; i < lines.length; i++) {\n if ((m = lines[i].match(/\\s*([^\\s]+):\\s+([^\\s]+)/))) {\n headers[m[1]] = m[2];\n }\n }\n }\n\n props = extend(props, {\n status: xhr.status,\n contentType: xhr.contentType || (xhr.getResponseHeader && xhr.getResponseHeader('Content-Type')),\n headers: headers,\n text: xhr.responseText,\n body: xhr.response || xhr.responseText\n });\n } catch (err) {}\n\n return props;\n};\n","'use strict';\n\nvar Request = require('./request');\nvar extractResponseProps = require('./utils/extractResponseProps');\n\nfunction Response(props) {\n this.request = props.request;\n this.xhr = props.xhr;\n this.headers = props.headers || {};\n this.status = props.status || 0;\n this.text = props.text;\n this.body = props.body;\n this.contentType = props.contentType;\n this.isHttpError = props.status >= 400;\n}\n\nResponse.prototype.header = Request.prototype.header;\n\nResponse.fromRequest = function(req) {\n return new Response(extractResponseProps(req));\n};\n\n\nmodule.exports = Response;\n","'use strict';\n\nvar Response = require('./response');\nvar extractResponseProps = require('./utils/extractResponseProps');\nvar extend = require('xtend');\n\nfunction RequestError(message, props) {\n var err = new Error(message);\n err.name = 'RequestError';\n this.name = err.name;\n this.message = err.message;\n if (err.stack) {\n this.stack = err.stack;\n }\n\n this.toString = function() {\n return this.message;\n };\n\n for (var k in props) {\n if (props.hasOwnProperty(k)) {\n this[k] = props[k];\n }\n }\n}\n\nRequestError.prototype = extend(Error.prototype);\nRequestError.prototype.constructor = RequestError;\n\nRequestError.create = function(message, req, props) {\n var err = new RequestError(message, props);\n Response.call(err, extractResponseProps(req));\n return err;\n};\n\nmodule.exports = RequestError;\n","'use strict';\n\n// A \"once\" utility.\nmodule.exports = function(fn) {\n var result, called = false;\n return function() {\n if (!called) {\n called = true;\n result = fn.apply(this, arguments);\n }\n return result;\n };\n};\n","'use strict';\n\nvar\n cleanURL = require('../plugins/cleanurl'),\n XHR = require('./xhr'),\n delay = require('./utils/delay'),\n RequestError = require('./error'),\n Response = require('./response'),\n Request = require('./request'),\n extend = require('xtend'),\n once = require('./utils/once');\n\nvar i,\n createError = RequestError.create;\n\nfunction factory(defaults, plugins) {\n defaults = defaults || {};\n plugins = plugins || [];\n\n function http(req, cb) {\n var xhr, plugin, done, k, timeoutId, supportsLoadAndErrorEvents;\n\n req = new Request(extend(defaults, req));\n\n for (i = 0; i < plugins.length; i++) {\n plugin = plugins[i];\n if (plugin.processRequest) {\n plugin.processRequest(req);\n }\n }\n\n // Give the plugins a chance to create the XHR object\n for (i = 0; i < plugins.length; i++) {\n plugin = plugins[i];\n if (plugin.createXHR) {\n xhr = plugin.createXHR(req);\n break; // First come, first serve\n }\n }\n xhr = xhr || new XHR();\n\n req.xhr = xhr;\n\n // Use a single completion callback. This can be called with or without\n // an error. If no error is passed, the request will be examined to see\n // if it was successful.\n done = once(delay(function(rawError) {\n clearTimeout(timeoutId);\n xhr.onload = xhr.onerror = xhr.onabort = xhr.onreadystatechange = xhr.ontimeout = xhr.onprogress = null;\n\n var err = getError(req, rawError);\n\n var res = err || Response.fromRequest(req);\n for (i = 0; i < plugins.length; i++) {\n plugin = plugins[i];\n if (plugin.processResponse) {\n plugin.processResponse(res);\n }\n }\n\n // Invoke callbacks\n if (err && req.onerror) req.onerror(err);\n if (!err && req.onload) req.onload(res);\n if (cb) cb(err, err ? undefined : res);\n\n }));\n\n supportsLoadAndErrorEvents = ('onload' in xhr) && ('onerror' in xhr);\n xhr.onload = function() { done(); };\n xhr.onerror = done;\n xhr.onabort = function() { done(); };\n\n // We'd rather use `onload`, `onerror`, and `onabort` since they're the\n // only way to reliably detect successes and failures but, if they\n // aren't available, we fall back to using `onreadystatechange`.\n xhr.onreadystatechange = function() {\n if (xhr.readyState !== 4) return;\n\n if (req.aborted) return done();\n\n if (!supportsLoadAndErrorEvents) {\n // Assume a status of 0 is an error. This could be a false\n // positive, but there's no way to tell when using\n // `onreadystatechange` ):\n // See matthewwithanm/react-inlinesvg#10.\n\n // Some browsers don't like you reading XHR properties when the\n // XHR has been aborted. In case we've gotten here as a result\n // of that (either our calling `about()` in the timeout handler\n // or the user calling it directly even though they shouldn't),\n // be careful about accessing it.\n var status;\n try {\n status = xhr.status;\n } catch (err) {}\n var err = status === 0 ? new Error('Internal XHR Error') : null;\n return done(err);\n }\n };\n\n // IE sometimes fails if you don't specify every handler.\n // See http://social.msdn.microsoft.com/Forums/ie/en-US/30ef3add-767c-4436-b8a9-f1ca19b4812e/ie9-rtm-xdomainrequest-issued-requests-may-abort-if-all-event-handlers-not-specified?forum=iewebdevelopment\n xhr.ontimeout = function() { /* noop */ };\n xhr.onprogress = function() { /* noop */ };\n\n xhr.open(req.method, req.url);\n\n if (req.timeout) {\n // If we use the normal XHR timeout mechanism (`xhr.timeout` and\n // `xhr.ontimeout`), `onreadystatechange` will be triggered before\n // `ontimeout`. There's no way to recognize that it was triggered by\n // a timeout, and we'd be unable to dispatch the right error.\n timeoutId = setTimeout(function() {\n req.timedOut = true;\n done();\n try {\n xhr.abort();\n } catch (err) {}\n }, req.timeout);\n }\n\n for (k in req.headers) {\n if (req.headers.hasOwnProperty(k)) {\n xhr.setRequestHeader(k, req.headers[k]);\n }\n }\n\n xhr.send(req.body);\n\n return req;\n }\n\n var method,\n methods = ['get', 'post', 'put', 'head', 'patch', 'delete'],\n verb = function(method) {\n return function(req, cb) {\n req = new Request(req);\n req.method = method;\n return http(req, cb);\n };\n };\n for (i = 0; i < methods.length; i++) {\n method = methods[i];\n http[method] = verb(method);\n }\n\n http.plugins = function() {\n return plugins;\n };\n\n http.defaults = function(newValues) {\n if (newValues) {\n return factory(extend(defaults, newValues), plugins);\n }\n return defaults;\n };\n\n http.use = function() {\n var newPlugins = Array.prototype.slice.call(arguments, 0);\n return factory(defaults, plugins.concat(newPlugins));\n };\n\n http.bare = function() {\n return factory();\n };\n\n http.Request = Request;\n http.Response = Response;\n http.RequestError = RequestError;\n\n return http;\n}\n\nmodule.exports = factory({}, [cleanURL]);\n\n/**\n * Analyze the request to see if it represents an error. If so, return it! An\n * original error object can be passed as a hint.\n */\nfunction getError(req, err) {\n if (req.aborted) return createError('Request aborted', req, {name: 'Abort'});\n\n if (req.timedOut) return createError('Request timeout', req, {name: 'Timeout'});\n\n var xhr = req.xhr;\n var type = Math.floor(xhr.status / 100);\n\n var kind;\n switch (type) {\n case 0:\n case 2:\n // These don't represent errors unless the function was passed an\n // error object explicitly.\n if (!err) return;\n return createError(err.message, req);\n case 4:\n // Sometimes 4XX statuses aren't errors.\n if (xhr.status === 404 && !req.errorOn404) return;\n kind = 'Client';\n break;\n case 5:\n kind = 'Server';\n break;\n default:\n kind = 'HTTP';\n }\n var msg = kind + ' Error: ' +\n 'The server returned a status of ' + xhr.status +\n ' for the request \"' +\n req.method.toUpperCase() + ' ' + req.url + '\"';\n return createError(msg, req);\n}\n","// Deprecated.\nexport default {\n applicationUrl: 'https://%s.stratumn.rocks'\n};\n"],"names":["deprecated","oldFunc","newFunc","warn","makeQueryString","obj","parts","Object","keys","reduce","curr","key","val","Array","isArray","join","push","encodeURIComponent","length","send","method","url","args","Promise","resolve","reject","body","err","res","error","meta","errorMessage","Error","status","get","post","findSegments","agent","opts","then","map","segmentify","getBranches","prevLinkHash","tags","agentInfo","actions","filter","indexOf","forEach","linkHash","getPrev","link","getSegment","load","JSON","parse","stringify","createMap","getMapIds","getLink","hash","getMap","mapId","getAgent","bind","fromSegment","agentUrl","applicationLocation","segment","getApplication","name","config","applicationUrl","replace","loadLink","module","exports","processRequest","req","contentType","header","hasJsonContentType","accept","processResponse","test","raw","text","jsonrequest","commonjsHelpers.interopDefault","jsonresponse","call","this","s","encodeURI","window","XMLHttpRequest","fn","prototype","slice","arguments","apply","setTimeout","Request","optsOrUrl","toUpperCase","headers","timeout","errorOn404","onload","onerror","abort","aborted","xhr","value","k","hasOwnProperty","toLowerCase","extend","target","i","source","props","request","lines","m","getAllResponseHeaders","split","match","getResponseHeader","responseText","response","Response","isHttpError","extractResponseProps","fromRequest","RequestError","message","stack","toString","constructor","create","result","called","factory","defaults","plugins","http","cb","plugin","done","timeoutId","supportsLoadAndErrorEvents","createXHR","XHR","once","delay","rawError","clearTimeout","onabort","onreadystatechange","ontimeout","onprogress","getError","undefined","readyState","open","timedOut","setRequestHeader","methods","verb","newValues","use","newPlugins","concat","bare","createError","kind","type","Math","floor","msg","cleanURL","httpplease","json"],"mappings":"4MAAe,SAASA,GAAWC,EAASC,GACrCA,UAGKC,iBAAiBF,gCAAqCC,uBAFtDC,iBAAiBF,qBCG7B,QAAwBG,GAAgBC,MAChCC,GAAQC,OAAOC,KAAKH,GAAKI,OAAO,SAACC,EAAMC,MACrCC,GAAMC,MAAMC,QAAQT,EAAIM,IAAQN,EAAIM,GAAKI,KAAK,KAAOV,EAAIM,YAC1DK,KAAQC,mBAAmBN,OAAQM,mBAAmBL,IACpDF,aAGLJ,GAAMY,WACGZ,EAAMS,KAAK,KAGjB,wICXT,QAASI,GAAKC,EAAQC,EAAKC,SAClB,IAAIC,SAAQ,SAACC,EAASC,OACjBL,SAAQC,MAAKK,KAAMJ,GAAQ,SAACK,EAAKC,MACrCD,EAAK,IACDE,GAASF,GAAOA,EAAID,MAAQC,EAAID,KAAKI,MAAQH,EAAID,KAAKI,KAAKC,aAC7D,GAAIC,OAAML,EAAID,KAAKI,KAAKC,cACxBJ,IACEM,OAASN,EAAIM,SACZJ,UAECD,OAMhB,QAAgBM,GAAIb,SACXF,GAAK,MAAOE,GAGrB,QAAgBc,GAAKd,EAAKC,SACjBH,GAAK,OAAQE,EAAKC,GCtBZ,QAASc,GAAaC,MAAOC,oEACnCJ,GAAOG,EAAMhB,gBAAejB,EAAgBkC,IAChDC,KAAK,kBAAOX,GAAIF,KAAKc,IAAI,kBAAOC,GAAWJ,EAAOhC,OCHxC,QAASqC,GAAYL,EAAOM,MAAcC,uEAErD,oDACA,qCAGKR,EAAaC,GAASM,eAAc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6B,WAAY,MAC3CqE,GAAO,QACP,MACF,KAAK,GACHA,EAAO,QACP,MACF,SACEA,EAAO,OAEX,GAAII,GAAMJ,EAAO,2CAC0BhE,EAAIhF,OACzC,qBACA8C,EAAI3D,OAAOqF,cAAgB,IAAM1B,EAAI1D,IAAM,GACjD,OAAO2J,GAAYK,EAAKtG,GAhN1B,GAUIyC,GATF8D,EAAW7F,KACXiE,EAAMjE,KACNmE,EAAQnE,KACR+C,EAAe/C,MACf2C,EAAW3C,KACXc,EAAUd,KACV6B,EAAS7B,KACTkE,EAAOlE,MAGLuF,EAAcxC,EAAaK,MAgK/BjE,GAAOC,QAAUmE,MAAasC,ezB1KxB3D,GAAU4D,GAAWX,IAAIY,sB0BDb"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Stratumn SDK for Javascript browser example</title>
|
5
|
+
<script type="text/javascript" src="../../dist/stratumn-sdk.js"></script>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
|
11
|
+
StratumnSDK
|
12
|
+
.getAgent('http://localhost:3000')
|
13
|
+
.then(function(agent) {
|
14
|
+
return agent.createMap('Hello');
|
15
|
+
})
|
16
|
+
.then(function(segment) {
|
17
|
+
console.log(segment);
|
18
|
+
return segment.updateTitle('Hi');
|
19
|
+
})
|
20
|
+
.then(function(segment) {
|
21
|
+
console.log(segment);
|
22
|
+
return segment.getPrev();
|
23
|
+
})
|
24
|
+
.then(function(segment) {
|
25
|
+
console.log(segment);
|
26
|
+
})
|
27
|
+
.catch(function(err) {
|
28
|
+
console.error(err);
|
29
|
+
});
|
30
|
+
|
31
|
+
</script>
|
32
|
+
|
33
|
+
</body>
|
34
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
{
|
2
|
+
"name": "stratumn-sdk",
|
3
|
+
"version": "1.5.0",
|
4
|
+
"description": "Stratumn SDK for Javascript",
|
5
|
+
"main": "lib/stratumn-sdk.js",
|
6
|
+
"jsnext:main": "lib/stratumn-sdk.mjs",
|
7
|
+
"scripts": {
|
8
|
+
"test": "mocha --compilers js:babel-core/register --recursive --require babel-polyfill --require should 2> /dev/null",
|
9
|
+
"test:cov": "babel-node ./node_modules/isparta/bin/isparta cover ./node_modules/mocha/bin/_mocha -- --recursive --require should --require should 2> /dev/null",
|
10
|
+
"lint": "eslint src test",
|
11
|
+
"check": "npm run lint && npm run test",
|
12
|
+
"build:lib": "rollup -c rollup.es.config.js && rollup -c rollup.umd.config.js",
|
13
|
+
"build:bower": "rollup -c rollup.bower.config.js",
|
14
|
+
"build:bower:min": "rollup -c rollup.bower.min.config.js",
|
15
|
+
"build:all": "npm run build:lib && npm run build:bower && npm run build:bower:min",
|
16
|
+
"clean": "rimraf lib coverage",
|
17
|
+
"preversion": "npm run clean && npm run check",
|
18
|
+
"version": "npm run build:all",
|
19
|
+
"postversion": "git push && git push --tags && npm run clean",
|
20
|
+
"prepublish": "npm run clean && npm run build:all",
|
21
|
+
"postpublish": "aws s3 cp dist/stratumn-sdk.js s3://stratumn-libs/stratumn-sdk.js --region 'eu-west-1' && aws s3 cp dist/stratumn-sdk.min.js s3://stratumn-libs/stratumn-sdk.min.js --region 'eu-west-1' && aws s3 cp dist/stratumn-sdk.js s3://stratumn-libs/stratumn-sdk-${npm_package_version}.js --region 'eu-west-1' && aws s3 cp dist/stratumn-sdk.min.js s3://stratumn-libs/stratumn-sdk-${npm_package_version}.min.js --region 'eu-west-1'"
|
22
|
+
},
|
23
|
+
"repository": {
|
24
|
+
"type": "git",
|
25
|
+
"url": "https://github.com/stratumn/stratumn-sdk-js.git"
|
26
|
+
},
|
27
|
+
"keywords": [
|
28
|
+
"stratumn",
|
29
|
+
"sdk",
|
30
|
+
"blockchain",
|
31
|
+
"client"
|
32
|
+
],
|
33
|
+
"author": "Stratumn Team",
|
34
|
+
"license": "MIT",
|
35
|
+
"bugs": {
|
36
|
+
"url": "https://github.com/stratumn/stratumn-sdk-js/issues"
|
37
|
+
},
|
38
|
+
"homepage": "https://github.com/stratumn/stratumn-sdk-js",
|
39
|
+
"devDependencies": {
|
40
|
+
"babel-cli": "^6.5.1",
|
41
|
+
"babel-core": "^6.5.2",
|
42
|
+
"babel-eslint": "^6.0.0",
|
43
|
+
"babel-plugin-external-helpers": "^6.8.0",
|
44
|
+
"babel-polyfill": "^6.5.0",
|
45
|
+
"babel-preset-es2015": "^6.5.0",
|
46
|
+
"babel-register": "^6.11.6",
|
47
|
+
"babelrc-rollup": "^3.0.0",
|
48
|
+
"eslint": "^2.3.0",
|
49
|
+
"eslint-config-airbnb": "^6.0.2",
|
50
|
+
"eslint-plugin-react": "^4.1.0",
|
51
|
+
"isparta": "^4.0.0",
|
52
|
+
"mocha": "^2.4.5",
|
53
|
+
"rimraf": "^2.5.2",
|
54
|
+
"rollup": "^0.34.10",
|
55
|
+
"rollup-plugin-babel": "^2.6.1",
|
56
|
+
"rollup-plugin-commonjs": "^3.3.1",
|
57
|
+
"rollup-plugin-node-resolve": "^2.0.0",
|
58
|
+
"rollup-plugin-uglify": "^1.0.1",
|
59
|
+
"rollup-pluginutils": "^1.5.1",
|
60
|
+
"should": "^8.2.2",
|
61
|
+
"stratumn-agent": "^0.12.3"
|
62
|
+
},
|
63
|
+
"dependencies": {
|
64
|
+
"httpplease": "^0.16.4",
|
65
|
+
"xmlhttprequest": "~1.7.0"
|
66
|
+
}
|
67
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import babel from 'rollup-plugin-babel';
|
2
|
+
import { default as babelrc } from 'babelrc-rollup';
|
3
|
+
|
4
|
+
export default {
|
5
|
+
plugins: [
|
6
|
+
babel(Object.assign({
|
7
|
+
exclude: 'node_modules/**'
|
8
|
+
}, babelrc()))
|
9
|
+
],
|
10
|
+
sourceMap: true,
|
11
|
+
entry: 'src/index.js',
|
12
|
+
moduleName: 'StratumnSDK'
|
13
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import commonjs from 'rollup-plugin-commonjs';
|
2
|
+
import nodeResolve from 'rollup-plugin-node-resolve';
|
3
|
+
|
4
|
+
import config from './rollup.base.config';
|
5
|
+
|
6
|
+
config.plugins.push(
|
7
|
+
nodeResolve({
|
8
|
+
jsnext: true,
|
9
|
+
browser: true,
|
10
|
+
preferBuiltins: true
|
11
|
+
}),
|
12
|
+
commonjs()
|
13
|
+
);
|
14
|
+
|
15
|
+
config.format = 'umd';
|
16
|
+
config.dest = 'dist/stratumn-sdk.js';
|
17
|
+
|
18
|
+
export default config;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mapexplorer-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.alpha
|
4
|
+
version: 1.0.0.pre.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- adrien
|
@@ -120,6 +120,51 @@ files:
|
|
120
120
|
- lib/mapexplorer/rails/engine.rb
|
121
121
|
- lib/mapexplorer/rails/version.rb
|
122
122
|
- lib/tasks/mapexplorer/rails_tasks.rake
|
123
|
+
- vendor/assets/babel-polyfill/README.md
|
124
|
+
- vendor/assets/babel-polyfill/bower.json
|
125
|
+
- vendor/assets/babel-polyfill/browser-polyfill.js
|
126
|
+
- vendor/assets/d3/LICENSE
|
127
|
+
- vendor/assets/d3/README.md
|
128
|
+
- vendor/assets/d3/bower.json
|
129
|
+
- vendor/assets/d3/d3.js
|
130
|
+
- vendor/assets/d3/d3.min.js
|
131
|
+
- vendor/assets/jsrender/MIT-LICENSE.txt
|
132
|
+
- vendor/assets/jsrender/bower.json
|
133
|
+
- vendor/assets/jsrender/index.js
|
134
|
+
- vendor/assets/jsrender/jsrender-node.js
|
135
|
+
- vendor/assets/jsrender/jsrender.js
|
136
|
+
- vendor/assets/jsrender/jsrender.min.js
|
137
|
+
- vendor/assets/jsrender/jsrender.min.js.map
|
138
|
+
- vendor/assets/jsrender/tmplify/index.js
|
139
|
+
- vendor/assets/mapexplorer-core/LICENSE
|
140
|
+
- vendor/assets/mapexplorer-core/README.md
|
141
|
+
- vendor/assets/mapexplorer-core/assets/stylesheets/map.scss
|
142
|
+
- vendor/assets/mapexplorer-core/assets/stylesheets/mapexplorer-core.scss
|
143
|
+
- vendor/assets/mapexplorer-core/assets/stylesheets/merkle-path.scss
|
144
|
+
- vendor/assets/mapexplorer-core/assets/stylesheets/variables.scss
|
145
|
+
- vendor/assets/mapexplorer-core/bower.json
|
146
|
+
- vendor/assets/mapexplorer-core/dist/mapexplorer-core.js
|
147
|
+
- vendor/assets/mapexplorer-core/dist/mapexplorer-core.js.map
|
148
|
+
- vendor/assets/mapexplorer-core/dist/mapexplorer-core.min.js
|
149
|
+
- vendor/assets/mapexplorer-core/karma.conf.js
|
150
|
+
- vendor/assets/mapexplorer-core/package.json
|
151
|
+
- vendor/assets/mapexplorer-core/rollup.bower.config.js
|
152
|
+
- vendor/assets/mapexplorer-core/rollup.es.config.js
|
153
|
+
- vendor/assets/mapexplorer-core/rollup.umd.config.js
|
154
|
+
- vendor/assets/stratumn-sdk/LICENSE
|
155
|
+
- vendor/assets/stratumn-sdk/README.md
|
156
|
+
- vendor/assets/stratumn-sdk/bower.json
|
157
|
+
- vendor/assets/stratumn-sdk/dist/stratumn-sdk.js
|
158
|
+
- vendor/assets/stratumn-sdk/dist/stratumn-sdk.js.map
|
159
|
+
- vendor/assets/stratumn-sdk/dist/stratumn-sdk.min.js
|
160
|
+
- vendor/assets/stratumn-sdk/dist/stratumn-sdk.min.js.map
|
161
|
+
- vendor/assets/stratumn-sdk/examples/browser/index.html
|
162
|
+
- vendor/assets/stratumn-sdk/package.json
|
163
|
+
- vendor/assets/stratumn-sdk/rollup.base.config.js
|
164
|
+
- vendor/assets/stratumn-sdk/rollup.bower.config.js
|
165
|
+
- vendor/assets/stratumn-sdk/rollup.bower.min.config.js
|
166
|
+
- vendor/assets/stratumn-sdk/rollup.es.config.js
|
167
|
+
- vendor/assets/stratumn-sdk/rollup.umd.config.js
|
123
168
|
homepage: https://github.com/stratumn/mapexplorer-rails
|
124
169
|
licenses:
|
125
170
|
- MIT
|