@basemaps/lambda-tiler 6.38.0 → 6.40.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 +46 -0
- package/build/__tests__/config.data.d.ts.map +1 -1
- package/build/__tests__/config.data.js +142 -1
- package/build/__tests__/config.data.js.map +1 -1
- package/build/__tests__/wmts.capability.test.js +9 -16
- package/build/__tests__/wmts.capability.test.js.map +1 -1
- package/build/__tests__/xyz.util.d.ts.map +1 -1
- package/build/__tests__/xyz.util.js +6 -2
- package/build/__tests__/xyz.util.js.map +1 -1
- package/build/cli/render.tile.d.ts +2 -0
- package/build/cli/render.tile.d.ts.map +1 -0
- package/build/cli/render.tile.js +33 -0
- package/build/cli/render.tile.js.map +1 -0
- package/build/routes/__tests__/attribution.test.js +63 -3
- package/build/routes/__tests__/attribution.test.js.map +1 -1
- package/build/routes/__tests__/tile.style.json.test.js +91 -43
- package/build/routes/__tests__/tile.style.json.test.js.map +1 -1
- package/build/routes/__tests__/wmts.test.js +50 -8
- package/build/routes/__tests__/wmts.test.js.map +1 -1
- package/build/routes/attribution.d.ts +12 -0
- package/build/routes/attribution.d.ts.map +1 -1
- package/build/routes/attribution.js +29 -27
- package/build/routes/attribution.js.map +1 -1
- package/build/routes/tile.json.d.ts.map +1 -1
- package/build/routes/tile.json.js +2 -1
- package/build/routes/tile.json.js.map +1 -1
- package/build/routes/tile.style.json.d.ts +2 -2
- package/build/routes/tile.style.json.d.ts.map +1 -1
- package/build/routes/tile.style.json.js +7 -4
- package/build/routes/tile.style.json.js.map +1 -1
- package/build/routes/tile.wmts.d.ts.map +1 -1
- package/build/routes/tile.wmts.js +3 -1
- package/build/routes/tile.wmts.js.map +1 -1
- package/build/routes/tile.xyz.raster.d.ts.map +1 -1
- package/build/routes/tile.xyz.raster.js +9 -6
- package/build/routes/tile.xyz.raster.js.map +1 -1
- package/build/util/__test__/filter.test.d.ts +2 -0
- package/build/util/__test__/filter.test.d.ts.map +1 -0
- package/build/util/__test__/filter.test.js +64 -0
- package/build/util/__test__/filter.test.js.map +1 -0
- package/build/util/config.loader.d.ts.map +1 -1
- package/build/util/config.loader.js +2 -3
- package/build/util/config.loader.js.map +1 -1
- package/build/util/filter.d.ts +15 -0
- package/build/util/filter.d.ts.map +1 -0
- package/build/util/filter.js +59 -0
- package/build/util/filter.js.map +1 -0
- package/build/wmts.capability.d.ts +8 -5
- package/build/wmts.capability.d.ts.map +1 -1
- package/build/wmts.capability.js +17 -15
- package/build/wmts.capability.js.map +1 -1
- package/dist/index.js +60 -60
- package/dist/node_modules/.package-lock.json +14 -14
- package/dist/node_modules/minimist/.eslintrc +25 -50
- package/dist/node_modules/minimist/CHANGELOG.md +87 -1
- package/dist/node_modules/minimist/README.md +14 -10
- package/dist/node_modules/minimist/example/parse.js +2 -0
- package/dist/node_modules/minimist/index.js +256 -242
- package/dist/node_modules/minimist/package.json +73 -73
- package/dist/node_modules/minimist/test/all_bool.js +26 -24
- package/dist/node_modules/minimist/test/bool.js +146 -147
- package/dist/node_modules/minimist/test/dash.js +33 -21
- package/dist/node_modules/minimist/test/default_bool.js +26 -24
- package/dist/node_modules/minimist/test/dotted.js +13 -11
- package/dist/node_modules/minimist/test/kv_short.js +26 -10
- package/dist/node_modules/minimist/test/long.js +28 -26
- package/dist/node_modules/minimist/test/num.js +30 -28
- package/dist/node_modules/minimist/test/parse.js +169 -157
- package/dist/node_modules/minimist/test/parse_modified.js +7 -5
- package/dist/node_modules/minimist/test/proto.js +41 -37
- package/dist/node_modules/minimist/test/short.js +57 -55
- package/dist/node_modules/minimist/test/stop_early.js +10 -8
- package/dist/node_modules/minimist/test/unknown.js +83 -81
- package/dist/node_modules/minimist/test/whitespace.js +6 -4
- package/dist/node_modules/node-abi/.circleci/config.yml +7 -25
- package/dist/node_modules/node-abi/.github/CODEOWNERS +1 -0
- package/dist/node_modules/node-abi/.github/workflows/update-abi.yml +5 -4
- package/dist/node_modules/node-abi/CONTRIBUTING.md +1 -1
- package/dist/node_modules/node-abi/README.md +5 -3
- package/dist/node_modules/node-abi/abi_registry.json +14 -0
- package/dist/node_modules/node-abi/package.json +5 -6
- package/dist/node_modules/node-addon-api/README.md +36 -12
- package/dist/node_modules/node-addon-api/index.js +3 -3
- package/dist/node_modules/node-addon-api/napi-inl.deprecated.h +121 -127
- package/dist/node_modules/node-addon-api/napi-inl.h +1166 -1122
- package/dist/node_modules/node-addon-api/napi.h +2786 -2675
- package/dist/node_modules/node-addon-api/package.json +42 -1
- package/dist/node_modules/node-addon-api/tools/check-napi.js +13 -14
- package/dist/node_modules/node-addon-api/tools/conversion.js +161 -169
- package/dist/node_modules/node-addon-api/tools/eslint-format.js +9 -1
- package/dist/node_modules/readable-stream/README.md +1 -1
- package/dist/node_modules/readable-stream/lib/_stream_duplex.js +12 -25
- package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +2 -4
- package/dist/node_modules/readable-stream/lib/_stream_readable.js +176 -273
- package/dist/node_modules/readable-stream/lib/_stream_transform.js +26 -37
- package/dist/node_modules/readable-stream/lib/_stream_writable.js +118 -174
- package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +10 -37
- package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +20 -47
- package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +8 -17
- package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +1 -19
- package/dist/node_modules/readable-stream/lib/internal/streams/from.js +12 -24
- package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +5 -16
- package/dist/node_modules/readable-stream/lib/internal/streams/state.js +2 -7
- package/dist/node_modules/readable-stream/package.json +1 -1
- package/dist/package-lock.json +15 -346
- package/dist/package.json +1 -1
- package/package.json +8 -8
- package/src/__tests__/config.data.ts +142 -1
- package/src/__tests__/wmts.capability.test.ts +9 -16
- package/src/__tests__/xyz.util.ts +6 -2
- package/src/cli/render.tile.ts +38 -0
- package/src/routes/__tests__/attribution.test.ts +65 -3
- package/src/routes/__tests__/tile.style.json.test.ts +100 -44
- package/src/routes/__tests__/wmts.test.ts +70 -9
- package/src/routes/attribution.ts +24 -28
- package/src/routes/tile.json.ts +2 -1
- package/src/routes/tile.style.json.ts +13 -5
- package/src/routes/tile.wmts.ts +3 -1
- package/src/routes/tile.xyz.raster.ts +10 -7
- package/src/util/__test__/filter.test.ts +80 -0
- package/src/util/config.loader.ts +1 -2
- package/src/util/filter.ts +60 -0
- package/src/wmts.capability.ts +19 -14
- package/tsconfig.tsbuildinfo +1 -1
- package/test-dump.js +0 -6
- 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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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)
|
|
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
|
-
};
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// start out asking for a readable event once data is transformed.
|
|
106
|
+
this._readableState.needReadable = true;
|
|
109
107
|
|
|
110
|
-
|
|
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
|
-
}
|
|
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
|
-
};
|
|
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
|
-
};
|
|
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)
|
|
194
|
-
|
|
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);
|