@operato/ops-contract 0.9.9 → 0.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/operational-ingest.d.ts +19 -0
- package/dist/operational-ingest.js +21 -0
- package/dist-cjs/index.cjs +5 -0
- package/package.json +1 -1
|
@@ -62,6 +62,25 @@ export interface ObjectShape {
|
|
|
62
62
|
*/
|
|
63
63
|
export declare function operationalKindOf(record: unknown): OperationalKind | undefined;
|
|
64
64
|
/** 이 레코드가 운영 사실인가 — 호스트의 라우팅이 묻는 자리. */
|
|
65
|
+
/**
|
|
66
|
+
* 그 종류의 사실을 **무엇이 가리키나** — 선언된 identity 칸의 이름.
|
|
67
|
+
*
|
|
68
|
+
* ── 왜 내보내나 (2026-09-06) ───────────────────────────────────────────────
|
|
69
|
+
* 이 선언은 여기 있는데 밖에서 읽을 수 없었다. 그래서 중복 판정(`ingest-dedupe.ts`)이 같은 목록을
|
|
70
|
+
* **손으로 옮겨** 들고 있었고, 새 종류가 생길 때마다 조용히 뒤처졌다.
|
|
71
|
+
*
|
|
72
|
+
* 실제로 두 번 그랬다.
|
|
73
|
+
*
|
|
74
|
+
* ```
|
|
75
|
+
* subjectId 처분 · 목록에 없어 정체를 아예 못 만들었다 → dedupe 밖
|
|
76
|
+
* testableObjectId 시험 · 목록에 없어 같은 명세·같은 시각의 다른 로트가 뭉칠 수 있었다
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* 뒤엣것이 더 나쁘다. 중복은 눈에 보이지만 뭉친 것은 **사실 하나가 사라진 것**이고 아무 흔적이 없다.
|
|
80
|
+
*
|
|
81
|
+
* 모르는 종류에는 `undefined` 를 낸다 — 짐작으로 이름을 내지 않는다.
|
|
82
|
+
*/
|
|
83
|
+
export declare function operationalIdentityField(kind: OperationalKind | undefined): string | undefined;
|
|
65
84
|
export declare function isOperationalRecord(record: unknown): boolean;
|
|
66
85
|
/**
|
|
67
86
|
* 운영 레코드들을 봉투로 — 유효한 것만 통과하고 나머지는 **이유와 함께** 남는다.
|
|
@@ -401,6 +401,27 @@ export function operationalKindOf(record) {
|
|
|
401
401
|
*/
|
|
402
402
|
const MATCH_ORDER = Object.keys(SPECS).sort((a, b) => (SPECS[a].matchOrder ?? 1000) - (SPECS[b].matchOrder ?? 1000));
|
|
403
403
|
/** 이 레코드가 운영 사실인가 — 호스트의 라우팅이 묻는 자리. */
|
|
404
|
+
/**
|
|
405
|
+
* 그 종류의 사실을 **무엇이 가리키나** — 선언된 identity 칸의 이름.
|
|
406
|
+
*
|
|
407
|
+
* ── 왜 내보내나 (2026-09-06) ───────────────────────────────────────────────
|
|
408
|
+
* 이 선언은 여기 있는데 밖에서 읽을 수 없었다. 그래서 중복 판정(`ingest-dedupe.ts`)이 같은 목록을
|
|
409
|
+
* **손으로 옮겨** 들고 있었고, 새 종류가 생길 때마다 조용히 뒤처졌다.
|
|
410
|
+
*
|
|
411
|
+
* 실제로 두 번 그랬다.
|
|
412
|
+
*
|
|
413
|
+
* ```
|
|
414
|
+
* subjectId 처분 · 목록에 없어 정체를 아예 못 만들었다 → dedupe 밖
|
|
415
|
+
* testableObjectId 시험 · 목록에 없어 같은 명세·같은 시각의 다른 로트가 뭉칠 수 있었다
|
|
416
|
+
* ```
|
|
417
|
+
*
|
|
418
|
+
* 뒤엣것이 더 나쁘다. 중복은 눈에 보이지만 뭉친 것은 **사실 하나가 사라진 것**이고 아무 흔적이 없다.
|
|
419
|
+
*
|
|
420
|
+
* 모르는 종류에는 `undefined` 를 낸다 — 짐작으로 이름을 내지 않는다.
|
|
421
|
+
*/
|
|
422
|
+
export function operationalIdentityField(kind) {
|
|
423
|
+
return kind ? SPECS[kind]?.identity : undefined;
|
|
424
|
+
}
|
|
404
425
|
export function isOperationalRecord(record) {
|
|
405
426
|
return operationalKindOf(record) !== undefined;
|
|
406
427
|
}
|
package/dist-cjs/index.cjs
CHANGED
|
@@ -179,6 +179,7 @@ __export(index_exports, {
|
|
|
179
179
|
observationAt: () => observationAt,
|
|
180
180
|
offCalendarAt: () => offCalendarAt,
|
|
181
181
|
offCalendarReasonAt: () => offCalendarReasonAt,
|
|
182
|
+
operationalIdentityField: () => operationalIdentityField,
|
|
182
183
|
operationalKindOf: () => operationalKindOf,
|
|
183
184
|
operationsCapabilityOf: () => operationsCapabilityOf,
|
|
184
185
|
outsideLimit: () => outsideLimit,
|
|
@@ -3700,6 +3701,9 @@ function operationalKindOf(record) {
|
|
|
3700
3701
|
var MATCH_ORDER = Object.keys(SPECS).sort(
|
|
3701
3702
|
(a, b) => (SPECS[a].matchOrder ?? 1e3) - (SPECS[b].matchOrder ?? 1e3)
|
|
3702
3703
|
);
|
|
3704
|
+
function operationalIdentityField(kind) {
|
|
3705
|
+
return kind ? SPECS[kind]?.identity : void 0;
|
|
3706
|
+
}
|
|
3703
3707
|
function isOperationalRecord(record) {
|
|
3704
3708
|
return operationalKindOf(record) !== void 0;
|
|
3705
3709
|
}
|
|
@@ -4497,6 +4501,7 @@ function commandSpecGaps(specs, command) {
|
|
|
4497
4501
|
observationAt,
|
|
4498
4502
|
offCalendarAt,
|
|
4499
4503
|
offCalendarReasonAt,
|
|
4504
|
+
operationalIdentityField,
|
|
4500
4505
|
operationalKindOf,
|
|
4501
4506
|
operationsCapabilityOf,
|
|
4502
4507
|
outsideLimit,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/ops-contract",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.10",
|
|
4
4
|
"description": "Operations domain contract — the standard vocabulary that producers and readers agree on (EPCIS 2.0/GS1, ISA-95, IEC 61850/ISO 50001). Types, guards, validation. No state, no engine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist-cjs/index.cjs",
|