A-SW Hub / Repositories
Local Gitea · READ ONLY
← 저장소 Repositories
REPOSITORY

via/asw-service-platform Private

[참조 MVP] A-SW 공유·협업 서비스 플랫폼 — 컴포넌트 릴리스의 제출·검증·승인·공개 생명주기를 집행하는 플랫폼 코어입니다.

https://git.agrithing.ai/via/asw-service-platform.git
7 commits
2 items · main
·/ src/component.ts
typescript · 787 B · b789698 Download
const transitions = new Map([['DRAFT:submit:component_owner', 'SUBMITTED'], ['SUBMITTED:verify:validator', 'VERIFIED'], ['VERIFIED:approve:integration_approver', 'APPROVED'], ['APPROVED:publish:release_manager', 'PUBLISHED']]);export function transition(input) {  const current = String(input.current_state).toUpperCase();  if (['verify', 'approve', 'publish'].includes(input.action) && Number(input.evidence_count ?? 0) < 1) return { accepted: false, state: current, reason: 'evidence_required' };  const key = [current, input.action, input.actor_role].join(':');  const state = transitions.get(key);  return state ? { accepted: true, previous_state: current, state, audit_event: [key, state].join(':') } : { accepted: false, state: current, reason: 'transition_not_allowed' };}