@nocobase/plugin-multi-app-manager 0.15.0-alpha.4 → 0.16.0-alpha.1
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/dist/externalVersion.js +3 -3
- package/dist/node_modules/mariadb/LICENSE +502 -0
- package/dist/node_modules/mariadb/callback.js +41 -0
- package/dist/node_modules/mariadb/lib/cmd/batch-bulk.js +278 -0
- package/dist/node_modules/mariadb/lib/cmd/batch-rewrite.js +372 -0
- package/dist/node_modules/mariadb/lib/cmd/change-user.js +149 -0
- package/dist/node_modules/mariadb/lib/cmd/class/ok-packet.js +17 -0
- package/dist/node_modules/mariadb/lib/cmd/column-definition.js +102 -0
- package/dist/node_modules/mariadb/lib/cmd/command.js +168 -0
- package/dist/node_modules/mariadb/lib/cmd/common-binary-cmd.js +327 -0
- package/dist/node_modules/mariadb/lib/cmd/common-text-cmd.js +427 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/caching-sha2-password-auth.js +168 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/clear-password-auth.js +23 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/ed25519-password-auth.js +761 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/native-password-auth.js +55 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/pam-password-auth.js +58 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/plugin-auth.js +19 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/sha256-password-auth.js +142 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/client-capabilities.js +74 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/client-handshake-response.js +126 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/handshake.js +292 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/initial-handshake.js +74 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/ssl-request.js +29 -0
- package/dist/node_modules/mariadb/lib/cmd/ping.js +52 -0
- package/dist/node_modules/mariadb/lib/cmd/query.js +255 -0
- package/dist/node_modules/mariadb/lib/cmd/quit.js +28 -0
- package/dist/node_modules/mariadb/lib/cmd/reset.js +54 -0
- package/dist/node_modules/mariadb/lib/cmd/resultset.js +607 -0
- package/dist/node_modules/mariadb/lib/cmd/stream.js +45 -0
- package/dist/node_modules/mariadb/lib/config/connection-options.js +258 -0
- package/dist/node_modules/mariadb/lib/config/pool-cluster-options.js +19 -0
- package/dist/node_modules/mariadb/lib/config/pool-options.js +47 -0
- package/dist/node_modules/mariadb/lib/connection-callback.js +160 -0
- package/dist/node_modules/mariadb/lib/connection.js +1460 -0
- package/dist/node_modules/mariadb/lib/const/capabilities.js +64 -0
- package/dist/node_modules/mariadb/lib/const/collations.js +473 -0
- package/dist/node_modules/mariadb/lib/const/connection_status.js +13 -0
- package/dist/node_modules/mariadb/lib/const/error-code.js +1282 -0
- package/dist/node_modules/mariadb/lib/const/field-detail.js +35 -0
- package/dist/node_modules/mariadb/lib/const/field-type.js +71 -0
- package/dist/node_modules/mariadb/lib/const/server-status.js +30 -0
- package/dist/node_modules/mariadb/lib/const/state-change.js +12 -0
- package/dist/node_modules/mariadb/lib/filtered-pool-cluster.js +81 -0
- package/dist/node_modules/mariadb/lib/io/bulk-packet.js +590 -0
- package/dist/node_modules/mariadb/lib/io/compression-input-stream.js +141 -0
- package/dist/node_modules/mariadb/lib/io/compression-output-stream.js +171 -0
- package/dist/node_modules/mariadb/lib/io/packet-input-stream.js +193 -0
- package/dist/node_modules/mariadb/lib/io/packet-node-encoded.js +36 -0
- package/dist/node_modules/mariadb/lib/io/packet-node-iconv.js +37 -0
- package/dist/node_modules/mariadb/lib/io/packet-output-stream.js +502 -0
- package/dist/node_modules/mariadb/lib/io/packet.js +515 -0
- package/dist/node_modules/mariadb/lib/io/rewrite-packet.js +481 -0
- package/dist/node_modules/mariadb/lib/misc/connection-information.js +96 -0
- package/dist/node_modules/mariadb/lib/misc/errors.js +123 -0
- package/dist/node_modules/mariadb/lib/misc/parse.js +1033 -0
- package/dist/node_modules/mariadb/lib/misc/utils.js +298 -0
- package/dist/node_modules/mariadb/lib/pool-base.js +611 -0
- package/dist/node_modules/mariadb/lib/pool-callback.js +202 -0
- package/dist/node_modules/mariadb/lib/pool-cluster-callback.js +66 -0
- package/dist/node_modules/mariadb/lib/pool-cluster.js +407 -0
- package/dist/node_modules/mariadb/lib/pool-promise.js +108 -0
- package/dist/node_modules/mariadb/node_modules/@types/geojson/index.d.ts +165 -0
- package/dist/node_modules/mariadb/node_modules/@types/geojson/package.json +46 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/assert.d.ts +912 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/async_hooks.d.ts +501 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/buffer.d.ts +2232 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/child_process.d.ts +1366 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/cluster.d.ts +414 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/console.d.ts +412 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/constants.d.ts +18 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/crypto.d.ts +3338 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/dgram.d.ts +545 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/diagnostics_channel.d.ts +152 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/dns/promises.d.ts +370 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/dns.d.ts +659 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/domain.d.ts +169 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/events.d.ts +651 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/fs/promises.d.ts +1091 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/fs.d.ts +3869 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/globals.d.ts +294 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/globals.global.d.ts +1 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/http.d.ts +1396 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/http2.d.ts +2101 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/https.d.ts +391 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/index.d.ts +129 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/inspector.d.ts +2744 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/module.d.ts +114 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/net.d.ts +791 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/os.d.ts +455 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/package.json +220 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/path.d.ts +180 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/perf_hooks.d.ts +557 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/process.d.ts +1481 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/punycode.d.ts +117 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/querystring.d.ts +131 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/readline.d.ts +650 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/repl.d.ts +424 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/stream/consumers.d.ts +24 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/stream/promises.d.ts +42 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/stream/web.d.ts +330 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/stream.d.ts +1249 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/timers/promises.d.ts +68 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/timers.d.ts +94 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/tls.d.ts +1020 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/trace_events.d.ts +161 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/tty.d.ts +204 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/url.d.ts +891 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/util.d.ts +1594 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/v8.d.ts +378 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/vm.d.ts +507 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/wasi.d.ts +158 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/worker_threads.d.ts +649 -0
- package/dist/node_modules/mariadb/node_modules/@types/node/zlib.d.ts +517 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/.github/dependabot.yml +11 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/codeStyles/Project.xml +47 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/iconv-lite.iml +12 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/modules.xml +8 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/vcs.xml +6 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/dbcs-codec.js +597 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/dbcs-data.js +188 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/index.js +23 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/internal.js +198 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/sbcs-data.js +179 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/utf16.js +197 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/utf32.js +319 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/lib/index.d.ts +41 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/lib/index.js +180 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/lib/streams.js +109 -0
- package/dist/node_modules/mariadb/node_modules/iconv-lite/package.json +44 -0
- package/dist/node_modules/mariadb/node_modules/long/index.d.ts +457 -0
- package/dist/node_modules/mariadb/node_modules/long/index.js +1467 -0
- package/dist/node_modules/mariadb/node_modules/long/package.json +50 -0
- package/dist/node_modules/mariadb/node_modules/long/umd/index.d.ts +2 -0
- package/dist/node_modules/mariadb/node_modules/long/umd/index.js +1432 -0
- package/dist/node_modules/mariadb/node_modules/long/umd/package.json +3 -0
- package/dist/node_modules/mariadb/package.json +1 -0
- package/dist/node_modules/mariadb/promise.js +34 -0
- package/dist/node_modules/mariadb/types/index.d.ts +870 -0
- package/dist/server/server.js +6 -0
- package/package.json +2 -2
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const Connection = require('./connection');
|
|
4
|
+
const PoolBase = require('./pool-base');
|
|
5
|
+
const Errors = require('./misc/errors');
|
|
6
|
+
const util = require('util');
|
|
7
|
+
|
|
8
|
+
function PoolPromise(options) {
|
|
9
|
+
const processTaskPromise = function (conn, sql, values, isBatch) {
|
|
10
|
+
if (sql) {
|
|
11
|
+
const fct = isBatch ? conn.batch : conn.query;
|
|
12
|
+
return fct(sql, values)
|
|
13
|
+
.then((res) => {
|
|
14
|
+
conn.releaseWithoutError();
|
|
15
|
+
return Promise.resolve(res);
|
|
16
|
+
})
|
|
17
|
+
.catch((err) => {
|
|
18
|
+
conn.releaseWithoutError();
|
|
19
|
+
return Promise.reject(err);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return Promise.resolve(conn);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Add connection to pool.
|
|
27
|
+
*/
|
|
28
|
+
const createConnectionPoolPromise = function (pool) {
|
|
29
|
+
const conn = new Connection(options.connOptions);
|
|
30
|
+
return conn
|
|
31
|
+
.connect()
|
|
32
|
+
.then(() => {
|
|
33
|
+
if (pool.closed) {
|
|
34
|
+
conn
|
|
35
|
+
.end()
|
|
36
|
+
.then(() => {})
|
|
37
|
+
.catch(() => {});
|
|
38
|
+
return Promise.reject(
|
|
39
|
+
Errors.createError(
|
|
40
|
+
'Cannot create new connection to pool, pool closed',
|
|
41
|
+
null,
|
|
42
|
+
true,
|
|
43
|
+
null,
|
|
44
|
+
'08S01',
|
|
45
|
+
Errors.ER_ADD_CONNECTION_CLOSED_POOL,
|
|
46
|
+
null
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
conn.releaseWithoutError = () => {
|
|
52
|
+
conn.release().catch(() => {});
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
conn.forceEnd = conn.end;
|
|
56
|
+
|
|
57
|
+
conn.release = () => {
|
|
58
|
+
if (pool.closed) {
|
|
59
|
+
pool._discardConnection(conn);
|
|
60
|
+
return Promise.resolve();
|
|
61
|
+
}
|
|
62
|
+
if (options.noControlAfterUse) {
|
|
63
|
+
pool._releaseConnection(conn);
|
|
64
|
+
return Promise.resolve();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//if server permit it, reset the connection, or rollback only if not
|
|
68
|
+
// COM_RESET_CONNECTION exist since mysql 5.7.3 and mariadb 10.2.4
|
|
69
|
+
// but not possible to use it with mysql waiting for https://bugs.mysql.com/bug.php?id=97633 correction.
|
|
70
|
+
// and mariadb only since https://jira.mariadb.org/browse/MDEV-18281
|
|
71
|
+
let revertFunction = conn.rollback;
|
|
72
|
+
if (
|
|
73
|
+
options.resetAfterUse &&
|
|
74
|
+
conn.info.isMariaDB() &&
|
|
75
|
+
((conn.info.serverVersion.minor === 2 && conn.info.hasMinVersion(10, 2, 22)) ||
|
|
76
|
+
conn.info.hasMinVersion(10, 3, 13))
|
|
77
|
+
) {
|
|
78
|
+
revertFunction = conn.reset;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return revertFunction()
|
|
82
|
+
.then(() => {
|
|
83
|
+
pool._releaseConnection(conn);
|
|
84
|
+
return Promise.resolve();
|
|
85
|
+
})
|
|
86
|
+
.catch((err) => {
|
|
87
|
+
//uncertain connection state.
|
|
88
|
+
// discard it
|
|
89
|
+
pool._discardConnection(conn);
|
|
90
|
+
return Promise.resolve();
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
conn.end = conn.release;
|
|
94
|
+
return Promise.resolve(conn);
|
|
95
|
+
})
|
|
96
|
+
.catch((err) => {
|
|
97
|
+
return Promise.reject(err);
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
PoolBase.call(this, options, processTaskPromise, createConnectionPoolPromise, (conn) =>
|
|
102
|
+
conn.ping(options.pingTimeout)
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
util.inherits(PoolPromise, PoolBase);
|
|
107
|
+
|
|
108
|
+
module.exports = PoolPromise;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// Note: as of the RFC 7946 version of GeoJSON, Coordinate Reference Systems
|
|
2
|
+
// are no longer supported. (See https://tools.ietf.org/html/rfc7946#appendix-B)}
|
|
3
|
+
|
|
4
|
+
export as namespace GeoJSON;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The valid values for the "type" property of GeoJSON geometry objects.
|
|
8
|
+
* https://tools.ietf.org/html/rfc7946#section-1.4
|
|
9
|
+
*/
|
|
10
|
+
export type GeoJsonGeometryTypes = Geometry["type"];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The value values for the "type" property of GeoJSON Objects.
|
|
14
|
+
* https://tools.ietf.org/html/rfc7946#section-1.4
|
|
15
|
+
*/
|
|
16
|
+
export type GeoJsonTypes = GeoJSON["type"];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Bounding box
|
|
20
|
+
* https://tools.ietf.org/html/rfc7946#section-5
|
|
21
|
+
*/
|
|
22
|
+
export type BBox = [number, number, number, number] | [number, number, number, number, number, number];
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A Position is an array of coordinates.
|
|
26
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.1
|
|
27
|
+
* Array should contain between two and three elements.
|
|
28
|
+
* The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),
|
|
29
|
+
* but the current specification only allows X, Y, and (optionally) Z to be defined.
|
|
30
|
+
*/
|
|
31
|
+
export type Position = number[]; // [number, number] | [number, number, number];
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The base GeoJSON object.
|
|
35
|
+
* https://tools.ietf.org/html/rfc7946#section-3
|
|
36
|
+
* The GeoJSON specification also allows foreign members
|
|
37
|
+
* (https://tools.ietf.org/html/rfc7946#section-6.1)
|
|
38
|
+
* Developers should use "&" type in TypeScript or extend the interface
|
|
39
|
+
* to add these foreign members.
|
|
40
|
+
*/
|
|
41
|
+
export interface GeoJsonObject {
|
|
42
|
+
// Don't include foreign members directly into this type def.
|
|
43
|
+
// in order to preserve type safety.
|
|
44
|
+
// [key: string]: any;
|
|
45
|
+
/**
|
|
46
|
+
* Specifies the type of GeoJSON object.
|
|
47
|
+
*/
|
|
48
|
+
type: GeoJsonTypes;
|
|
49
|
+
/**
|
|
50
|
+
* Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.
|
|
51
|
+
* The value of the bbox member is an array of length 2*n where n is the number of dimensions
|
|
52
|
+
* represented in the contained geometries, with all axes of the most southwesterly point
|
|
53
|
+
* followed by all axes of the more northeasterly point.
|
|
54
|
+
* The axes order of a bbox follows the axes order of geometries.
|
|
55
|
+
* https://tools.ietf.org/html/rfc7946#section-5
|
|
56
|
+
*/
|
|
57
|
+
bbox?: BBox | undefined;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Union of GeoJSON objects.
|
|
62
|
+
*/
|
|
63
|
+
export type GeoJSON = Geometry | Feature | FeatureCollection;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Geometry object.
|
|
67
|
+
* https://tools.ietf.org/html/rfc7946#section-3
|
|
68
|
+
*/
|
|
69
|
+
export type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection;
|
|
70
|
+
export type GeometryObject = Geometry;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Point geometry object.
|
|
74
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.2
|
|
75
|
+
*/
|
|
76
|
+
export interface Point extends GeoJsonObject {
|
|
77
|
+
type: "Point";
|
|
78
|
+
coordinates: Position;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* MultiPoint geometry object.
|
|
83
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.3
|
|
84
|
+
*/
|
|
85
|
+
export interface MultiPoint extends GeoJsonObject {
|
|
86
|
+
type: "MultiPoint";
|
|
87
|
+
coordinates: Position[];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* LineString geometry object.
|
|
92
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.4
|
|
93
|
+
*/
|
|
94
|
+
export interface LineString extends GeoJsonObject {
|
|
95
|
+
type: "LineString";
|
|
96
|
+
coordinates: Position[];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* MultiLineString geometry object.
|
|
101
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.5
|
|
102
|
+
*/
|
|
103
|
+
export interface MultiLineString extends GeoJsonObject {
|
|
104
|
+
type: "MultiLineString";
|
|
105
|
+
coordinates: Position[][];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Polygon geometry object.
|
|
110
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.6
|
|
111
|
+
*/
|
|
112
|
+
export interface Polygon extends GeoJsonObject {
|
|
113
|
+
type: "Polygon";
|
|
114
|
+
coordinates: Position[][];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* MultiPolygon geometry object.
|
|
119
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.7
|
|
120
|
+
*/
|
|
121
|
+
export interface MultiPolygon extends GeoJsonObject {
|
|
122
|
+
type: "MultiPolygon";
|
|
123
|
+
coordinates: Position[][][];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Geometry Collection
|
|
128
|
+
* https://tools.ietf.org/html/rfc7946#section-3.1.8
|
|
129
|
+
*/
|
|
130
|
+
export interface GeometryCollection<G extends Geometry = Geometry> extends GeoJsonObject {
|
|
131
|
+
type: "GeometryCollection";
|
|
132
|
+
geometries: G[];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type GeoJsonProperties = { [name: string]: any } | null;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* A feature object which contains a geometry and associated properties.
|
|
139
|
+
* https://tools.ietf.org/html/rfc7946#section-3.2
|
|
140
|
+
*/
|
|
141
|
+
export interface Feature<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
|
|
142
|
+
type: "Feature";
|
|
143
|
+
/**
|
|
144
|
+
* The feature's geometry
|
|
145
|
+
*/
|
|
146
|
+
geometry: G;
|
|
147
|
+
/**
|
|
148
|
+
* A value that uniquely identifies this feature in a
|
|
149
|
+
* https://tools.ietf.org/html/rfc7946#section-3.2.
|
|
150
|
+
*/
|
|
151
|
+
id?: string | number | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Properties associated with this feature.
|
|
154
|
+
*/
|
|
155
|
+
properties: P;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* A collection of feature objects.
|
|
160
|
+
* https://tools.ietf.org/html/rfc7946#section-3.3
|
|
161
|
+
*/
|
|
162
|
+
export interface FeatureCollection<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject {
|
|
163
|
+
type: "FeatureCollection";
|
|
164
|
+
features: Array<Feature<G, P>>;
|
|
165
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@types/geojson",
|
|
3
|
+
"version": "7946.0.13",
|
|
4
|
+
"description": "TypeScript definitions for geojson",
|
|
5
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/geojson",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"contributors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Jacob Bruun",
|
|
10
|
+
"githubUsername": "cobster",
|
|
11
|
+
"url": "https://github.com/cobster"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Arne Schubert",
|
|
15
|
+
"githubUsername": "atd-schubert",
|
|
16
|
+
"url": "https://github.com/atd-schubert"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Jeff Jacobson",
|
|
20
|
+
"githubUsername": "JeffJacobson",
|
|
21
|
+
"url": "https://github.com/JeffJacobson"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "Ilia Choly",
|
|
25
|
+
"githubUsername": "icholy",
|
|
26
|
+
"url": "https://github.com/icholy"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Dan Vanderkam",
|
|
30
|
+
"githubUsername": "danvk",
|
|
31
|
+
"url": "https://github.com/danvk"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"main": "",
|
|
35
|
+
"types": "index.d.ts",
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
39
|
+
"directory": "types/geojson"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {},
|
|
42
|
+
"dependencies": {},
|
|
43
|
+
"typesPublisherContentHash": "4e4971357304bd2014648d19c8b610e1cc65cf30bd2dfb359e83b2e7251e3a71",
|
|
44
|
+
"typeScriptVersion": "4.5",
|
|
45
|
+
"nonNpm": true
|
|
46
|
+
}
|