itube-specs 0.0.757 → 0.0.759

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.757",
4
+ "version": "0.0.759",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {
@@ -15,7 +15,7 @@ describe('cleanModelInfo', () => {
15
15
  relatedNames: ['Model B'],
16
16
  aka_names: ['Alias A', 'Alias B'],
17
17
  birth_summary: 'Born 1990, USA',
18
- nationality_iso_code: 'US',
18
+ nationality_iso_codes: ['US', 'CA'],
19
19
  };
20
20
  const result = cleanModelInfo(raw as any);
21
21
  expect(result.title).toBe('Model Name');
@@ -28,7 +28,7 @@ describe('cleanModelInfo', () => {
28
28
  expect(result.relatedNames).toEqual(['Model B']);
29
29
  expect(result.akaNames).toBe('Alias A, Alias B');
30
30
  expect(result.birthSummary).toBe('Born 1990, USA');
31
- expect(result.nationalityIsoCode).toBe('US');
31
+ expect(result.nationalityIsoCodes).toEqual(['US', 'CA']);
32
32
  });
33
33
 
34
34
  it('пустые данные → дефолты', () => {
@@ -43,6 +43,6 @@ describe('cleanModelInfo', () => {
43
43
  expect(result.relatedNames).toEqual([]);
44
44
  expect(result.akaNames).toBe('');
45
45
  expect(result.birthSummary).toBe('');
46
- expect(result.nationalityIsoCode).toBe('');
46
+ expect(result.nationalityIsoCodes).toEqual([]);
47
47
  });
48
48
  });
@@ -13,5 +13,5 @@ export const cleanModelInfo = (card: IRawModelInfo): ICardInfo => ({
13
13
  relatedNames: card.relatedNames || [],
14
14
  akaNames: card.aka_names?.join(', ') || '',
15
15
  birthSummary: card.birth_summary || '',
16
- nationalityIsoCode: card.nationality_iso_code || '',
16
+ nationalityIsoCodes: card.nationality_iso_codes || [],
17
17
  })
@@ -24,7 +24,7 @@ export interface ICardInfo {
24
24
  relatedNames?: string[]
25
25
  akaNames: string;
26
26
  birthSummary: string;
27
- nationalityIsoCode: string;
27
+ nationalityIsoCodes: string[];
28
28
 
29
29
  // Fields specific to Category
30
30
  related?: IChipsItem[]
@@ -40,5 +40,5 @@ export interface IRawModelInfo {
40
40
  title: string
41
41
  }[];
42
42
  birth_summary: string;
43
- nationality_iso_code: string;
43
+ nationality_iso_codes: string[];
44
44
  }