@things-factory/figure-library 10.1.167 → 10.1.168
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-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/figure-releases-popup.js +0 -8
- package/dist-client/viewparts/figure-releases-popup.js.map +1 -1
- package/dist-server/service/figure-library-release/figure-library-release.d.ts +3 -8
- package/dist-server/service/figure-library-release/figure-library-release.js +6 -9
- package/dist-server/service/figure-library-release/figure-library-release.js.map +1 -1
- package/dist-server/service/figure-library-resolver.d.ts +1 -1
- package/dist-server/service/figure-library-resolver.js +7 -7
- package/dist-server/service/figure-library-resolver.js.map +1 -1
- package/dist-server/service/index.d.ts +1 -1
- package/dist-server/service/index.js +1 -1
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/library/derived.d.ts +4 -10
- package/dist-server/service/library/derived.js +3 -5
- package/dist-server/service/library/derived.js.map +1 -1
- package/dist-server/service/library/extensions.d.ts +24 -0
- package/dist-server/service/library/extensions.js +33 -0
- package/dist-server/service/library/extensions.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/translations/en.json +4 -8
- package/translations/es.json +4 -8
- package/translations/ja.json +4 -8
- package/translations/ko.json +4 -8
- package/translations/ms.json +4 -8
- package/translations/zh.json +4 -8
- package/dist-server/service/library/carriers.d.ts +0 -40
- package/dist-server/service/library/carriers.js +0 -53
- package/dist-server/service/library/carriers.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/figure-library",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.168",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"test": "node --import ./test/resolve-ts-siblings.mjs --test test/*.test.ts"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@hatiolab/figure-model": "^0.
|
|
30
|
+
"@hatiolab/figure-model": "^0.7.0",
|
|
31
31
|
"@operato/data-grist": "^10.0.0",
|
|
32
32
|
"@operato/graphql": "^10.0.0",
|
|
33
33
|
"@operato/i18n": "^10.0.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@things-factory/auth-base": "^10.1.167",
|
|
42
42
|
"@things-factory/board-service": "^10.1.167",
|
|
43
43
|
"@things-factory/env": "^10.1.149",
|
|
44
|
-
"@things-factory/figure-viewer": "^10.1.
|
|
44
|
+
"@things-factory/figure-viewer": "^10.1.168",
|
|
45
45
|
"@things-factory/shell": "^10.1.165",
|
|
46
46
|
"graphql-scalars": "^1.22.4",
|
|
47
47
|
"graphql-tag": "^2.12.6",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"koa-router": "^7.4.0",
|
|
51
51
|
"lit": "^3.1.2"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "fe067ff11d90effffc2523374453d9b8313b489f"
|
|
54
54
|
}
|
package/translations/en.json
CHANGED
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"error.figure-format-unsupported": "{ref} cannot be read here.",
|
|
19
19
|
"error.figure-name-malformed": "{type} is not a full figure name of the form namespace/type.",
|
|
20
20
|
"error.figure-names-too-many": "at most {max} figure names can be asked at once, not {count}.",
|
|
21
|
-
"error.figure-carrier-types-too-many": "at most {max} carrier types can be asked at once, not {count}.",
|
|
22
|
-
"error.figure-carrier-not-in-type-map": "no figure in the type map is carrier type {carrierType}.",
|
|
23
|
-
"error.figure-carrier-conflict": "carrier type {carrierType} is declared by more than one figure in the type map: {refs}.",
|
|
24
21
|
"error.figure-package-invalid": "{name} is not a figure package (.figpkg).",
|
|
25
22
|
"error.figure-package-too-large": "a figure package is at most {max} bytes.",
|
|
26
23
|
"figure-library.contract.authored-size-changed": "The authored size changed from {before} to {after}.",
|
|
@@ -31,10 +28,9 @@
|
|
|
31
28
|
"figure-library.contract.binding-role-changed": "The place '{binding}' changed from {before} to {after}.",
|
|
32
29
|
"figure-library.contract.capability-added": "The capability '{name}' is new.",
|
|
33
30
|
"figure-library.contract.capability-gone": "The capability '{name}' is gone.",
|
|
34
|
-
"figure-library.contract.
|
|
35
|
-
"figure-library.contract.
|
|
36
|
-
"figure-library.contract.
|
|
37
|
-
"figure-library.contract.carrier-type-changed": "The carrier type changed from {before} to {after}.",
|
|
31
|
+
"figure-library.contract.extension-added": "The extension '{key}' is new.",
|
|
32
|
+
"figure-library.contract.extension-changed": "The value of the extension '{key}' changed.",
|
|
33
|
+
"figure-library.contract.extension-gone": "The extension '{key}' is gone.",
|
|
38
34
|
"figure-library.contract.clip-added": "The clip '{clip}' is new.",
|
|
39
35
|
"figure-library.contract.clip-gone": "The clip '{clip}' is gone.",
|
|
40
36
|
"figure-library.contract.contact-face-changed": "The face the figure is mounted by changed.",
|
|
@@ -61,7 +57,6 @@
|
|
|
61
57
|
"figure-library.button.save": "save",
|
|
62
58
|
"figure-library.label.category": "category",
|
|
63
59
|
"figure-library.label.capability": "capability",
|
|
64
|
-
"figure-library.label.carrier": "carrier",
|
|
65
60
|
"figure-library.label.format": "format",
|
|
66
61
|
"figure-library.label.released-at": "released at",
|
|
67
62
|
"figure-library.text.no-category": "no category",
|
|
@@ -77,6 +72,7 @@
|
|
|
77
72
|
"figure-library.text.no-contract-change": "no contract change",
|
|
78
73
|
"figure-library.text.cannot-use-format": "this server cannot read the format {format}, so it cannot be used.",
|
|
79
74
|
"error.figure-type-map-format-unsupported": "{ref} is in a format this server cannot draw.",
|
|
75
|
+
"error.figure-extension-key": "{key} is not an extension key {owner}/{name}.",
|
|
80
76
|
"figure-library.label.version-in-use": "in use",
|
|
81
77
|
"figure-library.label.latest-version": "latest",
|
|
82
78
|
"figure-library.text.none": "none",
|
package/translations/es.json
CHANGED
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"error.figure-format-unsupported": "{ref} no se puede leer aquí.",
|
|
19
19
|
"error.figure-name-malformed": "{type} no es un nombre completo de figura con el formato namespace/type.",
|
|
20
20
|
"error.figure-names-too-many": "se pueden consultar como máximo {max} nombres de figura a la vez, no {count}.",
|
|
21
|
-
"error.figure-carrier-types-too-many": "se pueden consultar como máximo {max} tipos de carrier a la vez, no {count}.",
|
|
22
|
-
"error.figure-carrier-not-in-type-map": "ninguna figura del mapa de tipos es del tipo de carrier {carrierType}.",
|
|
23
|
-
"error.figure-carrier-conflict": "el tipo de carrier {carrierType} está declarado por más de una figura en el mapa de tipos: {refs}.",
|
|
24
21
|
"error.figure-package-invalid": "{name} no es un paquete de figura (.figpkg).",
|
|
25
22
|
"error.figure-package-too-large": "un paquete de figura puede tener como máximo {max} bytes.",
|
|
26
23
|
"figure-library.contract.authored-size-changed": "El tamaño de diseño cambió de {before} a {after}.",
|
|
@@ -31,10 +28,9 @@
|
|
|
31
28
|
"figure-library.contract.binding-role-changed": "El lugar '{binding}' cambió de {before} a {after}.",
|
|
32
29
|
"figure-library.contract.capability-added": "La capacidad '{name}' es nueva.",
|
|
33
30
|
"figure-library.contract.capability-gone": "La capacidad '{name}' ya no existe.",
|
|
34
|
-
"figure-library.contract.
|
|
35
|
-
"figure-library.contract.
|
|
36
|
-
"figure-library.contract.
|
|
37
|
-
"figure-library.contract.carrier-type-changed": "El tipo de carrier cambió de {before} a {after}.",
|
|
31
|
+
"figure-library.contract.extension-added": "La extensión '{key}' es nueva.",
|
|
32
|
+
"figure-library.contract.extension-changed": "El valor de la extensión '{key}' cambió.",
|
|
33
|
+
"figure-library.contract.extension-gone": "La extensión '{key}' ya no está.",
|
|
38
34
|
"figure-library.contract.clip-added": "El clip '{clip}' es nuevo.",
|
|
39
35
|
"figure-library.contract.clip-gone": "El clip '{clip}' ya no existe.",
|
|
40
36
|
"figure-library.contract.contact-face-changed": "Cambió la cara por la que se monta la figura.",
|
|
@@ -61,7 +57,6 @@
|
|
|
61
57
|
"figure-library.button.save": "guardar",
|
|
62
58
|
"figure-library.label.category": "categoría",
|
|
63
59
|
"figure-library.label.capability": "capacidad",
|
|
64
|
-
"figure-library.label.carrier": "carrier",
|
|
65
60
|
"figure-library.label.format": "formato",
|
|
66
61
|
"figure-library.label.released-at": "publicada el",
|
|
67
62
|
"figure-library.text.no-category": "sin categoría",
|
|
@@ -77,6 +72,7 @@
|
|
|
77
72
|
"figure-library.text.no-contract-change": "sin cambios de contrato",
|
|
78
73
|
"figure-library.text.cannot-use-format": "este servidor no puede leer el formato {format}, así que no se puede usar.",
|
|
79
74
|
"error.figure-type-map-format-unsupported": "{ref} está en un formato que este servidor no puede dibujar.",
|
|
75
|
+
"error.figure-extension-key": "{key} no es una clave de extensión {owner}/{name}.",
|
|
80
76
|
"figure-library.label.version-in-use": "en uso",
|
|
81
77
|
"figure-library.label.latest-version": "última",
|
|
82
78
|
"figure-library.text.none": "ninguna",
|
package/translations/ja.json
CHANGED
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"error.figure-format-unsupported": "{ref} はここでは読み込めません。",
|
|
19
19
|
"error.figure-name-malformed": "{type} は namespace/type 形式の正式な Figure 名ではありません。",
|
|
20
20
|
"error.figure-names-too-many": "一度に問い合わせられる Figure 名は {max} 個までです({count} 個)。",
|
|
21
|
-
"error.figure-carrier-types-too-many": "一度に問い合わせられる Carrier タイプは {max} 個までです({count} 個)。",
|
|
22
|
-
"error.figure-carrier-not-in-type-map": "タイプマップに Carrier タイプ {carrierType} の Figure はありません。",
|
|
23
|
-
"error.figure-carrier-conflict": "タイプマップで Carrier タイプ {carrierType} を複数の Figure が宣言しています: {refs}。",
|
|
24
21
|
"error.figure-package-invalid": "{name} は Figure パッケージ(.figpkg)ではありません。",
|
|
25
22
|
"error.figure-package-too-large": "Figure パッケージは {max} バイトまでです。",
|
|
26
23
|
"figure-library.contract.authored-size-changed": "作成時のサイズが {before} から {after} に変わりました。",
|
|
@@ -31,10 +28,9 @@
|
|
|
31
28
|
"figure-library.contract.binding-role-changed": "'{binding}' の場所の役割が {before} から {after} に変わりました。",
|
|
32
29
|
"figure-library.contract.capability-added": "'{name}' 能力が新しく追加されました。",
|
|
33
30
|
"figure-library.contract.capability-gone": "'{name}' 能力がなくなりました。",
|
|
34
|
-
"figure-library.contract.
|
|
35
|
-
"figure-library.contract.
|
|
36
|
-
"figure-library.contract.
|
|
37
|
-
"figure-library.contract.carrier-type-changed": "Carrier タイプが {before} から {after} に変わりました。",
|
|
31
|
+
"figure-library.contract.extension-added": "拡張プロパティ '{key}' が追加されました。",
|
|
32
|
+
"figure-library.contract.extension-changed": "拡張プロパティ '{key}' の値が変わりました。",
|
|
33
|
+
"figure-library.contract.extension-gone": "拡張プロパティ '{key}' がなくなりました。",
|
|
38
34
|
"figure-library.contract.clip-added": "'{clip}' クリップが新しく追加されました。",
|
|
39
35
|
"figure-library.contract.clip-gone": "'{clip}' クリップがなくなりました。",
|
|
40
36
|
"figure-library.contract.contact-face-changed": "Figure を取り付ける面が変わりました。",
|
|
@@ -61,7 +57,6 @@
|
|
|
61
57
|
"figure-library.button.save": "保存",
|
|
62
58
|
"figure-library.label.category": "分類",
|
|
63
59
|
"figure-library.label.capability": "能力",
|
|
64
|
-
"figure-library.label.carrier": "Carrier",
|
|
65
60
|
"figure-library.label.format": "形式",
|
|
66
61
|
"figure-library.label.released-at": "リリース日時",
|
|
67
62
|
"figure-library.text.no-category": "分類なし",
|
|
@@ -77,6 +72,7 @@
|
|
|
77
72
|
"figure-library.text.no-contract-change": "契約の変化なし",
|
|
78
73
|
"figure-library.text.cannot-use-format": "このサーバーが読めない形式({format})のため使えません。",
|
|
79
74
|
"error.figure-type-map-format-unsupported": "{ref} はこのサーバーが描けない形式です。",
|
|
75
|
+
"error.figure-extension-key": "{key} は拡張プロパティのキー {owner}/{name} の形ではありません。",
|
|
80
76
|
"figure-library.label.version-in-use": "使用バージョン",
|
|
81
77
|
"figure-library.label.latest-version": "最新バージョン",
|
|
82
78
|
"figure-library.text.none": "なし",
|
package/translations/ko.json
CHANGED
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"error.figure-format-unsupported": "{ref} 을 이 서버에서 읽을 수 없습니다.",
|
|
19
19
|
"error.figure-name-malformed": "{type} 은 namespace/type 형식의 정식 이름이 아닙니다.",
|
|
20
20
|
"error.figure-names-too-many": "Figure 이름은 한 번에 {max}개까지 물을 수 있습니다({count}개).",
|
|
21
|
-
"error.figure-carrier-types-too-many": "Carrier 타입은 한 번에 {max}개까지 물을 수 있습니다({count}개).",
|
|
22
|
-
"error.figure-carrier-not-in-type-map": "타입 맵에 Carrier 타입 {carrierType}인 Figure가 없습니다.",
|
|
23
|
-
"error.figure-carrier-conflict": "타입 맵에서 Carrier 타입 {carrierType}을 둘 이상의 Figure가 선언합니다: {refs}.",
|
|
24
21
|
"error.figure-package-invalid": "{name} 은 Figure 꾸러미(.figpkg)가 아닙니다.",
|
|
25
22
|
"error.figure-package-too-large": "Figure 꾸러미는 {max} 바이트까지입니다.",
|
|
26
23
|
"figure-library.contract.authored-size-changed": "저작한 크기가 {before} 에서 {after} 로 바뀌었습니다.",
|
|
@@ -31,10 +28,9 @@
|
|
|
31
28
|
"figure-library.contract.binding-role-changed": "'{binding}' 적재 위치의 역할이 {before}에서 {after}(으)로 변경되었습니다.",
|
|
32
29
|
"figure-library.contract.capability-added": "'{name}' 능력이 새로 생겼습니다.",
|
|
33
30
|
"figure-library.contract.capability-gone": "'{name}' 능력이 없어졌습니다.",
|
|
34
|
-
"figure-library.contract.
|
|
35
|
-
"figure-library.contract.
|
|
36
|
-
"figure-library.contract.
|
|
37
|
-
"figure-library.contract.carrier-type-changed": "Carrier 타입이 {before}에서 {after}로 바뀌었습니다.",
|
|
31
|
+
"figure-library.contract.extension-added": "'{key}' 확장 속성이 새로 생겼습니다.",
|
|
32
|
+
"figure-library.contract.extension-changed": "'{key}' 확장 속성의 값이 바뀌었습니다.",
|
|
33
|
+
"figure-library.contract.extension-gone": "'{key}' 확장 속성이 없어졌습니다.",
|
|
38
34
|
"figure-library.contract.clip-added": "'{clip}' 클립이 새로 생겼습니다.",
|
|
39
35
|
"figure-library.contract.clip-gone": "'{clip}' 클립이 없어졌습니다.",
|
|
40
36
|
"figure-library.contract.contact-face-changed": "도형이 붙는 면이 바뀌었습니다.",
|
|
@@ -61,7 +57,6 @@
|
|
|
61
57
|
"figure-library.button.save": "저장",
|
|
62
58
|
"figure-library.label.category": "분류",
|
|
63
59
|
"figure-library.label.capability": "능력",
|
|
64
|
-
"figure-library.label.carrier": "Carrier",
|
|
65
60
|
"figure-library.label.format": "형식",
|
|
66
61
|
"figure-library.label.released-at": "발행 일시",
|
|
67
62
|
"figure-library.text.no-category": "분류 없음",
|
|
@@ -77,6 +72,7 @@
|
|
|
77
72
|
"figure-library.text.no-contract-change": "계약 변화 없음",
|
|
78
73
|
"figure-library.text.cannot-use-format": "이 서버가 읽지 못하는 형식({format})이라 사용할 수 없습니다.",
|
|
79
74
|
"error.figure-type-map-format-unsupported": "{ref} 은 이 서버가 그리지 못하는 형식입니다.",
|
|
75
|
+
"error.figure-extension-key": "확장 속성 키가 {owner}/{name} 모양이 아닙니다: {key}",
|
|
80
76
|
"figure-library.label.version-in-use": "사용 버전",
|
|
81
77
|
"figure-library.label.latest-version": "최신 버전",
|
|
82
78
|
"figure-library.text.none": "없음",
|
package/translations/ms.json
CHANGED
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"error.figure-format-unsupported": "{ref} tidak dapat dibaca di sini.",
|
|
19
19
|
"error.figure-name-malformed": "{type} bukan nama figure penuh dalam bentuk namespace/type.",
|
|
20
20
|
"error.figure-names-too-many": "paling banyak {max} nama figure boleh ditanya sekali gus, bukan {count}.",
|
|
21
|
-
"error.figure-carrier-types-too-many": "paling banyak {max} jenis carrier boleh ditanya sekali gus, bukan {count}.",
|
|
22
|
-
"error.figure-carrier-not-in-type-map": "tiada figure dalam peta jenis yang berjenis carrier {carrierType}.",
|
|
23
|
-
"error.figure-carrier-conflict": "jenis carrier {carrierType} diisytiharkan oleh lebih daripada satu figure dalam peta jenis: {refs}.",
|
|
24
21
|
"error.figure-package-invalid": "{name} bukan pakej figure (.figpkg).",
|
|
25
22
|
"error.figure-package-too-large": "pakej figure paling besar {max} bait.",
|
|
26
23
|
"figure-library.contract.authored-size-changed": "Saiz yang dikarang berubah daripada {before} kepada {after}.",
|
|
@@ -31,10 +28,9 @@
|
|
|
31
28
|
"figure-library.contract.binding-role-changed": "Tempat '{binding}' berubah daripada {before} kepada {after}.",
|
|
32
29
|
"figure-library.contract.capability-added": "Keupayaan '{name}' adalah baharu.",
|
|
33
30
|
"figure-library.contract.capability-gone": "Keupayaan '{name}' telah tiada.",
|
|
34
|
-
"figure-library.contract.
|
|
35
|
-
"figure-library.contract.
|
|
36
|
-
"figure-library.contract.
|
|
37
|
-
"figure-library.contract.carrier-type-changed": "Jenis carrier berubah daripada {before} kepada {after}.",
|
|
31
|
+
"figure-library.contract.extension-added": "Sambungan '{key}' adalah baharu.",
|
|
32
|
+
"figure-library.contract.extension-changed": "Nilai sambungan '{key}' berubah.",
|
|
33
|
+
"figure-library.contract.extension-gone": "Sambungan '{key}' sudah tiada.",
|
|
38
34
|
"figure-library.contract.clip-added": "Klip '{clip}' adalah baharu.",
|
|
39
35
|
"figure-library.contract.clip-gone": "Klip '{clip}' telah tiada.",
|
|
40
36
|
"figure-library.contract.contact-face-changed": "Muka pemasangan figure telah berubah.",
|
|
@@ -61,7 +57,6 @@
|
|
|
61
57
|
"figure-library.button.save": "simpan",
|
|
62
58
|
"figure-library.label.category": "kategori",
|
|
63
59
|
"figure-library.label.capability": "keupayaan",
|
|
64
|
-
"figure-library.label.carrier": "carrier",
|
|
65
60
|
"figure-library.label.format": "format",
|
|
66
61
|
"figure-library.label.released-at": "diterbitkan pada",
|
|
67
62
|
"figure-library.text.no-category": "tiada kategori",
|
|
@@ -77,6 +72,7 @@
|
|
|
77
72
|
"figure-library.text.no-contract-change": "tiada perubahan kontrak",
|
|
78
73
|
"figure-library.text.cannot-use-format": "pelayan ini tidak dapat membaca format {format}, jadi ia tidak boleh digunakan.",
|
|
79
74
|
"error.figure-type-map-format-unsupported": "{ref} dalam format yang tidak dapat dilukis oleh pelayan ini.",
|
|
75
|
+
"error.figure-extension-key": "{key} bukan kunci sambungan {owner}/{name}.",
|
|
80
76
|
"figure-library.label.version-in-use": "versi digunakan",
|
|
81
77
|
"figure-library.label.latest-version": "versi terbaharu",
|
|
82
78
|
"figure-library.text.none": "tiada",
|
package/translations/zh.json
CHANGED
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"error.figure-format-unsupported": "此处无法读取 {ref}。",
|
|
19
19
|
"error.figure-name-malformed": "{type} 不是 namespace/type 形式的完整图形名称。",
|
|
20
20
|
"error.figure-names-too-many": "一次最多可查询 {max} 个图形名称,而不是 {count} 个。",
|
|
21
|
-
"error.figure-carrier-types-too-many": "一次最多可查询 {max} 个 Carrier 类型,而不是 {count} 个。",
|
|
22
|
-
"error.figure-carrier-not-in-type-map": "类型映射中没有 Carrier 类型为 {carrierType} 的图形。",
|
|
23
|
-
"error.figure-carrier-conflict": "类型映射中有多个图形声明了 Carrier 类型 {carrierType}:{refs}。",
|
|
24
21
|
"error.figure-package-invalid": "{name} 不是图形包(.figpkg)。",
|
|
25
22
|
"error.figure-package-too-large": "图形包最大为 {max} 字节。",
|
|
26
23
|
"figure-library.contract.authored-size-changed": "设计尺寸从 {before} 变为 {after}。",
|
|
@@ -31,10 +28,9 @@
|
|
|
31
28
|
"figure-library.contract.binding-role-changed": "位置 '{binding}' 从 {before} 变为 {after}。",
|
|
32
29
|
"figure-library.contract.capability-added": "能力 '{name}' 是新增的。",
|
|
33
30
|
"figure-library.contract.capability-gone": "能力 '{name}' 已删除。",
|
|
34
|
-
"figure-library.contract.
|
|
35
|
-
"figure-library.contract.
|
|
36
|
-
"figure-library.contract.
|
|
37
|
-
"figure-library.contract.carrier-type-changed": "Carrier 类型从 {before} 变为 {after}。",
|
|
31
|
+
"figure-library.contract.extension-added": "新增扩展属性 '{key}'。",
|
|
32
|
+
"figure-library.contract.extension-changed": "扩展属性 '{key}' 的值已更改。",
|
|
33
|
+
"figure-library.contract.extension-gone": "扩展属性 '{key}' 已不存在。",
|
|
38
34
|
"figure-library.contract.clip-added": "clip '{clip}' 是新增的。",
|
|
39
35
|
"figure-library.contract.clip-gone": "clip '{clip}' 已删除。",
|
|
40
36
|
"figure-library.contract.contact-face-changed": "图形的安装面发生了变化。",
|
|
@@ -61,7 +57,6 @@
|
|
|
61
57
|
"figure-library.button.save": "保存",
|
|
62
58
|
"figure-library.label.category": "分类",
|
|
63
59
|
"figure-library.label.capability": "能力",
|
|
64
|
-
"figure-library.label.carrier": "Carrier",
|
|
65
60
|
"figure-library.label.format": "格式",
|
|
66
61
|
"figure-library.label.released-at": "发布时间",
|
|
67
62
|
"figure-library.text.no-category": "无分类",
|
|
@@ -77,6 +72,7 @@
|
|
|
77
72
|
"figure-library.text.no-contract-change": "契约无变化",
|
|
78
73
|
"figure-library.text.cannot-use-format": "本服务器无法读取格式 {format},因此不能使用。",
|
|
79
74
|
"error.figure-type-map-format-unsupported": "{ref} 的格式本服务器无法绘制。",
|
|
75
|
+
"error.figure-extension-key": "{key} 不是扩展属性键 {owner}/{name} 的形式。",
|
|
80
76
|
"figure-library.label.version-in-use": "使用版本",
|
|
81
77
|
"figure-library.label.latest-version": "最新版本",
|
|
82
78
|
"figure-library.text.none": "无",
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { EntityManager } from 'typeorm';
|
|
2
|
-
import { Refusal } from '@things-factory/shell';
|
|
3
|
-
import { FigureLibraryRelease } from '../figure-library-release/figure-library-release';
|
|
4
|
-
export declare const FIGURE_CARRIER_TYPES_MAX = 500;
|
|
5
|
-
/** The type map lines whose releases declare a carrier, by the CARRIERTYPE code they declare. */
|
|
6
|
-
export interface CarrierLine {
|
|
7
|
-
/** Full figure name {namespace}/{type}: the map's key, kept apart from the code. */
|
|
8
|
-
name: string;
|
|
9
|
-
release: FigureLibraryRelease;
|
|
10
|
-
}
|
|
11
|
-
export interface CarrierTypesAnswer {
|
|
12
|
-
items: {
|
|
13
|
-
carrierType: string;
|
|
14
|
-
name: string;
|
|
15
|
-
ref: string;
|
|
16
|
-
dimensions: {
|
|
17
|
-
width: number;
|
|
18
|
-
length: number;
|
|
19
|
-
height: number;
|
|
20
|
-
};
|
|
21
|
-
}[];
|
|
22
|
-
refused: {
|
|
23
|
-
carrierType: string;
|
|
24
|
-
code: string;
|
|
25
|
-
message: string;
|
|
26
|
-
refs?: string[];
|
|
27
|
-
}[];
|
|
28
|
-
}
|
|
29
|
-
/** Every carrier code the type map's releases declare, with the lines that declare it. A code on more lines than one is a conflict. */
|
|
30
|
-
export declare function carrierLinesOf(tx: EntityManager, domain: {
|
|
31
|
-
id: string;
|
|
32
|
-
}): Promise<Map<string, CarrierLine[]>>;
|
|
33
|
-
/**
|
|
34
|
-
* Carrier types live data names, answered from the domain's type map (ADR-0123): per code the release whose declaration
|
|
35
|
-
* names it and its physical size, or a refusal with its cause. A code two releases declare is never picked from; it is
|
|
36
|
-
* refused as a conflict naming both.
|
|
37
|
-
*/
|
|
38
|
-
export declare function carrierTypesOf(tx: EntityManager, domain: {
|
|
39
|
-
id: string;
|
|
40
|
-
}, carrierTypes: readonly string[], speak: (refusal: Refusal) => string): Promise<CarrierTypesAnswer>;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FIGURE_CARRIER_TYPES_MAX = void 0;
|
|
4
|
-
exports.carrierLinesOf = carrierLinesOf;
|
|
5
|
-
exports.carrierTypesOf = carrierTypesOf;
|
|
6
|
-
const figure_model_1 = require("@hatiolab/figure-model");
|
|
7
|
-
const shell_1 = require("@things-factory/shell");
|
|
8
|
-
const inspection_1 = require("./inspection");
|
|
9
|
-
const type_map_1 = require("./type-map");
|
|
10
|
-
exports.FIGURE_CARRIER_TYPES_MAX = 500;
|
|
11
|
-
/** Every carrier code the type map's releases declare, with the lines that declare it. A code on more lines than one is a conflict. */
|
|
12
|
-
async function carrierLinesOf(tx, domain) {
|
|
13
|
-
const byCode = new Map();
|
|
14
|
-
for (const line of await (0, type_map_1.linesOf)(tx, domain)) {
|
|
15
|
-
if (!line.release || line.release.deletedAt)
|
|
16
|
-
continue;
|
|
17
|
-
const release = await (0, inspection_1.freshen)(tx, line.release);
|
|
18
|
-
if (!release.carrierType)
|
|
19
|
-
continue;
|
|
20
|
-
byCode.set(release.carrierType, [...(byCode.get(release.carrierType) ?? []), { name: line.name, release }]);
|
|
21
|
-
}
|
|
22
|
-
return byCode;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Carrier types live data names, answered from the domain's type map (ADR-0123): per code the release whose declaration
|
|
26
|
-
* names it and its physical size, or a refusal with its cause. A code two releases declare is never picked from; it is
|
|
27
|
-
* refused as a conflict naming both.
|
|
28
|
-
*/
|
|
29
|
-
async function carrierTypesOf(tx, domain, carrierTypes, speak) {
|
|
30
|
-
const codes = [...new Set(carrierTypes.map(figure_model_1.normalizeCarrierType).filter(Boolean))];
|
|
31
|
-
if (codes.length > exports.FIGURE_CARRIER_TYPES_MAX) {
|
|
32
|
-
throw new shell_1.Refusal('figure-carrier-types-too-many', { count: codes.length, max: exports.FIGURE_CARRIER_TYPES_MAX }, 'at most {max} carrier types can be asked at once, not {count}.');
|
|
33
|
-
}
|
|
34
|
-
const answer = { items: [], refused: [] };
|
|
35
|
-
const refuse = (carrierType, refusal, refs) => answer.refused.push({ carrierType, code: refusal.code, message: speak(refusal), ...(refs ? { refs } : {}) });
|
|
36
|
-
const lines = await carrierLinesOf(tx, domain);
|
|
37
|
-
for (const carrierType of codes) {
|
|
38
|
-
const found = lines.get(carrierType) ?? [];
|
|
39
|
-
if (!found.length) {
|
|
40
|
-
refuse(carrierType, new shell_1.Refusal('figure-carrier-not-in-type-map', { carrierType }, 'no figure in the type map is carrier type {carrierType}.'));
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
if (found.length > 1) {
|
|
44
|
-
const refs = found.map(line => line.release.ref);
|
|
45
|
-
refuse(carrierType, new shell_1.Refusal('figure-carrier-conflict', { carrierType, refs: refs.join(', ') }, 'carrier type {carrierType} is declared by more than one figure in the type map: {refs}.'), refs);
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
const [{ name, release }] = found;
|
|
49
|
-
answer.items.push({ carrierType, name, ref: release.ref, dimensions: { ...release.carrierDimensions } });
|
|
50
|
-
}
|
|
51
|
-
return answer;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=carriers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"carriers.js","sourceRoot":"","sources":["../../../server/service/library/carriers.ts"],"names":[],"mappings":"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","sourcesContent":["import { EntityManager } from 'typeorm'\n\nimport { normalizeCarrierType } from '@hatiolab/figure-model'\nimport { Refusal } from '@things-factory/shell'\n\nimport { FigureLibraryRelease } from '../figure-library-release/figure-library-release'\nimport { freshen } from './inspection'\nimport { linesOf } from './type-map'\n\nexport const FIGURE_CARRIER_TYPES_MAX = 500\n\n/** The type map lines whose releases declare a carrier, by the CARRIERTYPE code they declare. */\nexport interface CarrierLine {\n /** Full figure name {namespace}/{type}: the map's key, kept apart from the code. */\n name: string\n release: FigureLibraryRelease\n}\n\nexport interface CarrierTypesAnswer {\n items: { carrierType: string; name: string; ref: string; dimensions: { width: number; length: number; height: number } }[]\n refused: { carrierType: string; code: string; message: string; refs?: string[] }[]\n}\n\n/** Every carrier code the type map's releases declare, with the lines that declare it. A code on more lines than one is a conflict. */\nexport async function carrierLinesOf(tx: EntityManager, domain: { id: string }): Promise<Map<string, CarrierLine[]>> {\n const byCode = new Map<string, CarrierLine[]>()\n for (const line of await linesOf(tx, domain)) {\n if (!line.release || line.release.deletedAt) continue\n const release = await freshen(tx, line.release)\n if (!release.carrierType) continue\n byCode.set(release.carrierType, [...(byCode.get(release.carrierType) ?? []), { name: line.name, release }])\n }\n return byCode\n}\n\n/**\n * Carrier types live data names, answered from the domain's type map (ADR-0123): per code the release whose declaration\n * names it and its physical size, or a refusal with its cause. A code two releases declare is never picked from; it is\n * refused as a conflict naming both.\n */\nexport async function carrierTypesOf(\n tx: EntityManager,\n domain: { id: string },\n carrierTypes: readonly string[],\n speak: (refusal: Refusal) => string\n): Promise<CarrierTypesAnswer> {\n const codes = [...new Set(carrierTypes.map(normalizeCarrierType).filter(Boolean))]\n if (codes.length > FIGURE_CARRIER_TYPES_MAX) {\n throw new Refusal('figure-carrier-types-too-many', { count: codes.length, max: FIGURE_CARRIER_TYPES_MAX }, 'at most {max} carrier types can be asked at once, not {count}.')\n }\n const answer: CarrierTypesAnswer = { items: [], refused: [] }\n const refuse = (carrierType: string, refusal: Refusal, refs?: string[]) =>\n answer.refused.push({ carrierType, code: refusal.code, message: speak(refusal), ...(refs ? { refs } : {}) })\n\n const lines = await carrierLinesOf(tx, domain)\n for (const carrierType of codes) {\n const found = lines.get(carrierType) ?? []\n if (!found.length) {\n refuse(carrierType, new Refusal('figure-carrier-not-in-type-map', { carrierType }, 'no figure in the type map is carrier type {carrierType}.'))\n continue\n }\n if (found.length > 1) {\n const refs = found.map(line => line.release.ref)\n refuse(\n carrierType,\n new Refusal('figure-carrier-conflict', { carrierType, refs: refs.join(', ') }, 'carrier type {carrierType} is declared by more than one figure in the type map: {refs}.'),\n refs\n )\n continue\n }\n const [{ name, release }] = found\n answer.items.push({ carrierType, name, ref: release.ref, dimensions: { ...release.carrierDimensions! } })\n }\n return answer\n}\n"]}
|