datastore-core
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -0,1 +1,5 @@ | ||
## [2.0.1](https://github.com/ipfs/js-datastore-core/compare/v2.0.0...v2.0.1) (2020-11-09) | ||
<a name="2.0.0"></a> | ||
@@ -2,0 +6,0 @@ # [2.0.0](https://github.com/ipfs/js-datastore-core/compare/v1.1.0...v2.0.0) (2020-07-29) |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.DatastoreCore=e():t.DatastoreCore=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=11)}([function(t,e,r){"use strict";const n=r(4),o=r(19),i=r(2),s=r(8),a=r(7);e.Key=n,e.MemoryDatastore=o,e.utils=i,e.Errors=s,e.Adapter=a},function(t,e,r){"use strict";const{Adapter:n,utils:o}=r(0),i=o.map;t.exports=class extends n{constructor(t,e){super(),this.child=t,this.transform=e}open(){return this.child.open()}put(t,e,r){return this.child.put(this.transform.convert(t),e,r)}get(t,e){return this.child.get(this.transform.convert(t),e)}has(t,e){return this.child.has(this.transform.convert(t),e)}delete(t,e){return this.child.delete(this.transform.convert(t),e)}batch(){const t=this.child.batch();return{put:(e,r)=>{t.put(this.transform.convert(e),r)},delete:e=>{t.delete(this.transform.convert(e))},commit:e=>t.commit(e)}}query(t,e){return i(this.child.query(t,e),t=>(t.key=this.transform.invert(t.key),t))}close(){return this.child.close()}}},function(t,e,r){"use strict";function n(t){return new s(t)}function o(t){return function(){return new i(t.apply(this,arguments))}}function i(t){var e,r;function n(e,r){try{var i=t[e](r),a=i.value,u=a instanceof s;Promise.resolve(u?a.wrapped:a).then((function(t){u?n("return"===e?"return":"next",t):o(i.done?"return":"normal",t)}),(function(t){n("throw",t)}))}catch(c){o("throw",c)}}function o(t,o){switch(t){case"return":e.resolve({value:o,done:!0});break;case"throw":e.reject(o);break;default:e.resolve({value:o,done:!1})}(e=e.next)?n(e.key,e.arg):r=null}this._invoke=function(t,o){return new Promise((function(i,s){var a={key:t,arg:o,resolve:i,reject:s,next:null};r?r=r.next=a:(e=r=a,n(t,o))}))},"function"!=typeof t.return&&(this.return=void 0)}function s(t){this.wrapped=t}function a(t){var e;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(e=t[Symbol.asyncIterator]))return e.call(t);if(Symbol.iterator&&null!=(e=t[Symbol.iterator]))return e.call(t)}throw new TypeError("Object is not async iterable")}"function"==typeof Symbol&&Symbol.asyncIterator&&(i.prototype[Symbol.asyncIterator]=function(){return this}),i.prototype.next=function(t){return this._invoke("next",t)},i.prototype.throw=function(t){return this._invoke("throw",t)},i.prototype.return=function(t){return this._invoke("return",t)};const u=r(16),c=r(5),l=r(3);e.utf8Encoder=new c("utf8"),e.utf8Decoder=new l("utf8"),e.filter=(t,e)=>o((function*(){var r,o=!0,i=!1;try{for(var s,u,c=a(t);o=(s=yield n(c.next())).done,u=yield n(s.value),!o;o=!0){const t=u;(yield n(e(t)))&&(yield t)}}catch(l){i=!0,r=l}finally{try{o||null==c.return||(yield n(c.return()))}finally{if(i)throw r}}}))(),e.sortAll=(t,e)=>o((function*(){let r=[];var o,i=!0,s=!1;try{for(var u,c,l=a(t);i=(u=yield n(l.next())).done,c=yield n(u.value),!i;i=!0){const t=c;r.push(t)}}catch(f){s=!0,o=f}finally{try{i||null==l.return||(yield n(l.return()))}finally{if(s)throw o}}r=yield n(e(r));for(const t of r)yield t}))(),e.take=(t,e)=>o((function*(){if(e<=0)return;let r=0;var o,i=!0,s=!1;try{for(var u,c,l=a(t);i=(u=yield n(l.next())).done,c=yield n(u.value),!i;i=!0){const t=c;if(yield t,r++,r>=e)return}}catch(f){s=!0,o=f}finally{try{i||null==l.return||(yield n(l.return()))}finally{if(s)throw o}}}))(),e.map=(t,e)=>o((function*(){var r,o=!0,i=!1;try{for(var s,u,c=a(t);o=(s=yield n(c.next())).done,u=yield n(s.value),!o;o=!0){const t=u;yield e(t)}}catch(l){i=!0,r=l}finally{try{o||null==c.return||(yield n(c.return()))}finally{if(i)throw r}}}))(),e.replaceStartWith=function(t,e){const r=new RegExp("^"+e);return t.replace(r,"")},e.tmpdir=u},function(t,e,r){"use strict";t.exports=r(6).TextDecoder},function(t,e,r){"use strict";const{nanoid:n}=r(13),o=r(15),{utf8Encoder:i,utf8Decoder:s}=r(2),a=r(3),u=i.encode("/"),c=u[0];class l{constructor(t,e){if("string"==typeof t)this._buf=i.encode(t);else{if(!(t instanceof Uint8Array))throw new Error("Invalid key, should be String of Uint8Array");this._buf=t}if(null==e&&(e=!0),e&&this.clean(),0===this._buf.byteLength||this._buf[0]!==c)throw new Error("Invalid key")}toString(t="utf8"){return"utf8"===t||"utf-8"===t?s.decode(this._buf):new a(t).decode(this._buf)}uint8Array(){return this._buf}get[Symbol.toStringTag](){return`Key(${this.toString()})`}static withNamespaces(t){return new f(t.join("/"))}static random(){return new f(n().replace(/-/g,""))}clean(){if(this._buf&&0!==this._buf.byteLength||(this._buf=u),this._buf[0]!==c){const t=new Uint8Array(this._buf.byteLength+1);t.fill(c,0,1),t.set(this._buf,1),this._buf=t}for(;this._buf.byteLength>1&&this._buf[this._buf.byteLength-1]===c;)this._buf=this._buf.subarray(0,-1)}less(t){const e=this.list(),r=t.list();for(let n=0;n<e.length;n++){if(r.length<n+1)return!1;const t=e[n],o=r[n];if(t<o)return!0;if(t>o)return!1}return e.length<r.length}reverse(){return l.withNamespaces(this.list().slice().reverse())}namespaces(){return this.list()}baseNamespace(){const t=this.namespaces();return t[t.length-1]}list(){return this.toString().split("/").slice(1)}type(){return function(t){const e=t.split(":");if(e.length<2)return"";return e.slice(0,-1).join(":")}(this.baseNamespace())}name(){return function(t){const e=t.split(":");return e[e.length-1]}(this.baseNamespace())}instance(t){return new f(this.toString()+":"+t)}path(){let t=this.parent().toString();return t.endsWith("/")||(t+="/"),t+=this.type(),new f(t)}parent(){const t=this.list();return 1===t.length?new f("/"):new f(t.slice(0,-1).join("/"))}child(t){return"/"===this.toString()?t:"/"===t.toString()?this:new f(this.toString()+t.toString(),!1)}isAncestorOf(t){return t.toString()!==this.toString()&&t.toString().startsWith(this.toString())}isDecendantOf(t){return t.toString()!==this.toString()&&this.toString().startsWith(t.toString())}isTopLevel(){return 1===this.list().length}concat(...t){return l.withNamespaces([...this.namespaces(),...(e=t.map(t=>t.namespaces()),[].concat(...e))]);var e}}const f=o(l,{className:"Key",symbolName:"@ipfs/interface-datastore/key"});t.exports=f},function(t,e,r){"use strict";t.exports=r(6).TextEncoder},function(t,e,r){"use strict";"object"!=typeof globalThis&&(Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__),t.exports=globalThis},function(t,e,r){"use strict";function n(t){return new s(t)}function o(t){return function(){return new i(t.apply(this,arguments))}}function i(t){var e,r;function n(e,r){try{var i=t[e](r),a=i.value,u=a instanceof s;Promise.resolve(u?a.wrapped:a).then((function(t){u?n("return"===e?"return":"next",t):o(i.done?"return":"normal",t)}),(function(t){n("throw",t)}))}catch(c){o("throw",c)}}function o(t,o){switch(t){case"return":e.resolve({value:o,done:!0});break;case"throw":e.reject(o);break;default:e.resolve({value:o,done:!1})}(e=e.next)?n(e.key,e.arg):r=null}this._invoke=function(t,o){return new Promise((function(i,s){var a={key:t,arg:o,resolve:i,reject:s,next:null};r?r=r.next=a:(e=r=a,n(t,o))}))},"function"!=typeof t.return&&(this.return=void 0)}function s(t){this.wrapped=t}function a(t){var e;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(e=t[Symbol.asyncIterator]))return e.call(t);if(Symbol.iterator&&null!=(e=t[Symbol.iterator]))return e.call(t)}throw new TypeError("Object is not async iterable")}"function"==typeof Symbol&&Symbol.asyncIterator&&(i.prototype[Symbol.asyncIterator]=function(){return this}),i.prototype.next=function(t){return this._invoke("next",t)},i.prototype.throw=function(t){return this._invoke("throw",t)},i.prototype.return=function(t){return this._invoke("return",t)};const{filter:u,sortAll:c,take:l,map:f}=r(2),h=r(20);t.exports=class{async open(){}async close(){}async put(t,e,r={}){}putMany(t,e={}){var r=this;return o((function*(){var o,i=!0,s=!1;try{for(var u,c,l=a(t);i=(u=yield n(l.next())).done,c=yield n(u.value),!i;i=!0){const{key:t,value:o}=c;yield n(r.put(t,o,e)),yield{key:t,value:o}}}catch(f){s=!0,o=f}finally{try{i||null==l.return||(yield n(l.return()))}finally{if(s)throw o}}}))()}async get(t,e={}){}getMany(t,e={}){var r=this;return o((function*(){var o,i=!0,s=!1;try{for(var u,c,l=a(t);i=(u=yield n(l.next())).done,c=yield n(u.value),!i;i=!0){const t=c;yield r.get(t,e)}}catch(f){s=!0,o=f}finally{try{i||null==l.return||(yield n(l.return()))}finally{if(s)throw o}}}))()}async has(t){}async delete(t,e={}){}deleteMany(t,e={}){var r=this;return o((function*(){var o,i=!0,s=!1;try{for(var u,c,l=a(t);i=(u=yield n(l.next())).done,c=yield n(u.value),!i;i=!0){const t=c;yield n(r.delete(t,e)),yield t}}catch(f){s=!0,o=f}finally{try{i||null==l.return||(yield n(l.return()))}finally{if(s)throw o}}}))()}batch(){let t=[],e=[];return{put(e,r){t.push({key:e,value:r})},delete(t){e.push(t)},commit:async r=>{await h(this.putMany(t,r)),t=[],await h(this.deleteMany(e,r)),e=[]}}}_all(t,e){return o((function*(){}))()}query(t,e){var r=this;return o((function*(){let o=r._all(t,e);if(null!=t.prefix&&(o=u(o,e=>e.key.toString().startsWith(t.prefix))),Array.isArray(t.filters)&&(o=t.filters.reduce((t,e)=>u(t,e),o)),Array.isArray(t.orders)&&(o=t.orders.reduce((t,e)=>c(t,e),o)),null!=t.offset){let e=0;o=u(o,()=>e++>=t.offset)}null!=t.limit&&(o=l(o,t.limit)),!0===t.keysOnly&&(o=f(o,t=>({key:t.key}))),yield*function(t,e){var r={},n=!1;function o(r,o){return n=!0,o=new Promise((function(e){e(t[r](o))})),{done:!1,value:e(o)}}return"function"==typeof Symbol&&Symbol.iterator&&(r[Symbol.iterator]=function(){return this}),r.next=function(t){return n?(n=!1,t):o("next",t)},"function"==typeof t.throw&&(r.throw=function(t){if(n)throw n=!1,t;return o("throw",t)}),"function"==typeof t.return&&(r.return=function(t){return n?(n=!1,t):o("return",t)}),r}(a(o),n)}))()}}},function(t,e,r){"use strict";const n=r(21);t.exports.dbOpenFailedError=t=>(t=t||new Error("Cannot open database"),n(t,"ERR_DB_OPEN_FAILED")),t.exports.dbDeleteFailedError=t=>(t=t||new Error("Delete failed"),n(t,"ERR_DB_DELETE_FAILED")),t.exports.dbWriteFailedError=t=>(t=t||new Error("Write failed"),n(t,"ERR_DB_WRITE_FAILED")),t.exports.notFoundError=t=>(t=t||new Error("Not Found"),n(t,"ERR_NOT_FOUND")),t.exports.abortedError=t=>(t=t||new Error("Aborted"),n(t,"ERR_ABORTED"))},function(t,e,r){"use strict";const n=r(0).Key,{utf8Decoder:o}=r(10),i=r(23),s=e.PREFIX="/repo/flatfs/shard/",a=e.SHARDING_FN="SHARDING";e.README_FN="_README";class u{constructor(t){this.param=t}fun(t){throw new Error("implement me")}toString(){return`${s}v1/${this.name}/${this.param}`}}class c extends u{constructor(t){super(t),this._padding="".padStart(t,"_"),this.name="prefix"}fun(t){return(t+this._padding).slice(0,this.param)}}class l extends u{constructor(t){super(t),this._padding="".padStart(t,"_"),this.name="suffix"}fun(t){const e=this._padding+t;return e.slice(e.length-this.param)}}class f extends u{constructor(t){super(t),this._padding="".padStart(t+1,"_"),this.name="next-to-last"}fun(t){const e=this._padding+t,r=e.length-this.param-1;return e.slice(r,r+this.param)}}function h(t){if(0===(t=t.trim()).length)throw new Error("empty shard string");if(!t.startsWith(s))throw new Error("invalid or no path prefix: "+t);const e=t.slice(s.length).split("/"),r=e[0];if("v1"!==r)throw new Error(`expect 'v1' version, got '${r}'`);const n=e[1];if(!e[2])throw new Error("missing param");const o=parseInt(e[2],10);switch(n){case"prefix":return new c(o);case"suffix":return new l(o);case"next-to-last":return new f(o);default:throw new Error("unkown sharding function: "+n)}}e.readShardFun=async(t,e)=>{const r=new n(t).child(new n(a)),i="function"==typeof e.getRaw?e.getRaw.bind(e):e.get.bind(e),s=await i(r);return h(o.decode(s||"").trim())},e.readme=i,e.parseShardFun=h,e.Prefix=c,e.Suffix=l,e.NextToLast=f},function(t,e,r){"use strict";const n=r(5),o=r(3);t.exports.utf8Encoder=new n("utf8"),t.exports.utf8Decoder=new o("utf8")},function(t,e,r){t.exports=r(12)},function(t,e,r){"use strict";const n=r(1),o=r(22),i=r(24),s=r(25),a=r(30),u=r(9);e.KeytransformDatastore=n,e.ShardingDatastore=o,e.MountDatastore=i,e.TieredDatastore=s,e.NamespaceDatastore=a,e.shard=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"urlAlphabet",{enumerable:!0,get:function(){return n.urlAlphabet}}),e.random=e.customRandom=e.customAlphabet=e.nanoid=void 0;var n=r(14);let o=t=>crypto.getRandomValues(new Uint8Array(t));e.random=o;let i=(t,e,r)=>{let n=(2<<Math.log(t.length-1)/Math.LN2)-1,o=-~(1.6*n*e/t.length);return()=>{let i="";for(;;){let s=r(o),a=o;for(;a--;)if(i+=t[s[a]&n]||"",i.length===+e)return i}}};e.customRandom=i;e.customAlphabet=(t,e)=>i(t,e,o);e.nanoid=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let n=63&r[t];e+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.urlAlphabet=void 0;e.urlAlphabet="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"},function(t,e,r){"use strict";t.exports=function(t,{className:e,symbolName:r}){const n=Symbol.for(r),o={[e]:class extends t{constructor(...t){super(...t),Object.defineProperty(this,n,{value:!0})}get[Symbol.toStringTag](){return e}}}[e];return o["is"+e]=t=>!(!t||!t[n]),o},t.exports.proto=function(t,{className:e,symbolName:r,withoutNew:n}){const o=Symbol.for(r),i={[e]:function(...e){if(n&&!(this instanceof i))return new i(...e);const r=t.call(this,...e)||this;return r&&!r[o]&&Object.defineProperty(r,o,{value:!0}),r}}[e];return i.prototype=Object.create(t.prototype),i.prototype.constructor=i,Object.defineProperty(i.prototype,Symbol.toStringTag,{get:()=>e}),i["is"+e]=t=>!(!t||!t[o]),i}},function(t,e,r){"use strict";const{nanoid:n}=r(17);t.exports=(t=(t=>t))=>t(n())},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"urlAlphabet",{enumerable:!0,get:function(){return n.urlAlphabet}}),e.random=e.customRandom=e.customAlphabet=e.nanoid=void 0;var n=r(18);let o=t=>crypto.getRandomValues(new Uint8Array(t));e.random=o;let i=(t,e,r)=>{let n=(2<<Math.log(t.length-1)/Math.LN2)-1,o=-~(1.6*n*e/t.length);return()=>{let i="";for(;;){let s=r(o),a=o;for(;a--;)if(i+=t[s[a]&n]||"",i.length===+e)return i}}};e.customRandom=i;e.customAlphabet=(t,e)=>i(t,e,o);e.nanoid=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let n=63&r[t];e+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.urlAlphabet=void 0;e.urlAlphabet="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"},function(t,e,r){"use strict";const n=r(4),o=r(7),i=r(8);t.exports=class extends o{constructor(){super(),this.data={}}async put(t,e){this.data[t.toString()]=e}async get(t){if(!await this.has(t))throw i.notFoundError();return this.data[t.toString()]}async has(t){return void 0!==this.data[t.toString()]}async delete(t){delete this.data[t.toString()]}*_all(){yield*Object.entries(this.data).map(([t,e])=>({key:new n(t),value:e}))}}},function(t,e,r){"use strict";t.exports=async t=>{var e,r=!0,n=!1;try{for(var o,i=function(t){var e;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(e=t[Symbol.asyncIterator]))return e.call(t);if(Symbol.iterator&&null!=(e=t[Symbol.iterator]))return e.call(t)}throw new TypeError("Object is not async iterable")}(t);r=(o=await i.next()).done,await o.value,!r;r=!0){}}catch(s){n=!0,e=s}finally{try{r||null==i.return||await i.return()}finally{if(n)throw e}}}},function(t,e,r){"use strict";function n(t,e){for(const r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!0,configurable:!0});return t}t.exports=function(t,e,r){if(!t||"string"==typeof t)throw new TypeError("Please pass an Error to err-code");r||(r={}),"object"==typeof e&&(r=e,e=void 0),null!=e&&(r.code=e);try{return n(t,r)}catch(o){r.message=t.message,r.stack=t.stack;const e=function(){};return e.prototype=Object.create(Object.getPrototypeOf(t)),n(new e,r)}}},function(t,e,r){"use strict";const{Adapter:n,Key:o}=r(0),i=r(9),s=r(1),{utf8Encoder:a}=r(10),u=new o(i.SHARDING_FN),c=new o(i.README_FN);class l extends n{constructor(t,e){super(),this.child=new s(t,{convert:this._convertKey.bind(this),invert:this._invertKey.bind(this)}),this.shard=e}open(){return this.child.open()}_convertKey(t){const e=t.toString();if(e===u.toString()||e===c.toString())return t;return new o(this.shard.fun(e)).child(t)}_invertKey(t){const e=t.toString();return e===u.toString()||e===c.toString()?t:o.withNamespaces(t.list().slice(1))}static async createOrOpen(t,e){try{await l.create(t,e)}catch(r){if(r&&"datastore exists"!==r.message)throw r}return l.open(t)}static async open(t){const e=await i.readShardFun("/",t);return new l(t,e)}static async create(t,e){if(!await t.has(u)){const r="function"==typeof t.putRaw?t.putRaw.bind(t):t.put.bind(t);return Promise.all([r(u,a.encode(e.toString()+"\n")),r(c,a.encode(i.readme))])}const r=(await i.readShardFun("/",t)||"").toString(),n=e.toString();if(r!==n)throw new Error(`specified fun ${n} does not match repo shard fun ${r}`);throw new Error("datastore exists")}put(t,e,r){return this.child.put(t,e,r)}get(t,e){return this.child.get(t,e)}has(t,e){return this.child.has(t,e)}delete(t,e){return this.child.delete(t,e)}batch(){return this.child.batch()}query(t,e){const r={keysOnly:t.keysOnly,offset:t.offset,limit:t.limit,filters:[t=>t.key.toString()!==u.toString(),t=>t.key.toString()!==c.toString()]};if(null!=t.prefix&&r.filters.push(e=>this._invertKey(e.key).toString().startsWith(t.prefix)),null!=t.filters){const e=t.filters.map(t=>e=>t(Object.assign({},e,{key:this._invertKey(e.key)})));r.filters=r.filters.concat(e)}return null!=t.orders&&(r.orders=t.orders.map(t=>async e=>{e.forEach(t=>{t.key=this._invertKey(t.key)});const r=await t(e);return r.forEach(t=>{t.key=this._convertKey(t.key)}),r})),this.child.query(r,e)}close(){return this.child.close()}}t.exports=l},function(t,e,r){"use strict";t.exports="This is a repository of IPLD objects. Each IPLD object is in a single file,\nnamed <base32 encoding of cid>.data. Where <base32 encoding of cid> is the\n\"base32\" encoding of the CID (as specified in\nhttps://github.com/multiformats/multibase) without the 'B' prefix.\nAll the object files are placed in a tree of directories, based on a\nfunction of the CID. This is a form of sharding similar to\nthe objects directory in git repositories. Previously, we used\nprefixes, we now use the next-to-last two charters.\n func NextToLast(base32cid string) {\n nextToLastLen := 2\n offset := len(base32cid) - nextToLastLen - 1\n return str[offset : offset+nextToLastLen]\n }\nFor example, an object with a base58 CIDv1 of\n zb2rhYSxw4ZjuzgCnWSt19Q94ERaeFhu9uSqRgjSdx9bsgM6f\nhas a base32 CIDv1 of\n BAFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA\nand will be placed at\n SC/AFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA.data\nwith 'SC' being the last-to-next two characters and the 'B' at the\nbeginning of the CIDv1 string is the multibase prefix that is not\nstored in the filename.\n"},function(t,e,r){"use strict";function n(t){return new i(t)}function o(t){var e,r;function n(e,r){try{var s=t[e](r),a=s.value,u=a instanceof i;Promise.resolve(u?a.wrapped:a).then((function(t){u?n("return"===e?"return":"next",t):o(s.done?"return":"normal",t)}),(function(t){n("throw",t)}))}catch(c){o("throw",c)}}function o(t,o){switch(t){case"return":e.resolve({value:o,done:!0});break;case"throw":e.reject(o);break;default:e.resolve({value:o,done:!1})}(e=e.next)?n(e.key,e.arg):r=null}this._invoke=function(t,o){return new Promise((function(i,s){var a={key:t,arg:o,resolve:i,reject:s,next:null};r?r=r.next=a:(e=r=a,n(t,o))}))},"function"!=typeof t.return&&(this.return=void 0)}function i(t){this.wrapped=t}function s(t){var e;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(e=t[Symbol.asyncIterator]))return e.call(t);if(Symbol.iterator&&null!=(e=t[Symbol.iterator]))return e.call(t)}throw new TypeError("Object is not async iterable")}"function"==typeof Symbol&&Symbol.asyncIterator&&(o.prototype[Symbol.asyncIterator]=function(){return this}),o.prototype.next=function(t){return this._invoke("next",t)},o.prototype.throw=function(t){return this._invoke("throw",t)},o.prototype.return=function(t){return this._invoke("return",t)};const{Adapter:a,Key:u,Errors:c,utils:{filter:l,take:f,sortAll:h,replaceStartWith:d}}=r(0),p=r(1);t.exports=class extends a{constructor(t){super(),this.mounts=t.slice()}open(){return Promise.all(this.mounts.map(t=>t.datastore.open()))}_lookup(t){for(const e of this.mounts)if(e.prefix.toString()===t.toString()||e.prefix.isAncestorOf(t)){const r=d(t.toString(),e.prefix.toString());return{datastore:e.datastore,mountpoint:e.prefix,rest:new u(r)}}}put(t,e,r){const n=this._lookup(t);if(null==n)throw c.dbWriteFailedError(new Error("No datastore mounted for this key"));return n.datastore.put(n.rest,e,r)}get(t,e){const r=this._lookup(t);if(null==r)throw c.notFoundError(new Error("No datastore mounted for this key"));return r.datastore.get(r.rest,e)}has(t,e){const r=this._lookup(t);return null!=r&&r.datastore.has(r.rest,e)}delete(t,e){const r=this._lookup(t);if(null==r)throw c.dbDeleteFailedError(new Error("No datastore mounted for this key"));return r.datastore.delete(r.rest,e)}close(){return Promise.all(this.mounts.map(t=>t.datastore.close()))}batch(){const t={},e=e=>{const r=this._lookup(e);if(null==r)throw new Error("No datastore mounted for this key");const n=r.mountpoint.toString();return null==t[n]&&(t[n]=r.datastore.batch()),{batch:t[n],rest:r.rest}};return{put:(t,r)=>{const n=e(t);n.batch.put(n.rest,r)},delete:t=>{const r=e(t);r.batch.delete(r.rest)},commit:e=>Promise.all(Object.keys(t).map(r=>t[r].commit(e)))}}query(t,e){const r=this.mounts.map(r=>{const n=new p(r.datastore,{convert:t=>{throw new Error("should never be called")},invert:t=>r.prefix.child(t)});let o;return null!=t.prefix&&(o=d(t.prefix,r.prefix.toString())),n.query({prefix:o,filters:t.filters,keysOnly:t.keysOnly},e)});let i=(a=r,(u=function*(){for(let l=0;l<a.length;l++){var t,e=!0,r=!1;try{for(var o,i,u=s(a[l]);e=(o=yield n(u.next())).done,i=yield n(o.value),!e;e=!0){const t=i;yield t}}catch(c){r=!0,t=c}finally{try{e||null==u.return||(yield n(u.return()))}finally{if(r)throw t}}}},function(){return new o(u.apply(this,arguments))})());var a,u;if(t.filters&&t.filters.forEach(t=>{i=l(i,t)}),t.orders&&t.orders.forEach(t=>{i=h(i,t)}),null!=t.offset){let e=0;i=l(i,()=>e++>=t.offset)}return null!=t.limit&&(i=f(i,t.limit)),i}}},function(t,e,r){"use strict";const{Adapter:n,Errors:o}=r(0),i=r(26)("datastore:core:tiered");t.exports=class extends n{constructor(t){super(),this.stores=t.slice()}async open(){try{await Promise.all(this.stores.map(t=>t.open()))}catch(t){throw o.dbOpenFailedError()}}async put(t,e){try{await Promise.all(this.stores.map(r=>r.put(t,e)))}catch(r){throw o.dbWriteFailedError()}}async get(t,e){for(const n of this.stores)try{const r=await n.get(t,e);if(r)return r}catch(r){i(r)}throw o.notFoundError()}async has(t,e){for(const r of this.stores)if(await r.has(t,e))return!0;return!1}async delete(t,e){try{await Promise.all(this.stores.map(r=>r.delete(t,e)))}catch(r){throw o.dbDeleteFailedError()}}async close(){await Promise.all(this.stores.map(t=>t.close()))}batch(){const t=this.stores.map(t=>t.batch());return{put:(e,r)=>{t.forEach(t=>t.put(e,r))},delete:e=>{t.forEach(t=>t.delete(e))},commit:async e=>{for(const r of t)await r.commit(e)}}}query(t,e){return this.stores[this.stores.length-1].query(t,e)}}},function(t,e,r){"use strict";(function(n){e.log=function(...t){return"object"==typeof console&&console.log&&console.log(...t)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(n++,"%c"===t&&(o=n))}),e.splice(o,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(r){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(r){}!t&&void 0!==n&&"env"in n&&(t={NODE_ENV:"production"}.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.exports=r(28)(e);const{formatters:o}=t.exports;o.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,r(27))},function(t,e,r){"use strict";var n,o,i=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var c,l=[],f=!1,h=-1;function d(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&p())}function p(){if(!f){var t=u(d);f=!0;for(var e=l.length;e;){for(c=l,l=[];++h<e;)c&&c[h].run();h=-1,e=l.length}c=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new y(t,e)),1!==l.length||f||u(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";t.exports=function(t){function e(t){let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return n.colors[Math.abs(e)%n.colors.length]}function n(t){let r;function s(...t){if(!s.enabled)return;const e=s,o=Number(new Date),i=o-(r||o);e.diff=i,e.prev=r,e.curr=o,r=o,t[0]=n.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let a=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(r,o)=>{if("%%"===r)return r;a++;const i=n.formatters[o];if("function"==typeof i){const n=t[a];r=i.call(e,n),t.splice(a,1),a--}return r}),n.formatArgs.call(e,t);(e.log||n.log).apply(e,t)}return s.namespace=t,s.enabled=n.enabled(t),s.useColors=n.useColors(),s.color=e(t),s.destroy=o,s.extend=i,"function"==typeof n.init&&n.init(s),n.instances.push(s),s}function o(){const t=n.instances.indexOf(this);return-1!==t&&(n.instances.splice(t,1),!0)}function i(t,e){const r=n(this.namespace+(void 0===e?":":e)+t);return r.log=this.log,r}function s(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},n.disable=function(){const t=[...n.names.map(s),...n.skips.map(s).map(t=>"-"+t)].join(",");return n.enable(""),t},n.enable=function(t){let e;n.save(t),n.names=[],n.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(e=0;e<o;e++)r[e]&&("-"===(t=r[e].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+t.substr(1)+"$")):n.names.push(new RegExp("^"+t+"$")));for(e=0;e<n.instances.length;e++){const t=n.instances[e];t.enabled=n.enabled(t.namespace)}},n.enabled=function(t){if("*"===t[t.length-1])return!0;let e,r;for(e=0,r=n.skips.length;e<r;e++)if(n.skips[e].test(t))return!1;for(e=0,r=n.names.length;e<r;e++)if(n.names[e].test(t))return!0;return!1},n.humanize=r(29),Object.keys(t).forEach(e=>{n[e]=t[e]}),n.instances=[],n.names=[],n.skips=[],n.formatters={},n.selectColor=e,n.enable(n.load()),n}},function(t,e,r){"use strict";var n=1e3,o=6e4,i=60*o,s=24*i;function a(t,e,r,n){var o=e>=1.5*r;return Math.round(t/r)+" "+n+(o?"s":"")}t.exports=function(t,e){e=e||{};var r=typeof t;if("string"===r&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*s;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*o;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(t);if("number"===r&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=s)return a(t,e,s,"day");if(e>=i)return a(t,e,i,"hour");if(e>=o)return a(t,e,o,"minute");if(e>=n)return a(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=s)return Math.round(t/s)+"d";if(e>=i)return Math.round(t/i)+"h";if(e>=o)return Math.round(t/o)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){"use strict";const n=r(0).Key,o=r(1);t.exports=class extends o{constructor(t,e){super(t,{convert:t=>e.child(t),invert(t){if("/"===e.toString())return t;if(!e.isAncestorOf(t))throw new Error(`Expected prefix: (${e.toString()}) in key: ${t.toString()}`);return new n(t.toString().slice(e.toString().length),!1)}}),this.prefix=e}query(t){return t.prefix&&"/"!==this.prefix.toString()?super.query(Object.assign({},t,{prefix:this.prefix.child(new n(t.prefix)).toString()})):super.query(t)}}}])})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.DatastoreCore=e():t.DatastoreCore=e()}(self,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)r.d(n,s,function(e){return t[e]}.bind(null,s));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=12)}([function(t,e,r){"use strict";const n=r(4),s=r(17),o=r(2),i=r(9),a=r(8);e.Key=n,e.MemoryDatastore=s,e.utils=o,e.Errors=i,e.Adapter=a},function(t,e,r){"use strict";const{Adapter:n,utils:s}=r(0),o=s.map;t.exports=class extends n{constructor(t,e){super(),this.child=t,this.transform=e}open(){return this.child.open()}put(t,e,r){return this.child.put(this.transform.convert(t),e,r)}get(t,e){return this.child.get(this.transform.convert(t),e)}has(t,e){return this.child.has(this.transform.convert(t),e)}delete(t,e){return this.child.delete(this.transform.convert(t),e)}batch(){const t=this.child.batch();return{put:(e,r)=>{t.put(this.transform.convert(e),r)},delete:e=>{t.delete(this.transform.convert(e))},commit:e=>t.commit(e)}}query(t,e){return o(this.child.query(t,e),t=>(t.key=this.transform.invert(t.key),t))}close(){return this.child.close()}}},function(t,e,r){"use strict";const n=r(16),s=r(6),o=r(3);e.utf8Encoder=new s("utf8"),e.utf8Decoder=new o("utf8"),e.filter=(t,e)=>async function*(){for await(const r of t){await e(r)&&(yield r)}}(),e.sortAll=(t,e)=>async function*(){let r=[];for await(const e of t)r.push(e);r=await e(r);for(const t of r)yield t}(),e.take=(t,e)=>async function*(){if(e<=0)return;let r=0;for await(const n of t)if(yield n,r++,r>=e)return}(),e.map=(t,e)=>async function*(){for await(const r of t)yield e(r)}(),e.replaceStartWith=function(t,e){const r=new RegExp("^"+e);return t.replace(r,"")},e.tmpdir=n},function(t,e,r){"use strict";t.exports=r(7).TextDecoder},function(t,e,r){"use strict";const{nanoid:n}=r(5),s=r(15),{utf8Encoder:o,utf8Decoder:i}=r(2),a=r(3),c=o.encode("/"),u=c[0];class l{constructor(t,e){if("string"==typeof t)this._buf=o.encode(t);else{if(!(t instanceof Uint8Array))throw new Error("Invalid key, should be String of Uint8Array");this._buf=t}if(null==e&&(e=!0),e&&this.clean(),0===this._buf.byteLength||this._buf[0]!==u)throw new Error("Invalid key")}toString(t="utf8"){return"utf8"===t||"utf-8"===t?i.decode(this._buf):new a(t).decode(this._buf)}uint8Array(){return this._buf}get[Symbol.toStringTag](){return`Key(${this.toString()})`}static withNamespaces(t){return new f(t.join("/"))}static random(){return new f(n().replace(/-/g,""))}clean(){if(this._buf&&0!==this._buf.byteLength||(this._buf=c),this._buf[0]!==u){const t=new Uint8Array(this._buf.byteLength+1);t.fill(u,0,1),t.set(this._buf,1),this._buf=t}for(;this._buf.byteLength>1&&this._buf[this._buf.byteLength-1]===u;)this._buf=this._buf.subarray(0,-1)}less(t){const e=this.list(),r=t.list();for(let n=0;n<e.length;n++){if(r.length<n+1)return!1;const t=e[n],s=r[n];if(t<s)return!0;if(t>s)return!1}return e.length<r.length}reverse(){return l.withNamespaces(this.list().slice().reverse())}namespaces(){return this.list()}baseNamespace(){const t=this.namespaces();return t[t.length-1]}list(){return this.toString().split("/").slice(1)}type(){return function(t){const e=t.split(":");if(e.length<2)return"";return e.slice(0,-1).join(":")}(this.baseNamespace())}name(){return function(t){const e=t.split(":");return e[e.length-1]}(this.baseNamespace())}instance(t){return new f(this.toString()+":"+t)}path(){let t=this.parent().toString();return t.endsWith("/")||(t+="/"),t+=this.type(),new f(t)}parent(){const t=this.list();return 1===t.length?new f("/"):new f(t.slice(0,-1).join("/"))}child(t){return"/"===this.toString()?t:"/"===t.toString()?this:new f(this.toString()+t.toString(),!1)}isAncestorOf(t){return t.toString()!==this.toString()&&t.toString().startsWith(this.toString())}isDecendantOf(t){return t.toString()!==this.toString()&&this.toString().startsWith(t.toString())}isTopLevel(){return 1===this.list().length}concat(...t){return l.withNamespaces([...this.namespaces(),...(e=t.map(t=>t.namespaces()),[].concat(...e))]);var e}}const f=s(l,{className:"Key",symbolName:"@ipfs/interface-datastore/key"});t.exports=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"urlAlphabet",{enumerable:!0,get:function(){return n.urlAlphabet}}),e.random=e.customRandom=e.customAlphabet=e.nanoid=void 0;var n=r(14);let s=t=>crypto.getRandomValues(new Uint8Array(t));e.random=s;let o=(t,e,r)=>{let n=(2<<Math.log(t.length-1)/Math.LN2)-1,s=-~(1.6*n*e/t.length);return()=>{let o="";for(;;){let i=r(s),a=s;for(;a--;)if(o+=t[i[a]&n]||"",o.length===+e)return o}}};e.customRandom=o;e.customAlphabet=(t,e)=>o(t,e,s);e.nanoid=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let n=63&r[t];e+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return e}},function(t,e,r){"use strict";t.exports=r(7).TextEncoder},function(t,e,r){"use strict";"object"!=typeof globalThis&&(Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__),t.exports=globalThis},function(t,e,r){"use strict";const{filter:n,sortAll:s,take:o,map:i}=r(2),a=r(18);t.exports=class{async open(){}async close(){}async put(t,e,r={}){}async*putMany(t,e={}){for await(const{key:r,value:n}of t)await this.put(r,n,e),yield{key:r,value:n}}async get(t,e={}){}async*getMany(t,e={}){for await(const r of t)yield this.get(r,e)}async has(t){}async delete(t,e={}){}async*deleteMany(t,e={}){for await(const r of t)await this.delete(r,e),yield r}batch(){let t=[],e=[];return{put(e,r){t.push({key:e,value:r})},delete(t){e.push(t)},commit:async r=>{await a(this.putMany(t,r)),t=[],await a(this.deleteMany(e,r)),e=[]}}}async*_all(t,e){}async*query(t,e){let r=this._all(t,e);if(null!=t.prefix&&(r=n(r,e=>e.key.toString().startsWith(t.prefix))),Array.isArray(t.filters)&&(r=t.filters.reduce((t,e)=>n(t,e),r)),Array.isArray(t.orders)&&(r=t.orders.reduce((t,e)=>s(t,e),r)),null!=t.offset){let e=0;r=n(r,()=>e++>=t.offset)}null!=t.limit&&(r=o(r,t.limit)),!0===t.keysOnly&&(r=i(r,t=>({key:t.key}))),yield*r}}},function(t,e,r){"use strict";const n=r(19);t.exports.dbOpenFailedError=t=>(t=t||new Error("Cannot open database"),n(t,"ERR_DB_OPEN_FAILED")),t.exports.dbDeleteFailedError=t=>(t=t||new Error("Delete failed"),n(t,"ERR_DB_DELETE_FAILED")),t.exports.dbWriteFailedError=t=>(t=t||new Error("Write failed"),n(t,"ERR_DB_WRITE_FAILED")),t.exports.notFoundError=t=>(t=t||new Error("Not Found"),n(t,"ERR_NOT_FOUND")),t.exports.abortedError=t=>(t=t||new Error("Aborted"),n(t,"ERR_ABORTED"))},function(t,e,r){"use strict";const n=r(0).Key,{utf8Decoder:s}=r(11),o=r(21),i=e.PREFIX="/repo/flatfs/shard/",a=e.SHARDING_FN="SHARDING";e.README_FN="_README";class c{constructor(t){this.param=t}fun(t){throw new Error("implement me")}toString(){return`${i}v1/${this.name}/${this.param}`}}class u extends c{constructor(t){super(t),this._padding="".padStart(t,"_"),this.name="prefix"}fun(t){return(t+this._padding).slice(0,this.param)}}class l extends c{constructor(t){super(t),this._padding="".padStart(t,"_"),this.name="suffix"}fun(t){const e=this._padding+t;return e.slice(e.length-this.param)}}class f extends c{constructor(t){super(t),this._padding="".padStart(t+1,"_"),this.name="next-to-last"}fun(t){const e=this._padding+t,r=e.length-this.param-1;return e.slice(r,r+this.param)}}function h(t){if(0===(t=t.trim()).length)throw new Error("empty shard string");if(!t.startsWith(i))throw new Error("invalid or no path prefix: "+t);const e=t.slice(i.length).split("/"),r=e[0];if("v1"!==r)throw new Error(`expect 'v1' version, got '${r}'`);const n=e[1];if(!e[2])throw new Error("missing param");const s=parseInt(e[2],10);switch(n){case"prefix":return new u(s);case"suffix":return new l(s);case"next-to-last":return new f(s);default:throw new Error("unkown sharding function: "+n)}}e.readShardFun=async(t,e)=>{const r=new n(t).child(new n(a)),o="function"==typeof e.getRaw?e.getRaw.bind(e):e.get.bind(e),i=await o(r);return h(s.decode(i||"").trim())},e.readme=o,e.parseShardFun=h,e.Prefix=u,e.Suffix=l,e.NextToLast=f},function(t,e,r){"use strict";const n=r(6),s=r(3);t.exports.utf8Encoder=new n("utf8"),t.exports.utf8Decoder=new s("utf8")},function(t,e,r){t.exports=r(13)},function(t,e,r){"use strict";const n=r(1),s=r(20),o=r(22),i=r(23),a=r(28),c=r(10);e.KeytransformDatastore=n,e.ShardingDatastore=s,e.MountDatastore=o,e.TieredDatastore=i,e.NamespaceDatastore=a,e.shard=c},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.urlAlphabet=void 0;e.urlAlphabet="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"},function(t,e,r){"use strict";t.exports=function(t,{className:e,symbolName:r}){const n=Symbol.for(r),s={[e]:class extends t{constructor(...t){super(...t),Object.defineProperty(this,n,{value:!0})}get[Symbol.toStringTag](){return e}}}[e];return s["is"+e]=t=>!(!t||!t[n]),s},t.exports.proto=function(t,{className:e,symbolName:r,withoutNew:n}){const s=Symbol.for(r),o={[e]:function(...e){if(n&&!(this instanceof o))return new o(...e);const r=t.call(this,...e)||this;return r&&!r[s]&&Object.defineProperty(r,s,{value:!0}),r}}[e];return o.prototype=Object.create(t.prototype),o.prototype.constructor=o,Object.defineProperty(o.prototype,Symbol.toStringTag,{get:()=>e}),o["is"+e]=t=>!(!t||!t[s]),o}},function(t,e,r){"use strict";const{nanoid:n}=r(5);t.exports=(t=(t=>t))=>t(n())},function(t,e,r){"use strict";const n=r(4),s=r(8),o=r(9);t.exports=class extends s{constructor(){super(),this.data={}}async put(t,e){this.data[t.toString()]=e}async get(t){if(!await this.has(t))throw o.notFoundError();return this.data[t.toString()]}async has(t){return void 0!==this.data[t.toString()]}async delete(t){delete this.data[t.toString()]}*_all(){yield*Object.entries(this.data).map(([t,e])=>({key:new n(t),value:e}))}}},function(t,e,r){"use strict";t.exports=async t=>{for await(const e of t);}},function(t,e,r){"use strict";function n(t,e){for(const r in e)Object.defineProperty(t,r,{value:e[r],enumerable:!0,configurable:!0});return t}t.exports=function(t,e,r){if(!t||"string"==typeof t)throw new TypeError("Please pass an Error to err-code");r||(r={}),"object"==typeof e&&(r=e,e=void 0),null!=e&&(r.code=e);try{return n(t,r)}catch(s){r.message=t.message,r.stack=t.stack;const e=function(){};return e.prototype=Object.create(Object.getPrototypeOf(t)),n(new e,r)}}},function(t,e,r){"use strict";const{Adapter:n,Key:s}=r(0),o=r(10),i=r(1),{utf8Encoder:a}=r(11),c=new s(o.SHARDING_FN),u=new s(o.README_FN);class l extends n{constructor(t,e){super(),this.child=new i(t,{convert:this._convertKey.bind(this),invert:this._invertKey.bind(this)}),this.shard=e}open(){return this.child.open()}_convertKey(t){const e=t.toString();if(e===c.toString()||e===u.toString())return t;return new s(this.shard.fun(e)).child(t)}_invertKey(t){const e=t.toString();return e===c.toString()||e===u.toString()?t:s.withNamespaces(t.list().slice(1))}static async createOrOpen(t,e){try{await l.create(t,e)}catch(r){if(r&&"datastore exists"!==r.message)throw r}return l.open(t)}static async open(t){const e=await o.readShardFun("/",t);return new l(t,e)}static async create(t,e){if(!await t.has(c)){const r="function"==typeof t.putRaw?t.putRaw.bind(t):t.put.bind(t);return Promise.all([r(c,a.encode(e.toString()+"\n")),r(u,a.encode(o.readme))])}const r=(await o.readShardFun("/",t)||"").toString(),n=e.toString();if(r!==n)throw new Error(`specified fun ${n} does not match repo shard fun ${r}`);throw new Error("datastore exists")}put(t,e,r){return this.child.put(t,e,r)}get(t,e){return this.child.get(t,e)}has(t,e){return this.child.has(t,e)}delete(t,e){return this.child.delete(t,e)}batch(){return this.child.batch()}query(t,e){const r={keysOnly:t.keysOnly,offset:t.offset,limit:t.limit,filters:[t=>t.key.toString()!==c.toString(),t=>t.key.toString()!==u.toString()]};if(null!=t.prefix&&r.filters.push(e=>this._invertKey(e.key).toString().startsWith(t.prefix)),null!=t.filters){const e=t.filters.map(t=>e=>t(Object.assign({},e,{key:this._invertKey(e.key)})));r.filters=r.filters.concat(e)}return null!=t.orders&&(r.orders=t.orders.map(t=>async e=>{e.forEach(t=>{t.key=this._invertKey(t.key)});const r=await t(e);return r.forEach(t=>{t.key=this._convertKey(t.key)}),r})),this.child.query(r,e)}close(){return this.child.close()}}t.exports=l},function(t,e,r){"use strict";t.exports="This is a repository of IPLD objects. Each IPLD object is in a single file,\nnamed <base32 encoding of cid>.data. Where <base32 encoding of cid> is the\n\"base32\" encoding of the CID (as specified in\nhttps://github.com/multiformats/multibase) without the 'B' prefix.\nAll the object files are placed in a tree of directories, based on a\nfunction of the CID. This is a form of sharding similar to\nthe objects directory in git repositories. Previously, we used\nprefixes, we now use the next-to-last two charters.\n func NextToLast(base32cid string) {\n nextToLastLen := 2\n offset := len(base32cid) - nextToLastLen - 1\n return str[offset : offset+nextToLastLen]\n }\nFor example, an object with a base58 CIDv1 of\n zb2rhYSxw4ZjuzgCnWSt19Q94ERaeFhu9uSqRgjSdx9bsgM6f\nhas a base32 CIDv1 of\n BAFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA\nand will be placed at\n SC/AFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA.data\nwith 'SC' being the last-to-next two characters and the 'B' at the\nbeginning of the CIDv1 string is the multibase prefix that is not\nstored in the filename.\n"},function(t,e,r){"use strict";const{Adapter:n,Key:s,Errors:o,utils:{filter:i,take:a,sortAll:c,replaceStartWith:u}}=r(0),l=r(1);t.exports=class extends n{constructor(t){super(),this.mounts=t.slice()}open(){return Promise.all(this.mounts.map(t=>t.datastore.open()))}_lookup(t){for(const e of this.mounts)if(e.prefix.toString()===t.toString()||e.prefix.isAncestorOf(t)){const r=u(t.toString(),e.prefix.toString());return{datastore:e.datastore,mountpoint:e.prefix,rest:new s(r)}}}put(t,e,r){const n=this._lookup(t);if(null==n)throw o.dbWriteFailedError(new Error("No datastore mounted for this key"));return n.datastore.put(n.rest,e,r)}get(t,e){const r=this._lookup(t);if(null==r)throw o.notFoundError(new Error("No datastore mounted for this key"));return r.datastore.get(r.rest,e)}has(t,e){const r=this._lookup(t);return null!=r&&r.datastore.has(r.rest,e)}delete(t,e){const r=this._lookup(t);if(null==r)throw o.dbDeleteFailedError(new Error("No datastore mounted for this key"));return r.datastore.delete(r.rest,e)}close(){return Promise.all(this.mounts.map(t=>t.datastore.close()))}batch(){const t={},e=e=>{const r=this._lookup(e);if(null==r)throw new Error("No datastore mounted for this key");const n=r.mountpoint.toString();return null==t[n]&&(t[n]=r.datastore.batch()),{batch:t[n],rest:r.rest}};return{put:(t,r)=>{const n=e(t);n.batch.put(n.rest,r)},delete:t=>{const r=e(t);r.batch.delete(r.rest)},commit:e=>Promise.all(Object.keys(t).map(r=>t[r].commit(e)))}}query(t,e){const r=this.mounts.map(r=>{const n=new l(r.datastore,{convert:t=>{throw new Error("should never be called")},invert:t=>r.prefix.child(t)});let s;return null!=t.prefix&&(s=u(t.prefix,r.prefix.toString())),n.query({prefix:s,filters:t.filters,keysOnly:t.keysOnly},e)});let n=(s=r,async function*(){for(let t=0;t<s.length;t++)for await(const e of s[t])yield e}());var s;if(t.filters&&t.filters.forEach(t=>{n=i(n,t)}),t.orders&&t.orders.forEach(t=>{n=c(n,t)}),null!=t.offset){let e=0;n=i(n,()=>e++>=t.offset)}return null!=t.limit&&(n=a(n,t.limit)),n}}},function(t,e,r){"use strict";const{Adapter:n,Errors:s}=r(0),o=r(24)("datastore:core:tiered");t.exports=class extends n{constructor(t){super(),this.stores=t.slice()}async open(){try{await Promise.all(this.stores.map(t=>t.open()))}catch(t){throw s.dbOpenFailedError()}}async put(t,e){try{await Promise.all(this.stores.map(r=>r.put(t,e)))}catch(r){throw s.dbWriteFailedError()}}async get(t,e){for(const n of this.stores)try{const r=await n.get(t,e);if(r)return r}catch(r){o(r)}throw s.notFoundError()}async has(t,e){for(const r of this.stores)if(await r.has(t,e))return!0;return!1}async delete(t,e){try{await Promise.all(this.stores.map(r=>r.delete(t,e)))}catch(r){throw s.dbDeleteFailedError()}}async close(){await Promise.all(this.stores.map(t=>t.close()))}batch(){const t=this.stores.map(t=>t.batch());return{put:(e,r)=>{t.forEach(t=>t.put(e,r))},delete:e=>{t.forEach(t=>t.delete(e))},commit:async e=>{for(const r of t)await r.commit(e)}}}query(t,e){return this.stores[this.stores.length-1].query(t,e)}}},function(t,e,r){"use strict";(function(n){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,s=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(n++,"%c"===t&&(s=n))}),e.splice(s,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(r){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(r){}!t&&void 0!==n&&"env"in n&&(t={NODE_ENV:"production"}.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=r(26)(e);const{formatters:s}=t.exports;s.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,r(25))},function(t,e,r){"use strict";var n,s,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{s="function"==typeof clearTimeout?clearTimeout:a}catch(t){s=a}}();var u,l=[],f=!1,h=-1;function d(){f&&u&&(f=!1,u.length?l=u.concat(l):h=-1,l.length&&p())}function p(){if(!f){var t=c(d);f=!0;for(var e=l.length;e;){for(u=l,l=[];++h<e;)u&&u[h].run();h=-1,e=l.length}u=null,f=!1,function(t){if(s===clearTimeout)return clearTimeout(t);if((s===a||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(t);try{s(t)}catch(e){try{return s.call(null,t)}catch(e){return s.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new y(t,e)),1!==l.length||f||c(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";t.exports=function(t){function e(t){let r;function o(...t){if(!o.enabled)return;const n=o,s=Number(new Date),i=s-(r||s);n.diff=i,n.prev=r,n.curr=s,r=s,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let a=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(r,s)=>{if("%%"===r)return r;a++;const o=e.formatters[s];if("function"==typeof o){const e=t[a];r=o.call(n,e),t.splice(a,1),a--}return r}),e.formatArgs.call(n,t);(n.log||e.log).apply(n,t)}return o.namespace=t,o.enabled=e.enabled(t),o.useColors=e.useColors(),o.color=e.selectColor(t),o.destroy=n,o.extend=s,"function"==typeof e.init&&e.init(o),e.instances.push(o),o}function n(){const t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}function s(t,r){const n=e(this.namespace+(void 0===r?":":r)+t);return n.log=this.log,n}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(o),...e.skips.map(o).map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){let r;e.save(t),e.names=[],e.skips=[];const n=("string"==typeof t?t:"").split(/[\s,]+/),s=n.length;for(r=0;r<s;r++)n[r]&&("-"===(t=n[r].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(r=0;r<e.instances.length;r++){const t=e.instances[r];t.enabled=e.enabled(t.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;let r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(27),Object.keys(t).forEach(r=>{e[r]=t[r]}),e.instances=[],e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e),r|=0;return e.colors[Math.abs(r)%e.colors.length]},e.enable(e.load()),e}},function(t,e,r){"use strict";var n=1e3,s=6e4,o=60*s,i=24*o;function a(t,e,r,n){var s=e>=1.5*r;return Math.round(t/r)+" "+n+(s?"s":"")}t.exports=function(t,e){e=e||{};var r=typeof t;if("string"===r&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*i;case"hours":case"hour":case"hrs":case"hr":case"h":return r*o;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(t);if("number"===r&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=i)return a(t,e,i,"day");if(e>=o)return a(t,e,o,"hour");if(e>=s)return a(t,e,s,"minute");if(e>=n)return a(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=i)return Math.round(t/i)+"d";if(e>=o)return Math.round(t/o)+"h";if(e>=s)return Math.round(t/s)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){"use strict";const n=r(0).Key,s=r(1);t.exports=class extends s{constructor(t,e){super(t,{convert:t=>e.child(t),invert(t){if("/"===e.toString())return t;if(!e.isAncestorOf(t))throw new Error(`Expected prefix: (${e.toString()}) in key: ${t.toString()}`);return new n(t.toString().slice(e.toString().length),!1)}}),this.prefix=e}query(t){return t.prefix&&"/"!==this.prefix.toString()?super.query(Object.assign({},t,{prefix:this.prefix.child(new n(t.prefix)).toString()})):super.query(t)}}}])})); |
{ | ||
"name": "datastore-core", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Wrapper implmentation for interface-datastore", | ||
@@ -41,3 +41,3 @@ "leadMaintainer": "Pedro Teixeira <pedro@protocol.ai>", | ||
"devDependencies": { | ||
"aegir": "^25.0.0", | ||
"aegir": "^28.1.0", | ||
"async-iterator-all": "^1.0.0", | ||
@@ -50,3 +50,3 @@ "chai": "^4.2.0", | ||
"interface-datastore": "^2.0.0", | ||
"ipfs-utils": "^2.3.1" | ||
"ipfs-utils": "^4.0.1" | ||
}, | ||
@@ -63,4 +63,4 @@ "engines": { | ||
"Zane Starr <zcstarr@zaner.attlocal.net>", | ||
"Jacob Heun <jacobheun@gmail.com>", | ||
"Hugo Dias <hugomrdias@gmail.com>", | ||
"Jacob Heun <jacobheun@gmail.com>", | ||
"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <victorbjelkholm@gmail.com>", | ||
@@ -67,0 +67,0 @@ "Pedro Teixeira <i@pgte.me>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51173
- Removedany-signal@1.2.0(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedfast-fifo@1.3.2(transitive)
- Removedfs-extra@8.1.0(transitive)
- Removedipfs-utils@2.4.0(transitive)
- Removediso-url@0.4.7(transitive)
- Removedit-glob@0.0.8(transitive)
- Removedit-to-stream@0.1.2(transitive)
- Removedjsonfile@4.0.0(transitive)
- Removedp-defer@3.0.0(transitive)
- Removedp-fifo@1.0.0(transitive)
- Removeduniversalify@0.1.2(transitive)
Updatedipfs-utils@^4.0.1