@transcend-io/cli 8.20.0 → 8.20.1
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/bin/bash-complete.cjs +1 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/bin/deprecated-command.cjs +2 -2
- package/dist/{chunk-G2PF2QFC.cjs → chunk-25BAHKKQ.cjs} +2 -2
- package/dist/{chunk-G2PF2QFC.cjs.map → chunk-25BAHKKQ.cjs.map} +1 -1
- package/dist/{chunk-CFAKXEZB.cjs → chunk-7YNUSMVA.cjs} +4 -4
- package/dist/{chunk-CFAKXEZB.cjs.map → chunk-7YNUSMVA.cjs.map} +1 -1
- package/dist/{chunk-WP4MWWEU.cjs → chunk-CIUYGNQB.cjs} +2 -2
- package/dist/{chunk-WP4MWWEU.cjs.map → chunk-CIUYGNQB.cjs.map} +1 -1
- package/dist/{chunk-R6TAK6HM.cjs → chunk-FEYTT6HR.cjs} +4 -4
- package/dist/{chunk-R6TAK6HM.cjs.map → chunk-FEYTT6HR.cjs.map} +1 -1
- package/dist/{chunk-XAMXO4ZU.cjs → chunk-GIQ4W7IV.cjs} +2 -2
- package/dist/{chunk-XAMXO4ZU.cjs.map → chunk-GIQ4W7IV.cjs.map} +1 -1
- package/dist/{chunk-VDPP6XH4.cjs → chunk-K6HEZGQI.cjs} +2 -2
- package/dist/{chunk-VDPP6XH4.cjs.map → chunk-K6HEZGQI.cjs.map} +1 -1
- package/dist/{chunk-W5G4MO4M.cjs → chunk-NL6N7BKE.cjs} +20 -20
- package/dist/{chunk-W5G4MO4M.cjs.map → chunk-NL6N7BKE.cjs.map} +1 -1
- package/dist/{chunk-WRFKBQI7.cjs → chunk-NZDUGK2E.cjs} +3 -3
- package/dist/{chunk-WRFKBQI7.cjs.map → chunk-NZDUGK2E.cjs.map} +1 -1
- package/dist/{chunk-HZLUANIA.cjs → chunk-OKGYUSXP.cjs} +2 -2
- package/dist/{chunk-HZLUANIA.cjs.map → chunk-OKGYUSXP.cjs.map} +1 -1
- package/dist/{chunk-2IKWKGRE.cjs → chunk-Q3L3F6ZM.cjs} +2 -2
- package/dist/{chunk-2IKWKGRE.cjs.map → chunk-Q3L3F6ZM.cjs.map} +1 -1
- package/dist/{chunk-EXKPAUEP.cjs → chunk-SHUWLLFX.cjs} +2 -2
- package/dist/{chunk-EXKPAUEP.cjs.map → chunk-SHUWLLFX.cjs.map} +1 -1
- package/dist/{chunk-GN4PQZTW.cjs → chunk-VV5ICWOA.cjs} +2 -2
- package/dist/{chunk-GN4PQZTW.cjs.map → chunk-VV5ICWOA.cjs.map} +1 -1
- package/dist/{impl-BYP6MSYN.cjs → impl-2TWG5FB4.cjs} +2 -2
- package/dist/{impl-BYP6MSYN.cjs.map → impl-2TWG5FB4.cjs.map} +1 -1
- package/dist/{impl-NLJZGXP5.cjs → impl-4KY3OTA5.cjs} +2 -2
- package/dist/{impl-NLJZGXP5.cjs.map → impl-4KY3OTA5.cjs.map} +1 -1
- package/dist/{impl-JJHHECCC.cjs → impl-4PLQOUTR.cjs} +2 -2
- package/dist/{impl-JJHHECCC.cjs.map → impl-4PLQOUTR.cjs.map} +1 -1
- package/dist/{impl-A4ARAZB5.cjs → impl-525AVKX2.cjs} +2 -2
- package/dist/{impl-A4ARAZB5.cjs.map → impl-525AVKX2.cjs.map} +1 -1
- package/dist/{impl-4ZMX6NI7.cjs → impl-5D7UM6EE.cjs} +2 -2
- package/dist/{impl-4ZMX6NI7.cjs.map → impl-5D7UM6EE.cjs.map} +1 -1
- package/dist/{impl-F67Z4Z5E.cjs → impl-5M24IMCM.cjs} +2 -2
- package/dist/{impl-F67Z4Z5E.cjs.map → impl-5M24IMCM.cjs.map} +1 -1
- package/dist/{impl-TCQVLEKS.cjs → impl-5Q6XGXFD.cjs} +3 -3
- package/dist/{impl-TCQVLEKS.cjs.map → impl-5Q6XGXFD.cjs.map} +1 -1
- package/dist/impl-6D2ZPQOK.cjs +2 -0
- package/dist/{impl-IYXSGCMU.cjs.map → impl-6D2ZPQOK.cjs.map} +1 -1
- package/dist/{impl-YZBWTEQH.cjs → impl-A5AXNEAP.cjs} +2 -2
- package/dist/{impl-YZBWTEQH.cjs.map → impl-A5AXNEAP.cjs.map} +1 -1
- package/dist/{impl-ZN4UWQUU.cjs → impl-ALCLH443.cjs} +2 -2
- package/dist/{impl-ZN4UWQUU.cjs.map → impl-ALCLH443.cjs.map} +1 -1
- package/dist/{impl-QJ6TMS77.cjs → impl-CQNJ6HJQ.cjs} +2 -2
- package/dist/{impl-QJ6TMS77.cjs.map → impl-CQNJ6HJQ.cjs.map} +1 -1
- package/dist/{impl-7HS5OXYP.cjs → impl-DBFAJVHK.cjs} +2 -2
- package/dist/{impl-7HS5OXYP.cjs.map → impl-DBFAJVHK.cjs.map} +1 -1
- package/dist/{impl-EONKFIXB.cjs → impl-DOKZVEDX.cjs} +2 -2
- package/dist/{impl-EONKFIXB.cjs.map → impl-DOKZVEDX.cjs.map} +1 -1
- package/dist/{impl-NI5AKEAP.cjs → impl-E7OIEYXX.cjs} +6 -6
- package/dist/{impl-NI5AKEAP.cjs.map → impl-E7OIEYXX.cjs.map} +1 -1
- package/dist/{impl-IDCUHY36.cjs → impl-ESGT6IFB.cjs} +2 -2
- package/dist/{impl-IDCUHY36.cjs.map → impl-ESGT6IFB.cjs.map} +1 -1
- package/dist/{impl-LRGRDGET.cjs → impl-HCIWAR4K.cjs} +2 -2
- package/dist/{impl-LRGRDGET.cjs.map → impl-HCIWAR4K.cjs.map} +1 -1
- package/dist/{impl-N2TGS42T.cjs → impl-J4RNNM5J.cjs} +2 -2
- package/dist/{impl-N2TGS42T.cjs.map → impl-J4RNNM5J.cjs.map} +1 -1
- package/dist/{impl-DPAJCCCQ.cjs → impl-JXBBXXSV.cjs} +2 -2
- package/dist/{impl-DPAJCCCQ.cjs.map → impl-JXBBXXSV.cjs.map} +1 -1
- package/dist/{impl-POLVK5PD.cjs → impl-KKHB3WSS.cjs} +2 -2
- package/dist/{impl-POLVK5PD.cjs.map → impl-KKHB3WSS.cjs.map} +1 -1
- package/dist/{impl-VEO2SBGG.cjs → impl-LIGJD3OO.cjs} +2 -2
- package/dist/{impl-VEO2SBGG.cjs.map → impl-LIGJD3OO.cjs.map} +1 -1
- package/dist/{impl-NNJJETJZ.cjs → impl-LN4DSTAR.cjs} +4 -4
- package/dist/{impl-NNJJETJZ.cjs.map → impl-LN4DSTAR.cjs.map} +1 -1
- package/dist/{impl-TA5EIWJS.cjs → impl-LRAKEF2T.cjs} +2 -2
- package/dist/{impl-TA5EIWJS.cjs.map → impl-LRAKEF2T.cjs.map} +1 -1
- package/dist/{impl-KCVLYM46.cjs → impl-PAEBDGSD.cjs} +2 -2
- package/dist/{impl-KCVLYM46.cjs.map → impl-PAEBDGSD.cjs.map} +1 -1
- package/dist/{impl-TSRLBSVW.cjs → impl-Q7ZLQBGK.cjs} +2 -2
- package/dist/{impl-TSRLBSVW.cjs.map → impl-Q7ZLQBGK.cjs.map} +1 -1
- package/dist/{impl-FSORO3NH.cjs → impl-QN7YU4D2.cjs} +2 -2
- package/dist/{impl-FSORO3NH.cjs.map → impl-QN7YU4D2.cjs.map} +1 -1
- package/dist/{impl-N2K7XLAG.cjs → impl-RYEREEYF.cjs} +2 -2
- package/dist/{impl-N2K7XLAG.cjs.map → impl-RYEREEYF.cjs.map} +1 -1
- package/dist/{impl-7NJTDC7N.cjs → impl-RYITPCNS.cjs} +2 -2
- package/dist/{impl-7NJTDC7N.cjs.map → impl-RYITPCNS.cjs.map} +1 -1
- package/dist/{impl-LHFUO3OY.cjs → impl-SIINULLT.cjs} +5 -5
- package/dist/{impl-LHFUO3OY.cjs.map → impl-SIINULLT.cjs.map} +1 -1
- package/dist/{impl-4OM2R3DU.cjs → impl-SQCIHHWP.cjs} +2 -2
- package/dist/{impl-4OM2R3DU.cjs.map → impl-SQCIHHWP.cjs.map} +1 -1
- package/dist/{impl-TMXKCYSF.cjs → impl-T3RWXOCB.cjs} +2 -2
- package/dist/{impl-TMXKCYSF.cjs.map → impl-T3RWXOCB.cjs.map} +1 -1
- package/dist/{impl-B4AVWMTA.cjs → impl-TFALTZMI.cjs} +2 -2
- package/dist/{impl-B4AVWMTA.cjs.map → impl-TFALTZMI.cjs.map} +1 -1
- package/dist/{impl-KV2YRQHY.cjs → impl-UB3JBDFF.cjs} +2 -2
- package/dist/{impl-KV2YRQHY.cjs.map → impl-UB3JBDFF.cjs.map} +1 -1
- package/dist/{impl-QM6PZE6N.cjs → impl-VHZCJ576.cjs} +5 -5
- package/dist/{impl-QM6PZE6N.cjs.map → impl-VHZCJ576.cjs.map} +1 -1
- package/dist/{impl-ZLI6YRLT.cjs → impl-W37LK3FV.cjs} +2 -2
- package/dist/{impl-ZLI6YRLT.cjs.map → impl-W37LK3FV.cjs.map} +1 -1
- package/dist/{impl-PEZVAY6Y.cjs → impl-XYX4VOVC.cjs} +2 -2
- package/dist/{impl-PEZVAY6Y.cjs.map → impl-XYX4VOVC.cjs.map} +1 -1
- package/dist/{impl-7725PBIW.cjs → impl-YCB6VJXU.cjs} +2 -2
- package/dist/{impl-7725PBIW.cjs.map → impl-YCB6VJXU.cjs.map} +1 -1
- package/dist/{impl-GM3LQMV6.cjs → impl-Z3IU4T47.cjs} +2 -2
- package/dist/{impl-GM3LQMV6.cjs.map → impl-Z3IU4T47.cjs.map} +1 -1
- package/dist/{impl-VYR77UN4.cjs → impl-ZT6V4JU3.cjs} +3 -3
- package/dist/{impl-VYR77UN4.cjs.map → impl-ZT6V4JU3.cjs.map} +1 -1
- package/dist/{impl-D47N3KS2.cjs → impl-ZXGWXMGH.cjs} +2 -2
- package/dist/{impl-D47N3KS2.cjs.map → impl-ZXGWXMGH.cjs.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +1 -1
- package/package.json +1 -1
- package/dist/impl-IYXSGCMU.cjs +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-T3RWXOCB.cjs","../src/commands/request/restart/impl.ts"],"names":["restart","auth","requestReceiptFolder","sombraAuth","actions","statuses","requestIds","createdAt","emailIsVerified","silentModeBefore","sendEmailReceipt","copyIdentifiers","skipWaitingPeriod","createdAtBefore","createdAtAfter","concurrency","transcendUrl","doneInputValidation","bulkRestartRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCwBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,oBAAA,CAAAhB,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,eAAA,CAAiBC,CAAAA,CACjB,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-T3RWXOCB.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { bulkRestartRequests } from '../../../lib/requests';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface RestartCommandFlags {\n auth: string;\n actions: RequestAction[];\n statuses: RequestStatus[];\n transcendUrl: string;\n requestReceiptFolder: string;\n sombraAuth?: string;\n concurrency: number;\n requestIds?: string[];\n emailIsVerified: boolean;\n createdAt?: Date;\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n sendEmailReceipt: boolean;\n copyIdentifiers: boolean;\n skipWaitingPeriod: boolean;\n}\n\nexport async function restart(\n this: LocalContext,\n {\n auth,\n requestReceiptFolder,\n sombraAuth,\n actions,\n statuses,\n requestIds,\n createdAt,\n emailIsVerified,\n silentModeBefore,\n sendEmailReceipt,\n copyIdentifiers,\n skipWaitingPeriod,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n }: RestartCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await bulkRestartRequests({\n requestReceiptFolder,\n auth,\n sombraAuth,\n requestActions: actions,\n requestStatuses: statuses,\n requestIds,\n createdAt,\n emailIsVerified,\n silentModeBefore,\n sendEmailReceipt,\n copyIdentifiers,\n skipWaitingPeriod,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n });\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCIUYGNQBcjs = require('./chunk-CIUYGNQB.cjs');require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-7YNUSMVA.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-Q3L3F6ZM.cjs');require('./chunk-Q7I37FJV.cjs');async function m({auth:i,transcendUrl:n,file:o,concurrency:r,actions:s,sombraAuth:a}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkCIUYGNQBcjs.a.call(void 0, {file:o,transcendUrl:n,concurrency:r,requestActions:s,auth:i,sombraAuth:a})}exports.pullIdentifiers = m;
|
|
2
|
+
//# sourceMappingURL=impl-TFALTZMI.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-TFALTZMI.cjs","../src/commands/request/preflight/pull-identifiers/impl.ts"],"names":["pullIdentifiers","auth","transcendUrl","file","concurrency","actions","sombraAuth","doneInputValidation","pullManualEnrichmentIdentifiersToCsv"],"mappings":"AAAA,iIAAwC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCc/P,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,iCAAAA,CACJ,IAAA,CAAAL,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,WAAA,CAAAE,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,IAAA,CAAAJ,CAAAA,CACA,UAAA,CAAAK,CACF,CAAC,CACH,CAAA,4BAAA","file":"/home/runner/work/cli/cli/dist/impl-TFALTZMI.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport { pullManualEnrichmentIdentifiersToCsv } from '../../../../lib/manual-enrichment';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PullIdentifiersCommandFlags {\n auth: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n actions?: RequestAction[];\n concurrency: number;\n}\n\nexport async function pullIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n concurrency,\n actions,\n sombraAuth,\n }: PullIdentifiersCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await pullManualEnrichmentIdentifiersToCsv({\n file,\n transcendUrl,\n concurrency,\n requestActions: actions,\n auth,\n sombraAuth,\n });\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk7YNUSMVAcjs = require('./chunk-7YNUSMVA.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-Q3L3F6ZM.cjs');require('./chunk-Q7I37FJV.cjs');async function F({auth:i,file:n,transcendUrl:r,cacheFilepath:a,requestReceiptFolder:s,sombraAuth:l,concurrency:p,attributes:d,isTest:c,isSilent:u,skipSendingReceipt:m,emailIsVerified:b,skipFilterStep:g,dryRun:f,debug:C,defaultPhoneCountryCode:h}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunk7YNUSMVAcjs.Gf.call(void 0, {cacheFilepath:a,requestReceiptFolder:s,file:n,auth:i,sombraAuth:l,concurrency:p,transcendUrl:r,defaultPhoneCountryCode:h,attributes:_chunk7YNUSMVAcjs.nc.call(void 0, d),debug:C,skipFilterStep:g,isSilent:u,skipSendingReceipt:m,emailIsVerified:b,isTest:c,dryRun:f})}exports.upload = F;
|
|
2
|
+
//# sourceMappingURL=impl-UB3JBDFF.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-UB3JBDFF.cjs","../src/commands/request/upload/impl.ts"],"names":["upload","auth","file","transcendUrl","cacheFilepath","requestReceiptFolder","sombraAuth","concurrency","attributes","isTest","isSilent","skipSendingReceipt","emailIsVerified","skipFilterStep","dryRun","debug","defaultPhoneCountryCode","doneInputValidation","uploadPrivacyRequestsFromCsv","splitCsvToList"],"mappings":"AAAA,iIAAwC,wDAAkD,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MC0B9M,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,aAAA,CAAAd,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,UAAA,CAAAK,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAJ,CAAAA,CACA,uBAAA,CAAAa,CAAAA,CACA,UAAA,CAAYG,kCAAAA,CAAyB,CAAA,CACrC,KAAA,CAAAJ,CAAAA,CACA,cAAA,CAAAF,CAAAA,CACA,QAAA,CAAAH,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,MAAA,CAAAH,CAAAA,CACA,MAAA,CAAAK,CACF,CAAC,CACH,CAAA,mBAAA","file":"/home/runner/work/cli/cli/dist/impl-UB3JBDFF.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport {\n splitCsvToList,\n uploadPrivacyRequestsFromCsv,\n} from '../../../lib/requests';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n cacheFilepath: string;\n requestReceiptFolder: string;\n sombraAuth?: string;\n concurrency: number;\n attributes: string;\n isTest: boolean;\n isSilent: boolean;\n skipSendingReceipt: boolean;\n emailIsVerified: boolean;\n skipFilterStep: boolean;\n dryRun: boolean;\n debug: boolean;\n defaultPhoneCountryCode: string;\n}\n\nexport async function upload(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n cacheFilepath,\n requestReceiptFolder,\n sombraAuth,\n concurrency,\n attributes,\n isTest,\n isSilent,\n skipSendingReceipt,\n emailIsVerified,\n skipFilterStep,\n dryRun,\n debug,\n defaultPhoneCountryCode,\n }: UploadCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await uploadPrivacyRequestsFromCsv({\n cacheFilepath,\n requestReceiptFolder,\n file,\n auth,\n sombraAuth,\n concurrency,\n transcendUrl,\n defaultPhoneCountryCode,\n attributes: splitCsvToList(attributes),\n debug,\n skipFilterStep,\n isSilent,\n skipSendingReceipt,\n emailIsVerified,\n isTest,\n dryRun,\n });\n}\n"]}
|
|
@@ -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 _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var
|
|
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 _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunk7YNUSMVAcjs = require('./chunk-7YNUSMVA.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkQ3L3F6ZMcjs = require('./chunk-Q3L3F6ZM.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _path = require('path');var _fs = require('fs');function lt(e,t){e||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A --directory must be provided.")),t.process.exit(1));let r=[];try{r=_fs.readdirSync.call(void 0, e).filter(n=>n.endsWith(".csv")).map(n=>_path.join.call(void 0, e,n)).filter(n=>{try{return _fs.statSync.call(void 0, n).isFile()}catch (e2){return!1}})}catch(o){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to read directory: ${e}`)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(o.message)),t.process.exit(1)}return r.length===0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`No CSV files found in directory: ${e}`)),t.process.exit(1)),r}var _os = require('os');function ct(e,t){let r=Math.max(1,_nullishCoalesce(_optionalChain([_os.availableParallelism, 'optionalCall', _2 => _2()]), () => (1)));return{poolSize:typeof e=="number"&&e>0?Math.min(e,t):Math.min(r,t),cpuCount:r}}var _child_process = require('child_process');function ut(e){return`'${String(e).replace(/'/g,"'\\''")}'`}function pt(e,t,r=!1){if(r)return;let o=_os.platform.call(void 0, );try{if(o==="darwin"){let c=e.map(ut).join(" -f "),i=`
|
|
2
2
|
tell application "Terminal"
|
|
3
3
|
activate
|
|
4
4
|
do script "printf '\\e]0;${t}\\a'; tail -n +1 -f ${c}"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
`)}
|
|
15
15
|
`),process.stdout.write(`
|
|
16
16
|
Press Esc/Ctrl+] to return to dashboard.
|
|
17
|
-
`)}var _readline = require('readline'); var Tt = _interopRequireWildcard(_readline); var X = _interopRequireWildcard(_readline);async function wt(e,t,r){await new Promise(o=>{try{let n=_fs.statSync.call(void 0, e),c=Math.max(0,n.size-t),i=_fs.createReadStream.call(void 0, e,{start:c,encoding:"utf8"});i.on("data",a=>r(a)),i.on("end",o),i.on("error",o)}catch (e9){o(void 0)}})}function bt(e,t,r){if(t.ctrl&&t.name==="c")return{type:"CTRL_C"};if(r==="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 o=_nullishCoalesce(_nullishCoalesce(t.sequence, () => (e)), () => (""));return o?{type:"FORWARD",sequence:o}:null}function xt(e){return[...e.keys()].sort((t,r)=>t-r)}function St(e,t,r){if(!e.length)return null;let o=_nullishCoalesce(t, () => (e[0])),n=e.indexOf(o);return n===-1&&(n=0),n=(n+r+e.length)%e.length,e[n]}function Pt(e){let{workers:t,onAttach:r,onDetach:o,onCtrlC:n,getLogPaths:c,replayBytes:i=200*1024,replayWhich:a=["out","err"],onEnterAttachScreen:p,ports:h}=e,m=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _23 => _23.stdin]), () => (process.stdin)),d=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _24 => _24.stdout]), () => (process.stdout)),l=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _25 => _25.stderr]), () => (process.stderr)),s=(...x)=>{if(
|
|
17
|
+
`)}var _readline = require('readline'); var Tt = _interopRequireWildcard(_readline); var X = _interopRequireWildcard(_readline);async function wt(e,t,r){await new Promise(o=>{try{let n=_fs.statSync.call(void 0, e),c=Math.max(0,n.size-t),i=_fs.createReadStream.call(void 0, e,{start:c,encoding:"utf8"});i.on("data",a=>r(a)),i.on("end",o),i.on("error",o)}catch (e9){o(void 0)}})}function bt(e,t,r){if(t.ctrl&&t.name==="c")return{type:"CTRL_C"};if(r==="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 o=_nullishCoalesce(_nullishCoalesce(t.sequence, () => (e)), () => (""));return o?{type:"FORWARD",sequence:o}:null}function xt(e){return[...e.keys()].sort((t,r)=>t-r)}function St(e,t,r){if(!e.length)return null;let o=_nullishCoalesce(t, () => (e[0])),n=e.indexOf(o);return n===-1&&(n=0),n=(n+r+e.length)%e.length,e[n]}function Pt(e){let{workers:t,onAttach:r,onDetach:o,onCtrlC:n,getLogPaths:c,replayBytes:i=200*1024,replayWhich:a=["out","err"],onEnterAttachScreen:p,ports:h}=e,m=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _23 => _23.stdin]), () => (process.stdin)),d=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _24 => _24.stdout]), () => (process.stdout)),l=_nullishCoalesce(_optionalChain([h, 'optionalAccess', _25 => _25.stderr]), () => (process.stderr)),s=(...x)=>{if(_chunkQ3L3F6ZMcjs.z)try{(_nullishCoalesce(_optionalChain([h, 'optionalAccess', _26 => _26.stderr]), () => (process.stderr))).write(`[keys] ${x.map(String).join(" ")}
|
|
18
18
|
`)}catch (e10){}};if(!m.isTTY)return()=>{};Tt.emitKeypressEvents(m),_optionalChain([m, 'access', _27 => _27.setRawMode, 'optionalCall', _28 => _28(!0)]);let u="dashboard",g=null,T=null,C=null;async function E(x){if(!c)return;let f=c(x);if(!f)return;let y=[];for(let b of a)b==="out"&&y.push(f.outPath),b==="err"&&y.push(f.errPath),b==="structured"&&y.push(f.structuredPath);if(y.length){d.write(`
|
|
19
19
|
------------ replay ------------
|
|
20
20
|
`);for(let b of y)d.write(`
|
|
@@ -24,7 +24,7 @@ Press Esc/Ctrl+] to return to dashboard.
|
|
|
24
24
|
|
|
25
25
|
`)}}let R=async x=>{s("attach()",`id=${x}`);let f=t.get(x);if(!f)return;u==="attached"&&P(),u="attached",g=x,_optionalChain([p, 'optionalCall', _29 => _29(x)]),_optionalChain([r, 'optionalCall', _30 => _30(x)]),await E(x),T=b=>d.write(b),C=b=>l.write(b),_optionalChain([f, 'access', _31 => _31.stdout, 'optionalAccess', _32 => _32.on, 'call', _33 => _33("data",T)]),_optionalChain([f, 'access', _34 => _34.stderr, 'optionalAccess', _35 => _35.on, 'call', _36 => _36("data",C)]);let y=()=>{g===x&&P()};f.once("exit",y)},P=()=>{if(s("detach()",`id=${g}`),g==null)return;let x=g,f=t.get(x);f&&(T&&_optionalChain([f, 'access', _37 => _37.stdout, 'optionalAccess', _38 => _38.off, 'call', _39 => _39("data",T)]),C&&_optionalChain([f, 'access', _40 => _40.stderr, 'optionalAccess', _41 => _41.off, 'call', _42 => _42("data",C)])),T=null,C=null,g=null,u="dashboard",_optionalChain([o, 'optionalCall', _43 => _43()])},S=(x,f)=>{s("keypress",JSON.stringify({str:x,name:f.name,seq:f.sequence,ctrl:f.ctrl,meta:f.meta,shift:f.shift,mode:u}));let y=bt(x,f,u);if(s("mapped",JSON.stringify(y)),!!y)switch(y.type){case"CTRL_C":{if(s("CTRL_C"),u==="attached"&&g!=null){let b=t.get(g);try{_optionalChain([b, 'optionalAccess', _44 => _44.kill, 'call', _45 => _45("SIGINT")])}catch (e11){}P();return}_optionalChain([n, 'optionalCall', _46 => _46()]);return}case"ATTACH":{if(s("ATTACH",`id=${y.id}`,`has=${t.has(y.id)}`),u!=="dashboard")return;t.has(y.id)&&R(y.id);return}case"CYCLE":{if(s("CYCLE",`delta=${y.delta}`),u!=="dashboard")return;let b=St(xt(t),g,y.delta);b!=null&&R(b);return}case"QUIT":{if(u!=="dashboard")return;_optionalChain([n, 'optionalCall', _47 => _47()]);return}case"DETACH":{s("DETACH"),u==="attached"&&P();return}case"CTRL_D":{if(u==="attached"&&g!=null){let b=t.get(g);try{_optionalChain([b, 'optionalAccess', _48 => _48.stdin, 'optionalAccess', _49 => _49.end, 'call', _50 => _50()])}catch (e12){}}return}case"FORWARD":if(u==="attached"&&g!=null){let b=t.get(g);try{_optionalChain([b, 'optionalAccess', _51 => _51.stdin, 'optionalAccess', _52 => _52.write, 'call', _53 => _53(y.sequence)])}catch (e13){}}}},M=x=>{if(u==="attached"&&g!=null){let f=t.get(g);try{_optionalChain([f, 'optionalAccess', _54 => _54.stdin, 'optionalAccess', _55 => _55.write, 'call', _56 => _56(x)])}catch (e14){}}},A=()=>{m.off("keypress",S),m.off("data",M),_optionalChain([m, 'access', _57 => _57.setRawMode, 'optionalCall', _58 => _58(!1)]),d.write("\x1B[?25h")};return m.on("keypress",S),m.on("data",M),A}var _events = require('events');var _url = require('url');var Ct="",ie=(e,t)=>{let r=Math.min(e-1,9),o=e<=1?"0":`0-${r}`,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: [${o}] 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 vt(e,t,r=!1){let o=[...t.renderHeader(e),"",...t.renderWorkers(e),...r?[]:["",ie(e.poolSize,e.final)],...t.renderExtras?[""].concat(t.renderExtras(e)):[]].join(`
|
|
26
26
|
`);!e.final&&o===Ct||(Ct=o,e.final?process.stdout.write("\x1B[?25h"):(process.stdout.write("\x1B[?25l"),X.cursorTo(process.stdout,0,0),X.clearScreenDown(process.stdout)),process.stdout.write(`${o}
|
|
27
|
-
`))}function Z(e,t,r){let o=t.get(e);if(F(o))try{let n=V(o);if(n!=null)return n}catch (e15){}return r.get(e)}function I(e){return typeof e=="number"?e.toLocaleString():"0"}function Lt(e,t=40){let r=Math.max(0,Math.min(100,Math.floor(e))),o=Math.floor(r/100*t);return"\u2588".repeat(o)+"\u2591".repeat(t-o)}function le(e){let t=[...e.workerState.values()].filter(n=>n.busy).length,r=e.filesCompleted+e.filesFailed,o=e.filesTotal===0?100:Math.floor(r/Math.max(1,e.filesTotal)*100);return{done:r,inProgress:t,pct:o}}function $t(e,t=[]){let{title:r,poolSize:o,cpuCount:n,filesTotal:c,filesCompleted:i,filesFailed:a,throughput:p}=e,{inProgress:h,pct:m}=le(e),d=[`${_colors2.default.bold(r)} \u2014 ${o} workers ${_colors2.default.dim(`(CPU avail: ${n})`)}`,`${_colors2.default.dim("Files")} ${I(c)} ${_colors2.default.dim("Completed")} ${I(i)} ${_colors2.default.dim("Failed")} ${a?_colors2.default.red(I(a)):I(a)} ${_colors2.default.dim("In-flight")} ${I(h)}`,`[${Lt(m)}] ${m}%`];if(p){let l=Math.round(p.r10s*3600).toLocaleString(),s=Math.round(p.r60s*3600).toLocaleString(),u=_optionalChain([e, 'access', _59 => _59.throughput, 'optionalAccess', _60 => _60.successSoFar])!=null?` Newly uploaded: ${I(e.throughput.successSoFar)}`:"";d.push(_colors2.default.cyan(`Throughput: ${l}/hr (1h: ${s}/hr)${u}`))}return t.length?d.concat(t):d}function Rt(e,t=r=>r?_path.basename.call(void 0, r):"-"){return[...e.workerState.entries()].map(([o,n])=>{let c=n.lastLevel==="error"?_colors2.default.red("ERROR "):n.lastLevel==="warn"?_colors2.default.yellow("WARN "):n.busy?_colors2.default.green("WORKING"):_colors2.default.dim("IDLE "),i=t(n.file),a=n.startedAt?`${Math.floor((Date.now()-n.startedAt)/1e3)}s`:"-",p=_nullishCoalesce(_optionalChain([n, 'access', _61 => _61.progress, 'optionalAccess', _62 => _62.processed]), () => (0)),h=_nullishCoalesce(_optionalChain([n, 'access', _63 => _63.progress, 'optionalAccess', _64 => _64.total]), () => (0)),m=h>0?Math.floor(p/h*100):0,d=h>0?Lt(m,18):" ".repeat(18),l=h>0?`${p.toLocaleString()}/${h.toLocaleString()} (${m}%)`:_colors2.default.dim("\u2014");return` [w${o}] ${c} | ${i} | ${a} | [${d}] ${l}`})}async function Et(e){let{title:t,baseDir:r,poolSize:o,cpuCount:n,render:c,childModulePath:i,hooks:a,filesTotal:p,childFlag:h,viewerMode:m=!1}=e,d=_nullishCoalesce(e.openLogWindows, () => (!m)),l=_nullishCoalesce(e.isSilent, () => (!0)),s=Date.now(),u=mt(r),g=new Map,T=new Map,C=new Map,E=new
|
|
27
|
+
`))}function Z(e,t,r){let o=t.get(e);if(F(o))try{let n=V(o);if(n!=null)return n}catch (e15){}return r.get(e)}function I(e){return typeof e=="number"?e.toLocaleString():"0"}function Lt(e,t=40){let r=Math.max(0,Math.min(100,Math.floor(e))),o=Math.floor(r/100*t);return"\u2588".repeat(o)+"\u2591".repeat(t-o)}function le(e){let t=[...e.workerState.values()].filter(n=>n.busy).length,r=e.filesCompleted+e.filesFailed,o=e.filesTotal===0?100:Math.floor(r/Math.max(1,e.filesTotal)*100);return{done:r,inProgress:t,pct:o}}function $t(e,t=[]){let{title:r,poolSize:o,cpuCount:n,filesTotal:c,filesCompleted:i,filesFailed:a,throughput:p}=e,{inProgress:h,pct:m}=le(e),d=[`${_colors2.default.bold(r)} \u2014 ${o} workers ${_colors2.default.dim(`(CPU avail: ${n})`)}`,`${_colors2.default.dim("Files")} ${I(c)} ${_colors2.default.dim("Completed")} ${I(i)} ${_colors2.default.dim("Failed")} ${a?_colors2.default.red(I(a)):I(a)} ${_colors2.default.dim("In-flight")} ${I(h)}`,`[${Lt(m)}] ${m}%`];if(p){let l=Math.round(p.r10s*3600).toLocaleString(),s=Math.round(p.r60s*3600).toLocaleString(),u=_optionalChain([e, 'access', _59 => _59.throughput, 'optionalAccess', _60 => _60.successSoFar])!=null?` Newly uploaded: ${I(e.throughput.successSoFar)}`:"";d.push(_colors2.default.cyan(`Throughput: ${l}/hr (1h: ${s}/hr)${u}`))}return t.length?d.concat(t):d}function Rt(e,t=r=>r?_path.basename.call(void 0, r):"-"){return[...e.workerState.entries()].map(([o,n])=>{let c=n.lastLevel==="error"?_colors2.default.red("ERROR "):n.lastLevel==="warn"?_colors2.default.yellow("WARN "):n.busy?_colors2.default.green("WORKING"):_colors2.default.dim("IDLE "),i=t(n.file),a=n.startedAt?`${Math.floor((Date.now()-n.startedAt)/1e3)}s`:"-",p=_nullishCoalesce(_optionalChain([n, 'access', _61 => _61.progress, 'optionalAccess', _62 => _62.processed]), () => (0)),h=_nullishCoalesce(_optionalChain([n, 'access', _63 => _63.progress, 'optionalAccess', _64 => _64.total]), () => (0)),m=h>0?Math.floor(p/h*100):0,d=h>0?Lt(m,18):" ".repeat(18),l=h>0?`${p.toLocaleString()}/${h.toLocaleString()} (${m}%)`:_colors2.default.dim("\u2014");return` [w${o}] ${c} | ${i} | ${a} | [${d}] ${l}`})}async function Et(e){let{title:t,baseDir:r,poolSize:o,cpuCount:n,render:c,childModulePath:i,hooks:a,filesTotal:p,childFlag:h,viewerMode:m=!1}=e,d=_nullishCoalesce(e.openLogWindows, () => (!m)),l=_nullishCoalesce(e.isSilent, () => (!0)),s=Date.now(),u=mt(r),g=new Map,T=new Map,C=new Map,E=new _chunk7YNUSMVAcjs.Zf,P=_nullishCoalesce(_optionalChain([a, 'access', _65 => _65.initTotals, 'optionalCall', _66 => _66()]), () => ({})),S=0,M=0,A=0,x=null,f=!1,y=!1,b=null,L=(w=!1)=>{y||c({title:t,poolSize:o,cpuCount:n,filesTotal:p,filesCompleted:M,filesFailed:A,workerState:T,totals:P,final:w,exportStatus:_optionalChain([a, 'access', _67 => _67.exportStatus, 'optionalCall', _68 => _68()]),throughput:{successSoFar:M,r10s:E.rate(1e4),r60s:E.rate(6e4)}})},B=w=>{let $=a.nextTask();if(!$)return!1;let _=g.get(w),v=a.taskLabel($),O=_optionalChain([a, 'access', _69 => _69.initSlotProgress, 'optionalCall', _70 => _70($)]);return T.set(w,{busy:!0,file:v,startedAt:Date.now(),lastLevel:"ok",progress:O}),Q(_,{type:"task",payload:$}),L(),!0};for(let w=0;w<o;w+=1){let $=gt({id:w,modulePath:i,logDir:u,openLogWindows:d,isSilent:l,childFlag:h});g.set(w,$),T.set(w,{busy:!1,file:null,startedAt:null,lastLevel:"ok"}),C.set(w,V($)),S+=1;let _=N(v=>{let O=U(v);if(!O)return;let G=T.get(w);G.lastLevel!==O&&(T.set(w,{...G,lastLevel:O}),L())});_optionalChain([$, 'access', _71 => _71.stderr, 'optionalAccess', _72 => _72.on, 'call', _73 => _73("data",_)]),$.on("message",v=>{if(!(!v||typeof v!="object")){if(v.type==="ready"){f||(f=!0,x=setInterval(()=>L(!1),350)),B(w);return}if(v.type==="progress"){P=a.onProgress(P,v.payload);let O=T.get(w);T.set(w,{...O,progress:v.payload}),L();return}if(v.type==="result"){let O=T.get(w),{totals:G,ok:ot}=a.onResult(P,v.payload);P=G,ot?(M+=1,E.add(1)):A+=1,T.set(w,{...O,busy:!1,file:null,progress:void 0,lastLevel:ot?"ok":"error"}),!B(w)&&F($)&&Q($,{type:"shutdown"}),L()}}}),$.on("exit",()=>{S-=1,S===0&&(x&&clearInterval(x),L(!0))})}let H=()=>{},K=()=>{try{_optionalChain([process, 'access', _74 => _74.stdin, 'access', _75 => _75.setRawMode, 'optionalCall', _76 => _76(!1)])}catch (e16){}try{process.stdin.pause()}catch (e17){}},et=()=>{if(x&&clearInterval(x),_optionalChain([H, 'optionalCall', _77 => _77()]),b)try{process.stdin.off("data",b)}catch (e18){}K(),process.stdout.write(`
|
|
28
28
|
Stopping workers...
|
|
29
29
|
`);for(let[,w]of g){F(w)&&Q(w,{type:"shutdown"});try{_optionalChain([w, 'optionalAccess', _78 => _78.kill, 'call', _79 => _79("SIGTERM")])}catch (e19){}}process.exit(130)},rt=w=>{y=!0,process.stdout.write("\x1B[2J\x1B[H"),process.stdout.write(`Attached to worker ${w}. (Esc/Ctrl+] detach \u2022 Ctrl+D EOF \u2022 Ctrl+C SIGINT)
|
|
30
30
|
`)},jt=()=>{y=!1,L()};if(process.once("SIGINT",et),!m){if(process.stdin.isTTY){try{process.stdin.setRawMode(!0)}catch (e20){process.stdout.write(_colors2.default.yellow(`Warning: Unable to enable raw mode for interactive key handling.
|
|
@@ -34,5 +34,5 @@ Stopping workers...
|
|
|
34
34
|
|
|
35
35
|
`),(async()=>{try{await yt(t,l,s)}catch (e22){h=!1,o(!1),r()}})())},d=(l,s)=>{if(n)try{let u=n.exportCombinedLogs(t,l);a(`
|
|
36
36
|
Wrote combined ${s} logs to: ${u}`),p(l,u)}catch (e23){a(`
|
|
37
|
-
Failed to write combined ${s} logs`)}};return l=>{let s=l.toString("utf8");if(s==="e"){m(["err"],"error");return}if(s==="w"){m(["warn","err"],"warn");return}if(s==="i"){m(["info"],"all");return}if(s==="l"){m(["out","err","structured"],"all");return}if(s==="E"){d("error","error");return}if(s==="W"){d("warn","warn");return}if(s==="I"){d("info","info");return}if(s==="A"){d("all","ALL");return}let u=_optionalChain([i, 'optionalAccess', _84 => _84[s]]);if(u){u({noteExport:p,say:a});return}(s==="\x1B"||s==="")&&(h=!1,o(!1),r())}}var _promises = require('fs/promises');var _promises3 = require('stream/promises');var _stream = require('stream');var _csvparse = require('csv-parse');var _fastcsv = require('fast-csv'); var Bt = _interopRequireWildcard(_fastcsv);function tt(e,t){let r=_fs.createWriteStream.call(void 0, e),o=Bt.format({headers:t,writeHeaders:!0,objectMode:!0});return o.pipe(r),{async write(n){o.write(n)||await _events.once.call(void 0, o,"drain")},async end(){let n=Promise.all([_events.once.call(void 0, r,"finish")]);o.end(),await n}}}function xe(e){return String(e).padStart(4,"0")}function Se(e){return Buffer.byteLength(Object.values(e).map(t=>t==null?"":String(t)).join(","),"utf8")}async function Dt(e){let{filePath:t,outputDir:r,clearOutputDir:o,chunkSizeMB:n,onProgress:c,reportEveryMs:i=500}=e,{size:a}=await _promises.stat.call(void 0, t),p=0;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Chunking ${t} into ~${n}MB files...`));let h=Math.floor(n*1024*1024),m=_path.basename.call(void 0, t,".csv"),d=r||_path.dirname.call(void 0, t);if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Output directory: ${d}`)),await _promises.mkdir.call(void 0, d,{recursive:!0}),o){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Clearing output directory: ${d}`));let f=await _promises.readdir.call(void 0, d);await Promise.all(f.filter(y=>y.startsWith(`${m}_chunk_`)&&y.endsWith(".csv")).map(y=>_promises.unlink.call(void 0, _path.join.call(void 0, d,y))))}let l=null,s=null,u=0,g=1,T=0,C=new (0, _csvparse.Parser)({columns:!1,skip_empty_lines:!0}),E=0,R=0,P=()=>{let f=R>0?E/R:0,y=f>0?Math.max(u,Math.ceil(a/f)):void 0;c(u,y),p=Date.now()};P();let S=null,M=()=>_path.join.call(void 0, d,`${m}_chunk_${xe(g)}.csv`),A=new (0, _stream.Transform)({objectMode:!0,async transform(f,y,b){try{if(!l){l=f.slice(0),s=l.length,S=tt(M(),l),b();return}s!==null&&f.length!==s&&_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Row has ${f.length} cols; expected ${s}`)),u+=1,u%25e4===0&&c(u);let L=Object.fromEntries(l.map((H,K)=>[H,f[K]])),B=Se(L);E+=B,R+=1,Date.now()-p>=i&&P(),S&&T>0&&T+B>h&&(await S.end(),g+=1,T=0,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Rolling to chunk ${g} after ${u.toLocaleString()} rows.`)),S=tt(M(),l)),S||(S=tt(M(),l)),await S.write(L),T+=B,b()}catch(L){b(L)}},async flush(f){try{S&&(await S.end(),S=null),P(),f()}catch(y){f(y)}}}),x=_fs.createReadStream.call(void 0, t);await _promises3.pipeline.call(void 0, x,C,A),c(u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunked ${t} into ${g} file(s); processed ${u.toLocaleString()} rows.`))}async function Ft(){let e=Number(process.env.WORKER_ID||"0");_chunkZUNVPK23cjs.a.info(`[w${e}] ready pid=${process.pid}`),_optionalChain([process, 'access', _85 => _85.send, 'optionalCall', _86 => _86({type:"ready"})]),process.on("message",async t=>{if(!t||typeof t!="object"||(t.type==="shutdown"&&process.exit(0),t.type!=="task"))return;let{filePath:r,options:o}=t.payload,{outputDir:n,clearOutputDir:c,chunkSizeMB:i}=o;try{await Dt({filePath:r,outputDir:n,clearOutputDir:c,chunkSizeMB:i,onProgress:(a,p)=>_optionalChain([process, 'access', _87 => _87.send, 'optionalCall', _88 => _88({type:"progress",payload:{filePath:r,processed:a,total:p}})])}),_optionalChain([process, 'access', _89 => _89.send, 'optionalCall', _90 => _90({type:"result",payload:{ok:!0,filePath:r}})])}catch(a){let p=
|
|
38
|
-
//# sourceMappingURL=impl-
|
|
37
|
+
Failed to write combined ${s} logs`)}};return l=>{let s=l.toString("utf8");if(s==="e"){m(["err"],"error");return}if(s==="w"){m(["warn","err"],"warn");return}if(s==="i"){m(["info"],"all");return}if(s==="l"){m(["out","err","structured"],"all");return}if(s==="E"){d("error","error");return}if(s==="W"){d("warn","warn");return}if(s==="I"){d("info","info");return}if(s==="A"){d("all","ALL");return}let u=_optionalChain([i, 'optionalAccess', _84 => _84[s]]);if(u){u({noteExport:p,say:a});return}(s==="\x1B"||s==="")&&(h=!1,o(!1),r())}}var _promises = require('fs/promises');var _promises3 = require('stream/promises');var _stream = require('stream');var _csvparse = require('csv-parse');var _fastcsv = require('fast-csv'); var Bt = _interopRequireWildcard(_fastcsv);function tt(e,t){let r=_fs.createWriteStream.call(void 0, e),o=Bt.format({headers:t,writeHeaders:!0,objectMode:!0});return o.pipe(r),{async write(n){o.write(n)||await _events.once.call(void 0, o,"drain")},async end(){let n=Promise.all([_events.once.call(void 0, r,"finish")]);o.end(),await n}}}function xe(e){return String(e).padStart(4,"0")}function Se(e){return Buffer.byteLength(Object.values(e).map(t=>t==null?"":String(t)).join(","),"utf8")}async function Dt(e){let{filePath:t,outputDir:r,clearOutputDir:o,chunkSizeMB:n,onProgress:c,reportEveryMs:i=500}=e,{size:a}=await _promises.stat.call(void 0, t),p=0;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Chunking ${t} into ~${n}MB files...`));let h=Math.floor(n*1024*1024),m=_path.basename.call(void 0, t,".csv"),d=r||_path.dirname.call(void 0, t);if(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Output directory: ${d}`)),await _promises.mkdir.call(void 0, d,{recursive:!0}),o){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Clearing output directory: ${d}`));let f=await _promises.readdir.call(void 0, d);await Promise.all(f.filter(y=>y.startsWith(`${m}_chunk_`)&&y.endsWith(".csv")).map(y=>_promises.unlink.call(void 0, _path.join.call(void 0, d,y))))}let l=null,s=null,u=0,g=1,T=0,C=new (0, _csvparse.Parser)({columns:!1,skip_empty_lines:!0}),E=0,R=0,P=()=>{let f=R>0?E/R:0,y=f>0?Math.max(u,Math.ceil(a/f)):void 0;c(u,y),p=Date.now()};P();let S=null,M=()=>_path.join.call(void 0, d,`${m}_chunk_${xe(g)}.csv`),A=new (0, _stream.Transform)({objectMode:!0,async transform(f,y,b){try{if(!l){l=f.slice(0),s=l.length,S=tt(M(),l),b();return}s!==null&&f.length!==s&&_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`Row has ${f.length} cols; expected ${s}`)),u+=1,u%25e4===0&&c(u);let L=Object.fromEntries(l.map((H,K)=>[H,f[K]])),B=Se(L);E+=B,R+=1,Date.now()-p>=i&&P(),S&&T>0&&T+B>h&&(await S.end(),g+=1,T=0,_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Rolling to chunk ${g} after ${u.toLocaleString()} rows.`)),S=tt(M(),l)),S||(S=tt(M(),l)),await S.write(L),T+=B,b()}catch(L){b(L)}},async flush(f){try{S&&(await S.end(),S=null),P(),f()}catch(y){f(y)}}}),x=_fs.createReadStream.call(void 0, t);await _promises3.pipeline.call(void 0, x,C,A),c(u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunked ${t} into ${g} file(s); processed ${u.toLocaleString()} rows.`))}async function Ft(){let e=Number(process.env.WORKER_ID||"0");_chunkZUNVPK23cjs.a.info(`[w${e}] ready pid=${process.pid}`),_optionalChain([process, 'access', _85 => _85.send, 'optionalCall', _86 => _86({type:"ready"})]),process.on("message",async t=>{if(!t||typeof t!="object"||(t.type==="shutdown"&&process.exit(0),t.type!=="task"))return;let{filePath:r,options:o}=t.payload,{outputDir:n,clearOutputDir:c,chunkSizeMB:i}=o;try{await Dt({filePath:r,outputDir:n,clearOutputDir:c,chunkSizeMB:i,onProgress:(a,p)=>_optionalChain([process, 'access', _87 => _87.send, 'optionalCall', _88 => _88({type:"progress",payload:{filePath:r,processed:a,total:p}})])}),_optionalChain([process, 'access', _89 => _89.send, 'optionalCall', _90 => _90({type:"result",payload:{ok:!0,filePath:r}})])}catch(a){let p=_chunk7YNUSMVAcjs.Uf.call(void 0, a);_chunkZUNVPK23cjs.a.error(`[w${e}] ERROR ${r}: ${p}`),_optionalChain([process, 'access', _91 => _91.send, 'optionalCall', _92 => _92({type:"result",payload:{ok:!1,filePath:r,error:p}})])}}),await new Promise(()=>{})}function Te(e){return $t(e)}function Pe(e){return Rt(e)}var It={renderHeader:Te,renderWorkers:Pe};function Ce(){return typeof __filename<"u"?__filename:process.argv[1]}async function Do(e){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let{directory:t,outputDir:r,clearOutputDir:o,chunkSizeMB:n,concurrency:c,viewerMode:i}=e,a=lt(t,this),{poolSize:p,cpuCount:h}=ct(c,a.length);_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Chunking ${a.length} CSV file(s) with pool size ${p} (CPU=${h})`));let m=a.map(l=>({filePath:l,options:{outputDir:r,clearOutputDir:o,chunkSizeMB:n}})),d={nextTask:()=>m.shift(),taskLabel:l=>l.filePath,initTotals:()=>({}),initSlotProgress:()=>{},onProgress:l=>l,onResult:(l,s)=>({totals:l,ok:!!s.ok}),postProcess:async()=>{}};await Et({title:"Chunk CSV",baseDir:t||r||process.cwd(),childFlag:Y,childModulePath:Ce(),poolSize:p,cpuCount:h,filesTotal:a.length,hooks:d,viewerMode:i,render:l=>vt(l,It,i),extraKeyHandler:({logsBySlot:l,repaint:s,setPaused:u})=>Mt({logsBySlot:l,repaint:s,setPaused:u})})}process.argv.includes(Y)&&Ft().catch(e=>{_chunkZUNVPK23cjs.a.error(e),process.exit(1)});exports.chunkCsv = Do;
|
|
38
|
+
//# sourceMappingURL=impl-VHZCJ576.cjs.map
|