@posthog/cli 0.3.6 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
- # Changelog
1
+ # posthog-cli
2
2
 
3
- Updates to the PostHog project can be found on [our changelog](https://posthog.com/changelog).
3
+ ## 0.3.8
4
+ - extract sourcemap url from source code
5
+ - add process command to inject and upload sourcemaps
package/README.md CHANGED
@@ -21,6 +21,7 @@ Options:
21
21
  ## Env-based Authentication
22
22
 
23
23
  You can authenticate with PostHog interactively for using the CLI locally, but if you'd like to use it in a CI/CD pipeline, we recommend using these environment variables:
24
+
24
25
  - `POSTHOG_CLI_HOST`: The PostHog host to connect to [default: https://us.posthog.com]
25
26
  - `POSTHOG_CLI_TOKEN`: [A posthog person API key.](https://posthog.com/docs/api#private-endpoint-authentication)
26
27
  - `POSTHOG_CLI_ENV_ID`: The ID number of the project/environment to connect to. E.g. the "2" in `https://us.posthog.com/project/2`
@@ -7,14 +7,14 @@
7
7
  "posthog-cli": "run-posthog-cli.js"
8
8
  },
9
9
  "dependencies": {
10
- "axios": "^1.7.9",
10
+ "axios": "^1.10.0",
11
11
  "axios-proxy-builder": "^0.1.2",
12
12
  "console.table": "^0.10.0",
13
- "detect-libc": "^2.0.3",
14
- "rimraf": "^5.0.8"
13
+ "detect-libc": "^2.0.4",
14
+ "rimraf": "^6.0.1"
15
15
  },
16
16
  "devDependencies": {
17
- "prettier": "^3.4.2"
17
+ "prettier": "^3.6.2"
18
18
  },
19
19
  "engines": {
20
20
  "node": ">=14",
@@ -23,7 +23,28 @@
23
23
  "hasInstallScript": true,
24
24
  "license": "MIT",
25
25
  "name": "@posthog/cli",
26
- "version": "0.3.6"
26
+ "version": "0.4.0"
27
+ },
28
+ "node_modules/@isaacs/balanced-match": {
29
+ "engines": {
30
+ "node": "20 || >=22"
31
+ },
32
+ "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==",
33
+ "license": "MIT",
34
+ "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz",
35
+ "version": "4.0.1"
36
+ },
37
+ "node_modules/@isaacs/brace-expansion": {
38
+ "dependencies": {
39
+ "@isaacs/balanced-match": "^4.0.1"
40
+ },
41
+ "engines": {
42
+ "node": "20 || >=22"
43
+ },
44
+ "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==",
45
+ "license": "MIT",
46
+ "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz",
47
+ "version": "5.0.0"
27
48
  },
28
49
  "node_modules/@isaacs/cliui": {
29
50
  "dependencies": {
@@ -42,16 +63,6 @@
42
63
  "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
43
64
  "version": "8.0.2"
44
65
  },
45
- "node_modules/@pkgjs/parseargs": {
46
- "engines": {
47
- "node": ">=14"
48
- },
49
- "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
50
- "license": "MIT",
51
- "optional": true,
52
- "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
53
- "version": "0.11.0"
54
- },
55
66
  "node_modules/ansi-regex": {
56
67
  "engines": {
57
68
  "node": ">=12"
@@ -59,10 +70,10 @@
59
70
  "funding": {
60
71
  "url": "https://github.com/chalk/ansi-regex?sponsor=1"
61
72
  },
62
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
73
+ "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
63
74
  "license": "MIT",
64
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
65
- "version": "6.0.1"
75
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
76
+ "version": "6.1.0"
66
77
  },
67
78
  "node_modules/ansi-styles": {
68
79
  "engines": {
@@ -88,10 +99,10 @@
88
99
  "form-data": "^4.0.0",
89
100
  "proxy-from-env": "^1.1.0"
90
101
  },
91
- "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==",
102
+ "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==",
92
103
  "license": "MIT",
93
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz",
94
- "version": "1.7.9"
104
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz",
105
+ "version": "1.10.0"
95
106
  },
96
107
  "node_modules/axios-proxy-builder": {
97
108
  "dependencies": {
@@ -102,21 +113,6 @@
102
113
  "resolved": "https://registry.npmjs.org/axios-proxy-builder/-/axios-proxy-builder-0.1.2.tgz",
103
114
  "version": "0.1.2"
104
115
  },
105
- "node_modules/balanced-match": {
106
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
107
- "license": "MIT",
108
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
109
- "version": "1.0.2"
110
- },
111
- "node_modules/brace-expansion": {
112
- "dependencies": {
113
- "balanced-match": "^1.0.0"
114
- },
115
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
116
- "license": "MIT",
117
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
118
- "version": "2.0.1"
119
- },
120
116
  "node_modules/clone": {
121
117
  "engines": {
122
118
  "node": ">=0.8"
@@ -209,10 +205,10 @@
209
205
  "engines": {
210
206
  "node": ">=8"
211
207
  },
212
- "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",
208
+ "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==",
213
209
  "license": "Apache-2.0",
214
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz",
215
- "version": "2.0.3"
210
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz",
211
+ "version": "2.0.4"
216
212
  },
217
213
  "node_modules/eastasianwidth": {
218
214
  "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
@@ -257,7 +253,7 @@
257
253
  },
258
254
  "node_modules/foreground-child": {
259
255
  "dependencies": {
260
- "cross-spawn": "^7.0.0",
256
+ "cross-spawn": "^7.0.6",
261
257
  "signal-exit": "^4.0.1"
262
258
  },
263
259
  "engines": {
@@ -266,10 +262,10 @@
266
262
  "funding": {
267
263
  "url": "https://github.com/sponsors/isaacs"
268
264
  },
269
- "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
265
+ "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
270
266
  "license": "ISC",
271
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
272
- "version": "3.1.1"
267
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
268
+ "version": "3.3.1"
273
269
  },
274
270
  "node_modules/form-data": {
275
271
  "dependencies": {
@@ -290,22 +286,23 @@
290
286
  "glob": "dist/esm/bin.mjs"
291
287
  },
292
288
  "dependencies": {
293
- "foreground-child": "^3.1.0",
294
- "jackspeak": "^3.1.2",
295
- "minimatch": "^9.0.1",
296
- "minipass": "^7.0.4",
297
- "path-scurry": "^1.11.0"
289
+ "foreground-child": "^3.3.1",
290
+ "jackspeak": "^4.1.1",
291
+ "minimatch": "^10.0.3",
292
+ "minipass": "^7.1.2",
293
+ "package-json-from-dist": "^1.0.0",
294
+ "path-scurry": "^2.0.0"
298
295
  },
299
296
  "engines": {
300
- "node": ">=16 || 14 >=14.18"
297
+ "node": "20 || >=22"
301
298
  },
302
299
  "funding": {
303
300
  "url": "https://github.com/sponsors/isaacs"
304
301
  },
305
- "integrity": "sha512-JDKXl1DiuuHJ6fVS2FXjownaavciiHNUU4mOvV/B793RLh05vZL1rcPnCSaOgv1hDT6RDlY7AB7ZUvFYAtPgAw==",
302
+ "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==",
306
303
  "license": "ISC",
307
- "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.16.tgz",
308
- "version": "10.3.16"
304
+ "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz",
305
+ "version": "11.0.3"
309
306
  },
310
307
  "node_modules/is-fullwidth-code-point": {
311
308
  "engines": {
@@ -327,27 +324,24 @@
327
324
  "@isaacs/cliui": "^8.0.2"
328
325
  },
329
326
  "engines": {
330
- "node": ">=14"
327
+ "node": "20 || >=22"
331
328
  },
332
329
  "funding": {
333
330
  "url": "https://github.com/sponsors/isaacs"
334
331
  },
335
- "integrity": "sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==",
332
+ "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==",
336
333
  "license": "BlueOak-1.0.0",
337
- "optionalDependencies": {
338
- "@pkgjs/parseargs": "^0.11.0"
339
- },
340
- "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.1.2.tgz",
341
- "version": "3.1.2"
334
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz",
335
+ "version": "4.1.1"
342
336
  },
343
337
  "node_modules/lru-cache": {
344
338
  "engines": {
345
- "node": "14 || >=16.14"
339
+ "node": "20 || >=22"
346
340
  },
347
- "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==",
341
+ "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==",
348
342
  "license": "ISC",
349
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz",
350
- "version": "10.2.2"
343
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz",
344
+ "version": "11.1.0"
351
345
  },
352
346
  "node_modules/mime-db": {
353
347
  "engines": {
@@ -372,27 +366,34 @@
372
366
  },
373
367
  "node_modules/minimatch": {
374
368
  "dependencies": {
375
- "brace-expansion": "^2.0.1"
369
+ "@isaacs/brace-expansion": "^5.0.0"
376
370
  },
377
371
  "engines": {
378
- "node": ">=16 || 14 >=14.17"
372
+ "node": "20 || >=22"
379
373
  },
380
374
  "funding": {
381
375
  "url": "https://github.com/sponsors/isaacs"
382
376
  },
383
- "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
377
+ "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==",
384
378
  "license": "ISC",
385
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
386
- "version": "9.0.4"
379
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz",
380
+ "version": "10.0.3"
387
381
  },
388
382
  "node_modules/minipass": {
389
383
  "engines": {
390
384
  "node": ">=16 || 14 >=14.17"
391
385
  },
392
386
  "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
387
+ "license": "ISC",
393
388
  "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
394
389
  "version": "7.1.2"
395
390
  },
391
+ "node_modules/package-json-from-dist": {
392
+ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
393
+ "license": "BlueOak-1.0.0",
394
+ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
395
+ "version": "1.0.1"
396
+ },
396
397
  "node_modules/path-key": {
397
398
  "engines": {
398
399
  "node": ">=8"
@@ -404,19 +405,19 @@
404
405
  },
405
406
  "node_modules/path-scurry": {
406
407
  "dependencies": {
407
- "lru-cache": "^10.2.0",
408
- "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
408
+ "lru-cache": "^11.0.0",
409
+ "minipass": "^7.1.2"
409
410
  },
410
411
  "engines": {
411
- "node": ">=16 || 14 >=14.18"
412
+ "node": "20 || >=22"
412
413
  },
413
414
  "funding": {
414
415
  "url": "https://github.com/sponsors/isaacs"
415
416
  },
416
- "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
417
+ "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==",
417
418
  "license": "BlueOak-1.0.0",
418
- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
419
- "version": "1.11.1"
419
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz",
420
+ "version": "2.0.0"
420
421
  },
421
422
  "node_modules/prettier": {
422
423
  "bin": {
@@ -429,10 +430,10 @@
429
430
  "funding": {
430
431
  "url": "https://github.com/prettier/prettier?sponsor=1"
431
432
  },
432
- "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==",
433
+ "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
433
434
  "license": "MIT",
434
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz",
435
- "version": "3.4.2"
435
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",
436
+ "version": "3.6.2"
436
437
  },
437
438
  "node_modules/proxy-from-env": {
438
439
  "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
@@ -445,17 +446,19 @@
445
446
  "rimraf": "dist/esm/bin.mjs"
446
447
  },
447
448
  "dependencies": {
448
- "glob": "^10.3.7"
449
+ "glob": "^11.0.0",
450
+ "package-json-from-dist": "^1.0.0"
449
451
  },
450
452
  "engines": {
451
- "node": ">=18"
453
+ "node": "20 || >=22"
452
454
  },
453
455
  "funding": {
454
456
  "url": "https://github.com/sponsors/isaacs"
455
457
  },
456
- "integrity": "sha512-XSh0V2/yNhDEi8HwdIefD8MLgs4LQXPag/nEJWs3YUc3Upn+UHa1GyIkEg9xSSNt7HnkO5FjTvmcRzgf+8UZuw==",
457
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.8.tgz",
458
- "version": "5.0.8"
458
+ "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==",
459
+ "license": "ISC",
460
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz",
461
+ "version": "6.0.1"
459
462
  },
460
463
  "node_modules/shebang-command": {
461
464
  "dependencies": {
@@ -713,5 +716,5 @@
713
716
  }
714
717
  },
715
718
  "requires": true,
716
- "version": "0.3.6"
719
+ "version": "0.4.0"
717
720
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "artifactDownloadUrl": "https://github.com/PostHog/posthog/releases/download/posthog-cli-v0.3.6",
2
+ "artifactDownloadUrl": "https://github.com/PostHog/posthog/releases/download/posthog-cli-v0.4.0",
3
3
  "bin": {
4
4
  "posthog-cli": "run-posthog-cli.js"
5
5
  },
@@ -9,15 +9,15 @@
9
9
  "Hugues <hugues@posthog.com>"
10
10
  ],
11
11
  "dependencies": {
12
- "axios": "^1.7.9",
12
+ "axios": "^1.10.0",
13
13
  "axios-proxy-builder": "^0.1.2",
14
14
  "console.table": "^0.10.0",
15
- "detect-libc": "^2.0.3",
16
- "rimraf": "^5.0.8"
15
+ "detect-libc": "^2.0.4",
16
+ "rimraf": "^6.0.1"
17
17
  },
18
18
  "description": "The command line interface for PostHog 🦔",
19
19
  "devDependencies": {
20
- "prettier": "^3.4.2"
20
+ "prettier": "^3.6.2"
21
21
  },
22
22
  "engines": {
23
23
  "node": ">=14",
@@ -116,7 +116,7 @@
116
116
  "zipExt": ".tar.gz"
117
117
  }
118
118
  },
119
- "version": "0.3.6",
119
+ "version": "0.4.0",
120
120
  "volta": {
121
121
  "node": "18.14.1",
122
122
  "npm": "9.5.0"