Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
npenin committed Nov 23, 2024
1 parent 2e915af commit 95c63b9
Show file tree
Hide file tree
Showing 40 changed files with 1,102 additions and 1,301 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
},
"funding": "https://github.com/npenin/akala?sponsor=1",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^8.10.0",
"@typescript-eslint/parser": "^8.10.0",
"bun-types": "^1.1.30",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"bun-types": "^1.1.36",
"commitizen": "^4.3.1",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^9.12.0",
"typescript": "^5.6.3",
"vite": "^5.4.9",
"eslint": "^9.15.0",
"typescript": "^5.7.2",
"vite": "^5.4.11",
"why-is-node-still-running": "^1.0.0"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@akala/server": "workspace:^",
"@types/co-body": "^6.1.3",
"@types/debug": "^4.1.12",
"@types/node": "^20.16.12",
"typescript": "^5.6.3"
"@types/node": "^20.17.7",
"typescript": "^5.7.2"
},
"version": "2.0.39",
"scripts": {
Expand All @@ -59,4 +59,4 @@
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"typings": "./dist/esm/index.d.ts"
}
}
6 changes: 3 additions & 3 deletions packages/authentication/src/server/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default async function (this: State, username: string, password: string,
if (!user)
throw new ErrorWithStatus(401, 'Invalid Username (or password).');

if (!await this.verifyHash(password, base64.base64DecToArr(user.password), base64.base64DecToArr(user.salt)))
if (!await this.verifyHash(password, base64.base64DecToArr(user.password), base64.base64DecToArr(user.salt).buffer))
throw new ErrorWithStatus(401, 'Invalid (Username or) password).');

if (user.disabled)
Expand All @@ -27,7 +27,7 @@ export default async function (this: State, username: string, password: string,

session.userId = user.id;

return { id: user.id, sessionId: session.id, sessionSignature: await this.getHash(session.id, new Uint8Array(base64.base64DecToArr(user.salt))) }
return { id: user.id, sessionId: session.id, sessionSignature: await this.getHash(session.id, base64.base64DecToArr(user.salt).buffer) }
}

export async function validateSessionOwner(state: State, sessionId: string, sessionSignature: string): Promise<Session | null>
Expand All @@ -43,7 +43,7 @@ export async function validateSessionOwner(state: State, sessionId: string, sess
session = await extendSession.call(this, sessionId);

const user = await state.store.User.where('id', BinaryOperator.Equal, session.userId).firstOrDefault();
if (!await state.verifyHash(sessionId, base64.base64DecToArr(sessionSignature), base64.base64DecToArr(user.salt)))
if (!await state.verifyHash(sessionId, base64.base64DecToArr(sessionSignature), base64.base64DecToArr(user.salt).buffer))
throw new ErrorWithStatus(401, 'Invalid session signature.');

return session;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function hashPassword(state: State, password: string)
{
const salt = new Uint8Array(128);
crypto.getRandomValues(salt);
return { salt: base64.base64EncArr(salt), password: await state.getHash(password, salt) };
return { salt: base64.base64EncArr(salt), password: await state.getHash(password, salt.buffer) };
}

export default async function (this: State, userName: string, password: string)
Expand Down
4 changes: 2 additions & 2 deletions packages/authentication/src/server/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { AuthenticationStore } from './authentication-store.js';
export interface State
{
router: import("@akala/server").HttpRouter;
getHash: (value: string, salt?: ArrayBuffer) => Promise<string>;
verifyHash: (value: string, signature: BufferSource, salt?: ArrayBuffer) => Promise<boolean>;
getHash: (value: string, salt?: ArrayBufferLike) => Promise<string>;
verifyHash: (value: string, signature: BufferSource, salt?: ArrayBufferLike) => Promise<boolean>;
store: AuthenticationStore;
session: {
slidingExpiration?: number
Expand Down
4 changes: 2 additions & 2 deletions packages/automate-yamlloader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@akala/automate": "workspace:^",
"@akala/config": "workspace:^",
"@akala/pm": "workspace:^",
"yaml": "^2.6.0"
"yaml": "^2.6.1"
},
"devDependencies": {
"@akala/commands": "workspace:^"
Expand All @@ -44,4 +44,4 @@
},
"types": "./dist/esm/index.d.ts",
"typings": "./dist/esm/index.d.ts"
}
}
10 changes: 5 additions & 5 deletions packages/automate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"homepage": "https://akala.js.org/automate",
"source": "src/index.ts",
"devDependencies": {
"@types/assert": "^1.5.10",
"@types/mocha": "^10.0.9",
"@types/assert": "^1.5.11",
"@types/mocha": "^10.0.10",
"assert": "^2.1.0",
"mocha": "^10.7.3",
"mocha": "^10.8.2",
"source-map-support": "^0.5.21",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
},
"gitHead": "afe8c192d4975f51ed95b2921da95b767be3879c",
"dependencies": {
Expand Down Expand Up @@ -69,4 +69,4 @@
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"typings": "./dist/esm/index.d.ts"
}
}
4 changes: 2 additions & 2 deletions packages/aws-lambda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
},
"devDependencies": {
"@aws-sdk/client-lambda": "^3.670.0",
"@aws-sdk/client-lambda": "^3.699.0",
"@types/aws-lambda": "^8.10.145"
},
"exports": {
Expand All @@ -35,4 +35,4 @@
}
},
"types": "./dist/esm/index.d.ts"
}
}
2 changes: 1 addition & 1 deletion packages/aws-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"generate": "yarn run generate-cli",
"generate-metadata": "yarn run generate-metadata-cli"
}
}
}
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"source": "src/index.ts",
"devDependencies": {
"@types/debug": "^4.1.12",
"@types/ws": "^8.5.12",
"@types/ws": "^8.5.13",
"source-map-support": "^0.5.21",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
},
"bin": {
"akala": "./dist/esm/cli.js"
Expand Down
8 changes: 4 additions & 4 deletions packages/client-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
"@akala/pages": "workspace:^",
"@akala/pm": "workspace:^",
"esbuild": "^0.24.0",
"esbuild-plugin-html-modules": "^0.7.2",
"parse5": "^7.2.0",
"esbuild-plugin-html-modules": "^0.8.0",
"parse5": "^7.2.1",
"source-map": "^0.7.4"
},
"devDependencies": {
"@akala/cli": "workspace:^",
"@akala/commands": "workspace:^",
"bun-types": "^1.1.30"
"bun-types": "^1.1.36"
}
}
}
6 changes: 3 additions & 3 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@types/mime": "^4.0.0",
"@types/orchestrator": "0.3.6",
"@types/showdown": "^2.0.6",
"@types/ws": "^8.5.12",
"@types/ws": "^8.5.13",
"content-type": "^1.0.5",
"mime": "^4.0.4",
"orchestrator": "^0.3.8",
Expand All @@ -37,7 +37,7 @@
"querystring-es3": "^0.2.1",
"stream-browserify": "^3.0.0",
"ts-loader": "^9.5.1",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
},
"optionalDependencies": {
"@popperjs/core": "^2.11.8",
Expand Down Expand Up @@ -71,4 +71,4 @@
},
"module": "./dist/esm/index.js",
"typings": "./dist/esm/index.d.ts"
}
}
12 changes: 6 additions & 6 deletions packages/commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@
},
"devDependencies": {
"@types/debug": "^4.1.12",
"@types/mocha": "^10.0.9",
"@types/node": "^20.16.12",
"@types/mocha": "^10.0.10",
"@types/node": "^20.17.7",
"@types/split2": "^4.2.3",
"@types/ws": "^8.5.12",
"mocha": "^10.7.3",
"@types/ws": "^8.5.13",
"mocha": "^10.8.2",
"nyc": "^17.1.0",
"source-map-support": "^0.5.21",
"typescript": "^5.6.3",
"typescript": "^5.7.2",
"typescript-json-schema": "^0.65.1"
},
"gitHead": "d92f6693ed8cca439c8e92d2045bb15c0a7dae43",
Expand Down Expand Up @@ -121,4 +121,4 @@
},
"types": "./dist/esm/index.browser.d.ts",
"module": "./dist/esm/index.browser.js"
}
}
4 changes: 2 additions & 2 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"devDependencies": {
"@akala/cli": "workspace:^",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
},
"bin": {
"uci2": "./dist/cli.js"
Expand Down Expand Up @@ -58,4 +58,4 @@
},
"module": "./dist/esm/index.js",
"typings": "./dist/esm/index.d.ts"
}
}
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
"devDependencies": {
"@types/debug": "^4.1.12",
"merge2": "^1.4.1",
"mocha": "^10.7.3",
"mocha": "^10.8.2",
"source-map-support": "^0.5.21",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
},
"types": "./dist/esm/index.d.ts",
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/base64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ function uint6ToB64(nUint6)

export function base64UrlEncArr(aBytes: ArrayBuffer | Uint8Array): string
{
return base64EncArr(aBytes).replaceAll('+', '-').replaceAll('/', '_').replace(/=+$/, '');
return base64EncArr(aBytes).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
}
export function base64UrlDecToArr(s: string): ArrayBuffer | Uint8Array
{
s = s.replaceAll('-', '+').replaceAll('_', '/');
s = s.replace(/-/g, '+').replace(/_/g, '/');
switch (s.length % 3)
{
case 0:
Expand All @@ -85,7 +85,7 @@ export function base64UrlDecToArr(s: string): ArrayBuffer | Uint8Array
s += '==';
break;
}
return base64DecToArr(s.replaceAll('-', '+').replaceAll('_', '/'));
return base64DecToArr(s.replace(/-/g, '+').replace(/_/g, '/'));
}

export function extractPrivateKey(pem: string)
Expand Down Expand Up @@ -219,7 +219,7 @@ export function strToUTF8Arr(sDOMStr: string): ArrayBuffer
: 6;
}

const aBytes = new Uint8Array(nArrLen);
const aBytes = new ArrayBuffer(nArrLen);

/* transcription… */
let nIdx = 0;
Expand Down
2 changes: 1 addition & 1 deletion packages/cron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"typings": "./dist/esm/index.d.ts"
}
}
2 changes: 1 addition & 1 deletion packages/crud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
},
"module": "./dist/esm/index.js",
"typings": "./dist/esm/index.d.ts"
}
}
2 changes: 1 addition & 1 deletion packages/daemonize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"devDependencies": {
"@types/node": "^20.16.12"
"@types/node": "^20.17.7"
},
"scripts": {
"test": "echo \"Error: no test specified\""
Expand Down
8 changes: 4 additions & 4 deletions packages/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
},
"devDependencies": {
"@akala/client": "workspace:^",
"@fortawesome/fontawesome-common-types": "^6.6.0",
"@fortawesome/fontawesome-common-types": "^6.7.1",
"@popperjs/core": "^2.11.8",
"@types/debug": "^4.1.12",
"@types/node": "^20.16.12",
"typescript": "^5.6.3"
"@types/node": "^20.17.7",
"typescript": "^5.7.2"
},
"exports": {
"import": {
Expand All @@ -57,4 +57,4 @@
},
"module": "./dist/esm/index.js",
"typings": "./dist/esm/index.d.ts"
}
}
4 changes: 2 additions & 2 deletions packages/gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"funding": "https://github.com/npenin/akala?sponsor=1",
"devDependencies": {
"@akala/commands": "workspace:^",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
},
"preferGlobal": true,
"scripts": {
Expand All @@ -42,4 +42,4 @@
},
"module": "./dist/esm/index.js",
"typings": "./dist/esm/index.d.ts"
}
}
14 changes: 7 additions & 7 deletions packages/json-rpc-ws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
"src/browser.ts"
],
"devDependencies": {
"@types/assert": "1.5.10",
"@types/assert": "1.5.11",
"@types/debug": "4.1.12",
"@types/node": "^20.16.12",
"@types/ws": "^8.5.12",
"@types/node": "^20.17.7",
"@types/ws": "^8.5.13",
"bufferutil": "^4.0.8",
"mocha": "^10.7.3",
"puppeteer": "^23.6.0",
"selenium-webdriver": "^4.25.0",
"mocha": "^10.8.2",
"puppeteer": "^23.9.0",
"selenium-webdriver": "^4.26.0",
"source-map-support": "^0.5.21",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
},
"gitHead": "d92f6693ed8cca439c8e92d2045bb15c0a7dae43",
"exports": {
Expand Down
Loading

0 comments on commit 95c63b9

Please sign in to comment.