Compare commits
3 Commits
0c47ef6e53
...
3b0cd655de
Author | SHA1 | Date |
---|---|---|
|
3b0cd655de | |
|
4f8c80fb62 | |
|
4830de48b4 |
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
|
||||||
|
"changelog": "@changesets/cli/changelog",
|
||||||
|
"commit": false,
|
||||||
|
"fixed": [],
|
||||||
|
"linked": [],
|
||||||
|
"access": "public",
|
||||||
|
"baseBranch": "master",
|
||||||
|
"updateInternalDependencies": "patch",
|
||||||
|
"ignore": []
|
||||||
|
}
|
|
@ -1,13 +0,0 @@
|
||||||
name: Build/Publish
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
- develop-*
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
main:
|
|
||||||
uses: lumeweb/github-node-deploy-workflow/.github/workflows/main.yml@master
|
|
||||||
secrets: inherit
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,6 +8,7 @@
|
||||||
"url": "gitea@git.lumeweb.com:LumeWeb/libs5.git"
|
"url": "gitea@git.lumeweb.com:LumeWeb/libs5.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@changesets/cli": "^2.27.1",
|
||||||
"@lumeweb/node-library-preset": "^0.2.7",
|
"@lumeweb/node-library-preset": "^0.2.7",
|
||||||
"presetter": "*"
|
"presetter": "*"
|
||||||
},
|
},
|
||||||
|
|
|
@ -22,16 +22,23 @@ export class Multihash {
|
||||||
while (hash.length % 4 !== 0) {
|
while (hash.length % 4 !== 0) {
|
||||||
hash += "=";
|
hash += "=";
|
||||||
}
|
}
|
||||||
|
if (hash[0] !== "u") {
|
||||||
|
hash = "u" + hash;
|
||||||
|
}
|
||||||
const bytes = base64url.decode(hash);
|
const bytes = base64url.decode(hash);
|
||||||
return new Multihash(new Uint8Array(bytes));
|
return new Multihash(new Uint8Array(bytes));
|
||||||
}
|
}
|
||||||
|
|
||||||
toBase64Url(): string {
|
toBase64Url(): string {
|
||||||
return base64url.encode(this.fullBytes);
|
return base64url.encode(this.fullBytes).substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
toBase32(): string {
|
toBase32(): string {
|
||||||
return base32.encode(this.fullBytes).replace(/=/g, "").toLowerCase();
|
return base32
|
||||||
|
.encode(this.fullBytes)
|
||||||
|
.replace(/=/g, "")
|
||||||
|
.toLowerCase()
|
||||||
|
.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
toString(): string {
|
toString(): string {
|
||||||
|
|
Loading…
Reference in New Issue