Compare commits
No commits in common. "3b0cd655de2b2bcd0e9517fe93c00b8177a0d13c" and "0c47ef6e533bb18b3e998d9b41adb67a439b6c03" have entirely different histories.
3b0cd655de
...
0c47ef6e53
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"$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": []
|
|
||||||
}
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
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,7 +8,6 @@
|
||||||
"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,23 +22,16 @@ 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).substring(1);
|
return base64url.encode(this.fullBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
toBase32(): string {
|
toBase32(): string {
|
||||||
return base32
|
return base32.encode(this.fullBytes).replace(/=/g, "").toLowerCase();
|
||||||
.encode(this.fullBytes)
|
|
||||||
.replace(/=/g, "")
|
|
||||||
.toLowerCase()
|
|
||||||
.substring(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
toString(): string {
|
toString(): string {
|
||||||
|
|
Loading…
Reference in New Issue