@transcend-io/cli 7.0.0-alpha.7 → 7.0.0-alpha.9
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/README.md +44 -44
- package/dist/bin/bash-complete.js +1 -1
- package/dist/bin/cli.js +1 -1
- package/dist/bin/deprecated-command.js +1 -1
- package/dist/{chunk-5TDUSKDZ.js → chunk-355AXZQZ.js} +1 -1
- package/dist/{chunk-AYMLP7SL.js → chunk-4QPDLGCV.js} +1 -1
- package/dist/{chunk-PNOEWENG.js → chunk-B6ZR2J5H.js} +1 -1
- package/dist/{chunk-F5KKB33H.js → chunk-BQKOX64R.js} +1 -1
- package/dist/{chunk-NYDK4VPA.js → chunk-DKNP2CU7.js} +1 -1
- package/dist/{chunk-DLIWRRVR.js → chunk-FSIXUJFP.js} +21 -17
- package/dist/{chunk-QXOUJ7DT.js → chunk-HZNRGCLH.js} +1 -1
- package/dist/{chunk-MLF3XCRS.js → chunk-J2ZBQKW5.js} +1 -1
- package/dist/{chunk-LE6MXFBT.js → chunk-PDDJKJLS.js} +1 -1
- package/dist/chunk-RLLIDCPR.js +8 -0
- package/dist/{chunk-T4AGEIE3.js → chunk-S7ZUY224.js} +1 -1
- package/dist/{chunk-QAPBYN24.js → chunk-ZES4XGUM.js} +1 -1
- package/dist/{chunk-4HZHZ32O.js → chunk-ZEXWBTLE.js} +1 -1
- package/dist/impl-27HXB774.js +8 -0
- package/dist/{impl-46IFTUCW.js → impl-2IJTNY4B.js} +1 -1
- package/dist/{impl-7W6EBZXZ.js → impl-45AP5ZX5.js} +1 -1
- package/dist/impl-4L5FLYLP.js +1 -0
- package/dist/{impl-QR3ARAMQ.js → impl-5WT54GJ6.js} +1 -1
- package/dist/{impl-YJ2FK37I.js → impl-6TJVPXFA.js} +1 -1
- package/dist/{impl-QYJFDBIV.js → impl-7MZ2GRX2.js} +1 -1
- package/dist/{impl-K2ZB3AKB.js → impl-7X6DB6TS.js} +1 -1
- package/dist/{impl-PS2DUGWP.js → impl-AOO42JWA.js} +1 -1
- package/dist/{impl-QTDGR3SU.js → impl-CINASI7X.js} +1 -1
- package/dist/{impl-6J4LHKU5.js → impl-CJQKXJK5.js} +1 -1
- package/dist/{impl-YT7F6KTN.js → impl-CMZBIUTF.js} +1 -1
- package/dist/{impl-22YTZZ5H.js → impl-CUATNMND.js} +1 -1
- package/dist/{impl-52S3Z4ZE.js → impl-FFM7HH6E.js} +1 -1
- package/dist/{impl-UYCGE2TQ.js → impl-GURHBO3R.js} +1 -1
- package/dist/{impl-TLUPGHWG.js → impl-HHBFHJSK.js} +1 -1
- package/dist/{impl-IDWP2NIG.js → impl-KTX24C4K.js} +1 -1
- package/dist/{impl-LNLKIPIP.js → impl-KZXH3Y3W.js} +1 -1
- package/dist/impl-LM4DMVYI.js +1 -0
- package/dist/{impl-75FHAT4R.js → impl-LQ275RBM.js} +1 -1
- package/dist/{impl-GSXYV2XR.js → impl-M7DBU4GI.js} +1 -1
- package/dist/{impl-YBSUR2MT.js → impl-M7QB2XPW.js} +1 -1
- package/dist/{impl-KQ2R65SG.js → impl-MDZJCI4H.js} +1 -1
- package/dist/{impl-MFDS7DPF.js → impl-N5VJXHO7.js} +1 -1
- package/dist/{impl-Q65ZCWEQ.js → impl-NN2CT2AA.js} +1 -1
- package/dist/{impl-URMADXQA.js → impl-PRQTJKHF.js} +1 -1
- package/dist/{impl-4WQTM3GN.js → impl-RALRZG3L.js} +1 -1
- package/dist/impl-SBRSPHTB.js +1 -0
- package/dist/impl-SCSRN2JZ.js +1 -0
- package/dist/{impl-ZBWVSFDE.js → impl-SZVOCN3A.js} +1 -1
- package/dist/{impl-UV5ERXN5.js → impl-TE32S5WA.js} +1 -1
- package/dist/{impl-JRA6GN3V.js → impl-TONFW3HX.js} +1 -1
- package/dist/{impl-ISWFGOUS.js → impl-TX7YFUXO.js} +1 -1
- package/dist/{impl-W454HAAT.js → impl-U3BDV3RA.js} +1 -1
- package/dist/{impl-NVBTQCSL.js → impl-V3A77FGE.js} +1 -1
- package/dist/{impl-ZEEUCWKF.js → impl-V3YOC4MQ.js} +1 -1
- package/dist/{impl-7C43442T.js → impl-WOYVKA3U.js} +1 -1
- package/dist/{impl-CLLZCY76.js → impl-Y4NEIKHE.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -2
- package/dist/chunk-IQZKONXI.js +0 -8
- package/dist/impl-ICGIPWVJ.js +0 -1
- package/dist/impl-ULVQLOA5.js +0 -1
- package/dist/impl-VT26YO3N.js +0 -1
- package/dist/impl-ZXDLJ2TY.js +0 -8
package/dist/chunk-IQZKONXI.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{d as a}from"./chunk-EZCJGIOS.js";import{buildCommand as c,numberParser as p}from"@stricli/core";import{ConsentTrackerStatus as l}from"@transcend-io/privacy-types";import{ScopeName as u,TRANSCEND_SCOPES as i}from"@transcend-io/privacy-types";function m(e){if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e))throw new Error(`Invalid UUID format: ${e}`);return e}function n(e){try{return new URL(e).toString().replace(/\/$/,"")}catch{throw new Error(`Invalid URL format: ${e}`)}}function h(e){return e.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function g(e){let r=new Date(e);if(Number.isNaN(r.getTime()))throw new TypeError(`Invalid date: ${e}. Try using the ISO 8601 format (YYYY-MM-DDTHH:MM:SS.SSSZ)`);return r}var o=({scopes:e,requiresSiloScope:r=!1})=>{let t={kind:"parsed",parse:String,brief:"The Transcend API key."};return r&&(t.brief+=" This key must be associated with the data silo(s) being operated on."),e==="Varies"?{...t,brief:`${t.brief} The scopes required will vary depending on the operation performed. If in doubt, the ${i[u.FullAdmin].title} scope will always work.`}:e.length===0?{...t,brief:`${t.brief} No scopes are required for this command.`}:{...t,brief:`${t.brief} Requires scopes: ${e.map(d=>`"${i[d].title}"`).join(", ")}`}},s=(e="https://api.transcend.io")=>({kind:"parsed",parse:n,brief:"URL of the Transcend backend. Use https://api.us.transcend.io for US hosting",default:e}),k=()=>({kind:"parsed",parse:String,brief:"The Sombra internal key, use for additional authentication when self-hosting Sombra",optional:!0});var f=["dataSilos","enrichers","templates","apiKeys"],U=Object.values(l),v=c({loader:async()=>{let{pull:e}=await import("./impl-PS2DUGWP.js");return e},parameters:{flags:{auth:o({scopes:"Varies"}),resources:{kind:"enum",values:["all",...Object.values(a)],brief:`The different resource types to pull in. Defaults to ${f.join(",")}.`,variadic:",",optional:!0},file:{kind:"parsed",parse:String,brief:"Path to the YAML file to pull into",default:"./transcend.yml"},transcendUrl:s(),dataSiloIds:{kind:"parsed",parse:String,variadic:",",brief:"The UUIDs of the data silos that should be pulled into the YAML file",optional:!0},integrationNames:{kind:"parsed",parse:String,variadic:",",brief:"The types of integrations to pull down",optional:!0},trackerStatuses:{kind:"enum",values:Object.values(l),variadic:",",brief:"The statuses of consent manager trackers to pull down. Defaults to all statuses.",optional:!0},pageSize:{kind:"parsed",parse:p,brief:"The page size to use when paginating over the API",default:"50"},skipDatapoints:{kind:"boolean",brief:"When true, skip pulling in datapoints alongside data silo resource",default:!1},skipSubDatapoints:{kind:"boolean",brief:"When true, skip pulling in subDatapoints alongside data silo resource",default:!1},includeGuessedCategories:{kind:"boolean",brief:"When true, included guessed data categories that came from the content classifier",default:!1},debug:{kind:"boolean",brief:"Set to true to include debug logs while pulling the configuration",default:!1}}},docs:{brief:"Pull metadata from Transcend into transcend.yml",fullDescription:`Generates a transcend.yml by pulling the configuration from your Transcend instance.
|
|
2
|
-
|
|
3
|
-
The API key needs various scopes depending on the resources being pulled (see the CLI's README for more details).
|
|
4
|
-
|
|
5
|
-
This command can be helpful if you are looking to:
|
|
6
|
-
|
|
7
|
-
- Copy your data into another instance
|
|
8
|
-
- Generate a transcend.yml file as a starting point to maintain parts of your data inventory in code.`}});export{m as a,n as b,h as c,g as d,o as e,s as f,k as g,f as h,U as i,v as j};
|
package/dist/impl-ICGIPWVJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a}from"./chunk-T4AGEIE3.js";import"./chunk-4HZHZ32O.js";import"./chunk-QXOUJ7DT.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import"./chunk-LE6MXFBT.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-MLF3XCRS.js";import"./chunk-EZCJGIOS.js";async function n({auth:o,trackerStatus:t,file:r,classifyService:s,transcendUrl:e}){await a({auth:o,trackerStatus:t,file:r,classifyService:s,transcendUrl:e})}export{n as uploadDataFlowsFromCsv};
|
package/dist/impl-ULVQLOA5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o}from"./chunk-T4AGEIE3.js";import"./chunk-4HZHZ32O.js";import"./chunk-QXOUJ7DT.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import"./chunk-LE6MXFBT.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-MLF3XCRS.js";import"./chunk-EZCJGIOS.js";async function i({auth:t,trackerStatus:r,file:s,transcendUrl:a}){await o({auth:t,trackerStatus:r,file:s,transcendUrl:a})}export{i as uploadCookiesFromCsv};
|
package/dist/impl-VT26YO3N.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as n,f as r}from"./chunk-4HZHZ32O.js";import{q as e}from"./chunk-QXOUJ7DT.js";import"./chunk-LE6MXFBT.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-MLF3XCRS.js";import"./chunk-EZCJGIOS.js";async function d({base64EncryptionKey:o,base64SigningKey:t,partition:s,file:i,consentUrl:a,concurrency:c}){let m=e(i,n);await r({base64EncryptionKey:o,base64SigningKey:t,preferences:m,partition:s,concurrency:c,transcendUrl:a})}export{d as uploadConsentPreferences};
|
package/dist/impl-ZXDLJ2TY.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{b as O}from"./chunk-QAPBYN24.js";import"./chunk-5TDUSKDZ.js";import{c as w}from"./chunk-RBOBI6B6.js";import{d as v}from"./chunk-T4AGEIE3.js";import"./chunk-4HZHZ32O.js";import"./chunk-QXOUJ7DT.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as M,pe as y,sc as x}from"./chunk-LE6MXFBT.js";import{a as t}from"./chunk-OERYFLN2.js";import{c as b}from"./chunk-APA5PR4U.js";import"./chunk-MLF3XCRS.js";import"./chunk-EZCJGIOS.js";import e from"colors";import{join as C}from"path";import E,{existsSync as j,mkdirSync as T}from"fs";async function q({auth:A,start:N,end:f,folder:r,bin:l,transcendUrl:g}){let c=await O(A);E.existsSync(r)&&!E.lstatSync(r).isDirectory()&&(t.error(e.red('The provided argument "folder" was passed a file. expected: folder="./consent-metrics/"')),process.exit(1));let p=l;Object.values(x).includes(p)||(t.error(e.red(`Failed to parse argument "bin" with value "${l}"
|
|
2
|
-
Expected one of:
|
|
3
|
-
${Object.values(x).join(`
|
|
4
|
-
`)}`)),process.exit(1));let i=new Date(N),o=f?new Date(f):new Date;if(Number.isNaN(i.getTime())&&(t.error(e.red(`Start date provided is invalid date. Got --start="${N}" expected --start="01/01/2023"`)),process.exit(1)),Number.isNaN(o.getTime())&&(t.error(e.red(`End date provided is invalid date. Got --end="${f}" expected --end="01/01/2023"`)),process.exit(1)),i>o&&(t.error(e.red(`Got a start date "${i.toISOString()}" that was larger than the end date "${o.toISOString()}". Start date must be before end date.`)),process.exit(1)),j(r)||T(r),t.info(e.magenta(`Pulling consent metrics from start=${i.toString()} to end=${o.toISOString()} with bin size "${l}"`)),console.log("apiKeyOrList",c,g),typeof c=="string"){try{let n=y(g,c),s=await v(n,{bin:p,start:i,end:o});Object.entries(s).forEach(([u,m])=>{m.forEach(({points:$,name:d})=>{let a=C(r,`${u}_${d}.csv`);t.info(e.magenta(`Writing configuration to file "${a}"...`)),w(a,$.map(({key:h,value:S})=>({timestamp:h,value:S})))})})}catch(n){t.error(e.red(`An error occurred syncing the schema: ${n.message}`)),process.exit(1)}t.info(e.green(`Successfully synced consent metrics to disk in folder "${r}"! View at ${b}`))}else{let n=[];await M(c,async(s,u)=>{let m=`[${u+1}/${c.length}][${s.organizationName}] `;t.info(e.magenta(`~~~
|
|
5
|
-
|
|
6
|
-
${m}Attempting to pull consent metrics...
|
|
7
|
-
|
|
8
|
-
~~~`));let $=y(g,s.apiKey);try{let d=await v($,{bin:p,start:i,end:o}),a=C(r,s.organizationName);j(a)||T(a),Object.entries(d).forEach(([h,S])=>{S.forEach(({points:I,name:F})=>{let D=C(a,`${h}_${F}.csv`);t.info(e.magenta(`Writing configuration to file "${D}"...`)),w(D,I.map(({key:G,value:L})=>({timestamp:G,value:L})))})}),t.info(e.green(`${m}Successfully pulled configuration!`))}catch{t.error(e.red(`${m}Failed to sync configuration.`)),n.push(s.organizationName)}}),n.length>0&&(t.info(e.red(`Sync encountered errors for "${n.join(",")}". View output above for more information, or check out ${b}`)),process.exit(1))}}export{q as pullConsentMetrics};
|