exiftool-vendored 25.1.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 +9 -0
- package/README.md +26 -1
- package/dist/DefaultExifToolOptions.d.ts +2 -0
- package/dist/DefaultExifToolOptions.js +15 -1
- package/dist/DefaultExifToolOptions.js.map +1 -1
- package/dist/ExifTool.d.ts +15 -4
- package/dist/ExifTool.js +29 -4
- package/dist/ExifTool.js.map +1 -1
- package/dist/ExifToolOptions.d.ts +3 -1
- package/dist/ExifToolOptions.js.map +1 -1
- package/dist/ExiftoolPath.d.ts +26 -0
- package/dist/ExiftoolPath.js +34 -17
- package/dist/ExiftoolPath.js.map +1 -1
- package/dist/Tags.d.ts +17 -17
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,15 @@ 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
|
+
|
|
29
38
|
### v25.1.0
|
|
30
39
|
|
|
31
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)
|
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,cA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M,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,MAAM;IACN,WAAW,EAAE;QACX,YAAY;QACZ,aAAa;QACb,aAAa;QACb,cAAc;QACd,aAAa;QACb,aAAa;KACd;IACD,MAAM,EAAE,KAAK;CACd,CAAC,CAAA"}
|
package/dist/ExifTool.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ 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";
|
|
32
33
|
export { isGeolocationTag } from "./GeolocationTags";
|
|
33
34
|
export { parseJSON } from "./JSON";
|
|
34
35
|
export { DefaultReadTaskOptions } from "./ReadTask";
|
|
@@ -38,15 +39,25 @@ export type { APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, Addi
|
|
|
38
39
|
/**
|
|
39
40
|
* Manages delegating calls to a cluster of ExifTool child processes.
|
|
40
41
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
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.
|
|
43
54
|
*/
|
|
44
55
|
export declare class ExifTool {
|
|
45
56
|
#private;
|
|
46
57
|
readonly options: ExifToolOptions;
|
|
47
|
-
|
|
48
|
-
readonly exiftoolPath: () => Promise<string>;
|
|
58
|
+
readonly batchCluster: bc.BatchCluster;
|
|
49
59
|
constructor(options?: Partial<ExifToolOptions>);
|
|
60
|
+
readonly exiftoolPath: () => Promise<string>;
|
|
50
61
|
/**
|
|
51
62
|
* Register life cycle event listeners. Delegates to BatchProcess.
|
|
52
63
|
*/
|
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.isGeolocationTag = 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,8 @@ 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; } });
|
|
75
78
|
var GeolocationTags_1 = require("./GeolocationTags");
|
|
76
79
|
Object.defineProperty(exports, "isGeolocationTag", { enumerable: true, get: function () { return GeolocationTags_1.isGeolocationTag; } });
|
|
77
80
|
var JSON_1 = require("./JSON");
|
|
@@ -86,6 +89,10 @@ Object.defineProperty(exports, "defaultVideosToUTC", { enumerable: true, get: fu
|
|
|
86
89
|
Object.defineProperty(exports, "offsetMinutesToZoneName", { enumerable: true, get: function () { return Timezones_1.offsetMinutesToZoneName; } });
|
|
87
90
|
var WriteTask_2 = require("./WriteTask");
|
|
88
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
|
+
*/
|
|
89
96
|
const _ignoreShebang = (0, Lazy_1.lazy)(() => !(0, IsWin32_1.isWin32)() && !_fs.existsSync("/usr/bin/perl"));
|
|
90
97
|
const whichPerl = (0, Lazy_1.lazy)(async () => {
|
|
91
98
|
const result = await (0, Which_1.which)("perl");
|
|
@@ -97,12 +104,29 @@ const whichPerl = (0, Lazy_1.lazy)(async () => {
|
|
|
97
104
|
/**
|
|
98
105
|
* Manages delegating calls to a cluster of ExifTool child processes.
|
|
99
106
|
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
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.
|
|
102
119
|
*/
|
|
103
120
|
class ExifTool {
|
|
104
121
|
constructor(options = {}) {
|
|
105
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
|
+
});
|
|
106
130
|
/**
|
|
107
131
|
* Register life cycle event listeners. Delegates to BatchProcess.
|
|
108
132
|
*/
|
|
@@ -111,6 +135,8 @@ class ExifTool {
|
|
|
111
135
|
* Unregister life cycle event listeners. Delegates to BatchProcess.
|
|
112
136
|
*/
|
|
113
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.
|
|
114
140
|
_ExifTool_checkForPerl.set(this, (0, Lazy_1.lazy)(async () => {
|
|
115
141
|
if (this.options.checkPerl) {
|
|
116
142
|
await whichPerl(); // < throws if perl is missing
|
|
@@ -141,7 +167,6 @@ class ExifTool {
|
|
|
141
167
|
detached: false, // < no orphaned exiftool procs, please
|
|
142
168
|
env,
|
|
143
169
|
};
|
|
144
|
-
this.exiftoolPath = (0, Lazy_1.lazy)(async () => (0, Object_1.isFunction)(o.exiftoolPath) ? o.exiftoolPath(o.logger()) : o.exiftoolPath);
|
|
145
170
|
const processFactory = async () => ignoreShebang
|
|
146
171
|
? _cp.spawn(await whichPerl(), [await this.exiftoolPath(), ...o.exiftoolArgs], spawnOpts)
|
|
147
172
|
: _cp.spawn(await this.exiftoolPath(), o.exiftoolArgs, spawnOpts);
|
package/dist/ExifTool.js.map
CHANGED
|
@@ -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;
|
|
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;AAG5E,iDAA6C;AAE7C,uCAAmC;AACnC,iCAA6B;AAS7B,qCAAqC;AAErC,iCAA6B;AAG7B,+CAA2C;AAC3C,yCAA4E;AAE5E,6DAAyD;AAEzD,qCAA0C;AA8B1C,+CAA2C;AAC3C,mCAA+B;AAQ/B,2CAA0E;AAE1E,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,mEAAiE;AAAxD,gIAAA,sBAAsB,OAAA;AAC/B,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA;AAC5B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AACjB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AACjB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,qDAAoD;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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
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExifToolOptions.js","sourceRoot":"","sources":["../src/ExifToolOptions.ts"],"names":[],"mappings":";;;
|
|
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"}
|
package/dist/ExiftoolPath.d.ts
CHANGED
|
@@ -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
|
+
* "**/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>;
|
package/dist/ExiftoolPath.js
CHANGED
|
@@ -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
|
+
* "**/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
|
|
52
|
-
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
//
|
|
68
|
-
const electronResourcePath =
|
|
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)) {
|
package/dist/ExiftoolPath.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExiftoolPath.js","sourceRoot":"","sources":["../src/ExiftoolPath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExiftoolPath.js","sourceRoot":"","sources":["../src/ExiftoolPath.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA8B;AAC9B,iDAAkC;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,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ClD,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"}
|
package/dist/Tags.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { Version } from "./Version";
|
|
|
16
16
|
export interface ExifToolTags {
|
|
17
17
|
/** ☆☆☆☆ ✔ Example: "File is empty" */
|
|
18
18
|
Error?: string;
|
|
19
|
-
/** ★★★★ ✔ Example: 12.
|
|
19
|
+
/** ★★★★ ✔ Example: 12.82 */
|
|
20
20
|
ExifToolVersion?: number;
|
|
21
21
|
/** ☆☆☆☆ Example: "path/to/file.jpg" */
|
|
22
22
|
SourceFile?: string;
|
|
@@ -42,11 +42,11 @@ export interface FileTags {
|
|
|
42
42
|
EncodingProcess?: string;
|
|
43
43
|
/** ★★★★ ✔ Example: "Little-endian (Intel, II)" */
|
|
44
44
|
ExifByteOrder?: string;
|
|
45
|
-
/** ★★★★ ✔ Example: "2024:
|
|
45
|
+
/** ★★★★ ✔ Example: "2024:04:11 15:42:05-07:00" */
|
|
46
46
|
FileAccessDate?: ExifDateTime | string;
|
|
47
47
|
/** ☆☆☆☆ Example: */
|
|
48
48
|
FileCreateDate?: ExifDateTime | string;
|
|
49
|
-
/** ★★★★ ✔ Example: "2024:
|
|
49
|
+
/** ★★★★ ✔ Example: "2024:04:09 21:42:21-07:00" */
|
|
50
50
|
FileInodeChangeDate?: ExifDateTime | string;
|
|
51
51
|
/** ★★★★ ✔ Example: "2023:07:19 21:21:02-07:00" */
|
|
52
52
|
FileModifyDate?: ExifDateTime | string;
|
|
@@ -193,6 +193,8 @@ export interface APP1Tags {
|
|
|
193
193
|
EmbeddedImageType?: string;
|
|
194
194
|
/** ☆☆☆☆ Example: 640 */
|
|
195
195
|
EmbeddedImageWidth?: number;
|
|
196
|
+
/** ☆☆☆☆ Example: 1 */
|
|
197
|
+
Emissivity?: number;
|
|
196
198
|
/** ☆☆☆☆ Example: "46.1 deg" */
|
|
197
199
|
FieldOfView?: string;
|
|
198
200
|
/** ☆☆☆☆ Example: "NOF" */
|
|
@@ -255,7 +257,7 @@ export interface APP1Tags {
|
|
|
255
257
|
PaletteStretch?: number;
|
|
256
258
|
/** ☆☆☆☆ Example: ".basicImgData.objectParams.emissivity" */
|
|
257
259
|
Param0?: string;
|
|
258
|
-
/** ☆☆☆☆ Example: "(Binary data
|
|
260
|
+
/** ☆☆☆☆ Example: "(Binary data 153804 bytes, use -b option to extract)" */
|
|
259
261
|
RawThermalImage?: BinaryField | string;
|
|
260
262
|
/** ☆☆☆☆ Example: 90 */
|
|
261
263
|
RawThermalImageHeight?: number;
|
|
@@ -275,6 +277,8 @@ export interface APP1Tags {
|
|
|
275
277
|
Real2IR?: number;
|
|
276
278
|
/** ☆☆☆☆ Example: "26.7 C" */
|
|
277
279
|
ReflectedApparentTemperature?: string;
|
|
280
|
+
/** ☆☆☆☆ Example: "80.0 %" */
|
|
281
|
+
RelativeHumidity?: string;
|
|
278
282
|
/** ☆☆☆☆ Example: "41 110 240" */
|
|
279
283
|
UnderflowColor?: string;
|
|
280
284
|
}
|
|
@@ -435,10 +439,6 @@ export interface APP14Tags {
|
|
|
435
439
|
export interface APP4Tags {
|
|
436
440
|
/** ☆☆☆☆ ✔ Example: "40 C" */
|
|
437
441
|
AmbientTemperature?: string;
|
|
438
|
-
/** ☆☆☆☆ Example: 1 */
|
|
439
|
-
Emissivity?: number;
|
|
440
|
-
/** ☆☆☆☆ Example: "80.0 %" */
|
|
441
|
-
RelativeHumidity?: string;
|
|
442
442
|
}
|
|
443
443
|
export interface APP5Tags {
|
|
444
444
|
/** ☆☆☆☆ Example: 45 */
|
|
@@ -630,7 +630,7 @@ export interface EXIFTags {
|
|
|
630
630
|
InteropIndex?: string;
|
|
631
631
|
/** ★★★★ ✔ Example: "undef undef undef" */
|
|
632
632
|
InteropVersion?: string;
|
|
633
|
-
/** ☆☆☆☆ ✔ Example: "(Binary data
|
|
633
|
+
/** ☆☆☆☆ ✔ Example: "(Binary data 532480 bytes, use -b option to extract)" */
|
|
634
634
|
JpgFromRaw?: BinaryField;
|
|
635
635
|
/** ☆☆☆☆ ✔ Example: 845574 */
|
|
636
636
|
JpgFromRawLength?: number;
|
|
@@ -786,7 +786,7 @@ export interface EXIFTags {
|
|
|
786
786
|
SubjectDistanceRange?: string;
|
|
787
787
|
/** ☆☆☆☆ ✔ Example: 1 */
|
|
788
788
|
SubjectLocation?: number;
|
|
789
|
-
/** ★★★★ ✔ Example: "(Binary data
|
|
789
|
+
/** ★★★★ ✔ Example: "(Binary data 10202 bytes, use -b option to extract)" */
|
|
790
790
|
ThumbnailImage?: BinaryField;
|
|
791
791
|
/** ★★★★ ✔ Example: 9998 */
|
|
792
792
|
ThumbnailLength?: number;
|
|
@@ -798,7 +798,7 @@ export interface EXIFTags {
|
|
|
798
798
|
TileByteCounts?: BinaryField | string;
|
|
799
799
|
/** ☆☆☆☆ ✔ Example: 512 */
|
|
800
800
|
TileLength?: number;
|
|
801
|
-
/** ☆☆☆☆ ✔ Example: "(Binary data
|
|
801
|
+
/** ☆☆☆☆ ✔ Example: "(Binary data 508 bytes, use -b option to extract)" */
|
|
802
802
|
TileOffsets?: BinaryField | string;
|
|
803
803
|
/** ☆☆☆☆ ✔ Example: 512 */
|
|
804
804
|
TileWidth?: number;
|
|
@@ -1861,7 +1861,7 @@ export interface MakerNotesTags {
|
|
|
1861
1861
|
CameraISO?: string;
|
|
1862
1862
|
/** ☆☆☆☆ ✔ Example: "Unknown (155)" */
|
|
1863
1863
|
CameraOrientation?: string;
|
|
1864
|
-
/** ☆☆☆☆ ✔ Example: "(Binary data
|
|
1864
|
+
/** ☆☆☆☆ ✔ Example: "(Binary data 8378 bytes, use -b option to extract)" */
|
|
1865
1865
|
CameraParameters?: BinaryField | string;
|
|
1866
1866
|
/** ☆☆☆☆ ✔ Example: "User Defined 3" */
|
|
1867
1867
|
CameraPictureStyle?: string;
|
|
@@ -2197,7 +2197,7 @@ export interface MakerNotesTags {
|
|
|
2197
2197
|
DSPFirmwareVersion?: string;
|
|
2198
2198
|
/** ☆☆☆☆ ✔ Example: "Yes" */
|
|
2199
2199
|
DarkFocusEnvironment?: string;
|
|
2200
|
-
/** ★★☆☆ ✔ Example: "(Binary data
|
|
2200
|
+
/** ★★☆☆ ✔ Example: "(Binary data 280 bytes, use -b option to extract)" */
|
|
2201
2201
|
DataDump?: BinaryField | string;
|
|
2202
2202
|
/** ☆☆☆☆ ✔ Example: 8289 */
|
|
2203
2203
|
DataScaling?: number;
|
|
@@ -4315,7 +4315,7 @@ export interface MakerNotesTags {
|
|
|
4315
4315
|
ToneCurve?: string;
|
|
4316
4316
|
/** ☆☆☆☆ ✔ Example: "(Binary data 95 bytes, use -b option to extract)" */
|
|
4317
4317
|
ToneCurveMatching?: BinaryField | string;
|
|
4318
|
-
/** ☆☆☆☆ ✔ Example: "(Binary data
|
|
4318
|
+
/** ☆☆☆☆ ✔ Example: "(Binary data 1505 bytes, use -b option to extract)" */
|
|
4319
4319
|
ToneCurveTable?: BinaryField | string;
|
|
4320
4320
|
/** ☆☆☆☆ ✔ Example: "Highlights; 0; -7; 7; Shadows; 0; -7; 7; Midtones; 0; -7;…0; 0; 0" */
|
|
4321
4321
|
ToneLevel?: string;
|
|
@@ -4479,7 +4479,7 @@ export interface MakerNotesTags {
|
|
|
4479
4479
|
WhiteBalanceSetting?: string;
|
|
4480
4480
|
/** ☆☆☆☆ ✔ Example: "Auto" */
|
|
4481
4481
|
WhiteBalanceSetup?: string;
|
|
4482
|
-
/** ☆☆☆☆ ✔ Example: "(Binary data
|
|
4482
|
+
/** ☆☆☆☆ ✔ Example: "(Binary data 2201 bytes, use -b option to extract)" */
|
|
4483
4483
|
WhiteBalanceTable?: BinaryField | string;
|
|
4484
4484
|
/** ☆☆☆☆ ✔ Example: "Auto" */
|
|
4485
4485
|
WhiteBalanceTemperature?: string;
|
|
@@ -4744,7 +4744,7 @@ export interface XMPTags {
|
|
|
4744
4744
|
GreenHue?: number;
|
|
4745
4745
|
/** ☆☆☆☆ ✔ Example: 0 */
|
|
4746
4746
|
GreenSaturation?: number;
|
|
4747
|
-
/** ☆☆☆☆ ✔ Example: "(Binary data
|
|
4747
|
+
/** ☆☆☆☆ ✔ Example: "(Binary data 49603 bytes, use -b option to extract)" */
|
|
4748
4748
|
HDRPMakerNote?: BinaryField | string;
|
|
4749
4749
|
/** ☆☆☆☆ ✔ Example: false */
|
|
4750
4750
|
HasCrop?: boolean;
|
|
@@ -5093,7 +5093,7 @@ export interface XMPTags {
|
|
|
5093
5093
|
* devices (like iPhones) An example value, JSON stringified, follows the
|
|
5094
5094
|
* popularity ratings.
|
|
5095
5095
|
*
|
|
5096
|
-
* Autogenerated by "yarn mktags" by ExifTool 12.
|
|
5096
|
+
* Autogenerated by "yarn mktags" by ExifTool 12.82 on Thu Apr 11 2024.
|
|
5097
5097
|
* 2736 unique tags were found in 10096 photo and video files.
|
|
5098
5098
|
*/
|
|
5099
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 {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exiftool-vendored",
|
|
3
|
-
"version": "25.
|
|
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",
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
"@types/globule": "^1.1.9",
|
|
78
78
|
"@types/he": "^1.2.3",
|
|
79
79
|
"@types/mocha": "^10.0.6",
|
|
80
|
-
"@types/node": "^20.
|
|
80
|
+
"@types/node": "^20.12.7",
|
|
81
81
|
"@types/progress": "^2.0.7",
|
|
82
82
|
"@types/tmp": "^0.2.6",
|
|
83
83
|
"@types/xmldom": "^0.1.34",
|
|
84
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
85
|
-
"@typescript-eslint/parser": "^7.
|
|
84
|
+
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
|
85
|
+
"@typescript-eslint/parser": "^7.6.0",
|
|
86
86
|
"@xmldom/xmldom": "^0.8.10",
|
|
87
87
|
"chai": "^4.3.10",
|
|
88
88
|
"chai-as-promised": "^7.1.1",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"eslint": "^8.57.0",
|
|
91
91
|
"eslint-plugin-import": "^2.29.1",
|
|
92
92
|
"eslint-plugin-node": "^11.1.0",
|
|
93
|
-
"eslint-plugin-regexp": "^2.
|
|
93
|
+
"eslint-plugin-regexp": "^2.5.0",
|
|
94
94
|
"extract-zip": "^2.0.1",
|
|
95
95
|
"geo-tz": "^8.0.2",
|
|
96
96
|
"globule": "^1.3.4",
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"serve": "^14.2.1",
|
|
105
105
|
"source-map-support": "^0.5.21",
|
|
106
106
|
"tmp": "^0.2.3",
|
|
107
|
-
"typedoc": "^0.25.
|
|
108
|
-
"typescript": "^5.4.
|
|
107
|
+
"typedoc": "^0.25.13",
|
|
108
|
+
"typescript": "^5.4.5",
|
|
109
109
|
"xpath": "^0.0.34"
|
|
110
110
|
},
|
|
111
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>",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"luxon": "^3.4.4"
|
|
118
118
|
},
|
|
119
119
|
"optionalDependencies": {
|
|
120
|
-
"exiftool-vendored.exe": "12.
|
|
121
|
-
"exiftool-vendored.pl": "12.
|
|
120
|
+
"exiftool-vendored.exe": "12.82.0",
|
|
121
|
+
"exiftool-vendored.pl": "12.82.0"
|
|
122
122
|
}
|
|
123
123
|
}
|