Compare commits
4
Commits
release/68
...
release/70
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55ab5b27dc | ||
|
|
1c0af891fa | ||
|
|
528744ebf6 | ||
|
|
bd52160d91 |
No files matched your search
@@ -103,6 +103,12 @@ git push origin main:release/66
|
|||||||
pnpm deploy:web:staging
|
pnpm deploy:web:staging
|
||||||
```
|
```
|
||||||
|
|
||||||
staging Pages 배포 스크립트는 `CF_PAGES_STAGING_BRANCH`가 있으면 그 값을
|
staging/prod Pages 배포 스크립트는 명시 릴리즈 브랜치 환경변수가 있으면 그
|
||||||
사용하고, 없으면 최신 `release/*` 브랜치를 자동으로 선택합니다. 최신 기준은
|
값을 사용하고, 없으면 최신 `release/*` 브랜치를 자동으로 선택합니다. 최신
|
||||||
브랜치가 가리키는 커밋 시각이며, 동률이면 브랜치명 내림차순입니다.
|
기준은 브랜치가 가리키는 커밋 시각이며, 동률이면 브랜치명 내림차순입니다.
|
||||||
|
staging은 선택된 릴리즈 브랜치로 preview 배포를 만들고, prod는 Cloudflare
|
||||||
|
Pages production branch로 업로드해 production 배포를 만듭니다.
|
||||||
|
|
||||||
|
명시 릴리즈 브랜치는 staging은 `CF_PAGES_STAGING_BRANCH`, prod는
|
||||||
|
`CF_PAGES_RELEASE_BRANCH`로 지정합니다. Cloudflare Pages production branch가
|
||||||
|
`main`이 아니면 `CF_PAGES_PRODUCTION_BRANCH`로 지정합니다.
|
||||||
+2
-2
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
## Riot Background Refresh
|
## Riot Background Refresh
|
||||||
|
|
||||||
Set `RIOT_BG_REFRESH_ENABLED=true` to refresh stale Riot accounts automatically
|
Stale Riot accounts refresh automatically between KST 03:00 and 10:00.
|
||||||
between KST 03:00 and 10:00. The scheduler picks active users whose
|
The scheduler picks active users whose
|
||||||
`lastRefreshRequestedAt` is older than 6 hours, oldest first, and uses a
|
`lastRefreshRequestedAt` is older than 6 hours, oldest first, and uses a
|
||||||
background-only Riot token bucket capped at roughly 40% of the app rate limit.
|
background-only Riot token bucket capped at roughly 40% of the app rate limit.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { ConfigService } from '@nestjs/config';
|
|
||||||
import mongoose from 'mongoose';
|
import mongoose from 'mongoose';
|
||||||
import { GarnetService } from '../global/garnet/garnet.service';
|
import { GarnetService } from '../global/garnet/garnet.service';
|
||||||
import { RiotAccountEnrichmentService } from '../riot/riot-account-enrichment.service';
|
import { RiotAccountEnrichmentService } from '../riot/riot-account-enrichment.service';
|
||||||
@@ -30,7 +29,7 @@ function candidate(puuid: string): StaleAccountCandidate {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeScheduler(enabled = true) {
|
function makeScheduler() {
|
||||||
const rawClient = {
|
const rawClient = {
|
||||||
sendCommand: jest.fn().mockResolvedValue(1),
|
sendCommand: jest.fn().mockResolvedValue(1),
|
||||||
};
|
};
|
||||||
@@ -51,16 +50,11 @@ function makeScheduler(enabled = true) {
|
|||||||
const staleAccountRepository = {
|
const staleAccountRepository = {
|
||||||
findStaleAccounts: jest.fn().mockResolvedValue([]),
|
findStaleAccounts: jest.fn().mockResolvedValue([]),
|
||||||
} as unknown as jest.Mocked<StaleAccountRepository>;
|
} as unknown as jest.Mocked<StaleAccountRepository>;
|
||||||
const config = {
|
|
||||||
get: jest.fn().mockReturnValue(enabled ? 'true' : 'false'),
|
|
||||||
} as unknown as ConfigService;
|
|
||||||
|
|
||||||
const scheduler = new BackgroundRefreshScheduler(
|
const scheduler = new BackgroundRefreshScheduler(
|
||||||
garnet,
|
garnet,
|
||||||
rateLimiter,
|
rateLimiter,
|
||||||
enrichmentService,
|
enrichmentService,
|
||||||
staleAccountRepository,
|
staleAccountRepository,
|
||||||
config,
|
|
||||||
) as SchedulerInternals;
|
) as SchedulerInternals;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -79,14 +73,15 @@ describe('BackgroundRefreshScheduler', () => {
|
|||||||
jest.restoreAllMocks();
|
jest.restoreAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not schedule ticks when disabled', () => {
|
it('schedules ticks without requiring RIOT_BG_REFRESH_ENABLED', () => {
|
||||||
jest.useFakeTimers();
|
jest.useFakeTimers();
|
||||||
const setIntervalSpy = jest.spyOn(global, 'setInterval');
|
const setIntervalSpy = jest.spyOn(global, 'setInterval');
|
||||||
const { scheduler } = makeScheduler(false);
|
const { scheduler } = makeScheduler();
|
||||||
|
|
||||||
scheduler.onModuleInit();
|
scheduler.onModuleInit();
|
||||||
|
|
||||||
expect(setIntervalSpy).not.toHaveBeenCalled();
|
expect(setIntervalSpy).toHaveBeenCalledTimes(2);
|
||||||
|
scheduler.onModuleDestroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not query stale accounts outside the KST window', async () => {
|
it('does not query stale accounts outside the KST window', async () => {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import {
|
|||||||
OnModuleDestroy,
|
OnModuleDestroy,
|
||||||
OnModuleInit,
|
OnModuleInit,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { ConfigService } from '@nestjs/config';
|
|
||||||
import {
|
import {
|
||||||
type EnrichResult,
|
type EnrichResult,
|
||||||
RiotAccountEnrichmentService,
|
RiotAccountEnrichmentService,
|
||||||
@@ -34,26 +33,15 @@ export class BackgroundRefreshScheduler
|
|||||||
private leaderRenewTimer?: NodeJS.Timeout;
|
private leaderRenewTimer?: NodeJS.Timeout;
|
||||||
private tickInProgress = false;
|
private tickInProgress = false;
|
||||||
private readonly consumer = `${process.pid}:${Math.random().toString(36).slice(2)}`;
|
private readonly consumer = `${process.pid}:${Math.random().toString(36).slice(2)}`;
|
||||||
private readonly enabled: boolean;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly garnet: GarnetService,
|
private readonly garnet: GarnetService,
|
||||||
private readonly rateLimiter: RiotRateLimiterService,
|
private readonly rateLimiter: RiotRateLimiterService,
|
||||||
private readonly enrichmentService: RiotAccountEnrichmentService,
|
private readonly enrichmentService: RiotAccountEnrichmentService,
|
||||||
private readonly staleAccountRepository: StaleAccountRepository,
|
private readonly staleAccountRepository: StaleAccountRepository,
|
||||||
config: ConfigService,
|
) {}
|
||||||
) {
|
|
||||||
this.enabled = config.get<string>('RIOT_BG_REFRESH_ENABLED') === 'true';
|
|
||||||
}
|
|
||||||
|
|
||||||
public onModuleInit(): void {
|
public onModuleInit(): void {
|
||||||
if (!this.enabled) {
|
|
||||||
this.logger.log(
|
|
||||||
'Background Riot refresh is disabled (RIOT_BG_REFRESH_ENABLED).',
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.tickTimer = setInterval(() => void this.safeTick(), TICK_INTERVAL_MS);
|
this.tickTimer = setInterval(() => void this.safeTick(), TICK_INTERVAL_MS);
|
||||||
this.leaderRenewTimer = setInterval(
|
this.leaderRenewTimer = setInterval(
|
||||||
() => void this.renewLeaderIfHeld(),
|
() => void this.renewLeaderIfHeld(),
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import { RiotClientService } from './riot.client.service';
|
||||||
|
import { RiotLeagueService } from './riot-league.service';
|
||||||
|
import type { RiotLeagueEntryDto, RiotResponseParser } from './riot.types';
|
||||||
|
|
||||||
|
describe('RiotLeagueService', () => {
|
||||||
|
it('accepts Riot league entries without optional leagueId', async () => {
|
||||||
|
const client = {
|
||||||
|
get: jest.fn(
|
||||||
|
async <T>(
|
||||||
|
_path: string,
|
||||||
|
_options: unknown,
|
||||||
|
parser?: RiotResponseParser<T>,
|
||||||
|
) =>
|
||||||
|
parser
|
||||||
|
? parser([
|
||||||
|
{
|
||||||
|
queueType: 'RANKED_SOLO_5x5',
|
||||||
|
tier: 'EMERALD',
|
||||||
|
rank: 'I',
|
||||||
|
puuid: 'puuid-1',
|
||||||
|
leaguePoints: 75,
|
||||||
|
wins: 160,
|
||||||
|
losses: 148,
|
||||||
|
},
|
||||||
|
])
|
||||||
|
: ([] as T),
|
||||||
|
),
|
||||||
|
} as unknown as RiotClientService;
|
||||||
|
const service = new RiotLeagueService(client);
|
||||||
|
|
||||||
|
const result = await service.getEntriesByPuuid('puuid-1', {
|
||||||
|
platform: 'kr',
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(result).toEqual<RiotLeagueEntryDto[]>([
|
||||||
|
{
|
||||||
|
queueType: 'RANKED_SOLO_5x5',
|
||||||
|
tier: 'EMERALD',
|
||||||
|
rank: 'I',
|
||||||
|
puuid: 'puuid-1',
|
||||||
|
leaguePoints: 75,
|
||||||
|
wins: 160,
|
||||||
|
losses: 148,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -36,7 +36,10 @@ function parseEntry(value: unknown, index: number): RiotLeagueEntryDto {
|
|||||||
throw new TypeError(`leagueEntries[${index}] must be an object.`);
|
throw new TypeError(`leagueEntries[${index}] must be an object.`);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
leagueId: requireString(value.leagueId, `leagueEntries[${index}].leagueId`),
|
leagueId: optionalString(
|
||||||
|
value.leagueId,
|
||||||
|
`leagueEntries[${index}].leagueId`,
|
||||||
|
),
|
||||||
queueType: requireString(
|
queueType: requireString(
|
||||||
value.queueType,
|
value.queueType,
|
||||||
`leagueEntries[${index}].queueType`,
|
`leagueEntries[${index}].queueType`,
|
||||||
@@ -71,6 +74,11 @@ function requireString(value: unknown, path: string): string {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function optionalString(value: unknown, path: string): string | undefined {
|
||||||
|
if (value === undefined || value === null) return undefined;
|
||||||
|
return requireString(value, path);
|
||||||
|
}
|
||||||
|
|
||||||
function requireNumber(value: unknown, path: string): number {
|
function requireNumber(value: unknown, path: string): number {
|
||||||
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
||||||
throw new TypeError(`${path} must be a finite number.`);
|
throw new TypeError(`${path} must be a finite number.`);
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ export interface RiotSummonerDto {
|
|||||||
|
|
||||||
// League-V4 entries by-puuid 응답
|
// League-V4 entries by-puuid 응답
|
||||||
export interface RiotLeagueEntryDto {
|
export interface RiotLeagueEntryDto {
|
||||||
leagueId: string;
|
leagueId?: string;
|
||||||
queueType: string;
|
queueType: string;
|
||||||
tier: string;
|
tier: string;
|
||||||
rank: string;
|
rank: string;
|
||||||
|
|||||||
+60
-1
@@ -1,10 +1,69 @@
|
|||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
import tailwindcss from "@tailwindcss/vite";
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
|
import { createRequire } from "node:module";
|
||||||
|
import fs from "node:fs";
|
||||||
|
import path from "node:path";
|
||||||
|
|
||||||
|
const ES_TOOLKIT_COMPAT_RE = /^es-toolkit\/compat\/[A-Za-z0-9_$]+$/;
|
||||||
|
const VIRTUAL_ES_TOOLKIT_COMPAT_PREFIX = "\0es-toolkit-compat-esm:";
|
||||||
|
|
||||||
|
function esToolkitCompatEsm() {
|
||||||
|
return {
|
||||||
|
name: "es-toolkit-compat-esm",
|
||||||
|
enforce: "pre" as const,
|
||||||
|
resolveId(source: string, importer?: string) {
|
||||||
|
if (!importer || !ES_TOOLKIT_COMPAT_RE.test(source)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const requireFromImporter = createRequire(importer);
|
||||||
|
const wrapperPath = requireFromImporter.resolve(source);
|
||||||
|
const wrapperSource = fs.readFileSync(wrapperPath, "utf8");
|
||||||
|
const wrapperMatch = wrapperSource.match(
|
||||||
|
/require\(['"](\.\.\/dist\/compat\/[^'"]+)\.js['"]\)\.([A-Za-z0-9_$]+)/,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!wrapperMatch) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const [, esmPathWithoutExtension, exportName] = wrapperMatch;
|
||||||
|
const esmPath = path.resolve(
|
||||||
|
path.dirname(wrapperPath),
|
||||||
|
`${esmPathWithoutExtension}.mjs`,
|
||||||
|
);
|
||||||
|
|
||||||
|
return `${VIRTUAL_ES_TOOLKIT_COMPAT_PREFIX}${encodeURIComponent(
|
||||||
|
exportName,
|
||||||
|
)}:${encodeURIComponent(esmPath)}`;
|
||||||
|
},
|
||||||
|
load(id: string) {
|
||||||
|
if (!id.startsWith(VIRTUAL_ES_TOOLKIT_COMPAT_PREFIX)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const [encodedExportName, encodedEsmPath] = id
|
||||||
|
.slice(VIRTUAL_ES_TOOLKIT_COMPAT_PREFIX.length)
|
||||||
|
.split(":");
|
||||||
|
const exportName = decodeURIComponent(encodedExportName);
|
||||||
|
const esmPath = decodeURIComponent(encodedEsmPath);
|
||||||
|
|
||||||
|
return `export { ${exportName} as default, ${exportName} } from ${JSON.stringify(
|
||||||
|
esmPath,
|
||||||
|
)};`;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react(), tailwindcss()],
|
plugins: [esToolkitCompatEsm(), react(), tailwindcss()],
|
||||||
|
optimizeDeps: {
|
||||||
|
rolldownOptions: {
|
||||||
|
plugins: [esToolkitCompatEsm()],
|
||||||
|
},
|
||||||
|
},
|
||||||
server: {
|
server: {
|
||||||
host: "0.0.0.0",
|
host: "0.0.0.0",
|
||||||
allowedHosts: ["126.dahyeon.us"],
|
allowedHosts: ["126.dahyeon.us"],
|
||||||
|
|||||||
@@ -26,12 +26,23 @@ export function main(args = process.argv.slice(2), env = process.env) {
|
|||||||
env.CF_PAGES_PROJECT_NAME ??
|
env.CF_PAGES_PROJECT_NAME ??
|
||||||
env.CLOUDFLARE_PAGES_PROJECT_NAME ??
|
env.CLOUDFLARE_PAGES_PROJECT_NAME ??
|
||||||
"lolympus";
|
"lolympus";
|
||||||
const stagingBranch =
|
const deployPlan = resolveDeployPlan(target, env);
|
||||||
target === "staging" ? resolveStagingBranch(env) : undefined;
|
|
||||||
|
|
||||||
validateEnv(viteMode, env);
|
validateEnv(viteMode, env);
|
||||||
run("pnpm", ["--filter", "web", "run", `build:${target}`], repoRoot);
|
run("pnpm", ["--filter", "web", "run", `build:${target}`], repoRoot);
|
||||||
|
|
||||||
|
const deployArgs = createPagesDeployArgs(projectName, deployPlan.pagesBranch);
|
||||||
|
console.error(
|
||||||
|
[
|
||||||
|
`Deploying ${target} from ${deployPlan.sourceBranch}`,
|
||||||
|
`to Cloudflare Pages branch ${deployPlan.pagesBranch}`,
|
||||||
|
].join(" "),
|
||||||
|
);
|
||||||
|
|
||||||
|
run("pnpm", deployArgs, webDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createPagesDeployArgs(projectName, branch) {
|
||||||
const deployArgs = [
|
const deployArgs = [
|
||||||
"exec",
|
"exec",
|
||||||
"wrangler",
|
"wrangler",
|
||||||
@@ -42,37 +53,62 @@ export function main(args = process.argv.slice(2), env = process.env) {
|
|||||||
projectName,
|
projectName,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (target === "staging") {
|
if (branch) deployArgs.push("--branch", branch);
|
||||||
deployArgs.push("--branch", stagingBranch);
|
return deployArgs;
|
||||||
console.error(
|
|
||||||
`Deploying staging to Cloudflare Pages branch ${stagingBranch}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
run("pnpm", deployArgs, webDir);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function resolveStagingBranch(env = process.env) {
|
export function resolveStagingBranch(env = process.env) {
|
||||||
const configuredBranch = env.CF_PAGES_STAGING_BRANCH?.trim();
|
return resolveDeployPlan("staging", env).pagesBranch;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function resolveDeployPlan(
|
||||||
|
target,
|
||||||
|
env = process.env,
|
||||||
|
releaseBranchRowsProvider = () => {
|
||||||
|
refreshRemoteReleaseBranches();
|
||||||
|
return listReleaseBranchRefs();
|
||||||
|
},
|
||||||
|
) {
|
||||||
|
const sourceBranch = resolveSourceBranch(
|
||||||
|
target,
|
||||||
|
env,
|
||||||
|
releaseBranchRowsProvider,
|
||||||
|
);
|
||||||
|
const pagesBranch =
|
||||||
|
target === "prod" ? resolveProductionBranch(env) : sourceBranch;
|
||||||
|
|
||||||
|
return { sourceBranch, pagesBranch };
|
||||||
|
}
|
||||||
|
|
||||||
|
function resolveSourceBranch(target, env, releaseBranchRowsProvider) {
|
||||||
|
const sourceEnvKey =
|
||||||
|
target === "prod" ? "CF_PAGES_RELEASE_BRANCH" : "CF_PAGES_STAGING_BRANCH";
|
||||||
|
const configuredBranch = env[sourceEnvKey]?.trim();
|
||||||
if (configuredBranch) return configuredBranch;
|
if (configuredBranch) return configuredBranch;
|
||||||
|
|
||||||
refreshRemoteReleaseBranches();
|
|
||||||
|
|
||||||
const latestReleaseBranch = selectLatestReleaseBranch(
|
const latestReleaseBranch = selectLatestReleaseBranch(
|
||||||
listReleaseBranchRefs(),
|
releaseBranchRowsProvider(),
|
||||||
);
|
);
|
||||||
if (latestReleaseBranch) return latestReleaseBranch;
|
if (latestReleaseBranch) return latestReleaseBranch;
|
||||||
|
|
||||||
console.error(
|
console.error(
|
||||||
[
|
[
|
||||||
"No release/* branch found for staging deploy.",
|
`No release/* branch found for ${target} deploy.`,
|
||||||
"Create a release branch, for example: git push origin main:release/66",
|
"Create a release branch, for example: git push origin main:release/66",
|
||||||
"Or set CF_PAGES_STAGING_BRANCH explicitly.",
|
`Or set ${sourceEnvKey} explicitly.`,
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
);
|
);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resolveProductionBranch(env) {
|
||||||
|
return (
|
||||||
|
env.CF_PAGES_PRODUCTION_BRANCH?.trim() ||
|
||||||
|
env.CF_PAGES_PROD_BRANCH?.trim() ||
|
||||||
|
"main"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export function selectLatestReleaseBranch(refRows) {
|
export function selectLatestReleaseBranch(refRows) {
|
||||||
const latestByBranch = new Map();
|
const latestByBranch = new Map();
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
import assert from "node:assert/strict";
|
||||||
|
import { describe, it } from "node:test";
|
||||||
|
|
||||||
|
import {
|
||||||
|
createPagesDeployArgs,
|
||||||
|
resolveDeployPlan,
|
||||||
|
} from "./deploy-cloudflare-pages.mjs";
|
||||||
|
|
||||||
|
describe("deploy-cloudflare-pages", () => {
|
||||||
|
it("deploys prod to the production branch using the latest release branch as source", () => {
|
||||||
|
const plan = resolveDeployPlan("prod", {}, () => [
|
||||||
|
"1710000000\torigin/release/66",
|
||||||
|
"1720000000\torigin/release/67",
|
||||||
|
]);
|
||||||
|
|
||||||
|
assert.deepEqual(plan, {
|
||||||
|
sourceBranch: "release/67",
|
||||||
|
pagesBranch: "main",
|
||||||
|
});
|
||||||
|
assert.deepEqual(
|
||||||
|
createPagesDeployArgs("lolympus", plan.pagesBranch),
|
||||||
|
[
|
||||||
|
"exec",
|
||||||
|
"wrangler",
|
||||||
|
"pages",
|
||||||
|
"deploy",
|
||||||
|
"dist",
|
||||||
|
"--project-name",
|
||||||
|
"lolympus",
|
||||||
|
"--branch",
|
||||||
|
"main",
|
||||||
|
],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("keeps explicit staging branch override behavior", () => {
|
||||||
|
const plan = resolveDeployPlan(
|
||||||
|
"staging",
|
||||||
|
{ CF_PAGES_STAGING_BRANCH: "release/manual" },
|
||||||
|
() => {
|
||||||
|
throw new Error("should not inspect git refs when branch is explicit");
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
assert.deepEqual(plan, {
|
||||||
|
sourceBranch: "release/manual",
|
||||||
|
pagesBranch: "release/manual",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it("allows overriding the Cloudflare Pages production branch", () => {
|
||||||
|
const plan = resolveDeployPlan(
|
||||||
|
"prod",
|
||||||
|
{ CF_PAGES_PRODUCTION_BRANCH: "production" },
|
||||||
|
() => ["1720000000\torigin/release/67"],
|
||||||
|
);
|
||||||
|
|
||||||
|
assert.deepEqual(plan, {
|
||||||
|
sourceBranch: "release/67",
|
||||||
|
pagesBranch: "production",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in new issue
Block a user