exiftool-vendored 29.3.0 → 30.0.0
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/CHANGELOG.md +12 -0
- package/CLAUDE.md +131 -0
- package/RELEASE.md +3 -3
- package/dist/Array.d.ts +2 -2
- package/dist/Array.js.map +1 -1
- package/dist/ExifToolVendoredTags.d.ts +15 -5
- package/dist/ExifToolVendoredTags.js +2 -11
- package/dist/ExifToolVendoredTags.js.map +1 -1
- package/dist/GeolocationTags.d.ts +4 -6
- package/dist/GeolocationTags.js +2 -20
- package/dist/GeolocationTags.js.map +1 -1
- package/dist/ICCProfileTags.d.ts +4 -0
- package/dist/ICCProfileTags.js +7 -0
- package/dist/ICCProfileTags.js.map +1 -1
- package/dist/IPTCApplicationRecordTags.d.ts +7 -0
- package/dist/IPTCApplicationRecordTags.js +10 -0
- package/dist/IPTCApplicationRecordTags.js.map +1 -1
- package/dist/ImageDataHashTag.d.ts +4 -0
- package/dist/ImageDataHashTag.js +7 -0
- package/dist/ImageDataHashTag.js.map +1 -1
- package/dist/MWGTags.d.ts +13 -0
- package/dist/MWGTags.js +18 -0
- package/dist/MWGTags.js.map +1 -1
- package/dist/Maybe.d.ts +4 -3
- package/dist/Maybe.js.map +1 -1
- package/dist/Object.d.ts +8 -2
- package/dist/Object.js +13 -13
- package/dist/Object.js.map +1 -1
- package/dist/ReadTask.js +7 -3
- package/dist/ReadTask.js.map +1 -1
- package/dist/StrEnum.d.ts +35 -0
- package/dist/StrEnum.js +75 -0
- package/dist/StrEnum.js.map +1 -0
- package/dist/Tags.d.ts +91 -45
- package/dist/Tags.js +32 -0
- package/dist/Tags.js.map +1 -1
- package/dist/Timezones.d.ts +11 -0
- package/dist/Timezones.js +51 -22
- package/dist/Timezones.js.map +1 -1
- package/package.json +25 -13
package/CHANGELOG.md
CHANGED
|
@@ -25,6 +25,18 @@ vendored versions of ExifTool match the version that they vendor.
|
|
|
25
25
|
|
|
26
26
|
## Version history
|
|
27
27
|
|
|
28
|
+
### v30.0.0
|
|
29
|
+
|
|
30
|
+
- 💔 Dropped support for Node v18, whose End-of-Life was 2025-04-30.
|
|
31
|
+
|
|
32
|
+
- 🌱 Upgraded ExifTool to version [13.29](https://exiftool.org/history.html#13.29).
|
|
33
|
+
|
|
34
|
+
- ✨ Added new `TagNames` string enumeration with the most popular 2,500(ish) tag field names that is automatically updated by `mktags`. As a reminder: the `Tags` interface _is not comprehensive_. If we're missing any of your favorite fields, open an issue with an attached example media file and I look into promoting it to a "guaranteed" status (like we've done with several hundred fields already).
|
|
35
|
+
|
|
36
|
+
- 📦 Renamed the `.tz` field in `Tags` to `.zone`. Note that for the next few releases, `.tz` will be kept, but marked as deprecated. After doing a bit of research, it turns out the correct term for identifiers like `America/Los_Angeles` within the IANA Time Zone Database is "zone." The "tz" term commonly refers to the entire Time Zone Database, or "tz database" (also called tzdata or zoneinfo).
|
|
37
|
+
|
|
38
|
+
- ✨ Updating to new versions of ExifTool is now fully automated via GitHub Actions.
|
|
39
|
+
|
|
28
40
|
### v29.3.0
|
|
29
41
|
|
|
30
42
|
- 🌱 Upgraded ExifTool to version [13.26](https://exiftool.org/history.html#13.26).
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This is exiftool-vendored.js, a Node.js library that provides cross-platform access to ExifTool for reading and writing metadata in photos and videos. The library includes comprehensive TypeScript type definitions for metadata tags and is used by PhotoStructure and 500+ other projects.
|
|
8
|
+
|
|
9
|
+
## Key Commands
|
|
10
|
+
|
|
11
|
+
### Building & Development
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Install dependencies
|
|
15
|
+
npm install
|
|
16
|
+
|
|
17
|
+
# Compile TypeScript to JavaScript
|
|
18
|
+
npm run compile
|
|
19
|
+
|
|
20
|
+
# Watch mode for development
|
|
21
|
+
npm run compile:watch
|
|
22
|
+
|
|
23
|
+
# Clean build artifacts
|
|
24
|
+
npm run clean
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Linting & Formatting
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Run ESLint with TypeScript configuration
|
|
31
|
+
npm run lint
|
|
32
|
+
|
|
33
|
+
# Format all TypeScript and other files with Prettier
|
|
34
|
+
npm run fmt
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Testing
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Run all tests (requires compilation first)
|
|
41
|
+
npm test
|
|
42
|
+
|
|
43
|
+
# Note: Tests use Mocha and execute the compiled JavaScript files in dist/
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Documentation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Generate TypeDoc documentation
|
|
50
|
+
npm run docs
|
|
51
|
+
|
|
52
|
+
# This runs the typedoc tool and serves the documentation locally
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Tag Generation
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Regenerate src/Tags.ts from sample images
|
|
59
|
+
npm run mktags ../path/to/images
|
|
60
|
+
|
|
61
|
+
# This requires a directory of sample images to analyze and extract metadata tags
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Architecture & Key Concepts
|
|
65
|
+
|
|
66
|
+
### Core Components
|
|
67
|
+
|
|
68
|
+
1. **ExifTool Class** (`src/ExifTool.ts`): Main entry point that wraps ExifTool process management using batch-cluster. Provides methods for reading metadata, writing tags, extracting binaries, and rewriting tags.
|
|
69
|
+
|
|
70
|
+
2. **Tags Interface** (`src/Tags.ts`): Auto-generated TypeScript interface containing ~2000 metadata fields commonly found in photo/video files. Generated by analyzing thousands of sample files to avoid TypeScript union type limits. Fields include popularity ratings and example values.
|
|
71
|
+
|
|
72
|
+
3. **Date/Time Handling**: Custom classes for handling EXIF dates with timezone complexities:
|
|
73
|
+
|
|
74
|
+
- `ExifDate`: Date without time
|
|
75
|
+
- `ExifTime`: Time without date
|
|
76
|
+
- `ExifDateTime`: Date and time with optional timezone
|
|
77
|
+
|
|
78
|
+
4. **Task System**: Various task classes for different operations:
|
|
79
|
+
|
|
80
|
+
- `ReadTask`: Read metadata from files
|
|
81
|
+
- `WriteTask`: Write metadata to files
|
|
82
|
+
- `BinaryExtractionTask`: Extract thumbnails/previews
|
|
83
|
+
- `RewriteAllTagsTask`: Repair corrupt metadata
|
|
84
|
+
|
|
85
|
+
5. **Platform Support**: Includes platform-specific ExifTool binaries via optional dependencies:
|
|
86
|
+
- `exiftool-vendored.exe` for Windows
|
|
87
|
+
- `exiftool-vendored.pl` for Unix-like systems
|
|
88
|
+
|
|
89
|
+
### Timezone Handling
|
|
90
|
+
|
|
91
|
+
The library implements sophisticated timezone heuristics to handle underspecified date metadata:
|
|
92
|
+
|
|
93
|
+
1. Uses explicit timezone metadata if available
|
|
94
|
+
2. Falls back to GPS location for timezone inference
|
|
95
|
+
3. Uses UTC timestamp deltas to infer timezone offsets
|
|
96
|
+
4. Handles edge cases like daylight saving time transitions
|
|
97
|
+
|
|
98
|
+
### Tag Generation Process
|
|
99
|
+
|
|
100
|
+
The `mktags.ts` script analyzes sample images to generate TypeScript interfaces:
|
|
101
|
+
|
|
102
|
+
1. Scans image directories for various formats (JPEG, RAW, video)
|
|
103
|
+
2. Extracts metadata using ExifTool
|
|
104
|
+
3. Counts tag frequencies and value types
|
|
105
|
+
4. Generates strongly-typed interfaces for the most common ~2000 tags
|
|
106
|
+
5. Includes popularity ratings (★★★★ = >50% of samples)
|
|
107
|
+
|
|
108
|
+
### Testing Approach
|
|
109
|
+
|
|
110
|
+
Tests use Mocha with Chai assertions:
|
|
111
|
+
|
|
112
|
+
- Unit tests for individual components (dates, parsers, etc.)
|
|
113
|
+
- Integration tests for ExifTool operations
|
|
114
|
+
- Test images in the `test/` directory cover various edge cases
|
|
115
|
+
- Includes non-English filename tests
|
|
116
|
+
|
|
117
|
+
## Important Notes
|
|
118
|
+
|
|
119
|
+
- Always run `npm run compile` before testing
|
|
120
|
+
- The singleton `exiftool` instance must be properly ended with `.end()` to clean up child processes
|
|
121
|
+
- Tag interfaces are not comprehensive - less common tags may exist in returned objects
|
|
122
|
+
- The library uses batch processing for performance, managing process pools automatically
|
|
123
|
+
- TypeScript's union type limits require careful tag selection to avoid compilation errors
|
|
124
|
+
|
|
125
|
+
## Important TypeScript Hygiene
|
|
126
|
+
|
|
127
|
+
- You MUST use `if (x != null)` to test for `null` or `undefined` values.
|
|
128
|
+
DO NOT use `if (x)`: this is problematic (especially when handling boolean values).
|
|
129
|
+
|
|
130
|
+
- You MUST use `??` for nullish coalescing.
|
|
131
|
+
DO NOT use `||`: this is problematic (especially when handling boolean values).
|
package/RELEASE.md
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
4. On POSIX, in `../exiftool-vendored.pl`:
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
1. Verify
|
|
16
|
-
1.
|
|
14
|
+
1. Run the "check-updates" GitHub Action. If there is a pending update, a PR is generated.
|
|
15
|
+
1. Verify and merge the PR
|
|
16
|
+
1. Run the "release" GitHub Action.
|
|
17
17
|
|
|
18
18
|
5. On Windows, in `...\exiftool-vendored.exe\`:
|
|
19
19
|
(The terminal built into vscode plays with `ncu` and `release-it` a bit nicer than CMD or Windows for Git's terminal)
|
package/dist/Array.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Maybe,
|
|
1
|
+
import { Maybe, Nullable } from "./Maybe";
|
|
2
2
|
export declare function isIterable(obj: unknown): obj is Iterable<unknown>;
|
|
3
3
|
export declare function ifArray<T = unknown>(arr: T[] | unknown): Maybe<T[]>;
|
|
4
4
|
export declare function toArray<T>(arr: undefined | null | T[] | T | Iterable<T>): T[];
|
|
5
|
-
export declare function compact<T>(array:
|
|
5
|
+
export declare function compact<T>(array: Nullable<T>[]): T[];
|
|
6
6
|
/**
|
|
7
7
|
* Remove all elements from the given array that return false from the given
|
|
8
8
|
* predicate `filter`.
|
package/dist/Array.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Array.js","sourceRoot":"","sources":["../src/Array.ts"],"names":[],"mappings":";;AAIA,gCAEC;AAED,0BAEC;AAED,0BAUC;AAED,0BAEC;AAMD,sCAUC;AAED,oBAKC;AAGD,0CAOC;AAWD,wBAYC;AAwBD,0BAcC;AAvHD,qCAAoC;AACpC,qCAAoC;AAEpC,SAAgB,UAAU,CAAC,GAAY;IACrC,OAAO,CAAC,IAAA,iBAAQ,EAAC,GAAG,CAAC,IAAI,MAAM,CAAC,QAAQ,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,OAAO,CAAc,GAAkB;IACrD,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9C,CAAC;AAED,SAAgB,OAAO,CAAI,GAA6C;IACtE,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,2BAA2B;QACnD,CAAC,CAAE,GAAW;QACd,CAAC,CAAC,GAAG,IAAI,IAAI;YACX,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,IAAA,iBAAQ,EAAC,GAAG,CAAC,CAAC,+CAA+C;gBAC7D,CAAC,CAAC,CAAC,GAAQ,CAAC;gBACZ,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;oBACf,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;oBACjB,CAAC,CAAC,CAAC,GAAQ,CAAC,CAAC;AACvB,CAAC;AAED,SAAgB,OAAO,CAAI,
|
|
1
|
+
{"version":3,"file":"Array.js","sourceRoot":"","sources":["../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AAI,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,IAAI,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC;YAC9C,GAAG,GAAG,GAAG,CAAC;YACV,MAAM,GAAG,EAAE,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,MAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ErrorsAndWarnings } from "./ErrorsAndWarnings";
|
|
2
|
+
import { StrEnum, StrEnumKeys } from "./StrEnum";
|
|
2
3
|
/**
|
|
3
4
|
* This tags are added to {@link Tags} from this library.
|
|
4
5
|
*/
|
|
@@ -8,16 +9,25 @@ export interface ExifToolVendoredTags extends ErrorsAndWarnings {
|
|
|
8
9
|
* `America/Los_Angeles`.
|
|
9
10
|
*
|
|
10
11
|
* This will be missing if we can't intuit a timezone from the metadata.
|
|
12
|
+
* @deprecated use `zone` instead
|
|
11
13
|
*/
|
|
12
14
|
tz?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The IANA timezone, like `America/Los_Angeles`, or a IANA-rendered static offset, like `UTC-7`.
|
|
17
|
+
*
|
|
18
|
+
* This will be missing if we can't intuit a timezone from the metadata.
|
|
19
|
+
*/
|
|
20
|
+
zone?: string;
|
|
13
21
|
/**
|
|
14
22
|
* Description of where and how `tz` was extracted
|
|
23
|
+
* @deprecated use `zoneSource` instead
|
|
15
24
|
*/
|
|
16
25
|
tzSource?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Description of where and how `zone` was extracted
|
|
28
|
+
*/
|
|
29
|
+
zoneSource?: string;
|
|
17
30
|
}
|
|
18
|
-
export declare const ExifToolVendoredTagNames:
|
|
19
|
-
|
|
20
|
-
* Is the given tag name intrinsic to the content of a given file? In other
|
|
21
|
-
* words, is it not an artifact of a metadata field?
|
|
22
|
-
*/
|
|
31
|
+
export declare const ExifToolVendoredTagNames: StrEnum<"zone" | "tz" | "tzSource" | "zoneSource" | "errors" | "warnings">;
|
|
32
|
+
export type ExifToolVendoredTagName = StrEnumKeys<typeof ExifToolVendoredTagNames>;
|
|
23
33
|
export declare function isExifToolVendoredTag(name: string): name is keyof ExifToolVendoredTags;
|
|
@@ -2,17 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExifToolVendoredTagNames = void 0;
|
|
4
4
|
exports.isExifToolVendoredTag = isExifToolVendoredTag;
|
|
5
|
-
const
|
|
6
|
-
exports.ExifToolVendoredTagNames = (0,
|
|
7
|
-
tz: true,
|
|
8
|
-
tzSource: true,
|
|
9
|
-
errors: true,
|
|
10
|
-
warnings: true,
|
|
11
|
-
});
|
|
12
|
-
/**
|
|
13
|
-
* Is the given tag name intrinsic to the content of a given file? In other
|
|
14
|
-
* words, is it not an artifact of a metadata field?
|
|
15
|
-
*/
|
|
5
|
+
const StrEnum_1 = require("./StrEnum");
|
|
6
|
+
exports.ExifToolVendoredTagNames = (0, StrEnum_1.strEnum)("tz", "zone", "tzSource", "zoneSource", "errors", "warnings");
|
|
16
7
|
function isExifToolVendoredTag(name) {
|
|
17
8
|
return exports.ExifToolVendoredTagNames.includes(name);
|
|
18
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExifToolVendoredTags.js","sourceRoot":"","sources":["../src/ExifToolVendoredTags.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ExifToolVendoredTags.js","sourceRoot":"","sources":["../src/ExifToolVendoredTags.ts"],"names":[],"mappings":";;;AAgDA,sDAIC;AAnDD,uCAA0D;AAkC7C,QAAA,wBAAwB,GAAG,IAAA,iBAAO,EAC7C,IAAI,EACJ,MAAM,EACN,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,UAAU,CACmC,CAAC;AAMhD,SAAgB,qBAAqB,CACnC,IAAY;IAEZ,OAAO,gCAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Is the given tag name intrinsic to the content of a given file? In other
|
|
4
|
-
* words, is it not an artifact of a metadata field?
|
|
5
|
-
*/
|
|
6
|
-
export declare function isGeolocationTag(name: string): name is keyof GeolocationTags;
|
|
1
|
+
import { StrEnum, StrEnumKeys } from "./StrEnum";
|
|
7
2
|
/**
|
|
8
3
|
* These tags are only available if {@link ExifToolOptions.geolocation} is true
|
|
9
4
|
* and the file has valid GPS location data.
|
|
@@ -45,3 +40,6 @@ export interface GeolocationTags {
|
|
|
45
40
|
GeolocationTimeZone?: string;
|
|
46
41
|
GeolocationWarning?: string;
|
|
47
42
|
}
|
|
43
|
+
export declare const GeolocationTagNames: StrEnum<"GeolocationBearing" | "GeolocationCity" | "GeolocationCountry" | "GeolocationCountryCode" | "GeolocationDistance" | "GeolocationFeatureCode" | "GeolocationFeatureType" | "GeolocationPopulation" | "GeolocationPosition" | "GeolocationRegion" | "GeolocationSubregion" | "GeolocationTimeZone" | "GeolocationWarning">;
|
|
44
|
+
export type GeolocationTagName = StrEnumKeys<typeof GeolocationTagNames>;
|
|
45
|
+
export declare function isGeolocationTag(name: string): name is keyof GeolocationTags;
|
package/dist/GeolocationTags.js
CHANGED
|
@@ -2,26 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GeolocationTagNames = void 0;
|
|
4
4
|
exports.isGeolocationTag = isGeolocationTag;
|
|
5
|
-
const
|
|
6
|
-
exports.GeolocationTagNames = (0,
|
|
7
|
-
GeolocationBearing: true,
|
|
8
|
-
GeolocationCity: true,
|
|
9
|
-
GeolocationCountry: true,
|
|
10
|
-
GeolocationCountryCode: true,
|
|
11
|
-
GeolocationDistance: true,
|
|
12
|
-
GeolocationFeatureCode: true,
|
|
13
|
-
GeolocationFeatureType: true,
|
|
14
|
-
GeolocationPopulation: true,
|
|
15
|
-
GeolocationPosition: true,
|
|
16
|
-
GeolocationRegion: true,
|
|
17
|
-
GeolocationSubregion: true,
|
|
18
|
-
GeolocationTimeZone: true,
|
|
19
|
-
GeolocationWarning: true,
|
|
20
|
-
});
|
|
21
|
-
/**
|
|
22
|
-
* Is the given tag name intrinsic to the content of a given file? In other
|
|
23
|
-
* words, is it not an artifact of a metadata field?
|
|
24
|
-
*/
|
|
5
|
+
const StrEnum_1 = require("./StrEnum");
|
|
6
|
+
exports.GeolocationTagNames = (0, StrEnum_1.strEnum)("GeolocationBearing", "GeolocationCity", "GeolocationCountry", "GeolocationCountryCode", "GeolocationDistance", "GeolocationFeatureCode", "GeolocationFeatureType", "GeolocationPopulation", "GeolocationPosition", "GeolocationRegion", "GeolocationSubregion", "GeolocationTimeZone", "GeolocationWarning");
|
|
25
7
|
function isGeolocationTag(name) {
|
|
26
8
|
return exports.GeolocationTagNames.includes(name);
|
|
27
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeolocationTags.js","sourceRoot":"","sources":["../src/GeolocationTags.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"GeolocationTags.js","sourceRoot":"","sources":["../src/GeolocationTags.ts"],"names":[],"mappings":";;;AA8DA,4CAEC;AAhED,uCAA0D;AA4C7C,QAAA,mBAAmB,GAAG,IAAA,iBAAO,EACxC,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,CACoB,CAAC;AAI3C,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,OAAO,2BAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC"}
|
package/dist/ICCProfileTags.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StrEnum, StrEnumKeys } from "./StrEnum";
|
|
1
2
|
/**
|
|
2
3
|
* Subset of <https://exiftool.org/TagNames/ICC_Profile.html>.
|
|
3
4
|
*
|
|
@@ -23,3 +24,6 @@ export interface ICCProfileTags {
|
|
|
23
24
|
/** ☆☆☆☆ ✔ Example: "sRGB v1.31 (Canon)" */
|
|
24
25
|
ProfileDescription?: string;
|
|
25
26
|
}
|
|
27
|
+
export declare const ICCProfileTagNames: StrEnum<"ColorSpaceData" | "ConnectionSpaceIlluminant" | "DeviceAttributes" | "DeviceManufacturer" | "DeviceMfgDesc" | "DeviceModel" | "DeviceModelDesc" | "Luminance" | "ProfileDescription">;
|
|
28
|
+
export type ICCProfileTagName = StrEnumKeys<typeof ICCProfileTagNames>;
|
|
29
|
+
export declare function isICCProfileTag(name: string): name is keyof ICCProfileTags;
|
package/dist/ICCProfileTags.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ICCProfileTagNames = void 0;
|
|
4
|
+
exports.isICCProfileTag = isICCProfileTag;
|
|
5
|
+
const StrEnum_1 = require("./StrEnum");
|
|
6
|
+
exports.ICCProfileTagNames = (0, StrEnum_1.strEnum)("ColorSpaceData", "ConnectionSpaceIlluminant", "DeviceAttributes", "DeviceManufacturer", "DeviceMfgDesc", "DeviceModel", "DeviceModelDesc", "Luminance", "ProfileDescription");
|
|
7
|
+
function isICCProfileTag(name) {
|
|
8
|
+
return exports.ICCProfileTagNames.includes(name);
|
|
9
|
+
}
|
|
3
10
|
//# sourceMappingURL=ICCProfileTags.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICCProfileTags.js","sourceRoot":"","sources":["../src/ICCProfileTags.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ICCProfileTags.js","sourceRoot":"","sources":["../src/ICCProfileTags.ts"],"names":[],"mappings":";;;AA0CA,0CAEC;AA5CD,uCAA0D;AA4B7C,QAAA,kBAAkB,GAAG,IAAA,iBAAO,EACvC,gBAAgB,EAChB,2BAA2B,EAC3B,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,oBAAoB,CACmB,CAAC;AAI1C,SAAgB,eAAe,CAAC,IAAY;IAC1C,OAAO,0BAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExifDate } from "./ExifDate";
|
|
2
2
|
import { ExifDateTime } from "./ExifDateTime";
|
|
3
3
|
import { ExifTime } from "./ExifTime";
|
|
4
|
+
import { StrEnum, StrEnumKeys } from "./StrEnum";
|
|
4
5
|
/**
|
|
5
6
|
* IPTC (International Press Telecommunications Council) defines a set of
|
|
6
7
|
* metadata tags that can be embedded into image files, but _they came up with
|
|
@@ -79,3 +80,9 @@ export interface IPTCApplicationRecordTags {
|
|
|
79
80
|
DocumentHistory?: string;
|
|
80
81
|
ExifCameraInfo?: string;
|
|
81
82
|
}
|
|
83
|
+
export declare const IPTCApplicationRecordTagNames: StrEnum<"ApplicationRecordVersion" | "ObjectTypeReference" | "ObjectAttributeReference" | "ObjectName" | "EditStatus" | "EditorialUpDate" | "Urgency" | "SubjectReference" | "Category" | "SupplementalCategories" | "FixtureIdentifier" | "ContentLocationCode" | "ContentLocationName" | "ReleaseDate" | "ReleaseTime" | "ExpirationDate" | "ExpirationTime" | "SpecialInstructions" | "ActionAdvised" | "ReferenceService" | "ReferenceDate" | "ReferenceNumber" | "OriginatingProgram" | "ProgramVersion" | "ObjectCycle" | "By-line" | "By-lineTitle" | "City" | "Sub-location" | "Province-State" | "Country-PrimaryLocationCode" | "Country-PrimaryLocationName" | "OriginalTransmissionReference" | "Headline" | "Credit" | "Source" | "CopyrightNotice" | "Contact" | "Caption-Abstract" | "LocalCaption" | "Writer-Editor" | "ImageType" | "ImageOrientation" | "LanguageIdentifier" | "AudioType" | "AudioSamplingRate" | "AudioSamplingResolution" | "AudioDuration" | "AudioOutcue" | "JobID" | "MasterDocumentID" | "ShortDocumentID" | "UniqueDocumentID" | "OwnerID" | "ObjectPreviewFileFormat" | "ObjectPreviewFileVersion" | "Prefs" | "ClassifyState" | "SimilarityIndex" | "DocumentNotes" | "DocumentHistory" | "ExifCameraInfo">;
|
|
84
|
+
export type IPTCApplicationRecordTagName = StrEnumKeys<typeof IPTCApplicationRecordTagNames>;
|
|
85
|
+
/**
|
|
86
|
+
* Is the given tag name an IPTC application record tag?
|
|
87
|
+
*/
|
|
88
|
+
export declare function isIPTCApplicationRecordTag(name: string): name is keyof IPTCApplicationRecordTags;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IPTCApplicationRecordTagNames = void 0;
|
|
4
|
+
exports.isIPTCApplicationRecordTag = isIPTCApplicationRecordTag;
|
|
5
|
+
const StrEnum_1 = require("./StrEnum");
|
|
6
|
+
exports.IPTCApplicationRecordTagNames = (0, StrEnum_1.strEnum)("ApplicationRecordVersion", "ObjectTypeReference", "ObjectAttributeReference", "ObjectName", "EditStatus", "EditorialUpDate", "Urgency", "SubjectReference", "Category", "SupplementalCategories", "FixtureIdentifier", "ContentLocationCode", "ContentLocationName", "ReleaseDate", "ReleaseTime", "ExpirationDate", "ExpirationTime", "SpecialInstructions", "ActionAdvised", "ReferenceService", "ReferenceDate", "ReferenceNumber", "OriginatingProgram", "ProgramVersion", "ObjectCycle", "By-line", "By-lineTitle", "City", "Sub-location", "Province-State", "Country-PrimaryLocationCode", "Country-PrimaryLocationName", "OriginalTransmissionReference", "Headline", "Credit", "Source", "CopyrightNotice", "Contact", "Caption-Abstract", "LocalCaption", "Writer-Editor", "ImageType", "ImageOrientation", "LanguageIdentifier", "AudioType", "AudioSamplingRate", "AudioSamplingResolution", "AudioDuration", "AudioOutcue", "JobID", "MasterDocumentID", "ShortDocumentID", "UniqueDocumentID", "OwnerID", "ObjectPreviewFileFormat", "ObjectPreviewFileVersion", "Prefs", "ClassifyState", "SimilarityIndex", "DocumentNotes", "DocumentHistory", "ExifCameraInfo");
|
|
7
|
+
/**
|
|
8
|
+
* Is the given tag name an IPTC application record tag?
|
|
9
|
+
*/
|
|
10
|
+
function isIPTCApplicationRecordTag(name) {
|
|
11
|
+
return exports.IPTCApplicationRecordTagNames.includes(name);
|
|
12
|
+
}
|
|
3
13
|
//# sourceMappingURL=IPTCApplicationRecordTags.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPTCApplicationRecordTags.js","sourceRoot":"","sources":["../src/IPTCApplicationRecordTags.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"IPTCApplicationRecordTags.js","sourceRoot":"","sources":["../src/IPTCApplicationRecordTags.ts"],"names":[],"mappings":";;;AA4JA,gEAIC;AA7JD,uCAA0D;AAiF7C,QAAA,6BAA6B,GAAG,IAAA,iBAAO,EAClD,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,cAAc,EACd,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,yBAAyB,EACzB,0BAA0B,EAC1B,OAAO,EACP,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,CACkC,CAAC;AAMrD;;GAEG;AACH,SAAgB,0BAA0B,CACxC,IAAY;IAEZ,OAAO,qCAA6B,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StrEnum, StrEnumKeys } from "./StrEnum";
|
|
1
2
|
export interface ImageDataHashTag {
|
|
2
3
|
/**
|
|
3
4
|
* This is calculated by ExifTool to be the MD5, SHA256, or SHA512 hash of
|
|
@@ -11,3 +12,6 @@ export interface ImageDataHashTag {
|
|
|
11
12
|
*/
|
|
12
13
|
ImageDataHash?: string;
|
|
13
14
|
}
|
|
15
|
+
export declare const ImageDataHashTagNames: StrEnum<"ImageDataHash">;
|
|
16
|
+
export type ImageDataHashTagName = StrEnumKeys<typeof ImageDataHashTagNames>;
|
|
17
|
+
export declare function isImageDataHashTag(name: string): name is keyof ImageDataHashTag;
|
package/dist/ImageDataHashTag.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageDataHashTagNames = void 0;
|
|
4
|
+
exports.isImageDataHashTag = isImageDataHashTag;
|
|
5
|
+
const StrEnum_1 = require("./StrEnum");
|
|
6
|
+
exports.ImageDataHashTagNames = (0, StrEnum_1.strEnum)("ImageDataHash");
|
|
7
|
+
function isImageDataHashTag(name) {
|
|
8
|
+
return exports.ImageDataHashTagNames.includes(name);
|
|
9
|
+
}
|
|
3
10
|
//# sourceMappingURL=ImageDataHashTag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageDataHashTag.js","sourceRoot":"","sources":["../src/ImageDataHashTag.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ImageDataHashTag.js","sourceRoot":"","sources":["../src/ImageDataHashTag.ts"],"names":[],"mappings":";;;AAsBA,gDAIC;AA1BD,uCAA0D;AAgB7C,QAAA,qBAAqB,GAAG,IAAA,iBAAO,EAAC,eAAe,CAE3D,CAAC;AAIF,SAAgB,kBAAkB,CAChC,IAAY;IAEZ,OAAO,6BAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC"}
|
package/dist/MWGTags.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StrEnum, StrEnumKeys } from "./StrEnum";
|
|
1
2
|
export interface KeywordInfoStruct {
|
|
2
3
|
Hierarchy?: KeywordStruct[];
|
|
3
4
|
}
|
|
@@ -25,3 +26,15 @@ export interface CollectionInfo {
|
|
|
25
26
|
export interface MWGCollectionsTags {
|
|
26
27
|
Collections?: CollectionInfo[];
|
|
27
28
|
}
|
|
29
|
+
export declare const MWGKeywordTagNames: StrEnum<"KeywordInfo" | "HierarchicalKeywords">;
|
|
30
|
+
export type MWGKeywordTagName = StrEnumKeys<typeof MWGKeywordTagNames>;
|
|
31
|
+
/**
|
|
32
|
+
* Is the given tag name an MWG keyword tag?
|
|
33
|
+
*/
|
|
34
|
+
export declare function isMWGKeywordTag(name: string): name is keyof MWGKeywordTags;
|
|
35
|
+
export declare const MWGCollectionsTagNames: StrEnum<"Collections">;
|
|
36
|
+
export type MWGCollectionsTagName = StrEnumKeys<typeof MWGCollectionsTagNames>;
|
|
37
|
+
/**
|
|
38
|
+
* Is the given tag name an MWG collections tag?
|
|
39
|
+
*/
|
|
40
|
+
export declare function isMWGCollectionsTag(name: string): name is keyof MWGCollectionsTags;
|
package/dist/MWGTags.js
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MWGCollectionsTagNames = exports.MWGKeywordTagNames = void 0;
|
|
4
|
+
exports.isMWGKeywordTag = isMWGKeywordTag;
|
|
5
|
+
exports.isMWGCollectionsTag = isMWGCollectionsTag;
|
|
6
|
+
const StrEnum_1 = require("./StrEnum");
|
|
7
|
+
exports.MWGKeywordTagNames = (0, StrEnum_1.strEnum)("KeywordInfo", "HierarchicalKeywords");
|
|
8
|
+
/**
|
|
9
|
+
* Is the given tag name an MWG keyword tag?
|
|
10
|
+
*/
|
|
11
|
+
function isMWGKeywordTag(name) {
|
|
12
|
+
return exports.MWGKeywordTagNames.includes(name);
|
|
13
|
+
}
|
|
14
|
+
exports.MWGCollectionsTagNames = (0, StrEnum_1.strEnum)("Collections");
|
|
15
|
+
/**
|
|
16
|
+
* Is the given tag name an MWG collections tag?
|
|
17
|
+
*/
|
|
18
|
+
function isMWGCollectionsTag(name) {
|
|
19
|
+
return exports.MWGCollectionsTagNames.includes(name);
|
|
20
|
+
}
|
|
3
21
|
//# sourceMappingURL=MWGTags.js.map
|
package/dist/MWGTags.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MWGTags.js","sourceRoot":"","sources":["../src/MWGTags.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"MWGTags.js","sourceRoot":"","sources":["../src/MWGTags.ts"],"names":[],"mappings":";;;AA4CA,0CAEC;AAWD,kDAIC;AA7DD,uCAA0D;AAkC7C,QAAA,kBAAkB,GAAG,IAAA,iBAAO,EACvC,aAAa,EACb,sBAAsB,CACiB,CAAC;AAI1C;;GAEG;AACH,SAAgB,eAAe,CAAC,IAAY;IAC1C,OAAO,0BAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC;AAEY,QAAA,sBAAsB,GAAG,IAAA,iBAAO,EAAC,aAAa,CAE1D,CAAC;AAIF;;GAEG;AACH,SAAgB,mBAAmB,CACjC,IAAY;IAEZ,OAAO,8BAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/Maybe.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export type Maybe<T> = T | undefined;
|
|
2
|
-
export type
|
|
3
|
-
export
|
|
4
|
-
export declare function
|
|
2
|
+
export type Nullable<T> = T | undefined | null;
|
|
3
|
+
export type MaybeNull<T> = Nullable<T>;
|
|
4
|
+
export declare function map<T, U>(maybeT: Nullable<T>, f: (t: T) => U): Maybe<U>;
|
|
5
|
+
export declare function map2<A, B, U>(a: Nullable<A>, b: Nullable<B>, f: (a: A, b: B) => U): Maybe<U>;
|
|
5
6
|
export declare function first<T, U>(iter: Iterable<Maybe<T>>, f: (t: T) => Maybe<U>): Maybe<U>;
|
|
6
7
|
export declare function firstDefinedThunk<T>(iter: Iterable<() => Maybe<T>>): Maybe<T>;
|
|
7
8
|
/**
|
package/dist/Maybe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Maybe.js","sourceRoot":"","sources":["../src/Maybe.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Maybe.js","sourceRoot":"","sources":["../src/Maybe.ts"],"names":[],"mappings":";;AAIA,kBAEC;AAED,oBAMC;AAED,sBAWC;AAED,8CAMC;AAKD,wBAEC;AAtCD,SAAgB,GAAG,CAAO,MAAmB,EAAE,CAAc;IAC3D,OAAO,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,SAAgB,IAAI,CAClB,CAAc,EACd,CAAc,EACd,CAAoB;IAEpB,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,SAAgB,KAAK,CACnB,IAAwB,EACxB,CAAqB;IAErB,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;YACd,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,IAAI,IAAI;gBAAE,OAAO,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IACD,OAAO;AACT,CAAC;AAED,SAAgB,iBAAiB,CAAI,IAA8B;IACjE,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,CAAC,EAAE,CAAC;QACnB,IAAI,MAAM,IAAI,IAAI;YAAE,OAAO,MAAM,CAAC;IACpC,CAAC;IACD,OAAO;AACT,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM,CAAI,CAAW;IACnC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC"}
|
package/dist/Object.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nullable } from "./Maybe";
|
|
2
2
|
export declare function isObject(obj: unknown): obj is object;
|
|
3
3
|
export declare function keys<T extends object, K extends string & keyof T>(o: T): K[];
|
|
4
4
|
export declare function isFunction(obj: unknown): obj is (...args: unknown[]) => unknown;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Turns an array of `[key, value]` pairs into an object.
|
|
7
|
+
*
|
|
8
|
+
* • Pairs whose key is `null | undefined` **or** value is `undefined` are skipped.
|
|
9
|
+
* • If `base` is provided it is mutated and returned (handy for “extend” use‑cases).
|
|
10
|
+
*/
|
|
11
|
+
export declare function fromEntries<K extends PropertyKey, V = unknown>(pairs: Nullable<Nullable<[Nullable<K>, V]>[]>, base?: Record<K, V>): Record<K, V>;
|
|
6
12
|
export type Unpick<T, U> = {
|
|
7
13
|
[P in keyof T]: P extends U ? never : T[P];
|
|
8
14
|
};
|
package/dist/Object.js
CHANGED
|
@@ -17,22 +17,22 @@ function keys(o) {
|
|
|
17
17
|
function isFunction(obj) {
|
|
18
18
|
return typeof obj === "function";
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Turns an array of `[key, value]` pairs into an object.
|
|
22
|
+
*
|
|
23
|
+
* • Pairs whose key is `null | undefined` **or** value is `undefined` are skipped.
|
|
24
|
+
* • If `base` is provided it is mutated and returned (handy for “extend” use‑cases).
|
|
25
|
+
*/
|
|
26
|
+
function fromEntries(pairs, base = {}) {
|
|
23
27
|
// don't use Object.create(null), json stringify will break!
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (!isObject(obj))
|
|
30
|
-
obj = {};
|
|
31
|
-
obj[k] = v;
|
|
32
|
-
}
|
|
28
|
+
if (pairs == null || pairs.length === 0)
|
|
29
|
+
return base ?? {};
|
|
30
|
+
for (const pair of pairs) {
|
|
31
|
+
if (pair != null && pair[0] != null && pair[1] !== undefined) {
|
|
32
|
+
base[pair[0]] = pair[1];
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return base;
|
|
36
36
|
}
|
|
37
37
|
function omit(t, ...keysToOmit) {
|
|
38
38
|
const result = {};
|
package/dist/Object.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Object.js","sourceRoot":"","sources":["../src/Object.ts"],"names":[],"mappings":";;AAEA,4BAEC;AAED,oBAMC;AAED,gCAIC;
|
|
1
|
+
{"version":3,"file":"Object.js","sourceRoot":"","sources":["../src/Object.ts"],"names":[],"mappings":";;AAEA,4BAEC;AAED,oBAMC;AAED,gCAIC;AAQD,kCAaC;AAID,oBAWC;AAWD,wBAEC;AAjED,SAAgB,QAAQ,CAAC,GAAY;IACnC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,CAAC;AACjD,CAAC;AAED,SAAgB,IAAI,CAA+C,CAAI;IACrE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AAgB,MAAM,CAAI,CAAkC;IAC1D,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAgB,CAAC;AACvC,CAAC;AAED,uDAAuD;AAEvD,yGAAyG"}
|
package/dist/ReadTask.js
CHANGED
|
@@ -207,6 +207,7 @@ class ReadTask extends ExifToolTask_1.ExifToolTask {
|
|
|
207
207
|
this.#extractGpsMetadata();
|
|
208
208
|
const tzSrc = this.#extractTzOffset();
|
|
209
209
|
if (tzSrc) {
|
|
210
|
+
tags.zone = tzSrc.zone;
|
|
210
211
|
tags.tz = tzSrc.tz;
|
|
211
212
|
tags.tzSource = tzSrc.src;
|
|
212
213
|
}
|
|
@@ -253,10 +254,11 @@ class ReadTask extends ExifToolTask_1.ExifToolTask {
|
|
|
253
254
|
if (gps == null || gps.invalid === true || lat == null || lon == null)
|
|
254
255
|
return;
|
|
255
256
|
// First try GeolocationTimeZone:
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
257
|
+
const geolocZone = (0, Timezones_1.normalizeZone)(this.#rawDegrouped.GeolocationTimeZone);
|
|
258
|
+
if (geolocZone != null) {
|
|
258
259
|
return {
|
|
259
|
-
|
|
260
|
+
zone: geolocZone.name,
|
|
261
|
+
tz: geolocZone.name,
|
|
260
262
|
src: "GeolocationTimeZone",
|
|
261
263
|
};
|
|
262
264
|
}
|
|
@@ -265,6 +267,7 @@ class ReadTask extends ExifToolTask_1.ExifToolTask {
|
|
|
265
267
|
const zone = (0, Timezones_1.normalizeZone)(geoTz);
|
|
266
268
|
if (zone != null) {
|
|
267
269
|
return {
|
|
270
|
+
zone: zone.name,
|
|
268
271
|
tz: zone.name,
|
|
269
272
|
src: "GPSLatitude/GPSLongitude",
|
|
270
273
|
};
|
|
@@ -292,6 +295,7 @@ class ReadTask extends ExifToolTask_1.ExifToolTask {
|
|
|
292
295
|
// timezone offset in their datetime stamps.
|
|
293
296
|
(this.#defaultToUTC()
|
|
294
297
|
? {
|
|
298
|
+
zone: "UTC",
|
|
295
299
|
tz: "UTC",
|
|
296
300
|
src: "defaultVideosToUTC",
|
|
297
301
|
}
|