Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 89e50f6d04 |
@ -6,3 +6,4 @@ elasticsearch
|
|||||||
lib
|
lib
|
||||||
junit-output
|
junit-output
|
||||||
.tap
|
.tap
|
||||||
|
esm
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -68,3 +68,4 @@ bun.lockb
|
|||||||
test-results
|
test-results
|
||||||
processinfo
|
processinfo
|
||||||
.tap
|
.tap
|
||||||
|
esm
|
||||||
|
|||||||
53
index.mjs
Normal file
53
index.mjs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||||
|
* license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright
|
||||||
|
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||||
|
* the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {
|
||||||
|
Diagnostic,
|
||||||
|
Transport,
|
||||||
|
WeightedConnectionPool,
|
||||||
|
ClusterConnectionPool,
|
||||||
|
BaseConnectionPool,
|
||||||
|
CloudConnectionPool,
|
||||||
|
BaseConnection,
|
||||||
|
HttpConnection,
|
||||||
|
UndiciConnection,
|
||||||
|
Serializer,
|
||||||
|
errors,
|
||||||
|
events
|
||||||
|
} from '@elastic/transport'
|
||||||
|
|
||||||
|
import * as Client from './esm/client'
|
||||||
|
import * as SniffingTransport from './esm/sniffingTransport'
|
||||||
|
|
||||||
|
export {
|
||||||
|
Client,
|
||||||
|
SniffingTransport,
|
||||||
|
Diagnostic,
|
||||||
|
Transport,
|
||||||
|
WeightedConnectionPool,
|
||||||
|
ClusterConnectionPool,
|
||||||
|
BaseConnectionPool,
|
||||||
|
CloudConnectionPool,
|
||||||
|
BaseConnection,
|
||||||
|
HttpConnection,
|
||||||
|
UndiciConnection,
|
||||||
|
Serializer,
|
||||||
|
errors,
|
||||||
|
events
|
||||||
|
}
|
||||||
19
package.json
19
package.json
@ -3,13 +3,18 @@
|
|||||||
"version": "9.0.0-alpha.4",
|
"version": "9.0.0-alpha.4",
|
||||||
"versionCanary": "9.0.0-canary.0",
|
"versionCanary": "9.0.0-canary.0",
|
||||||
"description": "The official Elasticsearch client for Node.js",
|
"description": "The official Elasticsearch client for Node.js",
|
||||||
|
"type": "module",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"types": "index.d.ts",
|
"module": "./index.mjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
"require": "./index.js",
|
".": {
|
||||||
"import": "./index.js",
|
"require": "./index.js",
|
||||||
"types": "./index.d.ts"
|
"import": "./index.mjs"
|
||||||
|
},
|
||||||
|
"./lib/*": "./lib/*.js",
|
||||||
|
"./esm/*": "./esm/*.js"
|
||||||
},
|
},
|
||||||
|
"types": "index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run build && npm run lint && tap",
|
"test": "npm run build && npm run lint && tap",
|
||||||
"test:unit": "npm run build && tap",
|
"test:unit": "npm run build && tap",
|
||||||
@ -23,8 +28,10 @@
|
|||||||
"lint:fix": "ts-standard --fix src",
|
"lint:fix": "ts-standard --fix src",
|
||||||
"license-checker": "license-checker --production --onlyAllow='MIT;Apache-2.0;Apache1.1;ISC;BSD-3-Clause;BSD-2-Clause;0BSD'",
|
"license-checker": "license-checker --production --onlyAllow='MIT;Apache-2.0;Apache1.1;ISC;BSD-3-Clause;BSD-2-Clause;0BSD'",
|
||||||
"prebuild": "npm run clean-build && npm run lint",
|
"prebuild": "npm run clean-build && npm run lint",
|
||||||
"build": "tsc && rm lib/package.json && mv lib/src/* lib/ && rm -rf lib/src",
|
"build": "npm run build:cjs && npm run build:esm",
|
||||||
"clean-build": "rimraf ./lib && mkdir lib",
|
"build:cjs": "tsc --project ./tsconfig.cjs.json && rm lib/package.json && mv lib/src/* lib/ && rm -rf lib/src",
|
||||||
|
"build:esm": "tsc --project ./tsconfig.esm.json && rm esm/package.json && mv esm/src/* esm/ && rm -rf esm/src",
|
||||||
|
"clean-build": "rimraf ./lib && mkdir lib; rimraf ./esm && mkdir esm",
|
||||||
"prepublishOnly": "npm run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
9
tsconfig.cjs.json
Normal file
9
tsconfig.cjs.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "commonjs",
|
||||||
|
"moduleResolution": "node16",
|
||||||
|
"outDir": "lib"
|
||||||
|
}
|
||||||
|
}
|
||||||
9
tsconfig.esm.json
Normal file
9
tsconfig.esm.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "NodeNext",
|
||||||
|
"outDir": "esm"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,8 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2019",
|
"target": "es2022",
|
||||||
"module": "commonjs",
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"pretty": true,
|
"pretty": true,
|
||||||
"noEmitOnError": true,
|
"noEmitOnError": true,
|
||||||
@ -15,13 +14,12 @@
|
|||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"skipLibCheck": false,
|
"skipLibCheck": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"outDir": "lib",
|
|
||||||
"lib": [
|
"lib": [
|
||||||
"ES2019",
|
"es2023",
|
||||||
"dom"
|
"dom"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user