Socket
Socket
Sign inDemoInstall

@ceramicnetwork/streamid

Package Overview
Dependencies
Maintainers
5
Versions
358
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ceramicnetwork/streamid - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0-rc.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [1.1.0-rc.0](/compare/@ceramicnetwork/streamid@1.0.2...@ceramicnetwork/streamid@1.1.0-rc.0) (2021-07-16)
### Features
* Pass issuer to verifyJWS (#1542) 3c60b0c, closes #1542
## [1.0.2](/compare/@ceramicnetwork/streamid@1.0.1...@ceramicnetwork/streamid@1.0.2) (2021-06-03)

@@ -8,0 +19,0 @@

52

lib/commit-id.js

@@ -11,14 +11,12 @@ "use strict";

};
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};

@@ -28,3 +26,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

};
var _type, _cid, _commit;
var _CommitID_type, _CommitID_cid, _CommitID_commit;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -101,5 +99,5 @@ exports.CommitID = void 0;

this._tag = TAG;
_type.set(this, void 0);
_cid.set(this, void 0);
_commit.set(this, void 0);
_CommitID_type.set(this, void 0);
_CommitID_cid.set(this, void 0);
_CommitID_commit.set(this, void 0);
if (!type && type !== 0)

@@ -109,5 +107,5 @@ throw new Error('constructor: type required');

throw new Error('constructor: cid required');
__classPrivateFieldSet(this, _type, typeof type === 'string' ? stream_type_1.StreamType.codeByName(type) : type);
__classPrivateFieldSet(this, _cid, typeof cid === 'string' ? new cids_1.default(cid) : cid);
__classPrivateFieldSet(this, _commit, parseCommit(__classPrivateFieldGet(this, _cid), commit));
__classPrivateFieldSet(this, _CommitID_type, typeof type === 'string' ? stream_type_1.StreamType.codeByName(type) : type, "f");
__classPrivateFieldSet(this, _CommitID_cid, typeof cid === 'string' ? new cids_1.default(cid) : cid, "f");
__classPrivateFieldSet(this, _CommitID_commit, parseCommit(__classPrivateFieldGet(this, _CommitID_cid, "f"), commit), "f");
}

@@ -118,15 +116,15 @@ static isInstance(instance) {

get baseID() {
return new stream_id_1.StreamID(__classPrivateFieldGet(this, _type), __classPrivateFieldGet(this, _cid));
return new stream_id_1.StreamID(__classPrivateFieldGet(this, _CommitID_type, "f"), __classPrivateFieldGet(this, _CommitID_cid, "f"));
}
get type() {
return __classPrivateFieldGet(this, _type);
return __classPrivateFieldGet(this, _CommitID_type, "f");
}
get typeName() {
return stream_type_1.StreamType.nameByCode(__classPrivateFieldGet(this, _type));
return stream_type_1.StreamType.nameByCode(__classPrivateFieldGet(this, _CommitID_type, "f"));
}
get cid() {
return __classPrivateFieldGet(this, _cid);
return __classPrivateFieldGet(this, _CommitID_cid, "f");
}
get commit() {
return __classPrivateFieldGet(this, _commit) || __classPrivateFieldGet(this, _cid);
return __classPrivateFieldGet(this, _CommitID_commit, "f") || __classPrivateFieldGet(this, _CommitID_cid, "f");
}

@@ -137,10 +135,10 @@ get bytes() {

const type = varint_1.default.encode(this.type);
const commitBytes = ((_a = __classPrivateFieldGet(this, _commit)) === null || _a === void 0 ? void 0 : _a.bytes) || new Uint8Array([0]);
const commitBytes = ((_a = __classPrivateFieldGet(this, _CommitID_commit, "f")) === null || _a === void 0 ? void 0 : _a.bytes) || new Uint8Array([0]);
return concat_1.default([codec, type, this.cid.bytes, commitBytes]);
}
atCommit(commit) {
return new CommitID(__classPrivateFieldGet(this, _type), __classPrivateFieldGet(this, _cid), commit);
return new CommitID(__classPrivateFieldGet(this, _CommitID_type, "f"), __classPrivateFieldGet(this, _CommitID_cid, "f"), commit);
}
equals(other) {
return this.type === other.type && this.cid.equals(other.cid) && this.commit.equals(other.commit);
return (this.type === other.type && this.cid.equals(other.cid) && this.commit.equals(other.commit));
}

@@ -153,3 +151,3 @@ toString() {

}
[(_type = new WeakMap(), _cid = new WeakMap(), _commit = new WeakMap(), Symbol.for('nodejs.util.inspect.custom'))]() {
[(_CommitID_type = new WeakMap(), _CommitID_cid = new WeakMap(), _CommitID_commit = new WeakMap(), Symbol.for('nodejs.util.inspect.custom'))]() {
return `CommitID(${this.toString()})`;

@@ -156,0 +154,0 @@ }

@@ -11,14 +11,12 @@ "use strict";

};
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};

@@ -28,3 +26,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

};
var _type, _cid;
var _StreamID_type, _StreamID_cid;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -63,4 +61,4 @@ exports.StreamID = void 0;

this._tag = TAG;
_type.set(this, void 0);
_cid.set(this, void 0);
_StreamID_type.set(this, void 0);
_StreamID_cid.set(this, void 0);
if (!(type || type === 0))

@@ -70,4 +68,4 @@ throw new Error('constructor: type required');

throw new Error('constructor: cid required');
__classPrivateFieldSet(this, _type, typeof type === 'string' ? stream_type_1.StreamType.codeByName(type) : type);
__classPrivateFieldSet(this, _cid, typeof cid === 'string' ? new cids_1.default(cid) : cid);
__classPrivateFieldSet(this, _StreamID_type, typeof type === 'string' ? stream_type_1.StreamType.codeByName(type) : type, "f");
__classPrivateFieldSet(this, _StreamID_cid, typeof cid === 'string' ? new cids_1.default(cid) : cid, "f");
}

@@ -78,9 +76,9 @@ static isInstance(instance) {

get type() {
return __classPrivateFieldGet(this, _type);
return __classPrivateFieldGet(this, _StreamID_type, "f");
}
get typeName() {
return stream_type_1.StreamType.nameByCode(__classPrivateFieldGet(this, _type));
return stream_type_1.StreamType.nameByCode(__classPrivateFieldGet(this, _StreamID_type, "f"));
}
get cid() {
return __classPrivateFieldGet(this, _cid);
return __classPrivateFieldGet(this, _StreamID_cid, "f");
}

@@ -93,6 +91,6 @@ get bytes() {

get baseID() {
return new StreamID(__classPrivateFieldGet(this, _type), __classPrivateFieldGet(this, _cid));
return new StreamID(__classPrivateFieldGet(this, _StreamID_type, "f"), __classPrivateFieldGet(this, _StreamID_cid, "f"));
}
atCommit(commit) {
return new commit_id_1.CommitID(__classPrivateFieldGet(this, _type), __classPrivateFieldGet(this, _cid), commit);
return new commit_id_1.CommitID(__classPrivateFieldGet(this, _StreamID_type, "f"), __classPrivateFieldGet(this, _StreamID_cid, "f"), commit);
}

@@ -113,3 +111,3 @@ equals(other) {

}
[(_type = new WeakMap(), _cid = new WeakMap(), Symbol.for('nodejs.util.inspect.custom'))]() {
[(_StreamID_type = new WeakMap(), _StreamID_cid = new WeakMap(), Symbol.for('nodejs.util.inspect.custom'))]() {
return `StreamID(${this.toString()})`;

@@ -116,0 +114,0 @@ }

{
"name": "@ceramicnetwork/streamid",
"version": "1.0.2",
"version": "1.1.0-rc.0",
"description": "Ceramic Stream Ids",

@@ -15,3 +15,3 @@ "keywords": [

"scripts": {
"test": "../../node_modules/.bin/jest --silent --coverage --env=node",
"test": "../../node_modules/.bin/jest --silent --coverage",
"build": "../../node_modules/.bin/tsc -p tsconfig.json",

@@ -38,3 +38,7 @@ "prepublishOnly": "npm run build",

},
"gitHead": "6ebe26687e83c6847c7cad362551701ae1176df0"
"jest": {
"testEnvironment": "node",
"resolver": "jest-resolver-enhanced"
},
"gitHead": "96da1ec80824d70b03cd4c199560c207f401f5f1"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc