@testiny/cli 1.25.0 → 1.25.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/package.json +1 -1
- package/testiny-importer.js +1 -1
package/package.json
CHANGED
package/testiny-importer.js
CHANGED
|
@@ -311,7 +311,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error
|
|
|
311
311
|
`:`
|
|
312
312
|
`)+r,i=n+1,n=e.indexOf(`
|
|
313
313
|
`,i)}while(n!==-1);return a+=e.slice(i),a}s(NB,"stringEncaseCRLFWithFirstIndex");var{stdout:DB,stderr:FB}=RB,BA=Symbol("GENERATOR"),Qc=Symbol("STYLER"),Xp=Symbol("IS_EMPTY"),LB=["ansi","ansi","ansi256","ansi16m"],ed=Object.create(null),xfe=s((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=DB?DB.level:0;e.level=t.level===void 0?r:t.level},"applyOptions");var wfe=s(e=>{let t=s((...r)=>r.join(" "),"chalk");return xfe(t,e),Object.setPrototypeOf(t,Qp.prototype),t},"chalkFactory");function Qp(e){return wfe(e)}s(Qp,"createChalk");Object.setPrototypeOf(Qp.prototype,Function.prototype);for(let[e,t]of Object.entries(Ai))ed[e]={get(){let r=Rb(this,VA(t.open,t.close,this[Qc]),this[Xp]);return Object.defineProperty(this,e,{value:r}),r}};ed.visible={get(){let e=Rb(this,this[Qc],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var $A=s((e,t,r,...n)=>e==="rgb"?t==="ansi16m"?Ai[r].ansi16m(...n):t==="ansi256"?Ai[r].ansi256(Ai.rgbToAnsi256(...n)):Ai[r].ansi(Ai.rgbToAnsi(...n)):e==="hex"?$A("rgb",t,r,...Ai.hexToRgb(...n)):Ai[r][e](...n),"getModelAnsi"),Tfe=["rgb","hex","ansi256"];for(let e of Tfe){ed[e]={get(){let{level:r}=this;return function(...n){let i=VA($A(e,LB[r],"color",...n),Ai.color.close,this[Qc]);return Rb(this,i,this[Xp])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);ed[t]={get(){let{level:r}=this;return function(...n){let i=VA($A(e,LB[r],"bgColor",...n),Ai.bgColor.close,this[Qc]);return Rb(this,i,this[Xp])}}}}var Ife=Object.defineProperties(()=>{},{...ed,level:{enumerable:!0,get(){return this[BA].level},set(e){this[BA].level=e}}}),VA=s((e,t,r)=>{let n,i;return r===void 0?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},"createStyler"),Rb=s((e,t,r)=>{let n=s((...i)=>Afe(n,i.length===1?""+i[0]:i.join(" ")),"builder");return Object.setPrototypeOf(n,Ife),n[BA]=e,n[Qc]=t,n[Xp]=r,n},"createBuilder"),Afe=s((e,t)=>{if(e.level<=0||!t)return e[Xp]?"":t;let r=e[Qc];if(r===void 0)return t;let{openAll:n,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=MB(t,r.close,r.open),r=r.parent;let a=t.indexOf(`
|
|
314
|
-
`);return a!==-1&&(t=NB(t,i,n,a)),n+t+i},"applyStyle");Object.defineProperties(Qp.prototype,ed);var Efe=Qp(),_ht=Qp({level:FB?FB.level:0});var Ei=Efe;var YB=ge(ZB(),1),{program:Ci,createCommand:Fht,createArgument:Lht,createOption:qht,CommanderError:jht,InvalidArgumentError:Bht,InvalidOptionArgumentError:$ht,Command:Vht,Argument:Uht,Option:td,Help:Wht}=YB.default;var Au=require("fs"),Eb=ge(require("path"));var JB=s(()=>(...e)=>e.join("."),"nameFrom"),XB=JB;globalThis.nameFrom=JB;globalThis.ENV_CLOUD??=void 0;globalThis.ENV_STANDALONE??=void 0;globalThis.ENV_STANDALONE_DEBUG??=void 0;function QB(){globalThis.ENV_CLOUD??=!0,globalThis.ENV_STANDALONE??=!1}s(QB,"setup");QB();var e$=QB;var Wb=ge(require("os"));var aE=require("node:crypto");var Ufe=128,Ul,rd;function Wfe(e){!Ul||Ul.length<e?(Ul=Buffer.allocUnsafe(e*Ufe),aE.webcrypto.getRandomValues(Ul),rd=0):rd+e>Ul.length&&(aE.webcrypto.getRandomValues(Ul),rd=0),rd+=e}s(Wfe,"fillPool");function Hfe(e){return Wfe(e|=0),Ul.subarray(rd-e,rd)}s(Hfe,"random");function zfe(e,t,r){let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(a=t)=>{let o="";for(;;){let u=r(i),l=i;for(;l--;)if(o+=e[u[l]&n]||"",o.length>=a)return o}}}s(zfe,"customRandom");function _a(e,t=21){return zfe(e,t,Hfe)}s(_a,"customAlphabet");function Fb(e){return!0}s(Fb,"as");var Ou=Object.create(null);Object.defineProperty(Ou,"toString",{value:s(()=>"[record]","value"),configurable:!1,enumerable:!1,writable:!1});Object.defineProperty(Ou,"valueOf",{value:s(()=>"[record]","value"),configurable:!1,enumerable:!1,writable:!1});Object.defineProperty(Ou,"toLocaleString",{value:s(()=>"[record]","value"),configurable:!1,enumerable:!1,writable:!1});Object.defineProperty(Ou,"isPrototypeOf",{value:s(()=>!1,"value"),configurable:!1,enumerable:!1,writable:!1});Object.defineProperty(Ou,"hasOwnProperty",{value:s(()=>!1,"value"),configurable:!1,enumerable:!1,writable:!1});Object.freeze(Ou);function we(e){return e?Object.assign(Object.create(Ou),e):Object.create(Ou)}s(we,"newRecord");function Wl(e){return e?Object.keys(e):[]}s(Wl,"objectKeys");function Lb(e){return e?Object.values(e):[]}s(Lb,"objectValues");function nd(e){return Wl(e).map(t=>e[t])}s(nd,"enumToArray");var t$=s((e,t)=>{throw t},"switchGuardThrow");var qb="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",Gfe="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Kfe="ABCDEFGHJLMNPQRSTUVWXY345789",jb=_a(qb,20),tmt=_a(qb,32),Bb=_a(qb,10),rmt=_a(qb,6),nmt=_a("0123456789ABCDEF",16),imt=_a(Gfe,20),smt=_a(Kfe,5);function $b(e,...t){return e=th(e,"/")+"/",e+t.map(r=>th(r,"/")).filter(r=>r.length>0).join("/")}s($b,"joinUrl");function oE(e,t,r,n){if(typeof e!="string"||!e)return e;let i=0,a=e.length-1;if(r)for(;t.includes(e[i]);)i++;if(n)for(;t.includes(e[a]);)a--;return i<a?e.substring(i,a+1):""}s(oE,"trimInternal");function th(e,t){return oE(e,t,!0,!0)}s(th,"trim");function Hl(e,t){return oE(e,t,!0,!1)}s(Hl,"trimLeft");function rh(e,t){return oE(e,t,!1,!0)}s(rh,"trimRight");function uE(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(uE,"escapeRegExp");function lE(e){return!e||typeof e!="string"?!1:/^[a-z0-9]{8,}$/i.test(e)}s(lE,"isAlphaNumericId");function Vb(e){return!e||typeof e!="string"?!1:/^-?[0-9]+$/i.test(e)}s(Vb,"isIntegerString");function r$(e){return!e||typeof e!="string"?!1:/^\w+$/.test(e)}s(r$,"isWord");function n$(e){return!e||typeof e!="string"?!1:/^[a-zA-Z]/.test(e)}s(n$,"startsWithLetter");function Zfe(e,t){let r=new Map,n=e.length,i=t.length,a=0,o=0,u=0;for(a=0;a<i;a++){let c=t.charCodeAt(a),d=r.get(c);d?d.push(a):r.set(c,[a])}let l=[];for(l[u++]=-1,a=0;a<n;a++){let c=r.get(e.charCodeAt(a));if(c)for(o=c.length-1;o>=0;o--){let d=c[o];if(d>l[u-1])l[u++]=d;else{let p=-1,h=l.length;for(;1+p<h;){let g=p+(h-p>>1);d<=l[g]?h=g:p=g}l[h]=d}}}return u-1}s(Zfe,"textLcsLen");function i$(e,t){return e.length===0&&t.length===0?0:1-2*Zfe(e,t)/(e.length+t.length)}s(i$,"stringDistance");function ku(e){let t=JSON.stringify(e);return new Blob([t]).size}s(ku,"jsonSize");function ho(e,t){return typeof e!="string"||t<0||e.length<=t?e:e.substring(0,t)}s(ho,"truncate");function zl(e,t){return e.length<=t?e:`${e.substring(0,t-1)}\u2026`}s(zl,"truncateEllipse");function nh(e,t=0){let r=3735928559^t,n=1103547991^t;for(let i=0,a;i<e.length;i++)a=e.charCodeAt(i),r=Math.imul(r^a,2246822519),n=Math.imul(n^a,3266489917);return r^=Math.imul(r^n>>>15,1935289751),n^=Math.imul(n^r>>>15,3405138345),r^=n>>>16,n^=r>>>16,2097152*(n>>>0)+(r>>>11)}s(nh,"hashString");var s$=require("child_process"),Ub=require("fs"),ih=ge(require("os"));var cE;function a$(){if(cE)return cE;return cE=e();function e(){let t=ih.default.platform();try{if(t==="win32")return`${ih.default.version()} (${ih.default.release()})`;if(t==="darwin")try{return`macOS ${(0,s$.execSync)("sw_vers -productVersion").toString("utf8").trim()}`}catch{return`macOS ${ih.default.release()}`}else if(t==="linux"){try{let r="/etc/os-release";if((0,Ub.existsSync)(r)){let n=(0,Ub.readFileSync)(r).toString("utf8"),i=n.match(/NAME="([^"]+)"/),a=n.match(/VERSION="([^"]+)"/);return`Linux ${i?i[1]:"Unknown"} ${a?a[1]:"Unknown"}`}}catch{}return"Linux (unknown)"}else return"Unsupported platform"}catch{return"Unknown OS"}}}s(a$,"getOSInfo");var B=process.env,dE=["none","auto","gitlab","github","azure","circle","jenkins","teamcity","bamboo","drone","buddy","bitbucket","gocd","appveyor","aws_codebuild","buildkite","codeship","codefresh","cloudbuild","semaphore","travis"];function Hb(e){let t=new Map,r=e,n=[],i;if((!r||r==="auto")&&(r=Yfe()),!dE.includes(r))throw new Error("Environment is not supported: "+r);if(r==="none"){let o=jb(12);t.set("run_id",o),n=["run_id"],i="%{run_id}"}if(r==="gitlab")t.set("ci_pipeline_id",B.CI_PIPELINE_ID??""),t.set("ci_job_id",B.CI_JOB_ID??""),t.set("ci_job_name",B.CI_JOB_NAME??""),t.set("ci_project",B.CI_PROJECT_PATH_SLUG??""),t.set("ci_runner_id",B.CI_RUNNER_ID??""),t.set("ci_runner_desc",B.CI_RUNNER_DESCRIPTION??""),t.set("ci_build_url",B.CI_JOB_URL??""),t.set("vc_branch",B.CI_COMMIT_BRANCH??B.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME??""),t.set("vc_commit",B.CI_COMMIT_SHORT_SHA??""),t.set("vc_tag",B.CI_COMMIT_TAG??""),n=["ci_pipeline_id"],i="Pipeline %{ci_pipeline_id} - %{vc_branch} - %{vc_commit}";else if(r==="github")t.set("ci_run_id",B.GITHUB_RUN_ID??""),t.set("ci_job",B.GITHUB_JOB??""),t.set("ci_retry",B.GITHUB_RUN_ATTEMPT??""),t.set("ci_repository",B.GITHUB_REPOSITORY??""),t.set("ci_runner",B.RUNNER_NAME??""),t.set("ci_build_url",`${B.GITHUB_SERVER_URL}/${B.GITHUB_REPOSITORY}/actions/runs/${B.GITHUB_RUN_ID}`),t.set("ci_workflow_name",B.GITHUB_WORKFLOW??""),t.set("vc_ref",B.GITHUB_REF_NAME??""),t.set("vc_commit",B.GITHUB_SHA??""),n=["ci_repository","ci_run_id"],i="%{ci_workflow_name} - %{vc_ref} - %{vc_commit}";else if(r==="azure")t.set("ci_build",B.BUILD_BUILDID??""),t.set("ci_project",B.SYSTEM_TEAMPROJECT??""),t.set("ci_repository",B.BUILD_REPOSITORY_NAME??""),t.set("ci_agent_id",B.AGENT_ID??""),t.set("ci_pipeline",B.BUILD_DEFINITIONNAME??""),t.set("ci_build_url",`${B.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${B.SYSTEM_TEAMPROJECT}/_build/results?buildId=${B.BUILD_BUILDID}&_a=summary`),t.set("vc_ref",B.BUILD_SOURCEBRANCHNAME??""),t.set("vc_commit",B.BUILD_SOURCEVERSION??""),n=["ci_build"],i="%{ci_pipeline} - %{ci_build} - %{vc_ref} - %{vc_commit}";else if(r==="circle")t.set("ci_workflow_id",B.CIRCLE_WORKFLOW_ID??""),t.set("ci_build",B.CIRCLE_BUILD_NUM??""),t.set("ci_job",B.CIRCLE_JOB??""),t.set("ci_job_id",B.CIRCLE_WORKFLOW_JOB_ID??""),t.set("ci_repository",B.CIRCLE_PROJECT_REPONAME??""),t.set("ci_runner_id",B.CIRCLE_NODE_INDEX??""),t.set("ci_build_url",B.CIRCLE_BUILD_URL??""),t.set("vc_branch",B.CIRCLE_BRANCH??""),t.set("vc_commit",(B.CIRCLE_SHA1??"").slice(8)),t.set("vc_tag",B.CIRCLE_TAG??""),n=["ci_workflow_id"],i="%{ci_job} - %{ci_workflow_id} - %{vc_branch} - %{vc_commit}";else if(r==="jenkins")t.set("ci_build",B.BUILD_NUMBER??""),t.set("ci_job",B.JOB_NAME??""),t.set("ci_repository",B.GIT_URL&&URL.canParse(B.GIT_URL)?new URL(B.GIT_URL).pathname.slice(1):""),t.set("ci_runner_id",B.EXECUTOR_NUMBER??""),t.set("ci_build_url",B.BUILD_URL??""),t.set("vc_branch",B.GIT_BRANCH??""),t.set("vc_commit",(B.GIT_COMMIT??"").slice(8)),n=["ci_build"],i="%{ci_repository} - %{ci_build} - %{vc_branch} - %{vc_commit}";else if(r==="teamcity")t.set("ci_project",B.TEAMCITY_PROJECT_NAME??""),t.set("ci_build",B.BUILD_NUMBER??""),t.set("ci_build_url",B.BUILD_URL??""),t.set("vc_branch",B.TEAMCITY_BUILD_BRANCH??""),t.set("vc_commit",(B.BUILD_VCS_NUMBER??"").slice(8)),n=["ci_build"],i="%{ci_project} - %{ci_build} - %{vc_branch} - %{vc_commit}";else if(r==="bamboo"){let o=function(u){return B[`bamboo.${u}`]??B[`bamboo_${u}`]??""};var a=o;s(o,"bambooVar"),t.set("ci_build",o("buildResultKey")),t.set("ci_job_key",o("jobKey")),t.set("ci_agent_id",o("agentId")),t.set("ci_build_url",o("resultsUrl")),t.set("vc_branch",o("bamboo.planRepository.branch")),t.set("vc_commit",o("bamboo.planRepository.revisionShort")),n=["ci_build"],i="%{ci_build} - %{vc_branch} - %{vc_commit}"}else r==="drone"?(t.set("ci_build_id",B.DRONE_BUILD_NUMBER??""),t.set("ci_stage",B.DRONE_STAGE_NAME??""),t.set("ci_repository",B.DRONE_REPO??""),t.set("ci_build_url",B.DRONE_BUILD_LINK??""),t.set("vc_branch",B.DRONE_BRANCH??""),t.set("vc_commit",(B.DRONE_COMMIT_SHA??"").slice(8)),t.set("vc_tag",B.TAG??""),n=["ci_build_id"],i="%{ci_repository} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="buddy"?(t.set("ci_run_id",B.BUDDY_RUN_ID??""),t.set("ci_pipeline",B.BUDDY_PIPELINE_NAME??""),t.set("ci_repository",B.BUDDY_REPO_SLUG??""),t.set("ci_build_url",B.BUDDY_RUN_URL??""),t.set("vc_branch",B.BUDDY_RUN_BRANCH??""),t.set("vc_commit",(B.BUDDY_RUN_COMMIT??"").slice(8)),t.set("vc_tag",B.BUDDY_RUN_TAG??""),n=["ci_run_id"],i="%{ci_repository} - %{ci_run_id} - %{vc_branch} - %{vc_commit}"):r==="bitbucket"?(t.set("ci_build_id",B.BITBUCKET_BUILD_NUMBER??""),t.set("ci_project",B.BITBUCKET_PROJECT_KEY??""),t.set("ci_repository",B.BITBUCKET_REPO_FULL_NAME??""),t.set("ci_build_url",`${B.BITBUCKET_GIT_HTTP_ORIGIN}/pipelines/results/${B.BITBUCKET_BUILD_NUMBER}`.replace("http://","https://")),t.set("vc_branch",B.BITBUCKET_BRANCH??""),t.set("vc_commit",(B.BITBUCKET_COMMIT??"").slice(8)),t.set("vc_tag",B.BITBUCKET_TAG??""),n=["ci_build_id"],i="%{ci_project} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="gocd"?(t.set("ci_pipeline",B.GO_PIPELINE_NAME??""),t.set("ci_pipeline_label",B.GO_PIPELINE_LABEL??""),t.set("ci_go_env",B.GO_ENVIRONMENT_NAME??""),t.set("ci_stage",B.GO_STAGE_NAME??""),t.set("ci_stage_id",B.STAGE_COUNTER??""),t.set("ci_build_url",`${B.GO_SERVER_URL}/go/pipelines/${B.GO_PIPELINE_NAME}/${B.GO_PIPELINE_COUNTER}/${B.GO_STAGE_NAME}/${B.GO_STAGE_COUNTER}`),t.set("vc_commit",(B.GO_REVISION??"").slice(8)),n=["ci_pipeline_label"],i="%{ci_pipeline_label} - %{vc_commit}"):r==="appveyor"?(t.set("ci_project",B.APPVEYOR_PROJECT_SLUG??""),t.set("ci_build_id",B.APPVEYOR_BUILD_ID??""),t.set("ci_job",B.APPVEYOR_JOB_NAME??""),t.set("ci_job_id",B.APPVEYOR_JOB_ID??""),t.set("ci_repository",B.APPVEYOR_REPO_NAME??""),t.set("ci_build_url",`${B.APPVEYOR_URL}/project/${B.APPVEYOR_ACCOUNT_NAME}/${B.APPVEYOR_PROJECT_SLUG}/builds/${B.APPVEYOR_BUILD_ID}"`),t.set("vc_branch",B.APPVEYOR_REPO_BRANCH??""),t.set("vc_commit",(B.APPVEYOR_REPO_COMMIT??"").slice(8)),t.set("vc_tag",B.APPVEYOR_REPO_TAG_NAME??""),n=["ci_build_id"],i="%{ci_project} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="aws_codebuild"?(t.set("ci_build_id",B.CODEBUILD_BUILD_ID??""),t.set("ci_repository",B.CODEBUILD_SOURCE_REPO_URL??""),t.set("vc_branch",B.CODEBUILD_SOURCE_VERSION??""),t.set("vc_commit",(B.CODEBUILD_RESOLVED_SOURCE_VERSION??"").slice(8)),n=["ci_build_id"],i="%{ci_repository} - %{vc_branch} - %{vc_commit}"):r==="buildkite"?(t.set("ci_pipeline",B.BUILDKITE_PIPELINE_NAME??""),t.set("ci_build_id",B.BUILDKITE_BUILD_ID??""),t.set("ci_repository",B.BUILDKITE_REPO??""),t.set("ci_build_url",B.BUILDKITE_BUILD_URL??""),t.set("vc_branch",B.BUILDKITE_BRANCH??""),t.set("vc_commit",(B.BUILDKITE_COMMIT??"").slice(8)),t.set("vc_tag",B.BUILDKITE_TAG??""),n=["ci_pipeline","ci_build_id"],i="%{ci_pipeline} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="codeship"?(t.set("ci_build_id",B.CI_BUILD_ID??""),t.set("ci_repository",B.CI_REPO_NAME??""),t.set("ci_build_url",`https://app.codeship.com/projects/${B.CI_PROJECT_ID}/builds/${B.CI_BUILD_ID}`),t.set("vc_branch",B.CI_BRANCH??""),t.set("vc_commit",(B.CI_COMMIT_ID??"").slice(8)),n=["ci_build_id"],i="%{ci_repository} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="codefresh"?(t.set("ci_build_id",B.CF_BUILD_ID??""),t.set("ci_pipeline",B.CF_PIPELINE_NAME??""),t.set("ci_repository",B.CF_REPO_NAME??""),t.set("ci_build_url",B.CF_BUILD_URL??""),t.set("vc_branch",B.CF_BRANCH??""),t.set("vc_commit",(B.CF_REVISION??"").slice(8)),n=["ci_build_id"],i="%{ci_build_id} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="cloudbuild"?(t.set("ci_project_id",B.PROJECT_ID??""),t.set("ci_build_id",B.BUILD_ID??""),t.set("ci_repository",B.REPO_FULL_NAME??""),t.set("ci_build_url",`https://console.cloud.google.com/cloud-build/builds/${B.BUILD_ID}?project=${B.PROJECT_ID}`),t.set("vc_branch",B.BRANCH_NAME??""),t.set("vc_commit",(B.REVISION_ID??"").slice(8)),t.set("vc_tag",B.TAG_NAME??""),n=["ci_build_id"],i="%{ci_project_id} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="semaphore"?(t.set("ci_pipeline_id",B.SEMAPHORE_PIPELINE_ID??""),t.set("ci_project",B.SEMAPHORE_PROJECT_NAME??""),t.set("ci_job",B.SEMAPHORE_JOB_NAME??""),t.set("ci_job_id",B.SEMAPHORE_JOB_ID??""),t.set("ci_repository",B.SEMAPHORE_GIT_REPO_SLUG??""),t.set("ci_build_url",`${B.SEMAPHORE_ORGANIZATION_URL}/jobs/${B.SEMAPHORE_JOB_ID}`),t.set("vc_branch",B.SEMAPHORE_GIT_BRANCH??""),t.set("vc_commit",(B.SEMAPHORE_GIT_SHA??"").slice(8)),t.set("vc_tag",B.SEMAPHORE_GIT_TAG_NAME??""),n=["ci_pipeline_id"],i="%{ci_project} - %{ci_pipeline_id} - %{vc_branch} - %{vc_commit}"):r==="travis"&&(t.set("ci_build_id",B.TRAVIS_BUILD_ID??""),t.set("ci_job",B.TRAVIS_JOB_NAME??""),t.set("ci_job_nr",B.TRAVIS_JOB_NUMBER??""),t.set("ci_repository",B.TRAVIS_REPO_SLUG??""),t.set("ci_build_url",B.TRAVIS_JOB_WEB_URL??""),t.set("vc_branch",B.TRAVIS_BRANCH??""),t.set("vc_commit",(B.TRAVIS_COMMIT??"").slice(8)),t.set("vc_tag",B.TRAVIS_TAG??""),n=["ci_build_id"],i="%{ci_repository} - %{ci_build_id} - %{vc_branch} - %{vc_commit}");return t.set("env_arch",Wb.default.arch()),t.set("env_host",Wb.default.hostname()),t.set("env_platform",Wb.default.platform()),t.set("env_os_info",a$()),{envName:r,values:t,defaultRunFields:n,runTitlePattern:i}}s(Hb,"populateEnvironment");function Yfe(){return B.GITLAB_CI?"gitlab":B.CI&&B.GITHUB_ACTIONS?"github":B.TF_BUILD?"azure":B.CIRCLECI?"circle":B.JENKINS_URL||B.BUILD_ID&&B.BUILD_NUMBER?"jenkins":B.TEAMCITY_VERSION?"teamcity":B.bamboo_agentId||B.bamboo_buildNumber||B["bamboo.agentId"]||B["bamboo.buildNumber"]?"bamboo":B.DRONE?"drone":B.BUDDY?"buddy":B.BITBUCKET_BUILD_NUMBER?"bitbucket":B.APPVEYOR?"appveyor":B.CODEBUILD_BUILD_ID?"aws_codebuild":B.BUILDKITE?"buildkite":B.CI_NAME==="codeship"?"codeship":B.SEMAPHORE?"semaphore":B.CF_BUILD_ID?"codefresh":B.TRAVIS?"travis":B.GO_SERVER_URL?"gocd":B.LOCATION&&B.PROJECT_NUMBER&&B.BUILD_ID?"cloudbuild":"none"}s(Yfe,"detectEnvironment");var xse=ge(Z1()),wse=require("fs"),By=ge(require("path"));var Sv=process.env.NODE_ENV||"development";function Y1(){return Sv==="development"}s(Y1,"isDevEnv");function YU(){return Sv==="production"}s(YU,"isProdEnv");function Ir(e){return e!==void 0&&e!=null}s(Ir,"isDefined");function J1(e){return typeof e!="object"||e===null?!1:Object.keys(e).length>0}s(J1,"isNonEmptyObject");var Ia=new Set(["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","prototype","toLocaleString","toString","valueOf"]);function JU(e,t){if(typeof e!="object"||e===null)return;let r=new Set([e]);n(e);function n(i){let a=Array.isArray(i),o=a?void 0:Object.keys(i),u=a?i.length:o.length;for(let l=0;l<u;l++){let c=o?o[l]:l,d=i[c],p=typeof d;typeof c=="symbol"||p==="function"||(t(d,c,i),p==="object"&&d!==null&&!r.has(d)&&(r.add(d),n(d)))}}s(n,"visit")}s(JU,"visitObjectDfs");function xv(e){return iye(e)||oye(e)}s(xv,"isLikelyJson");var rye=/^\s*\{/,nye=/\}\s*$/;function iye(e){return!!e&&rye.test(e)&&nye.test(e)}s(iye,"isLikelyJsonObject");var sye=/^\s*\[/,aye=/\]\s*$/;function oye(e){return!!e&&sye.test(e)&&aye.test(e)}s(oye,"isLikelyJsonArray");function XU(){Object.seal(Object.prototype),[Object,Function,Function.prototype,Array,Array.prototype,String,String.prototype,Number,Number.prototype,Boolean,Boolean.prototype].forEach(Object.freeze)}s(XU,"enablePrototypeMitigations");function X1(e){return Object.freeze(e),Object.freeze(e.prototype),e}s(X1,"freezeConstructor");var ft=class extends Error{static{s(this,"ApiError")}code;status=500;expected;meta;privateMeta;constructor(t,r=void 0,n,i,a){super(r),this.status=n?.status||uye(t),this.code=t,this.expected=n?.expected??!1,n?.stack&&(this.stack=n?.stack+`
|
|
314
|
+
`);return a!==-1&&(t=NB(t,i,n,a)),n+t+i},"applyStyle");Object.defineProperties(Qp.prototype,ed);var Efe=Qp(),_ht=Qp({level:FB?FB.level:0});var Ei=Efe;var YB=ge(ZB(),1),{program:Ci,createCommand:Fht,createArgument:Lht,createOption:qht,CommanderError:jht,InvalidArgumentError:Bht,InvalidOptionArgumentError:$ht,Command:Vht,Argument:Uht,Option:td,Help:Wht}=YB.default;var Au=require("fs"),Eb=ge(require("path"));var JB=s(()=>(...e)=>e.join("."),"nameFrom"),XB=JB;globalThis.nameFrom=JB;globalThis.ENV_CLOUD??=void 0;globalThis.ENV_STANDALONE??=void 0;globalThis.ENV_STANDALONE_DEBUG??=void 0;function QB(){globalThis.ENV_CLOUD??=!0,globalThis.ENV_STANDALONE??=!1}s(QB,"setup");QB();var e$=QB;var Wb=ge(require("os"));var aE=require("node:crypto");var Ufe=128,Ul,rd;function Wfe(e){!Ul||Ul.length<e?(Ul=Buffer.allocUnsafe(e*Ufe),aE.webcrypto.getRandomValues(Ul),rd=0):rd+e>Ul.length&&(aE.webcrypto.getRandomValues(Ul),rd=0),rd+=e}s(Wfe,"fillPool");function Hfe(e){return Wfe(e|=0),Ul.subarray(rd-e,rd)}s(Hfe,"random");function zfe(e,t,r){let n=(2<<31-Math.clz32(e.length-1|1))-1,i=Math.ceil(1.6*n*t/e.length);return(a=t)=>{let o="";for(;;){let u=r(i),l=i;for(;l--;)if(o+=e[u[l]&n]||"",o.length>=a)return o}}}s(zfe,"customRandom");function _a(e,t=21){return zfe(e,t,Hfe)}s(_a,"customAlphabet");function Fb(e){return!0}s(Fb,"as");var Ou=Object.create(null);Object.defineProperty(Ou,"toString",{value:s(()=>"[record]","value"),configurable:!1,enumerable:!1,writable:!1});Object.defineProperty(Ou,"valueOf",{value:s(()=>"[record]","value"),configurable:!1,enumerable:!1,writable:!1});Object.defineProperty(Ou,"toLocaleString",{value:s(()=>"[record]","value"),configurable:!1,enumerable:!1,writable:!1});Object.defineProperty(Ou,"isPrototypeOf",{value:s(()=>!1,"value"),configurable:!1,enumerable:!1,writable:!1});Object.defineProperty(Ou,"hasOwnProperty",{value:s(()=>!1,"value"),configurable:!1,enumerable:!1,writable:!1});Object.freeze(Ou);function we(e){return e?Object.assign(Object.create(Ou),e):Object.create(Ou)}s(we,"newRecord");function Wl(e){return e?Object.keys(e):[]}s(Wl,"objectKeys");function Lb(e){return e?Object.values(e):[]}s(Lb,"objectValues");function nd(e){return Wl(e).map(t=>e[t])}s(nd,"enumToArray");var t$=s((e,t)=>{throw t},"switchGuardThrow");var qb="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",Gfe="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Kfe="ABCDEFGHJLMNPQRSTUVWXY345789",jb=_a(qb,20),tmt=_a(qb,32),Bb=_a(qb,10),rmt=_a(qb,6),nmt=_a("0123456789ABCDEF",16),imt=_a(Gfe,20),smt=_a(Kfe,5);function $b(e,...t){return e=th(e,"/")+"/",e+t.map(r=>th(r,"/")).filter(r=>r.length>0).join("/")}s($b,"joinUrl");function oE(e,t,r,n){if(typeof e!="string"||!e)return e;let i=0,a=e.length-1;if(r)for(;t.includes(e[i]);)i++;if(n)for(;t.includes(e[a]);)a--;return i<=a?e.substring(i,a+1):""}s(oE,"trimInternal");function th(e,t){return oE(e,t,!0,!0)}s(th,"trim");function Hl(e,t){return oE(e,t,!0,!1)}s(Hl,"trimLeft");function rh(e,t){return oE(e,t,!1,!0)}s(rh,"trimRight");function uE(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(uE,"escapeRegExp");function lE(e){return!e||typeof e!="string"?!1:/^[a-z0-9]{8,}$/i.test(e)}s(lE,"isAlphaNumericId");function Vb(e){return!e||typeof e!="string"?!1:/^-?[0-9]+$/i.test(e)}s(Vb,"isIntegerString");function r$(e){return!e||typeof e!="string"?!1:/^\w+$/.test(e)}s(r$,"isWord");function n$(e){return!e||typeof e!="string"?!1:/^[a-zA-Z]/.test(e)}s(n$,"startsWithLetter");function Zfe(e,t){let r=new Map,n=e.length,i=t.length,a=0,o=0,u=0;for(a=0;a<i;a++){let c=t.charCodeAt(a),d=r.get(c);d?d.push(a):r.set(c,[a])}let l=[];for(l[u++]=-1,a=0;a<n;a++){let c=r.get(e.charCodeAt(a));if(c)for(o=c.length-1;o>=0;o--){let d=c[o];if(d>l[u-1])l[u++]=d;else{let p=-1,h=l.length;for(;1+p<h;){let g=p+(h-p>>1);d<=l[g]?h=g:p=g}l[h]=d}}}return u-1}s(Zfe,"textLcsLen");function i$(e,t){return e.length===0&&t.length===0?0:1-2*Zfe(e,t)/(e.length+t.length)}s(i$,"stringDistance");function ku(e){let t=JSON.stringify(e);return new Blob([t]).size}s(ku,"jsonSize");function ho(e,t){return typeof e!="string"||t<0||e.length<=t?e:e.substring(0,t)}s(ho,"truncate");function zl(e,t){return e.length<=t?e:`${e.substring(0,t-1)}\u2026`}s(zl,"truncateEllipse");function nh(e,t=0){let r=3735928559^t,n=1103547991^t;for(let i=0,a;i<e.length;i++)a=e.charCodeAt(i),r=Math.imul(r^a,2246822519),n=Math.imul(n^a,3266489917);return r^=Math.imul(r^n>>>15,1935289751),n^=Math.imul(n^r>>>15,3405138345),r^=n>>>16,n^=r>>>16,2097152*(n>>>0)+(r>>>11)}s(nh,"hashString");var s$=require("child_process"),Ub=require("fs"),ih=ge(require("os"));var cE;function a$(){if(cE)return cE;return cE=e();function e(){let t=ih.default.platform();try{if(t==="win32")return`${ih.default.version()} (${ih.default.release()})`;if(t==="darwin")try{return`macOS ${(0,s$.execSync)("sw_vers -productVersion").toString("utf8").trim()}`}catch{return`macOS ${ih.default.release()}`}else if(t==="linux"){try{let r="/etc/os-release";if((0,Ub.existsSync)(r)){let n=(0,Ub.readFileSync)(r).toString("utf8"),i=n.match(/NAME="([^"]+)"/),a=n.match(/VERSION="([^"]+)"/);return`Linux ${i?i[1]:"Unknown"} ${a?a[1]:"Unknown"}`}}catch{}return"Linux (unknown)"}else return"Unsupported platform"}catch{return"Unknown OS"}}}s(a$,"getOSInfo");var B=process.env,dE=["none","auto","gitlab","github","azure","circle","jenkins","teamcity","bamboo","drone","buddy","bitbucket","gocd","appveyor","aws_codebuild","buildkite","codeship","codefresh","cloudbuild","semaphore","travis"];function Hb(e){let t=new Map,r=e,n=[],i;if((!r||r==="auto")&&(r=Yfe()),!dE.includes(r))throw new Error("Environment is not supported: "+r);if(r==="none"){let o=jb(12);t.set("run_id",o),n=["run_id"],i="%{run_id}"}if(r==="gitlab")t.set("ci_pipeline_id",B.CI_PIPELINE_ID??""),t.set("ci_job_id",B.CI_JOB_ID??""),t.set("ci_job_name",B.CI_JOB_NAME??""),t.set("ci_project",B.CI_PROJECT_PATH_SLUG??""),t.set("ci_runner_id",B.CI_RUNNER_ID??""),t.set("ci_runner_desc",B.CI_RUNNER_DESCRIPTION??""),t.set("ci_build_url",B.CI_JOB_URL??""),t.set("vc_branch",B.CI_COMMIT_BRANCH??B.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME??""),t.set("vc_commit",B.CI_COMMIT_SHORT_SHA??""),t.set("vc_tag",B.CI_COMMIT_TAG??""),n=["ci_pipeline_id"],i="Pipeline %{ci_pipeline_id} - %{vc_branch} - %{vc_commit}";else if(r==="github")t.set("ci_run_id",B.GITHUB_RUN_ID??""),t.set("ci_job",B.GITHUB_JOB??""),t.set("ci_retry",B.GITHUB_RUN_ATTEMPT??""),t.set("ci_repository",B.GITHUB_REPOSITORY??""),t.set("ci_runner",B.RUNNER_NAME??""),t.set("ci_build_url",`${B.GITHUB_SERVER_URL}/${B.GITHUB_REPOSITORY}/actions/runs/${B.GITHUB_RUN_ID}`),t.set("ci_workflow_name",B.GITHUB_WORKFLOW??""),t.set("vc_ref",B.GITHUB_REF_NAME??""),t.set("vc_commit",B.GITHUB_SHA??""),n=["ci_repository","ci_run_id"],i="%{ci_workflow_name} - %{vc_ref} - %{vc_commit}";else if(r==="azure")t.set("ci_build",B.BUILD_BUILDID??""),t.set("ci_project",B.SYSTEM_TEAMPROJECT??""),t.set("ci_repository",B.BUILD_REPOSITORY_NAME??""),t.set("ci_agent_id",B.AGENT_ID??""),t.set("ci_pipeline",B.BUILD_DEFINITIONNAME??""),t.set("ci_build_url",`${B.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI}${B.SYSTEM_TEAMPROJECT}/_build/results?buildId=${B.BUILD_BUILDID}&_a=summary`),t.set("vc_ref",B.BUILD_SOURCEBRANCHNAME??""),t.set("vc_commit",B.BUILD_SOURCEVERSION??""),n=["ci_build"],i="%{ci_pipeline} - %{ci_build} - %{vc_ref} - %{vc_commit}";else if(r==="circle")t.set("ci_workflow_id",B.CIRCLE_WORKFLOW_ID??""),t.set("ci_build",B.CIRCLE_BUILD_NUM??""),t.set("ci_job",B.CIRCLE_JOB??""),t.set("ci_job_id",B.CIRCLE_WORKFLOW_JOB_ID??""),t.set("ci_repository",B.CIRCLE_PROJECT_REPONAME??""),t.set("ci_runner_id",B.CIRCLE_NODE_INDEX??""),t.set("ci_build_url",B.CIRCLE_BUILD_URL??""),t.set("vc_branch",B.CIRCLE_BRANCH??""),t.set("vc_commit",(B.CIRCLE_SHA1??"").slice(8)),t.set("vc_tag",B.CIRCLE_TAG??""),n=["ci_workflow_id"],i="%{ci_job} - %{ci_workflow_id} - %{vc_branch} - %{vc_commit}";else if(r==="jenkins")t.set("ci_build",B.BUILD_NUMBER??""),t.set("ci_job",B.JOB_NAME??""),t.set("ci_repository",B.GIT_URL&&URL.canParse(B.GIT_URL)?new URL(B.GIT_URL).pathname.slice(1):""),t.set("ci_runner_id",B.EXECUTOR_NUMBER??""),t.set("ci_build_url",B.BUILD_URL??""),t.set("vc_branch",B.GIT_BRANCH??""),t.set("vc_commit",(B.GIT_COMMIT??"").slice(8)),n=["ci_build"],i="%{ci_repository} - %{ci_build} - %{vc_branch} - %{vc_commit}";else if(r==="teamcity")t.set("ci_project",B.TEAMCITY_PROJECT_NAME??""),t.set("ci_build",B.BUILD_NUMBER??""),t.set("ci_build_url",B.BUILD_URL??""),t.set("vc_branch",B.TEAMCITY_BUILD_BRANCH??""),t.set("vc_commit",(B.BUILD_VCS_NUMBER??"").slice(8)),n=["ci_build"],i="%{ci_project} - %{ci_build} - %{vc_branch} - %{vc_commit}";else if(r==="bamboo"){let o=function(u){return B[`bamboo.${u}`]??B[`bamboo_${u}`]??""};var a=o;s(o,"bambooVar"),t.set("ci_build",o("buildResultKey")),t.set("ci_job_key",o("jobKey")),t.set("ci_agent_id",o("agentId")),t.set("ci_build_url",o("resultsUrl")),t.set("vc_branch",o("bamboo.planRepository.branch")),t.set("vc_commit",o("bamboo.planRepository.revisionShort")),n=["ci_build"],i="%{ci_build} - %{vc_branch} - %{vc_commit}"}else r==="drone"?(t.set("ci_build_id",B.DRONE_BUILD_NUMBER??""),t.set("ci_stage",B.DRONE_STAGE_NAME??""),t.set("ci_repository",B.DRONE_REPO??""),t.set("ci_build_url",B.DRONE_BUILD_LINK??""),t.set("vc_branch",B.DRONE_BRANCH??""),t.set("vc_commit",(B.DRONE_COMMIT_SHA??"").slice(8)),t.set("vc_tag",B.TAG??""),n=["ci_build_id"],i="%{ci_repository} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="buddy"?(t.set("ci_run_id",B.BUDDY_RUN_ID??""),t.set("ci_pipeline",B.BUDDY_PIPELINE_NAME??""),t.set("ci_repository",B.BUDDY_REPO_SLUG??""),t.set("ci_build_url",B.BUDDY_RUN_URL??""),t.set("vc_branch",B.BUDDY_RUN_BRANCH??""),t.set("vc_commit",(B.BUDDY_RUN_COMMIT??"").slice(8)),t.set("vc_tag",B.BUDDY_RUN_TAG??""),n=["ci_run_id"],i="%{ci_repository} - %{ci_run_id} - %{vc_branch} - %{vc_commit}"):r==="bitbucket"?(t.set("ci_build_id",B.BITBUCKET_BUILD_NUMBER??""),t.set("ci_project",B.BITBUCKET_PROJECT_KEY??""),t.set("ci_repository",B.BITBUCKET_REPO_FULL_NAME??""),t.set("ci_build_url",`${B.BITBUCKET_GIT_HTTP_ORIGIN}/pipelines/results/${B.BITBUCKET_BUILD_NUMBER}`.replace("http://","https://")),t.set("vc_branch",B.BITBUCKET_BRANCH??""),t.set("vc_commit",(B.BITBUCKET_COMMIT??"").slice(8)),t.set("vc_tag",B.BITBUCKET_TAG??""),n=["ci_build_id"],i="%{ci_project} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="gocd"?(t.set("ci_pipeline",B.GO_PIPELINE_NAME??""),t.set("ci_pipeline_label",B.GO_PIPELINE_LABEL??""),t.set("ci_go_env",B.GO_ENVIRONMENT_NAME??""),t.set("ci_stage",B.GO_STAGE_NAME??""),t.set("ci_stage_id",B.STAGE_COUNTER??""),t.set("ci_build_url",`${B.GO_SERVER_URL}/go/pipelines/${B.GO_PIPELINE_NAME}/${B.GO_PIPELINE_COUNTER}/${B.GO_STAGE_NAME}/${B.GO_STAGE_COUNTER}`),t.set("vc_commit",(B.GO_REVISION??"").slice(8)),n=["ci_pipeline_label"],i="%{ci_pipeline_label} - %{vc_commit}"):r==="appveyor"?(t.set("ci_project",B.APPVEYOR_PROJECT_SLUG??""),t.set("ci_build_id",B.APPVEYOR_BUILD_ID??""),t.set("ci_job",B.APPVEYOR_JOB_NAME??""),t.set("ci_job_id",B.APPVEYOR_JOB_ID??""),t.set("ci_repository",B.APPVEYOR_REPO_NAME??""),t.set("ci_build_url",`${B.APPVEYOR_URL}/project/${B.APPVEYOR_ACCOUNT_NAME}/${B.APPVEYOR_PROJECT_SLUG}/builds/${B.APPVEYOR_BUILD_ID}"`),t.set("vc_branch",B.APPVEYOR_REPO_BRANCH??""),t.set("vc_commit",(B.APPVEYOR_REPO_COMMIT??"").slice(8)),t.set("vc_tag",B.APPVEYOR_REPO_TAG_NAME??""),n=["ci_build_id"],i="%{ci_project} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="aws_codebuild"?(t.set("ci_build_id",B.CODEBUILD_BUILD_ID??""),t.set("ci_repository",B.CODEBUILD_SOURCE_REPO_URL??""),t.set("vc_branch",B.CODEBUILD_SOURCE_VERSION??""),t.set("vc_commit",(B.CODEBUILD_RESOLVED_SOURCE_VERSION??"").slice(8)),n=["ci_build_id"],i="%{ci_repository} - %{vc_branch} - %{vc_commit}"):r==="buildkite"?(t.set("ci_pipeline",B.BUILDKITE_PIPELINE_NAME??""),t.set("ci_build_id",B.BUILDKITE_BUILD_ID??""),t.set("ci_repository",B.BUILDKITE_REPO??""),t.set("ci_build_url",B.BUILDKITE_BUILD_URL??""),t.set("vc_branch",B.BUILDKITE_BRANCH??""),t.set("vc_commit",(B.BUILDKITE_COMMIT??"").slice(8)),t.set("vc_tag",B.BUILDKITE_TAG??""),n=["ci_pipeline","ci_build_id"],i="%{ci_pipeline} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="codeship"?(t.set("ci_build_id",B.CI_BUILD_ID??""),t.set("ci_repository",B.CI_REPO_NAME??""),t.set("ci_build_url",`https://app.codeship.com/projects/${B.CI_PROJECT_ID}/builds/${B.CI_BUILD_ID}`),t.set("vc_branch",B.CI_BRANCH??""),t.set("vc_commit",(B.CI_COMMIT_ID??"").slice(8)),n=["ci_build_id"],i="%{ci_repository} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="codefresh"?(t.set("ci_build_id",B.CF_BUILD_ID??""),t.set("ci_pipeline",B.CF_PIPELINE_NAME??""),t.set("ci_repository",B.CF_REPO_NAME??""),t.set("ci_build_url",B.CF_BUILD_URL??""),t.set("vc_branch",B.CF_BRANCH??""),t.set("vc_commit",(B.CF_REVISION??"").slice(8)),n=["ci_build_id"],i="%{ci_build_id} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="cloudbuild"?(t.set("ci_project_id",B.PROJECT_ID??""),t.set("ci_build_id",B.BUILD_ID??""),t.set("ci_repository",B.REPO_FULL_NAME??""),t.set("ci_build_url",`https://console.cloud.google.com/cloud-build/builds/${B.BUILD_ID}?project=${B.PROJECT_ID}`),t.set("vc_branch",B.BRANCH_NAME??""),t.set("vc_commit",(B.REVISION_ID??"").slice(8)),t.set("vc_tag",B.TAG_NAME??""),n=["ci_build_id"],i="%{ci_project_id} - %{ci_build_id} - %{vc_branch} - %{vc_commit}"):r==="semaphore"?(t.set("ci_pipeline_id",B.SEMAPHORE_PIPELINE_ID??""),t.set("ci_project",B.SEMAPHORE_PROJECT_NAME??""),t.set("ci_job",B.SEMAPHORE_JOB_NAME??""),t.set("ci_job_id",B.SEMAPHORE_JOB_ID??""),t.set("ci_repository",B.SEMAPHORE_GIT_REPO_SLUG??""),t.set("ci_build_url",`${B.SEMAPHORE_ORGANIZATION_URL}/jobs/${B.SEMAPHORE_JOB_ID}`),t.set("vc_branch",B.SEMAPHORE_GIT_BRANCH??""),t.set("vc_commit",(B.SEMAPHORE_GIT_SHA??"").slice(8)),t.set("vc_tag",B.SEMAPHORE_GIT_TAG_NAME??""),n=["ci_pipeline_id"],i="%{ci_project} - %{ci_pipeline_id} - %{vc_branch} - %{vc_commit}"):r==="travis"&&(t.set("ci_build_id",B.TRAVIS_BUILD_ID??""),t.set("ci_job",B.TRAVIS_JOB_NAME??""),t.set("ci_job_nr",B.TRAVIS_JOB_NUMBER??""),t.set("ci_repository",B.TRAVIS_REPO_SLUG??""),t.set("ci_build_url",B.TRAVIS_JOB_WEB_URL??""),t.set("vc_branch",B.TRAVIS_BRANCH??""),t.set("vc_commit",(B.TRAVIS_COMMIT??"").slice(8)),t.set("vc_tag",B.TRAVIS_TAG??""),n=["ci_build_id"],i="%{ci_repository} - %{ci_build_id} - %{vc_branch} - %{vc_commit}");return t.set("env_arch",Wb.default.arch()),t.set("env_host",Wb.default.hostname()),t.set("env_platform",Wb.default.platform()),t.set("env_os_info",a$()),{envName:r,values:t,defaultRunFields:n,runTitlePattern:i}}s(Hb,"populateEnvironment");function Yfe(){return B.GITLAB_CI?"gitlab":B.CI&&B.GITHUB_ACTIONS?"github":B.TF_BUILD?"azure":B.CIRCLECI?"circle":B.JENKINS_URL||B.BUILD_ID&&B.BUILD_NUMBER?"jenkins":B.TEAMCITY_VERSION?"teamcity":B.bamboo_agentId||B.bamboo_buildNumber||B["bamboo.agentId"]||B["bamboo.buildNumber"]?"bamboo":B.DRONE?"drone":B.BUDDY?"buddy":B.BITBUCKET_BUILD_NUMBER?"bitbucket":B.APPVEYOR?"appveyor":B.CODEBUILD_BUILD_ID?"aws_codebuild":B.BUILDKITE?"buildkite":B.CI_NAME==="codeship"?"codeship":B.SEMAPHORE?"semaphore":B.CF_BUILD_ID?"codefresh":B.TRAVIS?"travis":B.GO_SERVER_URL?"gocd":B.LOCATION&&B.PROJECT_NUMBER&&B.BUILD_ID?"cloudbuild":"none"}s(Yfe,"detectEnvironment");var xse=ge(Z1()),wse=require("fs"),By=ge(require("path"));var Sv=process.env.NODE_ENV||"development";function Y1(){return Sv==="development"}s(Y1,"isDevEnv");function YU(){return Sv==="production"}s(YU,"isProdEnv");function Ir(e){return e!==void 0&&e!=null}s(Ir,"isDefined");function J1(e){return typeof e!="object"||e===null?!1:Object.keys(e).length>0}s(J1,"isNonEmptyObject");var Ia=new Set(["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","prototype","toLocaleString","toString","valueOf"]);function JU(e,t){if(typeof e!="object"||e===null)return;let r=new Set([e]);n(e);function n(i){let a=Array.isArray(i),o=a?void 0:Object.keys(i),u=a?i.length:o.length;for(let l=0;l<u;l++){let c=o?o[l]:l,d=i[c],p=typeof d;typeof c=="symbol"||p==="function"||(t(d,c,i),p==="object"&&d!==null&&!r.has(d)&&(r.add(d),n(d)))}}s(n,"visit")}s(JU,"visitObjectDfs");function xv(e){return iye(e)||oye(e)}s(xv,"isLikelyJson");var rye=/^\s*\{/,nye=/\}\s*$/;function iye(e){return!!e&&rye.test(e)&&nye.test(e)}s(iye,"isLikelyJsonObject");var sye=/^\s*\[/,aye=/\]\s*$/;function oye(e){return!!e&&sye.test(e)&&aye.test(e)}s(oye,"isLikelyJsonArray");function XU(){Object.seal(Object.prototype),[Object,Function,Function.prototype,Array,Array.prototype,String,String.prototype,Number,Number.prototype,Boolean,Boolean.prototype].forEach(Object.freeze)}s(XU,"enablePrototypeMitigations");function X1(e){return Object.freeze(e),Object.freeze(e.prototype),e}s(X1,"freezeConstructor");var ft=class extends Error{static{s(this,"ApiError")}code;status=500;expected;meta;privateMeta;constructor(t,r=void 0,n,i,a){super(r),this.status=n?.status||uye(t),this.code=t,this.expected=n?.expected??!1,n?.stack&&(this.stack=n?.stack+`
|
|
315
315
|
(end of wrapped stack)
|
|
316
316
|
`+this.stack),this.meta=i,this.privateMeta=a}toString(){return`${this.code}(${this.status}): ${this.message}`}};function dd(e,t=void 0){return new ft("API_DATA_TOO_LARGE",t,{status:413},{maxSize:e})}s(dd,"createDataTooLargeError");function wv(e){return e instanceof Error?e:new Error(`${e||"Unknown error: "+typeof e}`)}s(wv,"wrapError");function Yl(e){return e?.message??e+""}s(Yl,"getErrorMessage");function Xn(e){return Array.from(QU(e)).map(Yl).join(" ")}s(Xn,"getErrorChainMessage");function*QU(e){yield e;let t=e;t?.cause&&(yield*QU(t.cause))}s(QU,"getErrorChain");function uye(e){return e==="AUTH_INVALID_USER_OR_PASSWORD"||e==="AUTH_INACTIVE_USER"||e==="AUTH_UNCONFIRMED_USER"||e==="AUTH_UNSUPPORTED_AUTH_TYPE"||e==="AUTH_TOKEN_EXPIRED"||e==="AUTH_REQUIRES_MFA"||e==="AUTH_INVALID_MFA_CODE"||e==="API_ACCESS_DENIED"?403:e==="API_INVALID_REQUEST"||e==="API_INVALID_INPUT"||e==="API_INVALID_INPUT_DATA"||e==="API_INPUT_DATA_CONFLICT"||e==="API_STORAGE_QUOTA_EXCEEDED"?400:e==="API_DATA_NOT_FOUND"||e==="API_ROUTE_NOT_FOUND"?404:e==="API_TOO_MANY_REQUESTS"?429:500}s(uye,"mapDefaultStatusFromCode");var dc=ge(at());var Lr=ge(at());var St=ge(at());var yK=ge(at());var Sje=["s","n","a","h","p"],Z_=class e{constructor(t,r,n,i,a){this.valueEscapeFunc=n;this.valueUnescapeFunc=i;this.extractorHook=a;this.valueEscapeFunc??=d=>d,this.valueUnescapeFunc??=d=>d;let o=/(\(\(\s*(([a-z0-9_-]+\*?)(:([a-z]\*?))?)\s*\)\))/gmi,u,l=0;for(;(u=o.exec(t))!=null;){if(u.length<3)continue;let d=u.index,p=u[5]?.replace("*","");if(this.fields.push({name:u[3].replace("*",""),type:p&&Sje.includes(p)?p:r??"a",optional:u[5]?.endsWith("*")??u[3].endsWith("*"),chunk:t.slice(l,d)}),l=d+u[1].length,l>e.MaxLength||this.fields.length>e.MaxFields)break}this.lastChunk=t.slice(l);let c="^";for(let d of this.fields){let p=this.extractorHook?.(d);c+=uE(p?.[0]??d.chunk);let h="",g="";p?.[1]&&(h="(?:"+p[1],g=")"),c+=h;let m=d.optional?"*":"+";if(d.type==="s")c+=`([^/?&=]${m}?)`;else if(d.type==="n")c+=`([0-9]${m}?)`;else if(d.type==="a")c+=`([A-Za-z0-9-_.]${m}?)`;else if(d.type==="h")c+=`([^/]${m}?)`;else if(d.type==="p"){let y="https?";d.optional&&(y=`(?:${y})?`),c+=`(${y}?)`}c+=g,d.optional&&(c+="?")}c+=uE(this.lastChunk)+"$",this.extractor=new RegExp(c)}static{s(this,"StringTemplate")}static MaxLength=1e3;static MaxParseLength=2048;static MaxFields=20;fields=[];lastChunk="";extractor;render(t){let r="";for(let n of this.fields){let i=this.valueEscapeFunc(`${t.get(n.name)??""}`,n);r+=n.chunk,r+=i}return r+this.lastChunk}extract(t){if(t.length>e.MaxParseLength)return;this.extractor.lastIndex=0;let r=this.extractor.exec(t);if(!r)return;let n=new Map;for(let i=0;i<this.fields.length;i++){let a=this.fields[i],o=this.valueUnescapeFunc(r[i+1]??"",a);n.set(a.name,o),a.type==="n"&&n.set(a.name,Number.parseInt(o))}return n}validateField(t,r){let n=this.fields.find(i=>i.name===t);return!n||r===void 0||r===null?!1:n.type==="s"?!0:n.type==="n"?Vb(r.toString()):n.type==="a"?/^[a-z0-9-_.]*$/i.test(r.toString()):n.type==="h"?(0,yK.isFQDN)(r.toString().split(":")[0],{require_tld:!1,allow_underscores:!0}):n.type==="p"?r==="http"||r==="https":!1}};var Y_=class e{static{s(this,"URLTemplate")}protocol;host;pathParts;queryParams;fragment;fields;constructor(t,r){let n=new URL(t),i=encodeURIComponent,a=s(l=>decodeURIComponent(l.replace(/\+/g,"%20")),"dec"),o=s(l=>l.split("/").map(encodeURIComponent).join("/"),"pathEnc");this.protocol=r?.requireHttpOrHttpsProtocol?jd("((prot:x)):","p",i,a):jd(n.protocol,"a",i,a),this.host=jd(decodeURIComponent(n.host),"h",i,a);let u="s";this.pathParts=jd(n.pathname,u,o,a,l=>l.optional&&l.chunk.endsWith("/")?[l.chunk.slice(0,l.chunk.length-1),"/"]:void 0),this.queryParams=Array.from(n.searchParams).map(([l,c])=>[l.replace("*",""),jd(c,u,i,a),l.endsWith("*")]),this.fragment=n.hash?jd(n.hash.slice(1),u,i,a):void 0,this.fields=[],Mg(this.fields,this.protocol,!1),Mg(this.fields,this.host,!1),Mg(this.fields,this.pathParts,!1);for(let l of this.queryParams)Mg(this.fields,l[1],l[2]);Mg(this.fields,this.fragment,!1)}static create(t,r){try{return new e(t,r)}catch{return}}static matches(t,r,n){let i=this.create(t,n);return i?!!i.extract(r):!1}render(t){let r=`${Ng(this.protocol,t)}//${Ng(this.host,t)}`,n=`${Ng(this.pathParts,t)}`;if(r+=n,this.queryParams.length>0){r+="?";let i=[];for(let[a,o,u]of this.queryParams){let l=Ng(o,t);!l&&u||i.push(`${a.replace("*","")}=${l}`)}r+=i.join("&")}return this.fragment&&(r+="#"+Ng(this.fragment,t)),r}extract(t){try{let r=new URL(t),n=new Map;if(!Dg(n,r.protocol,this.protocol,!1)||!Dg(n,r.host,this.host,!1)||!Dg(n,r.pathname,this.pathParts,!1))return;for(let i of this.queryParams){let a=Array.from(r.searchParams).find(o=>o[0]===i[0]);if(a){if(!Dg(n,a[1],i[1],i[2]))return}else if(!i[2])return}return this.fragment&&!Dg(n,r.hash?r.hash.slice(1):r.hash,this.fragment,!1)?void 0:n}catch{return}}};function jd(e,t,r,n,i){let a=new Z_(e,t,r,n,i);return a.fields.length>0?a:e}s(jd,"createStringOrTemplate");function Mg(e,t,r){if(typeof t=="object")for(let n of t.fields)e.push({name:n.name,type:n.type,optional:n.optional||r})}s(Mg,"collectField");function Ng(e,t){return typeof e=="object"?e.render(t):e}s(Ng,"renderTemplate");function Dg(e,t,r,n){if(typeof r!="object")return r.trim()===t.trim();let i=r.extract(t);if(!n&&!i)throw new Error;return i&&i.forEach((a,o)=>e.set(o,a)),i!==void 0}s(Dg,"extractField");function Zs(e,t){let r=t?.context??[];for(let n=0;n<e.length;n++)r[`constraint${n+1}`]=e[n];return{...t,context:r}}s(Zs,"createConstraintContextValOpts");function J_(e,t){return St.MinLength(e,Zs([e],t))}s(J_,"MinLength");function bK(e,t){return St.ArrayMaxSize(e,Zs([],t))}s(bK,"ArrayMaxSize");function Se(e,t){return St.MaxLength(e,Zs([e],t))}s(Se,"MaxLength");function X_(e,t){return St.Min(e,Zs([e],t))}s(X_,"Min");function vK(e,t){return St.Max(e,Zs([e],t))}s(vK,"Max");function Vu(e,t){return St.Matches(e,Zs([e],t))}s(Vu,"Matches");var hn=s((e,t,...r)=>St.isURL(e,{disallow_auth:!0,...t},...r),"isURL"),Q_=s((e,...t)=>St.IsUrl({disallow_auth:!0,...e},...t),"IsUrl"),Fg=s((e,t,...r)=>typeof e=="string"&&e.length===24&&e[23]==="Z"&&St.isISO8601(e,{strict:!0,strictSeparator:!0,...t},...r),"isISO8601"),Qr=s((e,t)=>{let r=[e];return t=Zs(r,t),St.ValidateBy({name:"isIso8601",constraints:r,validator:{validate:s((n,i)=>Fg(n,i?.constraints[0]),"validate"),defaultMessage:St.buildMessage(n=>n+"$property must be a valid ISO 8601 date-time string in UTC zone",t)}},t)},"IsISO8601");var _K=s((e,t,...r)=>typeof e=="string"&&e.length===10&&!e.includes("T")&&St.isISO8601(e,{strict:!0,strictSeparator:!0,...t},...r),"isISO8601Date");function xe(e,t){return new CM(e??"schema",!0,t)}s(xe,"schema");var Ma=class extends Error{static{s(this,"SchemaError")}constructor(t){super(t)}},Ze=class extends Ma{constructor(r,n){super(`${r} at ${n.join(".")}`);this.path=n}static{s(this,"SchemaValidationError")}},TK=Symbol("JsonSchema"),EM=Symbol("JsonPublishedSchema");function SK(e,t){let r=e;return r[TK]=!0,r[EM]=t,e}s(SK,"createJsonSchema");var CM=class e{constructor(t,r,n){this.name=t;this.isPublished=r;if(n){this.allowExtra=n.allowExtra,this.validator=n.validator,this.allowOverride=!0;for(let[i,a]of n.specs.entries())this.specs.set(i,a)}this.validator=this.createObjectValidator(this),this.jsonSchema=SK({type:"object",title:r?t:void 0,properties:{}},r)}static{s(this,"Schema")}specs=new Map;validator;allowExtra=!1;allowOptNull=!1;allowOverride=!1;contextProp;jsonSchema;object(t,r){let n,i;typeof t=="function"?(n="",i=t):(n=t,i=r);let a=new e(n,!1);return i(a),this.updateJsonSchema(n,!0,a.jsonSchema),this.setupValidationFunc(n,this.createObjectValidator(a)),this.contextProp=n,this}record(t,r,n,i){let a,o,u,l;typeof t=="string"?(a=t,typeof r=="function"&&typeof n!="function"?(o=void 0,u=r):(o=r,u=n,l=i)):(a="",typeof t=="function"&&typeof r!="function"?(o=void 0,u=t):(o=t,u=r,l=n));let c=new e(a+"_record",!1),d;return l&&(d=new e(a+"_record",!1),l(d).allowExtraProps()),this.setupValidationFunc(a,this.createRecordValidator(o,c,d)),u(c),this.updateJsonSchema(a,!0,{type:"object",additionalProperties:c.jsonSchema,properties:d?.jsonSchema.type==="object"?d.jsonSchema.properties:void 0}),this}array(t,r,n){let i="",a,o,u;return typeof t=="function"||Array.isArray(t)?(i="",a=t,u=r):typeof r=="function"||Array.isArray(r)?(i=t,a=r,u=n):typeof t=="object"&&!Array.isArray(t)?(i="",o=t,u=r):typeof r=="object"&&!Array.isArray(r)&&(i=t,o=r,u=n),this.setupArray(i,a,u,o,!1),this.contextProp=i,this}arrayOrOne(t,r,n){let i="",a,o,u;return typeof t=="function"?(i="",a=t,u=r):typeof r=="function"?(i=t,a=r,u=n):typeof t=="object"?(i="",o=t,u=r):typeof r=="object"&&(i=t,o=r,u=n),this.setupArrayOrOne(i,a,u,o,!1),this.contextProp=i,this}string(t,r,n){let i,a,o,u;return typeof t=="string"?(i=t,l(r),typeof n=="object"&&(a=n)):(i="",l(t),typeof r=="object"&&(a=r)),this.setupValidationFunc(i,this.createStringValidator(a,u,o)),this.updateJsonSchema(i,!0,{type:"string",format:a?.formatHint,enum:a?.values,minLength:a?.minLen,maxLength:a?.maxLen}),this.contextProp=i,this;function l(c){c instanceof RegExp&&(u=c),typeof c=="function"&&(o=c),typeof c=="object"&&(a=c)}s(l,"mapArg")}number(t,r){let n,i,a;return typeof t=="string"?(n=t,o(r)):(n="",o(t)),this.setupValidationFunc(n,this.createNumberValidator(i,a)),this.updateJsonSchema(n,!0,{type:i?.integer?"integer":"number",minimum:i?.min??(i?.nonNegative||i?.positive?0:void 0),maximum:i?.max??(i?.negative?0:void 0)}),this.contextProp=n,this;function o(u){typeof u=="function"&&(a=u),typeof u=="object"&&(i=u)}s(o,"mapArg")}integer(t,r){let n,i,a;return typeof t=="string"?(n=t,o(r)):(n="",o(t)),this.setupValidationFunc(n,this.createNumberValidator({...i,integer:!0},a)),this.updateJsonSchema(n,!0,{type:"integer",minimum:i?.min??(i?.nonNegative?0:i?.positive?1:void 0),maximum:i?.max??(i?.negative?0:void 0)}),this.contextProp=n,this;function o(u){typeof u=="function"&&(a=u),typeof u=="object"&&(i=u)}s(o,"mapArg")}bool(t){let r=typeof t=="string"?t:"";return this.setupValidationFunc(r,this.createBooleanValidator(void 0)),this.updateJsonSchema(r,!0,{type:"boolean"}),this.contextProp=r,this}basic(t){let r=typeof t=="string"?t:"";return this.setupValidationFunc(r,this.createBasicValueValidator()),this.updateJsonSchema(r,!0,{nullable:!0,oneOf:[{type:"string"},{type:"number"},{type:"boolean"}]}),this.contextProp=r,this}is(t,r){let n,i;typeof t=="string"?(n=[t],i=r):Array.isArray(t)?(n=t,i=r):(n=[""],i=t);for(let a of n)this.setupValidationFunc(a,i.validator),this.updateJsonSchema(a,!0,i.jsonSchema);return n.length===1&&(this.contextProp=n[0]),this}objectOpt(t,r){let n,i;typeof t=="function"?(n="",i=t):(n=t,i=r);let a=new e(n,!1);return i(a),this.setupValidationFunc(n,this.createOptValidator(this.createObjectValidator(a),()=>this.allowOptNull)),this.updateJsonSchema(n,!1,a.jsonSchema),this.contextProp=n,this}recordOpt(t,r,n,i){let a,o,u,l;typeof t=="string"?(a=t,typeof r=="function"&&typeof n!="function"?(o=void 0,u=r):(o=r,u=n,l=i)):(a="",typeof t=="function"&&typeof r!="function"?(o=void 0,u=t):(o=t,u=r,l=n));let c=new e(a+"_record",!1),d;return l&&(d=new e(a+"_record",!1),l(d).allowExtraProps()),this.setupValidationFunc(a,this.createOptValidator(this.createRecordValidator(o,c,d),()=>this.allowOptNull)),this.updateJsonSchema(a,!1,{type:"object",additionalProperties:c.jsonSchema,properties:d?.jsonSchema.type==="object"?d.jsonSchema.properties:void 0}),u(c),this}arrayOpt(t,r,n){let i="",a,o,u;return typeof t=="function"||Array.isArray(t)?(i="",a=t,u=r):typeof r=="function"||Array.isArray(r)?(i=t,a=r,u=n):typeof t=="object"&&!Array.isArray(t)?(i="",o=t,u=r):typeof r=="object"&&!Array.isArray(r)&&(i=t,o=r,u=n),this.setupArray(i,a,u,o,!0),this.contextProp=i,this}arrayOrOneOpt(t,r,n){let i="",a,o,u;return typeof t=="function"?(i="",a=t,u=r):typeof r=="function"?(i=t,a=r,u=n):typeof t=="object"?(i="",o=t,u=r):typeof r=="object"&&(i=t,o=r,u=n),this.setupArrayOrOne(i,a,u,o,!0),this.contextProp=i,this}stringOpt(t,r,n){let i,a,o,u;return typeof t=="string"?(i=t,l(r),typeof n=="object"&&(a=n)):(i="",l(t),typeof r=="object"&&(a=r)),this.setupValidationFunc(i,this.createOptValidator(this.createStringValidator(a,u,o),()=>this.allowOptNull)),this.updateJsonSchema(i,!1,{type:"string",format:a?.formatHint,enum:a?.values}),this.contextProp=i,this;function l(c){c instanceof RegExp&&(u=c),typeof c=="function"&&(o=c),typeof c=="object"&&(a=c)}s(l,"mapArg")}numberOpt(t,r){let n,i,a;return typeof t=="string"?(n=t,o(r)):(n="",o(t)),this.setupValidationFunc(n,this.createOptValidator(this.createNumberValidator(i,a),()=>this.allowOptNull)),this.updateJsonSchema(n,!1,{type:i?.integer?"integer":"number",minimum:i?.min??(i?.nonNegative||i?.positive?0:void 0),maximum:i?.max??(i?.negative?0:void 0)}),this.contextProp=n,this;function o(u){typeof u=="function"&&(a=u),typeof u=="object"&&(i=u)}s(o,"mapArg")}integerOpt(t,r){let n,i,a;return typeof t=="string"?(n=t,o(r)):(n="",o(t)),this.setupValidationFunc(n,this.createOptValidator(this.createNumberValidator({...i,integer:!0},a),()=>this.allowOptNull)),this.updateJsonSchema(n,!1,{type:"integer",minimum:i?.min??(i?.nonNegative?0:i?.positive?1:void 0),maximum:i?.max??(i?.negative?0:void 0)}),this.contextProp=n,this;function o(u){typeof u=="function"&&(a=u),typeof u=="object"&&(i=u)}s(o,"mapArg")}boolOpt(t){let r=typeof t=="string"?t:"";return this.setupValidationFunc(r,this.createOptValidator(this.createBooleanValidator(void 0),()=>this.allowOptNull)),this.updateJsonSchema(r,!1,{type:"boolean"}),this.contextProp=r,this}optIs(t,r){let n,i;typeof t=="string"?(n=[t],i=r):Array.isArray(t)?(n=t,i=r):(n=[""],i=t);for(let a of n)this.setupValidationFunc(a,this.createOptValidator(i.validator,()=>this.allowOptNull)),this.updateJsonSchema(a,!1,i.jsonSchema);return n.length===1&&(this.contextProp=n[0]),this}isTrue(t){let r=typeof t=="string"?t:"";return this.setupValidationFunc(r,this.createBooleanValidator(!0)),this.updateJsonSchema(r,!0,{type:"boolean",enum:[!0]}),this.contextProp=r,this}isFalse(t){let r=typeof t=="string"?t:"";return this.setupValidationFunc(r,this.createBooleanValidator(!1)),this.updateJsonSchema(r,!0,{type:"boolean",enum:[!1]}),this.contextProp=r,this}isNull(t){let r=typeof t=="string"?t:"";return this.setupValidationFunc(r,this.createNullValidator()),this.updateJsonSchema(r,!0,{type:"string",nullable:!0,maxLength:0}),this.contextProp=r,this}isNotDefined(t){let r=typeof t=="string"?t:"";return this.setupValidationFunc(r,this.createUndefinedValidator()),this.updateJsonSchema(r,!1,{not:{required:[r]}}),this.contextProp=r,this}isAny(t){let r=typeof t=="string"?t:"";return this.setupValidationFunc(r,this.createAnyValidator()),this.updateJsonSchema(r,!1,{}),this.contextProp=r,this}allowExtraProps(){return this.allowExtra=!0,this}allowOptAsNull(){return this.allowOptNull=!0,this}oneOf(...t){let r,n;if(typeof t[0]=="string"?(r=t[0],n=t.slice(1)):(r="",n=t),n.length===0)throw new Ma(`Must specify at least one alternative for prop '${r}'`);let i=n.map((a,o)=>{let u=new e(`alt${o}`,!1);return a(u),u});return this.setupValidationFunc(r,this.createAlternativesValidator(i.map(a=>a.validator))),this.updateJsonSchema(r,!0,{oneOf:i.map(a=>a.jsonSchema)}),this.contextProp=r,this}build(){return this.contextProp=void 0,this}setupValidationFunc(t,r){if(t){if(!this.allowOverride&&this.specs.has(t))throw new Ma(`Property '${t}' is already defined`);this.specs.set(t,r)}else{if(this.specs.size>0)throw new Ma("Cannot replace schema root if props have defined previously");this.validator=r}}setupArray(t,r,n,i,a){if(r){let o=Array.isArray(r)?r:[r];if(o.length===0)throw new Ma("Element definitions must contain at least one schema");let u=[];for(let c of o){let d=new e(`${t}_element`,!1);if(c(d),!d.validator)throw new Ma(`Missing root definition in array element schema (at '${t}')`);u.push(d)}let l=this.createArrayValidator(u,n??we());this.setupValidationFunc(t,a?this.createOptValidator(l,()=>this.allowOptNull):l),o.length===1?this.updateJsonSchema(t,!a,{type:"array",items:u[0].jsonSchema,minItems:n?.minLen,maxItems:n?.maxLen}):this.updateJsonSchema(t,!a,{type:"array",items:{oneOf:u.map(c=>c.jsonSchema)},minItems:n?.minLen,maxItems:n?.maxLen})}else if(i){let o=this.createArrayValidator([i],n??we());this.setupValidationFunc(t,a?this.createOptValidator(o,()=>this.allowOptNull):o),this.updateJsonSchema(t,!a,{type:"array",items:i.jsonSchema,minItems:n?.minLen,maxItems:n?.maxLen})}}setupArrayOrOne(t,r,n,i,a){let o;if(r){let u=new e(`${t}_element`,!1);if(r(u),!u.validator)throw new Ma(`Missing root definition in array element schema (at '${t}')`);let l=this.createArrayOrOneValidator(u,n??we());o=u.jsonSchema,this.setupValidationFunc(t,a?this.createOptValidator(l,()=>this.allowOptNull):l)}else if(i){let u=this.createArrayOrOneValidator(i,n??we());this.setupValidationFunc(t,a?this.createOptValidator(u,()=>this.allowOptNull):u),o=i.jsonSchema}else throw new Error("Internal error - No definition or nested schema");this.updateJsonSchema(t,!a,{oneOf:[o,{type:"array",items:o,minItems:n?.minLen,maxItems:n?.maxLen}]})}assertContextProp(){let t=this.contextProp,r=this.specs.get(t);if(!t||!r)throw new Ma("Missing previously defined property for opt()");return{prop:t,spec:r}}doc(t,r){if(this.contextProp&&this.jsonSchema.type==="object"){this.jsonSchema.properties??=we();let n=this.jsonSchema.properties[this.contextProp];n.description=t,n.default=r}else this.contextProp||(this.jsonSchema.description=t,this.jsonSchema.default=r);return this}validate(t,r){return this.validator(t,{depth:0,maxDepth:r?.maxDepth??100,path:[this.name],allowCycles:r?.allowCycles??!1,seen:[new Set]},!1),t}toJsonSchema(t){let r=this.jsonSchema;return JSON.parse(JSON.stringify(this.jsonSchema,(n,i)=>{if(typeof i=="object"&&i[TK]){let a=i;if(i===r)return n?{$ref:"#"}:i;if(i[EM])return{$ref:t+a.title}}return i}))}createObjectValidator(t){return s(function(n,i,a){if(typeof n!="object"||n===null||Array.isArray(n)){if(a)return!1;throw new Ze("Expected object",i.path)}xK(n,i);let o=i.seen.at(-1);o&&o.add(n);for(let[u,l]of t.specs.entries()){let c=n[u];if(o&&c!==null&&typeof c=="object"&&o.has(c)){if(!i.allowCycles)throw new Ze("Cycle detected",[...i.path,u]);continue}i.path.push(u),i.depth++;try{if(i.depth>i.maxDepth)throw new Ze("Maximum object depth reached",i.path);if(!l(c,i,a))return!1}finally{i.path.pop(),i.depth--}}if(!t.allowExtra){for(let u of Object.keys(n))if(!t.specs.get(u)){if(a)return!1;throw new Ze(`Unexpected object property '${u}'`,i.path)}}return!0},"validateObject")}createRecordValidator(t,r,n){let i=t instanceof RegExp?u=>t.test(u):t??(u=>!0),a=new Set(Array.from(n?.specs.keys()??[]).filter(u=>u!=="")),o=n?this.createObjectValidator(n):void 0;return s(function(l,c,d){if(typeof l!="object"||l===null){if(d)return!1;throw new Ze("Expected record object",c.path)}xK(l,c);let p=c.seen.at(-1);if(p&&p.add(l),o?.(l,c,d)===!1)return!1;let h=Object.keys(l);for(let g of h){if(o!==void 0&&a.has(g))continue;if(i&&!i(g)){if(d)return!1;throw new Ze(`Unexpected record property name '${g}' not matching '${i.name||"defPropValidator"}' and does not match known props`,c.path)}let m=l[g];if(p&&m!==null&&typeof m=="object"&&p.has(m)){if(!c.allowCycles)throw new Ze("Cycle detected",[...c.path,g]);continue}c.path.push(g),c.depth++;try{if(c.depth>c.maxDepth)throw new Ze("Maximum object depth reached",c.path);let y=r.validator;if(!y(m,c,d))return!1}finally{c.path.pop(),c.depth--}}return!0},"validateRecord")}createArrayValidator(t,r){return s(function(i,a,o){if(!Array.isArray(i)){if(o)return!1;throw new Ze("Expected array",a.path)}if(r){if(r.len!==void 0&&r.len!==i.length){if(o)return!1;throw new Ze(`Expected array length ${r.len} but actual is ${i.length}`,a.path)}if(r.minLen!==void 0&&r.minLen>i.length){if(o)return!1;throw new Ze(`Expected minimum array length ${r.minLen} but actual is ${i.length}`,a.path)}if(r.maxLen!==void 0&&r.maxLen<i.length){if(o)return!1;throw new Ze(`Expected maximum array length ${r.maxLen} but actual is ${i.length}`,a.path)}}let u=a.seen.at(-1);u&&u.add(i);let l=t.at(-1),c=t.length===1?i.length:Math.max(t.length,i.length);for(let d=0;d<c;d++){let p=i[d];if(u&&p!==null&&typeof p=="object"&&u.has(p)){if(!a.allowCycles)throw new Ze("Cycle detected",[...a.path,d.toString()]);continue}a.path.push(d.toString()),a.depth++;try{if(a.depth>a.maxDepth)throw new Ze("Maximum object depth reached",a.path);let h=(t[d]??l).validator;if(!h(p,a,o))return!1}finally{a.path.pop(),a.depth--}}return!0},"validateArray")}createStringValidator(t,r,n){return s(function(a,o,u){if(typeof a!="string")if(t?.allowToString)a=`${a}`;else{if(u)return!1;throw new Ze("Expected string",o.path)}if(typeof a!="string")return!1;if(t){if(t.len!==void 0&&t.len!==a.length){if(u)return!1;throw new Ze(`Expected string length ${t.len} but actual is ${a.length}`,o.path)}if(t.minLen!==void 0&&t.minLen>a.length){if(u)return!1;throw new Ze(`Expected string min length ${t.minLen} but actual is ${a.length}`,o.path)}if(t.maxLen!==void 0&&t.maxLen<a.length){if(u)return!1;throw new Ze(`Expected string max length ${t.maxLen} but actual is ${a.length}`,o.path)}if(t.values&&!t.values.includes(a)){if(u)return!1;throw new Ze(`String must have one of the allowed values: ${t.values.join("|")}`,o.path)}if(t.value&&t.value!==a){if(u)return!1;throw new Ze(`String must have the following value: '${t.value}'`,o.path)}}if(r&&!r.test(a)){if(u)return!1;throw new Ze(`Value '${zl(a,200)}' does not match required regular expression`,o.path)}if(n){let l=wK(n,a);if(l){if(u)return!1;throw new Ze(`Invalid string: ${l}`,o.path)}}return!0},"validateString")}createNumberValidator(t,r){return s(function(i,a,o){if(typeof i!="number"){if(o)return!1;throw new Ze("Expected number",a.path)}if(t){if(t.integer&&!Number.isSafeInteger(i)){if(o)return!1;throw new Ze(`Expected integer number but actual is ${i}`,a.path)}if(t.positive&&i<=0){if(o)return!1;throw new Ze(`Expected number with positive value but actual is ${i}`,a.path)}if(t.nonNegative&&i<0){if(o)return!1;throw new Ze(`Expected number with non-negative value but actual is ${i}`,a.path)}if(t.min!==void 0&&t.min>i){if(o)return!1;throw new Ze(`Expected number min value ${t.min} but actual is ${i}`,a.path)}if(t.max!==void 0&&t.max<i){if(o)return!1;throw new Ze(`Expected number max value ${t.max} but actual is ${i}`,a.path)}if(t.allowNotFinite!==!0&&!Number.isFinite(i)){if(o)return!1;throw new Ze(`Expected number with finite value but actual is ${i}`,a.path)}if(t.negative&&i>=0){if(o)return!1;throw new Ze(`Expected number with negative value but actual is ${i}`,a.path)}if(t.values&&!t.values.includes(i)){if(o)return!1;throw new Ze(`Number must have one of the allowed values: ${t.values.join("|")}`,a.path)}}if(r){let u=wK(r,i);if(u){if(o)return!1;throw new Ze(`Invalid number: ${u}`,a.path)}}return!0},"validateNumber")}createBooleanValidator(t){return s(function(n,i,a){if(typeof n!="boolean"){if(a)return!1;throw new Ze("Expected boolean",i.path)}let o=t===void 0||n===t;if(!o&&!a)throw new Ze(`Expected boolean value ${t}`,i.path);return o},"validateBool")}createNullValidator(){return s(function(r,n,i){if(r!==null){if(i)return!1;throw new Ze("Expected null",n.path)}return!0},"validateNull")}createUndefinedValidator(){return s(function(r,n,i){if(r!==void 0){if(i)return!1;throw new Ze("Expected undefined",n.path)}return!0},"validateNotDefined")}createBasicValueValidator(){return s(function(r,n,i){let a=typeof r;if(a!=="string"&&a!=="number"&&a!=="boolean"&&r!==null){if(i)return!1;throw new Ze("Expected basic value",n.path)}return!0},"validateBasic")}createAnyValidator(){return s(function(r,n,i){return!0},"validateAny")}createOptValidator(t,r){return s(function(i,a,o){return i===void 0||i===null&&r()?!0:t(i,a,o)},"validateOpt")}createAlternativesValidator(t){return s(function(n,i,a){let o=[];for(let u of t)try{if(i.seen&&i.seen.push(new Set),u(n,i,!0))return!0}finally{i.seen&&i.seen.pop()}if(a)return!1;for(let u of t)try{i.seen&&i.seen.push(new Set),u(n,i,!1)}catch(l){o.push(l.message)}finally{i.seen&&i.seen.pop()}throw new Ze(`Validation failed because no alternatives match: '${o.join(", ")}'`,i.path)},"validateAlternatives")}createArrayOrOneValidator(t,r){let n=this.createArrayValidator([t],r);return s(function(a,o,u){let l=t.validator;if(Array.isArray(a)){if(!n(a,o,u))return!1}else if(!l(a,o,u))return!1;return!0},"validateArrayOrOne")}updateJsonSchema(t,r,n){if(t){let i=this.jsonSchema;if(i.type!=="object")throw new Error("Internal error: wrong json schema base type: "+i.type);i.properties??=we(),i.properties[t]=n,r&&(i.required??=[],i.required.push(t))}else{let i=this.jsonSchema.title;this.jsonSchema=SK(n,!!n[EM]),this.jsonSchema.title??=i}}};function xK(e,t){if(Object.prototype.hasOwnProperty.call(e,"__proto__")||e.prototype!==void 0)throw new Ze("Unexpected forbidden prototype property",t.path)}s(xK,"checkForbiddenProps");function wK(e,t){try{let r=e(t);if(r===!1)throw new Error(`'${e.name||"Value"}' validation failed`);if(Array.isArray(r))throw new Error(r.join(", "));if(typeof r=="string")throw new Error(r)}catch(r){return r.message}}s(wK,"wrapValidator");var Bd=class{static{s(this,"MapList")}map=new Map;get size(){return this.map.size}get(t){return this.map.get(t)}has(t){return this.map.has(t)}set(t,r){this.map.set(t,Array.isArray(r)?r:[r])}delete(t){return this.map.delete(t)}add(t,r){let n=this.map.get(t);n||this.map.set(t,n=[]),n.push(r)}addAll(t,r){let n=this.map.get(t);n||this.map.set(t,n=[]),n.push(...r)}remove(t,r){let n=this.get(t);if(n===void 0)return!1;let i=typeof r=="function",a=r,o=!1;for(let u=n.length-1;u>=0;u--){let l=n[u];(i&&a(l)||!i&&l===r)&&(n.splice(u,1),o=!0)}return n.length===0&&this.delete(t),o}[Symbol.iterator](){return this.map[Symbol.iterator]()}keys(){return Array.from(this.map.keys())}values(){return Array.from(this.map.values())}entries(){return Array.from(this.map.entries())}forEach(t){this.map.forEach(t)}clear(){this.map.clear()}};var Kg=ge(Jd());var SEt=Symbol("_IsoTime"),ai="1970-01-01T00:00:00.000Z",eY;async function mn(e,t){return new Promise(r=>{let n=setTimeout(r,e);t&&typeof n=="object"&&n.unref()})}s(mn,"sleep");function g0(){return eY?.()??new Date().toISOString()}s(g0,"timestampIsoNow");function Qs(){return eY?Kg.DateTime.fromISO(g0(),{zone:"utc"}):Kg.DateTime.utc()}s(Qs,"dateTimeUtcNow");function Zg(e){if(e instanceof Kg.DateTime)return e;if(e!=null)return Kg.DateTime.fromJSDate(new Date(e)).toUTC()}s(Zg,"dateTimeFromUnknown");function lN(e,t,r,n,i){let a=0;return a+=e*604800+t*86400+r*3600+n*60+i,a}s(lN,"getSeconds");var tY=(u=>(u.Seconds="s|sec",u.Minutes="m|min",u.Hours="h|hr",u.Days="d|days",u.Weeks="w|wk|weeks",u.Months="m|months",u.Years="y|years",u))(tY||{}),Gg=tY,gBe=new RegExp(`^${yBe([Gg.Weeks,Gg.Days,Gg.Hours,Gg.Minutes,Gg.Seconds])}(?:\\s*)$`);function rY(e){if(e.includes(".")||e.includes(","))return NaN;let t=e.match(/^(2[0-3]|[01]?[0-9]):([0-5]?[0-9]):([0-5]?[0-9])$/);if(t)return lN(0,0,parseInt(t[1]),parseInt(t[2]),parseInt(t[3]));let r=e.match(/^([0-5]?[0-9]):([0-5]?[0-9])$/);if(r)return lN(0,0,0,parseInt(r[1]),parseInt(r[2]));let n=gBe.exec(e);return n?lN(parseInt(n[1])||0,parseInt(n[2])||0,parseInt(n[3])||0,parseInt(n[4])||0,parseInt(n[5])||0):NaN}s(rY,"parseHumanReadableDurationToSeconds");function yBe(e){return e.map(t=>`((?:\\s*)\\d+\\s*(?:${t}))?`).join("")}s(yBe,"createReadableDurationRegExp");var bBe=new Map([["UTC","Z"],["AFT","+04:30"],["AMST","\u221203:00"],["AMT","\u221204:00"],["ART","\u221203:00"],["BOT","\u221204:00"],["BRST","\u221202:00"],["BRT","\u221203:00"],["CAT","+02:00"],["CLST","\u221203:00"],["CLT","\u221204:00"],["COST","\u221204:00"],["COT","\u221205:00"],["EAT","+03:00"],["ECT","\u221205:00"],["GYT","\u221204:00"],["IRST","+03:30"],["KALT","+02:00"],["KGT","+06:00"],["KRAT","+07:00"],["MYT","+08:00"],["OMST","+06:00"],["PET","\u221205:00"],["PYST","\u221203:00"],["PYT","\u221204:00"],["RKT","+08:00"],["THA","+07:00"],["TJT","+05:00"],["TMT","+05:00"],["TRT","+03:00"],["TST","+08:00"],["UYST","\u221202:00"],["UYT","\u221203:00"],["WAT","+01:00"],["WIB","+07:00"],["WIT","+09:00"],["WITA","+08:00"],["ACDT","+10:30"],["ACST","+09:30"],["ADT","-03:00"],["AEDT","+11:00"],["AEST","+10:00"],["AKDT","-08:00"],["AKST","-09:00"],["AST","-04:00"],["AWST","+08:00"],["BST","+01:00"],["CDT","-05:00"],["CEST","+02:00"],["CET","+01:00"],["CST","-06:00"],["EDT","-04:00"],["EEST","+03:00"],["EET","+02:00"],["EST","-05:00"],["GMT","+00:00"],["HDT","-09:00"],["HKT","+08:00"],["HST","-10:00"],["IDT","+03:00"],["IST","+05:30"],["JST","+09:00"],["KST","+09:00"],["MDT","-06:00"],["MSK","+03:00"],["MST","-07:00"],["NZDT","+13:00"],["NZST","+12:00"],["PDT","-07:00"],["PKT","+05:00"],["PST","-08:00"],["WEST","+01:00"],["WET","+00:00"]]);function nY(e){return bBe.get(e)??""}s(nY,"timeZoneShortToOffset");function b0(){let e,t,r=new Promise((n,i)=>{e=n,t=i});return r.catch(()=>{}),r.resolve=e,r.reject=t,r}s(b0,"deferred");var y0=class{static{s(this,"AsyncMutex")}acquired;get isFree(){return this.acquired===void 0}async acquire(){for(;this.acquired;)await this.acquired;this.acquired=b0()}release(){if(!this.acquired)throw new Error("Trying to release a non-acquired mutex.");this.acquired.resolve(),this.acquired=void 0}async waitForRelease(){this.acquired&&await this.acquired}},TEt=Symbol("timed out");var IEt=Symbol("error caught");var v0=class{constructor(t){this.maxParallel=t;this.maxParallel=Math.max(1,t)}static{s(this,"ActionScheduler")}scheduled=[];running=[];waitingForEmpty=[];abortedError;get isEmpty(){return this.running.length===0&&this.scheduled.length===0}scheduleAndRun(t){let r=this.schedule(t);return this.run(),r}schedule(t){let r=Array.isArray(t),i=ct(t).map(a=>{let o=b0();return this.scheduled.push([a,o]),o});return r?i:i[0]}abort(t){if(!this.isEmpty)for(let r of this.scheduled.splice(0))r[1].reject(t)}async whenEmpty(){if(this.isEmpty)return;let t=b0();return this.waitingForEmpty.push(t),t}run(){for(;this.scheduled.length>0&&this.running.length<this.maxParallel;){let t=this.scheduled.shift();if(t){let[r,n]=t,i=Promise.resolve(r());this.running.push(i),i.catch(a=>{n.reject(wv(a))}).finally(()=>{let a=this.running.indexOf(i);if(a>-1)this.running.splice(a,1);else throw new Error(`Implementation error: action not found in running, got index ${a}`);n.resolve(),this.run()})}}if(this.isEmpty)for(let t of this.waitingForEmpty.splice(0))this.abortedError?t.reject(this.abortedError):t.resolve()}};function ct(e){return e==null?[]:Array.isArray(e)?e:[e]}s(ct,"listify");function Xd(e){let t=new Set(e);return Array.from(t.values())}s(Xd,"distinct");function iY(e){for(let t=e.length-1;t>0;t--)e[t-1]===e[t]&&e.splice(t,1);return e}s(iY,"distinctSortedInPlace");function sY(...e){if(e.length===0)return new Set;let t=new Set;for(let r of e)if(r!=null)for(let n of r)t.add(n);return t}s(sY,"union");function cN(...e){if(e.length===0)return new Set;e=e.filter(n=>n);let t=new Set;for(let n of e[0])e.every(i=>r(n,i))&&t.add(n);function r(n,i){return i?Array.isArray(i)?i.includes(n):i.has(n):!0}return s(r,"hasItem"),t}s(cN,"intersection");function aY(e,t){e=Array.isArray(e)?new Set(e):e,t=Array.isArray(t)?new Set(t):t;for(let r of e.values())if(!t.has(r))return!1;return!0}s(aY,"isSubset");function oY(e,t){!e||typeof e!="object"||Array.isArray(e)||!t||Wl(e).forEach(r=>{let n=r;t(n,e[n],i=>e[n]=i,e)})}s(oY,"forAllProps");function uY(e,t){return vBe(e,t,!1)}s(uY,"segmentBy");function vBe(e,t,r){let n=we();for(let i of e){let a=`${i[t]}`;if(Ia.has(a))continue;let o=n[a];if(o||(o=n[a]=[]),r){let u={...i};delete u[t],o.push(u)}else o.push(i)}return n}s(vBe,"aggregateOrSegmentBy");function Qd(e,t){let r=new Map;for(let n of e){let i=t(n);i!==void 0&&r.set(i,n)}return r}s(Qd,"toLookup");async function ef(e,t,r){let n=t.batchSize;if(n<=0)throw new Error("Batch size must be positive");if(e.length===0)return;if(e.length<=n)return r(e,0);let i=new v0(t.maxConcurrent),a=[];for(let o=0;o<e.length;o+=n){let u=s(()=>r(e.slice(o,o+n),Math.floor(o/n)),"task"),l=i.schedule(u);a.push(l),l.catch(c=>i.abort(wv(c)))}i.run(),await Promise.all(a)}s(ef,"batched");var WEt=xe("ApiReadWriteLimit").integer("read",{positive:!0}).integer("write",{positive:!0}).build(),_0=["eq","not_eq","like","not_like","in","not_in","like_in","not_like_in","gt","lt","lte","gte","range","dtinterval","dinterval","dtintervalMillis","has_any","has_all","has_none","in_subtree"];var Er=s(e=>/^[$a-z][$a-z0-9_.]*$/i.test(e)&&!Ia.has(e),"columnNameValidator"),tf=s(e=>/^[a-z][a-z0-9_]*$/i.test(e)&&!Ia.has(e),"entityNameValidator"),dY=s(e=>/^[a-z][a-z0-9_]*_id$/i.test(e)&&!Ia.has(e),"entityIdNameValidator"),Yg=s(e=>Fg(e),"isoTimeValidator"),lY=s(e=>ar(e)?!0:`'${e}' is not a valid ID`,"idValidator"),cY=xe("ByKeysValue").basic().doc("Any basic JSON value (string, number, boolean, null)"),HEt=xe("FkIds").record(dY,e=>e.integer()).doc("Entity ids for mapped entities, e.g. testcase_id"),_Be=xe("FkIdsNullable").record(dY,e=>e.oneOf(t=>t.integer(),t=>t.isNull())).doc("Entity ids for mapped entities, e.g. testcase_id (also allows null as value)"),Da=xe("ByKeys");Da.record(Er,e=>e.oneOf(t=>t.arrayOrOne(cY),t=>t.object(r=>r.string("op",{values:_0}).doc("The comparison/matching operation to perform on the value: "+_0.join(", ")).arrayOrOne("value",cY).doc("The target value(s) or pattern").isNotDefined("col")),t=>t.object(r=>r.string("op",{values:_0}).doc("The comparison/matching operation to perform on the value: "+_0.join(", ")).isNotDefined("value").string("col",Er).doc("The target column/prop name (instead of fixed value)"))),e=>e.arrayOrOneOpt("and",Da).arrayOrOneOpt("or",Da)).doc("Describes matching/filtering conditions");var dN=xe("MapJoin");dN.arrayOrOneOpt("entities",e=>e.string(tf,{allowToString:!0})).doc("The list of entity names which are part of the mapping (for mapping relationship tables)").stringOpt("entity",tf,{allowToString:!0}).doc("The entity name (for direct mapping via a foreign key)").arrayOrOneOpt("ids",e=>e.is(_Be)).doc("A list of id tuples to filter by").boolOpt("inverse").doc("Inverts the result to retrieve non-mapped entities",!1).optIs("filter",Da).doc("The filter expression applied to the mapping relationship entity").optIs("resultFilter",Da).doc("The filter expression applied to the result entity (if 'result' is set)").boolOpt("countOnly").doc("Only returns a count instead of a list of entities",!1).boolOpt("idOnly").doc("Only retrieves entity ids, omitting all other columns",!1).boolOpt("optional").doc("Indicates that the mapping is optional and may be 'null' in the result",!1).boolOpt("includeDeleted").doc("Includes deleted member entities in the mapping search result",!1).boolOpt("omitLargeValues").doc("Omits 'large' column/prop values (if available)",!1).boolOpt("omit").doc("Omit the mapping result from result entities - For intermediate nested mappings").stringOpt("result",tf,{allowToString:!0}).doc("The entity to use as the result instead of the mapping relationship entity data").boolOpt("resultIncludeMapping").doc("Also includes mapping even if result entity is specified",!1).arrayOrOneOpt("map",dN).doc("Nested mapping starting from one of the member entities of this mapping");var SBe=xe("DataPaginationOptions").integerOpt("offset").doc("The offset the result starts at",0).integerOpt("pageAtId").doc("Selects the page with the given id in the result, given a limit (= page size)").integerOpt("inflate").doc("Adds a number of items before the start offset and after the limit (for pagination use)").integerOpt("limit").doc("The maximum number of result rows"),xBe=xe("DataSortSeqOptions").oneOf(e=>e.string("order",{value:"seq"}).doc("Ordering by a pre-defined value sequence - the partial ordering of the given values in the result is preserved").string("column",Er).doc("The name of the column to order by").array("seq",t=>t.number()),e=>e.string("column",Er).doc("The name of the column to order by").string("order",{values:["asc","desc"]}).doc("Either 'asc'ending or 'desc'ending order for the given column")),wBe=xe("DataDisplayParams").optIs("pagination",SBe).doc("Pagination settings control how much data from a result is fetched").arrayOpt("order",e=>e.is(xBe)).doc("Controls the ordering of the result").boolOpt("includeTotalCount").doc("Includes the total result count if pagination options were given").optIs("filter",Da).doc("Filter/search terms"),zEt=xe("DataReadParams",wBe).arrayOpt("computedColumns",e=>e.string(Er)).doc("List of computed columns to include (by default includes all)").integerOpt("id",lY).doc("Only return the entity with the given id, returns one or none").arrayOpt("ids",e=>e.integer(lY)).doc("Only return the entities with the given ids").arrayOrOneOpt("map",dN).doc("Map expression to expand properties or relationships with other entities").boolOpt("includeDeleted").doc("Includes soft-deleted entities in the result (if applicable)").boolOpt("omitLargeValues").doc("Omits 'large' column/prop values (if available)",!0).boolOpt("omitForbidden").doc("Omits entities which are not allowed to be read rather than return an error",!1).stringOpt("asOf",Yg).doc("Perform a history query given the asOf timestamp (if available)").boolOpt("idOnly").doc("Only returns ids in the result, omitting all other properties").boolOpt("countOnly").doc("Returns only the length of the result list instead of the result list itself").stringOpt("label",{maxLen:100}).build();var GEt=xe("WithId").integer("id").doc("The unique entity id").allowExtraProps();function fN(e){let t=e;return t.ctors?t.ctors.map(r=>r.entityName).sort():Array.isArray(e)?e.map(r=>typeof r!="string"?r.entityName:r).sort():typeof e!="string"?e.entityName:e}s(fN,"resolveEntityNames");var rf=0,TBe=2147483647;function gn(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e<=TBe&&e!==rf}s(gn,"isValidId");function ar(e){return gn(e)&&e>0}s(ar,"isValidPositiveId");function iu(e){let t=Symbol(e+"Attribute");return[function(r){return function(n,i){(n.constructor[t]??=[]).push({prop:i,data:r})}},function(r){return fY(r,t).map(n=>n.prop)},function(r){return fY(r,t).map(n=>[n.prop,n.data])}]}s(iu,"attributeFactory");function fY(e,t){let r=typeof e=="function";return!e||typeof e!="object"&&!r?[]:(r?e:e.constructor)?.[t]??[]}s(fY,"resolveAttributes");var[Te,QEt,e1t]=iu("Anonymize"),[H,t1t]=iu("DontAnonymize"),pN={anonymizeJson:void 0,anonymizeDocument:void 0,anonymizeString:void 0};function de(e,t){return function(r,n){let i=r.constructor;i[kt]??=we();let a=i[kt].docProps=i[kt].docProps||we();a[n]={description:e,omit:!1,...t}}}s(de,"Doc");function Vn(){return function(e,t){let r=e.constructor;r[kt]??=we();let n=r[kt].docProps=r[kt].docProps||we();n[t]={description:"",omit:!0}}}s(Vn,"NoDoc");var IBe=ge(at());var lc="cf__",pY="k__";function cc(e,t,r,n){let i=e.constructor;i[kt]??=we();let a=i[kt].typeConverters=i[kt].typeConverters||we();a[t]=a[t]||[],a[t].push({from:r,to:n})}s(cc,"trackConverter");function Zu(e,t,r=!0,n=!1){if(t){for(let i in t){let a=t[i];if(a!==void 0&&(i in e||!n&&typeof a=="object"||i.startsWith(lc)||i.startsWith(pY))&&!Ia.has(i)&&typeof e[i]!="function"){let o=e[i];o&&a&&typeof o=="object"&&typeof a=="object"&&!Array.isArray(a)&&ABe(o)?Zu(o,a,r):e[i]=a}}if(!r){let i=Object.keys(e);for(let a of i)a in t||delete e[a]}}}s(Zu,"initialize");function ABe(e){let t=Object.getPrototypeOf(e)?.constructor;return t&&t!==Object}s(ABe,"isClassObject");function ht(e){return function(t,r){cc(t,r,EBe,CBe(e))}}s(ht,"AsJson");function Cr(){return function(e,t){cc(e,t,kBe,T0)}}s(Cr,"AsInteger");function Lt(){return function(e,t){cc(e,t,OBe,T0)}}s(Lt,"AsBool");function hY(){return function(e,t){cc(e,t,x0,w0)}}s(hY,"AsTags");function mY(){return function(e,t){cc(e,t,T0,S0)}}s(mY,"DbIgnore");function yn(){return function(e,t){cc(e,t,T0,S0)}}s(yn,"DbComputed");function Xg(){return function(e,t){cc(e,t,S0,S0)}}s(Xg,"Retired");function EBe(e,t){let r=e[t];typeof r=="string"?e[t]=r!==""?JSON.parse(r):we():r===null&&(e[t]=null)}s(EBe,"jsonToObject");function CBe(e){return s(function(r,n){let i=r[n];if(typeof i=="object")if(i===null)r[n]=null;else{let a=JSON.stringify(i);if(e&&a.length>e)throw new Ze(`JSON size limit ${e} exceeded`,[n]);r[n]=a}},"objectToJson")}s(CBe,"createObjectToJson");function OBe(e,t){let r=e[t];typeof r=="string"?e[t]=r==="true"||r==="True"||r==="1":typeof r=="number"?e[t]=r!==0:r===null&&(e[t]=!1)}s(OBe,"anyToBool");function gY(e,t){let r=e[t];typeof r=="string"?e[t]=r==="true"||r==="True"||r==="1":typeof r=="number"&&(e[t]=r!==0)}s(gY,"anyToNullableBool");function kBe(e,t){let r=e[t];typeof r=="string"?e[t]=Number.parseInt(r):typeof r=="number"?e[t]=r:r!==void 0&&(e[t]=0)}s(kBe,"stringToInt");var Jg="",yY=Jg+Jg;function x0(e,t){let r=e[t];typeof r=="string"&&(e[t]=r.length>0?r.slice(1,r.length-1).split(yY):[])}s(x0,"stringToTags");function w0(e,t){let r=e[t];if(Array.isArray(r)){let n=r.map(i=>(typeof i=="string"?i:`${i}`).replaceAll(Jg,"")).filter(i=>i).sort();iY(n),n.length===0?e[t]="":e[t]=Jg+n.join(yY)+Jg}}s(w0,"tagsToString");function S0(e,t){delete e[t]}s(S0,"deletePropFromObject");function T0(e,t){}s(T0,"nop");function oi(e,t){let r=e;return r[kt]??=we(),r[kt].traits??=[],r[kt].traits.push(t),e}s(oi,"makeTrait");function I0(e,t){let r=e[kt]?.traits??e.constructor[kt]?.traits;return r?r.includes&&r.includes(t):!1}s(I0,"hasTraitInternal");var bY=/^_?[a-z0-9]+(_[a-z0-9]+)*$/,kt=Symbol("MetaProp");function ze(e,t,r,n,i){if(!bY.test(e))throw new Error("Internal error: invalid table name in entity definition: "+e);if(!bY.test(t))throw new Error("Internal error: invalid entity name in entity definition: "+t);let a=n??"ENTITY",u=class u{static{s(this,"Entity")}id=0;key(){return`${u.keyPrefix}${gn(this.id)?this.id:"New"}`}initialize(c){Zu(this,c)}static get tableName(){return e}static get entityName(){return t}static get parentSchemas(){return r}static idName=`${t}_id`;static keyPrefix=`${a}-`;static urlPrefix=a.toLowerCase();static allowCustomFields=i?.allowCustomFields??!1;static toJSON(){return t}static toString(){return t}static[kt]=we()};A([(0,Lr.IsInt)(),(0,Lr.IsOptional)(),de("The unique entity id - must be a positive integer"),H()],u.prototype,"id",2);let o=u;return X1(o)}s(ze,"Entity");function hr(e,t,...r){let n=typeof t=="function"?(r.unshift(t),{}):t;class i{static{s(this,"MappingValues")}static mapName=e;static mapTableName=r.map(o=>o.entityName).sort().join("_")+"_map";static ctors=r.sort((o,u)=>o.entityName.localeCompare(u.entityName));static parentSchemas=Array.from(sY(r.map(o=>o.parentSchemas).flat()));static toJSON(){return e}static toString(){return e}static allowCustomFields=n?.allowCustomFields??!1;static uniqueMappingKey=n?.uniqueMappingKey??!0;static[kt]=we();initialize(o){o&&Zu(this,o)}}for(let a of r)if(a===void 0)throw new Error("An entity constructor is undefined");if(Xd(r).length!==r.length)throw new Error("Entity constructors must be distinct");return X1(i)}s(hr,"MappingValues");function Wt(e){class t extends e{static{s(this,"SoftDeletable")}is_deleted=!1}return A([(0,Lr.IsOptional)(),Lt(),de("If the entity has been soft-deleted this value is true"),H()],t.prototype,"is_deleted",2),oi(t,"SoftDeletable")}s(Wt,"SoftDeletable");function vY(e){return I0(e,"SoftDeletable")}s(vY,"hasSoftDeletable");var B1t=Symbol("ConflictTagMissing");function Yu(e){class t extends e{static{s(this,"WithConflictTag")}_etag=""}return A([(0,Lr.IsOptional)(),(0,Lr.IsString)(),Se(32),de("A tag for detecting conflicting modifications - current value (may be empty) must be passed along in an update (or update must be forced)",{required:!0}),Te({type:"string"})],t.prototype,"_etag",2),oi(t,"WithConflictTag")}s(Yu,"WithConflictTag");function Qe(e){class t extends e{static{s(this,"Audited")}created_at=ai;created_by=0;modified_at=void 0;modified_by=0;deleted_at=void 0;deleted_by=0}return A([Qr(),(0,Lr.IsOptional)(),de("The creation time for this entity or mapping value",{example:ai}),Te({type:"isotime"})],t.prototype,"created_at",2),A([(0,Lr.IsInt)(),(0,Lr.IsOptional)(),de("The creator user id of this entity or mapping value - or zero if created by the system",{example:0}),H()],t.prototype,"created_by",2),A([Qr(),(0,Lr.IsOptional)(),de("The last modification time for this entity or mapping value",{example:ai}),Te({type:"isotime"})],t.prototype,"modified_at",2),A([(0,Lr.IsInt)(),(0,Lr.IsOptional)(),de("The id of the user who last modified or undeleted this entity or mapping value - or zero if modified by the system",{example:0}),H()],t.prototype,"modified_by",2),A([Qr(),(0,Lr.IsOptional)(),de("The soft-deletion time for this entity or mapping value",{example:ai}),Te({type:"isotime"})],t.prototype,"deleted_at",2),A([(0,Lr.IsInt)(),(0,Lr.IsOptional)(),de("The id of the user who deleted this entity or mapping value - or zero if deleted by the system",{example:0}),H()],t.prototype,"deleted_by",2),oi(t,"Audited")}s(Qe,"Audited");function Qt(e){class t extends e{static{s(this,"WithHistory")}}return oi(t,"WithHistory")}s(Qt,"WithHistory");function mN(e){return I0(e,"WithHistory")}s(mN,"hasWithHistory");var PBe=[];var RBe=[];var ot=s(e=>PBe.push(e),"registerEntityModel"),Or=s(e=>RBe.push(e),"registerEntityMapModel");var ea=ge(at());function Be(e,t){return function(r,n){let i=r.constructor;if(i[kt]??=we(),i[kt].trackedEntities??=[],i.ctors){if(t?.bidirectional)throw new Error("Map prop refs cannot be bidirectional (yet)");i[kt].trackedEntities.push({type:"map_prop",propName:n,sourceEntityName:r.constructor.mapName,targetEntityName:e,withHistory:mN(r.constructor),hintOnly:t?.hintOnly??!1})}else i[kt].trackedEntities.push({type:"prop",propName:n,sourceEntityName:r.constructor.entityName,targetEntityName:e,withHistory:mN(r.constructor),hintOnly:t?.hintOnly??!1,bidirectional:t?.bidirectional??!1})}}s(Be,"EntityRef");function qr(){return function(e,t){let r=e.constructor;r[kt]??=we(),r[kt].largeProps??=[],r[kt].largeProps.push(t)}}s(qr,"LargeValue");var qt=ge(at());var MBe=/[\\/:*?"<>|]+/g,NBe=/^(|nul|prn|con|lpt[0-9]|com[0-9]|\.)(\.|$)/i;function gN(e){return typeof e=="string"&&!e.match(MBe)&&!e.match(NBe)}s(gN,"isValidFilename");function SY(e){return(0,qt.ValidateBy)({name:"isValidFilename",validator:{validate:gN,defaultMessage:(0,qt.buildMessage)(t=>t+"Value '$value' is not a valid filename",e)}},e)}s(SY,"IsValidFilename");var xY=new RegExp("\\p{Cf}","u");function wY(e,t){return typeof e=="string"&&(0,qt.minLength)(e.trim().replace(xY,""),t)}s(wY,"minLengthTrimmed");function Fa(e,t,r){let n=Zs([e],t);return(0,qt.ValidateBy)({name:"minLengthTrimmed",constraints:[e],validator:{validate:s((i,a)=>r&&!r(i,a)?!0:wY(i,a?.constraints[0]),"validate"),defaultMessage:(0,qt.buildMessage)(i=>i+"Trimmed $property must be longer than or equal to $constraint1 characters",n)}},n)}s(Fa,"MinLengthTrimmed");function TY(e,t,r){let n=Zs([e],t);return(0,qt.ValidateBy)({name:"minLengthTrimmedOrEmpty",constraints:[e],validator:{validate:s((i,a)=>r&&!r(i,a)?!0:typeof i=="string"&&!i||wY(i,a?.constraints[0]),"validate"),defaultMessage:(0,qt.buildMessage)(i=>i+"Trimmed $property must be empty or longer than or equal to $constraint1 characters",n)}},n)}s(TY,"MinLengthTrimmedOrEmpty");function DBe(e,t){return typeof e=="string"&&(0,qt.maxLength)(e.trim(),t)}s(DBe,"maxLengthTrimmed");function IY(e,t){let r=Zs([e],t);return(0,qt.ValidateBy)({name:"maxLengthTrimmed",constraints:[e],validator:{validate:s((n,i)=>DBe(n,i?.constraints[0]),"validate"),defaultMessage:(0,qt.buildMessage)(n=>n+"Trimmed $property must be shorter than or equal to $constraint1 characters",r)}},r)}s(IY,"MaxLengthTrimmed");function AY(e){return e??="",typeof e=="string"&&(0,qt.isNotEmpty)(e.trim().replace(xY,""))}s(AY,"isNotEmptyTrimmed");function EY(e){return(0,qt.ValidateBy)({name:"isWord",validator:{validate:s((t,r)=>r$(t),"validate"),defaultMessage:(0,qt.buildMessage)(t=>t+"$property must only contain numbers, letters and underscores",e)}},e)}s(EY,"IsWord");function CY(e){return(0,qt.ValidateBy)({name:"startsWithLetter",validator:{validate:s((t,r)=>n$(t),"validate"),defaultMessage:(0,qt.buildMessage)(t=>t+"$property must start with a letter",e)}},e)}s(CY,"StartsWithLetter");function nf(e,t){return(0,qt.ValidateBy)({name:"isValidId",validator:{validate:s((r,n)=>typeof r=="number"&&(gn(r)||!!e&&r===0),"validate"),defaultMessage:(0,qt.buildMessage)(r=>r+"$property must be a valid entity id",t)}},t)}s(nf,"IsValidId");var FBe=':;/*@`"<>{}\\[\\]',tCt=new RegExp(`^[^\0-\\${FBe}]*$`);function bn(e,t){let r;return(0,qt.ValidateBy)({name:"isSchema",validator:{validate:s((n,i)=>{try{return r=void 0,e.validate(n,{allowCycles:!0}),!0}catch(a){return r=a,!1}},"validate"),defaultMessage:(0,qt.buildMessage)(n=>n+`$property must be a valid '${e.name}'.${r!==void 0?" "+r:""}`,t)}},t)}s(bn,"IsSchema");function A0(e,t=!1,r=!1){return Array.isArray(e)?r&&(e.length===0?t:e.every(n=>_Y(n,t))):_Y(e,t)}s(A0,"isUrlTemplate");function _Y(e,t){if(typeof e!="string")return!1;let r=e.trim();return r?!!Y_.create(r):t}s(_Y,"isUrlTemplateEntry");var E0=1e15,kY=1e8;function sf(e){class t extends e{static{s(this,"WithSortIndex")}sort_index=0}return A([(0,ea.IsInt)(),vK(E0),X_(-E0),de(`An integer sort index for natural ordering of this entity or mapping value - value must be in range (${-E0+1},${E0-1})`),H()],t.prototype,"sort_index",2),oi(t,"WithSortIndex")}s(sf,"WithSortIndex");function Rt(e){class t extends e{static{s(this,"WithProjectOwner")}project_id=0}return A([Be("project"),nf(),de("The project id this entity or mapping belongs to"),H()],t.prototype,"project_id",2),oi(t,"WithProjectOwner")}s(Rt,"WithProjectOwner");function vn(e){let t=RY(1,200,e);return oi(t,"WithTitle")}s(vn,"WithTitle");function PY(e,t,r){let n=RY(e,t,r);return oi(n,"WithAdjustableTitle")}s(PY,"WithAdjustableTitle");function RY(e,t,r){class n extends r{static{s(this,"WithTitle")}title=""}return A([(0,ea.IsString)(),Fa(e),Se(t),de(`A descriptive title for this entity or mapping (${e} to ${t} characters)`,{example:"A Descriptive Title"}),jt(),Te({type:"string"})],n.prototype,"title",2),n}s(RY,"WithTitleModel");function C0(e){class t extends e{static{s(this,"WithTags")}tags=[]}return A([(0,ea.IsString)({each:!0}),hY(),Se(1e3,{each:!0}),de("A list of tags for this entity",{example:"important,release,smoketest"}),Te({type:"json",keys:new Set})],t.prototype,"tags",2),oi(t,"WithTags")}s(C0,"WithTags");function O0(e,t){class r extends t{static{s(this,"WithClosed")}closed_at=void 0;closed_by=void 0;is_closed=!1}return A([(0,ea.IsOptional)(),Qr(),de(`The time this ${e} was closed`,{example:ai}),Te({type:"isotime"})],r.prototype,"closed_at",2),A([(0,ea.IsInt)(),(0,ea.IsOptional)(),de(`The id of the user who closed this ${e}`,{example:0}),H()],r.prototype,"closed_by",2),A([Lt(),(0,ea.IsBoolean)(),de(`Whether the ${e} is closed or not. While certain properties of a closed ${e} may still be modified, some referenced entities (e.g. test cases, results, ...) before the 'closed_at' date cannot be removed or changed until it is reopened.`),H()],r.prototype,"is_closed",2),oi(r,"WithClosed")}s(O0,"WithClosed");var[jt,mCt]=iu("AuditLabel"),[MY,gCt]=iu("BlobRef"),[NY,yCt]=iu("CriticalHistoryTs");var of="ci",af=class extends Rt(ze("atm_sources","atm_source",["tenant"],"ATS")){static{s(this,"AutomationSource")}name="";display_name=void 0;retention_days=0;constructor(t){super(),this.initialize(t)}};A([jt(),(0,dc.IsString)(),Se(32),J_(1),H()],af.prototype,"name",2),A([(0,dc.IsString)(),(0,dc.IsOptional)(),Se(40),de("Display name for automation source in user interface",{example:"Main integration tests"}),Te({type:"string"})],af.prototype,"display_name",2),A([(0,dc.IsNumber)(),Cr(),H()],af.prototype,"retention_days",2);ot(af);var Ip=require("fs"),fI=ge(require("path"));var Xne=ge(_D());var SS=ge(Hee());var _S=Symbol("AGENT_CREATED_BY_AXIOS_COOKIEJAR_SUPPORT");function QD(e){if(!e.jar)return e;if(e.jar===!0)throw new Error("config.jar does not accept boolean since axios-cookiejar-support@2.0.0.");if(e.httpAgent!=null&&e.httpAgent[_S]!==!0||e.httpsAgent!=null&&e.httpsAgent[_S]!==!0)throw new Error("axios-cookiejar-support does not support for use with other http(s).Agent.");return e.httpAgent=new SS.HttpCookieAgent({cookies:{jar:e.jar}}),Object.defineProperty(e.httpAgent,_S,{configurable:!1,enumerable:!1,value:!0,writable:!1}),e.httpsAgent=new SS.HttpsCookieAgent({cookies:{jar:e.jar}}),Object.defineProperty(e.httpsAgent,_S,{configurable:!1,enumerable:!1,value:!0,writable:!1}),e}s(QD,"requestInterceptor");function zee(e){if(e.interceptors.request.handlers.find(({fulfilled:r})=>r===QD))return e;if(e.interceptors.request.use(QD),"create"in e){let r=e.create.bind(e);e.create=(...n)=>{let i=r.apply(e,n);return i.interceptors.request.use(QD),i}}return e}s(zee,"wrapper");var Iq=ge(pp()),Nc=ge(Zne());var HT=zee(Xne.default.create()),iat="/api/v1",Yne=60*1e3,zt=class e{static{s(this,"BaseServiceClient")}static services;static basicAuth;endpointUrl;timeout=Yne;notifications=void 0;apiKey=void 0;enableCookies=!0;customHeaders=we();static cookieJar=void 0;static cookieJarFactory;static _numPendingRequests=0;static tabHint=Bb();static clientInfo="unknown";static onNetworkError=new Iq.Subject;static onNumPendingChange=new Iq.Subject;static get numPendingRequests(){return e._numPendingRequests}static clearCookies(){e.cookieJar?.removeAllCookiesSync()}static getCookies(){return e.cookieJar?.toJSON()??{}}static setCookies(t){e.cookieJar=t}static configureWithUrl(t){let r=new URL(t);e.configureDefaults({default:{host:r.hostname,port:r.port?Number.parseInt(r.port):r.protocol==="https:"?443:80,protocol:r.protocol},services:{}})}static setBasicAuth(t,r){this.basicAuth={username:t,password:r}}static configureDefaults(t){t??={default:{},services:{}},e.services={default:{}},r("default",t.default,{}),oY(t.services,(n,i)=>r(n,i,t.default));function r(n,i,a){typeof document=="object"?(i.protocol??=document.location.protocol.replace(/:/,""),i.host??=document.location.hostname,i.port??=document.location.port?parseInt(document.location.port):document.location.protocol==="https:"?443:80):(i.protocol??="http",i.protocol=i.protocol.replace(/:/,""),i.host??="localhost",i.port??=i.protocol==="https"?443:80),e.services[n]={...a,baseUrl:`${i.protocol}://${i.host}:${i.port}${i.api??iat}`,timeout:i.timeout??Yne}}s(r,"configureEndpoint")}constructor(t,r="default"){let n=e.services[r]??e.services.default;t?this.endpointUrl=rh(t.includes("://")?t:`${n.baseUrl}/${Hl(t,"/")}`,"/"):this.endpointUrl=n.baseUrl,this.timeout=n.timeout}useNotificationsBase(t,r,n,i,a){this.notifications||(this.notifications=t,a&&t.uncleanReconnect.subscribe(a),t.dataInserted.pipe((0,Nc.filter)(o=>n.includes(o.entity))).subscribe(o=>{i&&o.values.forEach(u=>i(u)),r.insert.next(o)}),t.dataUpdated.pipe((0,Nc.filter)(o=>n.includes(o.entity))).subscribe(o=>{i&&o.values.forEach(u=>i(u)),r.update.next(o)}),t.dataDeleted.pipe((0,Nc.filter)(o=>n.includes(o.entity))).subscribe(o=>{i&&o.values.forEach(u=>i(u,!0)),r.delete.next(o)}),t.dataUndeleted.pipe((0,Nc.filter)(o=>n.includes(o.entity))).subscribe(o=>{i&&o.values.forEach(u=>i(u)),r.undelete.next(o)}),t.dataMapped.pipe((0,Nc.filter)(o=>cN(n,o.entities).size>0)).subscribe(r.map),t.dataUnmapped.pipe((0,Nc.filter)(o=>cN(n,o.entities).size>0)).subscribe(r.unmap))}async get(t,r){return this.internalRequest("get",t,void 0,r)}async post(t,r,n,i){return this.internalRequest("post",t,r,n,i)}async put(t,r,n){return this.internalRequest("put",t,r,n)}async delete(t,r,n){return this.internalRequest("delete",t,r,n)}async uploadBinary(t,r,n,i,a,o){try{return e.onNumPendingChange.next(++e._numPendingRequests),(await HT.post(`${this.endpointUrl}/${Hl(t,"/")}${Tq(i)}`,r,{headers:this.createHeaders(n,o,!0),responseType:"json",withCredentials:!0,jar:this.enableCookies?e.cookieJar:void 0,auth:e.basicAuth,maxRedirects:0,onUploadProgress:a?l=>a(l.loaded??0,l.total??0):void 0})).data}catch(u){let l=this.formatError(u);throw e.onNetworkError.next(l),l}finally{e.onNumPendingChange.next(--e._numPendingRequests)}}async downloadBinary(t,r,n){try{e.onNumPendingChange.next(++e._numPendingRequests);let i={headers:this.createHeaders("application/json",this.customHeaders,!1),responseType:"arraybuffer",withCredentials:!0,jar:this.enableCookies?e.cookieJar:void 0,auth:e.basicAuth,maxRedirects:0,timeout:this.timeout*3},a=`${this.endpointUrl}/${Hl(t,"/")}${Tq(n)}`;return(r!==void 0?await HT.post(a,r,i):await HT.get(a,i)).data}catch(i){let a=this.formatError(i);throw e.onNetworkError.next(a),a}finally{e.onNumPendingChange.next(--e._numPendingRequests)}}strongify(t,r,n=!0){return Array.isArray(t)?t.map(a=>this.toClassObject(a,r,n)):this.toClassObject(t,r,n)}toClassObject(t,r,n=!0){let i=new r;return Zu(i,t,n),i}async internalRequest(t,r,n,i,a){try{e.onNumPendingChange.next(++e._numPendingRequests),e.cookieJar=e.cookieJar??e.cookieJarFactory?.();let o=`${this.endpointUrl}/${Hl(r,"/")}${Tq(i)}`;return(await HT.request({url:o,data:n,method:t,responseType:"json",withCredentials:!0,maxRedirects:0,timeout:a||this.timeout,jar:this.enableCookies?e.cookieJar:void 0,auth:e.basicAuth,headers:this.createHeaders("application/json",this.customHeaders,!0)})).data}catch(o){let u=this.formatError(o);throw e.onNetworkError.next(u),u}finally{e.onNumPendingChange.next(--e._numPendingRequests)}}createHeaders(t,r,n){return{Accept:n?"application/json":void 0,"Content-Type":t,"x-tab-hint":e.tabHint,"x-wf-client":e.clientInfo,...this.apiKey?{"x-api-key":this.apiKey}:void 0,...r}}formatError(t){if(t.response){let r=t.response,n=sat(r.data)?aat(r.data):r.data;throw new ft(n?.code??(r.status!==413?"API_INTERNAL_ERROR":"API_DATA_TOO_LARGE"),n?.message??r.statusText,{status:r.status,stack:n?.stack},{...n?.meta,...r.status===429?{retryAfter:Number.parseInt(r.headers["retry-after"]||"0")*1e3}:void 0})}else throw new ft("API_INTERNAL_ERROR",t.message??`Request failed (${t})`)}};zt.configureDefaults();function Tq(e){if(!e||Object.keys(e).length===0)return"";return"?"+Object.keys(e).map(r=>e[r]!==void 0?`${encodeURIComponent(r)}=${encodeURIComponent(t(e[r]))}`:"").filter(r=>r).join("&");function t(r){return Array.isArray(r)?r.map(n=>t(n)).join(","):typeof r=="string"?r:typeof r=="number"?r.toString():typeof r=="boolean"?r?"1":"0":""}}s(Tq,"fmtQuery");function sat(e){return!!e&&!!e.byteLength}s(sat,"isArrayBuffer");function aat(e){try{return JSON.parse(new TextDecoder().decode(e))}catch{return}}s(aat,"tryDecodeAsJson");var zT=class extends zt{static{s(this,"AutomationIngestClient")}constructor(t){super(t)}async getInfo(t){return await this.get(`/automation/info/${t}`)}async submitResults(t){return await this.post("/automation",t)}};var nr=ge(at());var or=ge(at());function GT(e,t,r){return t!==void 0&&(e=e<t?t:e),r!==void 0&&(t!==void 0&&(r=Math.max(t,r)),e=e>r?r:e),e}s(GT,"clamp");function Qne(e,t){let r=t-e;return Math.round(e+r/2+r/10*(Math.random()-.5))}s(Qne,"fuzzyMidpoint");function hp(e,t){return e=e.trim(),/^[-+]?(\d+)$/.test(e)?Number.parseInt(e,t):NaN}s(hp,"parseIntStrict");function Aq(e){return e=e.trim().replaceAll(",","."),/^[-]?(0|[1-9][0-9]*)(\.[0-9]*)?(e[+-]?[0-9]+)?$/i.test(e)?Number.parseFloat(e):NaN}s(Aq,"parseFloatStrict");function Eq(e){return Number.isFinite(e)?e:null}s(Eq,"finiteOrNull");var nie=Y1()?150:60,iie=Y1()?60:30,KT=255;var eie=100,oat=1e4,uat=2e5,lat=new RegExp(`^(?!${lc})`);var Cq=s(e=>e==="text","isCustomFieldTypeDocumentProps");var ZT={string:{type:"string",isMultiValued:!1,canHaveIndex:!0,validator:sie,convFromString:s(e=>e,"convFromString")},multi_string:{type:"multi_string",isMultiValued:!0,canHaveIndex:!0,validator:s(e=>rie(e,eie),"validator"),convFromDb:x0,convToDb:w0,convFromString:s(e=>tie(e),"convFromString")},text:{type:"text",isMultiValued:!1,canHaveIndex:!0,validator:s(e=>typeof e=="string"&&e.length<=oat,"validator"),convFromString:s(e=>e,"convFromString")},boolean:{type:"boolean",isMultiValued:!1,canHaveIndex:!0,validator:s(e=>typeof e=="boolean","validator"),convFromDb:gY,convFromString:s(e=>e==="true"||e==="True"||e==="1","convFromString")},integer:{type:"integer",isMultiValued:!1,canHaveIndex:!0,validator:s(e=>(0,or.isInt)(e),"validator"),convFromString:s(e=>Eq(hp(e)),"convFromString")},number:{type:"number",isMultiValued:!1,canHaveIndex:!0,validator:s(e=>(0,or.isNumber)(e,{allowNaN:!1}),"validator"),convFromString:s(e=>Eq(Aq(e)),"convFromString")},date:{type:"date",isMultiValued:!1,canHaveIndex:!0,validator:s(e=>_K(e),"validator"),convFromString:s(e=>e,"convFromString")},datetime:{type:"datetime",isMultiValued:!1,canHaveIndex:!0,validator:s(e=>Fg(e),"validator"),convFromString:s(e=>e,"convFromString")},duration:{type:"duration",isMultiValued:!1,canHaveIndex:!0,validator:s(e=>(0,or.isNumber)(e,{allowNaN:!1}),"validator"),convFromString:s(e=>cat(e),"convFromString")},tag:{type:"tag",isMultiValued:!0,canHaveIndex:!0,validator:s(e=>rie(e,eie),"validator"),convFromDb:x0,convToDb:w0,convFromString:s(e=>tie(e),"convFromString")},user_id:{type:"user_id",isMultiValued:!1,canHaveIndex:!0,validator:s(e=>(0,or.isInt)(e)&&e!==0,"validator"),convFromString:s(e=>hp(e),"convFromString")},url:{type:"url",isMultiValued:!1,canHaveIndex:!0,validator:s(e=>typeof e=="string"&&hn(e),"validator"),convFromString:s(e=>e.trim(),"convFromString")}};function tie(e){let t=e.split(";");return t=t.length<=1?e.split(","):t,t.map(r=>r.trim()).filter(r=>r)}s(tie,"friendlyParseMultiString");function cat(e,t="seconds"){e=e.trim();let r=Aq(e);return isNaN(r)?rY(e):r<0?NaN:t==="seconds"?r:r*60}s(cat,"parseDuration");function sie(e){return typeof e=="string"&&e.length<=KT}s(sie,"stringValidator");function rie(e,t){return Array.isArray(e)&&e.every(sie)&&e.length<=t}s(rie,"multiValueValidator");var dat=xe("CustomField").array("projectIds",e=>e.integer({nonNegative:!0})).bool("required").bool("visible").bool("includeByDefault").boolOpt("allowCustomValues").arrayOrOneOpt("defaultValue",e=>e.basic()).stringOpt("description").arrayOpt("fixedValues",e=>e.oneOf("value",t=>t.string(),t=>t.number(),t=>t.bool()).stringOpt("displayValue").stringOpt("iconType",{values:["data","builtin","unicode"]}).stringOpt("iconValue")).boolOpt("indexed").build(),di=class extends sf(Qe(ze("custom_fields","custom_field",["tenant"],"CF"))){static{s(this,"CustomField")}table="";name="";display_name=void 0;type="string";is_builtin=!1;options={projectIds:[],required:!1,visible:!1,includeByDefault:!1,allowCustomValues:!1,description:"",indexed:!1};constructor(t){super(),this.initialize(t)}};A([(0,or.IsString)(),Se(40),H()],di.prototype,"table",2),A([Vu(lat),(0,or.IsLowercase)(),Fa(3),Se(28),(0,or.IsString)(),EY(),CY(),jt(),H()],di.prototype,"name",2),A([(0,or.IsString)(),(0,or.IsOptional)(),Se(40),Te({type:"string"})],di.prototype,"display_name",2),A([(0,or.IsString)(),H()],di.prototype,"type",2),A([(0,or.IsBoolean)(),Lt(),H()],di.prototype,"is_builtin",2),A([(0,or.IsObject)(),ht(uat),Te({type:"json",keys:new Set(["description","displayValue"])}),bn(dat)],di.prototype,"options",2);ot(di);function YT(e){return e.startsWith(lc)?e.substring(lc.length):e}s(YT,"stripCustomFieldPrefix");function fu(e){return e.is_builtin?e.name:lc+e.name}s(fu,"getCustomFieldPropName");function fat(e,t,r){let n=Array.isArray(e);return(r!==void 0?r:n)?n&&aY(e,(t.fixedValues??[]).map(a=>a.value)):!!t.fixedValues?.find(a=>a.value===e)}s(fat,"fixedValuesIncludeValue");var pat=s(e=>ZT[e.type]?.validator??(()=>!0),"defaultGetCustomFieldValidator"),hat=s((e,t,r,n=!1,i=!1,a=pat)=>{let o=e.type;if(!(o?ZT[o]:void 0))return[];if(n){if(r==null)return[t?t("isNotEmpty",{ns:"validation"}):"Must not be empty."];if(Array.isArray(r)){if(!(0,or.arrayNotEmpty)(r))return[t?t("arrayNotEmpty",{ns:"validation"}):"Must have at least one entry"]}else if(o==="text"&&typeof r=="string"){if(aie(r))return[t?t("isNotEmpty",{ns:"validation"}):"Must not be empty"]}else if(!AY(`${r}`))return[t?t("isNotEmptyTrimmed",{ns:"validation"}):"Must not be empty (leading/trailing white spaces are not counted). "]}else if(r===void 0)return[];return i&&!Ir(r)?[]:!e.options.allowCustomValues&&e.options.fixedValues&&!fat(r,e.options)?[t?t("settings.custom_field_mgmt.error_not_fixed_value",{ns:"common"}):"Value must be one of the allowed values"]:r!==null&&a(e)(r)?[]:o==="string"&&`${r}`.length>KT?[t?t("maxLength",{constraint1:KT,valueLength:`${r}`.length,ns:"validation"}):`Value is longer than ${KT} characters`]:[t?t(`settings.custom_field_mgmt.types.${o}_invalid`,{ns:"common"}):`Invalid value for field of type '${o}'`]},"isCustomFieldValueValid");function JT(e,t,r,n){let i=e.filter(o=>o.table===r),a=[];for(let o of i){let u=fu(o),l=n&&n[u],c=hat(o,t,l,o.options.required&&!o.options.defaultValue,!0);c.length>0&&a.push({field:o,property:u,propertyValue:l,message:c.join(". ")})}return a}s(JT,"areCustomFieldsValid");var eI=1,ky=(b=>(b.Code="code",b.Grid="t",b.GridRow="tr",b.GridCell="td",b.Heading="h1",b.Image="img",b.Link="a",b.ListItem="li",b.ListOrdered="ol",b.ListUnordered="ul",b.Paragraph="p",b.QuickCopy="cp",b.Quote="qu",b.Table="table",b.TableRow="row",b.TableCell="cell",b))(ky||{}),Xe=ky,oie=Lb(ky),QT=s((...e)=>oie.filter(t=>!e.includes(t)),"allTypesExcept"),Dc=QT(Xe.Grid,Xe.GridRow,Xe.GridCell),XT=s((...e)=>Dc.filter(t=>!e.includes(t)),"allContentTypesExcept"),Oy=[Xe.Link,Xe.QuickCopy,Xe.Image],uie={[Xe.Paragraph]:{childTypes:Oy,disallowedAncestors:Dc,canBeRoot:!0,canHaveText:!0},[Xe.Heading]:{childTypes:Oy,disallowedAncestors:Dc,canBeRoot:!0,canHaveText:!0},[Xe.QuickCopy]:{childTypes:[],disallowedAncestors:[],canBeRoot:!1,canHaveText:!0},[Xe.Code]:{childTypes:[],disallowedAncestors:Dc,canBeRoot:!0,canHaveText:!0},[Xe.Quote]:{childTypes:Oy,disallowedAncestors:Dc,canBeRoot:!0,canHaveText:!0},[Xe.Link]:{childTypes:[],disallowedAncestors:[],canBeRoot:!1,canHaveText:!0},[Xe.Image]:{childTypes:[],disallowedAncestors:[Xe.Code],canBeRoot:!1,canHaveText:!1},[Xe.Grid]:{childTypes:[Xe.GridRow],disallowedAncestors:oie,canBeRoot:!0,canHaveText:!1},[Xe.GridRow]:{childTypes:[Xe.GridCell],disallowedAncestors:QT(Xe.Grid),canBeRoot:!1,canHaveText:!1},[Xe.GridCell]:{childTypes:QT(Xe.Grid,Xe.GridRow),disallowedAncestors:QT(Xe.Grid,Xe.GridRow),canBeRoot:!1,canHaveText:!1},[Xe.ListUnordered]:{childTypes:[Xe.ListItem],disallowedAncestors:Dc,canBeRoot:!0,canHaveText:!1},[Xe.ListOrdered]:{childTypes:[Xe.ListItem],disallowedAncestors:Dc,canBeRoot:!0,canHaveText:!1},[Xe.ListItem]:{childTypes:Oy,disallowedAncestors:XT(Xe.ListOrdered,Xe.ListUnordered),canBeRoot:!1,canHaveText:!0},[Xe.Table]:{childTypes:[Xe.TableRow],disallowedAncestors:XT(Xe.Paragraph),canBeRoot:!0,canHaveText:!1},[Xe.TableRow]:{childTypes:[Xe.TableCell],disallowedAncestors:XT(Xe.Table),canBeRoot:!1,canHaveText:!1},[Xe.TableCell]:{childTypes:Oy,disallowedAncestors:XT(Xe.Table,Xe.TableRow),canBeRoot:!1,canHaveText:!0}};function Oq(e){return{t:"p",children:[{text:e??""}]}}s(Oq,"paragraph");function kq(){return[Oq()]}s(kq,"emptyBaseDocument");var[Ur,mat]=iu("DocumentText");var tI=s((e,t)=>{let r=mat(e);return t&&Array.isArray(t)?r.push(...t.filter(n=>Cq(n.type)).map(n=>fu(n))):t&&r.push(...Object.keys(t).filter(n=>Cq(t[n].type)).map(n=>t[n].propName)),r},"getDocumentTextPropsWithCustomFields");function ua(e,t){return JSON.stringify({v:eI,t:"slate",c:e},(r,n)=>r[0]!=="_"?n:void 0,t)}s(ua,"serializeDocument");function Pq(e,t){let r=JSON.parse(e);if(Array.isArray(r)){if(!t)throw new Error("Invalid document: Fragment not allowed");if(r.length>0&&r.some(n=>!n.t||!n.children))throw new Error("Invalid document: Invalid fragment");return r}if(r.t!=="slate")throw new Error("Invalid document: Type not set");if(r.v!==eI)throw new Error(`Document Version not matching. Expected ${eI}, received ${r.v}.`);return r.c}s(Pq,"deserializeDocument");function aie(e){return e===ua(kq())}s(aie,"isEmptyBaseDocumentValue");var vr=ge(at());var la=16e3,gat=32e3,lie=64e3,yat=96e3,rI=(r=>(r.Text="TEXT",r.Steps="STEPS",r))(rI||{}),B2t=nd(rI),Ue=class extends Qt(Rt(Yu(Qe(Wt(sf(vn(ze("testcases","testcase",["tenant"],"TC",{allowCustomFields:!0})))))))){static{s(this,"TestCase")}owner_user_id=0;$owner_name="";type="";description="";template="STEPS";precondition_text=void 0;content_text=void 0;steps_text=void 0;expected_result_text=void 0;priority=void 0;status=void 0;testcase_type=void 0;automation=void 0;estimate=void 0;constructor(t){super(),this.initialize(t)}};A([Be("user"),(0,vr.IsInt)(),de("The global user id of the test case owner"),H()],Ue.prototype,"owner_user_id",2),A([yn(),de("The resolved display name of the owner user - read only")],Ue.prototype,"$owner_name",2),A([(0,vr.IsString)(),Se(30),(0,vr.IsOptional)(),de("Reserved for future use"),H()],Ue.prototype,"type",2),A([(0,vr.IsString)(),Se(la),(0,vr.IsOptional)(),Vn(),de("Reserved for future use"),Te({type:"string"})],Ue.prototype,"description",2),A([(0,vr.IsString)(),(0,vr.IsEnum)(rI),de("The template type used for the test case: STEPS or TEXT"),H()],Ue.prototype,"template",2),A([(0,vr.IsString)(),Ur(),Be("blob",{hintOnly:!0}),qr(),(0,vr.IsOptional)(),Se(gat),de("A description of the precondition required for the test case (can be a rich text document)",{example:""}),Te({type:"document"})],Ue.prototype,"precondition_text",2),A([(0,vr.IsString)(),Ur(),Be("blob",{hintOnly:!0}),qr(),(0,vr.IsOptional)(),Se(yat),de("The test case content - used with template STEPS (can be a rich text document)",{example:""}),Te({type:"document"})],Ue.prototype,"content_text",2),A([(0,vr.IsString)(),Ur(),Be("blob",{hintOnly:!0}),qr(),(0,vr.IsOptional)(),Se(lie),de("The test case content - used with template TEXT (can be a rich text document)",{example:""}),Te({type:"document"})],Ue.prototype,"steps_text",2),A([(0,vr.IsString)(),Ur(),Be("blob",{hintOnly:!0}),qr(),(0,vr.IsOptional)(),Se(lie),de("The test case expected result - used with template TEXT (can be a rich text document)",{example:""}),Te({type:"document"})],Ue.prototype,"expected_result_text",2),A([de("The test case priority (This is a builtin-custom field)",{example:1}),H()],Ue.prototype,"priority",2),A([de("The test case status (This is a builtin-custom field)",{example:""}),H()],Ue.prototype,"status",2),A([de("The test case type (This is a builtin-custom field)",{example:""}),H()],Ue.prototype,"testcase_type",2),A([de("The test case automation status (This is a builtin-custom field)",{example:""}),H()],Ue.prototype,"automation",2),A([de("A test case time estimate (This is a builtin-custom field)",{example:100}),H()],Ue.prototype,"estimate",2);ot(Ue);var Ge=ge(at());var Fc=ge(at());var _r=class extends Qt(O0("test run",Rt(Yu(Qe(Wt(vn(ze("testruns","testrun",["tenant"],"TR",{allowCustomFields:!0})))))))){static{s(this,"TestRun")}testplan_id=void 0;description=void 0;get auditLabel(){return`${this.title} (${this.is_closed?"CLOSED":"OPEN"})`}getCriticalHistoryTs(){return this.is_closed?this.closed_at??void 0:void 0}constructor(t){super(),this.initialize(t)}};A([Be("testplan"),(0,Fc.IsInt)(),(0,Fc.IsOptional)(),de("The optional id of the test plan this test run is associated with",{example:0}),H()],_r.prototype,"testplan_id",2),A([(0,Fc.IsString)(),Ur(),Be("blob",{hintOnly:!0}),qr(),Se(la),(0,Fc.IsOptional)(),de("An optional description for this test run (can be a rich text document)",{example:"",nullable:!0}),Te({type:"document"})],_r.prototype,"description",2),A([jt()],_r.prototype,"auditLabel",1),A([NY()],_r.prototype,"getCriticalHistoryTs",1);ot(_r);var Rq=/^[0-9a-z\-_{}/+:;.]{0,200}$/i;var bat=2e5,Lc=class{static{s(this,"WorkItemUrlArgs")}projectId=0;workItemType="DEFECT";fields=we();workItemId="";apiProjectId=void 0};A([(0,Ge.IsInt)()],Lc.prototype,"projectId",2),A([(0,Ge.IsString)()],Lc.prototype,"workItemType",2),A([(0,Ge.IsObject)()],Lc.prototype,"fields",2),A([(0,Ge.IsString)()],Lc.prototype,"workItemId",2),A([(0,Ge.IsString)(),(0,Ge.IsOptional)()],Lc.prototype,"apiProjectId",2);var qc=class{static{s(this,"WorkItemCreateArgs")}projectId=0;integrationId=0;fields={summary:""};apiProjectId="";apiWorkItemTypeId=""};A([(0,Ge.IsInt)()],qc.prototype,"projectId",2),A([(0,Ge.IsInt)()],qc.prototype,"integrationId",2),A([(0,Ge.IsObject)()],qc.prototype,"fields",2),A([(0,Ge.IsString)(),(0,Ge.IsOptional)()],qc.prototype,"apiProjectId",2),A([(0,Ge.IsString)(),(0,Ge.IsOptional)()],qc.prototype,"apiWorkItemTypeId",2);var Tl=class{static{s(this,"WorkItemLinkArgs")}projectId=0;integrationId=0;workItemIdOrKey="";apiProjectId="";friendlyTitle=void 0;workItemUrl=void 0};A([(0,Ge.IsInt)()],Tl.prototype,"projectId",2),A([(0,Ge.IsInt)()],Tl.prototype,"integrationId",2),A([(0,Ge.IsString)()],Tl.prototype,"workItemIdOrKey",2),A([(0,Ge.IsString)(),(0,Ge.IsOptional)()],Tl.prototype,"apiProjectId",2),A([(0,Ge.IsString)(),(0,Ge.IsOptional)()],Tl.prototype,"friendlyTitle",2),A([Q_({require_tld:!1,allow_underscores:!0}),(0,Ge.IsOptional)()],Tl.prototype,"workItemUrl",2);var At=class extends Rt(Qe(Wt(ze("workitems","workitem",["tenant"],"WI")))){static{s(this,"WorkItem")}integration_id=0;workitem_api_project_id="";workitem_api_id="";workitem_api_type_id="";workitem_key="";workitem_status="";workitem_status_category="";workitem_summary="";workitem_integration_type="generic";workitem_info=null;constructor(t){super(),this.initialize(t)}};A([(0,Ge.IsInt)(),Be("integration"),H()],At.prototype,"integration_id",2),A([(0,Ge.IsString)(),Vu(Rq),H()],At.prototype,"workitem_api_project_id",2),A([(0,Ge.IsString)(),Vu(Rq),H()],At.prototype,"workitem_api_id",2),A([(0,Ge.IsString)(),Vu(Rq),(0,Ge.IsOptional)(),H()],At.prototype,"workitem_api_type_id",2),A([(0,Ge.IsString)(),Se(40),jt(),H()],At.prototype,"workitem_key",2),A([(0,Ge.IsString)(),Se(40),H()],At.prototype,"workitem_status",2),A([(0,Ge.IsString)(),Se(40),H()],At.prototype,"workitem_status_category",2),A([(0,Ge.IsString)(),Se(1e3),Te({type:"string"})],At.prototype,"workitem_summary",2),A([(0,Ge.IsString)(),Se(40),H()],At.prototype,"workitem_integration_type",2),A([ht(bat),(0,Ge.IsObject)(),(0,Ge.IsOptional)(),Te({type:"fixed",value:null})],At.prototype,"workitem_info",2);ot(At);var ca=(r=>(r.Defect="DEFECT",r.Requirement="REQUIREMENT",r))(ca||{});var jc=class extends Qe(hr("wi_trtc_values",At,Ue,_r)){static{s(this,"WorkItemTestRunTestCaseValues")}constructor(t){super(),this.initialize(t)}workitem_id=0;testcase_id=0;testrun_id=0;workitem_type="DEFECT"};A([H()],jc.prototype,"workitem_id",2),A([H()],jc.prototype,"testcase_id",2),A([H()],jc.prototype,"testrun_id",2),A([(0,Ge.IsString)(),(0,Ge.IsEnum)(ca),H()],jc.prototype,"workitem_type",2);Or(jc);var mp=class extends Qe(hr("wi_tr_values",At,_r)){static{s(this,"WorkItemTestRunValues")}constructor(t){super(),this.initialize(t)}workitem_id=0;testrun_id=0;workitem_type="DEFECT"};A([H()],mp.prototype,"workitem_id",2),A([H()],mp.prototype,"testrun_id",2),A([(0,Ge.IsString)(),(0,Ge.IsEnum)(ca),H()],mp.prototype,"workitem_type",2);Or(mp);var gp=class extends Qe(hr("wi_tc_values",At,Ue)){static{s(this,"WorkItemTestCaseValues")}constructor(t){super(),this.initialize(t)}workitem_id=0;testcase_id=0;workitem_type="DEFECT"};A([H()],gp.prototype,"workitem_id",2),A([H()],gp.prototype,"testcase_id",2),A([(0,Ge.IsString)(),(0,Ge.IsEnum)(ca),H()],gp.prototype,"workitem_type",2);Or(gp);var da=ge(at());var cie=(u=>(u[u.Invalid=0]="Invalid",u[u.String=1]="String",u[u.Number=2]="Number",u[u.Integer=3]="Integer",u[u.Boolean=4]="Boolean",u[u.DateTime=5]="DateTime",u[u.Url=6]="Url",u))(cie||{}),fi=/^[a-z][a-z0-9_]{1,27}$/,xBt=xe("AutomationFieldOptions").arrayOpt("allowedValues",e=>e.object(t=>t.oneOf("value",r=>r.string(),r=>r.number()).stringOpt("displayValue"))).array("projectIds",e=>e.integer(gn)).build(),Bc=class extends Qe(ze("atm_fields","atm_field",["tenant"],"AF")){static{s(this,"AutomationField")}name="";display_name=void 0;type=0;options={projectIds:[]};constructor(t){super(),this.initialize(t)}};A([jt(),(0,da.IsString)(),Se(40),Vu(fi),H()],Bc.prototype,"name",2),A([(0,da.IsString)(),(0,da.IsOptional)(),Se(40),Te({type:"string"})],Bc.prototype,"display_name",2),A([(0,da.IsInt)(),(0,da.IsEnum)(cie),H()],Bc.prototype,"type",2),A([(0,da.IsObject)(),ht(),Te({type:"json",keys:new Set(["displayValue"])})],Bc.prototype,"options",2);ot(Bc);var sI=ge(at());var rr=ge(at());function Xa(e){let t=e.split(".").at(-1).toLowerCase();return vat.get(t)??"application/octet-stream"}s(Xa,"inferMimeTypeFromExtension");var vat=new Map([["jpg","image/jpeg"],["jpeg","image/jpeg"],["png","image/png"],["gif","image/gif"],["webp","image/webp"],["svg","image/svg+xml"],["avif","image/avif"],["mp3","audio/mp3"],["aac","audio/aac"],["avi","video/x-msvideo"],["mp4","video/mp4"],["webm","video/webm"],["mkv","video/x-matroska"],["pdf","application/pdf"],["zip","application/zip"],["7z","application/x-7z-compressed"],["gz","application/gzip"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["xslx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["xml","application/xml"],["txt","text/plain"],["csv","text/csv"],["json","application/json"]]);var en=ge(at());var Mq=32e3,_at=16e3,Nq=(r=>(r.Open="OPEN",r.Resolved="RESOLVED",r))(Nq||{}),nI=(r=>(r.Text="TEXT",r.Attachment="ATTACHMENT",r))(nI||{}),Dq=(n=>(n.TestCase="TC",n.TestRunTestCase="TRTC",n.AutomationResult="AR",n))(Dq||{}),Sat=xe("BlobRefs").array(e=>e.integer("id",{positive:!0}).string("blobId",lE,{maxLen:40}).string("title",{maxLen:200}).string("filename",gN).string("mimeType",en.isMimeType).integerOpt("size",{nonNegative:!0})),xat=`[{
|
|
317
317
|
"id": 1234,
|