@opensearch-project/opensearch 1.0.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 (84) hide show
  1. package/.dockerignore +5 -0
  2. package/ADMINS.md +34 -0
  3. package/DEVELOPER_GUIDE.md +60 -0
  4. package/LICENSE.txt +201 -0
  5. package/MAINTAINERS.md +73 -0
  6. package/Makefile +27 -0
  7. package/NOTICE.txt +8 -0
  8. package/README.md +183 -0
  9. package/RELEASING.md +34 -0
  10. package/SECURITY.md +3 -0
  11. package/api/api/bulk.js +81 -0
  12. package/api/api/cat.js +525 -0
  13. package/api/api/clear_scroll.js +66 -0
  14. package/api/api/cluster.js +431 -0
  15. package/api/api/count.js +75 -0
  16. package/api/api/create.js +80 -0
  17. package/api/api/dangling_indices.js +126 -0
  18. package/api/api/delete.js +76 -0
  19. package/api/api/delete_by_query.js +82 -0
  20. package/api/api/delete_by_query_rethrottle.js +71 -0
  21. package/api/api/delete_script.js +67 -0
  22. package/api/api/exists.js +76 -0
  23. package/api/api/exists_source.js +85 -0
  24. package/api/api/explain.js +76 -0
  25. package/api/api/features.js +92 -0
  26. package/api/api/field_caps.js +66 -0
  27. package/api/api/get.js +76 -0
  28. package/api/api/get_script.js +67 -0
  29. package/api/api/get_script_context.js +61 -0
  30. package/api/api/get_script_languages.js +61 -0
  31. package/api/api/get_source.js +76 -0
  32. package/api/api/index.js +82 -0
  33. package/api/api/indices.js +1516 -0
  34. package/api/api/info.js +61 -0
  35. package/api/api/ingest.js +211 -0
  36. package/api/api/mget.js +81 -0
  37. package/api/api/msearch.js +81 -0
  38. package/api/api/msearch_template.js +81 -0
  39. package/api/api/mtermvectors.js +75 -0
  40. package/api/api/nodes.js +279 -0
  41. package/api/api/ping.js +61 -0
  42. package/api/api/put_script.js +82 -0
  43. package/api/api/rank_eval.js +72 -0
  44. package/api/api/reindex.js +67 -0
  45. package/api/api/reindex_rethrottle.js +71 -0
  46. package/api/api/render_search_template.js +66 -0
  47. package/api/api/scripts_painless_execute.js +61 -0
  48. package/api/api/scroll.js +66 -0
  49. package/api/api/search.js +75 -0
  50. package/api/api/search_shards.js +66 -0
  51. package/api/api/search_template.js +81 -0
  52. package/api/api/shutdown.js +135 -0
  53. package/api/api/snapshot.js +450 -0
  54. package/api/api/tasks.js +119 -0
  55. package/api/api/terms_enum.js +67 -0
  56. package/api/api/termvectors.js +78 -0
  57. package/api/api/update.js +80 -0
  58. package/api/api/update_by_query.js +78 -0
  59. package/api/api/update_by_query_rethrottle.js +71 -0
  60. package/api/index.js +254 -0
  61. package/api/new.d.ts +716 -0
  62. package/api/requestParams.d.ts +1583 -0
  63. package/api/types.d.ts +9481 -0
  64. package/api/utils.js +69 -0
  65. package/codecov.yml +14 -0
  66. package/index.d.ts +1210 -0
  67. package/index.js +338 -0
  68. package/index.mjs +40 -0
  69. package/lib/Connection.d.ts +107 -0
  70. package/lib/Connection.js +345 -0
  71. package/lib/Helpers.d.ts +135 -0
  72. package/lib/Helpers.js +779 -0
  73. package/lib/Serializer.d.ts +41 -0
  74. package/lib/Serializer.js +105 -0
  75. package/lib/Transport.d.ts +173 -0
  76. package/lib/Transport.js +646 -0
  77. package/lib/errors.d.ts +101 -0
  78. package/lib/errors.js +168 -0
  79. package/lib/pool/BaseConnectionPool.js +269 -0
  80. package/lib/pool/CloudConnectionPool.js +75 -0
  81. package/lib/pool/ConnectionPool.js +257 -0
  82. package/lib/pool/index.d.ts +215 -0
  83. package/lib/pool/index.js +41 -0
  84. package/package.json +102 -0
@@ -0,0 +1,257 @@
1
+ /*
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ *
4
+ * The OpenSearch Contributors require contributions made to
5
+ * this file be licensed under the Apache-2.0 license or a
6
+ * compatible open source license.
7
+ *
8
+ * Modifications Copyright OpenSearch Contributors. See
9
+ * GitHub history for details.
10
+ */
11
+
12
+ /*
13
+ * Licensed to Elasticsearch B.V. under one or more contributor
14
+ * license agreements. See the NOTICE file distributed with
15
+ * this work for additional information regarding copyright
16
+ * ownership. Elasticsearch B.V. licenses this file to you under
17
+ * the Apache License, Version 2.0 (the "License"); you may
18
+ * not use this file except in compliance with the License.
19
+ * You may obtain a copy of the License at
20
+ *
21
+ * http://www.apache.org/licenses/LICENSE-2.0
22
+ *
23
+ * Unless required by applicable law or agreed to in writing,
24
+ * software distributed under the License is distributed on an
25
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
26
+ * KIND, either express or implied. See the License for the
27
+ * specific language governing permissions and limitations
28
+ * under the License.
29
+ */
30
+
31
+ 'use strict'
32
+
33
+ const BaseConnectionPool = require('./BaseConnectionPool')
34
+ const assert = require('assert')
35
+ const debug = require('debug')('opensearch')
36
+ const Connection = require('../Connection')
37
+ const noop = () => { }
38
+
39
+ class ConnectionPool extends BaseConnectionPool {
40
+ constructor (opts) {
41
+ super(opts)
42
+
43
+ this.dead = []
44
+ // the resurrect timeout is 60s
45
+ this.resurrectTimeout = 1000 * 60
46
+ // number of consecutive failures after which
47
+ // the timeout doesn't increase
48
+ this.resurrectTimeoutCutoff = 5
49
+ this.pingTimeout = opts.pingTimeout
50
+ this._sniffEnabled = opts.sniffEnabled || false
51
+
52
+ const resurrectStrategy = opts.resurrectStrategy || 'ping'
53
+ this.resurrectStrategy = ConnectionPool.resurrectStrategies[resurrectStrategy]
54
+ assert(
55
+ this.resurrectStrategy != null,
56
+ `Invalid resurrection strategy: '${resurrectStrategy}'`
57
+ )
58
+ }
59
+
60
+ /**
61
+ * Marks a connection as 'alive'.
62
+ * If needed removes the connection from the dead list
63
+ * and then resets the `deadCount`.
64
+ *
65
+ * @param {object} connection
66
+ */
67
+ markAlive (connection) {
68
+ const { id } = connection
69
+ debug(`Marking as 'alive' connection '${id}'`)
70
+ const index = this.dead.indexOf(id)
71
+ if (index > -1) this.dead.splice(index, 1)
72
+ connection.status = Connection.statuses.ALIVE
73
+ connection.deadCount = 0
74
+ connection.resurrectTimeout = 0
75
+ return this
76
+ }
77
+
78
+ /**
79
+ * Marks a connection as 'dead'.
80
+ * If needed adds the connection to the dead list
81
+ * and then increments the `deadCount`.
82
+ *
83
+ * @param {object} connection
84
+ */
85
+ markDead (connection) {
86
+ const { id } = connection
87
+ debug(`Marking as 'dead' connection '${id}'`)
88
+ if (this.dead.indexOf(id) === -1) {
89
+ // It might happen that `markDead` is called jsut after
90
+ // a pool update, and in such case we will add to the dead
91
+ // list a node that no longer exist. The following check verify
92
+ // that the connection is still part of the pool before
93
+ // marking it as dead.
94
+ for (let i = 0; i < this.size; i++) {
95
+ if (this.connections[i].id === id) {
96
+ this.dead.push(id)
97
+ break
98
+ }
99
+ }
100
+ }
101
+ connection.status = Connection.statuses.DEAD
102
+ connection.deadCount++
103
+ // resurrectTimeout formula:
104
+ // `resurrectTimeout * 2 ** min(deadCount - 1, resurrectTimeoutCutoff)`
105
+ connection.resurrectTimeout = Date.now() + this.resurrectTimeout * Math.pow(
106
+ 2, Math.min(connection.deadCount - 1, this.resurrectTimeoutCutoff)
107
+ )
108
+
109
+ // sort the dead list in ascending order
110
+ // based on the resurrectTimeout
111
+ this.dead.sort((a, b) => {
112
+ const conn1 = this.connections.find(c => c.id === a)
113
+ const conn2 = this.connections.find(c => c.id === b)
114
+ return conn1.resurrectTimeout - conn2.resurrectTimeout
115
+ })
116
+
117
+ return this
118
+ }
119
+
120
+ /**
121
+ * If enabled, tries to resurrect a connection with the given
122
+ * resurrect strategy ('ping', 'optimistic', 'none').
123
+ *
124
+ * @param {object} { now, requestId }
125
+ * @param {function} callback (isAlive, connection)
126
+ */
127
+ resurrect (opts, callback = noop) {
128
+ if (this.resurrectStrategy === 0 || this.dead.length === 0) {
129
+ debug('Nothing to resurrect')
130
+ callback(null, null)
131
+ return
132
+ }
133
+
134
+ // the dead list is sorted in ascending order based on the timeout
135
+ // so the first element will always be the one with the smaller timeout
136
+ const connection = this.connections.find(c => c.id === this.dead[0])
137
+ if ((opts.now || Date.now()) < connection.resurrectTimeout) {
138
+ debug('Nothing to resurrect')
139
+ callback(null, null)
140
+ return
141
+ }
142
+
143
+ const { id } = connection
144
+
145
+ // ping strategy
146
+ if (this.resurrectStrategy === 1) {
147
+ connection.request({
148
+ method: 'HEAD',
149
+ path: '/',
150
+ timeout: this.pingTimeout
151
+ }, (err, response) => {
152
+ let isAlive = true
153
+ const statusCode = response !== null ? response.statusCode : 0
154
+ if (err != null ||
155
+ (statusCode === 502 || statusCode === 503 || statusCode === 504)) {
156
+ debug(`Resurrect: connection '${id}' is still dead`)
157
+ this.markDead(connection)
158
+ isAlive = false
159
+ } else {
160
+ debug(`Resurrect: connection '${id}' is now alive`)
161
+ this.markAlive(connection)
162
+ }
163
+ this.emit('resurrect', null, {
164
+ strategy: 'ping',
165
+ name: opts.name,
166
+ request: { id: opts.requestId },
167
+ isAlive,
168
+ connection
169
+ })
170
+ callback(isAlive, connection)
171
+ })
172
+ // optimistic strategy
173
+ } else {
174
+ debug(`Resurrect: optimistic resurrection for connection '${id}'`)
175
+ this.dead.splice(this.dead.indexOf(id), 1)
176
+ connection.status = Connection.statuses.ALIVE
177
+ this.emit('resurrect', null, {
178
+ strategy: 'optimistic',
179
+ name: opts.name,
180
+ request: { id: opts.requestId },
181
+ isAlive: true,
182
+ connection
183
+ })
184
+ callback(true, connection) // eslint-disable-line
185
+ }
186
+ }
187
+
188
+ /**
189
+ * Returns an alive connection if present,
190
+ * otherwise returns a dead connection.
191
+ * By default it filters the `master` only nodes.
192
+ * It uses the selector to choose which
193
+ * connection return.
194
+ *
195
+ * @param {object} options (filter and selector)
196
+ * @returns {object|null} connection
197
+ */
198
+ getConnection (opts = {}) {
199
+ const filter = opts.filter || (() => true)
200
+ const selector = opts.selector || (c => c[0])
201
+
202
+ this.resurrect({
203
+ now: opts.now,
204
+ requestId: opts.requestId,
205
+ name: opts.name
206
+ })
207
+
208
+ const noAliveConnections = this.size === this.dead.length
209
+
210
+ // TODO: can we cache this?
211
+ const connections = []
212
+ for (let i = 0; i < this.size; i++) {
213
+ const connection = this.connections[i]
214
+ if (noAliveConnections || connection.status === Connection.statuses.ALIVE) {
215
+ if (filter(connection) === true) {
216
+ connections.push(connection)
217
+ }
218
+ }
219
+ }
220
+
221
+ if (connections.length === 0) return null
222
+
223
+ return selector(connections)
224
+ }
225
+
226
+ /**
227
+ * Empties the connection pool.
228
+ *
229
+ * @returns {ConnectionPool}
230
+ */
231
+ empty (callback) {
232
+ super.empty(() => {
233
+ this.dead = []
234
+ callback()
235
+ })
236
+ }
237
+
238
+ /**
239
+ * Update the ConnectionPool with new connections.
240
+ *
241
+ * @param {array} array of connections
242
+ * @returns {ConnectionPool}
243
+ */
244
+ update (connections) {
245
+ super.update(connections)
246
+ this.dead = []
247
+ return this
248
+ }
249
+ }
250
+
251
+ ConnectionPool.resurrectStrategies = {
252
+ none: 0,
253
+ ping: 1,
254
+ optimistic: 2
255
+ }
256
+
257
+ module.exports = ConnectionPool
@@ -0,0 +1,215 @@
1
+ /*
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ *
4
+ * The OpenSearch Contributors require contributions made to
5
+ * this file be licensed under the Apache-2.0 license or a
6
+ * compatible open source license.
7
+ *
8
+ * Modifications Copyright OpenSearch Contributors. See
9
+ * GitHub history for details.
10
+ */
11
+
12
+ /*
13
+ * Licensed to Elasticsearch B.V. under one or more contributor
14
+ * license agreements. See the NOTICE file distributed with
15
+ * this work for additional information regarding copyright
16
+ * ownership. Elasticsearch B.V. licenses this file to you under
17
+ * the Apache License, Version 2.0 (the "License"); you may
18
+ * not use this file except in compliance with the License.
19
+ * You may obtain a copy of the License at
20
+ *
21
+ * http://www.apache.org/licenses/LICENSE-2.0
22
+ *
23
+ * Unless required by applicable law or agreed to in writing,
24
+ * software distributed under the License is distributed on an
25
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
26
+ * KIND, either express or implied. See the License for the
27
+ * specific language governing permissions and limitations
28
+ * under the License.
29
+ */
30
+
31
+ /// <reference types="node" />
32
+
33
+ import { URL } from 'url'
34
+ import { SecureContextOptions } from 'tls';
35
+ import Connection, { AgentOptions } from '../Connection';
36
+ import { nodeFilterFn, nodeSelectorFn } from '../Transport';
37
+
38
+ interface BaseConnectionPoolOptions {
39
+ ssl?: SecureContextOptions;
40
+ agent?: AgentOptions;
41
+ proxy?: string | URL;
42
+ auth?: BasicAuth;
43
+ emit: (event: string | symbol, ...args: any[]) => boolean;
44
+ Connection: typeof Connection;
45
+ }
46
+
47
+ interface ConnectionPoolOptions extends BaseConnectionPoolOptions {
48
+ pingTimeout?: number;
49
+ resurrectStrategy?: 'ping' | 'optimistic' | 'none';
50
+ sniffEnabled?: boolean;
51
+ }
52
+
53
+ interface getConnectionOptions {
54
+ filter?: nodeFilterFn;
55
+ selector?: nodeSelectorFn;
56
+ requestId?: string | number;
57
+ name?: string;
58
+ now?: number;
59
+ }
60
+
61
+ interface BasicAuth {
62
+ username: string;
63
+ password: string;
64
+ }
65
+
66
+ interface resurrectOptions {
67
+ now?: number;
68
+ requestId: string;
69
+ name: string;
70
+ }
71
+
72
+ interface ResurrectEvent {
73
+ strategy: string;
74
+ isAlive: boolean;
75
+ connection: Connection;
76
+ name: string;
77
+ request: {
78
+ id: any;
79
+ };
80
+ }
81
+
82
+
83
+ declare class BaseConnectionPool {
84
+ connections: Connection[];
85
+ size: number;
86
+ emit: (event: string | symbol, ...args: any[]) => boolean;
87
+ _ssl: SecureContextOptions | null;
88
+ _agent: AgentOptions | null;
89
+ _proxy: string | URL;
90
+ auth: BasicAuth;
91
+ Connection: typeof Connection;
92
+ constructor(opts?: BaseConnectionPoolOptions);
93
+ /**
94
+ * Marks a connection as 'alive'.
95
+ * If needed removes the connection from the dead list
96
+ * and then resets the `deadCount`.
97
+ *
98
+ * @param {object} connection
99
+ */
100
+ markAlive(connection: Connection): this;
101
+ /**
102
+ * Marks a connection as 'dead'.
103
+ * If needed adds the connection to the dead list
104
+ * and then increments the `deadCount`.
105
+ *
106
+ * @param {object} connection
107
+ */
108
+ markDead(connection: Connection): this;
109
+ /**
110
+ * Returns an alive connection if present,
111
+ * otherwise returns a dead connection.
112
+ * By default it filters the `master` only nodes.
113
+ * It uses the selector to choose which
114
+ * connection return.
115
+ *
116
+ * @param {object} options (filter and selector)
117
+ * @returns {object|null} connection
118
+ */
119
+ getConnection(opts?: getConnectionOptions): Connection | null;
120
+ /**
121
+ * Adds a new connection to the pool.
122
+ *
123
+ * @param {object|string} host
124
+ * @returns {ConnectionPool}
125
+ */
126
+ addConnection(opts: any): Connection;
127
+ /**
128
+ * Removes a new connection to the pool.
129
+ *
130
+ * @param {object} connection
131
+ * @returns {ConnectionPool}
132
+ */
133
+ removeConnection(connection: Connection): this;
134
+ /**
135
+ * Empties the connection pool.
136
+ *
137
+ * @returns {ConnectionPool}
138
+ */
139
+ empty(): this;
140
+ /**
141
+ * Update the ConnectionPool with new connections.
142
+ *
143
+ * @param {array} array of connections
144
+ * @returns {ConnectionPool}
145
+ */
146
+ update(connections: any[]): this;
147
+ /**
148
+ * Transforms the nodes objects to a host object.
149
+ *
150
+ * @param {object} nodes
151
+ * @returns {array} hosts
152
+ */
153
+ nodesToHost(nodes: any, protocol: string): any[];
154
+ /**
155
+ * Transforms an url string to a host object
156
+ *
157
+ * @param {string} url
158
+ * @returns {object} host
159
+ */
160
+ urlToHost(url: string): { url: URL };
161
+ }
162
+
163
+ declare class ConnectionPool extends BaseConnectionPool {
164
+ static resurrectStrategies: {
165
+ none: number;
166
+ ping: number;
167
+ optimistic: number;
168
+ };
169
+ dead: string[];
170
+ _sniffEnabled: boolean;
171
+ resurrectTimeout: number;
172
+ resurrectTimeoutCutoff: number;
173
+ pingTimeout: number;
174
+ resurrectStrategy: number;
175
+ constructor(opts?: ConnectionPoolOptions);
176
+
177
+ /**
178
+ * If enabled, tries to resurrect a connection with the given
179
+ * resurrect strategy ('ping', 'optimistic', 'none').
180
+ *
181
+ * @param {object} { now, requestId, name }
182
+ * @param {function} callback (isAlive, connection)
183
+ */
184
+ resurrect(opts: resurrectOptions, callback?: (isAlive: boolean | null, connection: Connection | null) => void): void;
185
+ }
186
+
187
+ declare class CloudConnectionPool extends BaseConnectionPool {
188
+ cloudConnection: Connection | null
189
+ constructor(opts?: BaseConnectionPoolOptions);
190
+ getConnection(): Connection | null;
191
+ }
192
+
193
+ declare function defaultNodeFilter(node: Connection): boolean;
194
+ declare function roundRobinSelector(): (connections: Connection[]) => Connection;
195
+ declare function randomSelector(connections: Connection[]): Connection;
196
+
197
+ declare const internals: {
198
+ defaultNodeFilter: typeof defaultNodeFilter;
199
+ roundRobinSelector: typeof roundRobinSelector;
200
+ randomSelector: typeof randomSelector;
201
+ };
202
+
203
+ export {
204
+ // Interfaces
205
+ ConnectionPoolOptions,
206
+ getConnectionOptions,
207
+ BasicAuth,
208
+ internals,
209
+ resurrectOptions,
210
+ ResurrectEvent,
211
+ // Classes
212
+ BaseConnectionPool,
213
+ ConnectionPool,
214
+ CloudConnectionPool
215
+ };
@@ -0,0 +1,41 @@
1
+ /*
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ *
4
+ * The OpenSearch Contributors require contributions made to
5
+ * this file be licensed under the Apache-2.0 license or a
6
+ * compatible open source license.
7
+ *
8
+ * Modifications Copyright OpenSearch Contributors. See
9
+ * GitHub history for details.
10
+ */
11
+
12
+ /*
13
+ * Licensed to Elasticsearch B.V. under one or more contributor
14
+ * license agreements. See the NOTICE file distributed with
15
+ * this work for additional information regarding copyright
16
+ * ownership. Elasticsearch B.V. licenses this file to you under
17
+ * the Apache License, Version 2.0 (the "License"); you may
18
+ * not use this file except in compliance with the License.
19
+ * You may obtain a copy of the License at
20
+ *
21
+ * http://www.apache.org/licenses/LICENSE-2.0
22
+ *
23
+ * Unless required by applicable law or agreed to in writing,
24
+ * software distributed under the License is distributed on an
25
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
26
+ * KIND, either express or implied. See the License for the
27
+ * specific language governing permissions and limitations
28
+ * under the License.
29
+ */
30
+
31
+ 'use strict'
32
+
33
+ const BaseConnectionPool = require('./BaseConnectionPool')
34
+ const ConnectionPool = require('./ConnectionPool')
35
+ const CloudConnectionPool = require('./CloudConnectionPool')
36
+
37
+ module.exports = {
38
+ BaseConnectionPool,
39
+ ConnectionPool,
40
+ CloudConnectionPool
41
+ }
package/package.json ADDED
@@ -0,0 +1,102 @@
1
+ {
2
+ "name": "@opensearch-project/opensearch",
3
+ "description": "The official OpenSearch client for Node.js",
4
+ "main": "index.js",
5
+ "types": "index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "require": "./index.js",
9
+ "import": "./index.mjs"
10
+ },
11
+ "./": "./"
12
+ },
13
+ "homepage": "https://www.opensearch.org/",
14
+ "version": "1.0.0",
15
+ "versionCanary": "7.10.0-canary.6",
16
+ "keywords": [
17
+ "opensearch",
18
+ "opensearchDashboards",
19
+ "mapping",
20
+ "REST",
21
+ "search",
22
+ "client",
23
+ "index"
24
+ ],
25
+ "scripts": {
26
+ "test": "npm run lint && tap test/{unit,acceptance}/{*,**/*}.test.js && npm run test:types",
27
+ "test:unit": "tap test/unit/{*,**/*}.test.js",
28
+ "test:acceptance": "tap test/acceptance/*.test.js",
29
+ "test:integration": "node test/integration/index.js",
30
+ "test:integration:helpers": "tap test/integration/helpers/*.test.js",
31
+ "test:integration:helpers-secure": "tap test/integration/helpers-secure/*.test.js",
32
+ "test:types": "tsd",
33
+ "test:coverage-90": "tap test/{unit,acceptance}/{*,**/*}.test.js --coverage --branches=90 --functions=90 --lines=90 --statements=90 --nyc-arg=\"--exclude=api\"",
34
+ "test:coverage-report": "tap test/{unit,acceptance}/{*,**/*}.test.js --coverage --branches=90 --functions=90 --lines=90 --statements=90 --nyc-arg=\"--exclude=api\" && nyc report --reporter=text-lcov > coverage.lcov",
35
+ "test:coverage-ui": "tap test/{unit,acceptance}/{*,**/*}.test.js --coverage --coverage-report=html --nyc-arg=\"--exclude=api\"",
36
+ "lint": "standard",
37
+ "lint:fix": "standard --fix",
38
+ "license-checker": "license-checker --production --onlyAllow='MIT;Apache-2.0;Apache1.1;ISC;BSD-3-Clause;BSD-2-Clause'",
39
+ "build-esm": "npx gen-esm-wrapper . index.mjs && standard --fix index.mjs"
40
+ },
41
+ "author": "opensearch-project",
42
+ "original-author": {
43
+ "name": "Spencer Alger",
44
+ "company": "Elasticsearch BV"
45
+ },
46
+ "devDependencies": {
47
+ "@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1",
48
+ "@types/node": "^15.3.1",
49
+ "convert-hrtime": "^5.0.0",
50
+ "cross-zip": "^4.0.0",
51
+ "dedent": "^0.7.0",
52
+ "deepmerge": "^4.2.2",
53
+ "dezalgo": "^1.0.3",
54
+ "fast-deep-equal": "^3.1.3",
55
+ "into-stream": "^6.0.0",
56
+ "js-yaml": "^4.1.0",
57
+ "license-checker": "^25.0.1",
58
+ "minimist": "^1.2.5",
59
+ "node-fetch": "^2.6.1",
60
+ "ora": "^5.4.0",
61
+ "pretty-hrtime": "^1.0.3",
62
+ "proxy": "^1.0.2",
63
+ "rimraf": "^3.0.2",
64
+ "semver": "^7.3.5",
65
+ "simple-git": "^2.39.0",
66
+ "simple-statistics": "^7.7.0",
67
+ "split2": "^3.2.2",
68
+ "standard": "^16.0.3",
69
+ "stoppable": "^1.1.0",
70
+ "tap": "^15.0.9",
71
+ "tsd": "^0.15.1",
72
+ "workq": "^3.0.0",
73
+ "xmlbuilder2": "^2.4.1"
74
+ },
75
+ "dependencies": {
76
+ "debug": "^4.3.1",
77
+ "hpagent": "^0.1.1",
78
+ "ms": "^2.1.3",
79
+ "secure-json-parse": "^2.4.0"
80
+ },
81
+ "license": "Apache-2.0",
82
+ "repository": {
83
+ "type": "git",
84
+ "url": "https://github.com/opensearch-project/opensearch-js.git"
85
+ },
86
+ "bugs": {
87
+ "url": "https://github.com/opensearch-project/opensearch-js/issues"
88
+ },
89
+ "engines": {
90
+ "node": ">=10"
91
+ },
92
+ "tsd": {
93
+ "directory": "test/types"
94
+ },
95
+ "tap": {
96
+ "ts": false,
97
+ "jsx": false,
98
+ "flow": false,
99
+ "coverage": false,
100
+ "jobs-auto": true
101
+ }
102
+ }