@transcend-io/cli 8.31.0 → 8.32.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.
Files changed (153) hide show
  1. package/README.md +121 -0
  2. package/dist/bin/bash-complete.cjs +1 -1
  3. package/dist/bin/cli.cjs +1 -1
  4. package/dist/bin/deprecated-command.cjs +2 -2
  5. package/dist/{chunk-JSVWGZUF.cjs → chunk-22KX2NM4.cjs} +4 -4
  6. package/dist/{chunk-JSVWGZUF.cjs.map → chunk-22KX2NM4.cjs.map} +1 -1
  7. package/dist/chunk-56QKBG2R.cjs +3001 -0
  8. package/dist/chunk-56QKBG2R.cjs.map +1 -0
  9. package/dist/chunk-6TKTYQIF.cjs +3 -0
  10. package/dist/chunk-6TKTYQIF.cjs.map +1 -0
  11. package/dist/{chunk-CLJATLM4.cjs → chunk-BPOXNSPY.cjs} +2 -2
  12. package/dist/{chunk-CLJATLM4.cjs.map → chunk-BPOXNSPY.cjs.map} +1 -1
  13. package/dist/chunk-CM7VJEOY.cjs +4 -0
  14. package/dist/chunk-CM7VJEOY.cjs.map +1 -0
  15. package/dist/chunk-D3VRD5F5.cjs +2 -0
  16. package/dist/chunk-D3VRD5F5.cjs.map +1 -0
  17. package/dist/{chunk-FZTNEEMW.cjs → chunk-DQCPGPXG.cjs} +2 -2
  18. package/dist/{chunk-FZTNEEMW.cjs.map → chunk-DQCPGPXG.cjs.map} +1 -1
  19. package/dist/{chunk-EA6WCT7X.cjs → chunk-DYBVUGHH.cjs} +22 -22
  20. package/dist/chunk-DYBVUGHH.cjs.map +1 -0
  21. package/dist/chunk-IHUCIK5T.cjs +2 -0
  22. package/dist/{chunk-FMFQTG5Q.cjs.map → chunk-IHUCIK5T.cjs.map} +1 -1
  23. package/dist/{chunk-HAAVY3FG.cjs → chunk-LQUVB4MI.cjs} +4 -4
  24. package/dist/chunk-LQUVB4MI.cjs.map +1 -0
  25. package/dist/chunk-P5GD5LAK.cjs +2 -0
  26. package/dist/chunk-P5GD5LAK.cjs.map +1 -0
  27. package/dist/chunk-PGO2YKRX.cjs +12 -0
  28. package/dist/chunk-PGO2YKRX.cjs.map +1 -0
  29. package/dist/{chunk-CBBHRSKJ.cjs → chunk-VCPZG4FJ.cjs} +2 -2
  30. package/dist/{chunk-CBBHRSKJ.cjs.map → chunk-VCPZG4FJ.cjs.map} +1 -1
  31. package/dist/chunk-VUQAH7YK.cjs +12 -0
  32. package/dist/chunk-VUQAH7YK.cjs.map +1 -0
  33. package/dist/{impl-OTMLF2EA.cjs → impl-2JA6BPE7.cjs} +2 -2
  34. package/dist/{impl-OTMLF2EA.cjs.map → impl-2JA6BPE7.cjs.map} +1 -1
  35. package/dist/{impl-4TYC4KRL.cjs → impl-4AI7T6RD.cjs} +2 -2
  36. package/dist/{impl-4TYC4KRL.cjs.map → impl-4AI7T6RD.cjs.map} +1 -1
  37. package/dist/impl-4LAJNPQ4.cjs +16 -0
  38. package/dist/impl-4LAJNPQ4.cjs.map +1 -0
  39. package/dist/{impl-3X74MLJH.cjs → impl-4YFJOKCA.cjs} +2 -2
  40. package/dist/{impl-3X74MLJH.cjs.map → impl-4YFJOKCA.cjs.map} +1 -1
  41. package/dist/{impl-P2KE5XGI.cjs → impl-5RX3NB6C.cjs} +2 -2
  42. package/dist/{impl-P2KE5XGI.cjs.map → impl-5RX3NB6C.cjs.map} +1 -1
  43. package/dist/{impl-B4H2FDZW.cjs → impl-66CDS7IN.cjs} +2 -2
  44. package/dist/{impl-B4H2FDZW.cjs.map → impl-66CDS7IN.cjs.map} +1 -1
  45. package/dist/{impl-3NPILIEL.cjs → impl-ADPBEB3N.cjs} +2 -2
  46. package/dist/{impl-3NPILIEL.cjs.map → impl-ADPBEB3N.cjs.map} +1 -1
  47. package/dist/{impl-5BYWLODX.cjs → impl-B6DTQRYV.cjs} +2 -2
  48. package/dist/{impl-5BYWLODX.cjs.map → impl-B6DTQRYV.cjs.map} +1 -1
  49. package/dist/impl-BHA2L6BP.cjs +2 -0
  50. package/dist/{impl-QOFK7XCV.cjs.map → impl-BHA2L6BP.cjs.map} +1 -1
  51. package/dist/impl-BLGX7DMN.cjs +6 -0
  52. package/dist/impl-BLGX7DMN.cjs.map +1 -0
  53. package/dist/{impl-DLES54N2.cjs → impl-DA7AASRR.cjs} +2 -2
  54. package/dist/{impl-DLES54N2.cjs.map → impl-DA7AASRR.cjs.map} +1 -1
  55. package/dist/{impl-2F2MAY5Q.cjs → impl-EXHOBCQW.cjs} +2 -2
  56. package/dist/{impl-2F2MAY5Q.cjs.map → impl-EXHOBCQW.cjs.map} +1 -1
  57. package/dist/{impl-YL4BEMVB.cjs → impl-FRWZLZ2V.cjs} +2 -2
  58. package/dist/{impl-YL4BEMVB.cjs.map → impl-FRWZLZ2V.cjs.map} +1 -1
  59. package/dist/impl-GA6T4SCB.cjs +2 -0
  60. package/dist/impl-GA6T4SCB.cjs.map +1 -0
  61. package/dist/{impl-FOWYFCLQ.cjs → impl-GG3S2VBT.cjs} +2 -2
  62. package/dist/{impl-FOWYFCLQ.cjs.map → impl-GG3S2VBT.cjs.map} +1 -1
  63. package/dist/impl-GZNNNSYW.cjs +7 -0
  64. package/dist/{impl-AS634NMX.cjs.map → impl-GZNNNSYW.cjs.map} +1 -1
  65. package/dist/{impl-YGWOUGKU.cjs → impl-IOS3QLTX.cjs} +2 -2
  66. package/dist/{impl-YGWOUGKU.cjs.map → impl-IOS3QLTX.cjs.map} +1 -1
  67. package/dist/{impl-MEYQSNWH.cjs → impl-IQGUF37H.cjs} +2 -2
  68. package/dist/{impl-MEYQSNWH.cjs.map → impl-IQGUF37H.cjs.map} +1 -1
  69. package/dist/impl-IZIXOMMN.cjs +2 -0
  70. package/dist/impl-IZIXOMMN.cjs.map +1 -0
  71. package/dist/{impl-TU75DDAK.cjs → impl-J5PWNHKL.cjs} +2 -2
  72. package/dist/{impl-TU75DDAK.cjs.map → impl-J5PWNHKL.cjs.map} +1 -1
  73. package/dist/impl-JI6COVDW.cjs +2 -0
  74. package/dist/{impl-C52MFDKN.cjs.map → impl-JI6COVDW.cjs.map} +1 -1
  75. package/dist/{impl-7XQ333J3.cjs → impl-JY7YM3QH.cjs} +2 -2
  76. package/dist/{impl-7XQ333J3.cjs.map → impl-JY7YM3QH.cjs.map} +1 -1
  77. package/dist/{impl-FCNDIDLG.cjs → impl-LKX6OLE2.cjs} +2 -2
  78. package/dist/{impl-FCNDIDLG.cjs.map → impl-LKX6OLE2.cjs.map} +1 -1
  79. package/dist/impl-MRC5UI22.cjs +2 -0
  80. package/dist/impl-MRC5UI22.cjs.map +1 -0
  81. package/dist/{impl-ZNEHRZSH.cjs → impl-NW57RBBR.cjs} +2 -2
  82. package/dist/{impl-ZNEHRZSH.cjs.map → impl-NW57RBBR.cjs.map} +1 -1
  83. package/dist/impl-QOCEM2K5.cjs +2 -0
  84. package/dist/{impl-VWVHHW42.cjs.map → impl-QOCEM2K5.cjs.map} +1 -1
  85. package/dist/{impl-U2HXJYMF.cjs → impl-QPLTL2SO.cjs} +2 -2
  86. package/dist/{impl-U2HXJYMF.cjs.map → impl-QPLTL2SO.cjs.map} +1 -1
  87. package/dist/impl-R35FW4U7.cjs +9 -0
  88. package/dist/impl-R35FW4U7.cjs.map +1 -0
  89. package/dist/{impl-GRFZUIPA.cjs → impl-RMPDHVAH.cjs} +2 -2
  90. package/dist/{impl-GRFZUIPA.cjs.map → impl-RMPDHVAH.cjs.map} +1 -1
  91. package/dist/{impl-E6HLH54N.cjs → impl-S64WVKSC.cjs} +2 -2
  92. package/dist/{impl-E6HLH54N.cjs.map → impl-S64WVKSC.cjs.map} +1 -1
  93. package/dist/{impl-EUBXVGYE.cjs → impl-SE32ARTN.cjs} +2 -2
  94. package/dist/{impl-EUBXVGYE.cjs.map → impl-SE32ARTN.cjs.map} +1 -1
  95. package/dist/{impl-BRV53IYV.cjs → impl-SSBP4ONX.cjs} +2 -2
  96. package/dist/{impl-BRV53IYV.cjs.map → impl-SSBP4ONX.cjs.map} +1 -1
  97. package/dist/{impl-T3YCRT7O.cjs → impl-UA7V6YEM.cjs} +2 -2
  98. package/dist/{impl-T3YCRT7O.cjs.map → impl-UA7V6YEM.cjs.map} +1 -1
  99. package/dist/{impl-L5CDLEYL.cjs → impl-WTGAAEUZ.cjs} +2 -2
  100. package/dist/{impl-L5CDLEYL.cjs.map → impl-WTGAAEUZ.cjs.map} +1 -1
  101. package/dist/{impl-ZVMSDS7K.cjs → impl-WVOFYJLG.cjs} +2 -2
  102. package/dist/{impl-ZVMSDS7K.cjs.map → impl-WVOFYJLG.cjs.map} +1 -1
  103. package/dist/{impl-NRPKPOKV.cjs → impl-X23VUODX.cjs} +2 -2
  104. package/dist/{impl-NRPKPOKV.cjs.map → impl-X23VUODX.cjs.map} +1 -1
  105. package/dist/{impl-WJUSRANT.cjs → impl-XU54KM62.cjs} +2 -2
  106. package/dist/{impl-WJUSRANT.cjs.map → impl-XU54KM62.cjs.map} +1 -1
  107. package/dist/{impl-CDNCBR7T.cjs → impl-XYHIS7X5.cjs} +2 -2
  108. package/dist/{impl-CDNCBR7T.cjs.map → impl-XYHIS7X5.cjs.map} +1 -1
  109. package/dist/{impl-HRQUBR2Y.cjs → impl-Y3MY5EKD.cjs} +2 -2
  110. package/dist/{impl-HRQUBR2Y.cjs.map → impl-Y3MY5EKD.cjs.map} +1 -1
  111. package/dist/impl-YIPC6MAR.cjs +6 -0
  112. package/dist/impl-YIPC6MAR.cjs.map +1 -0
  113. package/dist/{impl-64R4NW2W.cjs → impl-Z54SB7SM.cjs} +2 -2
  114. package/dist/{impl-64R4NW2W.cjs.map → impl-Z54SB7SM.cjs.map} +1 -1
  115. package/dist/{impl-MDV6LYET.cjs → impl-ZTEP5CYM.cjs} +2 -2
  116. package/dist/{impl-MDV6LYET.cjs.map → impl-ZTEP5CYM.cjs.map} +1 -1
  117. package/dist/index.cjs +3 -3
  118. package/dist/index.cjs.map +1 -1
  119. package/dist/index.d.cts +1 -1
  120. package/package.json +2 -2
  121. package/dist/chunk-5SEDJJAH.cjs +0 -12
  122. package/dist/chunk-5SEDJJAH.cjs.map +0 -1
  123. package/dist/chunk-EA6WCT7X.cjs.map +0 -1
  124. package/dist/chunk-FMFQTG5Q.cjs +0 -2
  125. package/dist/chunk-HAAVY3FG.cjs.map +0 -1
  126. package/dist/chunk-HUZESENZ.cjs +0 -2
  127. package/dist/chunk-HUZESENZ.cjs.map +0 -1
  128. package/dist/chunk-J7BM4Z6U.cjs +0 -3
  129. package/dist/chunk-J7BM4Z6U.cjs.map +0 -1
  130. package/dist/chunk-UHERPTMC.cjs +0 -2
  131. package/dist/chunk-UHERPTMC.cjs.map +0 -1
  132. package/dist/chunk-VWGA62SG.cjs +0 -3001
  133. package/dist/chunk-VWGA62SG.cjs.map +0 -1
  134. package/dist/chunk-WAWECZTF.cjs +0 -4
  135. package/dist/chunk-WAWECZTF.cjs.map +0 -1
  136. package/dist/chunk-ZZPMCMEB.cjs +0 -12
  137. package/dist/chunk-ZZPMCMEB.cjs.map +0 -1
  138. package/dist/impl-AS634NMX.cjs +0 -7
  139. package/dist/impl-BBDBG5OZ.cjs +0 -6
  140. package/dist/impl-BBDBG5OZ.cjs.map +0 -1
  141. package/dist/impl-C52MFDKN.cjs +0 -2
  142. package/dist/impl-FORZFZ2Q.cjs +0 -2
  143. package/dist/impl-FORZFZ2Q.cjs.map +0 -1
  144. package/dist/impl-GISNUHI6.cjs +0 -9
  145. package/dist/impl-GISNUHI6.cjs.map +0 -1
  146. package/dist/impl-KM3U7E44.cjs +0 -6
  147. package/dist/impl-KM3U7E44.cjs.map +0 -1
  148. package/dist/impl-QOFK7XCV.cjs +0 -2
  149. package/dist/impl-VWVHHW42.cjs +0 -2
  150. package/dist/impl-YDV6YOOI.cjs +0 -2
  151. package/dist/impl-YDV6YOOI.cjs.map +0 -1
  152. package/dist/impl-ZHTH3L2C.cjs +0 -2
  153. package/dist/impl-ZHTH3L2C.cjs.map +0 -1
package/README.md CHANGED
@@ -38,6 +38,7 @@ A command line interface that allows you to programatically interact with the Tr
38
38
  - [`transcend consent upload-cookies-from-csv`](#transcend-consent-upload-cookies-from-csv)
39
39
  - [`transcend consent upload-data-flows-from-csv`](#transcend-consent-upload-data-flows-from-csv)
40
40
  - [`transcend consent upload-preferences`](#transcend-consent-upload-preferences)
41
+ - [`transcend consent delete-preference-records`](#transcend-consent-delete-preference-records)
41
42
  - [`transcend inventory pull`](#transcend-inventory-pull)
42
43
  - [`transcend inventory push`](#transcend-inventory-push)
43
44
  - [`transcend inventory scan-packages`](#transcend-inventory-scan-packages)
@@ -54,6 +55,7 @@ A command line interface that allows you to programatically interact with the Tr
54
55
  - [`transcend migration sync-ot`](#transcend-migration-sync-ot)
55
56
  - [Prompt Manager](#prompt-manager)
56
57
  - [Proxy usage](#proxy-usage)
58
+ - [Using non-primary Sombra](#using-non-primary-sombra)
57
59
 
58
60
  <!-- END doctoc generated TOC please keep comment here to allow auto update -->
59
61
 
@@ -2246,6 +2248,119 @@ transcend consent upload-preferences \
2246
2248
  --transcendUrl=https://api.us.transcend.io
2247
2249
  ```
2248
2250
 
2251
+ ### `transcend consent delete-preference-records`
2252
+
2253
+ ```txt
2254
+ USAGE
2255
+ transcend consent delete-preference-records (--auth value) [--sombraAuth value] (--partition value) (--timestamp value) [--file value] [--directory value] [--transcendUrl value] [--maxItemsInChunk value] [--maxConcurrency value] [--fileConcurrency value] [--receiptDirectory value]
2256
+ transcend consent delete-preference-records --help
2257
+
2258
+ Uses POST /v1/preferences/{partition}/delete route on sombra to delete consent preference records in bulk from Preference Store based on a CSV file input. Refer to examples/cli-upload-preferences-example.csv for the expected format of the CSV file. The CSV expects the following headers: "name" and "value". The "name" field corresponds to the identifier name as defined on https://app.transcend.io/privacy-requests/identifiers The "value" refers to the actual identifier value for the user whose preference record is being deleted. For Large scale deletions, consider chunking the input CSV into smaller files and using the --directory option to process them concurrently.
2259
+
2260
+ FLAGS
2261
+ --auth The Transcend API key. Requires scopes: "Modify User Stored Preferences"
2262
+ [--sombraAuth] The Sombra internal key, use for additional authentication when self-hosting Sombra
2263
+ --partition Partition ID to used to delete preference records from
2264
+ --timestamp The timestamp when the deletion operation is made. Used for logging purposes.
2265
+ [--file] Path to the CSV file used to identify preference records to delete
2266
+ [--directory] Path to the directory of CSV files to load preferences from
2267
+ [--transcendUrl] URL of the Transcend backend. Use https://api.us.transcend.io for US hosting [default = https://api.transcend.io]
2268
+ [--maxItemsInChunk] When chunking, how many items to delete in a single chunk (higher = faster, but more load). [default = 10]
2269
+ [--maxConcurrency] Number of concurrent requests to make when deleting preference records. (Higher = faster, but more load and rate limiting errors). [default = 10]
2270
+ [--fileConcurrency] Number of files to process concurrently when deleting preference records from multiple files. [default = 5]
2271
+ [--receiptDirectory] Directory to write receipts of failed deletions to. [default = ./receipts]
2272
+ -h --help Print help information and exit
2273
+ ```
2274
+
2275
+ A sample CSV can be found [here](./examples/cli-delete-preference-records-example.csv).
2276
+
2277
+ #### Examples
2278
+
2279
+ **Delete preference records from preference store using a CSV file**
2280
+
2281
+ ```sh
2282
+ transcend consent delete-preference-records \
2283
+ --auth="$TRANSCEND_API_KEY" \
2284
+ --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 \
2285
+ --file=./preferences-to-delete.csv \
2286
+ --receiptDirectory=./receipts \
2287
+ --timestamp=2024-08-26T00:00:00.000Z
2288
+ ```
2289
+
2290
+ **Delete preference records from preference store using multiple CSV files in a directory**
2291
+
2292
+ ```sh
2293
+ transcend consent delete-preference-records \
2294
+ --auth="$TRANSCEND_API_KEY" \
2295
+ --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 \
2296
+ --directory=./preferences-to-delete \
2297
+ --receiptDirectory=./receipts \
2298
+ --timestamp=2024-08-26T00:00:00.000Z
2299
+ ```
2300
+
2301
+ **Self-hosted Sombra: include Sombra internal key header**
2302
+
2303
+ ```sh
2304
+ transcend consent delete-preference-records \
2305
+ --auth="$TRANSCEND_API_KEY" \
2306
+ --sombraAuth="$SOMBRA_INTERNAL_KEY" \
2307
+ --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 \
2308
+ --file=./preferences-to-delete.csv \
2309
+ --receiptDirectory=./receipts \
2310
+ --timestamp=2024-08-26T00:00:00.000Z
2311
+ ```
2312
+
2313
+ **Use a specific backend base URL (e.g., US-hosted)**
2314
+
2315
+ ```sh
2316
+ transcend consent delete-preference-records \
2317
+ --auth="$TRANSCEND_API_KEY" \
2318
+ --sombraAuth="$SOMBRA_INTERNAL_KEY" \
2319
+ --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 \
2320
+ --file=./preferences-to-delete.csv \
2321
+ --receiptDirectory=./receipts \
2322
+ --transcendUrl=https://api.us.transcend.io \
2323
+ --timestamp=2024-08-26T00:00:00.000Z
2324
+ ```
2325
+
2326
+ **Configure maximum number of concurrent API calls for a deletion file**
2327
+
2328
+ ```sh
2329
+ transcend consent delete-preference-records \
2330
+ --auth="$TRANSCEND_API_KEY" \
2331
+ --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 \
2332
+ --file=./preferences-to-delete.csv \
2333
+ --maxConcurrency=100 \
2334
+ --fileConcurrency=10 \
2335
+ --maxItemsInChunk=5 \
2336
+ --receiptDirectory=./receipts \
2337
+ --timestamp=2024-08-26T00:00:00.000Z
2338
+ ```
2339
+
2340
+ **Configure maximum number of files to process concurrently**
2341
+
2342
+ ```sh
2343
+ transcend consent delete-preference-records \
2344
+ --auth="$TRANSCEND_API_KEY" \
2345
+ --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 \
2346
+ --file=./preferences-to-delete.csv \
2347
+ --fileConcurrency=10 \
2348
+ --receiptDirectory=./receipts \
2349
+ --timestamp=2024-08-26T00:00:00.000Z
2350
+ ```
2351
+
2352
+ **Configure maximum items in chunk**
2353
+
2354
+ ```sh
2355
+ transcend consent delete-preference-records \
2356
+ --auth="$TRANSCEND_API_KEY" \
2357
+ --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 \
2358
+ --file=./preferences-to-delete.csv \
2359
+ --maxItemsInChunk=5 \
2360
+ --receiptDirectory=./receipts \
2361
+ --timestamp=2024-08-26T00:00:00.000Z
2362
+ ```
2363
+
2249
2364
  ### `transcend inventory pull`
2250
2365
 
2251
2366
  ```txt
@@ -3605,3 +3720,9 @@ export async function main(): Promise<void> {
3605
3720
  ## Proxy usage
3606
3721
 
3607
3722
  If you are trying to use the CLI inside a corporate firewall and need to send traffic through a proxy, you can do so via the `http_proxy` environment variable,with a command like `http_proxy=http://localhost:5051 transcend inventory pull --auth=$TRANSCEND_API_KEY`.
3723
+
3724
+ ## Using non-primary Sombra
3725
+
3726
+ By default, if a CLI command has to call a Sombra endpoint, the primary Sombra gateway on the account will be used. If the primary Sombra is self hosted, you will need to provide the --sombraAuth variable.
3727
+
3728
+ If you want to use a non-primary Sombra, you can specify the environment variable `SOMBRA_URL` e.g. `SOMBRA_URL="https://multi-tenant.sombra.us.transcend.io"` and that Sombra will be used instead.
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkEA6WCT7Xcjs = require('../chunk-EA6WCT7X.cjs');require('../chunk-CLJATLM4.cjs');require('../chunk-FZTNEEMW.cjs');require('../chunk-7PB6LVSE.cjs');var _core = require('@stricli/core');async function e(){let o=process.argv.slice(3);_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.COMP_LINE, 'optionalAccess', _3 => _3.endsWith, 'call', _4 => _4(" ")])&&o.push(""),await _core.proposeCompletions.call(void 0, _chunkEA6WCT7Xcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process));try{for(let{completion:r}of await _core.proposeCompletions.call(void 0, _chunkEA6WCT7Xcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process)))process.stdout.write(`${r}
2
+ "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkDYBVUGHHcjs = require('../chunk-DYBVUGHH.cjs');require('../chunk-BPOXNSPY.cjs');require('../chunk-DQCPGPXG.cjs');require('../chunk-7PB6LVSE.cjs');var _core = require('@stricli/core');async function e(){let o=process.argv.slice(3);_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.COMP_LINE, 'optionalAccess', _3 => _3.endsWith, 'call', _4 => _4(" ")])&&o.push(""),await _core.proposeCompletions.call(void 0, _chunkDYBVUGHHcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process));try{for(let{completion:r}of await _core.proposeCompletions.call(void 0, _chunkDYBVUGHHcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process)))process.stdout.write(`${r}
3
3
  `)}catch (e2){}}e();
4
4
  //# sourceMappingURL=bash-complete.cjs.map
package/dist/bin/cli.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkEA6WCT7Xcjs = require('../chunk-EA6WCT7X.cjs');require('../chunk-CLJATLM4.cjs');require('../chunk-FZTNEEMW.cjs');require('../chunk-7PB6LVSE.cjs');var _core = require('@stricli/core');async function n(){await _core.run.call(void 0, _chunkEA6WCT7Xcjs.a,process.argv.slice(2),_chunkT462ONFXcjs.a.call(void 0, process))}n();
2
+ "use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkDYBVUGHHcjs = require('../chunk-DYBVUGHH.cjs');require('../chunk-BPOXNSPY.cjs');require('../chunk-DQCPGPXG.cjs');require('../chunk-7PB6LVSE.cjs');var _core = require('@stricli/core');async function n(){await _core.run.call(void 0, _chunkDYBVUGHHcjs.a,process.argv.slice(2),_chunkT462ONFXcjs.a.call(void 0, process))}n();
3
3
  //# sourceMappingURL=cli.cjs.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkEA6WCT7Xcjs = require('../chunk-EA6WCT7X.cjs');require('../chunk-CLJATLM4.cjs');var _chunkZUNVPK23cjs = require('../chunk-ZUNVPK23.cjs');require('../chunk-FZTNEEMW.cjs');require('../chunk-7PB6LVSE.cjs');var _core = require('@stricli/core');var o={"tr-build-xdi-sync-endpoint":["consent","build-xdi-sync-endpoint"],"tr-consent-manager-service-json-to-yml":["inventory","consent-manager-service-json-to-yml"],"tr-consent-managers-to-business-entities":["inventory","consent-managers-to-business-entities"],"tr-cron-mark-identifiers-completed":["request","cron","mark-identifiers-completed"],"tr-cron-pull-identifiers":["request","cron","pull-identifiers"],"tr-derive-data-silos-from-data-flows":["inventory","derive-data-silos-from-data-flows"],"tr-derive-data-silos-from-data-flows-cross-instance":["inventory","derive-data-silos-from-data-flows-cross-instance"],"tr-discover-silos":["inventory","discover-silos"],"tr-generate-api-keys":["admin","generate-api-keys"],"tr-manual-enrichment-pull-identifiers":["request","preflight","pull-identifiers"],"tr-manual-enrichment-push-identifiers":["request","preflight","push-identifiers"],"tr-mark-request-data-silos-completed":["request","system","mark-request-data-silos-completed"],"tr-pull":["inventory","pull"],"tr-pull-consent-metrics":["consent","pull-consent-metrics"],"tr-pull-consent-preferences":["consent","pull-consent-preferences"],"tr-pull-datapoints":["inventory","pull-datapoints"],"tr-pull-pull-unstructured-discovery-files":["inventory","pull-unstructured-discovery-files"],"tr-push":["inventory","push"],"tr-request-approve":["request","approve"],"tr-request-cancel":["request","cancel"],"tr-request-download-files":["request","download-files"],"tr-request-enricher-restart":["request","enricher-restart"],"tr-request-export":["request","export"],"tr-request-mark-silent":["request","mark-silent"],"tr-request-notify-additional-time":["request","notify-additional-time"],"tr-request-reject-unverified-identifiers":["request","reject-unverified-identifiers"],"tr-request-restart":["request","restart"],"tr-request-upload":["request","upload"],"tr-retry-request-data-silos":["request","system","retry-request-data-silos"],"tr-scan-packages":["inventory","scan-packages"],"tr-skip-preflight-jobs":["request","skip-preflight-jobs"],"tr-skip-request-data-silos":["request","system","skip-request-data-silos"],"tr-sync-ot":["migration","sync-ot"],"tr-update-consent-manager":["consent","update-consent-manager"],"tr-upload-consent-preferences":["consent","upload-consent-preferences"],"tr-upload-cookies-from-csv":["consent","upload-cookies-from-csv"],"tr-upload-data-flows-from-csv":["consent","upload-data-flows-from-csv"],"tr-upload-preferences":["consent","upload-preferences"]};function p(t){return _optionalChain([_core.generateHelpTextForAllCommands.call(void 0, _chunkEA6WCT7Xcjs.a), 'access', _ => _.find, 'call', _2 => _2(s=>s[0]===`${_chunkEA6WCT7Xcjs.a.config.name} ${t.join(" ")}`), 'optionalAccess', _3 => _3[1]])}function i(t){_chunkZUNVPK23cjs.a.log("[DEPRECATION NOTICE]");let e=o[t];if(!e){let a=Object.entries(o).map(([l,d])=>`\`${l}\` -> \`${_chunkEA6WCT7Xcjs.a.config.name} ${d.join(" ")}\``).join(`
2
+ "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkDYBVUGHHcjs = require('../chunk-DYBVUGHH.cjs');require('../chunk-BPOXNSPY.cjs');var _chunkZUNVPK23cjs = require('../chunk-ZUNVPK23.cjs');require('../chunk-DQCPGPXG.cjs');require('../chunk-7PB6LVSE.cjs');var _core = require('@stricli/core');var o={"tr-build-xdi-sync-endpoint":["consent","build-xdi-sync-endpoint"],"tr-consent-manager-service-json-to-yml":["inventory","consent-manager-service-json-to-yml"],"tr-consent-managers-to-business-entities":["inventory","consent-managers-to-business-entities"],"tr-cron-mark-identifiers-completed":["request","cron","mark-identifiers-completed"],"tr-cron-pull-identifiers":["request","cron","pull-identifiers"],"tr-derive-data-silos-from-data-flows":["inventory","derive-data-silos-from-data-flows"],"tr-derive-data-silos-from-data-flows-cross-instance":["inventory","derive-data-silos-from-data-flows-cross-instance"],"tr-discover-silos":["inventory","discover-silos"],"tr-generate-api-keys":["admin","generate-api-keys"],"tr-manual-enrichment-pull-identifiers":["request","preflight","pull-identifiers"],"tr-manual-enrichment-push-identifiers":["request","preflight","push-identifiers"],"tr-mark-request-data-silos-completed":["request","system","mark-request-data-silos-completed"],"tr-pull":["inventory","pull"],"tr-pull-consent-metrics":["consent","pull-consent-metrics"],"tr-pull-consent-preferences":["consent","pull-consent-preferences"],"tr-pull-datapoints":["inventory","pull-datapoints"],"tr-pull-pull-unstructured-discovery-files":["inventory","pull-unstructured-discovery-files"],"tr-push":["inventory","push"],"tr-request-approve":["request","approve"],"tr-request-cancel":["request","cancel"],"tr-request-download-files":["request","download-files"],"tr-request-enricher-restart":["request","enricher-restart"],"tr-request-export":["request","export"],"tr-request-mark-silent":["request","mark-silent"],"tr-request-notify-additional-time":["request","notify-additional-time"],"tr-request-reject-unverified-identifiers":["request","reject-unverified-identifiers"],"tr-request-restart":["request","restart"],"tr-request-upload":["request","upload"],"tr-retry-request-data-silos":["request","system","retry-request-data-silos"],"tr-scan-packages":["inventory","scan-packages"],"tr-skip-preflight-jobs":["request","skip-preflight-jobs"],"tr-skip-request-data-silos":["request","system","skip-request-data-silos"],"tr-sync-ot":["migration","sync-ot"],"tr-update-consent-manager":["consent","update-consent-manager"],"tr-upload-consent-preferences":["consent","upload-consent-preferences"],"tr-upload-cookies-from-csv":["consent","upload-cookies-from-csv"],"tr-upload-data-flows-from-csv":["consent","upload-data-flows-from-csv"],"tr-upload-preferences":["consent","upload-preferences"]};function p(t){return _optionalChain([_core.generateHelpTextForAllCommands.call(void 0, _chunkDYBVUGHHcjs.a), 'access', _ => _.find, 'call', _2 => _2(s=>s[0]===`${_chunkDYBVUGHHcjs.a.config.name} ${t.join(" ")}`), 'optionalAccess', _3 => _3[1]])}function i(t){_chunkZUNVPK23cjs.a.log("[DEPRECATION NOTICE]");let e=o[t];if(!e){let a=Object.entries(o).map(([l,d])=>`\`${l}\` -> \`${_chunkDYBVUGHHcjs.a.config.name} ${d.join(" ")}\``).join(`
3
3
  `);_chunkZUNVPK23cjs.a.log(`This command is deprecated as of v7.0.0. Here is a list of new commands, mapped to their legacy command names:
4
4
  ${a}`);return}_chunkZUNVPK23cjs.a.log(`\`${t}\` is deprecated as of v7.0.0.
5
- Use \`${_chunkEA6WCT7Xcjs.a.config.name} ${e.join(" ")}\` instead.
5
+ Use \`${_chunkDYBVUGHHcjs.a.config.name} ${e.join(" ")}\` instead.
6
6
  `);let s=p(e);if(!s)throw new Error(`Failed to get help text for command: \`${e.join(" ")}\``);_chunkZUNVPK23cjs.a.log(s)}function m(){let e=_optionalChain([process, 'access', _4 => _4.argv, 'access', _5 => _5.at, 'call', _6 => _6(-1), 'optionalAccess', _7 => _7.split, 'call', _8 => _8("/"), 'access', _9 => _9.pop, 'call', _10 => _10(), 'optionalAccess', _11 => _11.trim, 'call', _12 => _12()]);if(e)i(e);else throw new Error("Deprecated command");process.exit(1)}m();
7
7
  //# sourceMappingURL=deprecated-command.cjs.map
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkVWGA62SGcjs = require('./chunk-VWGA62SG.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkFZTNEEMWcjs = require('./chunk-FZTNEEMW.cjs');var _os = require('os');function Kt(e,t){let o=Math.max(1,_nullishCoalesce(_optionalChain([_os.availableParallelism, 'optionalCall', _2 => _2()]), () => (1)));return{poolSize:typeof e=="number"&&e>0?Math.min(e,t):Math.min(o,t),cpuCount:o}}var _child_process = require('child_process');var _path = require('path');var _fs = require('fs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);function rt(e){return`'${String(e).replace(/'/g,"'\\''")}'`}function ot(e,t,o=!1){if(o)return;let r=_os.platform.call(void 0, );try{if(r==="darwin"){let l=e.map(rt).join(" -f "),s=`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk56QKBG2Rcjs = require('./chunk-56QKBG2R.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkDQCPGPXGcjs = require('./chunk-DQCPGPXG.cjs');var _os = require('os');function Kt(e,t){let o=Math.max(1,_nullishCoalesce(_optionalChain([_os.availableParallelism, 'optionalCall', _2 => _2()]), () => (1)));return{poolSize:typeof e=="number"&&e>0?Math.min(e,t):Math.min(o,t),cpuCount:o}}var _child_process = require('child_process');var _path = require('path');var _fs = require('fs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);function rt(e){return`'${String(e).replace(/'/g,"'\\''")}'`}function ot(e,t,o=!1){if(o)return;let r=_os.platform.call(void 0, );try{if(r==="darwin"){let l=e.map(rt).join(" -f "),s=`
2
2
  tell application "Terminal"
3
3
  activate
4
4
  do script "printf '\\e]0;${t}\\a'; tail -n +1 -f ${l}"
@@ -11,7 +11,7 @@
11
11
  `):L.write(`${k}
12
12
  `)}catch (e6){}});i.stderr.on("data",x)}return i[at]={structuredPath:a,outPath:f,errPath:m,infoPath:c,warnPath:d,errorPath:g},n&&ot([a,f,m,c,d,g],`worker-${t}`,l),p.on("error",()=>{}),h.on("error",()=>{}),T.on("error",()=>{}),L.on("error",()=>{}),$.on("error",()=>{}),i}var _readline = require('readline'); var q = _interopRequireWildcard(_readline); var gt = _interopRequireWildcard(_readline);var ut="",Ft=(e,t)=>{let o=Math.min(e-1,9),r=e<=1?"0":`0-${o}`,n=e>10?" (Tab/Shift+Tab for \u226510)":"";return t?_colors2.default.dim("Run complete \u2014 digits to view logs \u2022 Tab/Shift+Tab cycle \u2022 Esc/Ctrl+] detach \u2022 q to quit"):_colors2.default.dim(`Hotkeys: [${r}] attach${n} \u2022 e=errors \u2022 w=warnings \u2022 i=info \u2022 l=logs \u2022 Tab/Shift+Tab \u2022 Esc/Ctrl+] detach \u2022 Ctrl+C exit`)};function ue(e,t,o=!1){let r=[...t.renderHeader(e),"",...t.renderWorkers(e),...o?[]:["",Ft(e.poolSize,e.final)],...t.renderExtras?[""].concat(t.renderExtras(e)):[]].join(`
13
13
  `);!e.final&&r===ut||(ut=r,e.final?process.stdout.write("\x1B[?25h"):(process.stdout.write("\x1B[?25l"),q.cursorTo(process.stdout,0,0),q.clearScreenDown(process.stdout)),process.stdout.write(`${r}
14
- `))}function J(e,t,o){let r=t.get(e);if(O(r))try{let n=K(r);if(n!=null)return n}catch (e7){}return o.get(e)}async function dt(e,t,o){await new Promise(r=>{try{let n=_fs.statSync.call(void 0, e),l=Math.max(0,n.size-t),s=_fs.createReadStream.call(void 0, e,{start:l,encoding:"utf8"});s.on("data",a=>o(a)),s.on("end",r),s.on("error",r)}catch (e8){r(void 0)}})}function pt(e,t,o){if(t.ctrl&&t.name==="c")return{type:"CTRL_C"};if(o==="dashboard")return t.name&&/^[0-9]$/.test(t.name)?{type:"ATTACH",id:Number(t.name)}:t.name==="tab"&&!t.shift?{type:"CYCLE",delta:1}:t.name==="tab"&&t.shift?{type:"CYCLE",delta:-1}:t.name==="q"?{type:"QUIT"}:null;if(t.name==="escape"||t.ctrl&&t.name==="]")return{type:"DETACH"};if(t.ctrl&&t.name==="d")return{type:"CTRL_D"};let r=_nullishCoalesce(_nullishCoalesce(t.sequence, () => (e)), () => (""));return r?{type:"FORWARD",sequence:r}:null}function ft(e){return[...e.keys()].sort((t,o)=>t-o)}function mt(e,t,o){if(!e.length)return null;let r=_nullishCoalesce(t, () => (e[0])),n=e.indexOf(r);return n===-1&&(n=0),n=(n+o+e.length)%e.length,e[n]}function ht(e){let{workers:t,onAttach:o,onDetach:r,onCtrlC:n,getLogPaths:l,replayBytes:s=200*1024,replayWhich:a=["out","err"],onEnterAttachScreen:f,ports:m}=e,c=_nullishCoalesce(_optionalChain([m, 'optionalAccess', _17 => _17.stdin]), () => (process.stdin)),d=_nullishCoalesce(_optionalChain([m, 'optionalAccess', _18 => _18.stdout]), () => (process.stdout)),g=_nullishCoalesce(_optionalChain([m, 'optionalAccess', _19 => _19.stderr]), () => (process.stderr)),i=(...b)=>{if(_chunkFZTNEEMWcjs.z)try{(_nullishCoalesce(_optionalChain([m, 'optionalAccess', _20 => _20.stderr]), () => (process.stderr))).write(`[keys] ${b.map(String).join(" ")}
14
+ `))}function J(e,t,o){let r=t.get(e);if(O(r))try{let n=K(r);if(n!=null)return n}catch (e7){}return o.get(e)}async function dt(e,t,o){await new Promise(r=>{try{let n=_fs.statSync.call(void 0, e),l=Math.max(0,n.size-t),s=_fs.createReadStream.call(void 0, e,{start:l,encoding:"utf8"});s.on("data",a=>o(a)),s.on("end",r),s.on("error",r)}catch (e8){r(void 0)}})}function pt(e,t,o){if(t.ctrl&&t.name==="c")return{type:"CTRL_C"};if(o==="dashboard")return t.name&&/^[0-9]$/.test(t.name)?{type:"ATTACH",id:Number(t.name)}:t.name==="tab"&&!t.shift?{type:"CYCLE",delta:1}:t.name==="tab"&&t.shift?{type:"CYCLE",delta:-1}:t.name==="q"?{type:"QUIT"}:null;if(t.name==="escape"||t.ctrl&&t.name==="]")return{type:"DETACH"};if(t.ctrl&&t.name==="d")return{type:"CTRL_D"};let r=_nullishCoalesce(_nullishCoalesce(t.sequence, () => (e)), () => (""));return r?{type:"FORWARD",sequence:r}:null}function ft(e){return[...e.keys()].sort((t,o)=>t-o)}function mt(e,t,o){if(!e.length)return null;let r=_nullishCoalesce(t, () => (e[0])),n=e.indexOf(r);return n===-1&&(n=0),n=(n+o+e.length)%e.length,e[n]}function ht(e){let{workers:t,onAttach:o,onDetach:r,onCtrlC:n,getLogPaths:l,replayBytes:s=200*1024,replayWhich:a=["out","err"],onEnterAttachScreen:f,ports:m}=e,c=_nullishCoalesce(_optionalChain([m, 'optionalAccess', _17 => _17.stdin]), () => (process.stdin)),d=_nullishCoalesce(_optionalChain([m, 'optionalAccess', _18 => _18.stdout]), () => (process.stdout)),g=_nullishCoalesce(_optionalChain([m, 'optionalAccess', _19 => _19.stderr]), () => (process.stderr)),i=(...b)=>{if(_chunkDQCPGPXGcjs.z)try{(_nullishCoalesce(_optionalChain([m, 'optionalAccess', _20 => _20.stderr]), () => (process.stderr))).write(`[keys] ${b.map(String).join(" ")}
15
15
  `)}catch (e9){}};if(!c.isTTY)return()=>{};gt.emitKeypressEvents(c),_optionalChain([c, 'access', _21 => _21.setRawMode, 'optionalCall', _22 => _22(!0)]);let p="dashboard",h=null,T=null,L=null;async function $(b){if(!l)return;let y=l(b);if(!y)return;let S=[];for(let w of a)w==="out"&&S.push(y.outPath),w==="err"&&S.push(y.errPath),w==="structured"&&S.push(y.structuredPath);if(S.length){d.write(`
16
16
  ------------ replay ------------
17
17
  `);for(let w of S)d.write(`
@@ -19,7 +19,7 @@
19
19
  `),await dt(w,s,R=>d.write(R));d.write(`
20
20
  --------------------------------
21
21
 
22
- `)}}let E=async b=>{i("attach()",`id=${b}`);let y=t.get(b);if(!y)return;p==="attached"&&x(),p="attached",h=b,_optionalChain([f, 'optionalCall', _23 => _23(b)]),_optionalChain([o, 'optionalCall', _24 => _24(b)]),await $(b),T=w=>d.write(w),L=w=>g.write(w),_optionalChain([y, 'access', _25 => _25.stdout, 'optionalAccess', _26 => _26.on, 'call', _27 => _27("data",T)]),_optionalChain([y, 'access', _28 => _28.stderr, 'optionalAccess', _29 => _29.on, 'call', _30 => _30("data",L)]);let S=()=>{h===b&&x()};y.once("exit",S)},x=()=>{if(i("detach()",`id=${h}`),h==null)return;let b=h,y=t.get(b);y&&(T&&_optionalChain([y, 'access', _31 => _31.stdout, 'optionalAccess', _32 => _32.off, 'call', _33 => _33("data",T)]),L&&_optionalChain([y, 'access', _34 => _34.stderr, 'optionalAccess', _35 => _35.off, 'call', _36 => _36("data",L)])),T=null,L=null,h=null,p="dashboard",_optionalChain([r, 'optionalCall', _37 => _37()])},k=(b,y)=>{i("keypress",JSON.stringify({str:b,name:y.name,seq:y.sequence,ctrl:y.ctrl,meta:y.meta,shift:y.shift,mode:p}));let S=pt(b,y,p);if(i("mapped",JSON.stringify(S)),!!S)switch(S.type){case"CTRL_C":{if(i("CTRL_C"),p==="attached"&&h!=null){let w=t.get(h);try{_optionalChain([w, 'optionalAccess', _38 => _38.kill, 'call', _39 => _39("SIGINT")])}catch (e10){}x();return}_optionalChain([n, 'optionalCall', _40 => _40()]);return}case"ATTACH":{if(i("ATTACH",`id=${S.id}`,`has=${t.has(S.id)}`),p!=="dashboard")return;t.has(S.id)&&E(S.id);return}case"CYCLE":{if(i("CYCLE",`delta=${S.delta}`),p!=="dashboard")return;let w=mt(ft(t),h,S.delta);w!=null&&E(w);return}case"QUIT":{if(p!=="dashboard")return;_optionalChain([n, 'optionalCall', _41 => _41()]);return}case"DETACH":{i("DETACH"),p==="attached"&&x();return}case"CTRL_D":{if(p==="attached"&&h!=null){let w=t.get(h);try{_optionalChain([w, 'optionalAccess', _42 => _42.stdin, 'optionalAccess', _43 => _43.end, 'call', _44 => _44()])}catch (e11){}}return}case"FORWARD":if(p==="attached"&&h!=null){let w=t.get(h);try{_optionalChain([w, 'optionalAccess', _45 => _45.stdin, 'optionalAccess', _46 => _46.write, 'call', _47 => _47(S.sequence)])}catch (e12){}}}},A=b=>{if(p==="attached"&&h!=null){let y=t.get(h);try{_optionalChain([y, 'optionalAccess', _48 => _48.stdin, 'optionalAccess', _49 => _49.write, 'call', _50 => _50(b)])}catch (e13){}}},j=()=>{c.off("keypress",k),c.off("data",A),_optionalChain([c, 'access', _51 => _51.setRawMode, 'optionalCall', _52 => _52(!1)]),d.write("\x1B[?25h")};return c.on("keypress",k),c.on("data",A),j}async function Re(e){let{title:t,baseDir:o,poolSize:r,cpuCount:n,render:l,childModulePath:s,hooks:a,filesTotal:f,childFlag:m,viewerMode:c=!1}=e,d=_nullishCoalesce(e.openLogWindows, () => (!c)),g=_nullishCoalesce(e.isSilent, () => (!0)),i=Date.now(),p=it(o),h=new Map,T=new Map,L=new Map,$=new _chunkVWGA62SGcjs.bg,x=_nullishCoalesce(_optionalChain([a, 'access', _53 => _53.initTotals, 'optionalCall', _54 => _54()]), () => ({})),k=0,A=0,j=0,b=null,y=!1,S=!1,w=null,R=(u=!1)=>{S||l({title:t,poolSize:r,cpuCount:n,filesTotal:f,filesCompleted:A,filesFailed:j,workerState:T,totals:x,final:u,exportStatus:_optionalChain([a, 'access', _55 => _55.exportStatus, 'optionalCall', _56 => _56()]),throughput:{successSoFar:A,r10s:$.rate(1e4),r60s:$.rate(6e4)}})},U=u=>{let v=a.nextTask();if(!v)return!1;let F=h.get(u),P=a.taskLabel(v),W=_optionalChain([a, 'access', _57 => _57.initSlotProgress, 'optionalCall', _58 => _58(v)]);return T.set(u,{busy:!0,file:P,startedAt:Date.now(),lastLevel:"ok",progress:W}),G(F,{type:"task",payload:v}),R(),!0};for(let u=0;u<r;u+=1){let v=lt({id:u,modulePath:s,logDir:p,openLogWindows:d,isSilent:g,childFlag:m});h.set(u,v),T.set(u,{busy:!1,file:null,startedAt:null,lastLevel:"ok"}),L.set(u,K(v)),k+=1;let F=I(P=>{let W=_(P);if(!W)return;let H=T.get(u);H.lastLevel!==W&&(T.set(u,{...H,lastLevel:W}),R())});_optionalChain([v, 'access', _59 => _59.stderr, 'optionalAccess', _60 => _60.on, 'call', _61 => _61("data",F)]),v.on("message",P=>{if(!(!P||typeof P!="object")){if(P.type==="ready"){y||(y=!0,b=setInterval(()=>R(!1),350)),U(u);return}if(P.type==="progress"){x=a.onProgress(x,P.payload);let W=T.get(u);T.set(u,{...W,progress:P.payload}),R();return}if(P.type==="result"){let W=T.get(u),{totals:H,ok:X}=a.onResult(x,P.payload);x=H,X?(A+=1,$.add(1)):j+=1,T.set(u,{...W,busy:!1,file:null,progress:void 0,lastLevel:X?"ok":"error"}),!U(u)&&O(v)&&G(v,{type:"shutdown"}),R()}}}),v.on("exit",()=>{k-=1,k===0&&(b&&clearInterval(b),R(!0))})}let z=()=>{},Y=()=>{try{_optionalChain([process, 'access', _62 => _62.stdin, 'access', _63 => _63.setRawMode, 'optionalCall', _64 => _64(!1)])}catch (e14){}try{process.stdin.pause()}catch (e15){}},Q=()=>{if(b&&clearInterval(b),_optionalChain([z, 'optionalCall', _65 => _65()]),w)try{process.stdin.off("data",w)}catch (e16){}Y(),process.stdout.write(`
22
+ `)}}let E=async b=>{i("attach()",`id=${b}`);let y=t.get(b);if(!y)return;p==="attached"&&x(),p="attached",h=b,_optionalChain([f, 'optionalCall', _23 => _23(b)]),_optionalChain([o, 'optionalCall', _24 => _24(b)]),await $(b),T=w=>d.write(w),L=w=>g.write(w),_optionalChain([y, 'access', _25 => _25.stdout, 'optionalAccess', _26 => _26.on, 'call', _27 => _27("data",T)]),_optionalChain([y, 'access', _28 => _28.stderr, 'optionalAccess', _29 => _29.on, 'call', _30 => _30("data",L)]);let S=()=>{h===b&&x()};y.once("exit",S)},x=()=>{if(i("detach()",`id=${h}`),h==null)return;let b=h,y=t.get(b);y&&(T&&_optionalChain([y, 'access', _31 => _31.stdout, 'optionalAccess', _32 => _32.off, 'call', _33 => _33("data",T)]),L&&_optionalChain([y, 'access', _34 => _34.stderr, 'optionalAccess', _35 => _35.off, 'call', _36 => _36("data",L)])),T=null,L=null,h=null,p="dashboard",_optionalChain([r, 'optionalCall', _37 => _37()])},k=(b,y)=>{i("keypress",JSON.stringify({str:b,name:y.name,seq:y.sequence,ctrl:y.ctrl,meta:y.meta,shift:y.shift,mode:p}));let S=pt(b,y,p);if(i("mapped",JSON.stringify(S)),!!S)switch(S.type){case"CTRL_C":{if(i("CTRL_C"),p==="attached"&&h!=null){let w=t.get(h);try{_optionalChain([w, 'optionalAccess', _38 => _38.kill, 'call', _39 => _39("SIGINT")])}catch (e10){}x();return}_optionalChain([n, 'optionalCall', _40 => _40()]);return}case"ATTACH":{if(i("ATTACH",`id=${S.id}`,`has=${t.has(S.id)}`),p!=="dashboard")return;t.has(S.id)&&E(S.id);return}case"CYCLE":{if(i("CYCLE",`delta=${S.delta}`),p!=="dashboard")return;let w=mt(ft(t),h,S.delta);w!=null&&E(w);return}case"QUIT":{if(p!=="dashboard")return;_optionalChain([n, 'optionalCall', _41 => _41()]);return}case"DETACH":{i("DETACH"),p==="attached"&&x();return}case"CTRL_D":{if(p==="attached"&&h!=null){let w=t.get(h);try{_optionalChain([w, 'optionalAccess', _42 => _42.stdin, 'optionalAccess', _43 => _43.end, 'call', _44 => _44()])}catch (e11){}}return}case"FORWARD":if(p==="attached"&&h!=null){let w=t.get(h);try{_optionalChain([w, 'optionalAccess', _45 => _45.stdin, 'optionalAccess', _46 => _46.write, 'call', _47 => _47(S.sequence)])}catch (e12){}}}},A=b=>{if(p==="attached"&&h!=null){let y=t.get(h);try{_optionalChain([y, 'optionalAccess', _48 => _48.stdin, 'optionalAccess', _49 => _49.write, 'call', _50 => _50(b)])}catch (e13){}}},j=()=>{c.off("keypress",k),c.off("data",A),_optionalChain([c, 'access', _51 => _51.setRawMode, 'optionalCall', _52 => _52(!1)]),d.write("\x1B[?25h")};return c.on("keypress",k),c.on("data",A),j}async function Re(e){let{title:t,baseDir:o,poolSize:r,cpuCount:n,render:l,childModulePath:s,hooks:a,filesTotal:f,childFlag:m,viewerMode:c=!1}=e,d=_nullishCoalesce(e.openLogWindows, () => (!c)),g=_nullishCoalesce(e.isSilent, () => (!0)),i=Date.now(),p=it(o),h=new Map,T=new Map,L=new Map,$=new _chunk56QKBG2Rcjs.dg,x=_nullishCoalesce(_optionalChain([a, 'access', _53 => _53.initTotals, 'optionalCall', _54 => _54()]), () => ({})),k=0,A=0,j=0,b=null,y=!1,S=!1,w=null,R=(u=!1)=>{S||l({title:t,poolSize:r,cpuCount:n,filesTotal:f,filesCompleted:A,filesFailed:j,workerState:T,totals:x,final:u,exportStatus:_optionalChain([a, 'access', _55 => _55.exportStatus, 'optionalCall', _56 => _56()]),throughput:{successSoFar:A,r10s:$.rate(1e4),r60s:$.rate(6e4)}})},U=u=>{let v=a.nextTask();if(!v)return!1;let F=h.get(u),P=a.taskLabel(v),W=_optionalChain([a, 'access', _57 => _57.initSlotProgress, 'optionalCall', _58 => _58(v)]);return T.set(u,{busy:!0,file:P,startedAt:Date.now(),lastLevel:"ok",progress:W}),G(F,{type:"task",payload:v}),R(),!0};for(let u=0;u<r;u+=1){let v=lt({id:u,modulePath:s,logDir:p,openLogWindows:d,isSilent:g,childFlag:m});h.set(u,v),T.set(u,{busy:!1,file:null,startedAt:null,lastLevel:"ok"}),L.set(u,K(v)),k+=1;let F=I(P=>{let W=_(P);if(!W)return;let H=T.get(u);H.lastLevel!==W&&(T.set(u,{...H,lastLevel:W}),R())});_optionalChain([v, 'access', _59 => _59.stderr, 'optionalAccess', _60 => _60.on, 'call', _61 => _61("data",F)]),v.on("message",P=>{if(!(!P||typeof P!="object")){if(P.type==="ready"){y||(y=!0,b=setInterval(()=>R(!1),350)),U(u);return}if(P.type==="progress"){x=a.onProgress(x,P.payload);let W=T.get(u);T.set(u,{...W,progress:P.payload}),R();return}if(P.type==="result"){let W=T.get(u),{totals:H,ok:X}=a.onResult(x,P.payload);x=H,X?(A+=1,$.add(1)):j+=1,T.set(u,{...W,busy:!1,file:null,progress:void 0,lastLevel:X?"ok":"error"}),!U(u)&&O(v)&&G(v,{type:"shutdown"}),R()}}}),v.on("exit",()=>{k-=1,k===0&&(b&&clearInterval(b),R(!0))})}let z=()=>{},Y=()=>{try{_optionalChain([process, 'access', _62 => _62.stdin, 'access', _63 => _63.setRawMode, 'optionalCall', _64 => _64(!1)])}catch (e14){}try{process.stdin.pause()}catch (e15){}},Q=()=>{if(b&&clearInterval(b),_optionalChain([z, 'optionalCall', _65 => _65()]),w)try{process.stdin.off("data",w)}catch (e16){}Y(),process.stdout.write(`
23
23
  Stopping workers...
24
24
  `);for(let[,u]of h){O(u)&&G(u,{type:"shutdown"});try{_optionalChain([u, 'optionalAccess', _66 => _66.kill, 'call', _67 => _67("SIGTERM")])}catch (e17){}}process.exit(130)},V=u=>{S=!0,process.stdout.write("\x1B[2J\x1B[H"),process.stdout.write(`Attached to worker ${u}. (Esc/Ctrl+] detach \u2022 Ctrl+D EOF \u2022 Ctrl+C SIGINT)
25
25
  `)},St=()=>{S=!1,R()};if(process.once("SIGINT",Q),!c){if(process.stdin.isTTY){try{process.stdin.setRawMode(!0)}catch (e18){process.stdout.write(_colors2.default.yellow(`Warning: Unable to enable raw mode for interactive key handling.
@@ -35,4 +35,4 @@ Press Esc/Ctrl+] to return to dashboard.
35
35
  `),(async()=>{try{await wt(t,g,i)}catch (e21){m=!1,r(!1),o()}})())},d=(g,i)=>{if(n)try{let p=n.exportCombinedLogs(t,g);a(`
36
36
  Wrote combined ${i} logs to: ${p}`),f(g,p)}catch (e22){a(`
37
37
  Failed to write combined ${i} logs`)}};return g=>{let i=g.toString("utf8");if(i==="e"){c(["err"],"error");return}if(i==="w"){c(["warn","err"],"warn");return}if(i==="i"){c(["info"],"all");return}if(i==="l"){c(["out","err","structured"],"all");return}if(i==="E"){d("error","error");return}if(i==="W"){d("warn","warn");return}if(i==="I"){d("info","info");return}if(i==="A"){d("all","ALL");return}let p=_optionalChain([s, 'optionalAccess', _78 => _78[i]]);if(p){p({noteExport:f,say:a});return}(i==="\x1B"||i==="")&&(m=!1,r(!1),o())}}var _events = require('events');var _url = require('url');function B(e){return typeof e=="number"?e.toLocaleString():"0"}function yt(e,t=40){let o=Math.max(0,Math.min(100,Math.floor(e))),r=Math.floor(o/100*t);return"\u2588".repeat(r)+"\u2591".repeat(t-r)}function Nt(e){let t=[...e.workerState.values()].filter(n=>n.busy).length,o=e.filesCompleted+e.filesFailed,r=e.filesTotal===0?100:Math.floor(o/Math.max(1,e.filesTotal)*100);return{done:o,inProgress:t,pct:r}}function or(e,t=[]){let{title:o,poolSize:r,cpuCount:n,filesTotal:l,filesCompleted:s,filesFailed:a,throughput:f}=e,{inProgress:m,pct:c}=Nt(e),d=[`${_colors2.default.bold(o)} \u2014 ${r} workers ${_colors2.default.dim(`(CPU avail: ${n})`)}`,`${_colors2.default.dim("Files")} ${B(l)} ${_colors2.default.dim("Completed")} ${B(s)} ${_colors2.default.dim("Failed")} ${a?_colors2.default.red(B(a)):B(a)} ${_colors2.default.dim("In-flight")} ${B(m)}`,`[${yt(c)}] ${c}%`];if(f){let g=Math.round(f.r10s*3600).toLocaleString(),i=Math.round(f.r60s*3600).toLocaleString(),p=_optionalChain([e, 'access', _79 => _79.throughput, 'optionalAccess', _80 => _80.successSoFar])!=null?` Newly uploaded: ${B(e.throughput.successSoFar)}`:"";d.push(_colors2.default.cyan(`Throughput: ${g}/hr (1h: ${i}/hr)${p}`))}return t.length?d.concat(t):d}function nr(e,t=o=>o?_path.basename.call(void 0, o):"-"){return[...e.workerState.entries()].map(([r,n])=>{let l=n.lastLevel==="error"?_colors2.default.red("ERROR "):n.lastLevel==="warn"?_colors2.default.yellow("WARN "):n.busy?_colors2.default.green("WORKING"):_colors2.default.dim("IDLE "),s=t(n.file),a=n.startedAt?`${Math.floor((Date.now()-n.startedAt)/1e3)}s`:"-",f=_nullishCoalesce(_optionalChain([n, 'access', _81 => _81.progress, 'optionalAccess', _82 => _82.processed]), () => (0)),m=_nullishCoalesce(_optionalChain([n, 'access', _83 => _83.progress, 'optionalAccess', _84 => _84.total]), () => (0)),c=m>0?Math.floor(f/m*100):0,d=m>0?yt(c,18):" ".repeat(18),g=m>0?`${f.toLocaleString()}/${m.toLocaleString()} (${c}%)`:_colors2.default.dim("\u2014");return` [w${r}] ${l} | ${s} | ${a} | [${d}] ${g}`})}exports.a = Kt; exports.b = Bt; exports.c = ue; exports.d = or; exports.e = nr; exports.f = Re; exports.g = Oe;
38
- //# sourceMappingURL=chunk-JSVWGZUF.cjs.map
38
+ //# sourceMappingURL=chunk-22KX2NM4.cjs.map