@p11-core/cli 0.0.13 → 0.0.15

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -0
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -3504,6 +3504,7 @@ import react from "@vitejs/plugin-react";
3504
3504
  import { build } from "vite";
3505
3505
  var nodeRequire = createRequire(import.meta.url);
3506
3506
  var packageJson = nodeRequire("../package.json");
3507
+ var machineIdSync = nodeRequire("node-machine-id").machineIdSync;
3507
3508
  var builtDefaultApiUrl = "https://p11.rarexlabs.com";
3508
3509
  var defaultApiUrl = process.env.P11_API_URL || builtDefaultApiUrl;
3509
3510
  var builtPostHogKey = "phc_CftZMyBB3bMZQRj3CmJovHB3kvzwJmQhXSwUBgzUTUi6";
@@ -3519,6 +3520,7 @@ var P11_TELEMETRY_FILE = "telemetry.json";
3519
3520
  var P11_HISTORY_DIR_MODE = 448;
3520
3521
  var P11_HISTORY_FILE_MODE = 384;
3521
3522
  var P11_HISTORY_LOCK_STALE_MS = 3e4;
3523
+ var cachedTelemetryMachineId;
3522
3524
  var P11_HISTORY_LOCK_TIMEOUT_MS = 5e3;
3523
3525
  var P11_HISTORY_DEFAULT_LIMIT = 20;
3524
3526
  var P11_RUNTIME_VERSION = "0.0.1";
@@ -4184,11 +4186,21 @@ function cliTelemetryBaseProperties() {
4184
4186
  surface: "cli",
4185
4187
  app_env: analyticsEnv(),
4186
4188
  cli_version: packageJson.version,
4189
+ machine_id: telemetryMachineId(),
4187
4190
  node_version: process.versions.node,
4188
4191
  platform: process.platform,
4189
4192
  arch: process.arch
4190
4193
  };
4191
4194
  }
4195
+ function telemetryMachineId() {
4196
+ if (cachedTelemetryMachineId !== void 0) return cachedTelemetryMachineId || void 0;
4197
+ try {
4198
+ cachedTelemetryMachineId = machineIdSync();
4199
+ } catch {
4200
+ cachedTelemetryMachineId = "";
4201
+ }
4202
+ return cachedTelemetryMachineId || void 0;
4203
+ }
4192
4204
  function postHogKey() {
4193
4205
  if (isTruthyEnv(process.env.P11_TELEMETRY_DISABLED) || isTruthyEnv(process.env.DO_NOT_TRACK)) return "";
4194
4206
  return (process.env.P11_POSTHOG_KEY || builtPostHogKey || "").trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@p11-core/cli",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,11 +22,12 @@
22
22
  "@babel/parser": "^7.27.2",
23
23
  "@babel/traverse": "^7.27.1",
24
24
  "@babel/types": "^7.27.1",
25
- "@p11-core/components": "0.0.2",
25
+ "@p11-core/components": "0.0.3",
26
26
  "@recogito/text-annotator": "^4.0.0",
27
27
  "@tailwindcss/vite": "^4.3.0",
28
28
  "@vitejs/plugin-react": "^6.0.1",
29
29
  "fflate": "^0.8.2",
30
+ "node-machine-id": "^1.1.12",
30
31
  "react": "^19.0.0",
31
32
  "react-dom": "^19.0.0",
32
33
  "semver": "^7.8.0",