Conversation
| ).props.onClick(); | ||
| expect(Array.from(result.setters[0].mock.results.at(-1)?.value ?? [])).toEqual([]); | ||
|
|
||
| result = renderPanel({ 3: "custom-1", 4: " " }); |
| import { parseVMess } from "@subboost/core/parser/protocols/vmess"; | ||
| import { parseVLESS } from "@subboost/core/parser/protocols/vless"; | ||
| import { normalizeSsPlugin, parseSS } from "@subboost/core/parser/protocols/ss"; | ||
| import { parseNetch } from "@subboost/core/parser/protocols/netch"; |
| import { parseVLESS } from "@subboost/core/parser/protocols/vless"; | ||
| import { normalizeSsPlugin, parseSS } from "@subboost/core/parser/protocols/ss"; | ||
| import { parseNetch } from "@subboost/core/parser/protocols/netch"; | ||
| import { preprocessSubscriptionContent } from "@subboost/core/parser/preprocess"; |
| import { | ||
| SUBBOOST_TEMPLATE_CONFIG_SCHEMA, | ||
| validateSubBoostTemplateConfig, | ||
| } from "@subboost/core/templates/config-template"; |
| return Buffer.from(value).toString("base64url"); | ||
| } | ||
|
|
||
| function netchLink(value: Record<string, unknown>): string { |
| return `netch://${b64(JSON.stringify(value))}`; | ||
| } | ||
|
|
||
| function record(value: unknown): Record<string, unknown> { |
| @@ -0,0 +1,585 @@ | |||
| import { describe, expect, it } from "vitest"; | |||
| import { parseClashYaml } from "../../../packages/core/src/parser/clash-yaml"; | |||
| @@ -0,0 +1,585 @@ | |||
| import { describe, expect, it } from "vitest"; | |||
| import { parseClashYaml } from "../../../packages/core/src/parser/clash-yaml"; | |||
| import { canonicalizeParsedNode, pickAliasValue } from "../../../packages/core/src/parser/canonical-fields"; | |||
| import { | ||
| parseLineBasedSubscriptionContent, | ||
| parseSubscriptionContentByRegistry, | ||
| splitNodeLinkSegments, | ||
| } from "../../../packages/core/src/parser/content-parsers"; |
| parseSubscriptionContentByRegistry, | ||
| splitNodeLinkSegments, | ||
| } from "../../../packages/core/src/parser/content-parsers"; | ||
| import { preprocessSubscriptionContent } from "../../../packages/core/src/parser/preprocess"; |
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 963ae470f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await expect(parse("String Port = http, string-port.example.com, 8080")).resolves.toMatchObject({ | ||
| name: "String Port", | ||
| type: "http", | ||
| port: "8080", |
There was a problem hiding this comment.
Assert numeric port normalization
For the controlled string-port fixture, this expectation now requires parsePlatformProxyLine to return port as the string "8080", even though ParsedNode/generated proxy nodes model ports as numbers and the test name says this branch is normalizing string ports. This codifies the unnormalized value, so a fix that actually converts parser output to 8080 would fail the regression suite; assert the numeric port instead.
Useful? React with 👍 / 👎.
Summary
Validation