Skip to content

Refactor/vcs - #10427

Open
xiaodemen wants to merge 1 commit into
developfrom
refactor/vcs
Open

Refactor/vcs#10427
xiaodemen wants to merge 1 commit into
developfrom
refactor/vcs

Conversation

@xiaodemen

Copy link
Copy Markdown
Contributor

No description provided.

@xiaodemen
xiaodemen force-pushed the refactor/vcs branch 2 times, most recently from f5bfa67 to c8e5fd9 Compare August 21, 2026 07:05
@xiaodemen
xiaodemen marked this pull request as ready for review August 21, 2026 07:05
Copilot AI lite review requested due to automatic review settings August 21, 2026 07:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

ZxBing0066
ZxBing0066 previously approved these changes Aug 21, 2026
Comment thread packages/insomnia-vcs/package.json Outdated
"repository": {
"type": "git",
"url": "git+https://github.com/Kong/insomnia.git",
"directory": "packages/insomnia-data"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be insomnia-vcs

@@ -166,7 +166,6 @@
"zod": "^3.25.75"
},
"devDependencies": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also clean node-forge?

Comment thread packages/insomnia-vcs/__mocks__/uuid.ts Outdated
@@ -0,0 +1,191 @@
let v4Counter = 0;

export const v4UUIDs = [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can directly import it from insomnia-data instead of creating a duplicate one. We can find a way to make it shareable between packages in the future.

import { v4Mock } from '../insomnia-data/__mocks__/uuid';

Comment thread packages/insomnia-data/src/vcs-types.ts Outdated
@@ -1,4 +1,4 @@
import type { BaseModel } from 'insomnia-data';
import type { BaseModel } from './models/base-types';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this file should also in insomnia-vcs instead of insomnia-data?

yaoweiprc
yaoweiprc previously approved these changes Aug 25, 2026
refactor(vcs): move vcs to insomnia-vcs

fix: fix comments
const rawKey = typeof jwkOrKey === 'string' ? jwkOrKey : _b64UrlToHex(jwkOrKey.k || '');
const key = forge.util.hexToBytes(rawKey);
const iv = forge.random.getBytesSync(12);
const cipher = forge.cipher.createCipher('AES-GCM', key);
const rawKey = typeof jwkOrKey === 'string' ? jwkOrKey : _b64UrlToHex(jwkOrKey.k || '');
const key = forge.util.hexToBytes(rawKey);
const iv = forge.random.getBytesSync(12);
const cipher = forge.cipher.createCipher('AES-GCM', key);
// ~~~~~~~~~~~~~~~~~~~~ //
// Decrypt with AES-GCM //
// ~~~~~~~~~~~~~~~~~~~~ //
const decipher = forge.cipher.createDecipher('AES-GCM', key);
// ~~~~~~~~~~~~~~~~~~~~ //
// Decrypt with AES-GCM //
// ~~~~~~~~~~~~~~~~~~~~ //
const decipher = forge.cipher.createDecipher('AES-GCM', key);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants