exiftool-vendored
Advanced tools
Comparing version 25.2.0 to 26.0.0
@@ -1,2 +0,2 @@ | ||
import { ExifToolTask } from "./ExifToolTask"; | ||
import { ExifToolTask, ExifToolTaskOptions } from "./ExifToolTask"; | ||
import { Maybe } from "./Maybe"; | ||
@@ -9,4 +9,4 @@ /** | ||
private constructor(); | ||
static for(tagname: string, imgSrc: string, imgDest: string): BinaryExtractionTask; | ||
static for(tagname: string, imgSrc: string, imgDest: string, options?: ExifToolTaskOptions): BinaryExtractionTask; | ||
parse(stdout: string, err?: Error): Maybe<string>; | ||
} |
@@ -17,6 +17,6 @@ "use strict"; | ||
class BinaryExtractionTask extends ExifToolTask_1.ExifToolTask { | ||
constructor(args) { | ||
super(args); | ||
constructor(args, options) { | ||
super(args, options); | ||
} | ||
static for(tagname, imgSrc, imgDest) { | ||
static for(tagname, imgSrc, imgDest, options) { | ||
const args = [ | ||
@@ -32,3 +32,3 @@ ...FilenameCharsetArgs_1.Utf8FilenameCharsetArgs, | ||
]; | ||
return new BinaryExtractionTask(args); | ||
return new BinaryExtractionTask(args, options); | ||
} | ||
@@ -35,0 +35,0 @@ parse(stdout, err) { |
/// <reference types="node" /> | ||
import { ExifToolTask } from "./ExifToolTask"; | ||
import { ExifToolTask, ExifToolTaskOptions } from "./ExifToolTask"; | ||
/** | ||
@@ -10,4 +10,4 @@ * Task that returns an error string (to prevent retries), or undefined if | ||
private constructor(); | ||
static for(tagname: string, imgSrc: string): BinaryToBufferTask; | ||
static for(tagname: string, imgSrc: string, options?: ExifToolTaskOptions): BinaryToBufferTask; | ||
parse(data: string, err?: Error): Buffer | Error; | ||
} |
@@ -16,17 +16,12 @@ "use strict"; | ||
class BinaryToBufferTask extends ExifToolTask_1.ExifToolTask { | ||
constructor(tagname, args) { | ||
super(args); | ||
constructor(tagname, args, options) { | ||
super(args, options); | ||
this.tagname = tagname; | ||
} | ||
static for(tagname, imgSrc) { | ||
static for(tagname, imgSrc, options) { | ||
// NOTE TO FUTURE ME: we don't need to escape these arguments, because | ||
// ExifTool separates them via newlines. | ||
const args = [ | ||
...FilenameCharsetArgs_1.Utf8FilenameCharsetArgs, | ||
"-json", | ||
"-b", | ||
"-" + tagname, | ||
node_path_1.default.resolve(imgSrc), | ||
]; | ||
return new BinaryToBufferTask(tagname, args); | ||
const args = [...FilenameCharsetArgs_1.Utf8FilenameCharsetArgs, "-json", "-b", "-" + tagname]; | ||
args.push(node_path_1.default.resolve(imgSrc)); | ||
return new BinaryToBufferTask(tagname, args, options); | ||
} | ||
@@ -33,0 +28,0 @@ parse(data, err) { |
@@ -76,2 +76,3 @@ "use strict"; | ||
ignoreZeroZeroLatLon: true, | ||
ignoreMinorErrors: true, | ||
imageHashType: false, | ||
@@ -78,0 +79,0 @@ includeImageDataMD5: undefined, |
@@ -7,3 +7,3 @@ /// <reference types="node" /> | ||
import { ExifToolOptions } from "./ExifToolOptions"; | ||
import { ExifToolTask } from "./ExifToolTask"; | ||
import { ExifToolTask, ExifToolTaskOptions } from "./ExifToolTask"; | ||
import { ExifToolVendoredTags } from "./ExifToolVendoredTags"; | ||
@@ -39,3 +39,3 @@ import { ICCProfileTags } from "./ICCProfileTags"; | ||
export { DefaultWriteTaskOptions } from "./WriteTask"; | ||
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, }; | ||
export type { APP12Tags, APP14Tags, APP1Tags, APP4Tags, APP5Tags, APP6Tags, AdditionalWriteTags, ApplicationRecordTags, CollectionInfo, CompositeTags, Defined, DefinedOrNullValued, EXIFTags, ErrorsAndWarnings, ExifToolOptions, ExifToolTags, ExifToolTaskOptions, 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, }; | ||
/** | ||
@@ -90,3 +90,3 @@ * Manages delegating calls to a cluster of ExifTool child processes. | ||
*/ | ||
read<T extends Tags = Tags>(file: string, optionalArgs?: string[], options?: Partial<ReadTaskOptions>): Promise<T>; | ||
read<T extends Tags = Tags>(file: string, optionalArgs?: string[], options?: ReadTaskOptions): Promise<T>; | ||
/** | ||
@@ -146,3 +146,3 @@ * Read the tags from `file`, without any post-processing of ExifTool | ||
retain?: (keyof Tags | string)[]; | ||
}): Promise<WriteTaskResult>; | ||
} & Partial<ExifToolTaskOptions>): Promise<WriteTaskResult>; | ||
/** | ||
@@ -157,3 +157,3 @@ * Extract the low-resolution thumbnail in `path/to/image.jpg` | ||
*/ | ||
extractThumbnail(imageFile: string, thumbnailFile: string): Promise<void>; | ||
extractThumbnail(imageFile: string, thumbnailFile: string, opts?: ExifToolOptions): Promise<void>; | ||
/** | ||
@@ -169,3 +169,3 @@ * Extract the "preview" image in `path/to/image.jpg` | ||
*/ | ||
extractPreview(imageFile: string, previewFile: string): Promise<void>; | ||
extractPreview(imageFile: string, previewFile: string, opts?: ExifToolOptions): Promise<void>; | ||
/** | ||
@@ -181,3 +181,3 @@ * Extract the "JpgFromRaw" image in `path/to/image.jpg` and write it to | ||
*/ | ||
extractJpgFromRaw(imageFile: string, outputFile: string): Promise<void>; | ||
extractJpgFromRaw(imageFile: string, outputFile: string, opts?: ExifToolOptions): Promise<void>; | ||
/** | ||
@@ -191,3 +191,3 @@ * Extract a given binary value from "tagname" tag associated to | ||
*/ | ||
extractBinaryTag(tagname: string, src: string, dest: string): Promise<void>; | ||
extractBinaryTag(tagname: string, src: string, dest: string, opts?: ExifToolTaskOptions): Promise<void>; | ||
/** | ||
@@ -202,3 +202,3 @@ * Extract a given binary value from "tagname" tag associated to | ||
*/ | ||
extractBinaryTagToBuffer(tagname: PreviewTag, imageFile: string): Promise<Buffer>; | ||
extractBinaryTagToBuffer(tagname: PreviewTag, imageFile: string, opts?: ExifToolTaskOptions): Promise<Buffer>; | ||
/** | ||
@@ -222,3 +222,5 @@ * Attempt to fix metadata problems in JPEG images by deleting all metadata | ||
*/ | ||
rewriteAllTags(inputFile: string, outputFile: string, allowMakerNoteRepair?: boolean): Promise<void>; | ||
rewriteAllTags(inputFile: string, outputFile: string, opts?: { | ||
allowMakerNoteRepair?: boolean; | ||
} & ExifToolTaskOptions): Promise<void>; | ||
/** | ||
@@ -225,0 +227,0 @@ * Shut down running ExifTool child processes. No subsequent requests will be |
@@ -33,3 +33,3 @@ "use strict"; | ||
}; | ||
var _ExifTool_checkForPerl; | ||
var _ExifTool_taskOptions, _ExifTool_checkForPerl; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -131,5 +131,10 @@ 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; | ||
}); | ||
_ExifTool_taskOptions.set(this, (0, Lazy_1.lazy)(() => (0, Pick_1.pick)(this.options, "ignoreMinorErrors")) | ||
/** | ||
* Register life cycle event listeners. Delegates to BatchProcess. | ||
*/ | ||
); | ||
/** | ||
* Register life cycle event listeners. Delegates to BatchProcess. | ||
*/ | ||
this.on = (event, listener) => this.batchCluster.on(event, listener); | ||
@@ -186,3 +191,3 @@ /** | ||
version() { | ||
return this.enqueueTask(() => new VersionTask_1.VersionTask()); | ||
return this.enqueueTask(() => new VersionTask_1.VersionTask(this.options)); | ||
} | ||
@@ -238,3 +243,3 @@ /** | ||
readRaw(file, args = []) { | ||
return this.enqueueTask(() => ReadRawTask_1.ReadRawTask.for(file, args)); | ||
return this.enqueueTask(() => ReadRawTask_1.ReadRawTask.for(file, args, __classPrivateFieldGet(this, _ExifTool_taskOptions, "f").call(this))); | ||
} | ||
@@ -259,3 +264,3 @@ /** | ||
return this.enqueueTask(() => WriteTask_1.WriteTask.for(file, tags, args, { | ||
...(0, Pick_1.pick)(this.options, "useMWG"), | ||
...(0, Pick_1.pick)(this.options, "useMWG", "ignoreMinorErrors"), | ||
...options, | ||
@@ -281,3 +286,3 @@ }), retriable); | ||
} | ||
return this.write(file, {}, args); | ||
return this.write(file, {}, args, (0, Object_1.omit)(opts !== null && opts !== void 0 ? opts : {}, "retain")); | ||
} | ||
@@ -293,4 +298,4 @@ /** | ||
*/ | ||
extractThumbnail(imageFile, thumbnailFile) { | ||
return this.extractBinaryTag("ThumbnailImage", imageFile, thumbnailFile); | ||
extractThumbnail(imageFile, thumbnailFile, opts) { | ||
return this.extractBinaryTag("ThumbnailImage", imageFile, thumbnailFile, opts); | ||
} | ||
@@ -307,4 +312,4 @@ /** | ||
*/ | ||
extractPreview(imageFile, previewFile) { | ||
return this.extractBinaryTag("PreviewImage", imageFile, previewFile); | ||
extractPreview(imageFile, previewFile, opts) { | ||
return this.extractBinaryTag("PreviewImage", imageFile, previewFile, opts); | ||
} | ||
@@ -321,4 +326,4 @@ /** | ||
*/ | ||
extractJpgFromRaw(imageFile, outputFile) { | ||
return this.extractBinaryTag("JpgFromRaw", imageFile, outputFile); | ||
extractJpgFromRaw(imageFile, outputFile, opts) { | ||
return this.extractBinaryTag("JpgFromRaw", imageFile, outputFile, opts); | ||
} | ||
@@ -333,6 +338,9 @@ /** | ||
*/ | ||
async extractBinaryTag(tagname, src, dest) { | ||
async extractBinaryTag(tagname, src, dest, opts) { | ||
// BinaryExtractionTask returns a stringified error if the output indicates | ||
// the task should not be retried. | ||
const maybeError = await this.enqueueTask(() => BinaryExtractionTask_1.BinaryExtractionTask.for(tagname, src, dest)); | ||
const maybeError = await this.enqueueTask(() => BinaryExtractionTask_1.BinaryExtractionTask.for(tagname, src, dest, { | ||
...__classPrivateFieldGet(this, _ExifTool_taskOptions, "f").call(this), | ||
...opts, | ||
})); | ||
if (maybeError != null) { | ||
@@ -351,4 +359,7 @@ throw new Error(maybeError); | ||
*/ | ||
async extractBinaryTagToBuffer(tagname, imageFile) { | ||
const result = await this.enqueueTask(() => BinaryToBufferTask_1.BinaryToBufferTask.for(tagname, imageFile)); | ||
async extractBinaryTagToBuffer(tagname, imageFile, opts) { | ||
const result = await this.enqueueTask(() => BinaryToBufferTask_1.BinaryToBufferTask.for(tagname, imageFile, { | ||
...__classPrivateFieldGet(this, _ExifTool_taskOptions, "f").call(this), | ||
...opts, | ||
})); | ||
if (Buffer.isBuffer(result)) { | ||
@@ -382,4 +393,8 @@ return result; | ||
*/ | ||
rewriteAllTags(inputFile, outputFile, allowMakerNoteRepair = false) { | ||
return this.enqueueTask(() => RewriteAllTagsTask_1.RewriteAllTagsTask.for(inputFile, outputFile, allowMakerNoteRepair)); | ||
rewriteAllTags(inputFile, outputFile, opts) { | ||
return this.enqueueTask(() => RewriteAllTagsTask_1.RewriteAllTagsTask.for(inputFile, outputFile, { | ||
allowMakerNoteRepair: false, | ||
...__classPrivateFieldGet(this, _ExifTool_taskOptions, "f").call(this), | ||
...opts, | ||
})); | ||
} | ||
@@ -457,3 +472,3 @@ /** | ||
exports.ExifTool = ExifTool; | ||
_ExifTool_checkForPerl = new WeakMap(); | ||
_ExifTool_taskOptions = new WeakMap(), _ExifTool_checkForPerl = new WeakMap(); | ||
/** | ||
@@ -460,0 +475,0 @@ * Use this singleton rather than instantiating new {@link ExifTool} instances |
@@ -202,2 +202,8 @@ /// <reference types="node" /> | ||
/** | ||
* Should we ignore minor errors when reading metadata? | ||
* | ||
* This defaults to `true`, as ExifTool can be quite chatty. | ||
*/ | ||
ignoreMinorErrors: boolean; | ||
/** | ||
* `ExifTool` has a shebang line that assumes a valid `perl` is installed at | ||
@@ -204,0 +210,0 @@ * `/usr/bin/perl`. |
/// <reference types="node" /> | ||
import * as bc from "batch-cluster"; | ||
import { ExifToolOptions } from "./ExifToolOptions"; | ||
export type ExifToolTaskOptions = Pick<ExifToolOptions, "ignoreMinorErrors">; | ||
export declare abstract class ExifToolTask<T> extends bc.Task<T> { | ||
#private; | ||
readonly args: string[]; | ||
static renderCommand(args: string[]): string; | ||
readonly options?: ExifToolTaskOptions | undefined; | ||
static renderCommand(args: string[], options?: ExifToolTaskOptions): string; | ||
readonly errors: string[]; | ||
readonly warnings: string[]; | ||
constructor(args: string[]); | ||
constructor(args: string[], options?: ExifToolTaskOptions | undefined); | ||
onStderr(buf: string | Buffer): void; | ||
protected abstract parse(input: string, error?: Error): T; | ||
} |
@@ -38,9 +38,15 @@ "use strict"; | ||
class ExifToolTask extends bc.Task { | ||
static renderCommand(args) { | ||
return [...args, "-ignoreMinorErrors", "-execute", ""].join("\n"); | ||
static renderCommand(args, options) { | ||
const result = args.filter((ea) => !(0, String_1.blank)(ea)); | ||
if ((options === null || options === void 0 ? void 0 : options.ignoreMinorErrors) === true) { | ||
result.push("-ignoreMinorErrors"); | ||
} | ||
result.push("-execute"); | ||
return result.join("\n") + "\n"; | ||
} | ||
constructor(args) { | ||
super(ExifToolTask.renderCommand(args), (stdout, stderr, passed) => __classPrivateFieldGet(this, _ExifToolTask_instances, "m", _ExifToolTask_parser).call(this, stdout, stderr, passed)); | ||
constructor(args, options) { | ||
super(ExifToolTask.renderCommand(args, options), (stdout, stderr, passed) => __classPrivateFieldGet(this, _ExifToolTask_instances, "m", _ExifToolTask_parser).call(this, stdout, stderr, passed)); | ||
_ExifToolTask_instances.add(this); | ||
this.args = args; | ||
this.options = options; | ||
this.errors = []; | ||
@@ -47,0 +53,0 @@ this.warnings = []; |
@@ -1,2 +0,2 @@ | ||
import { ExifToolTask } from "./ExifToolTask"; | ||
import { ExifToolTask, ExifToolTaskOptions } from "./ExifToolTask"; | ||
import { RawTags } from "./RawTags"; | ||
@@ -6,3 +6,3 @@ export declare class ReadRawTask extends ExifToolTask<RawTags> { | ||
readonly args: string[]; | ||
static for(filename: string, exiftoolArgs?: string[]): ReadRawTask; | ||
static for(filename: string, exiftoolArgs?: string[], options?: ExifToolTaskOptions): ReadRawTask; | ||
private constructor(); | ||
@@ -9,0 +9,0 @@ toString(): string; |
@@ -33,3 +33,3 @@ "use strict"; | ||
class ReadRawTask extends ExifToolTask_1.ExifToolTask { | ||
static for(filename, exiftoolArgs = []) { | ||
static for(filename, exiftoolArgs = [], options) { | ||
const args = [...FilenameCharsetArgs_1.Utf8FilenameCharsetArgs, ...exiftoolArgs]; | ||
@@ -40,6 +40,6 @@ if (!args.includes("-json")) | ||
args.push(sourceFile); | ||
return new ReadRawTask(sourceFile, args); | ||
return new ReadRawTask(sourceFile, args, options); | ||
} | ||
constructor(sourceFile, args) { | ||
super(args); | ||
constructor(sourceFile, args, options) { | ||
super(args, options); | ||
this.sourceFile = sourceFile; | ||
@@ -46,0 +46,0 @@ this.args = args; |
import { ExifToolTask } from "./ExifToolTask"; | ||
import { Tags } from "./Tags"; | ||
export declare const ReadTaskOptionFields: ["backfillTimezones", "defaultVideosToUTC", "geoTz", "geolocation", "ignoreZeroZeroLatLon", "imageHashType", "includeImageDataMD5", "inferTimezoneFromDatestamps", "inferTimezoneFromDatestampTags", "numericTags", "useMWG"]; | ||
export declare const ReadTaskOptionFields: ["backfillTimezones", "defaultVideosToUTC", "geolocation", "geoTz", "ignoreMinorErrors", "ignoreZeroZeroLatLon", "imageHashType", "includeImageDataMD5", "inferTimezoneFromDatestamps", "inferTimezoneFromDatestampTags", "numericTags", "useMWG"]; | ||
export declare function nullish(s: string | undefined): s is undefined; | ||
@@ -17,5 +17,6 @@ export declare const DefaultReadTaskOptions: { | ||
readonly geolocation: boolean; | ||
readonly ignoreMinorErrors: boolean; | ||
readonly optionalArgs: string[]; | ||
}; | ||
export type ReadTaskOptions = typeof DefaultReadTaskOptions; | ||
export type ReadTaskOptions = Partial<typeof DefaultReadTaskOptions>; | ||
export declare class ReadTask extends ExifToolTask<Tags> { | ||
@@ -25,8 +26,8 @@ #private; | ||
readonly args: string[]; | ||
readonly options: ReadTaskOptions; | ||
options: Required<ReadTaskOptions>; | ||
private readonly degroup; | ||
private constructor(); | ||
static for(filename: string, options: Partial<ReadTaskOptions>): ReadTask; | ||
static for(filename: string, options: ReadTaskOptions): ReadTask; | ||
toString(): string; | ||
parse(data: string, err?: Error): Tags; | ||
} |
@@ -72,4 +72,5 @@ "use strict"; | ||
"defaultVideosToUTC", | ||
"geolocation", | ||
"geoTz", | ||
"geolocation", | ||
"ignoreMinorErrors", | ||
"ignoreZeroZeroLatLon", | ||
@@ -95,3 +96,3 @@ "imageHashType", | ||
constructor(sourceFile, args, options) { | ||
super(args); | ||
super(args, options); | ||
_ReadTask_instances.add(this); | ||
@@ -98,0 +99,0 @@ this.sourceFile = sourceFile; |
@@ -1,6 +0,8 @@ | ||
import { ExifToolTask } from "./ExifToolTask"; | ||
import { ExifToolTask, ExifToolTaskOptions } from "./ExifToolTask"; | ||
export declare class RewriteAllTagsTask extends ExifToolTask<void> { | ||
private constructor(); | ||
static for(imgSrc: string, imgDest: string, allowMakerNoteRepair: boolean): RewriteAllTagsTask; | ||
static for(imgSrc: string, imgDest: string, opts: { | ||
allowMakerNoteRepair?: boolean; | ||
} & ExifToolTaskOptions): RewriteAllTagsTask; | ||
parse(data: string, error?: Error): void; | ||
} |
@@ -32,6 +32,6 @@ "use strict"; | ||
class RewriteAllTagsTask extends ExifToolTask_1.ExifToolTask { | ||
constructor(args) { | ||
super(args); | ||
constructor(args, options) { | ||
super(args, options); | ||
} | ||
static for(imgSrc, imgDest, allowMakerNoteRepair) { | ||
static for(imgSrc, imgDest, opts) { | ||
// -all= -tagsfromfile @ -all:all -unsafe -icc_profile bad.jpg | ||
@@ -46,3 +46,3 @@ const args = (0, Array_1.compact)([ | ||
"-icc_profile", | ||
allowMakerNoteRepair ? "-F" : undefined, | ||
opts.allowMakerNoteRepair ? "-F" : undefined, | ||
"-out", | ||
@@ -52,3 +52,3 @@ _path.resolve(imgDest), | ||
]); | ||
return new RewriteAllTagsTask(args); | ||
return new RewriteAllTagsTask(args, opts); | ||
} | ||
@@ -55,0 +55,0 @@ parse(data, error) { |
@@ -1,6 +0,6 @@ | ||
import { ExifToolTask } from "./ExifToolTask"; | ||
import { ExifToolTask, ExifToolTaskOptions } from "./ExifToolTask"; | ||
export declare class VersionTask extends ExifToolTask<string> { | ||
private static readonly versionRegex; | ||
constructor(); | ||
constructor(options?: ExifToolTaskOptions); | ||
protected parse(input: string): string; | ||
} |
@@ -6,4 +6,4 @@ "use strict"; | ||
class VersionTask extends ExifToolTask_1.ExifToolTask { | ||
constructor() { | ||
super(["-ver"]); | ||
constructor(options) { | ||
super(["-ver"], options); | ||
} | ||
@@ -10,0 +10,0 @@ parse(input) { |
@@ -1,2 +0,2 @@ | ||
import { ExifToolTask } from "./ExifToolTask"; | ||
import { ExifToolTask, ExifToolTaskOptions } from "./ExifToolTask"; | ||
import { WriteTags } from "./WriteTags"; | ||
@@ -6,4 +6,5 @@ export declare function htmlEncode(s: string): string; | ||
readonly useMWG: boolean; | ||
readonly ignoreMinorErrors: boolean; | ||
}; | ||
export type WriteTaskOptions = typeof DefaultWriteTaskOptions; | ||
export type WriteTaskOptions = Partial<typeof DefaultWriteTaskOptions>; | ||
export interface WriteTaskResult { | ||
@@ -36,6 +37,7 @@ /** | ||
readonly args: string[]; | ||
readonly options: ExifToolTaskOptions; | ||
private constructor(); | ||
static for(filename: string, tags: WriteTags, extraArgs?: string[], options?: Partial<WriteTaskOptions>): WriteTask; | ||
static for(filename: string, tags: WriteTags, extraArgs: string[] | undefined, options: Partial<WriteTaskOptions> & Required<ExifToolTaskOptions>): WriteTask; | ||
toString(): string; | ||
protected parse(data: string, error?: Error): WriteTaskResult; | ||
} |
@@ -83,9 +83,10 @@ "use strict"; | ||
exports.DefaultWriteTaskOptions = { | ||
...(0, Pick_1.pick)(DefaultExifToolOptions_1.DefaultExifToolOptions, "useMWG"), | ||
...(0, Pick_1.pick)(DefaultExifToolOptions_1.DefaultExifToolOptions, "useMWG", "ignoreMinorErrors"), | ||
}; | ||
class WriteTask extends ExifToolTask_1.ExifToolTask { | ||
constructor(sourceFile, args) { | ||
super(args); | ||
constructor(sourceFile, args, options) { | ||
super(args, options); | ||
this.sourceFile = sourceFile; | ||
this.args = args; | ||
this.options = options; | ||
} | ||
@@ -120,3 +121,3 @@ static for(filename, tags, extraArgs = [], options) { | ||
args.push(sourceFile); | ||
return new WriteTask(sourceFile, args); | ||
return new WriteTask(sourceFile, args, options); | ||
} | ||
@@ -123,0 +124,0 @@ toString() { |
{ | ||
"name": "exiftool-vendored", | ||
"version": "25.2.0", | ||
"version": "26.0.0", | ||
"description": "Efficient, cross-platform access to ExifTool", | ||
@@ -84,4 +84,4 @@ "main": "./dist/ExifTool.js", | ||
"@types/xmldom": "^0.1.34", | ||
"@typescript-eslint/eslint-plugin": "^7.6.0", | ||
"@typescript-eslint/parser": "^7.6.0", | ||
"@typescript-eslint/eslint-plugin": "^7.7.1", | ||
"@typescript-eslint/parser": "^7.7.1", | ||
"@xmldom/xmldom": "^0.8.10", | ||
@@ -99,3 +99,3 @@ "chai": "^4.3.10", | ||
"mocha": "^10.4.0", | ||
"npm-check-updates": "^16.14.18", | ||
"npm-check-updates": "^16.14.20", | ||
"npm-run-all": "^4.1.5", | ||
@@ -106,3 +106,3 @@ "prettier": "^3.2.5", | ||
"rimraf": "^5.0.5", | ||
"serve": "^14.2.1", | ||
"serve": "^14.2.3", | ||
"source-map-support": "^0.5.21", | ||
@@ -123,5 +123,5 @@ "tmp": "^0.2.3", | ||
"optionalDependencies": { | ||
"exiftool-vendored.exe": "12.82.0", | ||
"exiftool-vendored.pl": "12.82.0" | ||
"exiftool-vendored.exe": "12.84.0", | ||
"exiftool-vendored.pl": "12.84.0" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
589792
10047