1
0
forked from baron/baron-sso

코드체크 업데이트

This commit is contained in:
2026-05-12 13:41:43 +09:00
parent 5e649c279f
commit d4c48da426
32 changed files with 486 additions and 85 deletions

View File

@@ -1,5 +1,12 @@
import { createRequire } from "node:module";
import { defineConfig, devices } from "@playwright/test";
const require = createRequire(import.meta.url);
const { shouldIncludeWebKit } =
require("../scripts/playwrightHostDeps.cjs") as {
shouldIncludeWebKit: () => boolean;
};
const configuredWorkers = process.env.PLAYWRIGHT_WORKERS
? Number.parseInt(process.env.PLAYWRIGHT_WORKERS, 10)
: undefined;
@@ -58,10 +65,14 @@ export default defineConfig({
use: { ...devices["Desktop Firefox"] },
},
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
...(shouldIncludeWebKit()
? [
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
]
: []),
],
/* Run your local dev server before starting the tests */

View File

@@ -35,6 +35,29 @@ if [ "${1:-}" = "--print-mode" ]; then
exit 0
fi
ensure_frontend_dependencies() {
if [ ! -f package.json ] || [ ! -f package-lock.json ]; then
return 0
fi
if command -v sha256sum >/dev/null 2>&1; then
deps_hash="$(sha256sum package.json package-lock.json | sha256sum | awk '{print $1}')"
else
deps_hash="$(cksum package.json package-lock.json | cksum | awk '{print $1}')"
fi
deps_stamp="node_modules/.baron-deps-hash"
installed_hash="$(cat "$deps_stamp" 2>/dev/null || true)"
if [ "$installed_hash" != "$deps_hash" ]; then
echo "Installing frontend dependencies from package-lock.json..."
npm ci
mkdir -p node_modules
printf '%s\n' "$deps_hash" > "$deps_stamp"
fi
}
ensure_frontend_dependencies
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 --port 5175"

View File

@@ -46,9 +46,7 @@ describe("hanmac family organization order", () => {
it("does not rank generic technical centers as GPDTDC", () => {
expect(
getHanmacFamilyTenantOrderRank(
tenant("기술개발센터", "rnd-center"),
),
getHanmacFamilyTenantOrderRank(tenant("기술개발센터", "rnd-center")),
).toBe(Number.MAX_SAFE_INTEGER);
});
});

View File

@@ -51,10 +51,9 @@ function tenantToPickerNode(
tenant: TenantNode,
usersBySlug: Map<string, UserSummary[]>,
): OrgPickerTreeNode {
const tenantChildren = orderHanmacFamilyChildren(
tenant,
tenant.children,
).map((child) => tenantToPickerNode(child, usersBySlug));
const tenantChildren = orderHanmacFamilyChildren(tenant, tenant.children).map(
(child) => tenantToPickerNode(child, usersBySlug),
);
const userChildren = (usersBySlug.get(tenant.slug.toLowerCase()) || []).map(
(user) => ({
type: "user" as const,

View File

@@ -1032,12 +1032,11 @@ export function buildOrgSelectionOptions(
(familyRoot?.children ?? []).filter((node) =>
["COMPANY_GROUP", "COMPANY", "ORGANIZATION"].includes(node.type),
),
)
.map((node) => ({
descendants: collectOrgSelectionDescendants(node, 2),
id: node.id,
label: node.name,
}));
).map((node) => ({
descendants: collectOrgSelectionDescendants(node, 2),
id: node.id,
label: node.name,
}));
}
function getOrgSelectionLabel(