bdy 1.10.5-dev → 1.10.7-dev

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.10.5-dev",
4
+ "version": "1.10.7-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -18,6 +18,10 @@ class TunnelLatency extends events_1.default {
18
18
  check() {
19
19
  if (this.isChecking)
20
20
  return;
21
+ if (!this.port || !this.host) {
22
+ this.latency = -1;
23
+ return;
24
+ }
21
25
  this.isChecking = true;
22
26
  let socket = new net_1.Socket();
23
27
  let ts = null;
@@ -134,6 +134,7 @@ async function getCiAndGitInfo(baseBranch) {
134
134
  const isBuddy = process.env.BUDDY === 'true';
135
135
  const isGithubAction = process.env.GITHUB_ACTIONS === 'true';
136
136
  const isCircleCI = process.env.CIRCLECI === 'true';
137
+ const forceTag = process.env.SNAPSHOTS_TAG;
137
138
  const forceBranch = process.env.SNAPSHOTS_BRANCH;
138
139
  const forceCommit = process.env.SNAPSHOTS_COMMIT;
139
140
  const forceBaseCommit = process.env.SNAPSHOTS_BASE_COMMIT;
@@ -145,6 +146,7 @@ async function getCiAndGitInfo(baseBranch) {
145
146
  (isPR
146
147
  ? process.env.BUDDY_RUN_PR_HEAD_BRANCH
147
148
  : process.env.BUDDY_EXECUTION_BRANCH);
149
+ const tag = forceTag || process.env.BUDDY_EXECUTION_TAG;
148
150
  const commit = forceCommit || process.env.BUDDY_EXECUTION_REVISION;
149
151
  const baseCommit = withoutBaseCommit
150
152
  ? undefined
@@ -157,6 +159,7 @@ async function getCiAndGitInfo(baseBranch) {
157
159
  return {
158
160
  ci: ciInfo_js_1.CI.BUDDY,
159
161
  branch,
162
+ tag,
160
163
  pullRequestNumber: isPR ? pullRequestNumber : undefined,
161
164
  commit,
162
165
  baseCommit,
@@ -170,11 +173,13 @@ async function getCiAndGitInfo(baseBranch) {
170
173
  }
171
174
  if (isGithubAction) {
172
175
  const isPR = process.env.GITHUB_EVENT_NAME === 'pull_request';
176
+ const isTag = process.env.GITHUB_REF_TYPE === 'tag';
173
177
  const pullRequestNumber = isPR && process.env.GITHUB_REF
174
178
  ? Number(process.env.GITHUB_REF.split('/')[2])
175
179
  : undefined;
176
180
  const branch = forceBranch ||
177
181
  (isPR ? process.env.GITHUB_HEAD_REF : process.env.GITHUB_REF_NAME);
182
+ const tag = forceTag || (isTag ? process.env.GITHUB_REF_NAME : undefined);
178
183
  const commit = forceCommit ||
179
184
  (isPR ? await getGithubPullRequestCommit() : process.env.GITHUB_SHA);
180
185
  const baseCommit = withoutBaseCommit
@@ -184,6 +189,7 @@ async function getCiAndGitInfo(baseBranch) {
184
189
  return {
185
190
  ci: ciInfo_js_1.CI.GITHUB_ACTION,
186
191
  branch,
192
+ tag,
187
193
  pullRequestNumber,
188
194
  commit,
189
195
  baseCommit,
@@ -197,6 +203,7 @@ async function getCiAndGitInfo(baseBranch) {
197
203
  ? Number(process.env.CIRCLE_PR_NUMBER)
198
204
  : undefined;
199
205
  const branch = forceBranch || process.env.CIRCLE_BRANCH;
206
+ const tag = forceTag || process.env.CIRCLE_TAG;
200
207
  const commit = forceCommit || process.env.CIRCLE_SHA1;
201
208
  const baseCommit = withoutBaseCommit
202
209
  ? undefined
@@ -204,7 +211,8 @@ async function getCiAndGitInfo(baseBranch) {
204
211
  (isPR ? await getBaseCommit(baseBranch, branch) : undefined);
205
212
  return {
206
213
  ci: ciInfo_js_1.CI.CIRCLE_CI,
207
- branch: process.env.CIRCLE_BRANCH,
214
+ branch,
215
+ tag,
208
216
  pullRequestNumber,
209
217
  commit,
210
218
  baseCommit,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.debug = exports.executionUrl = exports.browserPath = exports.commitDetails = exports.invokerId = exports.executionId = exports.actionId = exports.pipelineName = exports.pipelineId = exports.baseCommit = exports.commit = exports.pullRequestNumber = exports.branch = exports.ci = exports.defaultTimeout = exports.cliId = exports.buildId = exports.token = exports.parallel = exports.skipDiscovery = exports.oneByOne = exports.cliVersion = void 0;
3
+ exports.debug = exports.executionUrl = exports.browserPath = exports.commitDetails = exports.invokerId = exports.executionId = exports.actionId = exports.pipelineName = exports.pipelineId = exports.baseCommit = exports.commit = exports.pullRequestNumber = exports.tag = exports.branch = exports.ci = exports.defaultTimeout = exports.cliId = exports.buildId = exports.token = exports.parallel = exports.skipDiscovery = exports.oneByOne = exports.cliVersion = void 0;
4
4
  exports.setExecOptions = setExecOptions;
5
5
  exports.setBrowserPath = setBrowserPath;
6
6
  exports.setCiAndCommitInfo = setCiAndCommitInfo;
@@ -34,6 +34,7 @@ function setBrowserPath(path) {
34
34
  function setCiAndCommitInfo(ciInfo) {
35
35
  exports.ci = ciInfo.ci;
36
36
  exports.branch = ciInfo.branch;
37
+ exports.tag = ciInfo.tag;
37
38
  exports.pullRequestNumber = ciInfo.pullRequestNumber;
38
39
  exports.commit = ciInfo.commit;
39
40
  exports.baseCommit = ciInfo.baseCommit;
@@ -77,6 +77,7 @@ async function sendSnapshot(snapshot, firstSnapshot) {
77
77
  parallel: context_js_1.parallel,
78
78
  ci: context_js_1.ci,
79
79
  branch: context_js_1.branch,
80
+ tag: context_js_1.tag,
80
81
  pullRequestNumber: context_js_1.pullRequestNumber,
81
82
  commit: context_js_1.commit,
82
83
  baseCommit: context_js_1.baseCommit,
@@ -112,6 +113,7 @@ async function sendSnapshots(snapshots) {
112
113
  parallel: context_js_1.parallel,
113
114
  ci: context_js_1.ci,
114
115
  branch: context_js_1.branch,
116
+ tag: context_js_1.tag,
115
117
  pullRequestNumber: context_js_1.pullRequestNumber,
116
118
  commit: context_js_1.commit,
117
119
  baseCommit: context_js_1.baseCommit,
@@ -167,6 +169,7 @@ async function sendStorybook(snapshots, filePaths) {
167
169
  cliVersion: context_js_1.cliVersion,
168
170
  ci: context_js_1.ci,
169
171
  branch: context_js_1.branch,
172
+ tag: context_js_1.tag,
170
173
  pullRequestNumber: context_js_1.pullRequestNumber,
171
174
  commit: context_js_1.commit,
172
175
  baseCommit: context_js_1.baseCommit,
@@ -211,6 +214,7 @@ async function sendCompareLinks(urls, validatedOptions, sitemapSource) {
211
214
  cliVersion: context_js_1.cliVersion,
212
215
  ci: context_js_1.ci,
213
216
  branch: context_js_1.branch,
217
+ tag: context_js_1.tag,
214
218
  commit: context_js_1.commit,
215
219
  baseCommit: context_js_1.baseCommit,
216
220
  pipelineId: context_js_1.pipelineId,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.10.5-dev",
4
+ "version": "1.10.7-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {