@toptal/davinci-cli-shared 2.1.0 → 2.1.1-alpha-temp-debug-logs-ddc5a51f.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/davinci-cli-shared",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1-alpha-temp-debug-logs-ddc5a51f.2+ddc5a51f",
|
|
4
4
|
"description": "Shared CLI code and CLI engine for davinci",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -36,5 +36,6 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@jest/globals": "28.1.0"
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
|
+
"gitHead": "ddc5a51f7f07bdd37f8a69075e8df1508e9da704"
|
|
40
41
|
}
|
|
@@ -8,6 +8,8 @@ import { gatherUsageData } from './usage-data.js'
|
|
|
8
8
|
const sendMetrics = async (startTime, metadata) => {
|
|
9
9
|
const executionTimeNs = Number(process.hrtime.bigint() - startTime)
|
|
10
10
|
|
|
11
|
+
console.log('[DEBUG] pwd: %s', process.cwd())
|
|
12
|
+
|
|
11
13
|
const { commandIdentifier, davinciCommand } = metadata
|
|
12
14
|
|
|
13
15
|
try {
|
|
@@ -7,9 +7,11 @@ import findYarnWorkspaceRoot from 'find-yarn-workspace-root'
|
|
|
7
7
|
|
|
8
8
|
import { isCi } from '../ci.js'
|
|
9
9
|
|
|
10
|
-
const TOPTAL_SSH_REPO_URL_REGEX =
|
|
10
|
+
const TOPTAL_SSH_REPO_URL_REGEX =
|
|
11
|
+
/^git@github\.com:\/?toptal\/([A-Za-z0-9_.-]+)\.git$/
|
|
11
12
|
|
|
12
|
-
const TOPTAL_HTTPS_REPO_URL_REGEX =
|
|
13
|
+
const TOPTAL_HTTPS_REPO_URL_REGEX =
|
|
14
|
+
/^https:\/\/github\.com\/toptal\/([A-Za-z0-9_.-]+)\.git$/
|
|
13
15
|
|
|
14
16
|
const UNKNOWN = '<unknown>'
|
|
15
17
|
|
|
@@ -17,6 +19,8 @@ const getProjectName = async () => {
|
|
|
17
19
|
const gitProcess = await execa('git', ['remote', 'get-url', 'origin'])
|
|
18
20
|
const repoOriginUrl = gitProcess.stdout
|
|
19
21
|
|
|
22
|
+
console.log('[DEBUG] origin: %s', repoOriginUrl)
|
|
23
|
+
|
|
20
24
|
// Not matching with a pattern means that either:
|
|
21
25
|
// 1. Project is not from toptal, so not relevant information
|
|
22
26
|
// 2. Project is not on github, unlikely for toptal
|