@shopify/cli 3.0.13 → 3.0.14
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 +10 -0
- package/dist/index.js +1 -1
- package/dist/services/monorail.js +10 -2
- package/dist/services/monorail.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @shopify/cli
|
|
2
2
|
|
|
3
|
+
## 3.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [8f82bd36]
|
|
8
|
+
- Updated dependencies [ae3823c8]
|
|
9
|
+
- Updated dependencies [8f82bd36]
|
|
10
|
+
- Updated dependencies [c383ed42]
|
|
11
|
+
- @shopify/cli-kit@3.0.14
|
|
12
|
+
|
|
3
13
|
## 3.0.13
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { http, output, path, store, os, ruby, environment } from '@shopify/cli-kit';
|
|
2
2
|
|
|
3
|
-
var version = "3.0.
|
|
3
|
+
var version = "3.0.14";
|
|
4
4
|
|
|
5
5
|
const url = "https://monorail-edge.shopifysvc.com/v1/produce";
|
|
6
6
|
const reportEvent = async (command, args) => {
|
|
@@ -30,6 +30,14 @@ const buildPayload = async (command, args = [], currentTime) => {
|
|
|
30
30
|
}
|
|
31
31
|
const appInfo = store.getAppInfo(directory);
|
|
32
32
|
const { platform, arch } = os.platformAndArch();
|
|
33
|
+
const rawPartnerId = appInfo?.orgId;
|
|
34
|
+
let partnerIdAsInt;
|
|
35
|
+
if (rawPartnerId !== void 0) {
|
|
36
|
+
partnerIdAsInt = parseInt(rawPartnerId, 10);
|
|
37
|
+
if (isNaN(partnerIdAsInt)) {
|
|
38
|
+
partnerIdAsInt = void 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
33
41
|
return {
|
|
34
42
|
schema_id: "app_cli3_command/1.0",
|
|
35
43
|
payload: {
|
|
@@ -46,7 +54,7 @@ const buildPayload = async (command, args = [], currentTime) => {
|
|
|
46
54
|
node_version: process.version.replace("v", ""),
|
|
47
55
|
is_employee: await environment.local.isShopify(),
|
|
48
56
|
api_key: appInfo?.appId,
|
|
49
|
-
partner_id:
|
|
57
|
+
partner_id: partnerIdAsInt
|
|
50
58
|
}
|
|
51
59
|
};
|
|
52
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monorail.js","sources":["../../src/services/monorail.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport {version} from '../../package.json'\nimport {environment, http, os, output, path, ruby, store} from '@shopify/cli-kit'\n\nexport const url = 'https://monorail-edge.shopifysvc.com/v1/produce'\n\nexport const reportEvent = async (command: string, args: string[]) => {\n const currentTime = new Date().getTime()\n const payload = await buildPayload(command, args, currentTime)\n const body = JSON.stringify(payload)\n const headers = buildHeaders(currentTime)\n\n const response = await http.fetch(url, {method: 'POST', body, headers})\n if (response.status === 200) {\n output.debug(`Analytics event sent: ${body}`)\n } else {\n output.debug(`Failed to report usage analytics: ${response.statusText}`)\n }\n}\n\nconst buildHeaders = (currentTime: number) => {\n return {\n 'Content-Type': 'application/json; charset=utf-8',\n 'X-Monorail-Edge-Event-Created-At-Ms': currentTime.toString(),\n 'X-Monorail-Edge-Event-Sent-At-Ms': currentTime.toString(),\n }\n}\n\nconst buildPayload = async (command: string, args: string[] = [], currentTime: number) => {\n let directory = process.cwd()\n const pathFlagIndex = args.indexOf('--path')\n if (pathFlagIndex >= 0) {\n directory = path.resolve(args[pathFlagIndex + 1])\n }\n const appInfo = store.getAppInfo(directory)\n const {platform, arch} = os.platformAndArch()\n return {\n schema_id: 'app_cli3_command/1.0',\n payload: {\n project_type: 'node',\n command,\n args: args.join(' '),\n time_start: currentTime,\n time_end: currentTime,\n total_time: 0,\n success: true,\n uname: `${platform} ${arch}`,\n cli_version: version,\n ruby_version: (await ruby.version()) || '',\n node_version: process.version.replace('v', ''),\n is_employee: await environment.local.isShopify(),\n api_key: appInfo?.appId,\n partner_id:
|
|
1
|
+
{"version":3,"file":"monorail.js","sources":["../../src/services/monorail.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport {version} from '../../package.json'\nimport {environment, http, os, output, path, ruby, store} from '@shopify/cli-kit'\n\nexport const url = 'https://monorail-edge.shopifysvc.com/v1/produce'\n\nexport const reportEvent = async (command: string, args: string[]) => {\n const currentTime = new Date().getTime()\n const payload = await buildPayload(command, args, currentTime)\n const body = JSON.stringify(payload)\n const headers = buildHeaders(currentTime)\n\n const response = await http.fetch(url, {method: 'POST', body, headers})\n if (response.status === 200) {\n output.debug(`Analytics event sent: ${body}`)\n } else {\n output.debug(`Failed to report usage analytics: ${response.statusText}`)\n }\n}\n\nconst buildHeaders = (currentTime: number) => {\n return {\n 'Content-Type': 'application/json; charset=utf-8',\n 'X-Monorail-Edge-Event-Created-At-Ms': currentTime.toString(),\n 'X-Monorail-Edge-Event-Sent-At-Ms': currentTime.toString(),\n }\n}\n\nconst buildPayload = async (command: string, args: string[] = [], currentTime: number) => {\n let directory = process.cwd()\n const pathFlagIndex = args.indexOf('--path')\n if (pathFlagIndex >= 0) {\n directory = path.resolve(args[pathFlagIndex + 1])\n }\n const appInfo = store.getAppInfo(directory)\n const {platform, arch} = os.platformAndArch()\n\n const rawPartnerId = appInfo?.orgId\n let partnerIdAsInt: number | undefined\n if (rawPartnerId !== undefined) {\n partnerIdAsInt = parseInt(rawPartnerId, 10)\n if (isNaN(partnerIdAsInt)) {\n partnerIdAsInt = undefined\n }\n }\n\n return {\n schema_id: 'app_cli3_command/1.0',\n payload: {\n project_type: 'node',\n command,\n args: args.join(' '),\n time_start: currentTime,\n time_end: currentTime,\n total_time: 0,\n success: true,\n uname: `${platform} ${arch}`,\n cli_version: version,\n ruby_version: (await ruby.version()) || '',\n node_version: process.version.replace('v', ''),\n is_employee: await environ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AAM,WAAY,CAAA,KAAA,CAAM,SAAU,EAAA;AAAA,MAC/C,SAAS,OAAS,EAAA,KAAA;AAAA,MAClB,UAAY,EAAA,cAAA;AAAA,KACd;AAAA,GACF,CAAA;AACF,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A CLI tool to build for the Shopify platform",
|
|
6
6
|
"type": "module",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@oclif/core": "1.9.0",
|
|
52
52
|
"@oclif/plugin-help": "^5.1.12",
|
|
53
53
|
"@oclif/plugin-plugins": "^2.1.0",
|
|
54
|
-
"@shopify/cli-kit": "3.0.
|
|
54
|
+
"@shopify/cli-kit": "3.0.14",
|
|
55
55
|
"@shopify/plugin-ngrok": "^0.2.6"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|