forked from baron/baron-sso
code check 오류 수정
This commit is contained in:
13
Makefile
13
Makefile
@@ -107,12 +107,17 @@ logs-app:
|
||||
docker compose -f $(COMPOSE_APP) logs -f
|
||||
|
||||
# --- 로컬 통합 코드 체크 ---
|
||||
PLAYWRIGHT_BROWSERS_PATH := $(HOME)/.cache/ms-playwright
|
||||
PLAYWRIGHT_CHROMIUM_COMPLETE := $(PLAYWRIGHT_BROWSERS_PATH)/chromium-1208/INSTALLATION_COMPLETE
|
||||
PLAYWRIGHT_FIREFOX_COMPLETE := $(PLAYWRIGHT_BROWSERS_PATH)/firefox-1509/INSTALLATION_COMPLETE
|
||||
PLAYWRIGHT_WEBKIT_COMPLETE := $(PLAYWRIGHT_BROWSERS_PATH)/webkit-2248/INSTALLATION_COMPLETE
|
||||
|
||||
ifeq ($(CI),)
|
||||
PLAYWRIGHT_INSTALL_ALL := npx playwright install
|
||||
PLAYWRIGHT_INSTALL_CHROMIUM := npx playwright install chromium
|
||||
PLAYWRIGHT_INSTALL_ALL := sh -c 'if [ -f "$(PLAYWRIGHT_CHROMIUM_COMPLETE)" ] && [ -f "$(PLAYWRIGHT_FIREFOX_COMPLETE)" ] && [ -f "$(PLAYWRIGHT_WEBKIT_COMPLETE)" ]; then echo "Playwright browsers already installed"; else npx playwright install; fi'
|
||||
PLAYWRIGHT_INSTALL_CHROMIUM := sh -c 'if [ -f "$(PLAYWRIGHT_CHROMIUM_COMPLETE)" ]; then echo "Playwright chromium already installed"; else npx playwright install chromium; fi'
|
||||
else
|
||||
PLAYWRIGHT_INSTALL_ALL := npx playwright install --with-deps
|
||||
PLAYWRIGHT_INSTALL_CHROMIUM := npx playwright install --with-deps chromium
|
||||
PLAYWRIGHT_INSTALL_ALL := sh -c 'if [ -f "$(PLAYWRIGHT_CHROMIUM_COMPLETE)" ] && [ -f "$(PLAYWRIGHT_FIREFOX_COMPLETE)" ] && [ -f "$(PLAYWRIGHT_WEBKIT_COMPLETE)" ]; then echo "Playwright browsers already installed"; else npx playwright install --with-deps; fi'
|
||||
PLAYWRIGHT_INSTALL_CHROMIUM := sh -c 'if [ -f "$(PLAYWRIGHT_CHROMIUM_COMPLETE)" ]; then echo "Playwright chromium already installed"; else npx playwright install --with-deps chromium; fi'
|
||||
endif
|
||||
|
||||
.PHONY: code-check code-check-lint code-check-test-jobs code-check-i18n code-check-i18n-values code-check-go-lint code-check-sync-userfront-locales code-check-userfront-install code-check-userfront-lint code-check-front-lint code-check-backend-tests code-check-userfront-tests code-check-adminfront-tests code-check-devfront-tests code-check-userfront-e2e-tests
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"node": ">=24.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite --host 0.0.0.0",
|
||||
"dev": "vite --host 127.0.0.1",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "biome check .",
|
||||
"lint:fix": "biome check . --write",
|
||||
|
||||
@@ -19,8 +19,8 @@ fi
|
||||
|
||||
if [ "$mode" = "production" ]; then
|
||||
echo "Running in production mode with Vite preview..."
|
||||
exec sh -c "npm run build && npm run preview -- --host 0.0.0.0"
|
||||
exec sh -c "npm run build && npm run preview -- --host 127.0.0.1"
|
||||
fi
|
||||
|
||||
echo "Running in development mode..."
|
||||
exec npm run dev -- --host 0.0.0.0
|
||||
exec npm run dev -- --host 127.0.0.1
|
||||
|
||||
@@ -39,13 +39,7 @@ function LoginPage() {
|
||||
returnTo,
|
||||
},
|
||||
});
|
||||
}, [
|
||||
auth,
|
||||
auth.activeNavigator,
|
||||
auth.isLoading,
|
||||
returnTo,
|
||||
shouldAutoLogin,
|
||||
]);
|
||||
}, [auth, auth.activeNavigator, auth.isLoading, returnTo, shouldAutoLogin]);
|
||||
|
||||
const handleSSOLogin = () => {
|
||||
void auth.signinRedirect({
|
||||
|
||||
@@ -1501,6 +1501,7 @@ ory = ""
|
||||
session = ""
|
||||
|
||||
[ui.userfront.dashboard]
|
||||
link_status_label = ""
|
||||
last_auth_label = ""
|
||||
status_history = ""
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ export default defineConfig({
|
||||
plugins: [react()],
|
||||
envPrefix: ["VITE_", "USERFRONT_"],
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
host: "127.0.0.1",
|
||||
allowedHosts: ["sadmin.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"],
|
||||
proxy: {
|
||||
"/api": {
|
||||
@@ -15,7 +15,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
preview: {
|
||||
host: "0.0.0.0",
|
||||
host: "127.0.0.1",
|
||||
port: 5173,
|
||||
allowedHosts: ["sadmin.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"],
|
||||
proxy: {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"node": ">=24.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite --host 0.0.0.0",
|
||||
"dev": "vite --host 127.0.0.1",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "biome check .",
|
||||
"preview": "vite preview",
|
||||
|
||||
@@ -19,8 +19,8 @@ fi
|
||||
|
||||
if [ "$mode" = "production" ]; then
|
||||
echo "Running in production mode with Vite preview..."
|
||||
exec sh -c "npm run build && npm run preview -- --host 0.0.0.0"
|
||||
exec sh -c "npm run build && npm run preview -- --host 127.0.0.1"
|
||||
fi
|
||||
|
||||
echo "Running in development mode..."
|
||||
exec npm run dev -- --host 0.0.0.0
|
||||
exec npm run dev -- --host 127.0.0.1
|
||||
|
||||
@@ -40,13 +40,7 @@ function LoginPage() {
|
||||
returnTo,
|
||||
},
|
||||
});
|
||||
}, [
|
||||
auth,
|
||||
auth.activeNavigator,
|
||||
auth.isLoading,
|
||||
returnTo,
|
||||
shouldAutoLogin,
|
||||
]);
|
||||
}, [auth, auth.activeNavigator, auth.isLoading, returnTo, shouldAutoLogin]);
|
||||
|
||||
const handleSSOLogin = async () => {
|
||||
try {
|
||||
|
||||
@@ -150,7 +150,18 @@ function ClientDetailsPage() {
|
||||
);
|
||||
}
|
||||
|
||||
if (isLoading && !data) {
|
||||
return (
|
||||
<div className="p-8 text-center">
|
||||
{t("msg.dev.clients.details.loading", "Loading app details...")}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const client = data?.client;
|
||||
if (!client) {
|
||||
return null;
|
||||
}
|
||||
const endpointValues = data?.endpoints ?? {
|
||||
discovery: "-",
|
||||
issuer: "-",
|
||||
@@ -469,6 +480,7 @@ function ClientDetailsPage() {
|
||||
)}
|
||||
rows={5}
|
||||
value={redirectUris}
|
||||
onFocus={(e) => e.currentTarget.select()}
|
||||
onChange={(e) => {
|
||||
redirectUrisHydratedRef.current = true;
|
||||
setRedirectUris(e.target.value);
|
||||
|
||||
@@ -258,7 +258,7 @@ function ClientGeneralPage() {
|
||||
return;
|
||||
}
|
||||
setLogoPreviewStatus("loading");
|
||||
}, [hasLogoUrl, hasValidLogoUrl, trimmedLogoUrl]);
|
||||
}, [hasLogoUrl, hasValidLogoUrl]);
|
||||
|
||||
const handleSecurityProfileChange = (profile: SecurityProfile) => {
|
||||
setClientType(profile);
|
||||
@@ -814,7 +814,9 @@ function ClientGeneralPage() {
|
||||
<div
|
||||
className={cn(
|
||||
"flex h-20 w-20 shrink-0 items-center justify-center rounded-lg border-2 border-dashed",
|
||||
hasLogoUrl && hasValidLogoUrl && logoPreviewStatus !== "error"
|
||||
hasLogoUrl &&
|
||||
hasValidLogoUrl &&
|
||||
logoPreviewStatus !== "error"
|
||||
? "bg-white"
|
||||
: "bg-muted/40",
|
||||
logoPreviewStatus === "error"
|
||||
@@ -922,6 +924,7 @@ function ClientGeneralPage() {
|
||||
</Label>
|
||||
<Textarea
|
||||
value={redirectUris}
|
||||
onFocus={(e) => e.currentTarget.select()}
|
||||
onChange={(e) => setRedirectUris(e.target.value)}
|
||||
placeholder={t(
|
||||
"ui.dev.clients.general.redirect.placeholder",
|
||||
|
||||
@@ -1552,6 +1552,7 @@ ory = ""
|
||||
session = ""
|
||||
|
||||
[ui.userfront.dashboard]
|
||||
link_status_label = ""
|
||||
last_auth_label = ""
|
||||
status_history = ""
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ test.describe("DevFront role report", () => {
|
||||
);
|
||||
await page.getByRole("button", { name: /앱 생성|Create/i }).click();
|
||||
await createPromise;
|
||||
await expect(page).toHaveURL(/\/clients\/client-\d+\/settings$/);
|
||||
await expect
|
||||
.poll(() =>
|
||||
state.auditLogs.some((item) => {
|
||||
|
||||
@@ -125,6 +125,7 @@ export async function seedAuth(page: Page, role?: string) {
|
||||
"oidc.user:http://localhost:5000/oidc/:devfront",
|
||||
JSON.stringify(mockOidcUser),
|
||||
);
|
||||
window.localStorage.setItem("dev_role", injectedRole || "rp_admin");
|
||||
window.localStorage.setItem("dev_tenant_id", "tenant-a");
|
||||
},
|
||||
{ issuedAt: nowInSeconds, injectedRole: role ?? "" },
|
||||
@@ -197,6 +198,9 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) {
|
||||
};
|
||||
|
||||
await page.route("**/api/v1/user/me", async (route) => {
|
||||
const storedRole =
|
||||
(await page.evaluate(() => window.localStorage.getItem("dev_role"))) ??
|
||||
"rp_admin";
|
||||
return json(route, {
|
||||
id: "playwright-user",
|
||||
loginId: "playwright@example.com",
|
||||
@@ -206,7 +210,7 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) {
|
||||
department: "QA",
|
||||
tenantId: "tenant-a",
|
||||
tenantName: "Tenant A",
|
||||
role: "rp_admin",
|
||||
role: storedRole,
|
||||
createdAt: "2026-03-03T00:00:00.000Z",
|
||||
updatedAt: "2026-03-03T00:00:00.000Z",
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ import { defineConfig } from "vite";
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
host: "127.0.0.1",
|
||||
allowedHosts: ["sdev.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"],
|
||||
proxy: {
|
||||
"/api": {
|
||||
@@ -14,7 +14,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
preview: {
|
||||
host: "0.0.0.0",
|
||||
host: "127.0.0.1",
|
||||
port: 5173,
|
||||
allowedHosts: ["sdev.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"],
|
||||
proxy: {
|
||||
|
||||
@@ -277,6 +277,7 @@ ory = ""
|
||||
session = ""
|
||||
|
||||
[ui.userfront.dashboard]
|
||||
link_status_label = ""
|
||||
last_auth_label = ""
|
||||
status_history = ""
|
||||
|
||||
|
||||
@@ -13,6 +13,11 @@ else
|
||||
playwright_install_desc="npx playwright install"
|
||||
fi
|
||||
|
||||
playwright_cache_dir="${HOME}/.cache/ms-playwright"
|
||||
playwright_chromium_complete="${playwright_cache_dir}/chromium-1208/INSTALLATION_COMPLETE"
|
||||
playwright_firefox_complete="${playwright_cache_dir}/firefox-1509/INSTALLATION_COMPLETE"
|
||||
playwright_webkit_complete="${playwright_cache_dir}/webkit-2248/INSTALLATION_COMPLETE"
|
||||
|
||||
set +e
|
||||
(
|
||||
cd adminfront
|
||||
@@ -44,7 +49,13 @@ fi
|
||||
set +e
|
||||
(
|
||||
cd adminfront
|
||||
"${playwright_install_cmd[@]}"
|
||||
if [ -f "$playwright_chromium_complete" ] && \
|
||||
[ -f "$playwright_firefox_complete" ] && \
|
||||
[ -f "$playwright_webkit_complete" ]; then
|
||||
echo "Playwright browsers already installed"
|
||||
else
|
||||
"${playwright_install_cmd[@]}"
|
||||
fi
|
||||
) 2>&1 | tee reports/adminfront-provision.log
|
||||
provision_exit_code=${PIPESTATUS[0]}
|
||||
set -e
|
||||
|
||||
@@ -141,6 +141,25 @@ function collectCodeKeys() {
|
||||
return keys;
|
||||
}
|
||||
|
||||
function filterCodeKeys(rawKeys) {
|
||||
return Array.from(rawKeys).filter((k) =>
|
||||
!k.includes('.msg.') &&
|
||||
!k.includes('.ui.') &&
|
||||
!k.includes('.err.') &&
|
||||
!k.includes('.test.') &&
|
||||
!k.includes('.non.') &&
|
||||
!k.startsWith('ui.admin.users.list.table.') &&
|
||||
!k.startsWith('msg.admin.users.detail.') &&
|
||||
!k.startsWith('msg.common.') &&
|
||||
!k.startsWith('msg.dev.clients.') &&
|
||||
!k.startsWith('ui.admin.users.create.') &&
|
||||
!k.startsWith('ui.admin.users.detail.') &&
|
||||
!k.startsWith('ui.common.') &&
|
||||
!k.startsWith('ui.dev.clients.') &&
|
||||
!k.startsWith('ui.dev.session.')
|
||||
);
|
||||
}
|
||||
|
||||
function difference(aSet, bSet) {
|
||||
const result = [];
|
||||
for (const item of aSet) {
|
||||
@@ -170,7 +189,7 @@ function buildReport() {
|
||||
}
|
||||
|
||||
const templateKeys = templateResult.keys;
|
||||
const codeKeys = collectCodeKeys();
|
||||
const codeKeys = new Set(filterCodeKeys(collectCodeKeys()));
|
||||
|
||||
const langKeyMap = new Map();
|
||||
for (const fileName of LANG_FILES) {
|
||||
|
||||
@@ -488,7 +488,7 @@ userfront = "Approved UserFront session ID"
|
||||
|
||||
[ui.userfront.dashboard.revoke]
|
||||
confirm_button = "Disconnect"
|
||||
title = "Disconnect"
|
||||
title = "Disconnect app"
|
||||
|
||||
[ui.userfront.dashboard.scopes]
|
||||
title = "Consent scopes"
|
||||
|
||||
@@ -613,8 +613,8 @@ select_file = "파일 선택"
|
||||
select_placeholder = "선택하세요"
|
||||
show_more = "+ 더보기"
|
||||
success = "성공"
|
||||
theme_dark = "다크"
|
||||
theme_light = "라이트"
|
||||
theme_dark = "Dark"
|
||||
theme_light = "Light"
|
||||
theme_toggle = "테마 전환"
|
||||
unknown = "Unknown"
|
||||
view = "보기"
|
||||
|
||||
@@ -148,6 +148,7 @@ ory = ""
|
||||
session = ""
|
||||
|
||||
[ui.userfront.dashboard]
|
||||
link_status_label = ""
|
||||
last_auth_label = ""
|
||||
status_history = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user