@dnv-plant/typescriptpws 1.0.64 → 1.0.65
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/index.ts +2 -2
- package/package.json +1 -1
- package/src/calculations/applicationTools.ts +2 -2
- package/src/calculations/discharge.ts +2 -2
- package/src/calculations/dispersion.ts +2 -2
- package/src/calculations/dispersionView.ts +2 -2
- package/src/calculations/fireball.ts +2 -2
- package/src/calculations/jetFire.ts +2 -2
- package/src/calculations/lateExplosion.ts +2 -2
- package/src/calculations/linkedRunners.ts +2 -2
- package/src/calculations/poolFire.ts +2 -2
- package/src/calculations/properties.ts +2 -2
- package/src/calculations/radiation.ts +2 -2
- package/src/calculations/standalones.ts +2 -2
- package/src/calculations/toxics.ts +2 -2
- package/src/calculations/utilities.ts +2 -2
- package/src/constants.ts +2 -2
- package/src/entities.ts +2 -2
- package/src/entity-schemas.ts +2 -2
- package/src/enums.ts +2 -2
- package/src/materials.ts +2 -2
- package/src/utilities.ts +24 -8
package/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/index.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:45
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
package/src/constants.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:42
|
|
5
5
|
* Template: templates/typescriptpws/constants.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
package/src/entities.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:44
|
|
5
5
|
* Template: templates/typescriptpws/entities.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
package/src/entity-schemas.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:44
|
|
5
5
|
* Template: templates/typescriptpws/entityschemas.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
package/src/enums.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:43
|
|
5
5
|
* Template: templates/typescriptpws/enums.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
package/src/materials.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:42
|
|
5
5
|
* Template: templates/typescriptpws/materials.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
package/src/utilities.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time: 04 Apr 2025
|
|
3
|
+
* Version: 1.0.65
|
|
4
|
+
* Date/time: 04 Apr 2025 16:39:41
|
|
5
5
|
* Template: templates/typescriptpws/utilities.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -10,15 +10,28 @@ import axios, { AxiosResponse } from "axios";
|
|
|
10
10
|
|
|
11
11
|
import { REST_API_URI, PWS_CLIENT_ID, REST_API_VERSION } from "./constants";
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
const accessTokenKey = "__pwsAccessToken";
|
|
14
|
+
const usedInDnvKey = "__pwsUsedInDnvKey";
|
|
15
|
+
|
|
16
|
+
(globalThis as any)[accessTokenKey] = (globalThis as any)[accessTokenKey] || "";
|
|
17
|
+
(globalThis as any)[usedInDnvKey] = (globalThis as any)[usedInDnvKey] || false;
|
|
15
18
|
|
|
16
19
|
export function getAccessToken(): string {
|
|
17
|
-
return (globalThis as any)[
|
|
20
|
+
return (globalThis as any)[accessTokenKey];
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
export function setAccessToken(token: string) {
|
|
21
|
-
(globalThis as any)[
|
|
24
|
+
(globalThis as any)[accessTokenKey] = token;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// For DNV use only
|
|
28
|
+
function isUsedInDnvProduct(): boolean {
|
|
29
|
+
return (globalThis as any)[usedInDnvKey];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// For DNV use only
|
|
33
|
+
export function setUsedInDnvProduct(value: boolean) {
|
|
34
|
+
(globalThis as any)[usedInDnvKey] = value;
|
|
22
35
|
}
|
|
23
36
|
|
|
24
37
|
// Get headers for requests
|
|
@@ -143,6 +156,11 @@ function getAccessTokenInfo(accessToken: string): [string, string, boolean] {
|
|
|
143
156
|
function getApiRoot() {
|
|
144
157
|
const accessToken = getAccessToken();
|
|
145
158
|
const devMode = process.env.DEV_MODE || false;
|
|
159
|
+
const isDnvProduct = isUsedInDnvProduct();
|
|
160
|
+
|
|
161
|
+
if (isDnvProduct) {
|
|
162
|
+
return "/api/";
|
|
163
|
+
}
|
|
146
164
|
|
|
147
165
|
if (accessToken) {
|
|
148
166
|
const [platform] = getAccessTokenInfo(accessToken);
|
|
@@ -150,8 +168,6 @@ function getApiRoot() {
|
|
|
150
168
|
// Determine API root based on devMode
|
|
151
169
|
const apiTarget = devMode ? "/api/" : `${platform}/api/`;
|
|
152
170
|
|
|
153
|
-
console.log("apiTarget:", apiTarget)
|
|
154
|
-
|
|
155
171
|
return apiTarget;
|
|
156
172
|
}
|
|
157
173
|
|