@vm0/cli 9.102.0 → 9.102.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.
@@ -49,7 +49,7 @@ if (DSN) {
49
49
  Sentry.init({
50
50
  dsn: DSN,
51
51
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
52
- release: "9.102.0",
52
+ release: "9.102.2",
53
53
  sendDefaultPii: false,
54
54
  tracesSampleRate: 0,
55
55
  shutdownTimeout: 500,
@@ -68,7 +68,7 @@ if (DSN) {
68
68
  }
69
69
  });
70
70
  Sentry.setContext("cli", {
71
- version: "9.102.0",
71
+ version: "9.102.2",
72
72
  command: process.argv.slice(2).join(" ")
73
73
  });
74
74
  Sentry.setContext("runtime", {
@@ -29582,29 +29582,17 @@ function getInstructionsFilename(framework) {
29582
29582
  }
29583
29583
 
29584
29584
  // ../../packages/core/src/feature-switch.ts
29585
- var sha1Cache = /* @__PURE__ */ new Map();
29586
- async function sha1(input) {
29587
- const cached = sha1Cache.get(input);
29588
- if (cached) return cached;
29589
- const data = new TextEncoder().encode(input);
29590
- const hashBuffer = await crypto.subtle.digest("SHA-1", data);
29591
- const hashArray = Array.from(new Uint8Array(hashBuffer));
29592
- const hex = hashArray.map((b) => {
29593
- return b.toString(16).padStart(2, "0");
29594
- }).join("");
29595
- sha1Cache.set(input, hex);
29596
- return hex;
29585
+ function fnv1a(input) {
29586
+ let h = 2166136261 >>> 0;
29587
+ for (let i = 0; i < input.length; i++) {
29588
+ h ^= input.charCodeAt(i);
29589
+ h = Math.imul(h, 16777619) >>> 0;
29590
+ }
29591
+ return h.toString(16).padStart(8, "0");
29597
29592
  }
29598
- var STAFF_USER_HASHES = [
29599
- "afc25aa601481d794372ed765038148d3a160e2a",
29600
- "1e7de00267c699185653df499f68e8383013ca08",
29601
- "b397fa9b0330b421a5113ac88dd2b01ca2067cfe",
29602
- "d938bb6e49cb8ccfaa962942d69c9ccd1ee239af",
29603
- "67a65740246389d7fecf7702f8b7d6914ad38dc5",
29604
- "55651a8b2c85b35ff0629fa3d4718b9476069d0f"
29605
- ];
29593
+ var STAFF_USER_HASHES = [];
29606
29594
  var STAFF_ORG_ID_HASHES = [
29607
- "65de87977d6d1712cd88d7768209f33f7ed12e0b"
29595
+ "afce210e"
29608
29596
  // org_3ANttyrbWYJk6JKRSTRLEsbsDLe
29609
29597
  ];
29610
29598
  var FEATURE_SWITCHES = {
@@ -29824,22 +29812,22 @@ var FEATURE_SWITCHES = {
29824
29812
  enabledOrgIdHashes: STAFF_ORG_ID_HASHES
29825
29813
  }
29826
29814
  };
29827
- async function isFeatureEnabled(key, ctx) {
29815
+ function isFeatureEnabled(key, ctx) {
29828
29816
  const featureSwitch = FEATURE_SWITCHES[key];
29829
29817
  if (featureSwitch.enabled) {
29830
29818
  return true;
29831
29819
  }
29832
29820
  if (ctx?.userId && featureSwitch.enabledUserHashes?.length) {
29833
- const hash = await sha1(ctx.userId);
29834
- if (featureSwitch.enabledUserHashes.includes(hash)) return true;
29821
+ if (featureSwitch.enabledUserHashes.includes(fnv1a(ctx.userId)))
29822
+ return true;
29835
29823
  }
29836
29824
  if (ctx?.email && featureSwitch.enabledEmailHashes?.length) {
29837
- const hash = await sha1(ctx.email.toLowerCase());
29838
- if (featureSwitch.enabledEmailHashes.includes(hash)) return true;
29825
+ if (featureSwitch.enabledEmailHashes.includes(fnv1a(ctx.email.toLowerCase())))
29826
+ return true;
29839
29827
  }
29840
29828
  if (ctx?.orgId && featureSwitch.enabledOrgIdHashes?.length) {
29841
- const hash = await sha1(ctx.orgId);
29842
- if (featureSwitch.enabledOrgIdHashes.includes(hash)) return true;
29829
+ if (featureSwitch.enabledOrgIdHashes.includes(fnv1a(ctx.orgId)))
29830
+ return true;
29843
29831
  }
29844
29832
  return false;
29845
29833
  }
@@ -32112,4 +32100,4 @@ export {
32112
32100
  parseTime,
32113
32101
  paginate
32114
32102
  };
32115
- //# sourceMappingURL=chunk-KBGMCHAA.js.map
32103
+ //# sourceMappingURL=chunk-NEWH3VHW.js.map