@basemaps/lambda-tiler 6.28.1 → 6.29.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 +19 -0
- package/build/__tests__/xyz.util.d.ts.map +1 -1
- package/build/__tests__/xyz.util.js +0 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5 -0
- package/build/routes/__tests__/attribution.test.js +0 -1
- package/build/routes/__tests__/fonts.test.d.ts +2 -0
- package/build/routes/__tests__/fonts.test.d.ts.map +1 -0
- package/build/routes/__tests__/fonts.test.js +60 -0
- package/build/routes/__tests__/memory.fs.d.ts +18 -0
- package/build/routes/__tests__/memory.fs.d.ts.map +1 -0
- package/build/routes/__tests__/memory.fs.js +73 -0
- package/build/routes/__tests__/sprites.test.d.ts +2 -0
- package/build/routes/__tests__/sprites.test.d.ts.map +1 -0
- package/build/routes/__tests__/sprites.test.js +55 -0
- package/build/routes/fonts.d.ts +13 -0
- package/build/routes/fonts.d.ts.map +1 -0
- package/build/routes/fonts.js +50 -0
- package/build/routes/sprites.d.ts +9 -0
- package/build/routes/sprites.d.ts.map +1 -0
- package/build/routes/sprites.js +42 -0
- package/dist/index.js +183 -0
- package/dist/node_modules/.package-lock.json +488 -0
- package/dist/node_modules/base64-js/LICENSE +21 -0
- package/dist/node_modules/base64-js/README.md +34 -0
- package/dist/node_modules/base64-js/base64js.min.js +1 -0
- package/dist/node_modules/base64-js/index.d.ts +3 -0
- package/dist/node_modules/base64-js/index.js +150 -0
- package/dist/node_modules/base64-js/package.json +47 -0
- package/dist/node_modules/bl/.travis.yml +17 -0
- package/dist/node_modules/bl/BufferList.js +396 -0
- package/dist/node_modules/bl/LICENSE.md +13 -0
- package/dist/node_modules/bl/README.md +247 -0
- package/dist/node_modules/bl/bl.js +84 -0
- package/dist/node_modules/bl/package.json +37 -0
- package/dist/node_modules/bl/test/convert.js +21 -0
- package/dist/node_modules/bl/test/indexOf.js +492 -0
- package/dist/node_modules/bl/test/isBufferList.js +32 -0
- package/dist/node_modules/bl/test/test.js +869 -0
- package/dist/node_modules/buffer/AUTHORS.md +70 -0
- package/dist/node_modules/buffer/LICENSE +21 -0
- package/dist/node_modules/buffer/README.md +410 -0
- package/dist/node_modules/buffer/index.d.ts +186 -0
- package/dist/node_modules/buffer/index.js +1817 -0
- package/dist/node_modules/buffer/package.json +96 -0
- package/dist/node_modules/chownr/LICENSE +15 -0
- package/dist/node_modules/chownr/README.md +3 -0
- package/dist/node_modules/chownr/chownr.js +167 -0
- package/dist/node_modules/chownr/package.json +29 -0
- package/dist/node_modules/color/LICENSE +21 -0
- package/dist/node_modules/color/README.md +123 -0
- package/dist/node_modules/color/index.js +496 -0
- package/dist/node_modules/color/package.json +47 -0
- package/dist/node_modules/color-convert/CHANGELOG.md +54 -0
- package/dist/node_modules/color-convert/LICENSE +21 -0
- package/dist/node_modules/color-convert/README.md +68 -0
- package/dist/node_modules/color-convert/conversions.js +839 -0
- package/dist/node_modules/color-convert/index.js +81 -0
- package/dist/node_modules/color-convert/package.json +48 -0
- package/dist/node_modules/color-convert/route.js +97 -0
- package/dist/node_modules/color-name/LICENSE +8 -0
- package/dist/node_modules/color-name/README.md +11 -0
- package/dist/node_modules/color-name/index.js +152 -0
- package/dist/node_modules/color-name/package.json +28 -0
- package/dist/node_modules/color-string/LICENSE +21 -0
- package/dist/node_modules/color-string/README.md +62 -0
- package/dist/node_modules/color-string/index.js +242 -0
- package/dist/node_modules/color-string/package.json +39 -0
- package/dist/node_modules/decompress-response/index.d.ts +22 -0
- package/dist/node_modules/decompress-response/index.js +58 -0
- package/dist/node_modules/decompress-response/license +9 -0
- package/dist/node_modules/decompress-response/package.json +56 -0
- package/dist/node_modules/decompress-response/readme.md +48 -0
- package/dist/node_modules/deep-extend/CHANGELOG.md +46 -0
- package/dist/node_modules/deep-extend/LICENSE +20 -0
- package/dist/node_modules/deep-extend/README.md +91 -0
- package/dist/node_modules/deep-extend/index.js +1 -0
- package/dist/node_modules/deep-extend/lib/deep-extend.js +150 -0
- package/dist/node_modules/deep-extend/package.json +62 -0
- package/dist/node_modules/detect-libc/LICENSE +201 -0
- package/dist/node_modules/detect-libc/README.md +160 -0
- package/dist/node_modules/detect-libc/index.d.ts +11 -0
- package/dist/node_modules/detect-libc/lib/detect-libc.js +178 -0
- package/dist/node_modules/detect-libc/lib/process.js +16 -0
- package/dist/node_modules/detect-libc/package.json +36 -0
- package/dist/node_modules/end-of-stream/LICENSE +21 -0
- package/dist/node_modules/end-of-stream/README.md +54 -0
- package/dist/node_modules/end-of-stream/index.js +94 -0
- package/dist/node_modules/end-of-stream/package.json +37 -0
- package/dist/node_modules/expand-template/.travis.yml +6 -0
- package/dist/node_modules/expand-template/LICENSE +21 -0
- package/dist/node_modules/expand-template/README.md +43 -0
- package/dist/node_modules/expand-template/index.js +26 -0
- package/dist/node_modules/expand-template/package.json +29 -0
- package/dist/node_modules/expand-template/test.js +67 -0
- package/dist/node_modules/fs-constants/LICENSE +21 -0
- package/dist/node_modules/fs-constants/README.md +26 -0
- package/dist/node_modules/fs-constants/browser.js +1 -0
- package/dist/node_modules/fs-constants/index.js +1 -0
- package/dist/node_modules/fs-constants/package.json +19 -0
- package/dist/node_modules/github-from-package/.travis.yml +4 -0
- package/dist/node_modules/github-from-package/LICENSE +18 -0
- package/dist/node_modules/github-from-package/example/package.json +8 -0
- package/dist/node_modules/github-from-package/example/url.js +3 -0
- package/dist/node_modules/github-from-package/index.js +17 -0
- package/dist/node_modules/github-from-package/package.json +30 -0
- package/dist/node_modules/github-from-package/readme.markdown +53 -0
- package/dist/node_modules/github-from-package/test/a.json +8 -0
- package/dist/node_modules/github-from-package/test/b.json +5 -0
- package/dist/node_modules/github-from-package/test/c.json +5 -0
- package/dist/node_modules/github-from-package/test/d.json +7 -0
- package/dist/node_modules/github-from-package/test/e.json +5 -0
- package/dist/node_modules/github-from-package/test/url.js +19 -0
- package/dist/node_modules/ieee754/LICENSE +11 -0
- package/dist/node_modules/ieee754/README.md +51 -0
- package/dist/node_modules/ieee754/index.d.ts +10 -0
- package/dist/node_modules/ieee754/index.js +85 -0
- package/dist/node_modules/ieee754/package.json +52 -0
- package/dist/node_modules/inherits/LICENSE +16 -0
- package/dist/node_modules/inherits/README.md +42 -0
- package/dist/node_modules/inherits/inherits.js +9 -0
- package/dist/node_modules/inherits/inherits_browser.js +27 -0
- package/dist/node_modules/inherits/package.json +29 -0
- package/dist/node_modules/ini/LICENSE +15 -0
- package/dist/node_modules/ini/README.md +102 -0
- package/dist/node_modules/ini/ini.js +206 -0
- package/dist/node_modules/ini/package.json +33 -0
- package/dist/node_modules/is-arrayish/LICENSE +21 -0
- package/dist/node_modules/is-arrayish/README.md +16 -0
- package/dist/node_modules/is-arrayish/index.js +9 -0
- package/dist/node_modules/is-arrayish/package.json +45 -0
- package/dist/node_modules/is-arrayish/yarn-error.log +1443 -0
- package/dist/node_modules/lru-cache/LICENSE +15 -0
- package/dist/node_modules/lru-cache/README.md +166 -0
- package/dist/node_modules/lru-cache/index.js +334 -0
- package/dist/node_modules/lru-cache/package.json +34 -0
- package/dist/node_modules/mimic-response/index.d.ts +17 -0
- package/dist/node_modules/mimic-response/index.js +77 -0
- package/dist/node_modules/mimic-response/license +9 -0
- package/dist/node_modules/mimic-response/package.json +42 -0
- package/dist/node_modules/mimic-response/readme.md +78 -0
- package/dist/node_modules/minimist/.travis.yml +8 -0
- package/dist/node_modules/minimist/LICENSE +18 -0
- package/dist/node_modules/minimist/example/parse.js +2 -0
- package/dist/node_modules/minimist/index.js +249 -0
- package/dist/node_modules/minimist/package.json +45 -0
- package/dist/node_modules/minimist/readme.markdown +98 -0
- package/dist/node_modules/minimist/test/all_bool.js +32 -0
- package/dist/node_modules/minimist/test/bool.js +178 -0
- package/dist/node_modules/minimist/test/dash.js +31 -0
- package/dist/node_modules/minimist/test/default_bool.js +35 -0
- package/dist/node_modules/minimist/test/dotted.js +22 -0
- package/dist/node_modules/minimist/test/kv_short.js +16 -0
- package/dist/node_modules/minimist/test/long.js +31 -0
- package/dist/node_modules/minimist/test/num.js +36 -0
- package/dist/node_modules/minimist/test/parse.js +197 -0
- package/dist/node_modules/minimist/test/parse_modified.js +9 -0
- package/dist/node_modules/minimist/test/proto.js +60 -0
- package/dist/node_modules/minimist/test/short.js +67 -0
- package/dist/node_modules/minimist/test/stop_early.js +15 -0
- package/dist/node_modules/minimist/test/unknown.js +102 -0
- package/dist/node_modules/minimist/test/whitespace.js +8 -0
- package/dist/node_modules/mkdirp-classic/LICENSE +21 -0
- package/dist/node_modules/mkdirp-classic/README.md +18 -0
- package/dist/node_modules/mkdirp-classic/index.js +98 -0
- package/dist/node_modules/mkdirp-classic/package.json +18 -0
- package/dist/node_modules/napi-build-utils/LICENSE +21 -0
- package/dist/node_modules/napi-build-utils/README.md +48 -0
- package/dist/node_modules/napi-build-utils/index.js +213 -0
- package/dist/node_modules/napi-build-utils/index.md +81 -0
- package/dist/node_modules/napi-build-utils/package.json +41 -0
- package/dist/node_modules/node-abi/.circleci/config.yml +63 -0
- package/dist/node_modules/node-abi/.github/workflows/update-abi.yml +41 -0
- package/dist/node_modules/node-abi/.releaserc.json +9 -0
- package/dist/node_modules/node-abi/CODE_OF_CONDUCT.md +73 -0
- package/dist/node_modules/node-abi/CONTRIBUTING.md +62 -0
- package/dist/node_modules/node-abi/LICENSE +21 -0
- package/dist/node_modules/node-abi/README.md +50 -0
- package/dist/node_modules/node-abi/abi_registry.json +210 -0
- package/dist/node_modules/node-abi/index.js +179 -0
- package/dist/node_modules/node-abi/package.json +39 -0
- package/dist/node_modules/node-abi/scripts/update-abi-registry.js +119 -0
- package/dist/node_modules/node-abi/test/index.js +166 -0
- package/dist/node_modules/node-addon-api/LICENSE.md +13 -0
- package/dist/node_modules/node-addon-api/README.md +293 -0
- package/dist/node_modules/node-addon-api/common.gypi +21 -0
- package/dist/node_modules/node-addon-api/except.gypi +25 -0
- package/dist/node_modules/node-addon-api/index.js +11 -0
- package/dist/node_modules/node-addon-api/napi-inl.deprecated.h +192 -0
- package/dist/node_modules/node-addon-api/napi-inl.h +6259 -0
- package/dist/node_modules/node-addon-api/napi.h +3003 -0
- package/dist/node_modules/node-addon-api/node_api.gyp +9 -0
- package/dist/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/dist/node_modules/node-addon-api/nothing.c +0 -0
- package/dist/node_modules/node-addon-api/package-support.json +21 -0
- package/dist/node_modules/node-addon-api/package.json +415 -0
- package/dist/node_modules/node-addon-api/tools/README.md +73 -0
- package/dist/node_modules/node-addon-api/tools/check-napi.js +100 -0
- package/dist/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/dist/node_modules/node-addon-api/tools/conversion.js +309 -0
- package/dist/node_modules/node-addon-api/tools/eslint-format.js +71 -0
- package/dist/node_modules/once/LICENSE +15 -0
- package/dist/node_modules/once/README.md +79 -0
- package/dist/node_modules/once/once.js +42 -0
- package/dist/node_modules/once/package.json +33 -0
- package/dist/node_modules/prebuild-install/CHANGELOG.md +116 -0
- package/dist/node_modules/prebuild-install/CONTRIBUTING.md +6 -0
- package/dist/node_modules/prebuild-install/LICENSE +21 -0
- package/dist/node_modules/prebuild-install/README.md +163 -0
- package/dist/node_modules/prebuild-install/asset.js +44 -0
- package/dist/node_modules/prebuild-install/bin.js +78 -0
- package/dist/node_modules/prebuild-install/download.js +142 -0
- package/dist/node_modules/prebuild-install/error.js +14 -0
- package/dist/node_modules/prebuild-install/help.txt +16 -0
- package/dist/node_modules/prebuild-install/index.js +1 -0
- package/dist/node_modules/prebuild-install/log.js +33 -0
- package/dist/node_modules/prebuild-install/package.json +67 -0
- package/dist/node_modules/prebuild-install/proxy.js +35 -0
- package/dist/node_modules/prebuild-install/rc.js +64 -0
- package/dist/node_modules/prebuild-install/util.js +143 -0
- package/dist/node_modules/pump/.travis.yml +5 -0
- package/dist/node_modules/pump/LICENSE +21 -0
- package/dist/node_modules/pump/README.md +65 -0
- package/dist/node_modules/pump/index.js +82 -0
- package/dist/node_modules/pump/package.json +24 -0
- package/dist/node_modules/pump/test-browser.js +66 -0
- package/dist/node_modules/pump/test-node.js +53 -0
- package/dist/node_modules/rc/LICENSE.APACHE2 +15 -0
- package/dist/node_modules/rc/LICENSE.BSD +26 -0
- package/dist/node_modules/rc/LICENSE.MIT +24 -0
- package/dist/node_modules/rc/README.md +227 -0
- package/dist/node_modules/rc/browser.js +7 -0
- package/dist/node_modules/rc/cli.js +4 -0
- package/dist/node_modules/rc/index.js +53 -0
- package/dist/node_modules/rc/lib/utils.js +104 -0
- package/dist/node_modules/rc/package.json +29 -0
- package/dist/node_modules/rc/test/ini.js +16 -0
- package/dist/node_modules/rc/test/nested-env-vars.js +50 -0
- package/dist/node_modules/rc/test/test.js +59 -0
- package/dist/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/dist/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/dist/node_modules/readable-stream/LICENSE +47 -0
- package/dist/node_modules/readable-stream/README.md +106 -0
- package/dist/node_modules/readable-stream/errors-browser.js +127 -0
- package/dist/node_modules/readable-stream/errors.js +116 -0
- package/dist/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/dist/node_modules/readable-stream/lib/_stream_duplex.js +139 -0
- package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +39 -0
- package/dist/node_modules/readable-stream/lib/_stream_readable.js +1124 -0
- package/dist/node_modules/readable-stream/lib/_stream_transform.js +201 -0
- package/dist/node_modules/readable-stream/lib/_stream_writable.js +697 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +207 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +210 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +105 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +104 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/from.js +64 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +97 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/state.js +27 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/dist/node_modules/readable-stream/package.json +68 -0
- package/dist/node_modules/readable-stream/readable-browser.js +9 -0
- package/dist/node_modules/readable-stream/readable.js +16 -0
- package/dist/node_modules/safe-buffer/LICENSE +21 -0
- package/dist/node_modules/safe-buffer/README.md +584 -0
- package/dist/node_modules/safe-buffer/index.d.ts +187 -0
- package/dist/node_modules/safe-buffer/index.js +65 -0
- package/dist/node_modules/safe-buffer/package.json +51 -0
- package/dist/node_modules/semver/LICENSE +15 -0
- package/dist/node_modules/semver/README.md +568 -0
- package/dist/node_modules/semver/bin/semver.js +183 -0
- package/dist/node_modules/semver/classes/comparator.js +136 -0
- package/dist/node_modules/semver/classes/index.js +5 -0
- package/dist/node_modules/semver/classes/range.js +519 -0
- package/dist/node_modules/semver/classes/semver.js +287 -0
- package/dist/node_modules/semver/functions/clean.js +6 -0
- package/dist/node_modules/semver/functions/cmp.js +52 -0
- package/dist/node_modules/semver/functions/coerce.js +52 -0
- package/dist/node_modules/semver/functions/compare-build.js +7 -0
- package/dist/node_modules/semver/functions/compare-loose.js +3 -0
- package/dist/node_modules/semver/functions/compare.js +5 -0
- package/dist/node_modules/semver/functions/diff.js +23 -0
- package/dist/node_modules/semver/functions/eq.js +3 -0
- package/dist/node_modules/semver/functions/gt.js +3 -0
- package/dist/node_modules/semver/functions/gte.js +3 -0
- package/dist/node_modules/semver/functions/inc.js +18 -0
- package/dist/node_modules/semver/functions/lt.js +3 -0
- package/dist/node_modules/semver/functions/lte.js +3 -0
- package/dist/node_modules/semver/functions/major.js +3 -0
- package/dist/node_modules/semver/functions/minor.js +3 -0
- package/dist/node_modules/semver/functions/neq.js +3 -0
- package/dist/node_modules/semver/functions/parse.js +33 -0
- package/dist/node_modules/semver/functions/patch.js +3 -0
- package/dist/node_modules/semver/functions/prerelease.js +6 -0
- package/dist/node_modules/semver/functions/rcompare.js +3 -0
- package/dist/node_modules/semver/functions/rsort.js +3 -0
- package/dist/node_modules/semver/functions/satisfies.js +10 -0
- package/dist/node_modules/semver/functions/sort.js +3 -0
- package/dist/node_modules/semver/functions/valid.js +6 -0
- package/dist/node_modules/semver/index.js +48 -0
- package/dist/node_modules/semver/internal/constants.js +17 -0
- package/dist/node_modules/semver/internal/debug.js +9 -0
- package/dist/node_modules/semver/internal/identifiers.js +23 -0
- package/dist/node_modules/semver/internal/parse-options.js +11 -0
- package/dist/node_modules/semver/internal/re.js +182 -0
- package/dist/node_modules/semver/package.json +75 -0
- package/dist/node_modules/semver/preload.js +2 -0
- package/dist/node_modules/semver/range.bnf +16 -0
- package/dist/node_modules/semver/ranges/gtr.js +4 -0
- package/dist/node_modules/semver/ranges/intersects.js +7 -0
- package/dist/node_modules/semver/ranges/ltr.js +4 -0
- package/dist/node_modules/semver/ranges/max-satisfying.js +25 -0
- package/dist/node_modules/semver/ranges/min-satisfying.js +24 -0
- package/dist/node_modules/semver/ranges/min-version.js +61 -0
- package/dist/node_modules/semver/ranges/outside.js +80 -0
- package/dist/node_modules/semver/ranges/simplify.js +47 -0
- package/dist/node_modules/semver/ranges/subset.js +244 -0
- package/dist/node_modules/semver/ranges/to-comparators.js +8 -0
- package/dist/node_modules/semver/ranges/valid.js +11 -0
- package/dist/node_modules/sharp/LICENSE +191 -0
- package/dist/node_modules/sharp/README.md +117 -0
- package/dist/node_modules/sharp/binding.gyp +233 -0
- package/dist/node_modules/sharp/build/Release/sharp-linux-x64.node +0 -0
- package/dist/node_modules/sharp/install/can-compile.js +11 -0
- package/dist/node_modules/sharp/install/dll-copy.js +37 -0
- package/dist/node_modules/sharp/install/libvips.js +215 -0
- package/dist/node_modules/sharp/lib/agent.js +40 -0
- package/dist/node_modules/sharp/lib/channel.js +171 -0
- package/dist/node_modules/sharp/lib/colour.js +180 -0
- package/dist/node_modules/sharp/lib/composite.js +193 -0
- package/dist/node_modules/sharp/lib/constructor.js +386 -0
- package/dist/node_modules/sharp/lib/index.js +13 -0
- package/dist/node_modules/sharp/lib/input.js +507 -0
- package/dist/node_modules/sharp/lib/is.js +143 -0
- package/dist/node_modules/sharp/lib/libvips.js +136 -0
- package/dist/node_modules/sharp/lib/operation.js +803 -0
- package/dist/node_modules/sharp/lib/output.js +1231 -0
- package/dist/node_modules/sharp/lib/platform.js +27 -0
- package/dist/node_modules/sharp/lib/resize.js +473 -0
- package/dist/node_modules/sharp/lib/sharp.js +35 -0
- package/dist/node_modules/sharp/lib/utility.js +211 -0
- package/dist/node_modules/sharp/package.json +196 -0
- package/dist/node_modules/sharp/src/common.cc +966 -0
- package/dist/node_modules/sharp/src/common.h +352 -0
- package/dist/node_modules/sharp/src/libvips/cplusplus/VConnection.cpp +152 -0
- package/dist/node_modules/sharp/src/libvips/cplusplus/VError.cpp +50 -0
- package/dist/node_modules/sharp/src/libvips/cplusplus/VImage.cpp +1523 -0
- package/dist/node_modules/sharp/src/libvips/cplusplus/VInterpolate.cpp +63 -0
- package/dist/node_modules/sharp/src/libvips/cplusplus/vips-operators.cpp +3738 -0
- package/dist/node_modules/sharp/src/metadata.cc +291 -0
- package/dist/node_modules/sharp/src/metadata.h +92 -0
- package/dist/node_modules/sharp/src/operations.cc +412 -0
- package/dist/node_modules/sharp/src/operations.h +126 -0
- package/dist/node_modules/sharp/src/pipeline.cc +1624 -0
- package/dist/node_modules/sharp/src/pipeline.h +349 -0
- package/dist/node_modules/sharp/src/sharp.cc +52 -0
- package/dist/node_modules/sharp/src/stats.cc +193 -0
- package/dist/node_modules/sharp/src/stats.h +70 -0
- package/dist/node_modules/sharp/src/utilities.cc +243 -0
- package/dist/node_modules/sharp/src/utilities.h +29 -0
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/THIRD-PARTY-NOTICES.md +43 -0
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/lib/libvips-cpp.so.42 +0 -0
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/platform.json +1 -0
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/versions.json +31 -0
- package/dist/node_modules/simple-concat/.travis.yml +3 -0
- package/dist/node_modules/simple-concat/LICENSE +20 -0
- package/dist/node_modules/simple-concat/README.md +44 -0
- package/dist/node_modules/simple-concat/index.js +15 -0
- package/dist/node_modules/simple-concat/package.json +47 -0
- package/dist/node_modules/simple-concat/test/basic.js +41 -0
- package/dist/node_modules/simple-get/.github/dependabot.yml +15 -0
- package/dist/node_modules/simple-get/.github/workflows/ci.yml +23 -0
- package/dist/node_modules/simple-get/LICENSE +20 -0
- package/dist/node_modules/simple-get/README.md +333 -0
- package/dist/node_modules/simple-get/index.js +108 -0
- package/dist/node_modules/simple-get/package.json +67 -0
- package/dist/node_modules/simple-swizzle/LICENSE +21 -0
- package/dist/node_modules/simple-swizzle/README.md +39 -0
- package/dist/node_modules/simple-swizzle/index.js +29 -0
- package/dist/node_modules/simple-swizzle/package.json +36 -0
- package/dist/node_modules/string_decoder/LICENSE +48 -0
- package/dist/node_modules/string_decoder/README.md +47 -0
- package/dist/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/dist/node_modules/string_decoder/package.json +34 -0
- package/dist/node_modules/strip-json-comments/index.js +70 -0
- package/dist/node_modules/strip-json-comments/license +21 -0
- package/dist/node_modules/strip-json-comments/package.json +42 -0
- package/dist/node_modules/strip-json-comments/readme.md +64 -0
- package/dist/node_modules/tar-fs/.travis.yml +6 -0
- package/dist/node_modules/tar-fs/LICENSE +21 -0
- package/dist/node_modules/tar-fs/README.md +165 -0
- package/dist/node_modules/tar-fs/index.js +351 -0
- package/dist/node_modules/tar-fs/package.json +41 -0
- package/dist/node_modules/tar-fs/test/fixtures/a/hello.txt +1 -0
- package/dist/node_modules/tar-fs/test/fixtures/b/a/test.txt +1 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/dist/node_modules/tar-fs/test/index.js +346 -0
- package/dist/node_modules/tar-stream/LICENSE +21 -0
- package/dist/node_modules/tar-stream/README.md +168 -0
- package/dist/node_modules/tar-stream/extract.js +257 -0
- package/dist/node_modules/tar-stream/headers.js +295 -0
- package/dist/node_modules/tar-stream/index.js +2 -0
- package/dist/node_modules/tar-stream/pack.js +255 -0
- package/dist/node_modules/tar-stream/package.json +58 -0
- package/dist/node_modules/tar-stream/sandbox.js +11 -0
- package/dist/node_modules/tunnel-agent/LICENSE +55 -0
- package/dist/node_modules/tunnel-agent/README.md +4 -0
- package/dist/node_modules/tunnel-agent/index.js +244 -0
- package/dist/node_modules/tunnel-agent/package.json +22 -0
- package/dist/node_modules/util-deprecate/History.md +16 -0
- package/dist/node_modules/util-deprecate/LICENSE +24 -0
- package/dist/node_modules/util-deprecate/README.md +53 -0
- package/dist/node_modules/util-deprecate/browser.js +67 -0
- package/dist/node_modules/util-deprecate/node.js +6 -0
- package/dist/node_modules/util-deprecate/package.json +27 -0
- package/dist/node_modules/wrappy/LICENSE +15 -0
- package/dist/node_modules/wrappy/README.md +36 -0
- package/dist/node_modules/wrappy/package.json +29 -0
- package/dist/node_modules/wrappy/wrappy.js +33 -0
- package/dist/node_modules/yallist/LICENSE +15 -0
- package/dist/node_modules/yallist/README.md +204 -0
- package/dist/node_modules/yallist/iterator.js +8 -0
- package/dist/node_modules/yallist/package.json +29 -0
- package/dist/node_modules/yallist/yallist.js +426 -0
- package/dist/package-lock.json +830 -0
- package/dist/package.json +39 -0
- package/dist/static/expected_tile_2193_153_255_z7.png +0 -0
- package/dist/static/expected_tile_NZTM2000Quad_30_33_z6.png +0 -0
- package/dist/static/expected_tile_WebMercatorQuad_252_156_z8.png +0 -0
- package/package.json +9 -9
- package/scripts/create.deployment.package.mjs +1 -1
- package/src/__tests__/xyz.util.ts +0 -1
- package/src/index.ts +7 -0
- package/src/routes/__tests__/attribution.test.ts +0 -1
- package/src/routes/__tests__/fonts.test.ts +71 -0
- package/src/routes/__tests__/memory.fs.ts +77 -0
- package/src/routes/__tests__/sprites.test.ts +64 -0
- package/src/routes/fonts.ts +54 -0
- package/src/routes/sprites.ts +49 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
// Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Lovell Fuller and contributors.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
#include <numeric>
|
|
16
|
+
#include <vector>
|
|
17
|
+
|
|
18
|
+
#include <napi.h>
|
|
19
|
+
#include <vips/vips8>
|
|
20
|
+
|
|
21
|
+
#include "common.h"
|
|
22
|
+
#include "metadata.h"
|
|
23
|
+
|
|
24
|
+
class MetadataWorker : public Napi::AsyncWorker {
|
|
25
|
+
public:
|
|
26
|
+
MetadataWorker(Napi::Function callback, MetadataBaton *baton, Napi::Function debuglog) :
|
|
27
|
+
Napi::AsyncWorker(callback), baton(baton), debuglog(Napi::Persistent(debuglog)) {}
|
|
28
|
+
~MetadataWorker() {}
|
|
29
|
+
|
|
30
|
+
void Execute() {
|
|
31
|
+
// Decrement queued task counter
|
|
32
|
+
g_atomic_int_dec_and_test(&sharp::counterQueue);
|
|
33
|
+
|
|
34
|
+
vips::VImage image;
|
|
35
|
+
sharp::ImageType imageType = sharp::ImageType::UNKNOWN;
|
|
36
|
+
try {
|
|
37
|
+
std::tie(image, imageType) = OpenInput(baton->input);
|
|
38
|
+
} catch (vips::VError const &err) {
|
|
39
|
+
(baton->err).append(err.what());
|
|
40
|
+
}
|
|
41
|
+
if (imageType != sharp::ImageType::UNKNOWN) {
|
|
42
|
+
// Image type
|
|
43
|
+
baton->format = sharp::ImageTypeId(imageType);
|
|
44
|
+
// VipsImage attributes
|
|
45
|
+
baton->width = image.width();
|
|
46
|
+
baton->height = image.height();
|
|
47
|
+
baton->space = vips_enum_nick(VIPS_TYPE_INTERPRETATION, image.interpretation());
|
|
48
|
+
baton->channels = image.bands();
|
|
49
|
+
baton->depth = vips_enum_nick(VIPS_TYPE_BAND_FORMAT, image.format());
|
|
50
|
+
if (sharp::HasDensity(image)) {
|
|
51
|
+
baton->density = sharp::GetDensity(image);
|
|
52
|
+
}
|
|
53
|
+
if (image.get_typeof("jpeg-chroma-subsample") == VIPS_TYPE_REF_STRING) {
|
|
54
|
+
baton->chromaSubsampling = image.get_string("jpeg-chroma-subsample");
|
|
55
|
+
}
|
|
56
|
+
if (image.get_typeof("interlaced") == G_TYPE_INT) {
|
|
57
|
+
baton->isProgressive = image.get_int("interlaced") == 1;
|
|
58
|
+
}
|
|
59
|
+
if (image.get_typeof("palette-bit-depth") == G_TYPE_INT) {
|
|
60
|
+
baton->paletteBitDepth = image.get_int("palette-bit-depth");
|
|
61
|
+
}
|
|
62
|
+
if (image.get_typeof(VIPS_META_N_PAGES) == G_TYPE_INT) {
|
|
63
|
+
baton->pages = image.get_int(VIPS_META_N_PAGES);
|
|
64
|
+
}
|
|
65
|
+
if (image.get_typeof(VIPS_META_PAGE_HEIGHT) == G_TYPE_INT) {
|
|
66
|
+
baton->pageHeight = image.get_int(VIPS_META_PAGE_HEIGHT);
|
|
67
|
+
}
|
|
68
|
+
if (image.get_typeof("loop") == G_TYPE_INT) {
|
|
69
|
+
baton->loop = image.get_int("loop");
|
|
70
|
+
}
|
|
71
|
+
if (image.get_typeof("delay") == VIPS_TYPE_ARRAY_INT) {
|
|
72
|
+
baton->delay = image.get_array_int("delay");
|
|
73
|
+
}
|
|
74
|
+
if (image.get_typeof("heif-primary") == G_TYPE_INT) {
|
|
75
|
+
baton->pagePrimary = image.get_int("heif-primary");
|
|
76
|
+
}
|
|
77
|
+
if (image.get_typeof("heif-compression") == VIPS_TYPE_REF_STRING) {
|
|
78
|
+
baton->compression = image.get_string("heif-compression");
|
|
79
|
+
}
|
|
80
|
+
if (image.get_typeof(VIPS_META_RESOLUTION_UNIT) == VIPS_TYPE_REF_STRING) {
|
|
81
|
+
baton->resolutionUnit = image.get_string(VIPS_META_RESOLUTION_UNIT);
|
|
82
|
+
}
|
|
83
|
+
if (image.get_typeof("openslide.level-count") == VIPS_TYPE_REF_STRING) {
|
|
84
|
+
int const levels = std::stoi(image.get_string("openslide.level-count"));
|
|
85
|
+
for (int l = 0; l < levels; l++) {
|
|
86
|
+
std::string prefix = "openslide.level[" + std::to_string(l) + "].";
|
|
87
|
+
int const width = std::stoi(image.get_string((prefix + "width").data()));
|
|
88
|
+
int const height = std::stoi(image.get_string((prefix + "height").data()));
|
|
89
|
+
baton->levels.push_back(std::pair<int, int>(width, height));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (image.get_typeof(VIPS_META_N_SUBIFDS) == G_TYPE_INT) {
|
|
93
|
+
baton->subifds = image.get_int(VIPS_META_N_SUBIFDS);
|
|
94
|
+
}
|
|
95
|
+
baton->hasProfile = sharp::HasProfile(image);
|
|
96
|
+
if (image.get_typeof("background") == VIPS_TYPE_ARRAY_DOUBLE) {
|
|
97
|
+
baton->background = image.get_array_double("background");
|
|
98
|
+
}
|
|
99
|
+
// Derived attributes
|
|
100
|
+
baton->hasAlpha = sharp::HasAlpha(image);
|
|
101
|
+
baton->orientation = sharp::ExifOrientation(image);
|
|
102
|
+
// EXIF
|
|
103
|
+
if (image.get_typeof(VIPS_META_EXIF_NAME) == VIPS_TYPE_BLOB) {
|
|
104
|
+
size_t exifLength;
|
|
105
|
+
void const *exif = image.get_blob(VIPS_META_EXIF_NAME, &exifLength);
|
|
106
|
+
baton->exif = static_cast<char*>(g_malloc(exifLength));
|
|
107
|
+
memcpy(baton->exif, exif, exifLength);
|
|
108
|
+
baton->exifLength = exifLength;
|
|
109
|
+
}
|
|
110
|
+
// ICC profile
|
|
111
|
+
if (image.get_typeof(VIPS_META_ICC_NAME) == VIPS_TYPE_BLOB) {
|
|
112
|
+
size_t iccLength;
|
|
113
|
+
void const *icc = image.get_blob(VIPS_META_ICC_NAME, &iccLength);
|
|
114
|
+
baton->icc = static_cast<char*>(g_malloc(iccLength));
|
|
115
|
+
memcpy(baton->icc, icc, iccLength);
|
|
116
|
+
baton->iccLength = iccLength;
|
|
117
|
+
}
|
|
118
|
+
// IPTC
|
|
119
|
+
if (image.get_typeof(VIPS_META_IPTC_NAME) == VIPS_TYPE_BLOB) {
|
|
120
|
+
size_t iptcLength;
|
|
121
|
+
void const *iptc = image.get_blob(VIPS_META_IPTC_NAME, &iptcLength);
|
|
122
|
+
baton->iptc = static_cast<char *>(g_malloc(iptcLength));
|
|
123
|
+
memcpy(baton->iptc, iptc, iptcLength);
|
|
124
|
+
baton->iptcLength = iptcLength;
|
|
125
|
+
}
|
|
126
|
+
// XMP
|
|
127
|
+
if (image.get_typeof(VIPS_META_XMP_NAME) == VIPS_TYPE_BLOB) {
|
|
128
|
+
size_t xmpLength;
|
|
129
|
+
void const *xmp = image.get_blob(VIPS_META_XMP_NAME, &xmpLength);
|
|
130
|
+
baton->xmp = static_cast<char *>(g_malloc(xmpLength));
|
|
131
|
+
memcpy(baton->xmp, xmp, xmpLength);
|
|
132
|
+
baton->xmpLength = xmpLength;
|
|
133
|
+
}
|
|
134
|
+
// TIFFTAG_PHOTOSHOP
|
|
135
|
+
if (image.get_typeof(VIPS_META_PHOTOSHOP_NAME) == VIPS_TYPE_BLOB) {
|
|
136
|
+
size_t tifftagPhotoshopLength;
|
|
137
|
+
void const *tifftagPhotoshop = image.get_blob(VIPS_META_PHOTOSHOP_NAME, &tifftagPhotoshopLength);
|
|
138
|
+
baton->tifftagPhotoshop = static_cast<char *>(g_malloc(tifftagPhotoshopLength));
|
|
139
|
+
memcpy(baton->tifftagPhotoshop, tifftagPhotoshop, tifftagPhotoshopLength);
|
|
140
|
+
baton->tifftagPhotoshopLength = tifftagPhotoshopLength;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Clean up
|
|
145
|
+
vips_error_clear();
|
|
146
|
+
vips_thread_shutdown();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
void OnOK() {
|
|
150
|
+
Napi::Env env = Env();
|
|
151
|
+
Napi::HandleScope scope(env);
|
|
152
|
+
|
|
153
|
+
// Handle warnings
|
|
154
|
+
std::string warning = sharp::VipsWarningPop();
|
|
155
|
+
while (!warning.empty()) {
|
|
156
|
+
debuglog.Call({ Napi::String::New(env, warning) });
|
|
157
|
+
warning = sharp::VipsWarningPop();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (baton->err.empty()) {
|
|
161
|
+
Napi::Object info = Napi::Object::New(env);
|
|
162
|
+
info.Set("format", baton->format);
|
|
163
|
+
if (baton->input->bufferLength > 0) {
|
|
164
|
+
info.Set("size", baton->input->bufferLength);
|
|
165
|
+
}
|
|
166
|
+
info.Set("width", baton->width);
|
|
167
|
+
info.Set("height", baton->height);
|
|
168
|
+
info.Set("space", baton->space);
|
|
169
|
+
info.Set("channels", baton->channels);
|
|
170
|
+
info.Set("depth", baton->depth);
|
|
171
|
+
if (baton->density > 0) {
|
|
172
|
+
info.Set("density", baton->density);
|
|
173
|
+
}
|
|
174
|
+
if (!baton->chromaSubsampling.empty()) {
|
|
175
|
+
info.Set("chromaSubsampling", baton->chromaSubsampling);
|
|
176
|
+
}
|
|
177
|
+
info.Set("isProgressive", baton->isProgressive);
|
|
178
|
+
if (baton->paletteBitDepth > 0) {
|
|
179
|
+
info.Set("paletteBitDepth", baton->paletteBitDepth);
|
|
180
|
+
}
|
|
181
|
+
if (baton->pages > 0) {
|
|
182
|
+
info.Set("pages", baton->pages);
|
|
183
|
+
}
|
|
184
|
+
if (baton->pageHeight > 0) {
|
|
185
|
+
info.Set("pageHeight", baton->pageHeight);
|
|
186
|
+
}
|
|
187
|
+
if (baton->loop >= 0) {
|
|
188
|
+
info.Set("loop", baton->loop);
|
|
189
|
+
}
|
|
190
|
+
if (!baton->delay.empty()) {
|
|
191
|
+
int i = 0;
|
|
192
|
+
Napi::Array delay = Napi::Array::New(env, static_cast<size_t>(baton->delay.size()));
|
|
193
|
+
for (int const d : baton->delay) {
|
|
194
|
+
delay.Set(i++, d);
|
|
195
|
+
}
|
|
196
|
+
info.Set("delay", delay);
|
|
197
|
+
}
|
|
198
|
+
if (baton->pagePrimary > -1) {
|
|
199
|
+
info.Set("pagePrimary", baton->pagePrimary);
|
|
200
|
+
}
|
|
201
|
+
if (!baton->compression.empty()) {
|
|
202
|
+
info.Set("compression", baton->compression);
|
|
203
|
+
}
|
|
204
|
+
if (!baton->resolutionUnit.empty()) {
|
|
205
|
+
info.Set("resolutionUnit", baton->resolutionUnit == "in" ? "inch" : baton->resolutionUnit);
|
|
206
|
+
}
|
|
207
|
+
if (!baton->levels.empty()) {
|
|
208
|
+
int i = 0;
|
|
209
|
+
Napi::Array levels = Napi::Array::New(env, static_cast<size_t>(baton->levels.size()));
|
|
210
|
+
for (std::pair<int, int> const &l : baton->levels) {
|
|
211
|
+
Napi::Object level = Napi::Object::New(env);
|
|
212
|
+
level.Set("width", l.first);
|
|
213
|
+
level.Set("height", l.second);
|
|
214
|
+
levels.Set(i++, level);
|
|
215
|
+
}
|
|
216
|
+
info.Set("levels", levels);
|
|
217
|
+
}
|
|
218
|
+
if (baton->subifds > 0) {
|
|
219
|
+
info.Set("subifds", baton->subifds);
|
|
220
|
+
}
|
|
221
|
+
if (!baton->background.empty()) {
|
|
222
|
+
if (baton->background.size() == 3) {
|
|
223
|
+
Napi::Object background = Napi::Object::New(env);
|
|
224
|
+
background.Set("r", baton->background[0]);
|
|
225
|
+
background.Set("g", baton->background[1]);
|
|
226
|
+
background.Set("b", baton->background[2]);
|
|
227
|
+
info.Set("background", background);
|
|
228
|
+
} else {
|
|
229
|
+
info.Set("background", baton->background[0]);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
info.Set("hasProfile", baton->hasProfile);
|
|
233
|
+
info.Set("hasAlpha", baton->hasAlpha);
|
|
234
|
+
if (baton->orientation > 0) {
|
|
235
|
+
info.Set("orientation", baton->orientation);
|
|
236
|
+
}
|
|
237
|
+
if (baton->exifLength > 0) {
|
|
238
|
+
info.Set("exif", Napi::Buffer<char>::New(env, baton->exif, baton->exifLength, sharp::FreeCallback));
|
|
239
|
+
}
|
|
240
|
+
if (baton->iccLength > 0) {
|
|
241
|
+
info.Set("icc", Napi::Buffer<char>::New(env, baton->icc, baton->iccLength, sharp::FreeCallback));
|
|
242
|
+
}
|
|
243
|
+
if (baton->iptcLength > 0) {
|
|
244
|
+
info.Set("iptc", Napi::Buffer<char>::New(env, baton->iptc, baton->iptcLength, sharp::FreeCallback));
|
|
245
|
+
}
|
|
246
|
+
if (baton->xmpLength > 0) {
|
|
247
|
+
info.Set("xmp", Napi::Buffer<char>::New(env, baton->xmp, baton->xmpLength, sharp::FreeCallback));
|
|
248
|
+
}
|
|
249
|
+
if (baton->tifftagPhotoshopLength > 0) {
|
|
250
|
+
info.Set("tifftagPhotoshop",
|
|
251
|
+
Napi::Buffer<char>::New(env, baton->tifftagPhotoshop, baton->tifftagPhotoshopLength, sharp::FreeCallback));
|
|
252
|
+
}
|
|
253
|
+
Callback().MakeCallback(Receiver().Value(), { env.Null(), info });
|
|
254
|
+
} else {
|
|
255
|
+
Callback().MakeCallback(Receiver().Value(), { Napi::Error::New(env, baton->err).Value() });
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
delete baton->input;
|
|
259
|
+
delete baton;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
private:
|
|
263
|
+
MetadataBaton* baton;
|
|
264
|
+
Napi::FunctionReference debuglog;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/*
|
|
268
|
+
metadata(options, callback)
|
|
269
|
+
*/
|
|
270
|
+
Napi::Value metadata(const Napi::CallbackInfo& info) {
|
|
271
|
+
// V8 objects are converted to non-V8 types held in the baton struct
|
|
272
|
+
MetadataBaton *baton = new MetadataBaton;
|
|
273
|
+
Napi::Object options = info[0].As<Napi::Object>();
|
|
274
|
+
|
|
275
|
+
// Input
|
|
276
|
+
baton->input = sharp::CreateInputDescriptor(options.Get("input").As<Napi::Object>());
|
|
277
|
+
|
|
278
|
+
// Function to notify of libvips warnings
|
|
279
|
+
Napi::Function debuglog = options.Get("debuglog").As<Napi::Function>();
|
|
280
|
+
|
|
281
|
+
// Join queue for worker thread
|
|
282
|
+
Napi::Function callback = info[1].As<Napi::Function>();
|
|
283
|
+
MetadataWorker *worker = new MetadataWorker(callback, baton, debuglog);
|
|
284
|
+
worker->Receiver().Set("options", options);
|
|
285
|
+
worker->Queue();
|
|
286
|
+
|
|
287
|
+
// Increment queued task counter
|
|
288
|
+
g_atomic_int_inc(&sharp::counterQueue);
|
|
289
|
+
|
|
290
|
+
return info.Env().Undefined();
|
|
291
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Lovell Fuller and contributors.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
#ifndef SRC_METADATA_H_
|
|
16
|
+
#define SRC_METADATA_H_
|
|
17
|
+
|
|
18
|
+
#include <string>
|
|
19
|
+
#include <napi.h>
|
|
20
|
+
|
|
21
|
+
#include "./common.h"
|
|
22
|
+
|
|
23
|
+
struct MetadataBaton {
|
|
24
|
+
// Input
|
|
25
|
+
sharp::InputDescriptor *input;
|
|
26
|
+
// Output
|
|
27
|
+
std::string format;
|
|
28
|
+
int width;
|
|
29
|
+
int height;
|
|
30
|
+
std::string space;
|
|
31
|
+
int channels;
|
|
32
|
+
std::string depth;
|
|
33
|
+
int density;
|
|
34
|
+
std::string chromaSubsampling;
|
|
35
|
+
bool isProgressive;
|
|
36
|
+
int paletteBitDepth;
|
|
37
|
+
int pages;
|
|
38
|
+
int pageHeight;
|
|
39
|
+
int loop;
|
|
40
|
+
std::vector<int> delay;
|
|
41
|
+
int pagePrimary;
|
|
42
|
+
std::string compression;
|
|
43
|
+
std::string resolutionUnit;
|
|
44
|
+
std::vector<std::pair<int, int>> levels;
|
|
45
|
+
int subifds;
|
|
46
|
+
std::vector<double> background;
|
|
47
|
+
bool hasProfile;
|
|
48
|
+
bool hasAlpha;
|
|
49
|
+
int orientation;
|
|
50
|
+
char *exif;
|
|
51
|
+
size_t exifLength;
|
|
52
|
+
char *icc;
|
|
53
|
+
size_t iccLength;
|
|
54
|
+
char *iptc;
|
|
55
|
+
size_t iptcLength;
|
|
56
|
+
char *xmp;
|
|
57
|
+
size_t xmpLength;
|
|
58
|
+
char *tifftagPhotoshop;
|
|
59
|
+
size_t tifftagPhotoshopLength;
|
|
60
|
+
std::string err;
|
|
61
|
+
|
|
62
|
+
MetadataBaton():
|
|
63
|
+
input(nullptr),
|
|
64
|
+
width(0),
|
|
65
|
+
height(0),
|
|
66
|
+
channels(0),
|
|
67
|
+
density(0),
|
|
68
|
+
isProgressive(false),
|
|
69
|
+
paletteBitDepth(0),
|
|
70
|
+
pages(0),
|
|
71
|
+
pageHeight(0),
|
|
72
|
+
loop(-1),
|
|
73
|
+
pagePrimary(-1),
|
|
74
|
+
subifds(0),
|
|
75
|
+
hasProfile(false),
|
|
76
|
+
hasAlpha(false),
|
|
77
|
+
orientation(0),
|
|
78
|
+
exif(nullptr),
|
|
79
|
+
exifLength(0),
|
|
80
|
+
icc(nullptr),
|
|
81
|
+
iccLength(0),
|
|
82
|
+
iptc(nullptr),
|
|
83
|
+
iptcLength(0),
|
|
84
|
+
xmp(nullptr),
|
|
85
|
+
xmpLength(0),
|
|
86
|
+
tifftagPhotoshop(nullptr),
|
|
87
|
+
tifftagPhotoshopLength(0) {}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
Napi::Value metadata(const Napi::CallbackInfo& info);
|
|
91
|
+
|
|
92
|
+
#endif // SRC_METADATA_H_
|