독립 합성 교육용 예제 / Independent synthetic teaching example
실제 업체 자료·자격정보·외부 의존성은 없습니다. No client records, credentials or external dependencies.
Run node test.mjs in Node.js with global Web Crypto support. Open demo-ko.html or demo-en.html in a modern browser. Demos inline the same module source. No network or persistent storage.
코드·테스트·한영 데모와 범위 문서가 포함됩니다. 수정·재배포·상업적 사용을 허용하며 무보증으로 제공합니다.
You may use, modify and redistribute these original synthetic files, including commercially. Provided as-is without warranty.
Import {previewImport,proposeImport,syntheticImport} from './import-review.mjs'.
Input: decoded object rows, an exact id/item/quantity mapping to three distinct column names, and existing IDs. This is not a CSV/XLSX parser. IDs remain strings, including leading zeroes. Quantity strings 1..99 normalize to integers. Unknown fields are not copied. Empty batches, duplicate occurrences, existing IDs, missing/invalid values and bad mappings require review. At most 1000 incoming rows and 10000 total target rows.
proposeImport revalidates input and compares expected/current safe integer revisions. It returns a complete candidate array only when all incoming rows pass. It does not mutate or save the old array. A real server must verify the revision and write atomically in a database transaction; this pure function alone does not lock a database or prevent a race. No merge, skip, automatic correction, encoding detection, formula execution or actual file upload.
검토 통과와 저장 완료를 구분합니다. 실무에서는 파서·업무 코드·권한·트랜잭션·재시도 정책을 별도로 설계해야 합니다.
