Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cpanyjs/CPany
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.32
Choose a base ref
...
head repository: cpanyjs/CPany
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.1.33
Choose a head ref
  • 7 commits
  • 16 files changed
  • 3 contributors

Commits on Jan 24, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b65e90b View commit details
  2. fix(ci): bump node version

    yjl9903 committed Jan 24, 2024
    Copy the full SHA
    94fa5b6 View commit details
  3. fix(ci): only deploy on main

    yjl9903 committed Jan 24, 2024
    Copy the full SHA
    ba5fc56 View commit details
  4. chore: update capture-website

    yjl9903 committed Jan 24, 2024
    Copy the full SHA
    9d26c02 View commit details
  5. Copy the full SHA
    e5ff0f5 View commit details
  6. Copy the full SHA
    46eed1f View commit details
  7. release: v0.1.33

    yjl9903 committed Jan 24, 2024
    Copy the full SHA
    f67df5f View commit details
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
cache: pnpm

- run: pnpm install
@@ -51,6 +51,7 @@ jobs:

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
@@ -67,7 +68,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
cache: pnpm

- name: Build CPany
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"devDependencies": {
"@types/fs-extra": "^9.0.13",
"@types/node": "^18.0.6",
"capture-website-cli": "^3.0.0",
"capture-website-cli": "^4.0.0",
"execa": "^6.1.0",
"fs-extra": "^10.1.0",
"lint-staged": "^13.0.3",
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/app",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany web app",
"keywords": [
"CPany",
2 changes: 1 addition & 1 deletion packages/atcoder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/plugin-atcoder",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany AtCoder plugin",
"keywords": [
"CPany",
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/cli",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany cli package",
"keywords": [
"CPany",
@@ -71,7 +71,7 @@
"@cpany/plugin-codeforces": "workspace:*",
"@cpany/plugin-hdu": "workspace:*",
"@cpany/plugin-luogu": "workspace:*",
"capture-website-cli": "^3.0.0"
"capture-website-cli": "^4.0.0"
},
"peerDependenciesMeta": {
"@cpany/plugin-atcoder": {
4 changes: 2 additions & 2 deletions packages/cli/src/plugins/loader.ts
Original file line number Diff line number Diff line change
@@ -74,8 +74,8 @@ export async function createLoader(cliOption: IPluginOption) {
const overview = (user: IUser): IUserOverview => {
const submissions: IUserOverview['submissions'] = [];

const solved: Map<string, typeof submissions[number]> = new Map();
const solve = (problem: IProblem, sub: typeof submissions[number]) => {
const solved: Map<string, (typeof submissions)[number]> = new Map();
const solve = (problem: IProblem, sub: (typeof submissions)[number]) => {
const id = `${problem.type}:${problem.id}`;
const pre = solved.get(id);
if (pre === undefined) {
2 changes: 1 addition & 1 deletion packages/codeforces/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/plugin-codeforces",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany Codeforces plugin",
"keywords": [
"CPany",
23 changes: 9 additions & 14 deletions packages/codeforces/src/index.ts
Original file line number Diff line number Diff line change
@@ -12,12 +12,7 @@ import { diffCodeforcesPlugin } from './diff';

export * from './constant';


async function delay(ms:number) {
return new Promise((resolve)=>{
setTimeout(resolve, ms);
});
}
const delay = async (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));

export function codeforcesPlugin(option: ICPanyPluginConfig): CPanyPlugin[] {
const api = axios.create({
@@ -27,19 +22,19 @@ export function codeforcesPlugin(option: ICPanyPluginConfig): CPanyPlugin[] {
maxBodyLength: Infinity
});

let original_get = api.get;
let original_post = api.post;
(api as any).get = async function(...args: [any, any]) {
let result = await original_get(...args);
const originalGet = api.get.bind(api);
const originalPost = api.post.bind(api);
api.get = async function (...args: Parameters<typeof originalGet>) {
let result = await originalGet(...args);
await delay(800);
return result;
};
} as typeof api.get;

(api as any).post = async function(...args: [any, any, any]) {
let result = await original_post(...args);
api.post = async function (...args: Parameters<typeof originalPost>) {
let result = await originalPost(...args);
await delay(800);
return result;
};
} as typeof api.post;

const oldHandles: IHandleWithCodeforces[] = [];
const newHandles: IHandleWithCodeforces[] = [];
2 changes: 1 addition & 1 deletion packages/compress/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/compress",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany compress package",
"keywords": [
"CPany"
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/core",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany core package",
"keywords": [
"CPany"
2 changes: 1 addition & 1 deletion packages/hdu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/plugin-hdu",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany HDu plugin",
"keywords": [
"CPany",
2 changes: 1 addition & 1 deletion packages/luogu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/plugin-luogu",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany Luogu plugin",
"keywords": [
"CPany",
2 changes: 1 addition & 1 deletion packages/nowcoder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/plugin-nowcoder",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany Nowcoder plugin",
"keywords": [
"CPany",
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/types",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany types package",
"keywords": [
"CPany"
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cpany/utils",
"version": "0.1.32",
"version": "0.1.33",
"description": "CPany utils package",
"keywords": [
"CPany",
709 changes: 256 additions & 453 deletions pnpm-lock.yaml

Large diffs are not rendered by default.