@wix/himalaya-cli 0.1879.0 → 0.1880.0

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/cli.mjs CHANGED
@@ -3562,7 +3562,7 @@ function encodeDistParams(env) {
3562
3562
  return Buffer.from(JSON.stringify(env), "utf8").toString("base64url");
3563
3563
  }
3564
3564
  function distJobSpec(req) {
3565
- const envVars = {
3565
+ const params = {
3566
3566
  APP_DIR: req.appDir,
3567
3567
  // WHICH APP this binary is FOR, as distinct from which shell builds it. Without it the pool
3568
3568
  // can only infer an app from APP_DIR — i.e. the shell — so it baked the SHELL's content and
@@ -3623,7 +3623,7 @@ function distJobSpec(req) {
3623
3623
  // not get to answer a per-shell question.
3624
3624
  ...req.provisioningEnv ? { HIMI_DIST_PROVISIONING_ENV: req.provisioningEnv } : {}
3625
3625
  };
3626
- const command = `${req.runner === "linux" ? "linux:" : ""}dist:${req.platform} ${DIST_PARAMS_FLAG} ${encodeDistParams(envVars)}`;
3626
+ const command = `${req.runner === "linux" ? "linux:" : ""}dist:${req.platform} ${DIST_PARAMS_FLAG} ${encodeDistParams(params)}`;
3627
3627
  if (command.length > MAX_COMMAND_CHARS) {
3628
3628
  throw new Error(
3629
3629
  `dist command is ${command.length} chars (cap ${MAX_COMMAND_CHARS}); shrink the job env \u2014 pass large values as a URL the Mac job fetches, as the brand contract does`
@@ -3637,10 +3637,14 @@ function distJobSpec(req) {
3637
3637
  // Job Service renders this metadata in Buildkite's job label. User labels are sanitized,
3638
3638
  // and the runner also carries buildOrigin so it does not treat them as GitHub PR refs.
3639
3639
  branchName: req.buildLabel ?? req.branchName ?? "master",
3640
- envVars,
3640
+ envVars: withoutCallbackToken(params),
3641
3641
  ...req.xcodeVersion ? { xcodeVersion: req.xcodeVersion } : {}
3642
3642
  };
3643
3643
  }
3644
+ function withoutCallbackToken(params) {
3645
+ const { HIMI_DIST_CALLBACK_TOKEN: _printedByThePool, ...printable2 } = params;
3646
+ return printable2;
3647
+ }
3644
3648
  var DIST_ERROR_CODES, APPLE_ERROR_CODES_MAX, IN_FLIGHT, JOB_SERVICE_ENDED, SCOPE_CREATE, SCOPE_READ, SCOPE_CANCEL, DEFAULT_BASE_URL, DEFAULT_OAUTH_URL, TOKEN_TTL_MS, JobServiceError, JobServiceBroker, CUSTOMER_UPLOAD_LEASE_MS, CUSTOMER_UPLOAD_RETRY_DELAYS_MS, CUSTOMER_UPLOAD_MAX_ATTEMPTS, CUSTOMER_UPLOAD_ABANDONED, MAX_MEASURABLE_IDENTITY_WINDOW, SITE_SHELL_SERVED_CAPABILITIES, DIST_SHELLS, DEFAULT_DIST_SHELL, DEFAULT_BORROWABLE_IOS_IDS, BUNDLE_ID_RE, DEFAULT_DIST_SIGNING, WIX_MANAGED_SIGNING_ALIASES, DEFAULT_ANDROID_SIGNING, ANDROID_SIGNING_POLICIES, ANDROID_SIGNING_ALIASES, DEFAULT_ANDROID_FORMAT, ANDROID_FORMATS, ANDROID_FORMAT_NOT_BUILT, ANDROID_FORMAT_WRONG_SIGNER, ANDROID_FORMAT_NOT_REQUESTED, DEFAULT_ANDROID_BUILD_TYPE, ANDROID_BUILD_TYPES, ANDROID_BUILD_TYPE_NOT_BUILT, DEFAULT_GIT_URL, DIST_PACKAGE_NAME, DIST_PARAMS_FLAG, MAX_COMMAND_CHARS;
3645
3649
  var init_dist_jobs = __esm({
3646
3650
  "../../core/serve-control/src/dist-jobs.ts"() {
@@ -41733,6 +41737,7 @@ function resolveIdiom(tokens2, ctx = {}) {
41733
41737
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
41734
41738
  var init_idiom = __esm({
41735
41739
  "../../core/ts/src/idiom.ts"() {
41740
+ "use strict";
41736
41741
  init_define_HHP_CATALOG();
41737
41742
  IDIOM_CONTEXTS = {
41738
41743
  ios: { native: ["ios"] },
@@ -407,9 +407,16 @@ token, creates the Mac-pool job, and polls it. The compute never moves.
407
407
  The install link comes back through a **result callback**: the pool POSTs
408
408
  `/v1/dist/result` with a per-job token, and `himi dist status` reads the record that
409
409
  writes. Two things bound a leaked token: the artifact URL must be HTTPS on an allowed
410
- host, and the callback expires (24h). It is deliberately **not** single-use — Job
411
- Service retries a failed job with the same env, so the same token legitimately reports
412
- twice.
410
+ host, and the token expires 24h after the job was created — on the result **and** on the
411
+ contract, seed, signing and Firebase config routes (the captcha route instead refuses a job
412
+ once it has finished). It is deliberately **not**
413
+ single-use — Job Service retries a failed job with the same env, so the same token
414
+ legitimately reports twice.
415
+
416
+ The token can leak because the pool's runner prints the job's parameters into its Buildkite
417
+ log before it clones the repo. The plain-text `envVars` it prints never carry the token; the
418
+ `--himi-dist` argument does, base64url-encoded, which anyone with the log can decode — so the
419
+ 24h expiry is what bounds it.
413
420
 
414
421
  An early return in the build now reports a **FAILURE with the reason** rather than
415
422
  exiting 0: a job that produced no artifact must never read `SUCCESS` with no link.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1879.0",
3
+ "version": "0.1880.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -82,5 +82,5 @@
82
82
  "artifactId": "himalaya-cli"
83
83
  }
84
84
  },
85
- "falconPackageHash": "3f0e7c64ae0a30ed039349c3ed757a03d7016dd1e5330ed3c45e3524"
85
+ "falconPackageHash": "98e2d25162e2488a622c9cc3dc76706365531e4951a333c524672d60"
86
86
  }