Compare commits
4 Commits
v0.2.0-dev
...
v0.2.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 34699434e4 | |
Derrick Hammer | 5db121774e | |
Derrick Hammer | 97df324828 | |
Derrick Hammer | d8e2046ebd |
|
@ -1,3 +1,11 @@
|
||||||
|
# [0.2.0-develop.8](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.7...v0.2.0-develop.8) (2023-06-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* make getActivePortals return an array, not a set ([d8e2046](https://git.lumeweb.com/LumeWeb/libweb/commit/d8e2046ebda8b428cfcd5470d63a9c09a6047819))
|
||||||
|
* need to use length, not size ([5db1217](https://git.lumeweb.com/LumeWeb/libweb/commit/5db121774ebf7c4eec4360a299cfb54991091747))
|
||||||
|
|
||||||
# [0.2.0-develop.7](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.6...v0.2.0-develop.7) (2023-06-23)
|
# [0.2.0-develop.7](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.6...v0.2.0-develop.7) (2023-06-23)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.7",
|
"version": "0.2.0-develop.8",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.7",
|
"version": "0.2.0-develop.8",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lumeweb/libportal": "0.2.0-develop.5",
|
"@lumeweb/libportal": "0.2.0-develop.5",
|
||||||
"@noble/curves": "^1.1.0",
|
"@noble/curves": "^1.1.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libweb",
|
"name": "@lumeweb/libweb",
|
||||||
"version": "0.2.0-develop.7",
|
"version": "0.2.0-develop.8",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -7,7 +7,7 @@ const NO_PORTALS_ERROR = [null, "no active portals"] as ErrTuple;
|
||||||
export async function downloadObject(cid: string): Promise<ErrTuple> {
|
export async function downloadObject(cid: string): Promise<ErrTuple> {
|
||||||
const activePortals = getActivePortals();
|
const activePortals = getActivePortals();
|
||||||
|
|
||||||
if (!activePortals.size) {
|
if (!activePortals.length) {
|
||||||
return NO_PORTALS_ERROR;
|
return NO_PORTALS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,8 @@ export function generatePortalKeyPair(portal: Portal): KeyPair {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getActivePortals(): Set<Client> {
|
export function getActivePortals(): Client[] {
|
||||||
return ACTIVE_PORTALS;
|
return [...ACTIVE_PORTALS];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addActivePortal(portal: Client) {
|
export function addActivePortal(portal: Client) {
|
||||||
|
@ -76,6 +76,7 @@ export function initPortal(portal: Portal) {
|
||||||
|
|
||||||
addActivePortal(client);
|
addActivePortal(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPortalSessions() {
|
export function getPortalSessions() {
|
||||||
let portalSessionsData = window.localStorage.getItem("portals");
|
let portalSessionsData = window.localStorage.getItem("portals");
|
||||||
let portalSessions: PortalSessionsStore = {};
|
let portalSessions: PortalSessionsStore = {};
|
||||||
|
|
Loading…
Reference in New Issue