@elastic/ems-client 7.14.0 → 8.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.
- package/CHANGELOG.md +24 -0
- package/package.json +2 -2
- package/src/ems_client.ts +66 -74
- package/src/file_layer.ts +1 -2
- package/src/index.ts +1 -1
- package/src/tms_service.ts +46 -54
- package/target/index.d.ts +1 -1
- package/target/node/ems_client.js +11 -10
- package/target/node/file_layer.js +4 -5
- package/target/node/index.js +10 -4
- package/target/web/ems_client.js +29 -21
- package/target/web/file_layer.js +4 -5
- package/target/web/index.js +1 -1
- package/target/web/tms_service.js +4 -4
- package/test/ems_client_util.ts +4 -4
- package/api-extractor.json +0 -364
- package/etc/ems-client.api.md +0 -154
- package/target/umd/ems_client.js +0 -780
- package/target/umd/ems_service.js +0 -125
- package/target/umd/file_layer.js +0 -158
- package/target/umd/index.js +0 -43
- package/target/umd/origin.js +0 -44
- package/target/umd/tms_service.js +0 -775
- package/target/umd/utils.js +0 -61
package/target/umd/utils.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
if (typeof define === "function" && define.amd) {
|
|
3
|
-
define(["exports"], factory);
|
|
4
|
-
} else if (typeof exports !== "undefined") {
|
|
5
|
-
factory(exports);
|
|
6
|
-
} else {
|
|
7
|
-
var mod = {
|
|
8
|
-
exports: {}
|
|
9
|
-
};
|
|
10
|
-
factory(mod.exports);
|
|
11
|
-
global.utils = mod.exports;
|
|
12
|
-
}
|
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
|
|
14
|
-
"use strict";
|
|
15
|
-
|
|
16
|
-
Object.defineProperty(_exports, "__esModule", {
|
|
17
|
-
value: true
|
|
18
|
-
});
|
|
19
|
-
_exports.toAbsoluteUrl = toAbsoluteUrl;
|
|
20
|
-
|
|
21
|
-
/*
|
|
22
|
-
* Licensed to Elasticsearch B.V. under one or more contributor
|
|
23
|
-
* license agreements. See the NOTICE file distributed with
|
|
24
|
-
* this work for additional information regarding copyright
|
|
25
|
-
* ownership. Elasticsearch B.V. licenses this file to you under
|
|
26
|
-
* the Apache License, Version 2.0 (the "License"); you may
|
|
27
|
-
* not use this file except in compliance with the License.
|
|
28
|
-
* You may obtain a copy of the License at
|
|
29
|
-
*
|
|
30
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
31
|
-
*
|
|
32
|
-
* Unless required by applicable law or agreed to in writing,
|
|
33
|
-
* software distributed under the License is distributed on an
|
|
34
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
35
|
-
* KIND, either express or implied. See the License for the
|
|
36
|
-
* specific language governing permissions and limitations
|
|
37
|
-
* under the License.
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Resolves a target URL path relative to the host.
|
|
42
|
-
* This is specifically useed by the Kibana proxy re-routing.
|
|
43
|
-
* It also handles trailing slashes in tileApiUrl and fileApiUrl parameters.
|
|
44
|
-
*/
|
|
45
|
-
function toAbsoluteUrl(host, path) {
|
|
46
|
-
if (!host) {
|
|
47
|
-
return path;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
var hostEndWithSlash = host[host.length - 1] === '/';
|
|
51
|
-
var pathStartsWithSlash = path[0] === '/';
|
|
52
|
-
|
|
53
|
-
if (hostEndWithSlash === true && pathStartsWithSlash === true) {
|
|
54
|
-
return host + path.slice(1);
|
|
55
|
-
} else if (hostEndWithSlash !== pathStartsWithSlash) {
|
|
56
|
-
return host + path;
|
|
57
|
-
} else {
|
|
58
|
-
return host + '/' + path;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|