@postman-cse/onboarding-bootstrap 1.2.3 → 1.2.4

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/dist/action.cjs CHANGED
@@ -49878,7 +49878,65 @@ function norm(value) {
49878
49878
  const trimmed = (value ?? "").trim();
49879
49879
  return trimmed.length > 0 ? trimmed : void 0;
49880
49880
  }
49881
+ function detectEventTrigger(env = process.env) {
49882
+ const ghEvent = norm(env.GITHUB_EVENT_NAME)?.toLowerCase();
49883
+ if (ghEvent) {
49884
+ if (ghEvent === "push")
49885
+ return "push";
49886
+ if (ghEvent === "pull_request" || ghEvent === "pull_request_target")
49887
+ return "pull_request";
49888
+ if (ghEvent === "schedule")
49889
+ return "schedule";
49890
+ if (ghEvent === "workflow_dispatch" || ghEvent === "repository_dispatch")
49891
+ return "manual";
49892
+ return "other";
49893
+ }
49894
+ const glSource = norm(env.CI_PIPELINE_SOURCE)?.toLowerCase();
49895
+ if (glSource) {
49896
+ if (glSource === "push")
49897
+ return "push";
49898
+ if (glSource === "merge_request_event")
49899
+ return "pull_request";
49900
+ if (glSource === "schedule")
49901
+ return "schedule";
49902
+ if (glSource === "web" || glSource === "api" || glSource === "trigger" || glSource === "pipeline") {
49903
+ return "manual";
49904
+ }
49905
+ return "other";
49906
+ }
49907
+ if (norm(env.BITBUCKET_PR_ID))
49908
+ return "pull_request";
49909
+ if (norm(env.CI) || norm(env.BUILD_BUILDID) || norm(env.JENKINS_URL) || norm(env.TEAMCITY_VERSION)) {
49910
+ return "other";
49911
+ }
49912
+ return "unknown";
49913
+ }
49914
+ function detectRunnerOs(env = process.env) {
49915
+ const runnerOs = norm(env.RUNNER_OS)?.toLowerCase();
49916
+ if (runnerOs === "linux")
49917
+ return "linux";
49918
+ if (runnerOs === "macos")
49919
+ return "macos";
49920
+ if (runnerOs === "windows")
49921
+ return "windows";
49922
+ const platform2 = typeof process !== "undefined" ? process.platform : void 0;
49923
+ if (platform2 === "linux")
49924
+ return "linux";
49925
+ if (platform2 === "darwin")
49926
+ return "macos";
49927
+ if (platform2 === "win32")
49928
+ return "windows";
49929
+ return "unknown";
49930
+ }
49881
49931
  function detectCiContext(env = process.env) {
49932
+ const provider = detectCiProviderContext(env);
49933
+ return {
49934
+ ...provider,
49935
+ eventTrigger: detectEventTrigger(env),
49936
+ runnerOs: detectRunnerOs(env)
49937
+ };
49938
+ }
49939
+ function detectCiProviderContext(env = process.env) {
49882
49940
  if (norm(env.GITHUB_ACTIONS)) {
49883
49941
  const runnerEnv = norm(env.RUNNER_ENVIRONMENT);
49884
49942
  const runnerKind = runnerEnv === "github-hosted" ? "hosted" : runnerEnv === "self-hosted" ? "self-hosted" : "unknown";
@@ -50016,25 +50074,49 @@ function parseProvider2(explicitProvider, repoUrl, env) {
50016
50074
  }
50017
50075
  return "unknown";
50018
50076
  }
50077
+ function classifyRefKind(env = process.env) {
50078
+ const githubRefType = normalize2(env.GITHUB_REF_TYPE)?.toLowerCase();
50079
+ const githubRef = normalize2(env.GITHUB_REF);
50080
+ const azureRef = normalize2(env.BUILD_SOURCEBRANCH);
50081
+ if (githubRefType === "tag" || githubRef?.startsWith("refs/tags/") || normalize2(env.CI_COMMIT_TAG) || normalize2(env.BITBUCKET_TAG) || azureRef?.startsWith("refs/tags/")) {
50082
+ return "tag";
50083
+ }
50084
+ const githubRefName = normalize2(env.GITHUB_REF_NAME);
50085
+ const githubDefault = normalize2(env.GITHUB_DEFAULT_BRANCH);
50086
+ if (githubRefName && githubDefault) {
50087
+ return githubRefName === githubDefault ? "default-branch" : "branch";
50088
+ }
50089
+ const gitlabRef = normalize2(env.CI_COMMIT_REF_NAME);
50090
+ const gitlabDefault = normalize2(env.CI_DEFAULT_BRANCH);
50091
+ if (gitlabRef && gitlabDefault) {
50092
+ return gitlabRef === gitlabDefault ? "default-branch" : "branch";
50093
+ }
50094
+ if (githubRefName || githubRef?.startsWith("refs/heads/") || gitlabRef || normalize2(env.BITBUCKET_BRANCH) || normalize2(env.BUILD_SOURCEBRANCHNAME) || azureRef?.startsWith("refs/heads/")) {
50095
+ return "branch";
50096
+ }
50097
+ return "unknown";
50098
+ }
50019
50099
  function detectRepoContext2(input, env = process.env) {
50020
50100
  const repoUrl = normalizeRepoUrl2(input.repoUrl) ?? normalizeRepoUrl2(env.GITHUB_SERVER_URL && env.GITHUB_REPOSITORY ? `${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}` : void 0) ?? normalizeRepoUrl2(env.CI_PROJECT_URL) ?? normalizeRepoUrl2(env.BITBUCKET_GIT_HTTP_ORIGIN) ?? normalizeRepoUrl2(env.BUILD_REPOSITORY_URI);
50021
50101
  const repoSlug = normalize2(input.repoSlug) ?? normalize2(env.GITHUB_REPOSITORY) ?? normalize2(env.CI_PROJECT_PATH) ?? (env.BITBUCKET_WORKSPACE && env.BITBUCKET_REPO_SLUG ? normalize2(`${env.BITBUCKET_WORKSPACE}/${env.BITBUCKET_REPO_SLUG}`) : void 0) ?? normalize2(env.BUILD_REPOSITORY_NAME);
50022
50102
  const ref = normalize2(input.ref) ?? normalize2(env.GITHUB_REF_NAME) ?? normalize2(env.CI_COMMIT_REF_NAME) ?? normalize2(env.BITBUCKET_BRANCH) ?? normalize2(env.BUILD_SOURCEBRANCHNAME);
50023
50103
  const sha = normalize2(input.sha) ?? normalize2(env.GITHUB_SHA) ?? normalize2(env.CI_COMMIT_SHA) ?? normalize2(env.BITBUCKET_COMMIT) ?? normalize2(env.BUILD_SOURCEVERSION);
50024
50104
  const provider = parseProvider2(input.gitProvider, repoUrl, env);
50105
+ const refKind = classifyRefKind(env);
50025
50106
  return {
50026
50107
  provider,
50027
50108
  repoUrl,
50028
50109
  repoSlug,
50029
50110
  ref,
50030
- sha
50111
+ sha,
50112
+ refKind
50031
50113
  };
50032
50114
  }
50033
50115
 
50034
50116
  // node_modules/@postman-cse/automation-telemetry-core/dist/telemetry.js
50035
50117
  var import_node_crypto2 = require("node:crypto");
50036
50118
  var import_undici2 = __toESM(require_undici(), 1);
50037
- var SCHEMA_VERSION = 2;
50119
+ var SCHEMA_VERSION = 3;
50038
50120
  var DEFAULT_TIMEOUT_MS = 1500;
50039
50121
  var DEFAULT_ENDPOINT = "https://events.pm-cse.dev/v1/events";
50040
50122
  var proxyDispatcher;
@@ -50045,7 +50127,7 @@ function resolveActionVersion(explicit) {
50045
50127
  if (explicit) {
50046
50128
  return explicit;
50047
50129
  }
50048
- return "1.2.3" ? "1.2.3" : "unknown";
50130
+ return "1.2.4" ? "1.2.4" : "unknown";
50049
50131
  }
50050
50132
  function telemetryDisabled(env) {
50051
50133
  const flag = String(env.POSTMAN_ACTIONS_TELEMETRY ?? "").trim().toLowerCase();
@@ -50074,7 +50156,7 @@ function maybeNotice(logger) {
50074
50156
  return;
50075
50157
  }
50076
50158
  noticeShown = true;
50077
- logger.info("note: postman-actions sends anonymous usage data (team id, action, CI provider, account type). Disable with POSTMAN_ACTIONS_TELEMETRY=off or DO_NOT_TRACK=1.");
50159
+ logger.info("note: postman-actions sends anonymous usage data (team id, action, CI provider, account type, run trigger, runner OS). Disable with POSTMAN_ACTIONS_TELEMETRY=off or DO_NOT_TRACK=1.");
50078
50160
  }
50079
50161
  function buildTelemetryEvent(params) {
50080
50162
  const { action, actionVersion, teamId, accountType, outcome, env, now } = params;
@@ -50096,6 +50178,9 @@ function buildTelemetryEvent(params) {
50096
50178
  repo_id: repoSource ? sha2562(repoSource) : void 0,
50097
50179
  org_id: owner ? sha2562(owner) : void 0,
50098
50180
  account_type: accountType,
50181
+ event_trigger: ci.eventTrigger,
50182
+ runner_os: ci.runnerOs,
50183
+ ref_kind: repo.refKind,
50099
50184
  outcome,
50100
50185
  ts: now()
50101
50186
  };
package/dist/cli.cjs CHANGED
@@ -48197,7 +48197,65 @@ function norm(value) {
48197
48197
  const trimmed = (value ?? "").trim();
48198
48198
  return trimmed.length > 0 ? trimmed : void 0;
48199
48199
  }
48200
+ function detectEventTrigger(env = process.env) {
48201
+ const ghEvent = norm(env.GITHUB_EVENT_NAME)?.toLowerCase();
48202
+ if (ghEvent) {
48203
+ if (ghEvent === "push")
48204
+ return "push";
48205
+ if (ghEvent === "pull_request" || ghEvent === "pull_request_target")
48206
+ return "pull_request";
48207
+ if (ghEvent === "schedule")
48208
+ return "schedule";
48209
+ if (ghEvent === "workflow_dispatch" || ghEvent === "repository_dispatch")
48210
+ return "manual";
48211
+ return "other";
48212
+ }
48213
+ const glSource = norm(env.CI_PIPELINE_SOURCE)?.toLowerCase();
48214
+ if (glSource) {
48215
+ if (glSource === "push")
48216
+ return "push";
48217
+ if (glSource === "merge_request_event")
48218
+ return "pull_request";
48219
+ if (glSource === "schedule")
48220
+ return "schedule";
48221
+ if (glSource === "web" || glSource === "api" || glSource === "trigger" || glSource === "pipeline") {
48222
+ return "manual";
48223
+ }
48224
+ return "other";
48225
+ }
48226
+ if (norm(env.BITBUCKET_PR_ID))
48227
+ return "pull_request";
48228
+ if (norm(env.CI) || norm(env.BUILD_BUILDID) || norm(env.JENKINS_URL) || norm(env.TEAMCITY_VERSION)) {
48229
+ return "other";
48230
+ }
48231
+ return "unknown";
48232
+ }
48233
+ function detectRunnerOs(env = process.env) {
48234
+ const runnerOs = norm(env.RUNNER_OS)?.toLowerCase();
48235
+ if (runnerOs === "linux")
48236
+ return "linux";
48237
+ if (runnerOs === "macos")
48238
+ return "macos";
48239
+ if (runnerOs === "windows")
48240
+ return "windows";
48241
+ const platform2 = typeof process !== "undefined" ? process.platform : void 0;
48242
+ if (platform2 === "linux")
48243
+ return "linux";
48244
+ if (platform2 === "darwin")
48245
+ return "macos";
48246
+ if (platform2 === "win32")
48247
+ return "windows";
48248
+ return "unknown";
48249
+ }
48200
48250
  function detectCiContext(env = process.env) {
48251
+ const provider = detectCiProviderContext(env);
48252
+ return {
48253
+ ...provider,
48254
+ eventTrigger: detectEventTrigger(env),
48255
+ runnerOs: detectRunnerOs(env)
48256
+ };
48257
+ }
48258
+ function detectCiProviderContext(env = process.env) {
48201
48259
  if (norm(env.GITHUB_ACTIONS)) {
48202
48260
  const runnerEnv = norm(env.RUNNER_ENVIRONMENT);
48203
48261
  const runnerKind = runnerEnv === "github-hosted" ? "hosted" : runnerEnv === "self-hosted" ? "self-hosted" : "unknown";
@@ -48335,25 +48393,49 @@ function parseProvider2(explicitProvider, repoUrl, env) {
48335
48393
  }
48336
48394
  return "unknown";
48337
48395
  }
48396
+ function classifyRefKind(env = process.env) {
48397
+ const githubRefType = normalize2(env.GITHUB_REF_TYPE)?.toLowerCase();
48398
+ const githubRef = normalize2(env.GITHUB_REF);
48399
+ const azureRef = normalize2(env.BUILD_SOURCEBRANCH);
48400
+ if (githubRefType === "tag" || githubRef?.startsWith("refs/tags/") || normalize2(env.CI_COMMIT_TAG) || normalize2(env.BITBUCKET_TAG) || azureRef?.startsWith("refs/tags/")) {
48401
+ return "tag";
48402
+ }
48403
+ const githubRefName = normalize2(env.GITHUB_REF_NAME);
48404
+ const githubDefault = normalize2(env.GITHUB_DEFAULT_BRANCH);
48405
+ if (githubRefName && githubDefault) {
48406
+ return githubRefName === githubDefault ? "default-branch" : "branch";
48407
+ }
48408
+ const gitlabRef = normalize2(env.CI_COMMIT_REF_NAME);
48409
+ const gitlabDefault = normalize2(env.CI_DEFAULT_BRANCH);
48410
+ if (gitlabRef && gitlabDefault) {
48411
+ return gitlabRef === gitlabDefault ? "default-branch" : "branch";
48412
+ }
48413
+ if (githubRefName || githubRef?.startsWith("refs/heads/") || gitlabRef || normalize2(env.BITBUCKET_BRANCH) || normalize2(env.BUILD_SOURCEBRANCHNAME) || azureRef?.startsWith("refs/heads/")) {
48414
+ return "branch";
48415
+ }
48416
+ return "unknown";
48417
+ }
48338
48418
  function detectRepoContext2(input, env = process.env) {
48339
48419
  const repoUrl = normalizeRepoUrl2(input.repoUrl) ?? normalizeRepoUrl2(env.GITHUB_SERVER_URL && env.GITHUB_REPOSITORY ? `${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}` : void 0) ?? normalizeRepoUrl2(env.CI_PROJECT_URL) ?? normalizeRepoUrl2(env.BITBUCKET_GIT_HTTP_ORIGIN) ?? normalizeRepoUrl2(env.BUILD_REPOSITORY_URI);
48340
48420
  const repoSlug = normalize2(input.repoSlug) ?? normalize2(env.GITHUB_REPOSITORY) ?? normalize2(env.CI_PROJECT_PATH) ?? (env.BITBUCKET_WORKSPACE && env.BITBUCKET_REPO_SLUG ? normalize2(`${env.BITBUCKET_WORKSPACE}/${env.BITBUCKET_REPO_SLUG}`) : void 0) ?? normalize2(env.BUILD_REPOSITORY_NAME);
48341
48421
  const ref = normalize2(input.ref) ?? normalize2(env.GITHUB_REF_NAME) ?? normalize2(env.CI_COMMIT_REF_NAME) ?? normalize2(env.BITBUCKET_BRANCH) ?? normalize2(env.BUILD_SOURCEBRANCHNAME);
48342
48422
  const sha = normalize2(input.sha) ?? normalize2(env.GITHUB_SHA) ?? normalize2(env.CI_COMMIT_SHA) ?? normalize2(env.BITBUCKET_COMMIT) ?? normalize2(env.BUILD_SOURCEVERSION);
48343
48423
  const provider = parseProvider2(input.gitProvider, repoUrl, env);
48424
+ const refKind = classifyRefKind(env);
48344
48425
  return {
48345
48426
  provider,
48346
48427
  repoUrl,
48347
48428
  repoSlug,
48348
48429
  ref,
48349
- sha
48430
+ sha,
48431
+ refKind
48350
48432
  };
48351
48433
  }
48352
48434
 
48353
48435
  // node_modules/@postman-cse/automation-telemetry-core/dist/telemetry.js
48354
48436
  var import_node_crypto2 = require("node:crypto");
48355
48437
  var import_undici2 = __toESM(require_undici(), 1);
48356
- var SCHEMA_VERSION = 2;
48438
+ var SCHEMA_VERSION = 3;
48357
48439
  var DEFAULT_TIMEOUT_MS = 1500;
48358
48440
  var DEFAULT_ENDPOINT = "https://events.pm-cse.dev/v1/events";
48359
48441
  var proxyDispatcher;
@@ -48364,7 +48446,7 @@ function resolveActionVersion(explicit) {
48364
48446
  if (explicit) {
48365
48447
  return explicit;
48366
48448
  }
48367
- return "1.2.3" ? "1.2.3" : "unknown";
48449
+ return "1.2.4" ? "1.2.4" : "unknown";
48368
48450
  }
48369
48451
  function telemetryDisabled(env) {
48370
48452
  const flag = String(env.POSTMAN_ACTIONS_TELEMETRY ?? "").trim().toLowerCase();
@@ -48393,7 +48475,7 @@ function maybeNotice(logger) {
48393
48475
  return;
48394
48476
  }
48395
48477
  noticeShown = true;
48396
- logger.info("note: postman-actions sends anonymous usage data (team id, action, CI provider, account type). Disable with POSTMAN_ACTIONS_TELEMETRY=off or DO_NOT_TRACK=1.");
48478
+ logger.info("note: postman-actions sends anonymous usage data (team id, action, CI provider, account type, run trigger, runner OS). Disable with POSTMAN_ACTIONS_TELEMETRY=off or DO_NOT_TRACK=1.");
48397
48479
  }
48398
48480
  function buildTelemetryEvent(params) {
48399
48481
  const { action, actionVersion, teamId, accountType, outcome, env, now } = params;
@@ -48415,6 +48497,9 @@ function buildTelemetryEvent(params) {
48415
48497
  repo_id: repoSource ? sha2562(repoSource) : void 0,
48416
48498
  org_id: owner ? sha2562(owner) : void 0,
48417
48499
  account_type: accountType,
48500
+ event_trigger: ci.eventTrigger,
48501
+ runner_os: ci.runnerOs,
48502
+ ref_kind: repo.refKind,
48418
48503
  outcome,
48419
48504
  ts: now()
48420
48505
  };
package/dist/index.cjs CHANGED
@@ -49895,7 +49895,65 @@ function norm(value) {
49895
49895
  const trimmed = (value ?? "").trim();
49896
49896
  return trimmed.length > 0 ? trimmed : void 0;
49897
49897
  }
49898
+ function detectEventTrigger(env = process.env) {
49899
+ const ghEvent = norm(env.GITHUB_EVENT_NAME)?.toLowerCase();
49900
+ if (ghEvent) {
49901
+ if (ghEvent === "push")
49902
+ return "push";
49903
+ if (ghEvent === "pull_request" || ghEvent === "pull_request_target")
49904
+ return "pull_request";
49905
+ if (ghEvent === "schedule")
49906
+ return "schedule";
49907
+ if (ghEvent === "workflow_dispatch" || ghEvent === "repository_dispatch")
49908
+ return "manual";
49909
+ return "other";
49910
+ }
49911
+ const glSource = norm(env.CI_PIPELINE_SOURCE)?.toLowerCase();
49912
+ if (glSource) {
49913
+ if (glSource === "push")
49914
+ return "push";
49915
+ if (glSource === "merge_request_event")
49916
+ return "pull_request";
49917
+ if (glSource === "schedule")
49918
+ return "schedule";
49919
+ if (glSource === "web" || glSource === "api" || glSource === "trigger" || glSource === "pipeline") {
49920
+ return "manual";
49921
+ }
49922
+ return "other";
49923
+ }
49924
+ if (norm(env.BITBUCKET_PR_ID))
49925
+ return "pull_request";
49926
+ if (norm(env.CI) || norm(env.BUILD_BUILDID) || norm(env.JENKINS_URL) || norm(env.TEAMCITY_VERSION)) {
49927
+ return "other";
49928
+ }
49929
+ return "unknown";
49930
+ }
49931
+ function detectRunnerOs(env = process.env) {
49932
+ const runnerOs = norm(env.RUNNER_OS)?.toLowerCase();
49933
+ if (runnerOs === "linux")
49934
+ return "linux";
49935
+ if (runnerOs === "macos")
49936
+ return "macos";
49937
+ if (runnerOs === "windows")
49938
+ return "windows";
49939
+ const platform2 = typeof process !== "undefined" ? process.platform : void 0;
49940
+ if (platform2 === "linux")
49941
+ return "linux";
49942
+ if (platform2 === "darwin")
49943
+ return "macos";
49944
+ if (platform2 === "win32")
49945
+ return "windows";
49946
+ return "unknown";
49947
+ }
49898
49948
  function detectCiContext(env = process.env) {
49949
+ const provider = detectCiProviderContext(env);
49950
+ return {
49951
+ ...provider,
49952
+ eventTrigger: detectEventTrigger(env),
49953
+ runnerOs: detectRunnerOs(env)
49954
+ };
49955
+ }
49956
+ function detectCiProviderContext(env = process.env) {
49899
49957
  if (norm(env.GITHUB_ACTIONS)) {
49900
49958
  const runnerEnv = norm(env.RUNNER_ENVIRONMENT);
49901
49959
  const runnerKind = runnerEnv === "github-hosted" ? "hosted" : runnerEnv === "self-hosted" ? "self-hosted" : "unknown";
@@ -50033,25 +50091,49 @@ function parseProvider2(explicitProvider, repoUrl, env) {
50033
50091
  }
50034
50092
  return "unknown";
50035
50093
  }
50094
+ function classifyRefKind(env = process.env) {
50095
+ const githubRefType = normalize2(env.GITHUB_REF_TYPE)?.toLowerCase();
50096
+ const githubRef = normalize2(env.GITHUB_REF);
50097
+ const azureRef = normalize2(env.BUILD_SOURCEBRANCH);
50098
+ if (githubRefType === "tag" || githubRef?.startsWith("refs/tags/") || normalize2(env.CI_COMMIT_TAG) || normalize2(env.BITBUCKET_TAG) || azureRef?.startsWith("refs/tags/")) {
50099
+ return "tag";
50100
+ }
50101
+ const githubRefName = normalize2(env.GITHUB_REF_NAME);
50102
+ const githubDefault = normalize2(env.GITHUB_DEFAULT_BRANCH);
50103
+ if (githubRefName && githubDefault) {
50104
+ return githubRefName === githubDefault ? "default-branch" : "branch";
50105
+ }
50106
+ const gitlabRef = normalize2(env.CI_COMMIT_REF_NAME);
50107
+ const gitlabDefault = normalize2(env.CI_DEFAULT_BRANCH);
50108
+ if (gitlabRef && gitlabDefault) {
50109
+ return gitlabRef === gitlabDefault ? "default-branch" : "branch";
50110
+ }
50111
+ if (githubRefName || githubRef?.startsWith("refs/heads/") || gitlabRef || normalize2(env.BITBUCKET_BRANCH) || normalize2(env.BUILD_SOURCEBRANCHNAME) || azureRef?.startsWith("refs/heads/")) {
50112
+ return "branch";
50113
+ }
50114
+ return "unknown";
50115
+ }
50036
50116
  function detectRepoContext2(input, env = process.env) {
50037
50117
  const repoUrl = normalizeRepoUrl2(input.repoUrl) ?? normalizeRepoUrl2(env.GITHUB_SERVER_URL && env.GITHUB_REPOSITORY ? `${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}` : void 0) ?? normalizeRepoUrl2(env.CI_PROJECT_URL) ?? normalizeRepoUrl2(env.BITBUCKET_GIT_HTTP_ORIGIN) ?? normalizeRepoUrl2(env.BUILD_REPOSITORY_URI);
50038
50118
  const repoSlug = normalize2(input.repoSlug) ?? normalize2(env.GITHUB_REPOSITORY) ?? normalize2(env.CI_PROJECT_PATH) ?? (env.BITBUCKET_WORKSPACE && env.BITBUCKET_REPO_SLUG ? normalize2(`${env.BITBUCKET_WORKSPACE}/${env.BITBUCKET_REPO_SLUG}`) : void 0) ?? normalize2(env.BUILD_REPOSITORY_NAME);
50039
50119
  const ref = normalize2(input.ref) ?? normalize2(env.GITHUB_REF_NAME) ?? normalize2(env.CI_COMMIT_REF_NAME) ?? normalize2(env.BITBUCKET_BRANCH) ?? normalize2(env.BUILD_SOURCEBRANCHNAME);
50040
50120
  const sha = normalize2(input.sha) ?? normalize2(env.GITHUB_SHA) ?? normalize2(env.CI_COMMIT_SHA) ?? normalize2(env.BITBUCKET_COMMIT) ?? normalize2(env.BUILD_SOURCEVERSION);
50041
50121
  const provider = parseProvider2(input.gitProvider, repoUrl, env);
50122
+ const refKind = classifyRefKind(env);
50042
50123
  return {
50043
50124
  provider,
50044
50125
  repoUrl,
50045
50126
  repoSlug,
50046
50127
  ref,
50047
- sha
50128
+ sha,
50129
+ refKind
50048
50130
  };
50049
50131
  }
50050
50132
 
50051
50133
  // node_modules/@postman-cse/automation-telemetry-core/dist/telemetry.js
50052
50134
  var import_node_crypto2 = require("node:crypto");
50053
50135
  var import_undici2 = __toESM(require_undici(), 1);
50054
- var SCHEMA_VERSION = 2;
50136
+ var SCHEMA_VERSION = 3;
50055
50137
  var DEFAULT_TIMEOUT_MS = 1500;
50056
50138
  var DEFAULT_ENDPOINT = "https://events.pm-cse.dev/v1/events";
50057
50139
  var proxyDispatcher;
@@ -50062,7 +50144,7 @@ function resolveActionVersion(explicit) {
50062
50144
  if (explicit) {
50063
50145
  return explicit;
50064
50146
  }
50065
- return "1.2.3" ? "1.2.3" : "unknown";
50147
+ return "1.2.4" ? "1.2.4" : "unknown";
50066
50148
  }
50067
50149
  function telemetryDisabled(env) {
50068
50150
  const flag = String(env.POSTMAN_ACTIONS_TELEMETRY ?? "").trim().toLowerCase();
@@ -50091,7 +50173,7 @@ function maybeNotice(logger) {
50091
50173
  return;
50092
50174
  }
50093
50175
  noticeShown = true;
50094
- logger.info("note: postman-actions sends anonymous usage data (team id, action, CI provider, account type). Disable with POSTMAN_ACTIONS_TELEMETRY=off or DO_NOT_TRACK=1.");
50176
+ logger.info("note: postman-actions sends anonymous usage data (team id, action, CI provider, account type, run trigger, runner OS). Disable with POSTMAN_ACTIONS_TELEMETRY=off or DO_NOT_TRACK=1.");
50095
50177
  }
50096
50178
  function buildTelemetryEvent(params) {
50097
50179
  const { action, actionVersion, teamId, accountType, outcome, env, now } = params;
@@ -50113,6 +50195,9 @@ function buildTelemetryEvent(params) {
50113
50195
  repo_id: repoSource ? sha2562(repoSource) : void 0,
50114
50196
  org_id: owner ? sha2562(owner) : void 0,
50115
50197
  account_type: accountType,
50198
+ event_trigger: ci.eventTrigger,
50199
+ runner_os: ci.runnerOs,
50200
+ ref_kind: repo.refKind,
50116
50201
  outcome,
50117
50202
  ts: now()
50118
50203
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postman-cse/onboarding-bootstrap",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Bootstrap Postman workspaces, specs, and collections from OpenAPI.",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -39,7 +39,7 @@
39
39
  "@actions/io": "^3.0.2",
40
40
  "@apidevtools/json-schema-ref-parser": "15.3.6",
41
41
  "@exodus/schemasafe": "1.3.0",
42
- "@postman-cse/automation-telemetry-core": "^0.1.0",
42
+ "@postman-cse/automation-telemetry-core": "^0.2.0",
43
43
  "@readme/openapi-parser": "^6.1.2",
44
44
  "undici": "^6.24.0"
45
45
  },