@webiny/telemetry 0.0.0-unstable.e622468070 → 0.0.0-unstable.e6f0dc8ca7
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/cli.js +4 -4
- package/package.json +5 -5
- package/react.js +2 -2
package/cli.js
CHANGED
|
@@ -2,7 +2,7 @@ import { globalConfig } from "@webiny/global-config";
|
|
|
2
2
|
import { isCI } from "ci-info";
|
|
3
3
|
import { WTS } from "wts-client/node.js";
|
|
4
4
|
import baseSendEvent from "./sendEvent.js";
|
|
5
|
-
import
|
|
5
|
+
import { loadJsonFileSync } from "load-json-file";
|
|
6
6
|
import path from "path";
|
|
7
7
|
|
|
8
8
|
export const sendEvent = async ({ event, user, version, properties }) => {
|
|
@@ -21,7 +21,7 @@ export const sendEvent = async ({ event, user, version, properties }) => {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const packageJsonPath = path.join(import.meta.dirname, "package.json");
|
|
24
|
-
const packageJson =
|
|
24
|
+
const packageJson = loadJsonFileSync(packageJsonPath);
|
|
25
25
|
|
|
26
26
|
return baseSendEvent({
|
|
27
27
|
event,
|
|
@@ -38,8 +38,8 @@ export const sendEvent = async ({ event, user, version, properties }) => {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
const getWcpOrgProjectId = () => {
|
|
41
|
-
// In CLI,
|
|
42
|
-
const id = process.env.WCP_PROJECT_ID;
|
|
41
|
+
// In CLI, project ID is stored in the `WEBINY_PROJECT_ID` or `WCP_PROJECT_ID` environment variable.
|
|
42
|
+
const id = process.env.WEBINY_PROJECT_ID || process.env.WCP_PROJECT_ID;
|
|
43
43
|
if (typeof id === "string") {
|
|
44
44
|
return id.split("/");
|
|
45
45
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/telemetry",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.e6f0dc8ca7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@webiny/global-config": "0.0.0-unstable.
|
|
7
|
+
"@webiny/global-config": "0.0.0-unstable.e6f0dc8ca7",
|
|
8
8
|
"ci-info": "4.4.0",
|
|
9
9
|
"jsesc": "3.1.0",
|
|
10
|
-
"load-json-file": "
|
|
11
|
-
"strip-ansi": "
|
|
10
|
+
"load-json-file": "7.0.1",
|
|
11
|
+
"strip-ansi": "7.2.0",
|
|
12
12
|
"wts-client": "2.0.0"
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public",
|
|
16
16
|
"directory": "."
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "e6f0dc8ca741c1fcc3fec9a5b9e86fdd49544641"
|
|
19
19
|
}
|
package/react.js
CHANGED
|
@@ -31,8 +31,8 @@ export const sendEvent = async (event, properties = {}) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
const getWcpOrgProjectId = () => {
|
|
34
|
-
// In React applications,
|
|
35
|
-
const id = process.env.REACT_APP_WCP_PROJECT_ID;
|
|
34
|
+
// In React applications, project ID is stored in the `REACT_APP_WEBINY_PROJECT_ID` or `REACT_APP_WCP_PROJECT_ID` environment variable.
|
|
35
|
+
const id = process.env.REACT_APP_WEBINY_PROJECT_ID || process.env.REACT_APP_WCP_PROJECT_ID;
|
|
36
36
|
if (typeof id === "string") {
|
|
37
37
|
return id.split("/");
|
|
38
38
|
}
|