1import{j as t,a as e,gI as i,gN as f,gL as c,a4 as x,cM as d,gK as m,ag as u,gM as v,gP as y}from"./index-BFa3nKuT.js";import{a as w}from"./datepicker-CN3oO0F6.js";import"./visx-o561FtCw.js";import"./framerMotion-KnKeNhwd.js";import"./charts-BEfaN6Tb.js";import"./apollo-B9xYJgZj.js";import"./shiki-DSW_v8w1.js";import"./betterAuth-wecmey9t.js";import"./tanstack-82Oensom.js";import"./virtuoso-_8EeKo1c.js";import"./sentry-BM1d0HPc.js";import"./forms-BE_8TKCw.js";import"./amplitude-rTYtQKJT.js";import"./amplify-FijOe782.js";import"./qrcode-CMNUHY9J.js";import"./dnd-BjCurfON.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"01e610d75577dcaf5e5c9af84e79c9458f58a767"},n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[new n.Error().stack]=(function(s){for(var r=1;r<arguments.length;r++){var a=arguments[r];if(a!=null)for(var l in a)a.hasOwnProperty(l)&&(s[l]=a[l])}return s})({},n._sentryModuleMetadata[new n.Error().stack],{"_sentryBundlerPluginAppKey:currents-dashboard":!0});var o=new n.Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="01af3e43-f37e-442a-ac2d-92e1510c6773",n._sentryDebugIdIdentifier="sentry-dbid-01af3e43-f37e-442a-ac2d-92e1510c6773")}catch{}})();const N=n=>`Your task is to set up Postman/Newman to report test results to Currents.dev 2 31. Install "@currents/cmd" and "newman" packages: 4 5- as development dependencies 6- using the project's package manager (npm, pnpm, yarn, etc...) 7 8Newman is Postman's CLI tool for running collections. 9 102. Run your Postman collection with JUnit reporter: 11 12\`\`\`bash 13npx newman run ./collection.json -r cli,junit --reporter-junit-export ./results.xml 14\`\`\` 15 16Replace \`./collection.json\` with the path to your Postman collection file. 17 183. Convert the JUnit report to Currents format: 19 20\`\`\`bash 21npx currents convert --input-format=junit --input-file=./results.xml --framework=postman 22\`\`\` 23 244. Upload test results to Currents: 25 26\`\`\`bash 27npx currents upload --key=\${CURRENTS_RECORD_KEY} --project-id=${n} 28\`\`\` 29 30Note: Keep your CURRENTS_RECORD_KEY private and use environment variables in CI. 31`,$=({aiMode:n,recordKey:o,projectId:s,apiUrl:r})=>{const[a,l]=w.useState(!1),p=(h=!1)=>{const g=h?o:y(o);return`${r?`CURRENTS_API_URL=${r} `:""}npx currents upload --key=${g} --project-id=${s}`};return t("div",{className:"space-y-ui-v2-4",children:[n&&t("div",{className:"flex flex-col gap-ui-v2-4",children:[t("span",{className:"text-sm flex items-center gap-2",children:[e(i,{step:1}),"Share those instructions with your AI assistant to have it set up your Postman/Newman integration."]}),e("div",{className:"ml-8",children:e(f,{code:N(s),language:"markdown",filename:"Prompt",maxHeight:"max-h-[180px]",collapsible:!0,wrap:!0,children:e(c,{})})})]}),t("div",{className:"flex flex-col gap-8",children:[!n&&t(x,{children:[t("div",{className:"flex flex-col gap-ui-v2-4",children:[t("span",{className:"text-sm flex items-center gap-2",children:[e(i,{step:1}),t("span",{children:["Install ",e(d,{children:"@currents/cmd"})," and ",e(d,{children:"newman"})," npm packages."]})]}),t("div",{className:"ml-8",children:[e(m,{code:"npm install @currents/cmd newman --save-dev",language:"bash",children:e(c,{})}),t("span",{className:"text-sm text-theme-secondary",children:[e(u,{color:!1,icon:!0,target:"_blank",href:"https://learning.postman.com/docs/collections/using-newman-cli/installing-running-newman/",children:"Newman"})," ","is Postman's CLI tool for running collections."]})]})]}),t("div",{className:"flex flex-col gap-ui-v2-4",children:[t("span",{className:"text-sm flex items-center gap-2",children:[e(i,{step:2}),"Run the Postman collection with JUnit reporter."]}),t("div",{className:"ml-8",children:[e(m,{code:"npx newman run ./collection.json -r cli,junit --reporter-junit-export ./results.xml",language:"bash",children:e(c,{})}),t("span",{className:"text-sm text-theme-secondary",children:["Learn more about"," ",e(u,{color:!1,icon:!0,target:"_blank",href:"https://learning.postman.com/docs/collections/using-newman-cli/newman-options/#reporters",children:"Newman reporters"}),"."]})]})]}),t("div",{className:"flex flex-col gap-ui-v2-4",children:[t("span",{className:"text-sm flex items-center gap-2",children:[e(i,{step:3}),"Convert the JUnit report to Currents format."]}),e("div",{className:"ml-8",children:e(m,{code:"npx currents convert --input-format=junit --input-file=./results.xml --framework=postman",language:"bash",children:e(c,{})})})]})]}),t("div",{className:"flex flex-col gap-ui-v2-4",children:[t("span",{className:"text-sm flex items-center gap-2",children:[e(i,{step:n?2:4}),"Upload test results to Currents."]}),e("div",{className:"ml-8",children:t(m,{code:p(a),copyValue:p(!0),language:"bash",children:[e(c,{}),e(v,{isRevealed:a,onToggle:()=>l(!a)})]})})]})]})]})};export{$ as PostmanInstructions,$ as default}; 32//# sourceMappingURL=postmanInstructions-B8hIgkUG.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.