@dynatrace-sdk/app-utils
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -5,2 +5,8 @@ # App Utils | ||
## 0.4.3 | ||
### Patch Changes | ||
- Fix a bug where an app function could not have been called from another app function. | ||
## 0.4.2 | ||
@@ -7,0 +13,0 @@ |
@@ -45,10 +45,6 @@ /** | ||
async call(functionName, options) { | ||
const url = new URL( | ||
`/api/${functionName}`, | ||
`${location.protocol}//${location.host}` | ||
).toString(); | ||
const method = options?.data ? "POST" : "GET"; | ||
const body = options?.data ? JSON.stringify(options.data) : void 0; | ||
const signal = options?.abortSignal; | ||
const response = await fetch(url, { body, method, signal }); | ||
const response = await fetch(`/api/${functionName}`, { body, method, signal }); | ||
if (!response.ok) { | ||
@@ -55,0 +51,0 @@ throw new Error( |
@@ -0,1 +1,2 @@ | ||
# App Utils | ||
@@ -5,15 +6,10 @@ | ||
import NpmLogo from "@site/static/img/npm-logo.png"; | ||
import NpmLogo from '@site/static/img/npm-logo.png'; | ||
<div class="row margin-bottom--md"> | ||
<div class="col"> | ||
<a href="https://www.npmjs.com/package/@dynatrace-sdk/app-utils"> | ||
<span class="margin-right--xs">@dynatrace-sdk/app-utils</span> | ||
<img className="no-zoom" width="20px" src={NpmLogo} /> | ||
</a> | ||
<a href="https://www.npmjs.com/package/@dynatrace-sdk/app-utils" target="_blank" rel="noopener noreferrer"> <span class="margin-right--xs">@dynatrace-sdk/app-utils</span> <img className="no-zoom" width="20px" src={NpmLogo} /> </a> | ||
</div> | ||
<div class="col" style={{ textAlign: "right" }}> | ||
<a href="https://www.npmjs.com/package/@dynatrace-sdk/app-utils/v/0.4.2"> | ||
v0.4.2 | ||
</a> | ||
<div class="col" style={{textAlign: 'right'}}> | ||
<a href="https://www.npmjs.com/package/@dynatrace-sdk/app-utils/v/0.4.3" target="_blank" rel="noopener noreferrer">v0.4.3</a> | ||
</div> | ||
@@ -26,2 +22,3 @@ </div> | ||
## Variables | ||
@@ -37,4 +34,7 @@ | ||
</div> | ||
## Namespaces | ||
@@ -45,4 +45,3 @@ | ||
<div class="padding-bottom--md"> | ||
The functions namespace contains all the functions available as a convenience | ||
layer to communicate with functions. | ||
The functions namespace contains all the functions available as a convenience layer to communicate with functions. | ||
</div> | ||
@@ -75,1 +74,2 @@ | ||
</div> | ||
@@ -20,10 +20,6 @@ /** | ||
async call(functionName, options) { | ||
const url = new URL( | ||
`/api/${functionName}`, | ||
`${location.protocol}//${location.host}` | ||
).toString(); | ||
const method = options?.data ? "POST" : "GET"; | ||
const body = options?.data ? JSON.stringify(options.data) : void 0; | ||
const signal = options?.abortSignal; | ||
const response = await fetch(url, { body, method, signal }); | ||
const response = await fetch(`/api/${functionName}`, { body, method, signal }); | ||
if (!response.ok) { | ||
@@ -30,0 +26,0 @@ throw new Error( |
{ | ||
"name": "@dynatrace-sdk/app-utils", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "description": "Utilities for app function executions.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18094
106