@basemaps/lambda-tiler 6.39.0 → 6.41.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.
Files changed (140) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/build/__tests__/config.data.d.ts.map +1 -1
  3. package/build/__tests__/config.data.js +142 -1
  4. package/build/__tests__/config.data.js.map +1 -1
  5. package/build/__tests__/wmts.capability.test.js +105 -79
  6. package/build/__tests__/wmts.capability.test.js.map +1 -1
  7. package/build/__tests__/xyz.util.d.ts.map +1 -1
  8. package/build/__tests__/xyz.util.js +6 -2
  9. package/build/__tests__/xyz.util.js.map +1 -1
  10. package/build/cli/render.tile.d.ts +2 -0
  11. package/build/cli/render.tile.d.ts.map +1 -0
  12. package/build/cli/render.tile.js +36 -0
  13. package/build/cli/render.tile.js.map +1 -0
  14. package/build/routes/__tests__/attribution.test.js +62 -2
  15. package/build/routes/__tests__/attribution.test.js.map +1 -1
  16. package/build/routes/__tests__/wmts.test.js +50 -8
  17. package/build/routes/__tests__/wmts.test.js.map +1 -1
  18. package/build/routes/attribution.d.ts +11 -0
  19. package/build/routes/attribution.d.ts.map +1 -1
  20. package/build/routes/attribution.js +32 -28
  21. package/build/routes/attribution.js.map +1 -1
  22. package/build/routes/tile.json.d.ts.map +1 -1
  23. package/build/routes/tile.json.js +2 -1
  24. package/build/routes/tile.json.js.map +1 -1
  25. package/build/routes/tile.style.json.d.ts.map +1 -1
  26. package/build/routes/tile.style.json.js +2 -1
  27. package/build/routes/tile.style.json.js.map +1 -1
  28. package/build/routes/tile.wmts.d.ts.map +1 -1
  29. package/build/routes/tile.wmts.js +12 -7
  30. package/build/routes/tile.wmts.js.map +1 -1
  31. package/build/routes/tile.xyz.raster.d.ts.map +1 -1
  32. package/build/routes/tile.xyz.raster.js +5 -1
  33. package/build/routes/tile.xyz.raster.js.map +1 -1
  34. package/build/util/__test__/filter.test.d.ts +2 -0
  35. package/build/util/__test__/filter.test.d.ts.map +1 -0
  36. package/build/util/__test__/filter.test.js +64 -0
  37. package/build/util/__test__/filter.test.js.map +1 -0
  38. package/build/util/config.loader.d.ts.map +1 -1
  39. package/build/util/config.loader.js +2 -3
  40. package/build/util/config.loader.js.map +1 -1
  41. package/build/util/filter.d.ts +15 -0
  42. package/build/util/filter.d.ts.map +1 -0
  43. package/build/util/filter.js +59 -0
  44. package/build/util/filter.js.map +1 -0
  45. package/build/util/validate.d.ts.map +1 -1
  46. package/build/util/validate.js +4 -3
  47. package/build/util/validate.js.map +1 -1
  48. package/build/wmts.capability.d.ts +61 -28
  49. package/build/wmts.capability.d.ts.map +1 -1
  50. package/build/wmts.capability.js +175 -99
  51. package/build/wmts.capability.js.map +1 -1
  52. package/dist/index.js +110 -82
  53. package/dist/node_modules/.package-lock.json +17 -17
  54. package/dist/node_modules/detect-libc/README.md +4 -1
  55. package/dist/node_modules/detect-libc/index.d.ts +3 -0
  56. package/dist/node_modules/detect-libc/lib/detect-libc.js +105 -4
  57. package/dist/node_modules/detect-libc/lib/filesystem.js +41 -0
  58. package/dist/node_modules/detect-libc/lib/process.js +3 -0
  59. package/dist/node_modules/detect-libc/package.json +7 -3
  60. package/dist/node_modules/minimist/.eslintrc +25 -50
  61. package/dist/node_modules/minimist/CHANGELOG.md +87 -1
  62. package/dist/node_modules/minimist/README.md +14 -10
  63. package/dist/node_modules/minimist/example/parse.js +2 -0
  64. package/dist/node_modules/minimist/index.js +256 -242
  65. package/dist/node_modules/minimist/package.json +73 -73
  66. package/dist/node_modules/minimist/test/all_bool.js +26 -24
  67. package/dist/node_modules/minimist/test/bool.js +146 -147
  68. package/dist/node_modules/minimist/test/dash.js +33 -21
  69. package/dist/node_modules/minimist/test/default_bool.js +26 -24
  70. package/dist/node_modules/minimist/test/dotted.js +13 -11
  71. package/dist/node_modules/minimist/test/kv_short.js +26 -10
  72. package/dist/node_modules/minimist/test/long.js +28 -26
  73. package/dist/node_modules/minimist/test/num.js +30 -28
  74. package/dist/node_modules/minimist/test/parse.js +169 -157
  75. package/dist/node_modules/minimist/test/parse_modified.js +7 -5
  76. package/dist/node_modules/minimist/test/proto.js +41 -37
  77. package/dist/node_modules/minimist/test/short.js +57 -55
  78. package/dist/node_modules/minimist/test/stop_early.js +10 -8
  79. package/dist/node_modules/minimist/test/unknown.js +83 -81
  80. package/dist/node_modules/minimist/test/whitespace.js +6 -4
  81. package/dist/node_modules/node-abi/.circleci/config.yml +2 -2
  82. package/dist/node_modules/node-abi/.github/CODEOWNERS +1 -0
  83. package/dist/node_modules/node-abi/.github/workflows/semantic.yml +26 -0
  84. package/dist/node_modules/node-abi/.github/workflows/update-abi.yml +5 -4
  85. package/dist/node_modules/node-abi/README.md +5 -3
  86. package/dist/node_modules/node-abi/abi_registry.json +32 -1
  87. package/dist/node_modules/node-abi/package.json +4 -4
  88. package/dist/node_modules/node-abi/scripts/update-abi-registry.js +2 -2
  89. package/dist/node_modules/readable-stream/README.md +1 -1
  90. package/dist/node_modules/readable-stream/lib/_stream_duplex.js +12 -25
  91. package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +2 -4
  92. package/dist/node_modules/readable-stream/lib/_stream_readable.js +176 -273
  93. package/dist/node_modules/readable-stream/lib/_stream_transform.js +26 -37
  94. package/dist/node_modules/readable-stream/lib/_stream_writable.js +118 -174
  95. package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +10 -37
  96. package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +20 -47
  97. package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +8 -17
  98. package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +1 -19
  99. package/dist/node_modules/readable-stream/lib/internal/streams/from.js +12 -24
  100. package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +5 -16
  101. package/dist/node_modules/readable-stream/lib/internal/streams/state.js +2 -7
  102. package/dist/node_modules/readable-stream/package.json +1 -1
  103. package/dist/node_modules/semver/README.md +70 -1
  104. package/dist/node_modules/semver/bin/semver.js +16 -2
  105. package/dist/node_modules/semver/classes/comparator.js +39 -34
  106. package/dist/node_modules/semver/classes/range.js +45 -28
  107. package/dist/node_modules/semver/classes/semver.js +32 -17
  108. package/dist/node_modules/semver/functions/coerce.js +1 -1
  109. package/dist/node_modules/semver/functions/diff.js +58 -16
  110. package/dist/node_modules/semver/functions/inc.js +3 -2
  111. package/dist/node_modules/semver/functions/parse.js +5 -22
  112. package/dist/node_modules/semver/index.js +1 -0
  113. package/dist/node_modules/semver/internal/constants.js +20 -2
  114. package/dist/node_modules/semver/internal/parse-options.js +14 -10
  115. package/dist/node_modules/semver/internal/re.js +34 -4
  116. package/dist/node_modules/semver/package.json +8 -7
  117. package/dist/node_modules/semver/ranges/intersects.js +1 -1
  118. package/dist/node_modules/semver/ranges/subset.js +6 -3
  119. package/dist/package-lock.json +18 -349
  120. package/dist/package.json +1 -2
  121. package/package.json +9 -10
  122. package/src/__tests__/config.data.ts +142 -1
  123. package/src/__tests__/wmts.capability.test.ts +117 -79
  124. package/src/__tests__/xyz.util.ts +6 -2
  125. package/src/cli/render.tile.ts +41 -0
  126. package/src/routes/__tests__/attribution.test.ts +64 -2
  127. package/src/routes/__tests__/wmts.test.ts +70 -9
  128. package/src/routes/attribution.ts +28 -28
  129. package/src/routes/tile.json.ts +2 -1
  130. package/src/routes/tile.style.json.ts +2 -1
  131. package/src/routes/tile.wmts.ts +13 -6
  132. package/src/routes/tile.xyz.raster.ts +4 -1
  133. package/src/util/__test__/filter.test.ts +80 -0
  134. package/src/util/config.loader.ts +1 -2
  135. package/src/util/filter.ts +60 -0
  136. package/src/util/validate.ts +4 -3
  137. package/src/wmts.capability.ts +216 -123
  138. package/tsconfig.tsbuildinfo +1 -1
  139. package/test-dump.js +0 -6
  140. package/test-imagery.js +0 -3
@@ -18,6 +18,7 @@
18
18
  // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
19
  // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
20
  // USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
21
22
  // a transform stream is a readable/writable stream where you do
22
23
  // something with the data. Sometimes it's called a "filter",
23
24
  // but that's not a great name for it, since that implies a thing where
@@ -59,42 +60,36 @@
59
60
  // However, even in such a pathological case, only a single written chunk
60
61
  // would be consumed, and then the rest would wait (un-transformed) until
61
62
  // the results of the previous transformed chunk were consumed.
63
+
62
64
  'use strict';
63
65
 
64
66
  module.exports = Transform;
65
-
66
67
  var _require$codes = require('../errors').codes,
67
- ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
68
- ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
69
- ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,
70
- ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
71
-
68
+ ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
69
+ ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
70
+ ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,
71
+ ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
72
72
  var Duplex = require('./_stream_duplex');
73
-
74
73
  require('inherits')(Transform, Duplex);
75
-
76
74
  function afterTransform(er, data) {
77
75
  var ts = this._transformState;
78
76
  ts.transforming = false;
79
77
  var cb = ts.writecb;
80
-
81
78
  if (cb === null) {
82
79
  return this.emit('error', new ERR_MULTIPLE_CALLBACK());
83
80
  }
84
-
85
81
  ts.writechunk = null;
86
82
  ts.writecb = null;
87
- if (data != null) // single equals check for both `null` and `undefined`
83
+ if (data != null)
84
+ // single equals check for both `null` and `undefined`
88
85
  this.push(data);
89
86
  cb(er);
90
87
  var rs = this._readableState;
91
88
  rs.reading = false;
92
-
93
89
  if (rs.needReadable || rs.length < rs.highWaterMark) {
94
90
  this._read(rs.highWaterMark);
95
91
  }
96
92
  }
97
-
98
93
  function Transform(options) {
99
94
  if (!(this instanceof Transform)) return new Transform(options);
100
95
  Duplex.call(this, options);
@@ -105,26 +100,25 @@ function Transform(options) {
105
100
  writecb: null,
106
101
  writechunk: null,
107
102
  writeencoding: null
108
- }; // start out asking for a readable event once data is transformed.
103
+ };
104
+
105
+ // start out asking for a readable event once data is transformed.
106
+ this._readableState.needReadable = true;
109
107
 
110
- this._readableState.needReadable = true; // we have implemented the _read method, and done the other things
108
+ // we have implemented the _read method, and done the other things
111
109
  // that Readable wants before the first _read call, so unset the
112
110
  // sync guard flag.
113
-
114
111
  this._readableState.sync = false;
115
-
116
112
  if (options) {
117
113
  if (typeof options.transform === 'function') this._transform = options.transform;
118
114
  if (typeof options.flush === 'function') this._flush = options.flush;
119
- } // When the writable side finishes, then flush out anything remaining.
120
-
115
+ }
121
116
 
117
+ // When the writable side finishes, then flush out anything remaining.
122
118
  this.on('prefinish', prefinish);
123
119
  }
124
-
125
120
  function prefinish() {
126
121
  var _this = this;
127
-
128
122
  if (typeof this._flush === 'function' && !this._readableState.destroyed) {
129
123
  this._flush(function (er, data) {
130
124
  done(_this, er, data);
@@ -133,11 +127,12 @@ function prefinish() {
133
127
  done(this, null, null);
134
128
  }
135
129
  }
136
-
137
130
  Transform.prototype.push = function (chunk, encoding) {
138
131
  this._transformState.needTransform = false;
139
132
  return Duplex.prototype.push.call(this, chunk, encoding);
140
- }; // This is the part where you do stuff!
133
+ };
134
+
135
+ // This is the part where you do stuff!
141
136
  // override this function in implementation classes.
142
137
  // 'chunk' is an input chunk.
143
138
  //
@@ -147,33 +142,27 @@ Transform.prototype.push = function (chunk, encoding) {
147
142
  // Call `cb(err)` when you are done with this chunk. If you pass
148
143
  // an error, then that'll put the hurt on the whole operation. If you
149
144
  // never call cb(), then you'll never get another chunk.
150
-
151
-
152
145
  Transform.prototype._transform = function (chunk, encoding, cb) {
153
146
  cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));
154
147
  };
155
-
156
148
  Transform.prototype._write = function (chunk, encoding, cb) {
157
149
  var ts = this._transformState;
158
150
  ts.writecb = cb;
159
151
  ts.writechunk = chunk;
160
152
  ts.writeencoding = encoding;
161
-
162
153
  if (!ts.transforming) {
163
154
  var rs = this._readableState;
164
155
  if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
165
156
  }
166
- }; // Doesn't matter what the args are here.
157
+ };
158
+
159
+ // Doesn't matter what the args are here.
167
160
  // _transform does all the work.
168
161
  // That we got here means that the readable side wants more data.
169
-
170
-
171
162
  Transform.prototype._read = function (n) {
172
163
  var ts = this._transformState;
173
-
174
164
  if (ts.writechunk !== null && !ts.transforming) {
175
165
  ts.transforming = true;
176
-
177
166
  this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
178
167
  } else {
179
168
  // mark that we need a transform, so that any data that comes in
@@ -181,20 +170,20 @@ Transform.prototype._read = function (n) {
181
170
  ts.needTransform = true;
182
171
  }
183
172
  };
184
-
185
173
  Transform.prototype._destroy = function (err, cb) {
186
174
  Duplex.prototype._destroy.call(this, err, function (err2) {
187
175
  cb(err2);
188
176
  });
189
177
  };
190
-
191
178
  function done(stream, er, data) {
192
179
  if (er) return stream.emit('error', er);
193
- if (data != null) // single equals check for both `null` and `undefined`
194
- stream.push(data); // TODO(BridgeAR): Write a test for these two error cases
180
+ if (data != null)
181
+ // single equals check for both `null` and `undefined`
182
+ stream.push(data);
183
+
184
+ // TODO(BridgeAR): Write a test for these two error cases
195
185
  // if there's nothing in the write buffer, then that means
196
186
  // that nothing more will ever be provided
197
-
198
187
  if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();
199
188
  if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
200
189
  return stream.push(null);