exiftool-vendored 25.0.0 → 25.2.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 CHANGED
@@ -26,6 +26,25 @@ vendored versions of ExifTool match the version that they vendor.
26
26
 
27
27
  ## Version history
28
28
 
29
+ ### v25.2.0
30
+
31
+ - 🌱/✨ ExifTool upgraded to [v12.82](https://exiftool.org/history.html#v12.82)
32
+
33
+ - 📦 Add support for `NODE_DEBUG=exiftool-vendored`
34
+
35
+ - 📦 Export `exiftoolPath()` so custom implementations can use it as a fallback
36
+ (or default, and provide their own fallback)
37
+
38
+ ### v25.1.0
39
+
40
+ - ✨ Added `retain` field to [`ExifTool.deleteAllTags`](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#deleteAllTags) to address [#178](https://github.com/photostructure/exiftool-vendored.js/issues/178)
41
+
42
+ - 📦 Added jsdocs for many `Tag` interface types
43
+
44
+ - 📦 Expose `GeolocationTags` and `isGeolocationTag()`
45
+
46
+ - 📦 Add `FileTags.FileCreateDate` (only a thing on Windows)
47
+
29
48
  ### v25.0.0
30
49
 
31
50
  - 🌱/✨ ExifTool upgraded to [v12.80](https://exiftool.org/history.html#v12.80), which **adds support for reverse-geo lookups** and [several other geolocation features](https://exiftool.org/geolocation.html
@@ -34,7 +53,7 @@ vendored versions of ExifTool match the version that they vendor.
34
53
 
35
54
  - ✨ `ExifToolOptions.exiftoolPath` can now be an `async` function
36
55
 
37
- - ✨ Added [Geolocation](https://photostructure.github.io/exiftool-vendored.js/interfaces/Geolocation.html) Tags. These will only be available if `{geolocation: true}` is passed to the [ExifTool constructor](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#constructor).
56
+ - ✨ Added [Geolocation](https://photostructure.github.io/exiftool-vendored.js/interfaces/GeolocationTags.html) Tags. These will only be available if `{geolocation: true}` is passed to the [ExifTool constructor](https://photostructure.github.io/exiftool-vendored.js/classes/ExifTool.html#constructor).
38
57
 
39
58
  - 📦 Added support for `electron-forge`: [see the docs for details](https://photostructure.github.io/exiftool-vendored.js/#md:electron-forge-support).
40
59
 
package/README.md CHANGED
@@ -43,6 +43,20 @@
43
43
  or
44
44
 
45
45
  npm install --save exiftool-vendored
46
+
47
+ ### Debug logging
48
+
49
+ If anything doesn't work, the first thing to try is enabling the logger.
50
+
51
+ You can provide a [Logger implementation](https://photostructure.github.io/batch-cluster.js/interfaces/Logger.html) via [`ExifToolOptions.logger`](https://photostructure.github.io/exiftool-vendored.js/interfaces/ExifToolOptions.html#logger), or set the environment variable `NODE_DEBUG=exiftool-vendored`. [See the debuglog() documentation](https://nodejs.org/docs/latest/api/util.html#utildebuglogsection-callback) for more details.
52
+
53
+ ### Regarding use within Electron
54
+
55
+ Due to how different every Electron application setup is, and how new versions
56
+ frequently have breaking changes, **do not ask for help by opening a github
57
+ issue on this project.**
58
+
59
+ Please seek help via StackOverflow, the Electron discord, or other channels.
46
60
 
47
61
  ### Electron-builder support
48
62
 
@@ -52,17 +66,28 @@ Add the following pattern to `electron-builder.yml`'s `asarUnpack`:
52
66
  - "node_modules/exiftool-vendored.*/**/*"
53
67
  ```
54
68
 
69
+ The default `exiftoolPath` implementation will detect `app.asar` in your `require`
70
+ path and replace it with `app.asar.unpacked` automatically.
71
+
55
72
  ### Electron-forge support
56
73
 
57
74
  Version 25.0 of this library added experimental support for `electron-forge`:
58
75
  add the following element to your `ForgeConfig.packagerConfig.extraResource`
59
- string array, and things should "just work":
76
+ string array, and things should "just work" **for the main process**.
60
77
 
61
78
  ```ts
62
79
  "./node_modules/exiftool-vendored." +
63
80
  (process.platform === "win32" ? "exe" : "pl")
64
81
  ```
65
82
 
83
+ **If your main process forks any node subprocesses, `process.resourcesPath` _will
84
+ not be set_ in those subprocesses, and the default `exiftoolPath` won't work.**
85
+
86
+ If this is your case, you must provide a correct implementation of
87
+ [ExifToolOptions.exiftoolPath](https://photostructure.github.io/exiftool-vendored.js/interfaces/ExifToolOptions.html#exiftoolPath),
88
+ either by passing through `resourcesPath` via `process.env`, or some other
89
+ method.
90
+
66
91
  ### Installation notes
67
92
 
68
93
  - `exiftool-vendored` provides an installation of ExifTool relevant for your
@@ -1,5 +1,7 @@
1
+ import * as bc from "batch-cluster";
1
2
  import { ExifToolOptions } from "./ExifToolOptions";
2
3
  import { Omit } from "./Omit";
4
+ export declare const ConsoleLogger: bc.Logger;
3
5
  /**
4
6
  * Default values for `ExifToolOptions`, except for `processFactory` (which is
5
7
  * created by the ExifTool constructor)
@@ -23,8 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.DefaultExifToolOptions = void 0;
26
+ exports.DefaultExifToolOptions = exports.ConsoleLogger = void 0;
27
27
  const bc = __importStar(require("batch-cluster"));
28
+ const node_util_1 = require("node:util");
28
29
  const CapturedAtTagNames_1 = require("./CapturedAtTagNames");
29
30
  const DefaultExiftoolArgs_1 = require("./DefaultExiftoolArgs");
30
31
  const DefaultMaxProcs_1 = require("./DefaultMaxProcs");
@@ -32,6 +33,18 @@ const ExiftoolPath_1 = require("./ExiftoolPath");
32
33
  const GeoTz_1 = require("./GeoTz");
33
34
  const IsWin32_1 = require("./IsWin32");
34
35
  const VersionTask_1 = require("./VersionTask");
36
+ const _debuglog = (0, node_util_1.debuglog)("exiftool-vendored");
37
+ function noop() { }
38
+ exports.ConsoleLogger = {
39
+ trace: noop,
40
+ debug: _debuglog,
41
+ info: _debuglog,
42
+ warn: console.warn,
43
+ error: console.error,
44
+ };
45
+ function logger() {
46
+ return (0, node_util_1.debuglog)("exiftool-vendored").enabled ? exports.ConsoleLogger : bc.NoLogger;
47
+ }
35
48
  /**
36
49
  * Default values for `ExifToolOptions`, except for `processFactory` (which is
37
50
  * created by the ExifTool constructor)
@@ -64,6 +77,7 @@ exports.DefaultExifToolOptions = Object.freeze({
64
77
  includeImageDataMD5: undefined,
65
78
  inferTimezoneFromDatestamps: false, // to retain prior behavior
66
79
  inferTimezoneFromDatestampTags: [...CapturedAtTagNames_1.CapturedAtTagNames],
80
+ logger,
67
81
  numericTags: [
68
82
  "*Duration*",
69
83
  "GPSAltitude",
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultExifToolOptions.js","sourceRoot":"","sources":["../src/DefaultExifToolOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;AACnC,6DAAyD;AACzD,+DAA2D;AAC3D,uDAAmD;AAEnD,iDAA6C;AAC7C,mCAA+B;AAC/B,uCAAmC;AAEnC,+CAA2C;AAE3C;;;GAGG;AACU,QAAA,sBAAsB,GAG/B,MAAM,CAAC,MAAM,CAAC;IAChB,GAAG,IAAI,EAAE,CAAC,mBAAmB,EAAE;IAC/B,QAAQ,EAAE,iCAAe;IACzB,kBAAkB,EAAE,GAAG;IACvB,kBAAkB,EAAE,KAAK;IACzB,yEAAyE;IACzE,iBAAiB,EAAE,KAAK;IACxB,oBAAoB,EAAE,IAAI;IAC1B,WAAW,EAAE,CAAC;IACd,YAAY,EAAZ,2BAAY;IACZ,YAAY,EAAE,yCAAmB;IACjC,WAAW,EAAE,EAAE;IACf,SAAS,EAAE,CAAC,IAAA,iBAAO,GAAE;IACrB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,qBAAqB;IAClC,cAAc,EAAE,IAAI,yBAAW,EAAE,CAAC,OAAO;IACzC,yBAAyB,EAAE,KAAK;IAChC,kBAAkB,EAAE,kBAAkB;IAEtC,iBAAiB,EAAE,IAAI;IACvB,kBAAkB,EAAE,IAAI;IACxB,KAAK,EAAE,aAAK;IACZ,WAAW,EAAE,KAAK;IAClB,oBAAoB,EAAE,IAAI;IAC1B,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,SAAS;IAC9B,2BAA2B,EAAE,KAAK,EAAE,2BAA2B;IAC/D,8BAA8B,EAAE,CAAC,GAAG,uCAAkB,CAAC;IACvD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;IACf,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,qBAAqB;IAClC,cAAc,EAAE,IAAI,yBAAW,EAAE,CAAC,OAAO;IACzC,yBAAyB,EAAE,KAAK;IAChC,kBAAkB,EAAE,kBAAkB;IAEtC,iBAAiB,EAAE,IAAI;IACvB,kBAAkB,EAAE,IAAI;IACxB,KAAK,EAAE,aAAK;IACZ,WAAW,EAAE,KAAK;IAClB,oBAAoB,EAAE,IAAI;IAC1B,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,SAAS;IAC9B,2BAA2B,EAAE,KAAK,EAAE,2BAA2B;IAC/D,8BAA8B,EAAE,CAAC,GAAG,uCAAkB,CAAC;IACvD,MAAM;IACN,WAAW,EAAE;QACX,YAAY;QACZ,aAAa;QACb,aAAa;QACb,cAAc;QACd,aAAa;QACb,aAAa;KACd;IACD,MAAM,EAAE,KAAK;CACd,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorsAndWarnings.js","sourceRoot":"","sources":["../src/ErrorsAndWarnings.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAE9B,qCAAwC;AAiBxC,SAAgB,iBAAiB,CAC/B,IAAuB,EACvB,CAAwC;IAExC,OAAO;QACL,MAAM,EAAE,IAAA,YAAI,EAAC,IAAA,sBAAa,EAAC,CAAC,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvD,QAAQ,EAAE,IAAA,YAAI,EAAC,IAAA,sBAAa,EAAC,CAAC,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;KAC9D,CAAA;AACH,CAAC;AARD,8CAQC"}
1
+ {"version":3,"file":"ErrorsAndWarnings.js","sourceRoot":"","sources":["../src/ErrorsAndWarnings.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAE9B,qCAAwC;AAkBxC,SAAgB,iBAAiB,CAC/B,IAAuB,EACvB,CAAwC;IAExC,OAAO;QACL,MAAM,EAAE,IAAA,YAAI,EAAC,IAAA,sBAAa,EAAC,CAAC,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvD,QAAQ,EAAE,IAAA,YAAI,EAAC,IAAA,sBAAa,EAAC,CAAC,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;KAC9D,CAAA;AACH,CAAC;AARD,8CAQC"}
@@ -5,7 +5,7 @@ import { Defined, DefinedOrNullValued } from "./Defined";
5
5
  import { ErrorsAndWarnings } from "./ErrorsAndWarnings";
6
6
  import { ExifToolOptions } from "./ExifToolOptions";
7
7
  import { ExifToolTask } from "./ExifToolTask";
8
- import { GeolocationTags } from "./GeolocationTags";
8
+ import { ExifToolVendoredTags } from "./ExifToolVendoredTags";
9
9
  import { ICCProfileTags } from "./ICCProfileTags";
10
10
  import { CollectionInfo, KeywordInfoStruct, KeywordStruct, MWGCollectionsTags, MWGKeywordTags } from "./MWGTags";
11
11
  import { Maybe } from "./Maybe";
@@ -16,7 +16,7 @@ import { ReadTaskOptions } from "./ReadTask";
16
16
  import { ResourceEvent } from "./ResourceEvent";
17
17
  import { ShortcutTags } from "./ShortcutTags";
18
18
  import { Struct } from "./Struct";
19
- import { APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, CompositeTags, EXIFTags, ExifToolTags, FileTags, FlashPixTags, IPTCTags, JFIFTags, MPFTags, MakerNotesTags, MetaTags, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, Tags, XMPTags } from "./Tags";
19
+ import { APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, CompositeTags, EXIFTags, ExifToolTags, FileTags, FlashPixTags, GeolocationTags, IPTCTags, JFIFTags, MPFTags, MakerNotesTags, MetaTags, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, Tags, XMPTags } from "./Tags";
20
20
  import { Version } from "./Version";
21
21
  import { AdditionalWriteTags, ExpandedDateTags, MutableTags, StructAppendTags, WriteTags } from "./WriteTags";
22
22
  import { WriteTaskOptions, WriteTaskResult } from "./WriteTask";
@@ -29,23 +29,35 @@ export { ExifDate } from "./ExifDate";
29
29
  export { ExifDateTime } from "./ExifDateTime";
30
30
  export { ExifTime } from "./ExifTime";
31
31
  export { ExifToolTask } from "./ExifToolTask";
32
+ export { exiftoolPath } from "./ExiftoolPath";
33
+ export { isGeolocationTag } from "./GeolocationTags";
32
34
  export { parseJSON } from "./JSON";
33
35
  export { DefaultReadTaskOptions } from "./ReadTask";
34
36
  export { UnsetZone, UnsetZoneName, UnsetZoneOffsetMinutes, defaultVideosToUTC, offsetMinutesToZoneName, } from "./Timezones";
35
37
  export { DefaultWriteTaskOptions } from "./WriteTask";
36
- export type { APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, AdditionalWriteTags, ApplicationRecordTags, CollectionInfo, CompositeTags, Defined, DefinedOrNullValued, EXIFTags, ErrorsAndWarnings, ExifToolOptions, ExifToolTags, ExpandedDateTags, FileTags, FlashPixTags, GeolocationTags, ICCProfileTags, IPTCTags, JFIFTags, Json, KeywordInfoStruct, KeywordStruct, Literal, MPFTags, MWGCollectionsTags, MWGKeywordTags, MakerNotesTags, Maybe, MetaTags, MutableTags, Omit, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, RawTags, ReadTaskOptions, ResourceEvent, ShortcutTags, Struct, StructAppendTags, Tags, Version, WriteTags, WriteTaskOptions, WriteTaskResult, XMPTags, };
38
+ export type { APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, AdditionalWriteTags, ApplicationRecordTags, CollectionInfo, CompositeTags, Defined, DefinedOrNullValued, EXIFTags, ErrorsAndWarnings, ExifToolOptions, ExifToolTags, ExifToolVendoredTags, ExpandedDateTags, FileTags, FlashPixTags, GeolocationTags, ICCProfileTags, IPTCTags, JFIFTags, Json, KeywordInfoStruct, KeywordStruct, Literal, MPFTags, MWGCollectionsTags, MWGKeywordTags, MakerNotesTags, Maybe, MetaTags, MutableTags, Omit, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, RawTags, ReadTaskOptions, ResourceEvent, ShortcutTags, Struct, StructAppendTags, Tags, Version, WriteTags, WriteTaskOptions, WriteTaskResult, XMPTags, };
37
39
  /**
38
40
  * Manages delegating calls to a cluster of ExifTool child processes.
39
41
  *
40
- * Instances should be shared: consider using the exported singleton instance
41
- * of this class, {@link exiftool}.
42
+ * **NOTE: Instances are expensive!**
43
+ *
44
+ * * use either the default exported singleton instance of this class,
45
+ * {@link exiftool}, or your own singleton
46
+ *
47
+ * * make sure you await {@link ExifTool.end} when you're done with an instance
48
+ * to clean up subprocesses
49
+ *
50
+ * * review the {@link ExifToolOptions} for configuration options--the default
51
+ * values are conservative to avoid overwhelming your system.
52
+ *
53
+ * @see https://photostructure.github.io/exiftool-vendored.js/ for more documentation.
42
54
  */
43
55
  export declare class ExifTool {
44
56
  #private;
45
57
  readonly options: ExifToolOptions;
46
- private readonly batchCluster;
47
- readonly exiftoolPath: () => Promise<string>;
58
+ readonly batchCluster: bc.BatchCluster;
48
59
  constructor(options?: Partial<ExifToolOptions>);
60
+ readonly exiftoolPath: () => Promise<string>;
49
61
  /**
50
62
  * Register life cycle event listeners. Delegates to BatchProcess.
51
63
  */
@@ -120,8 +132,15 @@ export declare class ExifTool {
120
132
  * name `${FILENAME}_original`) will be retained. Note that some tags, like
121
133
  * stat information and image dimensions, are intrinsic to the file and will
122
134
  * continue to exist if you re-`read` the file.
135
+ *
136
+ * @param {string} file the file to strip of metadata
137
+ *
138
+ * @param {(keyof Tags | string)[]} opts.retain optional. If provided, this is
139
+ * a list of metadata keys to **not** delete.
123
140
  */
124
- deleteAllTags(file: string): Promise<WriteTaskResult>;
141
+ deleteAllTags(file: string, opts?: {
142
+ retain?: (keyof Tags | string)[];
143
+ }): Promise<WriteTaskResult>;
125
144
  /**
126
145
  * Extract the low-resolution thumbnail in `path/to/image.jpg`
127
146
  * and write it to `path/to/thumbnail.jpg`.
package/dist/ExifTool.js CHANGED
@@ -32,7 +32,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
32
32
  };
33
33
  var _ExifTool_checkForPerl;
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.exiftool = exports.ExifTool = exports.DefaultWriteTaskOptions = exports.offsetMinutesToZoneName = exports.defaultVideosToUTC = exports.UnsetZoneOffsetMinutes = exports.UnsetZoneName = exports.UnsetZone = exports.DefaultReadTaskOptions = exports.parseJSON = exports.ExifToolTask = exports.ExifTime = exports.ExifDateTime = exports.ExifDate = exports.DefaultMaxProcs = exports.DefaultExiftoolArgs = exports.DefaultExifToolOptions = exports.CapturedAtTagNames = exports.BinaryField = void 0;
35
+ exports.exiftool = exports.ExifTool = exports.DefaultWriteTaskOptions = exports.offsetMinutesToZoneName = exports.defaultVideosToUTC = exports.UnsetZoneOffsetMinutes = exports.UnsetZoneName = exports.UnsetZone = exports.DefaultReadTaskOptions = exports.parseJSON = exports.isGeolocationTag = exports.exiftoolPath = exports.ExifToolTask = exports.ExifTime = exports.ExifDateTime = exports.ExifDate = exports.DefaultMaxProcs = exports.DefaultExiftoolArgs = exports.DefaultExifToolOptions = exports.CapturedAtTagNames = exports.BinaryField = void 0;
36
36
  const bc = __importStar(require("batch-cluster"));
37
37
  const _cp = __importStar(require("node:child_process"));
38
38
  const _fs = __importStar(require("node:fs"));
@@ -43,6 +43,7 @@ const BinaryToBufferTask_1 = require("./BinaryToBufferTask");
43
43
  const DefaultExifToolOptions_1 = require("./DefaultExifToolOptions");
44
44
  const DeleteAllTagsArgs_1 = require("./DeleteAllTagsArgs");
45
45
  const ExifToolOptions_1 = require("./ExifToolOptions");
46
+ const ExiftoolPath_1 = require("./ExiftoolPath");
46
47
  const IsWin32_1 = require("./IsWin32");
47
48
  const Lazy_1 = require("./Lazy");
48
49
  const Object_1 = require("./Object");
@@ -72,6 +73,10 @@ var ExifTime_1 = require("./ExifTime");
72
73
  Object.defineProperty(exports, "ExifTime", { enumerable: true, get: function () { return ExifTime_1.ExifTime; } });
73
74
  var ExifToolTask_1 = require("./ExifToolTask");
74
75
  Object.defineProperty(exports, "ExifToolTask", { enumerable: true, get: function () { return ExifToolTask_1.ExifToolTask; } });
76
+ var ExiftoolPath_2 = require("./ExiftoolPath");
77
+ Object.defineProperty(exports, "exiftoolPath", { enumerable: true, get: function () { return ExiftoolPath_2.exiftoolPath; } });
78
+ var GeolocationTags_1 = require("./GeolocationTags");
79
+ Object.defineProperty(exports, "isGeolocationTag", { enumerable: true, get: function () { return GeolocationTags_1.isGeolocationTag; } });
75
80
  var JSON_1 = require("./JSON");
76
81
  Object.defineProperty(exports, "parseJSON", { enumerable: true, get: function () { return JSON_1.parseJSON; } });
77
82
  var ReadTask_2 = require("./ReadTask");
@@ -84,6 +89,10 @@ Object.defineProperty(exports, "defaultVideosToUTC", { enumerable: true, get: fu
84
89
  Object.defineProperty(exports, "offsetMinutesToZoneName", { enumerable: true, get: function () { return Timezones_1.offsetMinutesToZoneName; } });
85
90
  var WriteTask_2 = require("./WriteTask");
86
91
  Object.defineProperty(exports, "DefaultWriteTaskOptions", { enumerable: true, get: function () { return WriteTask_2.DefaultWriteTaskOptions; } });
92
+ /**
93
+ * Is the #!/usr/bin/perl shebang line in exiftool-vendored.pl going to fail? If
94
+ * so, we need to find `perl` ourselves, and ignore the shebang line.
95
+ */
87
96
  const _ignoreShebang = (0, Lazy_1.lazy)(() => !(0, IsWin32_1.isWin32)() && !_fs.existsSync("/usr/bin/perl"));
88
97
  const whichPerl = (0, Lazy_1.lazy)(async () => {
89
98
  const result = await (0, Which_1.which)("perl");
@@ -95,12 +104,29 @@ const whichPerl = (0, Lazy_1.lazy)(async () => {
95
104
  /**
96
105
  * Manages delegating calls to a cluster of ExifTool child processes.
97
106
  *
98
- * Instances should be shared: consider using the exported singleton instance
99
- * of this class, {@link exiftool}.
107
+ * **NOTE: Instances are expensive!**
108
+ *
109
+ * * use either the default exported singleton instance of this class,
110
+ * {@link exiftool}, or your own singleton
111
+ *
112
+ * * make sure you await {@link ExifTool.end} when you're done with an instance
113
+ * to clean up subprocesses
114
+ *
115
+ * * review the {@link ExifToolOptions} for configuration options--the default
116
+ * values are conservative to avoid overwhelming your system.
117
+ *
118
+ * @see https://photostructure.github.io/exiftool-vendored.js/ for more documentation.
100
119
  */
101
120
  class ExifTool {
102
121
  constructor(options = {}) {
103
122
  var _a;
123
+ this.exiftoolPath = (0, Lazy_1.lazy)(async () => {
124
+ var _a;
125
+ const o = this.options;
126
+ return ((_a = (await ((0, Object_1.isFunction)(o.exiftoolPath)
127
+ ? o.exiftoolPath(this.options.logger())
128
+ : o.exiftoolPath))) !== null && _a !== void 0 ? _a : (0, ExiftoolPath_1.exiftoolPath)(this.options.logger()));
129
+ });
104
130
  /**
105
131
  * Register life cycle event listeners. Delegates to BatchProcess.
106
132
  */
@@ -109,6 +135,8 @@ class ExifTool {
109
135
  * Unregister life cycle event listeners. Delegates to BatchProcess.
110
136
  */
111
137
  this.off = (event, listener) => this.batchCluster.off(event, listener);
138
+ // calling whichPerl through this lazy() means we only do that task once per
139
+ // instance.
112
140
  _ExifTool_checkForPerl.set(this, (0, Lazy_1.lazy)(async () => {
113
141
  if (this.options.checkPerl) {
114
142
  await whichPerl(); // < throws if perl is missing
@@ -139,7 +167,6 @@ class ExifTool {
139
167
  detached: false, // < no orphaned exiftool procs, please
140
168
  env,
141
169
  };
142
- this.exiftoolPath = (0, Lazy_1.lazy)(async () => (0, Object_1.isFunction)(o.exiftoolPath) ? o.exiftoolPath(o.logger()) : o.exiftoolPath);
143
170
  const processFactory = async () => ignoreShebang
144
171
  ? _cp.spawn(await whichPerl(), [await this.exiftoolPath(), ...o.exiftoolArgs], spawnOpts)
145
172
  : _cp.spawn(await this.exiftoolPath(), o.exiftoolArgs, spawnOpts);
@@ -234,9 +261,19 @@ class ExifTool {
234
261
  * name `${FILENAME}_original`) will be retained. Note that some tags, like
235
262
  * stat information and image dimensions, are intrinsic to the file and will
236
263
  * continue to exist if you re-`read` the file.
264
+ *
265
+ * @param {string} file the file to strip of metadata
266
+ *
267
+ * @param {(keyof Tags | string)[]} opts.retain optional. If provided, this is
268
+ * a list of metadata keys to **not** delete.
237
269
  */
238
- deleteAllTags(file) {
239
- return this.write(file, {}, DeleteAllTagsArgs_1.DeleteAllTagsArgs);
270
+ deleteAllTags(file, opts) {
271
+ var _a;
272
+ const args = [...DeleteAllTagsArgs_1.DeleteAllTagsArgs];
273
+ for (const ea of (_a = opts === null || opts === void 0 ? void 0 : opts.retain) !== null && _a !== void 0 ? _a : []) {
274
+ args.push(`-${ea}<${ea}`);
275
+ }
276
+ return this.write(file, {}, args);
240
277
  }
241
278
  /**
242
279
  * Extract the low-resolution thumbnail in `path/to/image.jpg`
@@ -1 +1 @@
1
- {"version":3,"file":"ExifTool.js","sourceRoot":"","sources":["../src/ExifTool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;AACnC,wDAAyC;AACzC,6CAA8B;AAC9B,gEAAkC;AAElC,6CAA4C;AAC5C,iEAA6D;AAC7D,6DAAyD;AACzD,qEAAiE;AAEjE,2DAAuD;AAEvD,uDAA4E;AAI5E,uCAAmC;AACnC,iCAA6B;AAS7B,qCAAqC;AAErC,iCAA6B;AAG7B,+CAA2C;AAC3C,yCAA4E;AAE5E,6DAAyD;AAEzD,qCAA0C;AA6B1C,+CAA2C;AAC3C,mCAA+B;AAQ/B,2CAA0E;AAE1E,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;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E,CAAA;IACjC,CAAC;IAED;;OAEG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAA;IAC3C,CAAC;IAED;;OAEG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAA;IAC3C,CAAC;IAED;;OAEG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,YAAY,CAAC,aAAa,CAAA;IACxC,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,YAAY,CAAC,cAAc,CAAA;IACzC,CAAC;IAED;;;OAGG;IACH,mBAAmB,CAAC,UAAU,GAAG,IAAI;QACnC,OAAO,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAA;IAC1D,CAAC;CACF;AApYD,4BAoYC;;AAED;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAA"}
@@ -56,8 +56,10 @@ export interface ExifToolOptions extends bc.BatchClusterOptions, bc.BatchProcess
56
56
  * Allows for non-standard paths to ExifTool. Defaults to the perl or
57
57
  * windows binaries provided by `exiftool-vendored.pl` or
58
58
  * `exiftool-vendored.exe`.
59
+ *
60
+ * This must be the full path to `exiftool`, not just the directory.
59
61
  */
60
- exiftoolPath: string | ((logger?: bc.Logger) => string | Promise<string>);
62
+ exiftoolPath: string | Promise<string> | ((logger?: bc.Logger) => string | Promise<string>);
61
63
  /**
62
64
  * Args passed to exiftool on launch.
63
65
  */
@@ -167,7 +169,9 @@ export interface ExifToolOptions extends bc.BatchClusterOptions, bc.BatchProcess
167
169
  */
168
170
  ignoreZeroZeroLatLon: boolean;
169
171
  /**
170
- * Override the default geo-to-timezone lookup service. Note that if {@link geolocation} is enabled, we'll try to use {@
172
+ * Override the default geo-to-timezone lookup service. Note that if
173
+ {@link geolocation} is enabled, we'll use
174
+ {@link Tags.GeolocationTimeZone} if it's not blank.
171
175
  *
172
176
  * This defaults to `@photostructure/tz-lookup`, but if you have the
173
177
  * resources, consider using `geo-tz` for more accurate results.
@@ -1 +1 @@
1
- {"version":3,"file":"ExifToolOptions.js","sourceRoot":"","sources":["../src/ExifToolOptions.ts"],"names":[],"mappings":";;;AAgPA,SAAgB,uBAAuB,CAErC,OAAU;IACV,IAAI,OAAO,CAAC,aAAa,IAAI,IAAI,IAAI,OAAO,CAAC,mBAAmB,IAAI,IAAI,EAAE,CAAC;QACzE,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;IACrE,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAPD,0DAOC"}
1
+ {"version":3,"file":"ExifToolOptions.js","sourceRoot":"","sources":["../src/ExifToolOptions.ts"],"names":[],"mappings":";;;AAuPA,SAAgB,uBAAuB,CAErC,OAAU;IACV,IAAI,OAAO,CAAC,aAAa,IAAI,IAAI,IAAI,OAAO,CAAC,mBAAmB,IAAI,IAAI,EAAE,CAAC;QACzE,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;IACrE,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAPD,0DAOC"}
@@ -0,0 +1,7 @@
1
+ import { ExifToolTags } from "./Tags";
2
+ export declare const ExifToolTagNames: (keyof ExifToolTags)[];
3
+ /**
4
+ * Is the given tag name intrinsic to the content of a given file? In other
5
+ * words, is it not an artifact of a metadata field?
6
+ */
7
+ export declare function isExifToolTag(name: string): name is keyof ExifToolTags;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.isExifToolTag = exports.ExifToolTagNames = void 0;
5
+ const Object_1 = require("./Object");
6
+ exports.ExifToolTagNames = (0, Object_1.keysOf)({
7
+ ExifToolVersion: true,
8
+ SourceFile: true,
9
+ Error: true,
10
+ Warning: 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
+ */
16
+ function isExifToolTag(name) {
17
+ return exports.ExifToolTagNames.includes(name);
18
+ }
19
+ exports.isExifToolTag = isExifToolTag;
20
+ //# sourceMappingURL=ExifToolTags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExifToolTags.js","sourceRoot":"","sources":["../src/ExifToolTags.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;AAEvD,qCAAiC;AAGpB,QAAA,gBAAgB,GAAG,IAAA,eAAM,EAAe;IACnD,eAAe,EAAE,IAAI;IACrB,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;CACd,CAAC,CAAA;AAEF;;;GAGG;AACH,SAAgB,aAAa,CAAC,IAAY;IACxC,OAAO,wBAAgB,CAAC,QAAQ,CAAC,IAAW,CAAC,CAAA;AAC/C,CAAC;AAFD,sCAEC"}
@@ -0,0 +1,23 @@
1
+ import { ErrorsAndWarnings } from "./ErrorsAndWarnings";
2
+ /**
3
+ * This tags are added to {@link Tags} from this library.
4
+ */
5
+ export interface ExifToolVendoredTags extends ErrorsAndWarnings {
6
+ /**
7
+ * Either an offset, like `UTC-7`, or an actual IANA timezone, like
8
+ * `America/Los_Angeles`.
9
+ *
10
+ * This will be missing if we can't intuit a timezone from the metadata.
11
+ */
12
+ tz?: string;
13
+ /**
14
+ * Description of where and how `tz` was extracted
15
+ */
16
+ tzSource?: string;
17
+ }
18
+ export declare const ExifToolVendoredTagNames: (keyof ExifToolVendoredTags)[];
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
+ */
23
+ export declare function isExifToolVendoredTag(name: string): name is keyof ExifToolVendoredTags;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isExifToolVendoredTag = exports.ExifToolVendoredTagNames = void 0;
4
+ const Object_1 = require("./Object");
5
+ exports.ExifToolVendoredTagNames = (0, Object_1.keysOf)({
6
+ tz: true,
7
+ tzSource: true,
8
+ errors: true,
9
+ warnings: true,
10
+ });
11
+ /**
12
+ * Is the given tag name intrinsic to the content of a given file? In other
13
+ * words, is it not an artifact of a metadata field?
14
+ */
15
+ function isExifToolVendoredTag(name) {
16
+ return exports.ExifToolVendoredTagNames.includes(name);
17
+ }
18
+ exports.isExifToolVendoredTag = isExifToolVendoredTag;
19
+ //# sourceMappingURL=ExifToolVendoredTags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExifToolVendoredTags.js","sourceRoot":"","sources":["../src/ExifToolVendoredTags.ts"],"names":[],"mappings":";;;AACA,qCAAiC;AAoBpB,QAAA,wBAAwB,GAAG,IAAA,eAAM,EAAuB;IACnE,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;CACf,CAAC,CAAA;AAEF;;;GAGG;AACH,SAAgB,qBAAqB,CACnC,IAAY;IAEZ,OAAO,gCAAwB,CAAC,QAAQ,CAAC,IAAW,CAAC,CAAA;AACvD,CAAC;AAJD,sDAIC"}
@@ -1,2 +1,28 @@
1
1
  import { Logger } from "batch-cluster";
2
+ /**
3
+ * This implementation relies on the fact that both `exiftool-vendored.pl` and
4
+ * `exiftool-vendored.exe` both export the path to their respective exiftool
5
+ * binary.
6
+ *
7
+ * When running in node, this method should suffice.
8
+ *
9
+ * When running in Electron, all bets are off, due to ASAR packaging and other
10
+ * nonsense. As perl can't run from within an ASAR archive, `electron-builder`
11
+ * must be configured to `asarUnpack`
12
+ * "**&#47;node_modules/exiftool-vendored.{pl,exe}/". See
13
+ * <https://www.electron.build/generated/platformspecificbuildoptions#configuration-asarUnpack>
14
+ * for details.
15
+ *
16
+ * If you're using `electron-forge`, add something like the following to your
17
+ * ForgeConfig.packagerConfig.extraResource array: `fs.join(".", "node_modules",
18
+ * "exiftool-vendored." + (isWin ? "exe" : "pl"))` but then you must specify a
19
+ * custom exiftoolPath in your options hash, as subprocesses that use
20
+ * ELECTRON_RUN_AS_NODE will no longer have process.resourcesPath set.
21
+ *
22
+ * If none of the above work for your use case, you can provide your own
23
+ * `exiftoolPath` implementation to your instance of ExifTool
24
+ *
25
+ * @return the path to the exiftool binary, preferring the vendored version in
26
+ * node_modules.
27
+ */
2
28
  export declare function exiftoolPath(logger?: Logger): Promise<string>;
@@ -22,14 +22,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
25
  Object.defineProperty(exports, "__esModule", { value: true });
29
26
  exports.exiftoolPath = void 0;
30
27
  const _fs = __importStar(require("node:fs"));
31
28
  const _path = __importStar(require("node:path"));
32
- const node_process_1 = __importDefault(require("node:process"));
33
29
  const IsWin32_1 = require("./IsWin32");
34
30
  const Which_1 = require("./Which");
35
31
  function vendorPackage() {
@@ -45,27 +41,48 @@ function tryRequire({ prefix = "", logger, } = {}) {
45
41
  return;
46
42
  }
47
43
  }
44
+ /**
45
+ * This implementation relies on the fact that both `exiftool-vendored.pl` and
46
+ * `exiftool-vendored.exe` both export the path to their respective exiftool
47
+ * binary.
48
+ *
49
+ * When running in node, this method should suffice.
50
+ *
51
+ * When running in Electron, all bets are off, due to ASAR packaging and other
52
+ * nonsense. As perl can't run from within an ASAR archive, `electron-builder`
53
+ * must be configured to `asarUnpack`
54
+ * "**&#47;node_modules/exiftool-vendored.{pl,exe}/". See
55
+ * <https://www.electron.build/generated/platformspecificbuildoptions#configuration-asarUnpack>
56
+ * for details.
57
+ *
58
+ * If you're using `electron-forge`, add something like the following to your
59
+ * ForgeConfig.packagerConfig.extraResource array: `fs.join(".", "node_modules",
60
+ * "exiftool-vendored." + (isWin ? "exe" : "pl"))` but then you must specify a
61
+ * custom exiftoolPath in your options hash, as subprocesses that use
62
+ * ELECTRON_RUN_AS_NODE will no longer have process.resourcesPath set.
63
+ *
64
+ * If none of the above work for your use case, you can provide your own
65
+ * `exiftoolPath` implementation to your instance of ExifTool
66
+ *
67
+ * @return the path to the exiftool binary, preferring the vendored version in
68
+ * node_modules.
69
+ */
48
70
  async function exiftoolPath(logger) {
49
71
  const path = tryRequire({ prefix: "", logger });
50
72
  // This s/app.asar/app.asar.unpacked/ path switch adds support for Electron
51
- // apps that are ASAR-packed (like by electron-builder). This is necessary because
52
- // Note that we can't reliably automatically detect that we're running in
53
- // electron because child processes that are spawned by the main process will
54
- // most likely need the ELECTRON_RUN_AS_NODE environment variable set, which
55
- // will unset the process.versions.electron field.
56
- const fixedPath = path === null || path === void 0 ? void 0 : path.split(_path.sep).map((ea) => (ea === "app.asar" ? "app.asar.unpacked" : ea)).join(_path.sep);
57
- // Note also, that we must check for the fixedPath first, because Electron's
58
- // ASAR shenanigans will make existsSync return true even for asar-packed
59
- // resources.
60
- if (fixedPath != null && _fs.existsSync(fixedPath)) {
61
- return fixedPath;
73
+ // apps whose modules are ASAR-packed (like by electron-builder).
74
+ const asarUnpackedPath = path === null || path === void 0 ? void 0 : path.split(_path.sep).map((ea) => (ea === "app.asar" ? "app.asar.unpacked" : ea)).join(_path.sep);
75
+ // NOTE: we must check for the fixedPath FIRST, because Electron's ASAR
76
+ // shenanigans will make existsSync return true for asar-packed resources
77
+ if (asarUnpackedPath != null && _fs.existsSync(asarUnpackedPath)) {
78
+ return asarUnpackedPath;
62
79
  }
63
80
  if (path != null && _fs.existsSync(path)) {
64
81
  return path;
65
82
  }
66
83
  logger === null || logger === void 0 ? void 0 : logger.warn("Failed to find exiftool via " + vendorPackage());
67
- // Set by electron-forge:
68
- const electronResourcePath = node_process_1.default.resourcesPath;
84
+ // process.resourcesPath is set by electron-forge:
85
+ const electronResourcePath = process.resourcesPath;
69
86
  if (electronResourcePath != null) {
70
87
  const forgePath = _path.join(electronResourcePath, vendorPackage(), "bin", "exiftool" + ((0, IsWin32_1.isWin32)() ? ".exe" : ""));
71
88
  if (_fs.existsSync(forgePath)) {
@@ -1 +1 @@
1
- {"version":3,"file":"ExiftoolPath.js","sourceRoot":"","sources":["../src/ExiftoolPath.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA8B;AAC9B,iDAAkC;AAClC,gEAAkC;AAClC,uCAAmC;AAEnC,mCAA+B;AAE/B,SAAS,aAAa;IACpB,OAAO,oBAAoB,GAAG,CAAC,IAAA,iBAAO,GAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;AAC1D,CAAC;AAED,SAAS,UAAU,CAAC,EAClB,MAAM,GAAG,EAAE,EACX,MAAM,MACyC,EAAE;IACjD,MAAM,EAAE,GAAG,MAAM,GAAG,aAAa,EAAE,CAAA;IACnC,IAAI,CAAC;QACH,OAAO,OAAO,CAAC,EAAE,CAAC,CAAA;IACpB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,EAAE,GAAG,aAAa,EAAE,KAAK,CAAC,CAAA;QACvC,OAAM;IACR,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,YAAY,CAAC,MAAe;IAChD,MAAM,IAAI,GAAG,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;IAC/C,2EAA2E;IAC3E,kFAAkF;IAClF,yEAAyE;IACzE,6EAA6E;IAC7E,4EAA4E;IAC5E,kDAAkD;IAClD,MAAM,SAAS,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAClB,KAAK,CAAC,KAAK,CAAC,GAAG,EAChB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,UA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U,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACjE,OAAO,gBAAgB,CAAA;IACzB,CAAC;IACD,IAAI,IAAI,IAAI,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,8BAA8B,GAAG,aAAa,EAAE,CAAC,CAAA;IAE9D,kDAAkD;IAClD,MAAM,oBAAoB,GAAI,OAAe,CAAC,aAAa,CAAA;IAC3D,IAAI,oBAAoB,IAAI,IAAI,EAAE,CAAC;QACjC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAC1B,oBAAoB,EACpB,aAAa,EAAE,EACf,KAAK,EACL,UAAU,GAAG,CAAC,IAAA,iBAAO,GAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CACvC,CAAA;QACD,IAAI,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC9B,OAAO,SAAS,CAAA;QAClB,CAAC;aAAM,CAAC;YACN,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CACV,4DAA4D,GAAG,SAAS,CACzE,CAAA;QACH,CAAC;IACH,CAAC;IAED,kEAAkE;IAClE,MAAM,QAAQ,GAAG,MAAM,IAAA,aAAK,EAAC,UAAU,CAAC,CAAA;IACxC,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;QACrB,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAA;AACH,CAAC;AAhDD,oCAgDC"}
@@ -0,0 +1,6 @@
1
+ import { FileTags } from "./Tags";
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 isFileTag(name: string): name is keyof FileTags;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isFileTag = void 0;
4
+ const Object_1 = require("./Object");
5
+ const FileTagNames = (0, Object_1.keysOf)({
6
+ BMPVersion: true,
7
+ BitsPerSample: true,
8
+ ColorComponents: true,
9
+ CurrentIPTCDigest: true,
10
+ Directory: true,
11
+ EncodingProcess: true,
12
+ ExifByteOrder: true,
13
+ FileAccessDate: true,
14
+ FileCreateDate: true,
15
+ FileInodeChangeDate: true,
16
+ FileModifyDate: true,
17
+ FileName: true,
18
+ FilePermissions: true,
19
+ FileSize: true,
20
+ FileType: true,
21
+ FileTypeExtension: true,
22
+ ImageDataMD5: true,
23
+ ImageHeight: true,
24
+ ImageWidth: true,
25
+ MIMEType: true,
26
+ NumColors: true,
27
+ NumImportantColors: true,
28
+ PixelsPerMeterX: true,
29
+ PixelsPerMeterY: true,
30
+ Planes: true,
31
+ YCbCrSubSampling: true,
32
+ });
33
+ /**
34
+ * Is the given tag name intrinsic to the content of a given file? In other
35
+ * words, is it not an artifact of a metadata field?
36
+ */
37
+ function isFileTag(name) {
38
+ return FileTagNames.includes(name);
39
+ }
40
+ exports.isFileTag = isFileTag;
41
+ //# sourceMappingURL=FileTags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileTags.js","sourceRoot":"","sources":["../src/FileTags.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AAGjC,MAAM,YAAY,GAAG,IAAA,eAAM,EAAW;IACpC,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,IAAI;IACrB,iBAAiB,EAAE,IAAI;IACvB,SAAS,EAAE,IAAI;IACf,eAAe,EAAE,IAAI;IACrB,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,cAAc,EAAE,IAAI;IACpB,mBAAmB,EAAE,IAAI;IACzB,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,IAAI;IACd,eAAe,EAAE,IAAI;IACrB,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;IACf,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,IAAI;IACrB,eAAe,EAAE,IAAI;IACrB,MAAM,EAAE,IAAI;IACZ,gBAAgB,EAAE,IAAI;CACvB,CAAC,CAAA;AAEF;;;GAGG;AACH,SAAgB,SAAS,CAAC,IAAY;IACpC,OAAO,YAAY,CAAC,QAAQ,CAAC,IAAW,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC"}
@@ -1,3 +1,9 @@
1
+ export declare const GeolocationTagNames: (keyof GeolocationTags)[];
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
7
  /**
2
8
  * These tags are only available if {@link ExifToolOptions.geolocation} is true and the file
3
9
  * has valid GPS location data.
@@ -1,3 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isGeolocationTag = exports.GeolocationTagNames = void 0;
4
+ const Object_1 = require("./Object");
5
+ exports.GeolocationTagNames = (0, Object_1.keysOf)({
6
+ GeolocationBearing: true,
7
+ GeolocationCity: true,
8
+ GeolocationCountry: true,
9
+ GeolocationCountryCode: true,
10
+ GeolocationDistance: true,
11
+ GeolocationFeatureCode: true,
12
+ GeolocationPopulation: true,
13
+ GeolocationPosition: true,
14
+ GeolocationRegion: true,
15
+ GeolocationSubregion: true,
16
+ GeolocationTimeZone: true,
17
+ });
18
+ /**
19
+ * Is the given tag name intrinsic to the content of a given file? In other
20
+ * words, is it not an artifact of a metadata field?
21
+ */
22
+ function isGeolocationTag(name) {
23
+ return exports.GeolocationTagNames.includes(name);
24
+ }
25
+ exports.isGeolocationTag = isGeolocationTag;
3
26
  //# sourceMappingURL=GeolocationTags.js.map
@@ -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":";;;AAAA,qCAAiC;AAEpB,QAAA,mBAAmB,GAAG,IAAA,eAAM,EAAkB;IACzD,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,IAAI;IACrB,kBAAkB,EAAE,IAAI;IACxB,sBAAsB,EAAE,IAAI;IAC5B,mBAAmB,EAAE,IAAI;IACzB,sBAAsB,EAAE,IAAI;IAC5B,qBAAqB,EAAE,IAAI;IAC3B,mBAAmB,EAAE,IAAI;IACzB,iBAAiB,EAAE,IAAI;IACvB,oBAAoB,EAAE,IAAI;IAC1B,mBAAmB,EAAE,IAAI;CAC1B,CAAC,CAAA;AAEF;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,OAAO,2BAAmB,CAAC,QAAQ,CAAC,IAAW,CAAC,CAAA;AAClD,CAAC;AAFD,4CAEC"}
package/dist/Object.d.ts CHANGED
@@ -6,3 +6,13 @@ export type Unpick<T, U> = {
6
6
  [P in keyof T]: P extends U ? never : T[P];
7
7
  };
8
8
  export declare function omit<T extends Record<string, any>, S extends string>(t: T, ...keysToOmit: S[]): Unpick<T, S>;
9
+ /**
10
+ * Provides a type-safe exhaustive array of keys for a given interface.
11
+ *
12
+ * Unfortunately, `satisfies (keyof T)[]` doesn't ensure all keys are present,
13
+ * and doesn't guard against duplicates. This function does.
14
+ *
15
+ * @param t - The interface to extract keys from. This is a Record of keys to
16
+ * `true`, which ensures the returned key array is unique.
17
+ */
18
+ export declare function keysOf<T>(t: Required<Record<keyof T, true>>): (keyof T)[];
package/dist/Object.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.omit = exports.fromEntries = exports.isFunction = exports.keys = void 0;
3
+ exports.keysOf = exports.omit = exports.fromEntries = exports.isFunction = exports.keys = void 0;
4
4
  // eslint-disable-next-line @typescript-eslint/ban-types
5
5
  function keys(o) {
6
6
  return o == null
@@ -40,4 +40,17 @@ function omit(t, ...keysToOmit) {
40
40
  return result;
41
41
  }
42
42
  exports.omit = omit;
43
+ /**
44
+ * Provides a type-safe exhaustive array of keys for a given interface.
45
+ *
46
+ * Unfortunately, `satisfies (keyof T)[]` doesn't ensure all keys are present,
47
+ * and doesn't guard against duplicates. This function does.
48
+ *
49
+ * @param t - The interface to extract keys from. This is a Record of keys to
50
+ * `true`, which ensures the returned key array is unique.
51
+ */
52
+ function keysOf(t) {
53
+ return Object.keys(t);
54
+ }
55
+ exports.keysOf = keysOf;
43
56
  //# sourceMappingURL=Object.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Object.js","sourceRoot":"","sources":["../src/Object.ts"],"names":[],"mappings":";;;AAEA,wDAAwD;AACxD,SAAgB,IAAI,CAA+C,CAAI;IACrE,OAAO,CAAC,IAAI,IAAI;QACd,CAAC,CAAC,EAAE;QACJ,CAAC,CAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAC5B,CAAC,EAAE,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAC9B,CAAA;AACf,CAAC;AAND,oBAMC;AAED,SAAgB,UAAU,CAAC,GAAQ;IACjC,OAAO,OAAO,GAAG,KAAK,UAAU,CAAA;AAClC,CAAC;AAFD,gCAEC;AAED,SAAgB,WAAW,CACzB,GAAkC,EAClC,GAAS;IAET,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAA;IAC/C,4DAA4D;IAC5D,KAAK,MAAM,EAAE,IAAI,GAAG,CAAC,MAAM,CA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,32 @@
1
1
  import { ApplicationRecordTags } from "./ApplicationRecordTags";
2
2
  import { BinaryField } from "./BinaryField";
3
- import { ErrorsAndWarnings } from "./ErrorsAndWarnings";
4
3
  import { ExifDate } from "./ExifDate";
5
4
  import { ExifDateTime } from "./ExifDateTime";
6
5
  import { ExifTime } from "./ExifTime";
7
- import { GeolocationTags } from "./GeolocationTags";
6
+ import { ExifToolVendoredTags } from "./ExifToolVendoredTags";
8
7
  import { ICCProfileTags } from "./ICCProfileTags";
9
8
  import { ImageDataHashTag } from "./ImageDataHashTag";
10
9
  import { MWGCollectionsTags, MWGKeywordTags } from "./MWGTags";
11
10
  import { ResourceEvent } from "./ResourceEvent";
12
11
  import { Struct } from "./Struct";
13
12
  import { Version } from "./Version";
13
+ /**
14
+ * These tags are added by `exiftool`.
15
+ */
14
16
  export interface ExifToolTags {
15
17
  /** ☆☆☆☆ ✔ Example: "File is empty" */
16
18
  Error?: string;
17
- /** ★★★★ ✔ Example: 12.8 */
19
+ /** ★★★★ ✔ Example: 12.82 */
18
20
  ExifToolVersion?: number;
21
+ /** ☆☆☆☆ Example: "path/to/file.jpg" */
22
+ SourceFile?: string;
19
23
  /** ☆☆☆☆ ✔ Example: "Unrecognized IPTC record 0 (ignored)" */
20
24
  Warning?: string;
21
25
  }
26
+ /**
27
+ * These tags are not metadata fields, but are intrinsic to the content of a
28
+ * given file. ExifTool can't write to many of these tags.
29
+ */
22
30
  export interface FileTags {
23
31
  /** ☆☆☆☆ ✔ Example: "Windows V3" */
24
32
  BMPVersion?: string;
@@ -34,9 +42,11 @@ export interface FileTags {
34
42
  EncodingProcess?: string;
35
43
  /** ★★★★ ✔ Example: "Little-endian (Intel, II)" */
36
44
  ExifByteOrder?: string;
37
- /** ★★★★ ✔ Example: "2024:03:26 15:28:17-07:00" */
45
+ /** ★★★★ ✔ Example: "2024:04:11 15:42:05-07:00" */
38
46
  FileAccessDate?: ExifDateTime | string;
39
- /** ★★★★ ✔ Example: "2024:03:20 21:17:00-07:00" */
47
+ /** ☆☆☆☆ Example: */
48
+ FileCreateDate?: ExifDateTime | string;
49
+ /** ★★★★ ✔ Example: "2024:04:09 21:42:21-07:00" */
40
50
  FileInodeChangeDate?: ExifDateTime | string;
41
51
  /** ★★★★ ✔ Example: "2023:07:19 21:21:02-07:00" */
42
52
  FileModifyDate?: ExifDateTime | string;
@@ -71,6 +81,11 @@ export interface FileTags {
71
81
  /** ★★★★ ✔ Example: "YCbCr4:4:4 (1 1)" */
72
82
  YCbCrSubSampling?: string;
73
83
  }
84
+ /**
85
+ * These are tags are derived from the values of one or more other tags.
86
+ * Only a few are writable directly.
87
+ * @see https://exiftool.org/TagNames/Composite.html
88
+ */
74
89
  export interface CompositeTags {
75
90
  /** ☆☆☆☆ ✔ Example: "Unknown (49 5)" */
76
91
  AdvancedSceneMode?: string;
@@ -122,7 +137,7 @@ export interface CompositeTags {
122
137
  OriginalDecisionData?: BinaryField | string;
123
138
  /** ☆☆☆☆ Example: "9.9 um" */
124
139
  PeakSpectralSensitivity?: string;
125
- /** ★★★☆ ✔ Example: "(Binary data 315546 bytes, use -b option to extract)" */
140
+ /** ★★★☆ ✔ Example: "(Binary data 37244 bytes, use -b option to extract)" */
126
141
  PreviewImage?: BinaryField;
127
142
  /** ☆☆☆☆ ✔ Example: "On" */
128
143
  RedEyeReduction?: string;
@@ -170,7 +185,7 @@ export interface APP1Tags {
170
185
  CreatorSoftware?: string;
171
186
  /** ☆☆☆☆ Example: "2013:03:12 16:31:26" */
172
187
  DateTimeGenerated?: ExifDateTime | string;
173
- /** ☆☆☆☆ Example: "(Binary data 275008 bytes, use -b option to extract)" */
188
+ /** ☆☆☆☆ Example: "(Binary data 1011393 bytes, use -b option to extract)" */
174
189
  EmbeddedImage?: BinaryField | string;
175
190
  /** ☆☆☆☆ Example: 960 */
176
191
  EmbeddedImageHeight?: number;
@@ -178,6 +193,8 @@ export interface APP1Tags {
178
193
  EmbeddedImageType?: string;
179
194
  /** ☆☆☆☆ Example: 640 */
180
195
  EmbeddedImageWidth?: number;
196
+ /** ☆☆☆☆ Example: 1 */
197
+ Emissivity?: number;
181
198
  /** ☆☆☆☆ Example: "46.1 deg" */
182
199
  FieldOfView?: string;
183
200
  /** ☆☆☆☆ Example: "NOF" */
@@ -260,6 +277,8 @@ export interface APP1Tags {
260
277
  Real2IR?: number;
261
278
  /** ☆☆☆☆ Example: "26.7 C" */
262
279
  ReflectedApparentTemperature?: string;
280
+ /** ☆☆☆☆ Example: "80.0 %" */
281
+ RelativeHumidity?: string;
263
282
  /** ☆☆☆☆ Example: "41 110 240" */
264
283
  UnderflowColor?: string;
265
284
  }
@@ -420,39 +439,14 @@ export interface APP14Tags {
420
439
  export interface APP4Tags {
421
440
  /** ☆☆☆☆ ✔ Example: "40 C" */
422
441
  AmbientTemperature?: string;
423
- /** ☆☆☆☆ Example: 1 */
424
- Emissivity?: number;
425
- /** ☆☆☆☆ Example: "80.0 %" */
426
- RelativeHumidity?: string;
427
442
  }
428
443
  export interface APP5Tags {
429
444
  /** ☆☆☆☆ Example: 45 */
430
445
  Compass?: string;
431
446
  }
432
- export interface APP6Tags {
433
- /** ☆☆☆☆ Example: 800 */
434
- AutoISOMax?: number;
435
- /** ☆☆☆☆ ✔ Example: 3200 */
436
- AutoISOMin?: number;
437
- /** ☆☆☆☆ ✔ Example: "Up" */
438
- AutoRotation?: string;
439
- /** ☆☆☆☆ ✔ Example: "Photo Global Settings" */
440
- DeviceName?: string;
441
- /** ☆☆☆☆ ✔ Example: "On (Manual)" */
442
- HDRSetting?: string;
443
- /** ☆☆☆☆ ✔ Example: "AUTO" */
444
- MaximumShutterAngle?: string;
445
- /** ☆☆☆☆ ✔ Example: "859830e2f50cb3397a6216f09553fce800000000000000000000000000000000" */
446
- MediaUniqueID?: string;
447
- /** ☆☆☆☆ ✔ Example: "7.6.4" */
448
- MetadataVersion?: string;
449
- /** ☆☆☆☆ ✔ Example: "12MP_W" */
450
- PhotoResolution?: string;
451
- /** ☆☆☆☆ ✔ Example: "On" */
452
- ProTune?: string;
453
- /** ☆☆☆☆ ✔ Example: "4_1SEC" */
454
- Rate?: string;
455
- }
447
+ /**
448
+ * @see https://exiftool.org/TagNames/EXIF.html
449
+ */
456
450
  export interface EXIFTags {
457
451
  /** ☆☆☆☆ ✔ Example: 988517 */
458
452
  Acceleration?: number;
@@ -636,7 +630,7 @@ export interface EXIFTags {
636
630
  InteropIndex?: string;
637
631
  /** ★★★★ ✔ Example: "undef undef undef" */
638
632
  InteropVersion?: string;
639
- /** ☆☆☆☆ ✔ Example: "(Binary data 772608 bytes, use -b option to extract)" */
633
+ /** ☆☆☆☆ ✔ Example: "(Binary data 532480 bytes, use -b option to extract)" */
640
634
  JpgFromRaw?: BinaryField;
641
635
  /** ☆☆☆☆ ✔ Example: 845574 */
642
636
  JpgFromRawLength?: number;
@@ -845,8 +839,35 @@ export interface EXIFTags {
845
839
  /** ★★★★ ✔ Example: 99 */
846
840
  YResolution?: number;
847
841
  }
842
+ export interface APP6Tags {
843
+ /** ☆☆☆☆ ✔ Example: 800 */
844
+ AutoISOMax?: number;
845
+ /** ☆☆☆☆ ✔ Example: 3200 */
846
+ AutoISOMin?: number;
847
+ /** ☆☆☆☆ ✔ Example: "Up" */
848
+ AutoRotation?: string;
849
+ /** ☆☆☆☆ ✔ Example: "Photo Global Settings" */
850
+ DeviceName?: string;
851
+ /** ☆☆☆☆ ✔ Example: "On (Manual)" */
852
+ HDRSetting?: string;
853
+ /** ☆☆☆☆ ✔ Example: "AUTO" */
854
+ MaximumShutterAngle?: string;
855
+ /** ☆☆☆☆ ✔ Example: "859830e2f50cb3397a6216f09553fce800000000000000000000000000000000" */
856
+ MediaUniqueID?: string;
857
+ /** ☆☆☆☆ ✔ Example: "7.6.4" */
858
+ MetadataVersion?: string;
859
+ /** ☆☆☆☆ ✔ Example: "12MP_W" */
860
+ PhotoResolution?: string;
861
+ /** ☆☆☆☆ ✔ Example: "On" */
862
+ ProTune?: string;
863
+ /** ☆☆☆☆ ✔ Example: "4_1SEC" */
864
+ Rate?: string;
865
+ }
866
+ /**
867
+ * @see https://exiftool.org/TagNames/FlashPix.html
868
+ */
848
869
  export interface FlashPixTags {
849
- /** ☆☆☆☆ Example: "(Binary data 20796 bytes, use -b option to extract)" */
870
+ /** ☆☆☆☆ Example: "(Binary data 18 bytes, use -b option to extract)" */
850
871
  AudioStream?: BinaryField | string;
851
872
  /** ☆☆☆☆ ✔ Example: "Unicode UTF-16, little endian" */
852
873
  CodePage?: string;
@@ -869,6 +890,34 @@ export interface FlashPixTags {
869
890
  /** ☆☆☆☆ ✔ Example: 1 */
870
891
  UsedExtensionNumbers?: number;
871
892
  }
893
+ /**
894
+ * These tags are only available if {@link ExifToolOptions.geolocation} is true
895
+ * and the file has valid GPS location data.
896
+ */
897
+ export interface GeolocationTags {
898
+ /** ☆☆☆☆ ✔ Example: 99 */
899
+ GeolocationBearing?: number;
900
+ /** ☆☆☆☆ ✔ Example: "Zürich" */
901
+ GeolocationCity?: string;
902
+ /** ☆☆☆☆ ✔ Example: "United States" */
903
+ GeolocationCountry?: string;
904
+ /** ☆☆☆☆ ✔ Example: "US" */
905
+ GeolocationCountryCode?: string;
906
+ /** ☆☆☆☆ ✔ Example: "9.60 km" */
907
+ GeolocationDistance?: string;
908
+ /** ☆☆☆☆ ✔ Example: "PPLL" */
909
+ GeolocationFeatureCode?: string;
910
+ /** ☆☆☆☆ ✔ Example: 95000 */
911
+ GeolocationPopulation?: number;
912
+ /** ☆☆☆☆ ✔ Example: "7.3397, 134.4733" */
913
+ GeolocationPosition?: string;
914
+ /** ☆☆☆☆ ✔ Example: "Île-de-France" */
915
+ GeolocationRegion?: string;
916
+ /** ☆☆☆☆ ✔ Example: "Yokohama Shi" */
917
+ GeolocationSubregion?: string;
918
+ /** ☆☆☆☆ ✔ Example: "Pacific/Saipan" */
919
+ GeolocationTimeZone?: string;
920
+ }
872
921
  export interface JSONTags {
873
922
  /** ☆☆☆☆ Example: 0 */
874
923
  AIScene?: number;
@@ -883,30 +932,9 @@ export interface JSONTags {
883
932
  /** ☆☆☆☆ Example: 1 */
884
933
  ZoomMultiple?: number;
885
934
  }
886
- export interface MPFTags {
887
- /** ★★☆☆ Example: 9697 */
888
- DependentImage1EntryNumber?: number;
889
- /** ★★☆☆ ✔ Example: 960 */
890
- DependentImage2EntryNumber?: number;
891
- /** ☆☆☆☆ ✔ Example: "(Binary data 66 bytes, use -b option to extract)" */
892
- ImageUIDList?: BinaryField | string;
893
- /** ★★☆☆ ✔ Example: "0100" */
894
- MPFVersion?: string;
895
- /** ★★☆☆ ✔ Example: "Representative image, Dependent parent image" */
896
- MPImageFlags?: string;
897
- /** ★★☆☆ ✔ Example: "Unknown (4)" */
898
- MPImageFormat?: string;
899
- /** ★★☆☆ ✔ Example: 999325 */
900
- MPImageLength?: number;
901
- /** ★★☆☆ ✔ Example: 9999872 */
902
- MPImageStart?: number;
903
- /** ★★☆☆ ✔ Example: "Undefined" */
904
- MPImageType?: string;
905
- /** ★★☆☆ ✔ Example: 3 */
906
- NumberOfImages?: number;
907
- /** ☆☆☆☆ ✔ Example: 1 */
908
- TotalFrames?: number;
909
- }
935
+ /**
936
+ * @see https://exiftool.org/TagNames/IPTC.html
937
+ */
910
938
  export interface IPTCTags {
911
939
  /** ☆☆☆☆ ✔ Example: 4 */
912
940
  ApplicationRecordVersion?: number;
@@ -973,6 +1001,30 @@ export interface IPTCTags {
973
1001
  /** ☆☆☆☆ ✔ Example: "1 (most urgent)" */
974
1002
  Urgency?: string;
975
1003
  }
1004
+ export interface MPFTags {
1005
+ /** ★★☆☆ ✔ Example: 9697 */
1006
+ DependentImage1EntryNumber?: number;
1007
+ /** ★★☆☆ ✔ Example: 960 */
1008
+ DependentImage2EntryNumber?: number;
1009
+ /** ☆☆☆☆ ✔ Example: "(Binary data 66 bytes, use -b option to extract)" */
1010
+ ImageUIDList?: BinaryField | string;
1011
+ /** ★★☆☆ ✔ Example: "0100" */
1012
+ MPFVersion?: string;
1013
+ /** ★★☆☆ ✔ Example: "Representative image, Dependent parent image" */
1014
+ MPImageFlags?: string;
1015
+ /** ★★☆☆ ✔ Example: "Unknown (4)" */
1016
+ MPImageFormat?: string;
1017
+ /** ★★☆☆ ✔ Example: 999325 */
1018
+ MPImageLength?: number;
1019
+ /** ★★☆☆ ✔ Example: 9999872 */
1020
+ MPImageStart?: number;
1021
+ /** ★★☆☆ ✔ Example: "Undefined" */
1022
+ MPImageType?: string;
1023
+ /** ★★☆☆ ✔ Example: 3 */
1024
+ NumberOfImages?: number;
1025
+ /** ☆☆☆☆ ✔ Example: 1 */
1026
+ TotalFrames?: number;
1027
+ }
976
1028
  export interface MetaTags {
977
1029
  /** ☆☆☆☆ Example: 1 */
978
1030
  BorderID?: number;
@@ -1017,6 +1069,9 @@ export interface PanasonicRawTags {
1017
1069
  /** ☆☆☆☆ ✔ Example: 7 */
1018
1070
  NumWBEntries?: number;
1019
1071
  }
1072
+ /**
1073
+ * @see https://exiftool.org/TagNames/Photoshop.html
1074
+ */
1020
1075
  export interface PhotoshopTags {
1021
1076
  /** ☆☆☆☆ ✔ Example: true */
1022
1077
  CopyrightFlag?: boolean;
@@ -1806,7 +1861,7 @@ export interface MakerNotesTags {
1806
1861
  CameraISO?: string;
1807
1862
  /** ☆☆☆☆ ✔ Example: "Unknown (155)" */
1808
1863
  CameraOrientation?: string;
1809
- /** ☆☆☆☆ ✔ Example: "(Binary data 8412 bytes, use -b option to extract)" */
1864
+ /** ☆☆☆☆ ✔ Example: "(Binary data 8378 bytes, use -b option to extract)" */
1810
1865
  CameraParameters?: BinaryField | string;
1811
1866
  /** ☆☆☆☆ ✔ Example: "User Defined 3" */
1812
1867
  CameraPictureStyle?: string;
@@ -2142,7 +2197,7 @@ export interface MakerNotesTags {
2142
2197
  DSPFirmwareVersion?: string;
2143
2198
  /** ☆☆☆☆ ✔ Example: "Yes" */
2144
2199
  DarkFocusEnvironment?: string;
2145
- /** ★★☆☆ ✔ Example: "(Binary data 114 bytes, use -b option to extract)" */
2200
+ /** ★★☆☆ ✔ Example: "(Binary data 280 bytes, use -b option to extract)" */
2146
2201
  DataDump?: BinaryField | string;
2147
2202
  /** ☆☆☆☆ ✔ Example: 8289 */
2148
2203
  DataScaling?: number;
@@ -4471,6 +4526,9 @@ export interface MakerNotesTags {
4471
4526
  /** ☆☆☆☆ ✔ Example: 4184638 */
4472
4527
  ZoomedPreviewStart?: number;
4473
4528
  }
4529
+ /**
4530
+ * @see https://exiftool.org/TagNames/XMP.html
4531
+ */
4474
4532
  export interface XMPTags {
4475
4533
  /** ☆☆☆☆ ✔ Example: "uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b" */
4476
4534
  About?: string;
@@ -4686,7 +4744,7 @@ export interface XMPTags {
4686
4744
  GreenHue?: number;
4687
4745
  /** ☆☆☆☆ ✔ Example: 0 */
4688
4746
  GreenSaturation?: number;
4689
- /** ☆☆☆☆ ✔ Example: "(Binary data 23317 bytes, use -b option to extract)" */
4747
+ /** ☆☆☆☆ ✔ Example: "(Binary data 49603 bytes, use -b option to extract)" */
4690
4748
  HDRPMakerNote?: BinaryField | string;
4691
4749
  /** ☆☆☆☆ ✔ Example: false */
4692
4750
  HasCrop?: boolean;
@@ -5035,14 +5093,8 @@ export interface XMPTags {
5035
5093
  * devices (like iPhones) An example value, JSON stringified, follows the
5036
5094
  * popularity ratings.
5037
5095
  *
5038
- * Autogenerated by "yarn mktags" by ExifTool 12.80 on Tue Mar 26 2024.
5039
- * 2723 unique tags were found in 10096 photo and video files.
5096
+ * Autogenerated by "yarn mktags" by ExifTool 12.82 on Thu Apr 11 2024.
5097
+ * 2736 unique tags were found in 10096 photo and video files.
5040
5098
  */
5041
- export interface Tags extends APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, ApplicationRecordTags, CompositeTags, EXIFTags, ErrorsAndWarnings, ExifToolTags, FileTags, FlashPixTags, GeolocationTags, ICCProfileTags, IPTCTags, ImageDataHashTag, JFIFTags, JSONTags, MPFTags, MWGCollectionsTags, MWGKeywordTags, MakerNotesTags, MetaTags, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, XMPTags {
5042
- /** Full, resolved native path to this file */
5043
- SourceFile?: string;
5044
- /** Either an offset, like `UTC-7`, or an actual timezone, like `America/Los_Angeles` */
5045
- tz?: string;
5046
- /** Description of where and how `tz` was extracted */
5047
- tzSource?: string;
5099
+ export interface Tags extends APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, ApplicationRecordTags, CompositeTags, EXIFTags, ExifToolTags, ExifToolVendoredTags, FileTags, FlashPixTags, GeolocationTags, ICCProfileTags, IPTCTags, ImageDataHashTag, JFIFTags, JSONTags, MPFTags, MWGCollectionsTags, MWGKeywordTags, MakerNotesTags, MetaTags, PanasonicRawTags, PhotoshopTags, PrintIMTags, QuickTimeTags, RAFTags, RIFFTags, XMPTags {
5048
5100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exiftool-vendored",
3
- "version": "25.0.0",
3
+ "version": "25.2.0",
4
4
  "description": "Efficient, cross-platform access to ExifTool",
5
5
  "main": "./dist/ExifTool.js",
6
6
  "types": "./dist/ExifTool.d.ts",
@@ -17,6 +17,7 @@
17
17
  "compile:watch": "yarn precompile && tsc --watch",
18
18
  "premktags": "yarn compile",
19
19
  "mktags": "node dist/update/mktags.js",
20
+ "prelint": "yarn compile",
20
21
  "lint": "yarn eslint src --ext .ts",
21
22
  "prettier": "prettier --write src/*.ts src/**/*.ts",
22
23
  "pretest": "run-p lint compile",
@@ -32,6 +33,9 @@
32
33
  "url": "https://github.com/photostructure/exiftool-vendored.js.git"
33
34
  },
34
35
  "release-it": {
36
+ "hooks": {
37
+ "before:init": "yarn lint"
38
+ },
35
39
  "src": {
36
40
  "tagName": "v%s",
37
41
  "commitArgs": "-S",
@@ -73,12 +77,12 @@
73
77
  "@types/globule": "^1.1.9",
74
78
  "@types/he": "^1.2.3",
75
79
  "@types/mocha": "^10.0.6",
76
- "@types/node": "^20.11.30",
80
+ "@types/node": "^20.12.7",
77
81
  "@types/progress": "^2.0.7",
78
82
  "@types/tmp": "^0.2.6",
79
83
  "@types/xmldom": "^0.1.34",
80
- "@typescript-eslint/eslint-plugin": "^7.4.0",
81
- "@typescript-eslint/parser": "^7.4.0",
84
+ "@typescript-eslint/eslint-plugin": "^7.6.0",
85
+ "@typescript-eslint/parser": "^7.6.0",
82
86
  "@xmldom/xmldom": "^0.8.10",
83
87
  "chai": "^4.3.10",
84
88
  "chai-as-promised": "^7.1.1",
@@ -86,7 +90,7 @@
86
90
  "eslint": "^8.57.0",
87
91
  "eslint-plugin-import": "^2.29.1",
88
92
  "eslint-plugin-node": "^11.1.0",
89
- "eslint-plugin-regexp": "^2.4.0",
93
+ "eslint-plugin-regexp": "^2.5.0",
90
94
  "extract-zip": "^2.0.1",
91
95
  "geo-tz": "^8.0.2",
92
96
  "globule": "^1.3.4",
@@ -100,8 +104,8 @@
100
104
  "serve": "^14.2.1",
101
105
  "source-map-support": "^0.5.21",
102
106
  "tmp": "^0.2.3",
103
- "typedoc": "^0.25.12",
104
- "typescript": "^5.4.3",
107
+ "typedoc": "^0.25.13",
108
+ "typescript": "^5.4.5",
105
109
  "xpath": "^0.0.34"
106
110
  },
107
111
  "dependencies-note": "@types/luxon is a proper dependency, not devDependency, as our exported TypeScript typings reference luxon types. See <https://github.com/photostructure/exiftool-vendored.js/pull/108>",
@@ -113,7 +117,7 @@
113
117
  "luxon": "^3.4.4"
114
118
  },
115
119
  "optionalDependencies": {
116
- "exiftool-vendored.exe": "12.80.0",
117
- "exiftool-vendored.pl": "12.80.0"
120
+ "exiftool-vendored.exe": "12.82.0",
121
+ "exiftool-vendored.pl": "12.82.0"
118
122
  }
119
123
  }