mirror of
https://github.com/github/codeql-action
synced 2026-11-23 00:04:15 +03:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
436aa0401d |
No files matched your search
@@ -47,6 +47,27 @@ const copyDefaultsPlugin = {
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Mark `lib/` as an ESM scope by writing `lib/package.json` with
|
||||
* `{ "type": "module" }`. This lets the bundles use the regular `.js`
|
||||
* extension while still being loaded as ESM by Node, without affecting
|
||||
* the rest of the repo (the root package.json stays CJS so the tsc
|
||||
* output in `build/` and any other consumers are unchanged).
|
||||
*
|
||||
* @type {esbuild.Plugin}
|
||||
*/
|
||||
const writeLibPackageJsonPlugin = {
|
||||
name: "write-lib-package-json",
|
||||
setup(build) {
|
||||
build.onEnd(async () => {
|
||||
await writeFile(
|
||||
join(OUT_DIR, "package.json"),
|
||||
JSON.stringify({ type: "module" }) + "\n",
|
||||
);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Log when the build ends.
|
||||
*
|
||||
@@ -62,6 +83,19 @@ const onEndPlugin = {
|
||||
},
|
||||
};
|
||||
|
||||
// Banner injected into every emitted ESM file so that bundled CommonJS
|
||||
// dependencies which call `require(...)` at runtime (e.g. parts of the
|
||||
// Azure SDK + undici stack pulled in transitively by `@actions/cache` and
|
||||
// `@actions/artifact`), or read `__filename` / `__dirname`, keep working.
|
||||
const esmCompatBanner = [
|
||||
`import { createRequire as __codeqlCreateRequire } from "module";`,
|
||||
`import { fileURLToPath as __codeqlFileURLToPath } from "url";`,
|
||||
`import { dirname as __codeqlDirname } from "path";`,
|
||||
`var require = __codeqlCreateRequire(import.meta.url);`,
|
||||
`var __filename = __codeqlFileURLToPath(import.meta.url);`,
|
||||
`var __dirname = __codeqlDirname(__filename);`,
|
||||
].join("");
|
||||
|
||||
const context = await esbuild.context({
|
||||
// Include upload-lib.ts as an entry point for use in testing environments.
|
||||
entryPoints: globSync([
|
||||
@@ -70,10 +104,24 @@ const context = await esbuild.context({
|
||||
"src/upload-lib.ts",
|
||||
]),
|
||||
bundle: true,
|
||||
format: "cjs",
|
||||
// Use ESM with code splitting so shared modules (Azure storage, undici,
|
||||
// octokit, ...) live in shared chunk files instead of being duplicated
|
||||
// into every entry bundle. Node treats these `.js` files as ESM because
|
||||
// `writeLibPackageJsonPlugin` writes `lib/package.json` with
|
||||
// `"type": "module"`.
|
||||
format: "esm",
|
||||
splitting: true,
|
||||
minify: true,
|
||||
chunkNames: "chunks/chunk-[hash]",
|
||||
banner: { js: esmCompatBanner },
|
||||
outdir: OUT_DIR,
|
||||
platform: "node",
|
||||
plugins: [cleanPlugin, copyDefaultsPlugin, onEndPlugin],
|
||||
plugins: [
|
||||
cleanPlugin,
|
||||
copyDefaultsPlugin,
|
||||
writeLibPackageJsonPlugin,
|
||||
onEndPlugin,
|
||||
],
|
||||
target: ["node20"],
|
||||
define: {
|
||||
__CODEQL_ACTION_VERSION__: JSON.stringify(pkg.version),
|
||||
|
||||
Generated
+2
-129183
File diff suppressed because it is too large.
Load diff
Generated
+2
-96038
File diff suppressed because it is too large.
Load diff
Generated
+2
-88244
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,10 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{g as E}from"./chunk-LYJYPMC2.js";import{$b as v,Bb as L,Da as w,Fa as d,H as g,Ma as C,O as m,c as p,ec as P,fa as c,h as A,i as F,k as V,m as $,n as h,sa as b}from"./chunk-V6LGBXSF.js";var R=p(V()),k=p(F()),S=p($()),O=p(A());import*as n from"fs";import*as l from"path";async function ne(e,o,t,r,i,a,u,s,f){f.startGroup("Setup CodeQL tools");let{codeql:y,toolsDownloadStatusReport:D,toolsSource:I,toolsVersion:_,zstdAvailability:T}=await E(e,o,t,r,i,a,u,s,f,!0);return await y.printVersion(),f.endGroup(),{codeql:y,toolsDownloadStatusReport:D,toolsSource:I,toolsVersion:_,zstdAvailability:T}}async function ie(e,o){return await L("Load language configuration",async()=>await v(e,o))}async function ae(e,o,t,r,i,a,u){n.mkdirSync(t.dbLocation,{recursive:!0}),await P(e,async()=>await o.databaseInitCluster(t,r,i,a,u))}async function se(e,o,t){let r=(await e.getVersion()).overlayVersion;if(r===void 0)return t.warning("The CodeQL CLI does not support overlay analysis."),!1;for(let i of o.languages){let a=g(o,i);if((await e.resolveQueriesStartingPacks([a])).some(s=>!Q(s,r,t)))return!1}return!0}function Q(e,o,t){try{let r=l.join(e,"qlpack.yml");if(n.existsSync(r)||(r=l.join(e,"codeql-pack.yml")),!h(n.readFileSync(r,"utf8")).buildMetadata)return!0;let a=l.join(e,".packinfo");if(!n.existsSync(a))return t.warning(`The query pack at ${e} does not have a .packinfo file, so it cannot support overlay analysis. Recompiling the query pack with the latest CodeQL CLI should solve this problem.`),!1;let s=JSON.parse(n.readFileSync(a,"utf8")).overlayVersion;if(typeof s!="number")return t.warning(`The .packinfo file for the query pack at ${e} does not have the overlayVersion field, which indicates that the pack is not compatible with overlay analysis.`),!1;if(s!==o)return t.warning(`The query pack at ${e} was compiled with overlay version ${s}, but the CodeQL CLI supports overlay version ${o}. The query pack needs to be recompiled to support overlay analysis.`),!1}catch(r){return t.warning(`Error while checking pack at ${e} for overlay compatibility: ${c(r)}`),!1}return!0}async function le(e,o){if(e.includes("python")&&process.platform==="win32"&&!(await o.getVersion()).features?.supportsPython312){let t=l.resolve(__dirname,"../python-setup","check_python12.ps1");await new k.ToolRunner(await O.which("powershell",!0),[t]).exec()}}function ue(e,o,t={},r=n.rmSync){if(n.existsSync(e.dbLocation)&&(n.statSync(e.dbLocation).isFile()||n.readdirSync(e.dbLocation).length>0)){t.disableExistingDirectoryWarning||o.warning(`The database cluster directory ${e.dbLocation} must be empty. Attempting to clean it up.`);try{r(e.dbLocation,{force:!0,maxRetries:3,recursive:!0}),o.info(`Cleaned up database cluster directory ${e.dbLocation}.`)}catch(i){let a=`The CodeQL Action requires an empty database cluster directory. ${b("db-location")?`This is currently configured to be ${e.dbLocation}. `:`By default, this is located at ${e.dbLocation}. You can customize it using the 'db-location' input to the init Action. `}An attempt was made to clean up the directory, but this failed.`;throw w()?new m(`${a} This can happen if another process is using the directory or the directory is owned by a different user. Please clean up the directory manually and rerun the job. Details: ${c(i)}`):new Error(`${a} This shouldn't typically happen on hosted runners. If you are using an advanced setup, please check your workflow, otherwise we recommend rerunning the job. Details: ${c(i)}`)}}}async function pe(e,o,t,r){return e?{enabled:!0,enabledByRepositoryProperty:!1,showDeprecationWarning:!1}:C()?(process.env.CODEQL_ACTION_FILE_COVERAGE_ON_PRS||"").toLocaleLowerCase()==="true"?{enabled:!0,enabledByRepositoryProperty:!1,showDeprecationWarning:!1}:r["github-codeql-file-coverage-on-prs"]===!0?{enabled:!0,enabledByRepositoryProperty:!0,showDeprecationWarning:!1}:await t.getValue("skip_file_coverage_on_prs",o)?{enabled:!1,enabledByRepositoryProperty:!1,showDeprecationWarning:!1}:{enabled:!0,enabledByRepositoryProperty:!1,showDeprecationWarning:!0}:{enabled:!0,enabledByRepositoryProperty:!1,showDeprecationWarning:!1}}function ce(e){if(process.env.CODEQL_ACTION_DID_LOG_FILE_COVERAGE_ON_PRS_DEPRECATION)return;let o=S.context.payload.repository?.owner.type,t="Starting April 2026, the CodeQL Action will skip computing file coverage information on pull requests to improve analysis performance. File coverage information will still be computed on non-PR analyses.",r="set the `CODEQL_ACTION_FILE_COVERAGE_ON_PRS` environment variable to `true`.",i='create a custom repository property with the name `github-codeql-file-coverage-on-prs` and the type "True/false", then set this property to `true` in the repository\'s settings.';o==="Organization"?d()?t+=`
|
||||
|
||||
To opt out of this change, ${i}`:t+=`
|
||||
|
||||
To opt out of this change, ${r} Alternatively, ${i}`:d()?t+=`
|
||||
|
||||
To opt out of this change, switch to an advanced setup workflow and ${r}`:t+=`
|
||||
|
||||
To opt out of this change, ${r}`,e.warning(t),R.exportVariable("CODEQL_ACTION_DID_LOG_FILE_COVERAGE_ON_PRS_DEPRECATION","true")}export{ne as a,ie as b,ae as c,se as d,le as e,ue as f,pe as g,ce as h};
|
||||
@@ -0,0 +1,2 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{g as n,k as p,l as d,n as f}from"./chunk-XFYKKQKY.js";import{oa as l,rb as e}from"./chunk-V6LGBXSF.js";async function w(s,u,m,i,c,y,P){let b=await n(s,c),o={};for(let[t,g]of l(b)){let a=e(t),r=await p(s,u,i,g,y,a);await d(s,P,a,r),m==="always"&&(o[t]=await f(s,i,a,r))}return o}export{w as a};
|
||||
@@ -0,0 +1,21 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{b as Y}from"./chunk-U2JW7LOC.js";import{a as j,b as H}from"./chunk-HIJVM6IW.js";import{e as z}from"./chunk-LYJYPMC2.js";import{Bb as k,Db as U,Eb as q,G as b,H as Q,Lb as B,c as te,ea as A,fa as N,h as ne,hc as v,jc as G,n as x,nb as R,o as O,pb as F,ra as $,ta as M}from"./chunk-V6LGBXSF.js";var K=te(ne());import*as c from"fs";import*as p from"path";import{performance as D}from"perf_hooks";var T=class extends Error{constructor(t,a,r){super(a);this.queriesStatusReport=t;this.message=a;this.error=r;this.name="CodeQLAnalysisError"}queriesStatusReport;message;error};async function ae(n){let e=process.env.CODEQL_PYTHON;e===void 0||e.length===0||n.warning(`The CODEQL_PYTHON environment variable is no longer supported. Please remove it from your workflow. This environment variable was originally used to specify a Python executable that included the dependencies of your Python code, however Python analysis no longer uses these dependencies.
|
||||
If you used CODEQL_PYTHON to force the version of Python to analyze as, please use CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION instead, such as 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=2.7' or 'CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION=3.11'.`)}async function re(n,e,t,a){for(let r of t.languages){if(X(t,r,a)){a.debug(`Database for ${r} has already been finalized, skipping extraction.`);continue}await ie(n,t,r)&&(a.startGroup(`Extracting ${r}`),r==="python"&&await ae(a),t.buildMode?(r==="cpp"&&t.buildMode==="autobuild"&&await Y(n,a),r==="java"&&t.buildMode==="none"&&(process.env.CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_DEPENDENCY_DIR=j()),r==="csharp"&&t.buildMode==="none"&&await e.getValue("csharp_cache_bmn")&&(process.env.CODEQL_EXTRACTOR_CSHARP_OPTION_BUILDLESS_DEPENDENCY_DIR=H()),await n.extractUsingBuildMode(t,r)):await n.extractScannedLanguage(t,r),a.endGroup())}}async function ie(n,e,t){return e.buildMode==="none"||e.buildMode==="autobuild"&&process.env.CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY!=="true"||!e.buildMode&&await n.isScannedLanguage(t)}function X(n,e,t){let a=b(n,e);try{return!("inProgress"in x(c.readFileSync(p.resolve(a,"codeql-database.yml"),"utf8")))}catch{return t.warning(`Could not check whether database for ${e} was finalized. Assuming it is not.`),!1}}async function se(n,e,t,a,r,o){let i=D.now();await re(n,e,t,o);let d=D.now()-i,_=D.now();for(let m of t.languages)X(t,m,o)?o.info(`There is already a finalized database for ${m} at the location where the CodeQL Action places databases, so we did not create one.`):(o.startGroup(`Finalizing ${m}`),await n.finalizeDatabase(b(t,m),a,r,t.debugMode),o.endGroup());let l=D.now()-_;return{scanned_language_extraction_duration_ms:Math.round(d),trap_import_duration_ms:Math.round(l)}}async function Me(n){return await k("Generating diff range extension pack",async()=>{let e=B(n);if(e===void 0){n.info("No precomputed diff ranges found; skipping diff-informed analysis stage.");return}let t=$("checkout_path"),a=ue(n,e,t);return n.info(`Successfully created diff range extension pack at ${a}.`),a})}function oe(n,e){let t=`
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/util
|
||||
extensible: restrictAlertsTo
|
||||
checkPresence: false
|
||||
data:
|
||||
`,a=n.map(r=>{let o=p.join(e,r.path).replaceAll(p.sep,"/");return` - [${O(o,{forceQuotes:!0}).trim()}, ${r.startLine}, ${r.endLine}]
|
||||
`}).join("");return a||(a=` - ["", 0, 0]
|
||||
`),t+a}function ue(n,e,t){e.length===0&&(e=[{path:"",startLine:0,endLine:0}]);let a=p.join(M(),"pr-diff-range");c.mkdirSync(a,{recursive:!0}),c.writeFileSync(p.join(a,"qlpack.yml"),`
|
||||
name: codeql-action/pr-diff-range
|
||||
version: 0.0.0
|
||||
library: true
|
||||
extensionTargets:
|
||||
codeql/util: '*'
|
||||
dataExtensions:
|
||||
- pr-diff-range.yml
|
||||
`);let r=oe(e,t),o=p.join(a,"pr-diff-range.yml");return c.writeFileSync(o,r),n.debug(`Wrote pr-diff-range extension pack to ${o}:
|
||||
${r}`),a}var le=new Set(["security-experimental","security-extended","security-and-quality","code-quality","code-scanning"]);function V(n,e){return le.has(e)?`${n}-${e}.qls`:e}function de(n,e){return`${e}${n.sarifExtension}`}async function Fe(n,e,t,a,r,o,i,d,_){let l={},m=[e,t],L=[];i.overlayDatabaseMode!=="overlay-base"&&m.push("--expect-discarded-cache"),l.analysis_is_diff_informed=a!==void 0,a&&(m.push(`--additional-packs=${a}`),m.push("--extension-packs=codeql-action/pr-diff-range"),L.push("diff-informed")),l.analysis_is_overlay=i.overlayDatabaseMode==="overlay",l.analysis_builds_overlay_base_database=i.overlayDatabaseMode==="overlay-base",i.overlayDatabaseMode==="overlay"&&L.push("overlay");let J=L.length>0?`--sarif-run-property=incrementalMode=${L.join(",")}`:void 0,W=G(i);for(let s of i.languages)try{let u=[];if(i.analysisKinds.length>1&&(u.push(Q(i,s)),v(i)))for(let C of R)u.push(V(s,C));d.startGroup(`Running queries for ${s}`);let y=new Date().getTime(),h=b(i,s);await o.databaseRunQueries(h,m,u),d.debug(`Finished running queries for ${s}.`),l[`analyze_builtin_queries_${s}_duration_ms`]=new Date().getTime()-y;let g=new Date,{summary:f,sarifFile:I}=await S(W,s,void 0,i.debugMode),w;i.analysisKinds.length>1&&v(i)&&(w=(await S(F,s,R.map(E=>V(s,E)),i.debugMode)).summary);let P=new Date;if(l[`interpret_results_${s}_duration_ms`]=P.getTime()-g.getTime(),d.endGroup(),f.trim()&&d.info(f),w?.trim()&&d.info(w),i.enableFileCoverageInformation||d.info("To speed up pull request analysis, file coverage information is only enabled when analyzing the default branch and protected branches."),await _.getValue("qa_telemetry_enabled")){let C=ee(I),E={event:"codeql database interpret-results",started_at:g.toISOString(),completed_at:P.toISOString(),exit_status:"success",language:s,properties:{alertCounts:C}};l.event_reports===void 0&&(l.event_reports=[]),l.event_reports.push(E)}}catch(u){throw l.analyze_failure_language=s,new T(l,`Error running analysis for ${s}: ${N(u)}`,A(u))}return l;async function S(s,u,y,h){d.info(`Interpreting ${s.name} results for ${u}`);let g=s.fixCategory(d,r),f=p.join(n,de(s,u));return{summary:await Z(u,y,f,h,g),sarifFile:f}}async function Z(s,u,y,h,g){let f=b(i,s);return await o.databaseInterpretResults(f,u,y,t,h?"-vv":"-v",J,g,i,_)}function ee(s){let u=JSON.parse(c.readFileSync(s,"utf8")),y={};for(let h of u.runs)if(h.results)for(let g of h.results){let f=g.rule?.id||g.ruleId;f&&(y[f]=(y[f]||0)+1)}return y}}async function ke(n,e,t,a,r,o,i){try{await c.promises.rm(e,{force:!0,recursive:!0})}catch(_){if(_?.code!=="ENOENT")throw _}await c.promises.mkdir(e,{recursive:!0});let d=await se(r,n,o,t,a,i);return process.env.CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY!=="true"&&await z(r,o,i),d}async function Ue(n,e){let t=process.env.CODEQL_ACTION_GO_BINARY;if(process.env.CODEQL_ACTION_DID_AUTOBUILD_GOLANG!=="true"&&t!==void 0){let a=await K.which("go",!0);t!==a&&(e.warning(`Expected \`which go\` to return ${t}, but got ${a}: please ensure that the correct version of Go is installed before the \`codeql-action/init\` Action is used.`),q(n,"go",U("go/workflow/go-installed-after-codeql-init","Go was installed after the `codeql-action/init` Action was run",{markdownMessage:"To avoid interfering with the CodeQL analysis, perform all installation steps before calling the `github/codeql-action/init` Action.",visibility:{statusPage:!0,telemetry:!0,cliSummaryTable:!0},severity:"warning"})))}}export{T as a,X as b,Me as c,Fe as d,ke as e,Ue as f};
|
||||
@@ -0,0 +1,2 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{Aa as q,Da as J,K as C,M as y,O,Oa as L,P as k,R as E,Ra as P,Va as W,X as m,Z as N,ac as F,c as K,cb as j,fa as d,k as Y,ra as D,sa as S,ua as x,va as R,y as U,za as B}from"./chunk-V6LGBXSF.js";var r=K(Y());import*as H from"os";function G(e){return e!=="upload-sarif"?!0:process.env.CODEQL_ACTION_INIT_HAS_RUN==="true"}function me(e){return!G(e)}var X=(t=>(t.UnknownStatus="JOB_STATUS_UNKNOWN",t.SuccessStatus="JOB_STATUS_SUCCESS",t.FailureStatus="JOB_STATUS_FAILURE",t.ConfigErrorStatus="JOB_STATUS_CONFIGURATION_ERROR",t))(X||{});function Se(e,n){return e||n?e instanceof O?"user-error":"failure":"success"}function be(e){switch(e){case"JOB_STATUS_SUCCESS":return"success";case"JOB_STATUS_FAILURE":return"failure";case"JOB_STATUS_CONFIGURATION_ERROR":return"configuration error";case"JOB_STATUS_UNKNOWN":return"unknown";default:C(e)}}function Z(e){e==="user-error"?r.exportVariable("CODEQL_ACTION_JOB_STATUS",process.env.CODEQL_ACTION_JOB_STATUS??"JOB_STATUS_CONFIGURATION_ERROR"):(e==="failure"||e==="aborted")&&r.exportVariable("CODEQL_ACTION_JOB_STATUS",process.env.CODEQL_ACTION_JOB_STATUS??"JOB_STATUS_FAILURE")}async function ee(e,n,o,a,t,u,p,g){try{let _=S("sha")||process.env.GITHUB_SHA||"",b=await j(),c=process.env.JOB_RUN_UUID||"",i=B(),l=q(),w=process.env.GITHUB_WORKFLOW||"",M=process.env.GITHUB_JOB||"",V=await W(),f=process.env.CODEQL_WORKFLOW_STARTED_AT;f===void 0&&(f=o.toISOString(),r.exportVariable("CODEQL_WORKFLOW_STARTED_AT",f));let v=y("RUNNER_OS"),T=E(),Q=process.env.GITHUB_ACTION_REF||"",h=N();h&&r.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT",h);let $=process.env.CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP==="true",s={action_name:e,action_oid:"unknown",action_ref:Q,action_started_at:o.toISOString(),action_version:x(),analysis_kinds:a?.analysisKinds?.join(","),analysis_key:V,build_mode:a?.buildMode,commit_oid:_,first_party_analysis:G(e),job_name:M,job_run_uuid:c,ref:b,runner_os:v,started_at:f,status:n,steady_state_default_setup:$,testing_environment:h||"",workflow_name:w,workflow_run_attempt:l,workflow_run_id:i};try{s.actions_event_name=R()}catch(z){u.warning(`Could not determine the workflow event name: ${d(z)}.`)}a&&(s.languages=a.languages?.join(",")),t&&(s.runner_available_disk_space_bytes=t.numAvailableBytes,s.runner_total_disk_space_bytes=t.numTotalBytes),p&&(s.cause=p),g&&(s.exception=g),(n==="success"||n==="failure"||n==="aborted"||n==="user-error")&&(s.completed_at=new Date().toISOString());let A=D("matrix");A&&(s.matrix_vars=A),"RUNNER_ARCH"in process.env&&(s.runner_arch=process.env.RUNNER_ARCH),v==="Linux"&&J()||(s.runner_os_release=H.release()),T!==void 0&&(s.codeql_version=T.version);let I=process.env.ImageVersion;return I&&(s.runner_image_version=I),s}catch(_){if(u.warning(`Failed to gather information for telemetry: ${d(_)}. Will skip sending status report.`),m())throw _;return}}var te="CodeQL Action is out-of-date. Please upgrade to the latest version of `codeql-action`.",re="CodeQL Action version is incompatible with the API endpoint. Please update to a compatible version of `codeql-action`.";async function ne(e){Z(e.status);let n=JSON.stringify(e);if(r.debug(`Sending status report: ${n}`),m()){r.debug("In test mode. Status reports are not uploaded.");return}let o=L(),a=P();try{await a.request("PUT /repos/:owner/:repo/code-scanning/analysis/status",{owner:o.owner,repo:o.repo,data:n})}catch(t){let u=k(t);if(u!==void 0)switch(u.status){case 403:R()==="push"&&process.env.GITHUB_ACTOR==="dependabot[bot]"?r.warning('Workflows triggered by Dependabot on the "push" event run with read-only access. Uploading CodeQL results requires write access. To use CodeQL with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. See https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push for more information on how to configure these events.'):r.warning(`This run of the CodeQL Action does not have permission to access the CodeQL Action API endpoints. This could be because the Action is running on a pull request from a fork. If not, please ensure the workflow has at least the 'security-events: read' permission. Details: ${u.message}`);return;case 404:r.warning(u.message);return;case 422:y("GITHUB_SERVER_URL")!==U?r.debug(re):r.debug(te);return}r.warning(`An unexpected error occurred when sending a status report: ${d(t)}`)}}async function we(e,n,o,a,t,u){let p=e.languages.join(","),g=(e.originalUserInput.paths||[]).join(","),_=(e.originalUserInput["paths-ignore"]||[]).join(","),b=e.originalUserInput["disable-default-queries"]?p:"",c=[],i=S("queries")?.trim();(i===void 0||i.startsWith("+"))&&c.push(...(e.originalUserInput.queries||[]).map(w=>w.uses)),i!==void 0&&(i=i.startsWith("+")?i.slice(1):i,c.push(...i.split(",")));let l={};return Array.isArray(e.computedConfig.packs)?l[e.languages[0]]=e.cLine truncated
|
||||
@@ -0,0 +1,2 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{c as F,fa as m,j as k}from"./chunk-V6LGBXSF.js";var l=F(k());import*as d from"fs";import*as h from"os";import*as f from"path";var S={type:"Personal Access Token (Classic)",pattern:/\bghp_[a-zA-Z0-9]{36}\b/g},z={type:"Personal Access Token (Fine-grained)",pattern:/\bgithub_pat_[a-zA-Z0-9_]+\b/g},b=[S,z,{type:"OAuth Access Token",pattern:/\bgho_[a-zA-Z0-9]{36}\b/g},{type:"User-to-Server Token",pattern:/\bghu_[a-zA-Z0-9]{36}\b/g},{type:"Server-to-Server Token",pattern:/\bghs_[a-zA-Z0-9]{36}\b/g},{type:"Refresh Token",pattern:/\bghr_[a-zA-Z0-9]{36}\b/g},{type:"App Installation Access Token",pattern:/\bghs_[a-zA-Z0-9]{255}\b/g}];function R(e,a=b){for(let{type:t,pattern:s}of a)if(e.match(s))return t}function x(e,a,t){let s=[];try{let i=d.readFileSync(e,"utf8");for(let{type:u,pattern:r}of b){let o=i.match(r);if(o){for(let c=0;c<o.length;c++)s.push({tokenType:u,filePath:a});t.debug(`Found ${o.length} ${u}(s) in ${a}`)}}return s}catch(i){return t.debug(`Could not scan file ${e} for tokens: ${m(i)}`),[]}}async function $(e,a,t,s,i=0){if(i>10)throw new Error(`Maximum archive extraction depth (10) reached for ${e}`);if(process.platform==="win32")throw new Error("Scanning archives is not supported on Windows.");let r={scannedFiles:0,findings:[]};try{let o=d.mkdtempSync(f.join(t,`extract-${i}-`)),c=f.basename(e).toLowerCase();if(c.endsWith(".tar.gz")||c.endsWith(".tgz"))s.debug(`Extracting tar.gz file: ${e}`),await l.exec("tar",["-xzf",e,"-C",o],{silent:!0});else if(c.endsWith(".tar.zst"))s.debug(`Extracting tar.zst file: ${e}`),await l.exec("tar",["--zstd","-xf",e,"-C",o],{silent:!0});else if(c.endsWith(".zst")){s.debug(`Extracting zst file: ${e}`);let p=f.join(o,f.basename(e,".zst"));await l.exec("zstd",["-d",e,"-o",p],{silent:!0})}else if(c.endsWith(".gz")){s.debug(`Extracting gz file: ${e}`);let p=f.join(o,f.basename(e,".gz"));await l.exec("gunzip",["-c",e],{outStream:d.createWriteStream(p),silent:!0})}else c.endsWith(".zip")&&(s.debug(`Extracting zip file: ${e}`),await l.exec("unzip",["-q","-o",e,"-d",o],{silent:!0}));let n=await T(o,a,s,i+1);r.scannedFiles+=n.scannedFiles,r.findings.push(...n.findings),d.rmSync(o,{recursive:!0,force:!0})}catch(o){s.debug(`Could not extract or scan archive file ${e}: ${m(o)}`)}return r}async function A(e,a,t,s,i=0){let u={scannedFiles:1,findings:[]},r=f.basename(e).toLowerCase();if(r.endsWith(".zip")||r.endsWith(".tar.gz")||r.endsWith(".tgz")||r.endsWith(".tar.zst")||r.endsWith(".zst")||r.endsWith(".gz")){let n=await $(e,a,t,s,i);u.scannedFiles+=n.scannedFiles,u.findings.push(...n.findings)}let c=x(e,a,s);return u.findings.push(...c),u}async function T(e,a,t,s=0){let i={scannedFiles:0,findings:[]},u=d.readdirSync(e,{withFileTypes:!0});for(let r of u){let o=f.join(e,r.name),c=f.join(a,r.name);if(r.isDirectory()){let n=await T(o,c,t,s);i.scannedFiles+=n.scannedFiles,i.findings.push(...n.findings)}else if(r.isFile()){let n=await A(o,c,f.dirname(o),t,s);i.scannedFiles+=n.scannedFiles,i.findings.push(...n.findings)}}return i}async function _(e,a){a.info("Starting best-effort check for potential GitHub tokens in debug artifacts (for testing purposes only)...");let t={scannedFiles:0,findings:[]},s=d.mkdtempSync(f.join(h.tmpdir(),"artifact-scan-"));try{for(let n of e){let p=d.statSync(n),y=f.basename(n);if(p.isDirectory()){let g=await T(n,y,a);t.scannedFiles+=g.scannedFiles,t.findings.push(...g.findings)}else if(p.isFile()){let g=await A(n,y,s,a);t.scannedFiles+=g.scannedFiles,t.findings.push(...g.findings)}}let i=new Map,u=new Set;for(let n of t.findings)i.set(n.tokenType,(i.get(n.tokenType)||0)+1),u.add(n.filePath);let r=Array.from(i.entries()).map(([n,p])=>`${p} ${n}${p>1?"s":""}`).join(", "),o=`scanned ${t.scannedFiles} files, found ${t.findings.length} potential token(s) in ${u.size} file(s)`,c=r?`${o} (${r})`:o;if(a.info(`Artifact check complete: ${c}`),t.findings.length>0){let n=Array.from(u).join(", ");throw new Error(`Found ${t.findings.length} potential GitHub token(s) (${r}) in debug artifacts at: ${n}. This is a best-effort check for testing purposes only.`)}}finally{try{d.rmSync(s,{recursive:!0,force:!0})}catch(i){a.debug(`Could not clean up temporary scan directory: ${m(i)}`)}}}export{S as a,z as b,R as c,_ as d};
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{M as w,Pb as F,Vb as H,Ya as E,c as D,fa as b,ta as C,tb as k,wb as _}from"./chunk-V6LGBXSF.js";var h=D(H()),l=D(F());import*as f from"os";import{join as d}from"path";var x="codeql-dependencies",v=1;function Q(){return d(C(),"codeql_java","repository")}async function K(){return[d(f.homedir(),".m2","repository"),d(f.homedir(),".gradle","caches"),Q()]}function U(){return d(C(),"codeql_csharp","repository")}async function A(e,n){let r=[d(f.homedir(),".nuget","packages")];return await n.getValue("csharp_cache_bmn",e)&&r.push(U()),r}async function z(e){if((await(await I(e)).glob()).length!==0)return e}var T=["**/packages.lock.json","**/paket.lock"],j=["**/*.csproj","**/packages.config","**/nuget.config"];async function M(e,n){let r=await m.makePatternCheck(T);if(r!==void 0)return r;if(await n.getValue("csharp_new_cache_key",e))return m.makePatternCheck(j)}var R={java:{getDependencyPaths:K,getHashPatterns:async()=>m.makePatternCheck(["**/pom.xml","**/*.gradle*","**/gradle-wrapper.properties","buildSrc/**/Versions.kt","buildSrc/**/Dependencies.kt","gradle/*.versions.toml","**/versions.properties"])},csharp:{getDependencyPaths:A,getHashPatterns:M},go:{getDependencyPaths:async()=>[d(f.homedir(),"go","pkg","mod")],getHashPatterns:async()=>m.makePatternCheck(["**/go.sum"])}};async function I(e){return l.create(e.join(`
|
||||
`))}async function S(e,n,r,t,a,o){let s=await t.getHashPatterns(e,n);return s===void 0&&o.info(`Skipping ${a} of dependency cache for ${r} as we cannot calculate a hash for the cache key.`),s}async function oe(e,n,r,t){let a=[],o=[];for(let s of r){let p=R[s];if(p===void 0){t.info(`Skipping download of dependency cache for ${s} as we have no caching configuration for it.`);continue}let c=await S(e,n,s,p,"download",t);if(c===void 0){a.push({language:s,hit_kind:"no-hash"});continue}let u=await L(e,n,s,c),i=[await $(e,n,s)];t.info(`Downloading cache for ${s} with key ${u} and restore keys ${i.join(", ")}`);let y=performance.now(),g=await h.restoreCache(await p.getDependencyPaths(e,n),u,i),N=Math.round(performance.now()-y);if(g!==void 0){t.info(`Cache hit on key ${g} for ${s}.`);let P="partial";g===u&&(P="exact"),a.push({language:s,hit_kind:P,download_duration_ms:N}),o.push(g)}else a.push({language:s,hit_kind:"miss"}),t.info(`No suitable cache found for ${s}.`)}return{statusReport:a,restoredKeys:o}}async function re(e,n,r,t){let a=[];for(let o of r.languages){let s=R[o];if(s===void 0){t.info(`Skipping upload of dependency cache for ${o} as we have no caching configuration for it.`);continue}let p=await S(e,n,o,s,"upload",t);if(p===void 0){a.push({language:o,result:"no-hash"});continue}let c=await L(e,n,o,p);if(r.dependencyCachingRestoredKeys.includes(c)){a.push({language:o,result:"duplicate"});continue}let u=await k(await s.getDependencyPaths(e,n),t,!0);if(u===0){a.push({language:o,result:"empty"}),t.info(`Skipping upload of dependency cache for ${o} since it is empty.`);continue}t.info(`Uploading cache of size ${u} for ${o} with key ${c}...`);try{let i=performance.now();await h.saveCache(await s.getDependencyPaths(e,n),c);let y=Math.round(performance.now()-i);a.push({language:o,result:"stored",upload_size_bytes:Math.round(u),upload_duration_ms:y})}catch(i){if(i instanceof h.ReserveCacheError)t.info(`Not uploading cache for ${o}, because ${c} is already in use.`),t.debug(i.message),a.push({language:o,result:"duplicate"});else throw i}}return a}async function L(e,n,r,t){let a=await l.hashFiles(t.join(`
|
||||
`));return`${await $(e,n,r)}${a}`}async function V(e,n,r){let t=[],a=async o=>{await n.getValue(o,e)&&t.push(o)};return r==="csharp"&&(await a("csharp_new_cache_key"),await a("csharp_cache_bmn")),t.length>0?`${_(t)}-`:""}async function $(e,n,r){let t=w("RUNNER_OS"),a=process.env.CODEQL_ACTION_DEPENDENCY_CACHE_PREFIX,o=x;a!==void 0&&a.length>0&&(o=`${o}-${a}`);let s=await V(e,n,r);return`${o}-${s}${v}-${t}-${r}-`}async function se(e){try{let n=await E(x),r=n.reduce((t,a)=>t+(a.size_in_bytes??0),0);return{count:n.length,size_bytes:r}}catch(n){e.warning(`Unable to retrieve information about dependency cache usage: ${b(n)}`)}}var m={makePatternCheck:z};export{Q as a,U as b,oe as c,re as d,se as e};
|
||||
@@ -0,0 +1,16 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{$a as yt,Aa as lt,B as Xe,Bb as Rt,Cb as ee,Db as St,Ea as ye,Fb as Le,G as $,Ga as ct,Ha as X,Ia as B,Ib as Tt,Ja as ft,K as I,M as Y,Ma as gt,Nb as Ot,O as C,Q as et,Qb as Ao,R as tt,Ra as we,S as he,Sa as pt,T as ot,Vb as Po,W as rt,Wa as ht,X as A,Ya as mt,Za as bt,_a as vt,a as Q,aa as me,ab as wt,b as fe,ba as be,c as v,db as Ct,ea as nt,eb as Et,f as Do,fa as L,fb as Lt,fc as _t,gb as Ce,h as $o,i as Ye,ja as V,jb as Ee,k as Ke,ka as K,kc as xe,ma as it,o as ge,p as Z,ra as at,sa as st,ua as ve,wa as dt,wb as xt,y as pe,za as ut}from"./chunk-V6LGBXSF.js";var Ut=fe((mn,Nt)=>{"use strict";Nt.exports=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var s=i[n];if(!e(t[s],o[s]))return!1}return!0}return t!==t&&o!==o}});var Wt=fe((wn,Gt)=>{var N;Gt.exports=function(){if(!N){try{N=Ao()("follow-redirects")}catch{}typeof N!="function"&&(N=function(){})}N.apply(null,arguments)}});var Xt=fe((Cn,Ue)=>{var k=Q("url"),U=k.URL,er=Q("http"),tr=Q("https"),Me=Q("stream").Writable,Fe=Q("assert"),Jt=Wt();(function(){var t=typeof process<"u",o=typeof window<"u"&&typeof document<"u",r=_(Error.captureStackTrace);!t&&(o||!r)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var Qe=!1;try{Fe(new U(""))}catch(e){Qe=e.code==="ERR_INVALID_URL"}var or=["Authorization","Proxy-Authorization","Cookie"],rr=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Ie=["abort","aborted","connect","error","socket","timeout"],Ve=Object.create(null);Ie.forEach(function(e){Ve[e]=function(t,o,r){this._redirectable.emit(e,t,o,r)}});var $e=q("ERR_INVALID_URL","Invalid URL",TypeError),Ae=q("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),nr=q("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Ae),ir=q("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),ar=q("ERR_STREAM_WRITE_AFTER_END","write after end"),sr=Me.prototype.destroy||Yt;function w(e,t){Me.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var o=this;this._onNativeResponse=function(r){try{o._processResponse(r)}catch(n){o.emit("error",n instanceof Ae?n:new Ae({cause:n}))}},this._headerFilter=new RegExp("^(?:"+or.concat(e.sensitiveHeaders).map(gr).join("|")+")$","i"),this._performRequest()}w.prototype=Object.create(Me.prototype);w.prototype.abort=function(){Ne(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};w.prototype.destroy=function(e){return Ne(this._currentRequest,e),sr.call(this,e),this};w.prototype.write=function(e,t,o){if(this._ending)throw new ar;if(!O(e)&&!cr(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(_(t)&&(o=t,t=null),e.length===0){o&&o();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,o)):(this.emit("error",new ir),this.abort())};w.prototype.end=function(e,t,o){if(_(e)?(o=e,e=t=null):_(t)&&(o=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,o);else{var r=this,n=this._currentRequest;this.write(e,t,function(){r._ended=!0,n.end(null,null,o)}),this._ending=!0}};w.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};w.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};w.prototype.setTimeout=function(e,t){var o=this;function r(s){s.setTimeout(e),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function n(s){o._timeout&&clearTimeout(o._timeout),o._timeout=setTimeout(function(){o.emit("timeout"),i()},e),r(s)}function i(){o._timeout&&(clearTimeout(o._timeout),o._timeout=null),o.removeListener("abort",i),o.removeListener("error",i),o.removeListener("response",i),o.removeListener("close",i),t&&o.removeListener("timeout",t),o.socket||o._currentRequest.removeListener("socket",n)}return t&&this.on("timeout",t),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",r),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){w.prototype[e]=function(t,o){return this._Line truncated
|
||||
`).pop()?.trim()||"n/a");d=`Encountered a fatal error while running "${i}". Exit code was ${r} and last log line was: ${u} See the logs for more details.`}super(d),this.exitCode=r,this.stderr=n}};function Qo(e){let t=/.*fatal (internal )?error occurr?ed(. Details)?:/gi,o=[],r,n;for(;(n=t.exec(e))!==null;)r!==void 0&&o.push(e.slice(r,n.index).trim()),r=n.index;if(r!==void 0){let i=e.slice(r).trim();if(o.length===0)return i;let s=!o.some(l=>l.includes(`
|
||||
`));return s&&(o=o.map(B)),[B(i),"Context:",...o.reverse()].join(s?" ":`
|
||||
`)}}function Io(e){let t=/.*\[autobuild\] \[ERROR\] (.*)/gi,o=[...e.matchAll(t)].map(r=>r[1]);return o.length>10&&(o=o.slice(0,10),o.push("(truncated)")),o.join(`
|
||||
`)||void 0}var Dt={AutobuildError:{cliErrorMessageCandidates:[new RegExp("We were unable to automatically build your code")]},CouldNotCreateTempDir:{cliErrorMessageCandidates:[new RegExp("Could not create temp directory")]},ExternalRepositoryCloneFailed:{cliErrorMessageCandidates:[new RegExp("Failed to clone external Git repository")]},GradleBuildFailed:{cliErrorMessageCandidates:[new RegExp("\\[autobuild\\] FAILURE: Build failed with an exception.")]},IncompatibleWithActionVersion:{cliErrorMessageCandidates:[new RegExp("is not compatible with this CodeQL CLI")]},InitCalledTwice:{cliErrorMessageCandidates:[new RegExp("Refusing to create databases .* but could not process any of it")],additionalErrorMessageToAppend:'Is the "init" action called twice in the same job?'},InvalidConfigFile:{cliErrorMessageCandidates:[new RegExp("Config file .* is not valid"),new RegExp("The supplied config file is empty")]},InvalidExternalRepoSpecifier:{cliErrorMessageCandidates:[new RegExp("Specifier for external repository is invalid")]},InvalidSourceRoot:{cliErrorMessageCandidates:[new RegExp("Invalid source root")]},MavenBuildFailed:{cliErrorMessageCandidates:[new RegExp("\\[autobuild\\] \\[ERROR\\] Failed to execute goal")]},NoBuildCommandAutodetected:{cliErrorMessageCandidates:[new RegExp("Could not auto-detect a suitable build method")]},NoBuildMethodAutodetected:{cliErrorMessageCandidates:[new RegExp("Could not detect a suitable build command for the source checkout")]},NoSourceCodeSeen:{exitCode:32,cliErrorMessageCandidates:[new RegExp("CodeQL detected code written in .* but could not process any of it"),new RegExp("CodeQL did not detect any code written in languages supported by CodeQL")]},NoSupportedBuildCommandSucceeded:{cliErrorMessageCandidates:[new RegExp("No supported build command succeeded")]},NoSupportedBuildSystemDetected:{cliErrorMessageCandidates:[new RegExp("No supported build system detected")]},OutOfMemoryOrDisk:{cliErrorMessageCandidates:[new RegExp("CodeQL is out of memory."),new RegExp("out of disk"),new RegExp("No space left on device")],additionalErrorMessageToAppend:"For more information, see https://gh.io/troubleshooting-code-scanning/out-of-disk-or-memory"},PackCannotBeFound:{cliErrorMessageCandidates:[new RegExp("Query pack .* cannot be found\\. Check the spelling of the pack\\."),new RegExp("is not a .ql file, .qls file, a directory, or a query pack specification.")]},PackMissingAuth:{cliErrorMessageCandidates:[new RegExp("GitHub Container registry .* 403 Forbidden"),new RegExp("Do you need to specify a token to authenticate to the registry?")]},SwiftBuildFailed:{cliErrorMessageCandidates:[new RegExp("\\[autobuilder/build\\] \\[build-command-failed\\] `autobuild` failed to run the build command")]},SwiftIncompatibleOs:{cliErrorMessageCandidates:[new RegExp("\\[incompatible-os\\]"),new RegExp("Swift analysis is only supported on macOS")]},UnsupportedBuildMode:{cliErrorMessageCandidates:[new RegExp("does not support the .* build mode. Please try using one of the following build modes instead")]},NotFoundInRegistry:{cliErrorMessageCandidates:[new RegExp("'.*' not found in the registry '.*'")]}};function Vo(e){for(let[t,o]of Object.entries(Dt)){if(e.exitCode!==void 0&&o.exitCode!==void 0&&e.exitCode===o.exitCode)return t;for(let r of o.cliErrorMessageCandidates)if(e.message.match(r)||e.stderr.match(r))return t}}function Bo(){return!Fo.some(([e,t])=>e===process.platform&&t===process.arch)}function No(e){return new C(`The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see https://codeql.github.com/docs/codeql-overview/system-requirements/). The underlying error was: ${e.message}`)}function $t(e){if(Bo())return No(e);let t=Vo(e);if(t===void 0)return e;let o=e.message,r=Dt[t].additionalErrorMessageToAppend;return r!==void 0&&(o=`${o} ${r}`),new C(o)}var Uo=new Uint8Array(16);function Re(){return crypto.getRandomValues(Uo)}var m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function At(e,t=0){return(m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+"-"+m[e[t+4]]+m[e[t+5]]+"-"+m[e[t+6]]+m[e[t+7]]+"-"+m[e[t+8]]+m[e[t+9]]+"-"+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]).toLowerCase()}function ko(e,t,o){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():qo(e,t,o)}function qo(e,t,o){e=e||{};let r=e.random??e.rng?.()??Re();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(o=o||0,o<0||o+16>t.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let n=0;n<16;++n)t[o+n]=r[n];return t}return At(r)}var Se=ko;var oe=v(Po()),re=v(Z());import*as Pt from"fs";var Mt=7500,zo=Mt*1e6,jo=1,Go="codeql-overlay-base-database",Ft=6e5;async function Qt(e,t,o,r){let n=ot(t);if(!Pt.existsSync(n))return o.warning(`${r}: ${n} does not exist`),!1;for(let i of t.languages){let s=$(t,i);try{let l=await e.resolveDatabase(s);if(l===void 0||!("overlayBaseSp
Line truncated
|
||||
`),await new Promise((i,s)=>{let l=Jo("tar",n,{stdio:"pipe"}),d="";l.stdout?.on("data",a=>{d+=a.toString(),process.stdout.write(a)});let u="";l.stderr?.on("data",a=>{u+=a.toString(),process.stdout.write(a)}),l.on("error",a=>{s(new Error(`Error while extracting tar: ${a}`))}),e instanceof ne.Readable&&e.pipe(l.stdin).on("error",a=>{s(new Error(`Error while downloading and extracting tar: ${a}`))}),l.on("exit",a=>{a!==0&&s(new X("tar",n,a??void 0,d,u)),i()})})}catch(n){throw await V(t,"extraction destination directory",r),n}}var Xo={"tar.gz":"gzip","tar.zst":"zstd"};function _e(e){for(let[t,o]of Object.entries(Xo))if(e.endsWith(`.${t}`))return o}var ke=v(Ke()),ro=v(Do()),no=v(xe()),io=v(Xt()),ao=v(Z());import*as ae from"fs";import*as to from"os";import*as oo from"path";import{performance as M}from"perf_hooks";var pr=4*1024*1024,hr="CodeQL";function mr(e,t){return{combinedDurationMs:e+t,downloadDurationMs:e,extractionDurationMs:t,streamExtraction:!1}}function br(e){return{combinedDurationMs:e,downloadDurationMs:void 0,extractionDurationMs:void 0,streamExtraction:!0}}async function so(e,t,o,r,n,i,s){s.info(`Downloading CodeQL tools from ${e} . This may take a while.`);try{if(t==="zstd"&&process.platform==="linux"){s.info("Streaming the extraction of the CodeQL bundle.");let c=M.now();await vr(e,o,r,n,i,s);let f=Math.round(M.now()-c);return s.info(`Finished downloading and extracting CodeQL bundle to ${o} (${ee(f)}).`),{compressionMethod:t,toolsUrl:eo(e),...br(f)}}}catch(c){ke.warning(`Failed to download and extract CodeQL bundle using streaming with error: ${L(c)}`),ke.warning("Falling back to downloading the bundle before extracting."),await V(o,"CodeQL bundle",s)}let l=M.now(),d=await no.downloadTool(e,void 0,r,n),u=Math.round(M.now()-l);s.info(`Finished downloading CodeQL bundle to ${d} (${ee(u)}).`);let a;try{s.info("Extracting CodeQL bundle.");let c=M.now();await ie(d,o,t,i,s),a=Math.round(M.now()-c),s.info(`Finished extracting CodeQL bundle to ${o} (${ee(a)}).`)}finally{await V(d,"CodeQL bundle archive",s)}return{compressionMethod:t,toolsUrl:eo(e),...mr(u,a)}}async function vr(e,t,o,r,n,i){ae.mkdirSync(t,{recursive:!0});let s=new ro.HttpClient().getAgent(e);r=Object.assign({"User-Agent":"CodeQL Action"},o?{authorization:o}:{},r);let l=await new Promise(d=>io.https.get(e,{headers:r,highWaterMark:pr,agent:s},u=>d(u)));if(l.statusCode!==200)throw new Error(`Failed to download CodeQL bundle from ${e}. HTTP status code: ${l.statusCode}.`);await Oe(l,t,n,i)}function uo(e){return oo.join(Y("RUNNER_TOOL_CACHE"),hr,ao.clean(e)||e,to.arch()||"")}function lo(e,t){let o=`${e}.complete`;ae.writeFileSync(o,""),t.info(`Created toolcache marker file ${o}`)}function eo(e){return["github/codeql-action","dsp-testing/codeql-cli-nightlies"].some(t=>e.startsWith(`https://github.com/${t}/releases/download/`))?e:"sanitized-value"}var H="github/codeql-action",co="dsp-testing",fo="codeql-cli-nightlies",mo=["linked","latest"],bo=["nightly","nightly-latest"],vo="toolcache";function Er(e){switch(e){case"gzip":return".tar.gz";case"zstd":return".tar.zst";default:I(e)}}function yo(e){let t=Er(e),o;if(process.platform==="win32")o="win64";else if(process.platform==="linux")o="linux64";else if(process.platform==="darwin")o="osx64";else return`codeql-bundle${t}`;return`codeql-bundle-${o}${t}`}function Lr(e){return dt()?(e.info("The CodeQL Action is checked out locally. Using the default CodeQL Action repository."),H):Y("GITHUB_ACTION_REPOSITORY")}async function xr(e,t,o,r){let n=Lr(r),s=[[t.url,n],[t.url,H],[pe,H]].filter((d,u,a)=>!a.slice(0,u).some(c=>(0,ho.default)(d,c))),l=yo(o);for(let d of s){let[u,a]=d;if(u===pe&&a===H)break;let[c,f]=a.split("/");try{let p=await we().rest.repos.getReleaseByTag({owner:c,repo:f,tag:e});for(let h of p.data.assets)if(h.name===l)return r.info(`Found CodeQL bundle ${l} in ${a} on ${u} with URL ${h.url}.`),h.url}catch(p){r.info(`Looked for CodeQL bundle ${l} in ${a} on ${u} but got error ${p}.`)}}return`https://github.com/${H}/releases/download/${e}/${l}`}function se(e,t){let o=e.match(/^codeql-bundle-(.*)$/);if(o===null||o.length<2){t.debug(`Could not determine bundle version from tag ${e}.`);return}return o[1]}function Rr(e,t){let o=[...e.matchAll(/\/(codeql-bundle-[^/]*)\//g)];if(o.length===0){t.debug(`Could not determine tag name for URL ${e}.`);return}let r=o[o.length-1];if(r?.length!==2){t.debug(`Could not determine tag name for URL ${e}. Matched ${JSON.stringify(r)}.`);return}return r[1]}function de(e,t){R.valid(e)||(t.debug(`Bundle version ${e} is not in SemVer format. Will treat it as pre-release 0.0.0-${e}.`),e=`0.0.0-${e}`);let o=R.clean(e);if(!o)throw new Error(`Bundle version ${e} is not in SemVer format.`);return o}async function Sr(e,t){let o=x.findAllVersions("CodeQL").filter(rt).map(r=>({folder:x.find("CodeQL",r),version:r})).filter(({folder:r})=>po.existsSync(qe.join(r,"pinned-version")));if(o.length===1){let r=o[0];return t.debug(`CodeQL tools version ${r.version} in toolcache overriding
Line truncated
|
||||
|
||||
Nightly releases do not undergo the same validation as regular releases and may lead to analysis instability.
|
||||
|
||||
If use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.`,visibility:{cliSummaryTable:!0,statusPage:!0,telemetry:!0},severity:"note"}))):d.info(`Using the latest CodeQL CLI nightly, as requested by 'tools: ${e}'.`),e=await Pr(d));let We=e&&mo.includes(e);if(We)u=yt,a=vt,d.info(`'tools: ${e}' was requested, so using CodeQL version ${u}, the version shipped with the Action.`),e==="latest"&&d.warning("`tools: latest` has been renamed to `tools: linked`, but the old name is still supported. No action is required.");else if(e!==void 0&&e===vo){let g,T=await l.getValue("allow_toolcache_input"),J=T&&(ye()||A());if(J&&(d.info(`Attempting to use the latest CodeQL CLI version in the toolcache, as requested by 'tools: ${e}'.`),g=Mr(d),g&&(u=g)),g===void 0){J?d.info(`Found no CodeQL CLI in the toolcache, ignoring 'tools: ${e}'...`):T?d.warning(`Ignoring 'tools: ${e}' because the workflow was not triggered dynamically.`):d.info(`Ignoring 'tools: ${e}' because the feature is not enabled.`);let Ze=await go(t,o,r,l,d);u=Ze.cliVersion,a=Ze.tagName}}else if(e!==void 0){if(a=Rr(e,d),c=e,a){let g=se(a,d);g&&R.valid(g)&&(u=de(g,d))}}else{let g=await go(t,o,r,l,d);u=g.cliVersion,a=g.tagName}let Je=a&&se(a,d),D=u??(Je&&de(Je,d))??a??c??"unknown";d.debug(`Attempting to obtain CodeQL tools. CLI version: ${u??"unknown"}, bundle tag name: ${a??"unknown"}, URL: ${c??"unspecified"}.`);let E;if(u&&(E=x.find("CodeQL",u),!E)){d.debug(`Didn't find a version of the CodeQL tools in the toolcache with a version number exactly matching ${u}.`);let g=x.findAllVersions("CodeQL");d.debug(`Found the following versions of the CodeQL tools in the toolcache: ${JSON.stringify(g)}.`);let T=g.filter(J=>J.startsWith(`${u}-`));T.length===1?(d.debug(`Exactly one version of the CodeQL tools starting with ${u} found in the toolcache, using that.`),E=x.find("CodeQL",T[0])):T.length===0?d.debug(`Didn't find any versions of the CodeQL tools starting with ${u} in the toolcache. Trying next fallback method.`):(d.warning(`Found ${T.length} versions of the CodeQL tools starting with ${u} in the toolcache, but at most one was expected.`),d.debug("Trying next fallback method."))}if(!E&&a){let g=await _r(u,a,d);g?E=x.find("CodeQL",g):d.debug(`Could not determine a fallback toolcache version number for CodeQL tools version ${D}.`)}if(E?d.info(`Found CodeQL tools version ${D} in the toolcache.`):d.info(`Did not find CodeQL tools version ${D} in the toolcache.`),E)return u?d.info(`Using CodeQL CLI version ${u} from toolcache at ${E}`):d.info(`Using CodeQL CLI from toolcache at ${E}`),{codeqlFolder:E,sourceType:"toolcache",toolsVersion:u??D};if(i==="GitHub Enterprise Server"&&!We&&!e){let g=await Sr(D,d);if(g!==void 0)return g}let W;if(!c)W=u!==void 0&&await Co(u,s)?"zstd":"gzip",c=await xr(a,n,W,d);else{let g=_e(c);if(g===void 0)throw new C(`Could not infer compression method from URL ${c}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.`);W=g}return u?d.info(`Using CodeQL CLI version ${u} sourced from ${c} .`):d.info(`Using CodeQL CLI sourced from ${c} .`),{bundleVersion:a&&se(a,d),cliVersion:u,codeqlURL:c,compressionMethod:W,sourceType:"download",toolsVersion:u??D}}async function _r(e,t,o){let r=se(t,o);if(!r)return;let n=de(r,o);return o.debug(`Computed a fallback toolcache version number of ${n} for CodeQL version ${e??t}.`),n}var Dr=async function(e,t,o,r,n,i,s,l){let d=new URL(e),u=new URLSearchParams(d.search),a={accept:"application/octet-stream"},c;u.has("token")?l.debug("CodeQL tools URL contains an authorization token."):c=pt(l,n,e);let f=$r(o,r,l),p=f?.path??Eo(s),h=await so(e,t,p,c,{"User-Agent":"CodeQL Action",...a},i,l);return f?(lo(f.path,l),{codeqlFolder:p,statusReport:h,toolsVersion:r??f.version}):(l.debug(`Could not cache CodeQL tools because we could not determine the bundle version from the URL ${e}.`),{codeqlFolder:p,statusReport:h,toolsVersion:r??"unknown"})};function $r(e,t,o){if(e){let r=Ar(t,e,o);return{path:uo(r),version:r}}}function Ar(e,t,o){return e?.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)?e:de(t,o)}async function wo(e,t,o,r,n,i,s,l,d){if(!await K("tar",d))throw new C("Could not find tar in PATH, so unable to extract CodeQL bundle.");let u=await Te(d),a=await Or(e,n,i,s,t,r,u.available,l,d),c,f=a.toolsVersion,p,h;switch(a.sourceType){case"local":{c=await ie(a.codeqlTarPath,Eo(o),a.compressionMethod,u.version,d),h="LOCAL";break}case"toolcache":c=a.codeqlFolder,d.debug(`CodeQL found in cache ${c}`),h="TOOLCACHE";break;case"download":{let S=await Dr(a.codeqlURL,a.compressionMethod,a.bundleVersion,a.cliVersion,t,u.version,o,d);f=S.toolsVersion,c=S.codeqlFolder,p=S.statusReport,h="DOWNLOAD";break}default:I(a)}return{codeqlFolder:c,toolsDownloadStatusReport:p,toolsSource:h,toolsVersion:f,zstdAvailability:u}}async function Co(e,t){return process.platform!=="win32"&&t&&R.gte(e,Ee)}function Eo(e){return qe.join(e,Se())}async function Pr(e){let t=await Te(e),o=await Co(Ee,t.available)?"zstd":"gzip";try{let n
Line truncated
|
||||
|
||||
Details: ${c.stack}`:""}`)}}async function ui(e){return G===void 0&&(G=await Oo(e,!0)),G}async function Oo(e,t){let o={getPath(){return e},async getVersion(){let r=tt();if(r===void 0){let n=await y(e,["version","--format=json"],{noStreamStdout:!0});try{r=JSON.parse(n)}catch{throw Error(`Invalid JSON output from \`version --format=json\`: ${n}`)}et(r)}return r},async printVersion(){await y(e,["version","--format=json"])},async supportsFeature(r){return Ce(await this.getVersion(),r)},async isTracedLanguage(r){let n=await this.resolveExtractor(r),i=F.join(n,"tools","tracing-config.lua");return le.existsSync(i)},async isScannedLanguage(r){return!await this.isTracedLanguage(r)},async databaseInitCluster(r,n,i,s,l){let d=r.languages.map(h=>`--language=${h}`);await ue(o,r)&&(d.push("--begin-tracing"),d.push(...await qr(r)),d.push(`--trace-process-name=${i}`));let u=await Ur(r,l),a=st("external-repository-token");d.push(`--codescanning-config=${u}`),a&&d.push("--external-repository-token-stdin"),r.buildMode!==void 0&&d.push(`--build-mode=${r.buildMode}`),s!==void 0&&d.push(`--qlconfig-file=${s}`);let c=Ce(await this.getVersion(),"forceOverwrite")?"--force-overwrite":"--overwrite",f=r.overlayDatabaseMode;if(f==="overlay"){let h=await Lt(r,n,l);d.push(`--overlay-changes=${h}`)}else f==="overlay-base"&&d.push("--overlay-base");let p=r.enableFileCoverageInformation?["--calculate-language-specific-baseline","--sublanguage-file-coverage"]:["--no-calculate-baseline"];await y(e,["database","init",...f==="overlay"?[]:[c],"--db-cluster",r.dbLocation,`--source-root=${n}`,...p,"--extractor-include-aliases",...d,...b(["database","init"],{ignoringOptions:["--overwrite",...p]})],{stdin:a}),f==="overlay-base"&&await Et(r,n)},async runAutobuild(r,n){So();let i=F.join(await this.resolveExtractor(n),"tools",process.platform==="win32"?"autobuild.cmd":"autobuild.sh");r.debugMode&&(process.env.CODEQL_VERBOSITY=process.env.CODEQL_VERBOSITY||To),await y(i)},async extractScannedLanguage(r,n){await y(e,["database","trace-command","--index-traceless-dbs",...await je(r,n),...ze(r.debugMode),...b(["database","trace-command"]),$(r,n)])},async extractUsingBuildMode(r,n){r.buildMode==="autobuild"&&So();try{await y(e,["database","trace-command","--use-build-mode","--working-dir",process.cwd(),...await je(r,n),...ze(r.debugMode),...b(["database","trace-command"]),$(r,n)])}catch(i){if(r.buildMode==="autobuild"){let s="We were unable to automatically build your code. Please change the build mode for this language to manual and specify build steps for your project. See https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed for more information.";throw new C(`${s} ${L(i)}`)}else throw i}},async finalizeDatabase(r,n,i,s){let l=["database","finalize","--finalize-dataset",n,i,...ze(s),...b(["database","finalize"]),r];await y(e,l)},async resolveLanguages(){let r=["resolve","languages","--format=json",...b(["resolve","languages"])],n=await y(e,r);try{return JSON.parse(n)}catch(i){throw new Error(`Unexpected output from codeql resolve languages: ${i}`)}},async betterResolveLanguages({filterToLanguagesWithQueries:r}={filterToLanguagesWithQueries:!1}){let n=["resolve","languages","--format=betterjson","--extractor-options-verbosity=4","--extractor-include-aliases",...r?["--filter-to-languages-with-queries"]:[],...b(["resolve","languages"])],i=await y(e,n);try{return JSON.parse(i)}catch(s){throw new Error(`Unexpected output from codeql resolve languages with --format=betterjson: ${s}`)}},async resolveBuildEnvironment(r,n){let i=["resolve","build-environment",`--language=${n}`,"--extractor-include-aliases",...b(["resolve","build-environment"])];r!==void 0&&i.push("--working-dir",r);let s=await y(e,i);try{return JSON.parse(s)}catch(l){throw new Error(`Unexpected output from codeql resolve build-environment: ${l} in
|
||||
${s}`)}},async databaseRunQueries(r,n,i=[]){let s=["database","run-queries",...n,r,"--min-disk-free=1024","-v",...i,...b(["database","run-queries"],{ignoringOptions:["--expect-discarded-cache"]})];await y(e,s)},async databaseInterpretResults(r,n,i,s,l,d,u,a,c){let f=await c.getValue("export_diagnostics_enabled",this),p=["database","interpret-results",s,"--format=sarif-latest",l,`--output=${i}`,"--print-diagnostics-summary","--print-metrics-summary","--sarif-add-baseline-file-info",`--sarif-codescanning-config=${Ge(a)}`,"--sarif-group-rules-by-pack","--sarif-include-query-help=always","--sublanguage-file-coverage",...await Hr(this),...b(["database","interpret-results"])];return d!==void 0&&p.push(d),u!==void 0&&p.push("--sarif-category",u),f?p.push("--sarif-include-diagnostics"):p.push("--no-sarif-include-diagnostics"),p.push(r),n&&p.push(...n),await y(e,p,{noStreamStdout:!0})},async databaseCleanupCluster(r,n){for(let i of r.languages){let l=["database","cleanup",$(r,i),`--cache-cleanup=${n}`,...b(["database","cleanup"])];await y(e,l)}},async databaseBundle(r,n,i,s,l){let d=s?["--include-diagnostics"]:[],u=["database","bundle",r,`--output=${n}`,`--name=${i}`,...d,...b(["database","bundle"],{ignoringOptions:d})];await this.supportsFeature("bundleSupportsIncludeOption")&&u.push(...l.flatMap(a=>["--include",a])),await new j.ToolRunner(e,u).exec()},async databaseExportDiagnostics(r,n,i){let s=["database","export-diagnostics",`${r}`,"--db-cluster","--format=sarif-latest",`--output=${n}`,"--sarif-include-diagnostics","-vvv",...b(["diagnostics","export"])];i!==void 0&&s.push("--sarif-category",i),await new j.ToolRunner(e,s).exec()},async diagnosticsExport(r,n,i){let s=["diagnostics","export","--format=sarif-latest",`--output=${r}`,`--sarif-codescanning-config=${Ge(i)}`,...b(["diagnostics","export"])];n!==void 0&&s.push("--sarif-category",n),await new j.ToolRunner(e,s).exec()},async resolveExtractor(r){let n="";return await new j.ToolRunner(e,["resolve","extractor","--format=json",`--language=${r}`,"--extractor-include-aliases",...b(["resolve","extractor"])],{silent:!0,listeners:{stdout:i=>{n+=i.toString()},stderr:i=>{process.stderr.write(i)}}}).exec(),JSON.parse(n)},async resolveQueriesStartingPacks(r){let n=["resolve","queries","--format=startingpacks",...b(["resolve","queries"]),...r],i=await y(e,n,{noStreamStdout:!0});try{return JSON.parse(i)}catch(s){throw new Error(`Unexpected output from codeql resolve queries --format=startingpacks: ${s}`)}},async resolveDatabase(r){let n=["resolve","database",r,"--format=json",...b(["resolve","database"])],i=await y(e,n,{noStreamStdout:!0});try{return JSON.parse(i)}catch(s){throw new Error(`Unexpected output from codeql resolve database --format=json: ${s}`)}},async mergeResults(r,n,{mergeRunsFromEqualCategory:i=!1}){let s=["github","merge-results","--output",n,...b(["github","merge-results"])];for(let l of r)s.push("--sarif",l);i&&s.push("--sarif-merge-runs-from-equal-category"),await y(e,s)}};if(t&&!await he(o,Lo))throw new C(`Expected a CodeQL CLI with version at least ${Lo} but got version ${(await o.getVersion()).version}`);if(t&&process.env.CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING!=="true"&&!await he(o,xo)){let r=await o.getVersion();ce.warning(`CodeQL CLI version ${r.version} was discontinued on ${Nr} alongside GitHub Enterprise Server ${Br} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${xo} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
|
||||
|
||||
Alternatively, if you want to continue using CodeQL CLI version ${r.version}, you can replace 'github/codeql-action/*@v${ve().split(".")[0]}' by 'github/codeql-action/*@v${ve()}' in your code scanning workflow to continue using this version of the CodeQL Action.`),ce.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING","true")}return o}function b(e,{ignoringOptions:t}={}){let o=Xe();return _o(o,e,[]).filter(r=>!t?.includes(r))}function Ro(e,t){if(e===void 0)return[];if(!Array.isArray(e)){let o=`The extra options for '${t.join(".")}' ('${JSON.stringify(e)}') are not in an array.`;throw new Error(o)}return e.map(o=>{let r=typeof o;if(r!=="string"&&r!=="number"&&r!=="boolean"){let n=`The extra option for '${t.join(".")}' ('${JSON.stringify(o)}') is not a primitive value.`;throw new Error(n)}return`${o}`})}function _o(e,t,o){let r=Ro(e?.["*"],o.concat("*")),n=t.length===0?Ro(e,o):_o(e?.[t[0]],t?.slice(1),o.concat(t[0]));return r.concat(n)}async function y(e,t=[],o={}){try{return await ft(e,t,o)}catch(r){throw r instanceof X?$t(new te(r)):r}}async function Ur(e,t){let o=Ge(e),r=_t(e.extraQueryExclusions,e.computedConfig);return t.info(`Writing augmented user configuration file to ${o}`),t.startGroup("Augmented user configuration file contents"),t.info(ge(r)),t.endGroup(),le.writeFileSync(o,ge(r)),o}var kr=1024;async function qr(e){let t=[];for(let o of e.languages)t.push(await je(e,o));return t.flat()}async function je(e,t){let o=e.trapCaches[t];if(o===void 0)return[];let r=await Ct();return[`-O=${t}.trap.cache.dir=${o}`,`-O=${t}.trap.cache.bound=${kr}`,`-O=${t}.trap.cache.write=${r}`]}function Ge(e){return F.resolve(e.tempDir,"user-config.yaml")}function ze(e){return e?[`--verbosity=${To}`]:[]}function So(){let e=process.env.JAVA_TOOL_OPTIONS||"";process.env.JAVA_TOOL_OPTIONS=[...e.split(/\s+/),"-Dhttp.keepAlive=false","-Dmaven.wagon.http.pool=false"].join(" ")}async function Hr(e){let t=process.env.JOB_RUN_UUID;return t&&await e.supportsFeature("databaseInterpretResultsSupportsSarifRunProperty")?[`--sarif-run-property=jobRunUuid=${t}`]:[]}export{te as a,Se as b,gn as c,pn as d,Un as e,kn as f,di as g,ui as h};
|
||||
@@ -0,0 +1,2 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{Ea as C,M as w,Ua as $,X as W,Z as E,c as P,k as L,n as d}from"./chunk-V6LGBXSF.js";var u=P(L());import*as c from"fs";import*as x from"path";import O from"zlib";function T(e){return Object.entries(e).reduce((r,[t,o])=>(r[t]={message:o,code:t},r),{})}var h=T({MissingPushHook:"Please specify an on.push hook to analyze and see code scanning alerts from the default branch on the Security tab.",CheckoutWrongHead:"git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.",InconsistentActionVersion:"Not all workflow steps that use `github/codeql-action` actions use the same version. Please ensure that all such steps use the same version to avoid compatibility issues."});async function j(e,r){let t=await r.betterResolveLanguages();if(!t.aliases)return;let o=t.aliases,n={};for(let s of e){let a=o[s]||s;n[a]||(n[a]=[]),n[a].push(s)}return n}async function S(e,r){let t=[],o=process.env.GITHUB_JOB;if(o){let i=e?.jobs?.[o];if(i?.strategy?.matrix?.language){let f=i.strategy.matrix.language;if(Array.isArray(f)){let y=await j(f,r);if(y!==void 0)for(let[v,b]of Object.entries(y))b.length>1&&t.push({message:`CodeQL language '${v}' is referenced by more than one entry in the 'language' matrix parameter for job '${o}'. This may result in duplicate alerts. Please edit the 'language' matrix parameter to keep only one of the following: ${b.map(A=>`'${A}'`).join(", ")}.`,code:"DuplicateLanguageInMatrix"})}}let g=i?.steps;if(Array.isArray(g)){for(let f of g)if(f?.run==="git checkout HEAD^2"){t.push(h.CheckoutWrongHead);break}}}let n=[];for(let i of Object.values(e?.jobs||{}))if(Array.isArray(i.steps)){for(let g of i.steps)if(g.uses?.startsWith("github/codeql-action/")){let f=g.uses.split("@");f.length>=2&&n.push(f[f.length-1])}}n.length>0&&!n.every(i=>i===n[0])&&t.push(h.InconsistentActionVersion);let s=p("push",e),a=p("pull_request",e),l=p("workflow_call",e);return a&&!s&&!l&&t.push(h.MissingPushHook),t}function p(e,r){return r.on?typeof r.on=="string"?r.on===e:Array.isArray(r.on)?r.on.includes(e):Object.prototype.hasOwnProperty.call(r.on,e):!1}async function I(e,r){let t;try{t=await q(r)}catch(n){return`error: getWorkflow() failed: ${String(n)}`}let o;try{o=await S(t,e)}catch(n){return`error: getWorkflowErrors() failed: ${String(n)}`}if(o.length>0){let n;try{n=_(o)}catch(s){return`error: formatWorkflowErrors() failed: ${String(s)}`}u.warning(n)}return R(o)}function _(e){let r=e.length===1?"issue was":"issues were",t=e.map(o=>o.message).join(" ");return`${e.length} ${r} detected with this workflow: ${t}`}function R(e){if(e.length!==0)return e.map(r=>r.code).join(",")}async function q(e){let r=process.env.CODE_SCANNING_WORKFLOW_FILE;if(r)return e.debug("Using the workflow specified by the CODE_SCANNING_WORKFLOW_FILE environment variable."),d(O.gunzipSync(Buffer.from(r,"base64")).toString());let t=await D(e);return d(c.readFileSync(t,"utf-8"))}async function D(e){let r=await $(),t=x.join(w("GITHUB_WORKSPACE"),r);if(c.existsSync(t))return e.debug(`Derived the following absolute path for the currently executing workflow: ${t}.`),t;throw new Error(`Expected to find a code scanning workflow file at ${t}, but no such file existed. This can happen if the currently running workflow checks out a branch that doesn't contain the corresponding workflow file.`)}function H(e,r){if(e.uses)throw new Error(`Could not get steps calling ${r} since the job calls a reusable workflow.`);let t=e.steps;if(!Array.isArray(t))throw new Error(`Could not get steps calling ${r} since job.steps was not an array.`);return t.filter(o=>o.uses?.includes(r))}function k(e,r,t,o,n){let s=`Could not get ${o} input to ${t} since`;if(!e.jobs)throw new Error(`${s} the workflow has no jobs.`);if(!e.jobs[r])throw new Error(`${s} the workflow has no job named ${r}.`);let a=H(e.jobs[r],t);if(a.length===0)throw new Error(`${s} the ${r} job does not call ${t}.`);if(a.length>1)throw new Error(`${s} the ${r} job calls ${t} multiple times.`);let l=a[0].with?.[o]?.toString();if(l!==void 0&&n!==void 0){l=l.replace(/\${{\s+/,"${{").replace(/\s+}}/,"}}");for(let[i,g]of Object.entries(n))l=l.replace(`\${{matrix.${i}}}`,g)}if(l?.includes("${{"))throw new Error(`Could not get ${o} input to ${t} since it contained an unrecognized dynamic value.`);return l}function m(){return W()||E()==="codeql-action-pr-checks"?"./analyze":"github/codeql-action/analyze"}function M(e,r,t){return k(e,r,m(),"category",t)}function V(e,r,t){return k(e,r,m(),"upload",t)}function X(e,r,t){return k(e,r,m(),"checkout_path",t)||w("GITHUB_WORKSPACE")}async function Y(e,r){if(!C()&&process.env.CODEQL_ACTION_SKIP_WORKFLOW_VALIDATION!=="true"){u.startGroup("Validating workflow");let t=await z.validateWorkflow(r,e);t===void 0?e.info("Detected no issues with the code scanning workflow."):e.debug(`Unable to validate code scanning workflow: ${t}`),u.endGroup()}}var z={validateWorkflow:I};export{q as a,M as b,V as c,X as d,Y as e};
|
||||
@@ -0,0 +1,2 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{h as b}from"./chunk-LYJYPMC2.js";import{Oa as f,Ta as m,c as g,k as L,kb as p,la as s,lb as c,ta as l,va as d}from"./chunk-V6LGBXSF.js";var r=g(L());async function B(i,e,o){if(e.buildMode==="none"||e.buildMode==="manual"){o.info(`Using build mode "${e.buildMode}", nothing to autobuild. See https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes for more information.`);return}let t=await s(e.languages,async u=>await i.isTracedLanguage(u));if(t.length===0){o.info("None of the languages in this project require extra build steps");return}let n=t.filter(u=>u!=="go"),a=[];return n[0]!==void 0&&a.push(n[0]),t.length!==n.length&&a.push("go"),o.debug(`Will autobuild ${a.join(" and ")}.`),n.length>1&&o.warning(`We will only automatically build ${a.join(" and ")} code. If you wish to scan ${n.slice(1).join(" and ")}, you must replace the autobuild step of your workflow with custom build steps. See https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-specifying-build-steps-manually for more information.`),a}async function w(i,e){let o=p.cpp_dependency_installation_enabled.envVar,t="C++ automatic installation of dependencies",n=await m(),a=f();await c(n,a,l(),e).getValue("cpp_dependency_installation_enabled",i)?process.env.RUNNER_ENVIRONMENT==="self-hosted"&&process.env[o]!=="true"?(e.info(`Disabling ${t} as we are on a self-hosted runner.${d()!=="dynamic"?` To override this, set the ${o} environment variable to 'true' in your workflow. See https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow for more information.`:""}`),r.exportVariable(o,"false")):(e.info(`Enabling ${t}. This can be disabled by setting the ${o} environment variable to 'false'. See https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow for more information.`),r.exportVariable(o,"true")):(e.info(`Disabling ${t}.`),r.exportVariable(o,"false"))}async function Q(i,e,o){o.startGroup(`Attempting to automatically build ${e} code`);let t=await b(i.codeQLCmd);e==="cpp"&&await w(t,o),i.buildMode?await t.extractUsingBuildMode(i,e):await t.runAutobuild(i,e),e==="go"&&r.exportVariable("CODEQL_ACTION_DID_AUTOBUILD_GOLANG","true"),o.endGroup()}export{B as a,w as b,Q as c};
|
||||
@@ -0,0 +1,188 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
var M7=Object.create;var Qm=Object.defineProperty;var F7=Object.getOwnPropertyDescriptor;var U7=Object.getOwnPropertyNames;var q7=Object.getPrototypeOf,H7=Object.prototype.hasOwnProperty;var _=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Kt=(t,e)=>()=>(t&&(e=t(t=0)),e);var f=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Nm=(t,e)=>{for(var r in e)Qm(t,r,{get:e[r],enumerable:!0})},_L=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of U7(e))!H7.call(t,i)&&i!==r&&Qm(t,i,{get:()=>e[i],enumerable:!(n=F7(e,i))||n.enumerable});return t};var xt=(t,e,r)=>(r=t!=null?M7(q7(t)):{},_L(e||!t||!t.__esModule?Qm(r,"default",{value:t,enumerable:!0}):r,t)),ft=t=>_L(Qm({},"__esModule",{value:!0}),t);var P0=f(de=>{"use strict";var G7=de&&de.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),z7=de&&de.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),TL=de&&de.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&G7(r,e,n[i]);return z7(r,e),r}})(),Rm=de&&de.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},Hn;Object.defineProperty(de,"__esModule",{value:!0});de.READONLY=de.UV_FS_O_EXLOCK=de.IS_WINDOWS=de.unlink=de.symlink=de.stat=de.rmdir=de.rm=de.rename=de.readdir=de.open=de.mkdir=de.lstat=de.copyFile=de.chmod=void 0;de.readlink=j7;de.exists=V7;de.isDirectory=Y7;de.isRooted=J7;de.tryGetExecutablePath=$7;de.getCmdPath=K7;var T0=TL(_("fs")),Sm=TL(_("path"));Hn=T0.promises,de.chmod=Hn.chmod,de.copyFile=Hn.copyFile,de.lstat=Hn.lstat,de.mkdir=Hn.mkdir,de.open=Hn.open,de.readdir=Hn.readdir,de.rename=Hn.rename,de.rm=Hn.rm,de.rmdir=Hn.rmdir,de.stat=Hn.stat,de.symlink=Hn.symlink,de.unlink=Hn.unlink;de.IS_WINDOWS=process.platform==="win32";function j7(t){return Rm(this,void 0,void 0,function*(){let e=yield T0.promises.readlink(t);return de.IS_WINDOWS&&!e.endsWith("\\")?`${e}\\`:e})}de.UV_FS_O_EXLOCK=268435456;de.READONLY=T0.constants.O_RDONLY;function V7(t){return Rm(this,void 0,void 0,function*(){try{yield(0,de.stat)(t)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}function Y7(t){return Rm(this,arguments,void 0,function*(e,r=!1){return(r?yield(0,de.stat)(e):yield(0,de.lstat)(e)).isDirectory()})}function J7(t){if(t=W7(t),!t)throw new Error('isRooted() parameter "p" cannot be empty');return de.IS_WINDOWS?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")}function $7(t,e){return Rm(this,void 0,void 0,function*(){let r;try{r=yield(0,de.stat)(t)}catch(i){i.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${i}`)}if(r&&r.isFile()){if(de.IS_WINDOWS){let i=Sm.extname(t).toUpperCase();if(e.some(s=>s.toUpperCase()===i))return t}else if(vL(r))return t}let n=t;for(let i of e){t=n+i,r=void 0;try{r=yield(0,de.stat)(t)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${s}`)}if(r&&r.isFile()){if(de.IS_WINDOWS){try{let s=Sm.dirname(t),o=Sm.basename(t).toUpperCase();for(let a of yield(0,de.readdir)(s))if(o===a.toUpperCase()){t=Sm.join(s,a);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${s}`)}return t}else if(vL(r))return t}}return""})}function W7(t){return t=t||"",de.IS_WINDOWS?(t=t.replace(/\//g,"\\"),t.replace(/\\\\+/g,"\\")):t.replace(/\/\/+/g,"/")}function vL(t){return(t.mode&1)>0||(t.mode&8)>0&&process.getgid!==void 0&&t.gid===process.getgid()||(t.mode&64)>0&&process.getuid!==void 0&&t.uid===process.getuid()}function K7(){var t;return(t=process.env.COMSPEC)!==null&&t!==void 0?t:"cmd.exe"}});var Vo=f(qr=>{"use strict";var X7=qr&&qr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Z7=qr&&qr.__setModuleDefault||(Object.create?(function(t,Line truncated
|
||||
`,A.message,A.stack);var p=new Error("tunneling socket could not be established, cause="+A.message);p.code="ECONNRESET",e.request.emit("error",p),n.removeSocket(i)}};so.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(i){n.request.onSocket(i)})}};function $L(t,e){var r=this;so.prototype.createSocket.call(r,t,function(n){var i=t.request.getHeader("host"),s=F0({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):t.host}),o=Cee.connect(0,s);r.sockets[r.sockets.indexOf(n)]=o,e(o)})}function WL(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function F0(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var i=Object.keys(n),s=0,o=i.length;s<o;++s){var a=i[s];n[a]!==void 0&&(t[a]=n[a])}}return t}var Yo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Yo=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:Yo=function(){};Sl.debug=Yo});var ZL=f((k2e,XL)=>{XL.exports=KL()});var _t=f((M2e,ek)=>{ek.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var We=f((F2e,Qk)=>{"use strict";var tk=Symbol.for("undici.error.UND_ERR"),vt=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[tk]===!0}[tk]=!0},rk=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),U0=class extends vt{constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[rk]===!0}[rk]=!0},nk=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),q0=class extends vt{constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[nk]===!0}[nk]=!0},ik=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),H0=class extends vt{constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[ik]===!0}[ik]=!0},sk=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),G0=class extends vt{constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[sk]===!0}[sk]=!0},ok=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),z0=class extends vt{constructor(e,r,n,i){super(e),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=i,this.st
Line truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}function Hre(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),i="";if(n.length>0)for(let s=n.length;s!==0;s--){let o=n[s-1].trim();if(Nre.has(o)){i=o;break}}i!==""&&(t.referrerPolicy=i)}function Gre(){return"allowed"}function zre(){return"success"}function jre(){return"success"}function Vre(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function Yre(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&Ow(t.origin)&&!Ow(op(t))&&(e=null);break;case"same-origin":Zm(t,op(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function kl(t,e){return t}function Jre(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:kl(t.domainLookupStartTime,r),domainLookupEndTime:kl(t.domainLookupEndTime,r),connectionStartTime:kl(t.connectionStartTime,r),connectionEndTime:kl(t.connectionEndTime,r),secureConnectionStartTime:kl(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function $re(t){return kl(vre.now(),t)}function Wre(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function FM(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function Kre(t){return{referrerPolicy:t.referrerPolicy}}function Xre(t){let e=t.referrerPolicy;lc(e);let r=null;if(t.referrer==="client"){let a=PM();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let n=Dw(r),i=Dw(r,!0);n.toString().length>4096&&(n=i);let s=Zm(t,n),o=sp(n)&&!sp(t.url);switch(e){case"origin":return i??Dw(r,!0);case"unsafe-url":return n;case"same-origin":return s?i:"no-referrer";case"origin-when-cross-origin":return s?n:i;case"strict-origin-when-cross-origin":{let a=op(t);return Zm(n,a)?n:sp(n)&&!sp(a)?"no-referrer":i}default:return o?"no-referrer":i}}function Dw(t,e){return lc(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}function sp(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}function Zre(t,e){if(Xm===void 0)return!0;let r=UM(e);if(r==="no metadata"||r.length===0)return!0;let n=tne(r),i=rne(r,n);for(let s of i){let o=s.algo,a=s.hash,c=Xm.createHash(o).update(t).digest("base64");if(c[c.length-1]==="="&&(c[c.length-2]==="="?c=c.slice(0,-2):c=c.slice(0,-1)),nne(c,a))return!0}return!1}var ene=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function UM(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let i=ene.exec(n);if(i===null||i.groups===void 0||i.groups.algo===void 0)continue;let s=i.groups.algo.toLowerCase();OM.includes(s)&&e.push(i.groups)}return r===!0?"no metadata":e}function tne(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}function rne(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}function nne(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}function ine(t){}function Zm(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function sne(){let t,e;return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}}function one(t){return t.controller.state==="aborted"}function ane(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function cne(t){return Dre[t.toLowerCase()]??t}function lne(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return lc(typeof e=="string"),e}var une=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function qM(t,e,r=0,n=1){class i{#e;#t;
Line truncated
|
||||
`);function Une(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}function qne(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let n=t.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}function Hne(t,e){th(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),i=[],s={position:0};for(;t[s.position]===13&&t[s.position+1]===10;)s.position+=2;let o=t.length;for(;t[o-1]===10&&t[o-2]===13;)o-=2;for(o!==t.length&&(t=t.subarray(0,o));;){if(t.subarray(s.position,s.position+n.length).equals(n))s.position+=n.length;else return"failure";if(s.position===t.length-2&&rh(t,Mne,s)||s.position===t.length-4&&rh(t,Fne,s))return i;if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let a=Gne(t,s);if(a==="failure")return"failure";let{name:c,filename:l,contentType:u,encoding:A}=a;s.position+=2;let p;{let y=t.indexOf(n.subarray(2),s.position);if(y===-1)return"failure";p=t.subarray(s.position,y-4),s.position+=p.length,A==="base64"&&(p=Buffer.from(p.toString(),"base64"))}if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let m;l!==null?(u??="text/plain",Une(u)||(u=""),m=new Lne([p],l,{type:u})):m=vne(Buffer.from(p)),th(ZM(c)),th(typeof m=="string"&&ZM(m)||Pne(m)),i.push(Dne(c,m,l))}}function Gne(t,e){let r=null,n=null,i=null,s=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:i,encoding:s};let o=Fl(a=>a!==10&&a!==13&&a!==58,t,e);if(o=Hw(o,!0,!0,a=>a===9||a===32),!Tne.test(o.toString())||t[e.position]!==58)return"failure";switch(e.position++,Fl(a=>a===32||a===9,t,e),_ne(o)){case"content-disposition":{if(r=n=null,!rh(t,kne,e)||(e.position+=17,r=rF(t,e),r===null))return"failure";if(rh(t,tF,e)){let a=e.position+tF.length;if(t[a]===42&&(e.position+=1,a+=1),t[a]!==61||t[a+1]!==34||(e.position+=12,n=rF(t,e),n===null))return"failure"}break}case"content-type":{let a=Fl(c=>c!==10&&c!==13,t,e);a=Hw(a,!1,!0,c=>c===9||c===32),i=eF(a);break}case"content-transfer-encoding":{let a=Fl(c=>c!==10&&c!==13,t,e);a=Hw(a,!1,!0,c=>c===9||c===32),s=eF(a);break}default:Fl(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}function rF(t,e){th(t[e.position-1]===34);let r=Fl(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}function Fl(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}function Hw(t,e,r,n){let i=0,s=t.length-1;if(e)for(;i<t.length&&n(t[i]);)i++;if(r)for(;s>0&&n(t[s]);)s--;return i===0&&s===t.length-1?t:t.subarray(i,s+1)}function rh(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}nF.exports={multipartFormDataParser:Hne,validateBoundary:qne}});var Hl=f((uze,gF)=>{"use strict";var lp=Fe(),{ReadableStreamFrom:zne,isBlobLike:sF,isReadableStreamLike:jne,readableStreamClose:Vne,createDeferredPromise:Yne,fullyReadBody:Jne,extractMimeType:$ne,utf8DecodeBytes:cF}=Gn(),{FormData:oF}=cp(),{kState:ql}=Jo(),{webidl:Wne}=Mr(),{Blob:Kne}=_("node:buffer"),Gw=_("node:assert"),{isErrored:lF,isDisturbed:Xne}=_("node:stream"),{isArrayBuffer:Zne}=_("node:util/types"),{serializeAMimeType:eie}=wn(),{multipartFormDataParser:tie}=iF(),zw;try{let t=_("node:crypto");zw=e=>t.randomInt(0,e)}catch{zw=t=>Math.floor(Math.random(t))}var nh=new TextEncoder;function rie(){}var uF=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,AF;uF&&(AF=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!Xne(e)&&!lF(e)&&e.cancel("Response object has been garbage collected").catch(rie)}));function dF(t,e=!1){let r=null;t instanceof ReadableStream?r=t:sF(t)?r=t.stream():r=new ReadableStream({async pull(c){let l=typeof i=="string"?nh.encode(i):i;l.byteLength&&c.enqueue(l),queueMicrotask(()=>Vne(c))},start(){},type:"bytes"}),Gw(jne(r));let n=null,i=null,s=null,o=null;if(typeof t=="string")i=t,o="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),o="application/x-www-form-urlencoded;charset=UTF-8";else if(Zne(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(lp.isFormDataLike(t)){let c=`----formdata-undici-0${`${zw(1e11)}`.padStart(11,"0")}`,l=`--${c}\r
|
||||
Content-Disposition: form-data`;let u=x=>x.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),A=x=>x.replace(/\r?\n|\r/g,`\r
|
||||
`),p=[],m=new Uint8Array([13,10]);s=0;let y=!1;for(let[x,S]of t)if(typeof S=="string"){let R=nh.encode(l+`; name="${u(A(x))}"\r
|
||||
\r
|
||||
${A(S)}\r
|
||||
`);p.push(R),s+=R.byteLength}else{let R=nh.encode(`${l}; name="${u(A(x))}"`+(S.name?`; filename="${u(S.name)}"`:"")+`\r
|
||||
Content-Type: ${S.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);p.push(R,S,m),typeof S.size=="number"?s+=R.byteLength+S.size+m.byteLength:y=!0}let b=nh.encode(`--${c}--\r
|
||||
`);p.push(b),s+=b.byteLength,y&&(s=null),i=t,n=async function*(){for(let x of p)x.stream?yield*x.stream():yield x},o=`multipart/form-data; boundary=${c}`}else if(sF(t))i=t,s=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(lp.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:zne(t)}if((typeof i=="string"||lp.isBuffer(i))&&(s=Buffer.byteLength(i)),n!=null){let c;r=new ReadableStream({async start(){c=n(t)[Symbol.asyncIterator]()},async pull(l){let{value:u,done:A}=await c.next();if(A)queueMicrotask(()=>{l.close(),l.byobRequest?.respond(0)});else if(!lF(r)){let p=new Uint8Array(u);p.byteLength&&l.enqueue(p)}return l.desiredSize>0},async cancel(l){await c.return()},type:"bytes"})}return[{stream:r,source:i,length:s},o]}function nie(t,e=!1){return t instanceof ReadableStream&&(Gw(!lp.isDisturbed(t),"The body has already been consumed."),Gw(!t.locked,"The stream is locked.")),dF(t,e)}function iie(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}function sie(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function oie(t){return{blob(){return Ul(this,r=>{let n=aF(this);return n===null?n="":n&&(n=eie(n)),new Kne([r],{type:n})},t)},arrayBuffer(){return Ul(this,r=>new Uint8Array(r).buffer,t)},text(){return Ul(this,cF,t)},json(){return Ul(this,cie,t)},formData(){return Ul(this,r=>{let n=aF(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let i=tie(r,n);if(i==="failure")throw new TypeError("Failed to parse body as FormData.");let s=new oF;return s[ql]=i,s}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(r.toString()),s=new oF;for(let[o,a]of i)s.append(o,a);return s}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Ul(this,r=>new Uint8Array(r),t)}}}function aie(t){Object.assign(t.prototype,oie(t))}async function Ul(t,e,r){if(Wne.brandCheck(t,r),pF(t))throw new TypeError("Body is unusable: Body has already been read");sie(t[ql]);let n=Yne(),i=o=>n.reject(o),s=o=>{try{n.resolve(e(o))}catch(a){i(a)}};return t[ql].body==null?(s(Buffer.allocUnsafe(0)),n.promise):(await Jne(t[ql].body,s,i),n.promise)}function pF(t){let e=t[ql].body;return e!=null&&(e.stream.locked||lp.isDisturbed(e.stream))}function cie(t){return JSON.parse(cF(t))}function aF(t){let e=t[ql].headersList,r=$ne(e);return r==="failure"?null:r}gF.exports={extractBody:dF,safelyExtractBody:nie,cloneBody:iie,mixinBody:aie,streamRegistry:AF,hasFinalizationRegistry:uF,bodyUnusable:pF}});var QF=f((Aze,wF)=>{"use strict";var we=_("node:assert"),ve=Fe(),{channels:fF}=xl(),jw=Nw(),{RequestContentLengthMismatchError:uc,ResponseContentLengthMismatchError:lie,RequestAbortedError:IF,HeadersTimeoutError:uie,HeadersOverflowError:Aie,SocketError:lh,InformationalError:Gl,BodyTimeoutError:die,HTTPParserError:pie,ResponseExceededMaxSizeError:gie}=We(),{kUrl:BF,kReset:Qn,kClient:$w,kParser:zt,kBlocking:dp,kRunning:Hr,kPending:fie,kSize:mF,kWriting:Wo,kQueue:Wi,kNoRef:up,kKeepAliveDefaultTimeout:mie,kHostHeader:hie,kPendingIdx:yie,kRunningIdx:Ei,kError:Ci,kPipelining:ah,kSocket:zl,kKeepAliveTimeoutValue:uh,kMaxHeadersSize:Vw,kKeepAliveMaxTimeout:Eie,kKeepAliveTimeoutThreshold:Cie,kHeadersTimeout:Iie,kBodyTimeout:Bie,kStrictContentLength:Ww,kMaxRequests:hF,kCounter:bie,kMaxResponseSize:wie,kOnError:Qie,kResume:$o,kHTTPContext:bF}=_t(),Qs=AM(),Nie=Buffer.alloc(0),ih=Buffer[Symbol.species],sh=ve.addListener,Sie=ve.removeAllListeners,Yw;async function Rie(){let t=process.env.JEST_WORKER_ID?xw():void 0,e;try{e=await WebAssembly.compile(gM())}catch{e=await WebAssembly.compile(t||xw())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,i)=>0,wasm_on_status:(r,n,i)=>{we(mr.ptr===r);let s=n-Ss+Ns.byteOffset;return mr.onStatus(new ih(Ns.buffer,s,i))||0},wasm_on_message_begin:r=>(we(mr.ptr===r),mr.onMessageBegin()||0),wasm_on_header_field:(r,n,i)=>{we(mr.ptr===r);let s=n-Ss+Ns.byteOffset;return mr.onHeaderField(new ih(Ns.buffer,s,i))||0},wasm_on_header_value:(r,n,i)=>{we(mr.ptr===r);let s=n-Ss+Ns.byteOffset;return mr.onHeaderValue(new ih(Ns.buffer,s,i))||0},wasm_on_headers_complete:(r,n,i,s)=>(we(mr.ptr===r),mr.onHeadersComplete(n,!!i,!!s)||0),wasm_on_body:(r,n,i)=>{we(mr.ptr===r);let s=n-Ss+Ns.byteOffset;return mr.onBody(new ih(Ns.buffer,s,i))||0},wasm_on_message_complete:r=>(we(mr.ptr===r),mr.onMessageComplete()||0)}})}var Jw=null,Kw=Rie();Kw.catch();var mr=null,Ns=null,oh=0,Ss=null,xie=0,Ap=1,jl=2|Ap,ch=4|Ap,Xw=8|xie,Zw=class{constructor(e,r,{exports:n}){we(Number.isFinite(e[Vw])&&e[Vw]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(Qs.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.header
Line truncated
|
||||
`;if(typeof i=="string"?b+=`host: ${i}\r
|
||||
`:b+=t[hie],s?b+=`connection: upgrade\r
|
||||
upgrade: ${s}\r
|
||||
`:t[ah]&&!m[Qn]?b+=`connection: keep-alive\r
|
||||
`:b+=`connection: close\r
|
||||
`,Array.isArray(l))for(let x=0;x<l.length;x+=2){let S=l[x+0],R=l[x+1];if(Array.isArray(R))for(let P=0;P<R.length;P++)b+=`${S}: ${R[P]}\r
|
||||
`;else b+=`${S}: ${R}\r
|
||||
`}return fF.sendHeaders.hasSubscribers&&fF.sendHeaders.publish({request:e,headers:b,socket:m}),!c||p===0?EF(y,null,t,e,m,u,b,A):ve.isBuffer(c)?EF(y,c,t,e,m,u,b,A):ve.isBlobLike(c)?typeof c.stream=="function"?CF(y,c.stream(),t,e,m,u,b,A):Oie(y,c,t,e,m,u,b,A):ve.isStream(c)?Die(y,c,t,e,m,u,b,A):ve.isIterable(c)?CF(y,c,t,e,m,u,b,A):we(!1),!0}function Die(t,e,r,n,i,s,o,a){we(s!==0||r[Hr]===0,"stream body cannot be pipelined");let c=!1,l=new Ah({abort:t,socket:i,request:n,contentLength:s,client:r,expectsPayload:a,header:o}),u=function(y){if(!c)try{!l.write(y)&&this.pause&&this.pause()}catch(b){ve.destroy(this,b)}},A=function(){c||e.resume&&e.resume()},p=function(){if(queueMicrotask(()=>{e.removeListener("error",m)}),!c){let y=new IF;queueMicrotask(()=>m(y))}},m=function(y){if(!c){if(c=!0,we(i.destroyed||i[Wo]&&r[Hr]<=1),i.off("drain",A).off("error",m),e.removeListener("data",u).removeListener("end",m).removeListener("close",p),!y)try{l.end()}catch(b){y=b}l.destroy(y),y&&(y.code!=="UND_ERR_INFO"||y.message!=="reset")?ve.destroy(e,y):ve.destroy(e)}};e.on("data",u).on("end",m).on("error",m).on("close",p),e.resume&&e.resume(),i.on("drain",A).on("error",m),e.errorEmitted??e.errored?setImmediate(()=>m(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>m(null)),(e.closeEmitted??e.closed)&&setImmediate(p)}function EF(t,e,r,n,i,s,o,a){try{e?ve.isBuffer(e)&&(we(s===e.byteLength,"buffer body must have content length"),i.cork(),i.write(`${o}content-length: ${s}\r
|
||||
\r
|
||||
`,"latin1"),i.write(e),i.uncork(),n.onBodySent(e),!a&&n.reset!==!1&&(i[Qn]=!0)):s===0?i.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(we(s===null,"no body must not have content length"),i.write(`${o}\r
|
||||
`,"latin1")),n.onRequestSent(),r[$o]()}catch(c){t(c)}}async function Oie(t,e,r,n,i,s,o,a){we(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new uc;let c=Buffer.from(await e.arrayBuffer());i.cork(),i.write(`${o}content-length: ${s}\r
|
||||
\r
|
||||
`,"latin1"),i.write(c),i.uncork(),n.onBodySent(c),n.onRequestSent(),!a&&n.reset!==!1&&(i[Qn]=!0),r[$o]()}catch(c){t(c)}}async function CF(t,e,r,n,i,s,o,a){we(s!==0||r[Hr]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let p=c;c=null,p()}}let u=()=>new Promise((p,m)=>{we(c===null),i[Ci]?m(i[Ci]):c=p});i.on("close",l).on("drain",l);let A=new Ah({abort:t,socket:i,request:n,contentLength:s,client:r,expectsPayload:a,header:o});try{for await(let p of e){if(i[Ci])throw i[Ci];A.write(p)||await u()}A.end()}catch(p){A.destroy(p)}finally{i.off("close",l).off("drain",l)}}var Ah=class{constructor({abort:e,socket:r,request:n,contentLength:i,client:s,expectsPayload:o,header:a}){this.socket=r,this.request=n,this.contentLength=i,this.client=s,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[Wo]=!0}write(e){let{socket:r,request:n,contentLength:i,client:s,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[Ci])throw r[Ci];if(r.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(i!==null&&o+l>i){if(s[Ww])throw new uc;process.emitWarning(new uc)}r.cork(),o===0&&(!a&&n.reset!==!1&&(r[Qn]=!0),i===null?r.write(`${c}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${c}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1")),i===null&&r.write(`\r
|
||||
${l.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=l;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[zt].timeout&&r[zt].timeoutType===jl&&r[zt].timeout.refresh&&r[zt].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:i,expectsPayload:s,header:o,request:a}=this;if(a.onRequestSent(),e[Wo]=!1,e[Ci])throw e[Ci];if(!e.destroyed){if(i===0?s?e.write(`${o}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${o}\r
|
||||
`,"latin1"):r===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),r!==null&&i!==r){if(n[Ww])throw new uc;process.emitWarning(new uc)}e[zt].timeout&&e[zt].timeoutType===jl&&e[zt].timeout.refresh&&e[zt].timeout.refresh(),n[$o]()}}destroy(e){let{socket:r,client:n,abort:i}=this;r[Wo]=!1,e&&(we(n[Hr]<=1,"pipeline should only contain this request"),i(e))}};wF.exports=_ie});var PF=f((dze,TF)=>{"use strict";var Ii=_("node:assert"),{pipeline:Lie}=_("node:stream"),He=Fe(),{RequestContentLengthMismatchError:eQ,RequestAbortedError:NF,SocketError:pp,InformationalError:tQ}=We(),{kUrl:dh,kReset:gh,kClient:Vl,kRunning:fh,kPending:kie,kQueue:Ko,kPendingIdx:rQ,kRunningIdx:Ki,kError:Zi,kSocket:br,kStrictContentLength:Mie,kOnError:nQ,kMaxConcurrentStreams:vF,kHTTP2Session:Xi,kResume:Xo,kSize:Fie,kHTTPContext:Uie}=_t(),Ao=Symbol("open streams"),SF,RF=!1,ph;try{ph=_("node:http2")}catch{ph={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:qie,HTTP2_HEADER_METHOD:Hie,HTTP2_HEADER_PATH:Gie,HTTP2_HEADER_SCHEME:zie,HTTP2_HEADER_CONTENT_LENGTH:jie,HTTP2_HEADER_EXPECT:Vie,HTTP2_HEADER_STATUS:Yie}}=ph;function Jie(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let i of n)e.push(Buffer.from(r),Buffer.from(i));else e.push(Buffer.from(r),Buffer.from(n));return e}async function $ie(t,e){t[br]=e,RF||(RF=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=ph.connect(t[dh],{createConnection:()=>e,peerMaxConcurrentStreams:t[vF]});r[Ao]=0,r[Vl]=t,r[br]=e,He.addListener(r,"error",Kie),He.addListener(r,"frameError",Xie),He.addListener(r,"end",Zie),He.addListener(r,"goaway",ese),He.addListener(r,"close",function(){let{[Vl]:i}=this,{[br]:s}=i,o=this[br][Zi]||this[Zi]||new pp("closed",He.getSocketInfo(s));if(i[Xi]=null,i.destroyed){Ii(i[kie]===0);let a=i[Ko].splice(i[Ki]);for(let c=0;c<a.length;c++){let l=a[c];He.errorRequest(i,l,o)}}}),r.unref(),t[Xi]=r,e[Xi]=r,He.addListener(e,"error",function(i){Ii(i.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Zi]=i,this[Vl][nQ](i)}),He.addListener(e,"end",function(){He.destroy(this,new pp("other side closed",He.getSocketInfo(this)))}),He.addListener(e,"close",function(){let i=this[Zi]||new pp("closed",He.getSocketInfo(this));t[br]=null,this[Xi]!=null&&this[Xi].destroy(i),t[rQ]=t[Ki],Ii(t[fh]===0),t.emit("disconnect",t[dh],[t],i),t[Xo]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...i){return rse(t,...i)},resume(){Wie(t)},destroy(i,s){n?queueMicrotask(s):e.destroy(i).on("close",s)},get destroyed(){return e.destroyed},busy(){return!1}}}function Wie(t){let e=t[br];e?.destroyed===!1&&(t[Fie]===0&&t[vF]===0?(e.unref(),t[Xi].unref()):(e.ref(),t[Xi].ref()))}function Kie(t){Ii(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[br][Zi]=t,this[Vl][nQ](t)}function Xie(t,e,r){if(r===0){let n=new tQ(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[br][Zi]=n,this[Vl][nQ](n)}}function Zie(){let t=new pp("other side closed",He.getSocketInfo(this[br]));this.destroy(t),He.destroy(this[br],t)}function ese(t){let e=this[Zi]||new pp(`HTTP/2: "GOAWAY" frame received with code ${t}`,He.getSocketInfo(this)),r=this[Vl];if(r[br]=null,r[Uie]=null,this[Xi]!=null&&(this[Xi].destroy(e),this[Xi]=null),He.destroy(this[br],e),r[Ki]<r[Ko].length){let n=r[Ko][r[Ki]];r[Ko][r[Ki]++]=null,He.errorRequest(r,n,e),r[rQ]=r[Ki]}Ii(r[fh]===0),r.emit("disconnect",r[dh],[r],e),r[Xo]()}function tse(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function rse(t,e){let r=t[Xi],{method:n,path:i,host:s,upgrade:o,expectContinue:a,signal:c,headers:l}=e,{body:u}=e;if(o)return He.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let A={};for(let G=0;G<l.length;G+=2){let oe=l[G+0],te=l[G+1];if(Array.isArray(te))for(let le=0;le<te.length;le++)A[oe]?A[oe]+=`,${te[le]}`:A[oe]=te[le];else A[oe]=te}let p,{hostname:m,port:y}=t[dh];A[qie]=s||`${m}${y?`:${y}`:""}`,A[Hie]=n;let b=G=>{e.aborted||e.completed||(G=G||new NF,He.errorRequest(t,e,G),p!=null&&He.destroy(p,G),He.destroy(u,G),t[Ko][t[Ki]++]=null,t[Xo]())};try{e.onConnect(b)}catch(G){He.errorRequest(t,e,G)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),p=r.request(A,{endStream:!1,signal:c}),p.id&&!p.pending?(e.onUpgrade(null,null,p),++r[Ao],t[Ko][t[Ki]++]=null):p.once("ready",()=>{e.onUpgrade(null,null,p),++r[Ao],t[Ko][t[Ki]++]=null}),p.once("close",()=>{r[Ao]-=1,r[Ao]===0&&r.unref()}),!0;A[Gie]=i,A[zie]="https";let x=n==="PUT"||n==="POST"||n==="PATCH";u&&typeof u.read=="function"&&u.read(0);let S=He.bodyLength(u);if(He.isFormDataLike(u)){SF??=Hl().extractBody;let[G,oe]=SF(u);A["content-type"]=oe,u=G.stream,S=G.length}if(S==null&&(S=e.contentLength),(S===0||!x)&&(S=null),tse(n)&&S>0&&e.contentLength!=null&&e.contentLength!==S){if(t[Mie])return He.errorRequest(t,e,new eQ),!1;process.emitWarning(new eQ)}S!=null&&(Ii(u,"no body must not have content length"),A[jie]=`${S}`),r.ref();let R=n==="GET"||n==="HEAD"||u===null;return a?(A[Vie]="100-continue",p=r.request(A,{endStream:R,signal:c}),p.once("
Line truncated
|
||||
`,this[Rse]=c??3e5,this[Sse]=i??3e5,this[xse]=R??!0,this[_se]=G,this[aQ]=te,this[ea]=null,this[Ose]=Me>-1?Me:-1,this[kse]=ut??100,this[Zt]=null,this[es]=[],this[go]=0,this[ts]=0,this[hp]=gt=>lQ(this,gt),this[Lse]=gt=>jF(this,gt)}get pipelining(){return this[Eh]}set pipelining(e){this[Eh]=e,this[hp](!0)}get[Cp](){return this[es].length-this[ts]}get[Ep](){return this[ts]-this[go]}get[yp](){return this[es].length-this[go]}get[Cse](){return!!this[Zt]&&!this[Jl]&&!this[Zt].destroyed}get[oQ](){return!!(this[Zt]?.busy(null)||this[yp]>=(zF(this)||1)||this[Cp]>0)}[Ese](e){VF(this),this.once("connect",e)}[Dse](e,r){let n=e.origin||this[xs].origin,i=new pse(n,e,r);return this[es].push(i),this[dc]||(Ac.bodyLength(i.body)==null&&Ac.isIterable(i.body)?(this[dc]=1,queueMicrotask(()=>lQ(this))):this[hp](!0)),this[dc]&&this[ta]!==2&&this[oQ]&&(this[ta]=2),this[ta]<2}async[Tse](){return new Promise(e=>{this[yp]?this[ea]=e:e(null)})}async[Pse](e){return new Promise(r=>{let n=this[es].splice(this[ts]);for(let s=0;s<n.length;s++){let o=n[s];Ac.errorRequest(this,o,e)}let i=()=>{this[ea]&&(this[ea](),this[ea]=null),r(null)};this[Zt]?(this[Zt].destroy(e,i),this[Zt]=null):queueMicrotask(i),this[hp]()})}},Use=yh();function jF(t,e){if(t[Ep]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){po(t[ts]===t[go]);let r=t[es].splice(t[go]);for(let n=0;n<r.length;n++){let i=r[n];Ac.errorRequest(t,i,e)}po(t[yp]===0)}}async function VF(t){po(!t[Jl]),po(!t[Zt]);let{host:e,hostname:r,protocol:n,port:i}=t[xs];if(r[0]==="["){let s=r.indexOf("]");po(s!==-1);let o=r.substring(1,s);po(GF.isIP(o)),r=o}t[Jl]=!0,Yl.beforeConnect.hasSubscribers&&Yl.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[Zt]?.version,servername:t[Zo],localAddress:t[mp]},connector:t[fp]});try{let s=await new Promise((o,a)=>{t[fp]({host:e,hostname:r,protocol:n,port:i,servername:t[Zo],localAddress:t[mp]},(c,l)=>{c?a(c):o(l)})});if(t.destroyed){Ac.destroy(s.on("error",qF),new mse);return}po(s);try{t[Zt]=s.alpnProtocol==="h2"?await Fse(t,s):await Mse(t,s)}catch(o){throw s.destroy().on("error",qF),o}t[Jl]=!1,s[vse]=0,s[aQ]=t[aQ],s[yse]=t,s[Bse]=null,Yl.connected.hasSubscribers&&Yl.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[Zt]?.version,servername:t[Zo],localAddress:t[mp]},connector:t[fp],socket:s}),t.emit("connect",t[xs],[t])}catch(s){if(t.destroyed)return;if(t[Jl]=!1,Yl.connectError.hasSubscribers&&Yl.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[Zt]?.version,servername:t[Zo],localAddress:t[mp]},connector:t[fp],error:s}),s.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(po(t[Ep]===0);t[Cp]>0&&t[es][t[ts]].servername===t[Zo];){let o=t[es][t[ts]++];Ac.errorRequest(t,o,s)}else jF(t,s);t.emit("connectionError",t[xs],[t],s)}t[hp]()}function HF(t){t[ta]=0,t.emit("drain",t[xs],[t])}function lQ(t,e){t[dc]!==2&&(t[dc]=2,qse(t,e),t[dc]=0,t[go]>256&&(t[es].splice(0,t[go]),t[ts]-=t[go],t[go]=0))}function qse(t,e){for(;;){if(t.destroyed){po(t[Cp]===0);return}if(t[ea]&&!t[yp]){t[ea](),t[ea]=null;return}if(t[Zt]&&t[Zt].resume(),t[oQ])t[ta]=2;else if(t[ta]===2){e?(t[ta]=1,queueMicrotask(()=>HF(t))):HF(t);continue}if(t[Cp]===0||t[Ep]>=(zF(t)||1))return;let r=t[es][t[ts]];if(t[xs].protocol==="https:"&&t[Zo]!==r.servername){if(t[Ep]>0)return;t[Zo]=r.servername,t[Zt]?.destroy(new fse("servername changed"),()=>{t[Zt]=null,lQ(t)})}if(t[Jl])return;if(!t[Zt]){VF(t);return}if(t[Zt].destroyed||t[Zt].busy(r))return;!r.aborted&&t[Zt].write(r)?t[ts]++:t[es].splice(t[ts],1)}}YF.exports=cQ});var uQ=f((hze,JF)=>{"use strict";var Ch=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};JF.exports=class{constructor(){this.head=this.tail=new Ch}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Ch),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var WF=f((yze,$F)=>{var{kFree:Hse,kConnected:Gse,kPending:zse,kQueued:jse,kRunning:Vse,kSize:Yse}=_t(),pc=Symbol("pool"),AQ=class{constructor(e){this[pc]=e}get connected(){return this[pc][Gse]}get free(){return this[pc][Hse]}get pending(){return this[pc][zse]}get queued(){return this[pc][jse]}get running(){return this[pc][Vse]}get size(){return this[pc][Yse]}};$F.exports=AQ});var hQ=f((Eze,oU)=>{"use strict";var Jse=Pl(),$se=uQ(),{kConnected:dQ,kSize:KF,kRunning:XF,kPending:ZF,kQueued:Ip,kBusy:Wse,kFree:Kse,kUrl:Xse,kClose:Zse,kDestroy:eoe,kDispatch:toe}=_t(),roe=WF(),Nn=Symbol("clients"),cn=Symbol("needDrain"),Bp=Symbol("queue"),pQ=Symbol("closed resolve"),gQ=Symbol("onDrain"),eU=Symbol("onConnect"),tU=Symbol("onDisconnect"),rU=Symbol("onConnectionError"),fQ=Symbo
Line truncated
|
||||
${n.count} ${n.noun} ${n.is} pending:
|
||||
|
||||
${e.format(r)}
|
||||
`.trim())}};dq.exports=hN});var Mh=f((Yze,hq)=>{"use strict";var gq=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Rce}=We(),xce=Kl();mq()===void 0&&fq(new xce);function fq(t){if(!t||typeof t.dispatch!="function")throw new Rce("Argument agent must implement Agent");Object.defineProperty(globalThis,gq,{value:t,writable:!0,enumerable:!1,configurable:!1})}function mq(){return globalThis[gq]}hq.exports={setGlobalDispatcher:fq,getGlobalDispatcher:mq}});var Fh=f(($ze,yq)=>{"use strict";yq.exports=class{#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var Cq=f((Wze,Eq)=>{"use strict";var _ce=hh();Eq.exports=t=>{let e=t?.maxRedirections;return r=>function(i,s){let{maxRedirections:o=e,...a}=i;if(!o)return r(i,s);let c=new _ce(r,o,i,s);return r(a,c)}}});var Bq=f((Kze,Iq)=>{"use strict";var vce=Rh();Iq.exports=t=>e=>function(n,i){return e(n,new vce({...n,retryOptions:{...t,...n.retryOptions}},{handler:i,dispatch:e}))}});var wq=f((Xze,bq)=>{"use strict";var Tce=Fe(),{InvalidArgumentError:Pce,RequestAbortedError:Dce}=We(),Oce=Fh(),yN=class extends Oce{#e=1024*1024;#t=null;#i=!1;#n=!1;#r=0;#s=null;#o=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new Pce("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#o=r}onConnect(e){this.#t=e,this.#o.onConnect(this.#a.bind(this))}#a(e){this.#n=!0,this.#s=e}onHeaders(e,r,n,i){let o=Tce.parseHeaders(r)["content-length"];if(o!=null&&o>this.#e)throw new Dce(`Response size (${o}) larger than maxSize (${this.#e})`);return this.#n?!0:this.#o.onHeaders(e,r,n,i)}onError(e){this.#i||(e=this.#s??e,this.#o.onError(e))}onData(e){return this.#r=this.#r+e.length,this.#r>=this.#e&&(this.#i=!0,this.#n?this.#o.onError(this.#s):this.#o.onComplete([])),!0}onComplete(e){if(!this.#i){if(this.#n){this.#o.onError(this.reason);return}this.#o.onComplete(e)}}};function Lce({maxSize:t}={maxSize:1024*1024}){return e=>function(n,i){let{dumpMaxSize:s=t}=n,o=new yN({maxSize:s},i);return e(n,o)}}bq.exports=Lce});var Sq=f((Zze,Nq)=>{"use strict";var{isIP:kce}=_("node:net"),{lookup:Mce}=_("node:dns"),Fce=Fh(),{InvalidArgumentError:au,InformationalError:Uce}=We(),Qq=Math.pow(2,31)-1,EN=class{#e=0;#t=0;#i=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#n,this.pick=e.pick??this.#r}get full(){return this.#i.size===this.#t}runLookup(e,r,n){let i=this.#i.get(e.hostname);if(i==null&&this.full){n(null,e.origin);return}let s={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(i==null)this.lookup(e,s,(o,a)=>{if(o||a==null||a.length===0){n(o??new Uce("No DNS entries found"));return}this.setRecords(e,a);let c=this.#i.get(e.hostname),l=this.pick(e,c,s.affinity),u;typeof l.port=="number"?u=`:${l.port}`:e.port!==""?u=`:${e.port}`:u="",n(null,`${e.protocol}//${l.family===6?`[${l.address}]`:l.address}${u}`)});else{let o=this.pick(e,i,s.affinity);if(o==null){this.#i.delete(e.hostname),this.runLookup(e,r,n);return}let a;typeof o.port=="number"?a=`:${o.port}`:e.port!==""?a=`:${e.port}`:a="",n(null,`${e.protocol}//${o.family===6?`[${o.address}]`:o.address}${a}`)}}#n(e,r,n){Mce(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(i,s)=>{if(i)return n(i);let o=new Map;for(let a of s)o.set(`${a.address}:${a.family}`,a);n(null,o.values())})}#r(e,r,n){let i=null,{records:s,offset:o}=r,a;if(this.dualStack?(n==null&&(o==null||o===Qq?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),s[n]!=null&&s[n].ips.length>0?a=s[n]:a=s[n===4?6:4]):a=s[n],a==null||a.ips.length===0)return i;a.offset==null||a.offset===Qq?a.offset=0:a.offset++;let c=a.offset%a.ips.length;return i=a.ips[c]??null,i==null?i:Date.now()-i.timestamp>i.ttl?(a.ips.splice(c,1),this.pick(e,r,n)):i}setRecords(e,r){let n=Date.now(),i={records:{4:null,6:null}};for(let s of r){s.timestamp=n,typeof s.ttl=="number"?s.ttl=Math.min(s.ttl,this.#e):s.ttl=this.#e;let o=i.records[s.family]??{ips:[]};o.ips.push(s),i.records[s.family]=o}this.#i.set(e.hostname,i)}getHandler(e,r){return new CN(this,e,r)}},CN=class extends Fce{#e=null;#t=null;#i=null;#n=null;#r=null;constructor(e,{origin:r,handler:n,dispatch:i},s){super(n),this.#r=r,this.#n=n,this.#t={...s},this.#e=e,this.#i=i}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#r,this.#t,(r,n)=>{if(r)return this.#n.onError(r);le
Line truncated
|
||||
${s}`;break;case"retry":o2(s)&&(r[i]=s);break;case"id":a2(s)&&(r[i]=s);break;case"event":s.length>0&&(r[i]=s);break}}processEvent(e){e.retry&&o2(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&a2(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};c2.exports={EventSourceStream:sS}});var h2=f((_je,m2)=>{"use strict";var{pipeline:Wde}=_("node:stream"),{fetching:Kde}=Op(),{makeRequest:Xde}=uu(),{webidl:Eo}=Mr(),{EventSourceStream:Zde}=l2(),{parseMIMEType:epe}=wn(),{createFastMessageEvent:tpe}=mu(),{isNetworkError:u2}=Pp(),{delay:rpe}=nS(),{kEnumerableProperty:Rc}=Fe(),{environmentSettingsObject:A2}=Gn(),d2=!1,p2=3e3,Jp=0,g2=1,$p=2,npe="anonymous",ipe="use-credentials",Iu=class t extends EventTarget{#e={open:null,error:null,message:null};#t=null;#i=!1;#n=Jp;#r=null;#s=null;#o;#a;constructor(e,r={}){super(),Eo.util.markAsUncloneable(this);let n="EventSource constructor";Eo.argumentLengthCheck(arguments,1,n),d2||(d2=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Eo.converters.USVString(e,n,"url"),r=Eo.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#o=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:p2};let i=A2,s;try{s=new URL(e,i.settingsObject.baseUrl),this.#a.origin=s.origin}catch(c){throw new DOMException(c,"SyntaxError")}this.#t=s.href;let o=npe;r.withCredentials&&(o=ipe,this.#i=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:o==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=A2.settingsObject,a.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],a.cache="no-store",a.initiator="other",a.urlList=[new URL(this.#t)],this.#r=Xde(a),this.#c()}get readyState(){return this.#n}get url(){return this.#t}get withCredentials(){return this.#i}#c(){if(this.#n===$p)return;this.#n=Jp;let e={request:this.#r,dispatcher:this.#o},r=n=>{u2(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#l()};e.processResponseEndOfBody=r,e.processResponse=n=>{if(u2(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#l();return}let i=n.headersList.get("content-type",!0),s=i!==null?epe(i):"failure",o=s!=="failure"&&s.essence==="text/event-stream";if(n.status!==200||o===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#n=g2,this.dispatchEvent(new Event("open")),this.#a.origin=n.urlList[n.urlList.length-1].origin;let a=new Zde({eventSourceSettings:this.#a,push:c=>{this.dispatchEvent(tpe(c.type,c.options))}});Wde(n.body.stream,a,c=>{c?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#s=Kde(e)}async#l(){this.#n!==$p&&(this.#n=Jp,this.dispatchEvent(new Event("error")),await rpe(this.#a.reconnectionTime),this.#n===Jp&&(this.#a.lastEventId.length&&this.#r.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#c()))}close(){Eo.brandCheck(this,t),this.#n!==$p&&(this.#n=$p,this.#s.abort(),this.#r=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},f2={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Jp,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:g2,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:$p,writable:!1}};Object.defineProperties(Iu,f2);Object.defineProperties(Iu.prototype,f2);Object.defineProperties(Iu.prototype,{close:Rc,onerror:Rc,onmessage:Rc,onopen:Rc,readyState:Rc,url:Rc,withCredentials:Rc});Eo.converters.EventSourceInitDict=Eo.dictionaryConverter([{key:"withCredentials",converter:Eo.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Eo.converters.any}]);m2.exports={EventSource:Iu,defaultReconnectionTime:p2}});var oS=f((vje,Se)=>{"use strict";var spe=$l(),y2=Zd(),ope=Wl(),ape=fU(),cpe=Kl(),lpe=_Q(),upe=FU(),Ape=jU(),E2=We(),Ny=Fe(),{InvalidArgumentError:Qy}=E2,Bu=v1(),dpe=tp(),ppe=AN(),gpe=pq(),fpe=gN(),mpe=XQ(),hpe=Rh(),{getGlobalDispatcher:C2,setGlobalDispatcher:ype}=Mh(),Epe=Fh(),Cpe=hh(),Ipe=yh();Object.assign(y2.prototype,Bu);Se.exports.Dispatcher=y2;Se.exports.Client=spe;Se.exports.Pool=ope;Se.exports.BalancedPool=ape;Se.exports.Agent=cpe;Se.exports.ProxyAgent=lpe;Se.exports.EnvHttpProxyAgent=upe;Se.exports.RetryAgent=Ape;Se.exports.RetryHandle
Line truncated
|
||||
|
||||
Error Code : ${o.statusCode}
|
||||
|
||||
Error Message: ${o.message}`)})).result)===null||r===void 0?void 0:r.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(e){return B2(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);r=`${r}&audience=${i}`}(0,b2.debug)(`ID token url is ${r}`);let n=yield t.getCall(r);return(0,b2.setSecret)(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};bu.OidcClient=gS});var yS=f(_n=>{"use strict";var fS=_n&&_n.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(_n,"__esModule",{value:!0});_n.summary=_n.markdownSummary=_n.SUMMARY_DOCS_URL=_n.SUMMARY_ENV_VAR=void 0;var $pe=_("os"),mS=_("fs"),{access:Wpe,appendFile:Kpe,writeFile:Xpe}=mS.promises;_n.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";_n.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var hS=class{constructor(){this._buffer=""}filePath(){return fS(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[_n.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${_n.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield Wpe(e,mS.constants.R_OK|mS.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let i=Object.entries(n).map(([s,o])=>` ${s}="${o}"`).join("");return r?`<${e}${i}>${r}</${e}>`:`<${e}${i}>`}write(e){return fS(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?Xpe:Kpe)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return fS(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw($pe.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(i).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",i=e.map(o=>this.wrap("li",o)).join(""),s=this.wrap(n,i);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(i=>{let s=i.map(o=>{if(typeof o=="string")return this.wrap("td",o);let{header:a,data:c,colspan:l,rowspan:u}=o,A=a?"th":"td",p=Object.assign(Object.assign({},l&&{colspan:l}),u&&{rowspan:u});return this.wrap(A,c,p)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:i,height:s}=n||{},o=Object.assign(Object.assign({},i&&{width:i}),s&&{height:s}),a=this.wrap("img",null,Object.assign({src:e,alt:r},o));return this.addRaw(a).addEOL()}addHeading(e,r){let n=`h${r}`,i=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",s=this.wrap(i,e);return this.addRaw(s).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),i=this.wrap("blockquote",e,n);return this.addRaw(i).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},Q2=new hS;_n.markdownSummary=Q2;_n.summary=Q2});var N2=f(os=>{"use strict";var Zpe=os&&os.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ege=os&&os.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),tge=os&&os.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Zpe(r,e,n[i]);return ege(r,e),r}})();Object.defineProperty(os,"__esModule",{value:!0});os.toPosixPath=nge;os.toWin32Path=ige;os.toPlatformPath=sge;var rge=tge(_("path"));function nge(t){return t.replace(/[\\]/g,"/")}function ige(t){return t.replace(/[/]/g,"\\")}function sge(t){return t.replace(/[/\\]/g,rge.sep)}});var Dy=f(Xn=>{"use strict";var oge=Xn&&Xn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.gLine truncated
|
||||
`);return{name:e,version:r}});$e.platform=D2.default.platform();$e.arch=D2.default.arch();$e.isWindows=$e.platform==="win32";$e.isMacOS=$e.platform==="darwin";$e.isLinux=$e.platform==="linux";function wge(){return Ly(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield $e.isWindows?Ige():$e.isMacOS?Bge():bge()),{platform:$e.platform,arch:$e.arch,isWindows:$e.isWindows,isMacOS:$e.isMacOS,isLinux:$e.isLinux})})}});var Dt=f(Te=>{"use strict";var Qge=Te&&Te.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Nge=Te&&Te.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),BS=Te&&Te.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Qge(r,e,n[i]);return Nge(r,e),r}})(),L2=Te&&Te.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Te,"__esModule",{value:!0});Te.platform=Te.toPlatformPath=Te.toWin32Path=Te.toPosixPath=Te.markdownSummary=Te.summary=Te.ExitCode=void 0;Te.exportVariable=xge;Te.setSecret=_ge;Te.addPath=vge;Te.getInput=bS;Te.getMultilineInput=Tge;Te.getBooleanInput=Pge;Te.setOutput=Dge;Te.setCommandEcho=Oge;Te.setFailed=Lge;Te.isDebug=kge;Te.debug=Mge;Te.error=M2;Te.warning=Fge;Te.notice=Uge;Te.info=qge;Te.startGroup=F2;Te.endGroup=U2;Te.group=Hge;Te.saveState=Gge;Te.getState=zge;Te.getIDToken=jge;var Si=HL(),xc=jL(),Qu=_m(),k2=BS(_("os")),Sge=BS(_("path")),Rge=w2(),IS;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(IS||(Te.ExitCode=IS={}));function xge(t,e){let r=(0,Qu.toCommandValue)(e);if(process.env[t]=r,process.env.GITHUB_ENV||"")return(0,xc.issueFileCommand)("ENV",(0,xc.prepareKeyValueMessage)(t,e));(0,Si.issueCommand)("set-env",{name:t},r)}function _ge(t){(0,Si.issueCommand)("add-mask",{},t)}function vge(t){process.env.GITHUB_PATH||""?(0,xc.issueFileCommand)("PATH",t):(0,Si.issueCommand)("add-path",{},t),process.env.PATH=`${t}${Sge.delimiter}${process.env.PATH}`}function bS(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}function Tge(t,e){let r=bS(t,e).split(`
|
||||
`).filter(n=>n!=="");return e&&e.trimWhitespace===!1?r:r.map(n=>n.trim())}function Pge(t,e){let r=["true","True","TRUE"],n=["false","False","FALSE"],i=bS(t,e);if(r.includes(i))return!0;if(n.includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}function Dge(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,xc.issueFileCommand)("OUTPUT",(0,xc.prepareKeyValueMessage)(t,e));process.stdout.write(k2.EOL),(0,Si.issueCommand)("set-output",{name:t},(0,Qu.toCommandValue)(e))}function Oge(t){(0,Si.issue)("echo",t?"on":"off")}function Lge(t){process.exitCode=IS.Failure,M2(t)}function kge(){return process.env.RUNNER_DEBUG==="1"}function Mge(t){(0,Si.issueCommand)("debug",{},t)}function M2(t,e={}){(0,Si.issueCommand)("error",(0,Qu.toCommandProperties)(e),t instanceof Error?t.toString():t)}function Fge(t,e={}){(0,Si.issueCommand)("warning",(0,Qu.toCommandProperties)(e),t instanceof Error?t.toString():t)}function Uge(t,e={}){(0,Si.issueCommand)("notice",(0,Qu.toCommandProperties)(e),t instanceof Error?t.toString():t)}function qge(t){process.stdout.write(t+k2.EOL)}function F2(t){(0,Si.issue)("group",t)}function U2(){(0,Si.issue)("endgroup")}function Hge(t,e){return L2(this,void 0,void 0,function*(){F2(t);let r;try{r=yield e()}finally{U2()}return r})}function Gge(t,e){if(process.env.GITHUB_STATE||"")return(0,xc.issueFileCommand)("STATE",(0,xc.prepareKeyValueMessage)(t,e));(0,Si.issueCommand)("save-state",{name:t},(0,Qu.toCommandValue)(e))}function zge(t){return process.env[`STATE_${t}`]||""}function jge(t){return L2(this,void 0,void 0,function*(){return yield Rge.OidcClient.getIDToken(t)})}var Vge=yS();Object.defineProperty(Te,"summary",{enumerable:!0,get:function(){return Vge.summary}});var Yge=yS();Object.defineProperty(Te,"markdownSummary",{enumerable:!0,get:function(){return Yge.markdownSummary}});var wS=N2();Object.defineProperty(Te,"toPosixPath",{enumerable:!0,get:function(){return wS.toPosixPath}});Object.defineProperty(Te,"toWin32Path",{enumerable:!0,get:function(){return wS.toWin32Path}});Object.defineProperty(Te,"toPlatformPath",{enumerable:!0,get:function(){return wS.toPlatformPath}});Te.platform=BS(O2())});var da=f((vn,RS)=>{"use strict";var QS=vn.ValidationError=function(e,r,n,i,s,o){if(Array.isArray(i)?(this.path=i,this.property=i.reduce(function(c,l){return c+H2(l)},"instance")):i!==void 0&&(this.property=i),e&&(this.message=e),n){var a=n.$id||n.id;this.schema=a||n}r!==void 0&&(this.instance=r),this.name=s,this.argument=o,this.stack=this.toString()};QS.prototype.toString=function(){return this.property+" "+this.message};var ky=vn.ValidatorResult=function(e,r,n,i){this.instance=e,this.schema=r,this.options=n,this.path=i.path,this.propertyPath=i.propertyPath,this.errors=[],this.throwError=n&&n.throwError,this.throwFirst=n&&n.throwFirst,this.throwAll=n&&n.throwAll,this.disableFormat=n&&n.disableFormat===!0};ky.prototype.addError=function(e){var r;if(typeof e=="string")r=new QS(e,this.instance,this.schema,this.path);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");r=new QS(e.message,this.instance,this.schema,this.path,e.name,e.argument)}if(this.errors.push(r),this.throwFirst)throw new _c(this);if(this.throwError)throw r;return r};ky.prototype.importErrors=function(e){typeof e=="string"||e&&e.validatorType?this.addError(e):e&&e.errors&&(this.errors=this.errors.concat(e.errors))};function Jge(t,e){return e+": "+t.toString()+`
|
||||
`}ky.prototype.toString=function(e){return this.errors.map(Jge).join("")};Object.defineProperty(ky.prototype,"valid",{get:function(){return!this.errors.length}});RS.exports.ValidatorResultError=_c;function _c(t){typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,_c),this.instance=t.instance,this.schema=t.schema,this.options=t.options,this.errors=t.errors}_c.prototype=new Error;_c.prototype.constructor=_c;_c.prototype.name="Validation Error";var q2=vn.SchemaError=function t(e,r){this.message=e,this.schema=r,Error.call(this,e),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)};q2.prototype=Object.create(Error.prototype,{constructor:{value:q2,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var NS=vn.SchemaContext=function(e,r,n,i,s){this.schema=e,this.options=r,Array.isArray(n)?(this.path=n,this.propertyPath=n.reduce(function(o,a){return o+H2(a)},"instance")):this.propertyPath=n,this.base=i,this.schemas=s};NS.prototype.resolve=function(e){return G2(this.base,e)};NS.prototype.makeChild=function(e,r){var n=r===void 0?this.path:this.path.concat([r]),i=e.$id||e.id;let s=G2(this.base,i||"");var o=new NS(e,this.options,n,s,Object.create(this.schemas));return i&&!o.schemas[s]&&(o.schemas[s]=e),o};var as=vn.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Z
Line truncated
|
||||
`+t.errors.map(e=>` - ${e.message}`).join(`
|
||||
`)}function Mfe(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let o in r)if(kfe.includes(o))return Promise.reject(new Error(`[@octokit/graphql] "${o}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,i=Object.keys(n).reduce((o,a)=>Lfe.includes(a)?(o[a]=n[a],o):(o.variables||(o.variables={}),o.variables[a]=n[a],o),{}),s=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return Uz.test(s)&&(i.url=s.replace(Uz,"/api/graphql")),t(i).then(o=>{if(o.data.errors){let a={};for(let c of Object.keys(o.headers))a[c]=o.headers[c];throw new Ofe(i,a,o.data)}return o.data.data})}function HS(t,e){let r=t.defaults(e);return Object.assign((i,s)=>Mfe(r,i,s),{defaults:HS.bind(null,r),endpoint:r.endpoint})}function qz(t){return HS(t,{method:"POST",url:"/graphql"})}var Pfe,Ofe,Lfe,kfe,Uz,gVe,Hz=Kt(()=>{qS();Fz();Pfe="0.0.0-development";Ofe=class extends Error{constructor(t,e,r){super(Dfe(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},Lfe=["method","baseUrl","url","headers","request","query","mediaType","operationName"],kfe=["query","method","url"],Uz=/\/api\/v3\/?$/;gVe=HS(rg,{headers:{"user-agent":`octokit-graphql.js/${Pfe} ${Mz()}`},method:"POST",url:"/graphql"})});async function Ufe(t){let e=Ffe(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}function qfe(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function Hfe(t,e,r,n){let i=e.endpoint.merge(r,n);return i.headers.authorization=qfe(t),e(i)}var GS,Gz,zz,Ffe,jz,Vz=Kt(()=>{GS="(?:[a-zA-Z0-9_-]+)",Gz="\\.",zz=new RegExp(`^${GS}${Gz}${GS}${Gz}${GS}$`),Ffe=zz.test.bind(zz);jz=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(Ufe.bind(null,e),{hook:Hfe.bind(null,e)})}});var zS,Yz=Kt(()=>{zS="7.0.6"});var Wz={};Nm(Wz,{Octokit:()=>jS});function jfe(t={}){return typeof t.debug!="function"&&(t.debug=Jz),typeof t.info!="function"&&(t.info=Jz),typeof t.warn!="function"&&(t.warn=Gfe),typeof t.error!="function"&&(t.error=zfe),t}var Jz,Gfe,zfe,$z,jS,Kz=Kt(()=>{cz();yz();qS();Hz();Vz();Yz();Jz=()=>{},Gfe=console.warn.bind(console),zfe=console.error.bind(console);$z=`octokit-core.js/${zS} ${az()}`,jS=class{static VERSION=zS;static defaults(e){return class extends this{constructor(...n){let i=n[0]||{};if(typeof e=="function"){super(e(i));return}super(Object.assign({},e,i,i.userAgent&&e.userAgent?{userAgent:`${i.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static plugins=r.concat(e.filter(i=>!r.includes(i)))}}constructor(e={}){let r=new hz.Collection,n={baseUrl:rg.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${$z}`:$z,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=rg.defaults(n),this.graphql=qz(this.request).defaults(n),this.log=jfe(e.log),this.hook=r,e.authStrategy){let{authStrategy:s,...o}=e,a=s(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:o},e.auth));r.wrap("request",a.hook),this.auth=a}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let s=jz(e.auth);r.wrap("request",s.hook),this.auth=s}let i=this.constructor;for(let s=0;s<i.plugins.length;++s)Object.assign(this,i.plugins[s](this,e))}request;graphql;log;hook;auth}});var VS,Xz=Kt(()=>{VS="17.0.0"});var Vfe,Zz,ej=Kt(()=>{Vfe={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addRepoAccessToSelfHostedRunnerGroupInOrg:["PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createEnvironmentVariable:["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"],createHostedRunnerForOrg:["POST /orgs/{org}/actions/hosted-runners"],createOrUpdateEnvironmentSecret:["PUT /repos/{owner}/{repo}/environments/{envi
Line truncated
|
||||
%s`,oe,oe,R,n);var te=R.type==="*"?Ix:R.type==="?"?Cx:"\\"+R.type;i=!0,n=n.slice(0,R.reStart)+te+"\\("+oe}y(),s&&(n+="\\\\");var le=!1;switch(n.charAt(0)){case"[":case".":case"(":le=!0}for(var Me=a.length-1;Me>-1;Me--){var et=a[Me],It=n.slice(0,et.reStart),ut=n.slice(et.reStart,et.reEnd-8),Le=n.slice(et.reEnd-8,et.reEnd),gt=n.slice(et.reEnd);Le+=gt;var nr=It.split("(").length-1,gi=gt;for(b=0;b<nr;b++)gi=gi.replace(/\)[+*?]?/,"");gt=gi;var Rt="";gt===""&&e!==PE&&(Rt="$");var $i=It+ut+gt+Rt+Le;n=$i}if(n!==""&&i&&(n="(?=.)"+n),le&&(n=p+n),e===PE)return[n,i];if(!i)return Nbe(t);var ys=r.nocase?"i":"";try{var Ho=new RegExp("^"+n+"$",ys)}catch{return new RegExp("$.")}return Ho._glob=t,Ho._src=n,Ho}ri.makeRe=function(t,e){return new ur(t,e||{}).makeRe()};ur.prototype.makeRe=Qbe;function Qbe(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?Ix:e.dot?hbe:ybe,n=e.nocase?"i":"",i=t.map(function(s){return s.map(function(o){return o===Hc?r:typeof o=="string"?Sbe(o):o._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}ri.match=function(t,e,r){r=r||{};var n=new ur(e,r);return t=t.filter(function(i){return n.match(i)}),n.options.nonull&&!t.length&&t.push(e),t};ur.prototype.match=function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;_g.sep!=="/"&&(e=e.split(_g.sep).join("/")),e=e.split(w$),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<i.length;o++){var a=i[o],c=e;n.matchBase&&a.length===1&&(c=[s]);var l=this.matchOne(c,a,r);if(l)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};ur.prototype.matchOne=function(t,e,r){return e.indexOf(Hc)!==-1?this._matchGlobstar(t,e,r,0,0):this._matchOne(t,e,r,0,0)};ur.prototype._matchGlobstar=function(t,e,r,n,i){var s,o=-1;for(s=i;s<e.length;s++)if(e[s]===Hc){o=s;break}var a=-1;for(s=e.length-1;s>=0;s--)if(e[s]===Hc){a=s;break}var c=e.slice(i,o),l=r?e.slice(o+1):e.slice(o+1,a),u=r?[]:e.slice(a+1);if(c.length){var A=t.slice(n,n+c.length);if(!this._matchOne(A,c,r,0,0))return!1;n+=c.length}var p=0;if(u.length){if(u.length+n>t.length)return!1;var m=t.length-u.length;if(this._matchOne(t,u,r,m,0))p=u.length;else{if(t[t.length-1]!==""||n+u.length===t.length||(m--,!this._matchOne(t,u,r,m,0)))return!1;p=u.length+1}}if(!l.length){var y=!!p;for(s=n;s<t.length-p;s++){var b=String(t[s]);if(y=!0,b==="."||b===".."||!this.options.dot&&b.charAt(0)===".")return!1}return r||y}for(var x=[[[],0]],S=x[0],R=0,P=[0],G=0;G<l.length;G++){var oe=l[G];oe===Hc?(P.push(R),S=[[],0],x.push(S)):(S[0].push(oe),R++)}for(var te=x.length-1,le=t.length-p,Me=0;Me<x.length;Me++)x[Me][1]=le-(P[te--]+x[Me][0].length);return!!this._matchGlobStarBodySections(t,x,n,0,r,0,!!p)};ur.prototype._matchGlobStarBodySections=function(t,e,r,n,i,s,o){var a=e[n];if(!a){for(var c=r;c<t.length;c++){o=!0;var l=t[c];if(l==="."||l===".."||!this.options.dot&&l.charAt(0)===".")return!1}return o}for(var u=a[0],A=a[1];r<=A;){var p=this._matchOne(t.slice(0,r+u.length),u,i,r,0);if(p&&s<this.maxGlobstarRecursion){var m=this._matchGlobStarBodySections(t,e,r+u.length,n+1,i,s+1,o);if(m!==!1)return m}var l=t[r];if(l==="."||l===".."||!this.options.dot&&l.charAt(0)===".")return!1;r++}return i||null};ur.prototype._matchOne=function(t,e,r,n,i){var s,o,a,c;for(s=n,o=i,a=t.length,c=e.length;s<a&&o<c;s++,o++){this.debug("matchOne loop");var l=e[o],u=t[s];if(this.debug(e,l,u),l===!1||l===Hc)return!1;var A;if(typeof l=="string"?(A=u===l,this.debug("string match",l,u,A)):(A=u.match(l),this.debug("pattern match",l,u,A)),!A)return!1}if(s===a&&o===c)return!0;if(s===a)return r;if(o===c)return s===a-1&&t[s]==="";throw new Error("wtf?")};function Nbe(t){return t.replace(/\\(.)/g,"$1")}function Sbe(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var x$=f(_i=>{"use strict";var Rbe=_i&&_i.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),xbe=_i&&_i.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),R$=_i&&_i.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Rbe(r,e,n[i]);return xbe(r,e),r}})(),_be=_i&&_i.__importDefault||function(t){return t&&t.__es
Line truncated
|
||||
`),e=e.replace(/\r/g,`
|
||||
`));let i=e.split(`
|
||||
`).map(s=>s.trim());for(let s of i)!s||s.startsWith("#")||n.patterns.push(new O$.Pattern(s));return n.searchPaths.push(...kE.getSearchPaths(n.patterns)),n})}static stat(e,r,n){return Sx(this,void 0,void 0,function*(){let i;if(r.followSymbolicLinks)try{i=yield Dg.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Rx.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw s}else i=yield Dg.promises.lstat(e.path);if(i.isDirectory()&&r.followSymbolicLinks){let s=yield Dg.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(o=>o===s)){Rx.debug(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return i})}};Rr.DefaultGlobber=xx});var q$=f(ni=>{"use strict";var Hbe=ni&&ni.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Gbe=ni&&ni.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ju=ni&&ni.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Hbe(r,e,n[i]);return Gbe(r,e),r}})(),zbe=ni&&ni.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},jbe=ni&&ni.__asyncValues||function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}};Object.defineProperty(ni,"__esModule",{value:!0});ni.hashFiles=$be;var M$=ju(_("crypto")),F$=ju(Dt()),U$=ju(_("fs")),Vbe=ju(_("stream")),Ybe=ju(_("util")),Jbe=ju(_("path"));function $be(t,e){return zbe(this,arguments,void 0,function*(r,n,i=!1){var s,o,a,c,l;let u=i?F$.info:F$.debug,A=!1,p=n||((l=process.env.GITHUB_WORKSPACE)!==null&&l!==void 0?l:process.cwd()),m=M$.createHash("sha256"),y=0;try{for(var b=!0,x=jbe(r.globGenerator()),S;S=yield x.next(),s=S.done,!s;b=!0){c=S.value,b=!1;let R=c;if(u(R),!R.startsWith(`${p}${Jbe.sep}`)){u(`Ignore '${R}' since it is not under GITHUB_WORKSPACE.`);continue}if(U$.statSync(R).isDirectory()){u(`Skip directory '${R}'.`);continue}let P=M$.createHash("sha256");yield Ybe.promisify(Vbe.pipeline)(U$.createReadStream(R),P),m.write(P.digest()),y++,A||(A=!0)}}catch(R){o={error:R}}finally{try{!b&&!s&&(a=x.return)&&(yield a.call(x))}finally{if(o)throw o.error}}return m.end(),A?(u(`Found ${y} files to hash.`),m.digest("hex")):(u("No matches found for glob"),"")})}});var z$=f(Vu=>{"use strict";var H$=Vu&&Vu.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Vu,"__esModule",{value:!0});Vu.create=G$;Vu.hashFiles=Xbe;var Wbe=k$(),Kbe=q$();function G$(t,e){return H$(this,void 0,void 0,function*(){return yield Wbe.DefaultGlobber.create(t,e)})}function Xbe(t){return H$(this,arguments,void 0,function*(e,r="",n,i=!1){let s=!0;n&&typeof n.followSymbolicLinks=="boolean"&&(s=n.followSymbolicLinks);let o=yield G$(e,{followSymbolicLinks:s});return(0,Kbe.hashFiles)(o,r,i)})}});var W$=f((xe,$$)=>{xe=$$.exports=ke;var st;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?st=function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)}:st=function(){};xe.SEMVER_SPEC_VERSION="2.0.0";var Lg=256,ME=Number.MAX_SAFE_INTEGER||9007199254740991,_x=16,Zbe=Lg-6,Yu=xe.re=[],it=xe.safeRe=[],V=xe.src=[],M=xe.tokens={},Y$=0;function Ue(t){M[t]=Y$++}var Tx="[a-zA-Z0-9-]",vx=[["\\s",1],["\\d",Lg],[Tx,Zbe]];function Mg(t){for(var e=0;e<vx.length;e++){var r=vx[e][0],n=vx[e][1];t=t.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return t}Ue("NUMERICIDENTIFIER");V[M.NUME
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var l=!0,u=M0e(c.globGenerator()),A;A=yield u.next(),e=A.done,!e;l=!0){i=A.value,l=!1;let p=i,m=HE.relative(a,p).replace(new RegExp(`\\${HE.sep}`,"g"),"/");Ug.debug(`Matched: ${m}`),m===""?o.push("."):o.push(`${m}`)}}catch(p){r={error:p}}finally{try{!l&&!e&&(n=u.return)&&(yield n.call(u))}finally{if(r)throw r.error}}return o})}function Y0e(t){return $u(this,void 0,void 0,function*(){return H0e.promisify(kx.unlink)(t)})}function rW(t){return $u(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),Ug.debug(`Checking ${e} ${r.join(" ")}`);try{yield F0e.exec(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i=>n+=i.toString(),stderr:i=>n+=i.toString()}})}catch(i){Ug.debug(i.message)}return n=n.trim(),Ug.debug(n),n})}function J0e(){return $u(this,void 0,void 0,function*(){let t=yield rW("zstd",["--quiet"]),e=q0e.clean(t);return Ug.debug(`zstd version: ${e}`),t===""?Vc.CompressionMethod.Gzip:Vc.CompressionMethod.ZstdWithoutLong})}function $0e(t){return t===Vc.CompressionMethod.Gzip?Vc.CacheFilename.Gzip:Vc.CacheFilename.Zstd}function W0e(){return $u(this,void 0,void 0,function*(){return kx.existsSync(Vc.GnuTarPathOnWindows)?Vc.GnuTarPathOnWindows:(yield rW("tar")).toLowerCase().includes("gnu tar")?eW.which("tar"):""})}function K0e(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}function X0e(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(G0e),tW.createHash("sha256").update(n.join("|")).digest("hex")}function Z0e(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}});var Lt={};Nm(Lt,{__addDisposableResource:()=>SW,__assign:()=>GE,__asyncDelegator:()=>EW,__asyncGenerator:()=>yW,__asyncValues:()=>CW,__await:()=>Ku,__awaiter:()=>dW,__classPrivateFieldGet:()=>wW,__classPrivateFieldIn:()=>NW,__classPrivateFieldSet:()=>QW,__createBinding:()=>jE,__decorate:()=>sW,__disposeResources:()=>RW,__esDecorate:()=>aW,__exportStar:()=>gW,__extends:()=>nW,__generator:()=>pW,__importDefault:()=>bW,__importStar:()=>BW,__makeTemplateObject:()=>IW,__metadata:()=>AW,__param:()=>oW,__propKey:()=>lW,__read:()=>Ux,__rest:()=>iW,__rewriteRelativeImportExtension:()=>xW,__runInitializers:()=>cW,__setFunctionName:()=>uW,__spread:()=>fW,__spreadArray:()=>hW,__spreadArrays:()=>mW,__values:()=>zE,default:()=>rwe});function nW(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Mx(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function iW(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function sW(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function oW(t,e){return function(r,n){e(r,n,t)}}function aW(t,e,r,n,i,s){function o(S){if(S!==void 0&&typeof S!="function")throw new TypeError("Function expected");return S}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!e&&t?n.static?t:t.prototype:null,u=e||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),A,p=!1,m=r.length-1;m>=0;m--){var y={};for(var b in n)y[b]=b==="access"?{}:n[b];for(var b in n.access)y.access[b]=n.access[b];y.addInitializer=function(S){if(p)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(S||null))};var x=(0,r[m])(a==="accessor"?{get:u.get,set:u.set}:u[c],y);if(a==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(A=o(x.get))&&(u.get=A),(A=o(x.set))&&(u.set=A),(A=o(x.init))&&i.unshift(A)}else(A=o(x))&&(a==="field"?i.unshift(A):u[c]=A)}l&&Object.defineProperty(l,n.name,u),p=!0}function cW(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function lW(t){return typeof t=="symbol"?t:"".concat(t)}function uW(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function AW(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function dW(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then
Line truncated
|
||||
${Twe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};jg.RestError=eC;function Pwe(t){return t instanceof eC?!0:(0,xwe.isError)(t)&&t.name==="RestError"}});var Yc=f(tC=>{"use strict";Object.defineProperty(tC,"__esModule",{value:!0});tC.uint8ArrayToString=Dwe;tC.stringToUint8Array=Owe;function Dwe(t,e){return Buffer.from(t).toString(e)}function Owe(t,e){return Buffer.from(t,e)}});var Vg=f(rC=>{"use strict";Object.defineProperty(rC,"__esModule",{value:!0});rC.logger=void 0;var Lwe=Gg();rC.logger=(0,Lwe.createClientLogger)("ts-http-runtime")});var ZW=f(iC=>{"use strict";Object.defineProperty(iC,"__esModule",{value:!0});iC.getBodyLength=XW;iC.createNodeHttpClient=zwe;var d_=(kt(),ft(Lt)),l_=d_.__importDefault(_("node:http")),u_=d_.__importDefault(_("node:https")),JW=d_.__importDefault(_("node:zlib")),kwe=_("node:stream"),$W=qg(),Mwe=wa(),Jg=Xu(),Zu=Vg(),Fwe=zg(),Uwe={};function Yg(t){return t&&typeof t.pipe=="function"}function WW(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function KW(t){return t&&typeof t.byteLength=="number"}var nC=class extends kwe.Transform{loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(i){n(i)}}constructor(e){super(),this.progressCallback=e}},A_=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new $W.AbortError("The operation was aborted. Request has already been canceled.");n=l=>{l.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",n)}let i;e.timeout>0&&(i=setTimeout(()=>{let l=new Fwe.Sanitizer;Zu.logger.info(`request to '${l.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let s=e.headers.get("Accept-Encoding"),o=s?.includes("gzip")||s?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let l=XW(a);l!==null&&e.headers.set("Content-Length",l)}let c;try{if(a&&e.onUploadProgress){let y=e.onUploadProgress,b=new nC(y);b.on("error",x=>{Zu.logger.error("Error in upload progress",x)}),Yg(a)?a.pipe(b):b.end(a),a=b}let l=await this.makeRequest(e,r,a);i!==void 0&&clearTimeout(i);let u=qwe(l),p={status:l.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return l.resume(),p;c=o?Hwe(l,u):l;let m=e.onDownloadProgress;if(m){let y=new nC(m);y.on("error",b=>{Zu.logger.error("Error in download progress",b)}),c.pipe(y),c=y}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(p.status)?p.readableStreamBody=c:p.bodyAsText=await Gwe(c),p}finally{if(e.abortSignal&&n){let l=Promise.resolve();Yg(a)&&(l=WW(a));let u=Promise.resolve();Yg(c)&&(u=WW(c)),Promise.all([l,u]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(A=>{Zu.logger.warning("Error when cleaning up abortListener on httpRequest",A)})}}}makeRequest(e,r,n){let i=new URL(e.url),s=i.protocol!=="https:";if(s&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a={agent:e.agent??this.getOrCreateAgent(e,s),hostname:i.hostname,path:`${i.pathname}${i.search}`,port:i.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((c,l)=>{let u=s?l_.default.request(a,c):u_.default.request(a,c);u.once("error",A=>{l(new Jg.RestError(A.message,{code:A.code??Jg.RestError.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let A=new $W.AbortError("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(A),l(A)}),n&&Yg(n)?n.pipe(u):n?typeof n=="string"||Buffer.isBuffer(n)?u.end(n):KW(n)?u.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Zu.logger.error("Unrecognized body type",n),l(new Jg.RestError("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?l_.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new l_.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return u_.default.globalAgent;let i=e.tlsSettings??Uwe,s=this.cachedHttpsAgents.get(i);return s&&s.options.keepAlive===!n||(Zu.logger.info("No cached TLS Agent exist, creating a new Agent"),s=new u_.default.Agent({keepAlive:!n,...i}),this.cachedHttpsAgents.set(i,s)),s}}};function qwe(t){let e=(0,Mwe.createHttpHeaders)();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}function Hwe(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=JW.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=JW.default.createInflate();return t.pipe(n),n}retur
Line truncated
|
||||
`).join(`
|
||||
`+s),t.push(i+"m+"+gC.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=tNe()+e+" "+t[0]}function tNe(){return _r.inspectOpts.hideDate?"":new Date().toISOString()+" "}function rNe(...t){return process.stderr.write(pC.formatWithOptions(_r.inspectOpts,...t)+`
|
||||
`)}function nNe(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function iNe(){return process.env.DEBUG}function sNe(t){t.inspectOpts={};let e=Object.keys(_r.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=_r.inspectOpts[e[r]]}gC.exports=__()(_r);var{formatters:BK}=gC.exports;BK.o=function(t){return this.inspectOpts.colors=this.useColors,pC.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};BK.O=function(t){return this.inspectOpts.colors=this.useColors,pC.inspect(t,this.inspectOpts)}});var fC=f(($We,P_)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?P_.exports=mK():P_.exports=bK()});var NK=f(On=>{"use strict";var oNe=On&&On.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),aNe=On&&On.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wK=On&&On.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&oNe(e,t,r);return aNe(e,t),e};Object.defineProperty(On,"__esModule",{value:!0});On.req=On.json=On.toBuffer=void 0;var cNe=wK(_("http")),lNe=wK(_("https"));async function QK(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}On.toBuffer=QK;async function uNe(t){let r=(await QK(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}On.json=uNe;function ANe(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?lNe:cNe).request(t,e),i=new Promise((s,o)=>{n.once("response",s).once("error",o).end()});return n.then=i.then.bind(i),n}On.req=ANe});var O_=f(ii=>{"use strict";var RK=ii&&ii.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dNe=ii&&ii.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xK=ii&&ii.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&RK(e,t,r);return dNe(e,t),e},pNe=ii&&ii.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&RK(e,t,r)};Object.defineProperty(ii,"__esModule",{value:!0});ii.Agent=void 0;var gNe=xK(_("net")),SK=xK(_("http")),fNe=_("https");pNe(NK(),ii);var Fs=Symbol("AgentBaseInternalState"),D_=class extends SK.Agent{constructor(e){super(e),this[Fs]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
||||
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new gNe.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],i=n.indexOf(r);i!==-1&&(n.splice(i,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?fNe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(i),o=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,i)).then(a=>{if(this.decrementSockets(s,o),a instanceof SK.Agent)try{return a.addRequest(e,i)}catch(c){return n(c)}this[Fs].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(s,o),n(a)})}createConnection(){let e=this[Fs].currentSocket;if(this[Fs].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Fs].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Fs]&&(this[Fs].defaultPort=e)}get protocol(){return this[Fs].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Fs]&&(this[Fs].protocol=e)}};ii.Agent=D_});var _K=f(AA=>{"use strict";var mNe=AA&&AA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AA,"__esModule",{value:!0});AA.parseProxyResponse=void 0;var hNe=mNe(fC()),mC=(0,hNe.default)("https-proxy-agent:parse-proxy-response");function yNe(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let u=t.read();u?l(u):t.once("readable",s)}function o(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",s)}function a(){o(),mC("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(u){o(),mC("onerror %o",u),r(u)}function l(u){i.push(u),n+=u.length;let A=Buffer.concat(i,n),p=A.indexOf(`\r
|
||||
\r
|
||||
`);if(p===-1){mC("have not received end of HTTP headers yet..."),s();return}let m=A.slice(0,p).toString("ascii").split(`\r
|
||||
`),y=m.shift();if(!y)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let b=y.split(" "),x=+b[1],S=b.slice(2).join(" "),R={};for(let P of m){if(!P)continue;let G=P.indexOf(":");if(G===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${P}"`));let oe=P.slice(0,G).toLowerCase(),te=P.slice(G+1).trimStart(),le=R[oe];typeof le=="string"?R[oe]=[le,te]:Array.isArray(le)?le.push(te):R[oe]=te}mC("got proxy server response: %o %o",y,R),o(),e({connect:{statusCode:x,statusText:S,headers:R},buffered:A})}t.on("error",c),t.on("end",a),s()})}AA.parseProxyResponse=yNe});var LK=f(Di=>{"use strict";var ENe=Di&&Di.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),CNe=Di&&Di.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),DK=Di&&Di.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ENe(e,t,r);return CNe(e,t),e},OK=Di&&Di.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Di,"__esModule",{value:!0});Di.HttpsProxyAgent=void 0;var hC=DK(_("net")),vK=DK(_("tls")),INe=OK(_("assert")),BNe=OK(fC()),bNe=O_(),wNe=_("url"),QNe=_K(),Kg=(0,BNe.default)("https-proxy-agent"),TK=t=>t.servername===void 0&&t.host&&!hC.isIP(t.host)?{...t,servername:t.host}:t,yC=class extends bNe.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new wNe.URL(e):e,this.proxyHeaders=r?.headers??{},Kg("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?PK(r,"headers"):null,host:n,port:i}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;n.protocol==="https:"?(Kg("Creating `tls.Socket`: %o",this.connectOpts),i=vK.connect(TK(this.connectOpts))):(Kg("Creating `net.Socket`: %o",this.connectOpts),i=hC.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=hC.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${o}:${r.port} HTTP/1.1\r
|
||||
`;if(n.username||n.password){let p=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}s.Host=`${o}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(s))a+=`${p}: ${s[p]}\r
|
||||
`;let c=(0,QNe.parseProxyResponse)(i);i.write(`${a}\r
|
||||
`);let{connect:l,buffered:u}=await c;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),l.statusCode===200)return e.once("socket",NNe),r.secureEndpoint?(Kg("Upgrading socket connection to TLS"),vK.connect({...PK(TK(r),"host","path","port"),socket:i})):i;i.destroy();let A=new hC.Socket({writable:!1});return A.readable=!0,e.once("socket",p=>{Kg("Replaying proxy buffer for failed request"),(0,INe.default)(p.listenerCount("data")>0),p.push(u),p.push(null)}),A}};yC.protocols=["http","https"];Di.HttpsProxyAgent=yC;function NNe(t){t.resume()}function PK(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var FK=f(Oi=>{"use strict";var SNe=Oi&&Oi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),RNe=Oi&&Oi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),MK=Oi&&Oi.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&SNe(e,t,r);return RNe(e,t),e},xNe=Oi&&Oi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oi,"__esModule",{value:!0});Oi.HttpProxyAgent=void 0;var _Ne=MK(_("net")),vNe=MK(_("tls")),TNe=xNe(fC()),PNe=_("events"),DNe=O_(),kK=_("url"),dA=(0,TNe.default)("http-proxy-agent"),EC=class extends DNe.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new kK.URL(e):e,this.proxyHeaders=r?.headers??{},dA("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?ONe(r,"headers"):null,host:n,port:i}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,i=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",o=`${i}//${s}`,a=new kK.URL(e.path,o);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let c=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let l=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;c["Proxy-Authorization"]=`Basic ${Buffer.from(l).toString("base64")}`}c["Proxy-Connection"]||(c["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let l of Object.keys(c)){let u=c[l];u&&e.setHeader(l,u)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,i;dA("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(dA("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,i=n.indexOf(`\r
|
||||
\r
|
||||
`)+4,e.outputData[0].data=e._header+n.substring(i),dA("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(dA("Creating `tls.Socket`: %o",this.connectOpts),s=vNe.connect(this.connectOpts)):(dA("Creating `net.Socket`: %o",this.connectOpts),s=_Ne.connect(this.connectOpts)),await(0,PNe.once)(s,"connect"),s}};EC.protocols=["http","https"];Oi.HttpProxyAgent=EC;function ONe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var L_=f(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.globalNoProxyList=Li.proxyPolicyName=void 0;Li.loadNoProxy=zK;Li.getDefaultProxySettings=jNe;Li.proxyPolicy=YNe;var LNe=LK(),kNe=FK(),MNe=Vg(),FNe="HTTPS_PROXY",UNe="HTTP_PROXY",qNe="ALL_PROXY",HNe="NO_PROXY";Li.proxyPolicyName="proxyPolicy";Li.globalNoProxyList=[];var HK=!1,GNe=new Map;function CC(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}function GK(){if(!process)return;let t=CC(FNe),e=CC(qNe),r=CC(UNe);return t||e||r}function zNe(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let i=!1;for(let s of e)s[0]==="."?(n.endsWith(s)||n.length===s.length-1&&n===s.slice(1))&&(i=!0):n===s&&(i=!0);return r?.set(n,i),i}function zK(){let t=CC(HNe);return HK=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}function jNe(t){if(!t&&(t=GK(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}function VNe(){let t=GK();return t?new URL(t):void 0}function UK(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}function qK(t,e,r){if(t.agent)return;let i=new URL(t.url).protocol!=="https:";t.tlsSettings&&MNe.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();i?(e.httpProxyAgent||(e.httpProxyAgent=new kNe.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new LNe.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}function YNe(t,e){HK||Li.globalNoProxyList.push(...zK());let r=t?UK(t):VNe(),n={};return{name:Li.proxyPolicyName,async sendRequest(i,s){return!i.proxySettings&&r&&!zNe(i.url,e?.customNoProxyList??Li.globalNoProxyList,e?.customNoProxyList?void 0:GNe)?qK(i,n,r):i.proxySettings&&qK(i,n,UK(i.proxySettings)),s(i)}}}});var k_=f(pA=>{"use strict";Object.defineProperty(pA,"__esModule",{value:!0});pA.agentPolicyName=void 0;pA.agentPolicy=JNe;pA.agentPolicyName="agentPolicy";function JNe(t){return{name:pA.agentPolicyName,sendRequest:async(e,r)=>(e.agent||(e.agent=t),r(e))}}});var M_=f(gA=>{"use strict";Object.defineProperty(gA,"__esModule",{value:!0});gA.tlsPolicyName=void 0;gA.tlsPolicy=$Ne;gA.tlsPolicyName="tlsPolicy";function $Ne(t){return{name:gA.tlsPolicyName,sendRequest:async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e))}}});var Xg=f(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.isNodeReadableStream=jK;Wc.isWebReadableStream=VK;Wc.isBinaryBody=WNe;Wc.isReadableStream=YK;Wc.isBlob=KNe;function jK(t){return!!(t&&typeof t.pipe=="function")}function VK(t){return!!(t&&typeof t.getReader=="function"&&typeof t.tee=="function")}function WNe(t){return t!==void 0&&(t instanceof Uint8Array||YK(t)||typeof t=="function"||t instanceof Blob)}function YK(t){return jK(t)||VK(t)}function KNe(t){return typeof t.stream=="function"}});var WK=f(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.concat=tSe;var F_=_("stream"),XNe=Xg();async function*JK(){let t=this.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)return;yield r}}finally{t.releaseLock()}}function ZNe(t){t[Symbol.asyncIterator]||(t[Symbol.asyncIterator]=JK.bind(t)),t.values||(t.values=JK.bind(t))}function $K(t){return t instanceof ReadableStream?(ZNe(t),F_.Readable.fromWeb(t)):t}function eSe(t){return t instanceof Uint8Array?F_.Readable.from(Buffer.from(t)):(0,XNe.isBlob)(t)?$K(t.stream()):$K(t)}async function tSe(t){return function(){let e=t.map(r=>typeof r=="function"?r():r).map(eSe);return F_.Readable.from((async function*(){for(let r of e)for await(let n of r)yield n})())}}});var q_=f(mA=>{"use strict";Object.defineProperty(mA,"__esModule",{value:!0});mA.multipartPolicyName=void 0;mA.multipartPolicy=pSe;var fA=Yc(),rSe=Xg(),nSe=WE(),iSe=WK();function sSe(){return`----AzSDKFormBoundary${(0,nSe.randomUUID)()}`}function oSe(t){let e="";for(let[r,n]of t)e+=`${r}: ${n}\r
|
||||
`;return e}function aSe(t){return t instanceof Uint8Array?t.byteLength:(0,rSe.isBlob)(t)?t.size===-1?void 0:t.size:void 0}function cSe(t){let e=0;for(let r of t){let n=aSe(r);if(n===void 0)return;e+=n}return e}async function lSe(t,e,r){let n=[(0,fA.stringToUint8Array)(`--${r}`,"utf-8"),...e.flatMap(s=>[(0,fA.stringToUint8Array)(`\r
|
||||
`,"utf-8"),(0,fA.stringToUint8Array)(oSe(s.headers),"utf-8"),(0,fA.stringToUint8Array)(`\r
|
||||
`,"utf-8"),s.body,(0,fA.stringToUint8Array)(`\r
|
||||
--${r}`,"utf-8")]),(0,fA.stringToUint8Array)(`--\r
|
||||
\r
|
||||
`,"utf-8")],i=cSe(n);i&&t.headers.set("Content-Length",i),t.body=await(0,iSe.concat)(n)}mA.multipartPolicyName="multipartPolicy";var uSe=70,ASe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function dSe(t){if(t.length>uSe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!ASe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function pSe(){return{name:mA.multipartPolicyName,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",i=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,s,o]=i;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return r??=o,r?dSe(r):r=sSe(),t.headers.set("Content-Type",`${s}; boundary=${r}`),await lSe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}});var ZK=f(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});H_.createPipelineFromOptions=wSe;var gSe=f_(),fSe=n_(),mSe=m_(),hSe=E_(),ySe=C_(),ESe=R_(),CSe=x_(),KK=Wg(),ISe=L_(),BSe=k_(),bSe=M_(),XK=q_();function wSe(t){let e=(0,fSe.createEmptyPipeline)();return KK.isNodeLike&&(t.agent&&e.addPolicy((0,BSe.agentPolicy)(t.agent)),t.tlsOptions&&e.addPolicy((0,bSe.tlsPolicy)(t.tlsOptions)),e.addPolicy((0,ISe.proxyPolicy)(t.proxyOptions)),e.addPolicy((0,ySe.decompressResponsePolicy)())),e.addPolicy((0,CSe.formDataPolicy)(),{beforePolicies:[XK.multipartPolicyName]}),e.addPolicy((0,hSe.userAgentPolicy)(t.userAgentOptions)),e.addPolicy((0,XK.multipartPolicy)(),{afterPhase:"Deserialize"}),e.addPolicy((0,ESe.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),KK.isNodeLike&&e.addPolicy((0,mSe.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy((0,gSe.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),e}});var e3=f(hA=>{"use strict";Object.defineProperty(hA,"__esModule",{value:!0});hA.apiVersionPolicyName=void 0;hA.apiVersionPolicy=QSe;hA.apiVersionPolicyName="ApiVersionPolicy";function QSe(t){return{name:hA.apiVersionPolicyName,sendRequest:(e,r)=>{let n=new URL(e.url);return!n.searchParams.get("api-version")&&t.apiVersion&&(e.url=`${e.url}${Array.from(n.searchParams.keys()).length>0?"&":"?"}api-version=${t.apiVersion}`),r(e)}}}});var t3=f(yA=>{"use strict";Object.defineProperty(yA,"__esModule",{value:!0});yA.isOAuth2TokenCredential=NSe;yA.isBearerTokenCredential=SSe;yA.isBasicCredential=RSe;yA.isApiKeyCredential=xSe;function NSe(t){return"getOAuth2Token"in t}function SSe(t){return"getBearerToken"in t}function RSe(t){return"username"in t&&"password"in t}function xSe(t){return"key"in t}});var Zg=f(G_=>{"use strict";Object.defineProperty(G_,"__esModule",{value:!0});G_.ensureSecureConnection=PSe;var _Se=Vg(),r3=!1;function vSe(t,e){if(e.allowInsecureConnection&&t.allowInsecureConnection){let r=new URL(t.url);if(r.hostname==="localhost"||r.hostname==="127.0.0.1")return!0}return!1}function TSe(){let t="Sending token over insecure transport. Assume any token issued is compromised.";_Se.logger.warning(t),typeof process?.emitWarning=="function"&&!r3&&(r3=!0,process.emitWarning(t))}function PSe(t,e){if(!t.url.toLowerCase().startsWith("https://"))if(vSe(t,e))TSe();else throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false.")}});var n3=f(EA=>{"use strict";Object.defineProperty(EA,"__esModule",{value:!0});EA.apiKeyAuthenticationPolicyName=void 0;EA.apiKeyAuthenticationPolicy=OSe;var DSe=Zg();EA.apiKeyAuthenticationPolicyName="apiKeyAuthenticationPolicy";function OSe(t){return{name:EA.apiKeyAuthenticationPolicyName,async sendRequest(e,r){(0,DSe.ensureSecureConnection)(e,t);let n=(e.authSchemes??t.authSchemes)?.find(i=>i.kind==="apiKey");if(!n)return r(e);if(n.apiKeyLocation!=="header")throw new Error(`Unsupported API key location: ${n.apiKeyLocation}`);return e.headers.set(n.name,t.credential.key),r(e)}}}});var s3=f(CA=>{"use strict";Object.defineProperty(CA,"__esModule",{value:!0});CA.basicAuthenticationPolicyName=void 0;CA.basicAuthenticationPolicy=kSe;var i3=Yc(),LSe=Zg();CA.basicAuthenticationPolicyName="bearerAuthenticationPolicy";function kSe(t){return{name:CA.basicAuthenticationPolicyName,async sendRequest(e,r){if((0,LSe.ensureSecureConnection)(e,t),!(e.authSchemes??t.authSchemes)?.find(a=>a.kind==="http"&&a.scheme==="basic"))return r(e);let{username:i,password:s}=t.credential,o=(0,i3.uint8ArrayToString)((0,i3.stringToUint8Array)(`${i}:${s}`,"utf-8"),"base64");return e.headers.set("Authorization",`Basic ${o}`),r(e)}}}});var o3=f(IA=>{"use strict";Object.defineProperty(IA,"__esModule",{value:!0});IA.bearerAuthenticationPolicyName=void 0;IA.bearerAuthenticationPolic
Line truncated
|
||||
`).join(""))}return e(t)}}}});var H9=f(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.auxiliaryAuthenticationHeaderPolicyName=void 0;tl.auxiliaryAuthenticationHeaderPolicy=gve;var Ave=Mv(),dve=tf();tl.auxiliaryAuthenticationHeaderPolicyName="auxiliaryAuthenticationHeaderPolicy";var q9="x-ms-authorization-auxiliary";async function pve(t){let{scopes:e,getAccessToken:r,request:n}=t,i={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions};return(await r(e,i))?.token??""}function gve(t){let{credentials:e,scopes:r}=t,n=t.logger||dve.logger,i=new WeakMap;return{name:tl.auxiliaryAuthenticationHeaderPolicyName,async sendRequest(s,o){if(!s.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return n.info(`${tl.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`),o(s);let a=[];for(let l of e){let u=i.get(l);u||(u=(0,Ave.createTokenCycler)(l),i.set(l,u)),a.push(pve({scopes:Array.isArray(r)?r:[r],request:s,getAccessToken:u,logger:n}))}let c=(await Promise.all(a)).filter(l=>!!l);return c.length===0?(n.warning(`None of the auxiliary tokens are valid. ${q9} header will not be set.`),o(s)):(s.headers.set(q9,c.map(l=>`Bearer ${l}`).join(", ")),o(s))}}}});var Ar=f(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.createFileFromStream=J.createFile=J.agentPolicyName=J.agentPolicy=J.auxiliaryAuthenticationHeaderPolicyName=J.auxiliaryAuthenticationHeaderPolicy=J.ndJsonPolicyName=J.ndJsonPolicy=J.bearerTokenAuthenticationPolicyName=J.bearerTokenAuthenticationPolicy=J.formDataPolicyName=J.formDataPolicy=J.tlsPolicyName=J.tlsPolicy=J.userAgentPolicyName=J.userAgentPolicy=J.defaultRetryPolicy=J.tracingPolicyName=J.tracingPolicy=J.retryPolicy=J.throttlingRetryPolicyName=J.throttlingRetryPolicy=J.systemErrorRetryPolicyName=J.systemErrorRetryPolicy=J.redirectPolicyName=J.redirectPolicy=J.getDefaultProxySettings=J.proxyPolicyName=J.proxyPolicy=J.multipartPolicyName=J.multipartPolicy=J.logPolicyName=J.logPolicy=J.setClientRequestIdPolicyName=J.setClientRequestIdPolicy=J.exponentialRetryPolicyName=J.exponentialRetryPolicy=J.decompressResponsePolicyName=J.decompressResponsePolicy=J.isRestError=J.RestError=J.createPipelineRequest=J.createHttpHeaders=J.createDefaultHttpClient=J.createPipelineFromOptions=J.createEmptyPipeline=void 0;var fve=ev();Object.defineProperty(J,"createEmptyPipeline",{enumerable:!0,get:function(){return fve.createEmptyPipeline}});var mve=w9();Object.defineProperty(J,"createPipelineFromOptions",{enumerable:!0,get:function(){return mve.createPipelineFromOptions}});var hve=Q9();Object.defineProperty(J,"createDefaultHttpClient",{enumerable:!0,get:function(){return hve.createDefaultHttpClient}});var yve=N9();Object.defineProperty(J,"createHttpHeaders",{enumerable:!0,get:function(){return yve.createHttpHeaders}});var Eve=S9();Object.defineProperty(J,"createPipelineRequest",{enumerable:!0,get:function(){return Eve.createPipelineRequest}});var G9=UC();Object.defineProperty(J,"RestError",{enumerable:!0,get:function(){return G9.RestError}});Object.defineProperty(J,"isRestError",{enumerable:!0,get:function(){return G9.isRestError}});var z9=hv();Object.defineProperty(J,"decompressResponsePolicy",{enumerable:!0,get:function(){return z9.decompressResponsePolicy}});Object.defineProperty(J,"decompressResponsePolicyName",{enumerable:!0,get:function(){return z9.decompressResponsePolicyName}});var j9=x9();Object.defineProperty(J,"exponentialRetryPolicy",{enumerable:!0,get:function(){return j9.exponentialRetryPolicy}});Object.defineProperty(J,"exponentialRetryPolicyName",{enumerable:!0,get:function(){return j9.exponentialRetryPolicyName}});var V9=Bv();Object.defineProperty(J,"setClientRequestIdPolicy",{enumerable:!0,get:function(){return V9.setClientRequestIdPolicy}});Object.defineProperty(J,"setClientRequestIdPolicyName",{enumerable:!0,get:function(){return V9.setClientRequestIdPolicyName}});var Y9=rv();Object.defineProperty(J,"logPolicy",{enumerable:!0,get:function(){return Y9.logPolicy}});Object.defineProperty(J,"logPolicyName",{enumerable:!0,get:function(){return Y9.logPolicyName}});var J9=mv();Object.defineProperty(J,"multipartPolicy",{enumerable:!0,get:function(){return J9.multipartPolicy}});Object.defineProperty(J,"multipartPolicyName",{enumerable:!0,get:function(){return J9.multipartPolicyName}});var Fv=Iv();Object.defineProperty(J,"proxyPolicy",{enumerable:!0,get:function(){return Fv.proxyPolicy}});Object.defineProperty(J,"proxyPolicyName",{enumerable:!0,get:function(){return Fv.proxyPolicyName}});Object.defineProperty(J,"getDefaultProxySettings",{enumerable:!0,get:function(){return Fv.getDefaultProxySettings}});var $9=nv();Object.defineProperty(J,"redirectPolicy",{enumerable:!0,get:function(){return $9.redirectPolicy}});Object.defineProperty(J,"redirectPolicyName",{enumerable:!0,get:function(){return $9.redirectP
Line truncated
|
||||
`&&h[Q]!=="\r";Q++)H+=h[Q];if(H=H.trim(),H[H.length-1]==="/"&&(H=H.substring(0,H.length-1),Q--),!oe(H)){let Z;return Z=H.trim().length===0?"Invalid space after '<'.":"Tag '"+H+"' is an invalid name.",P("InvalidTag",Z,te(h,Q))}let U=b(h,Q);if(U===!1)return P("InvalidAttr","Attributes for '"+H+"' have open quote.",te(h,Q));let z=U.value;if(Q=U.index,z[z.length-1]==="/"){let Z=Q-z.length;z=z.substring(0,z.length-1);let ae=S(z,d);if(ae!==!0)return P(ae.err.code,ae.err.msg,te(h,Z+ae.err.line));B=!0}else if(v){if(!U.tagClosed)return P("InvalidTag","Closing tag '"+H+"' doesn't have proper closing.",te(h,Q));if(z.trim().length>0)return P("InvalidTag","Closing tag '"+H+"' can't have attributes or invalid starting.",te(h,F));if(g.length===0)return P("InvalidTag","Closing tag '"+H+"' has not been opened.",te(h,F));{let Z=g.pop();if(H!==Z.tagName){let ae=te(h,Z.tagStartPos);return P("InvalidTag","Expected closing tag '"+Z.tagName+"' (opened in line "+ae.line+", col "+ae.col+") instead of closing tag '"+H+"'.",te(h,F))}g.length==0&&(I=!0)}}else{let Z=S(z,d);if(Z!==!0)return P(Z.err.code,Z.err.msg,te(h,Q-z.length+Z.err.line));if(I===!0)return P("InvalidXml","Multiple possible root nodes found.",te(h,Q));d.unpairedTags.indexOf(H)!==-1||g.push({tagName:H,tagStartPos:F}),B=!0}for(Q++;Q<h.length;Q++)if(h[Q]==="<"){if(h[Q+1]==="!"){Q++,Q=p(h,Q);continue}if(h[Q+1]!=="?")break;if(Q=A(h,++Q),Q.err)return Q}else if(h[Q]==="&"){let Z=R(h,Q);if(Z==-1)return P("InvalidChar","char '&' is not expected.",te(h,Q));Q=Z}else if(I===!0&&!u(h[Q]))return P("InvalidXml","Extra text at the end",te(h,Q));h[Q]==="<"&&Q--}}}return B?g.length==1?P("InvalidTag","Unclosed tag '"+g[0].tagName+"'.",te(h,g[0].tagStartPos)):!(g.length>0)||P("InvalidXml","Invalid '"+JSON.stringify(g.map(Q=>Q.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):P("InvalidXml","Start tag expected.",1)}function u(h){return h===" "||h===" "||h===`
|
||||
`||h==="\r"}function A(h,d){let g=d;for(;d<h.length;d++)if(h[d]=="?"||h[d]==" "){let B=h.substr(g,d-g);if(d>5&&B==="xml")return P("InvalidXml","XML declaration allowed only at the start of the document.",te(h,d));if(h[d]=="?"&&h[d+1]==">"){d++;break}continue}return d}function p(h,d){if(h.length>d+5&&h[d+1]==="-"&&h[d+2]==="-"){for(d+=3;d<h.length;d++)if(h[d]==="-"&&h[d+1]==="-"&&h[d+2]===">"){d+=2;break}}else if(h.length>d+8&&h[d+1]==="D"&&h[d+2]==="O"&&h[d+3]==="C"&&h[d+4]==="T"&&h[d+5]==="Y"&&h[d+6]==="P"&&h[d+7]==="E"){let g=1;for(d+=8;d<h.length;d++)if(h[d]==="<")g++;else if(h[d]===">"&&(g--,g===0))break}else if(h.length>d+9&&h[d+1]==="["&&h[d+2]==="C"&&h[d+3]==="D"&&h[d+4]==="A"&&h[d+5]==="T"&&h[d+6]==="A"&&h[d+7]==="["){for(d+=8;d<h.length;d++)if(h[d]==="]"&&h[d+1]==="]"&&h[d+2]===">"){d+=2;break}}return d}let m='"',y="'";function b(h,d){let g="",B="",I=!1;for(;d<h.length;d++){if(h[d]===m||h[d]===y)B===""?B=h[d]:B!==h[d]||(B="");else if(h[d]===">"&&B===""){I=!0;break}g+=h[d]}return B===""&&{value:g,index:d,tagClosed:I}}let x=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function S(h,d){let g=i(h,x),B={};for(let I=0;I<g.length;I++){if(g[I][1].length===0)return P("InvalidAttr","Attribute '"+g[I][2]+"' has no space in starting.",le(g[I]));if(g[I][3]!==void 0&&g[I][4]===void 0)return P("InvalidAttr","Attribute '"+g[I][2]+"' is without value.",le(g[I]));if(g[I][3]===void 0&&!d.allowBooleanAttributes)return P("InvalidAttr","boolean attribute '"+g[I][2]+"' is not allowed.",le(g[I]));let Q=g[I][2];if(!G(Q))return P("InvalidAttr","Attribute '"+Q+"' is an invalid name.",le(g[I]));if(Object.prototype.hasOwnProperty.call(B,Q))return P("InvalidAttr","Attribute '"+Q+"' is repeated.",le(g[I]));B[Q]=1}return!0}function R(h,d){if(h[++d]===";")return-1;if(h[d]==="#")return(function(B,I){let Q=/\d/;for(B[I]==="x"&&(I++,Q=/[\da-fA-F]/);I<B.length;I++){if(B[I]===";")return I;if(!B[I].match(Q))break}return-1})(h,++d);let g=0;for(;d<h.length;d++,g++)if(!(h[d].match(/\w/)&&g<20)){if(h[d]===";")break;return-1}return d}function P(h,d,g){return{err:{code:h,msg:d,line:g.line||g,col:g.col}}}function G(h){return s(h)}function oe(h){return s(h)}function te(h,d){let g=h.substring(0,d).split(/\r?\n/);return{line:g.length,col:g[g.length-1].length+1}}function le(h){return h.startIndex+h[1].length}let Me=h=>o.includes(h)?"__"+h:h,et={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(h,d){return d},attributeValueProcessor:function(h,d){return d},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(h,d,g){return h},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Me};function It(h,d){if(typeof h!="string")return;let g=h.toLowerCase();if(o.some(B=>g===B.toLowerCase()))throw new Error(`[SECURITY] Invalid ${d}: "${h}" is a reserved JavaScript keyword that could cause prototype pollution`);if(a.some(B=>g===B.toLowerCase()))throw new Error(`[SECURITY] Invalid ${d}: "${h}" is a reserved JavaScript keyword that could cause prototype pollution`)}function ut(h,d){return typeof h=="boolean"?{enabled:h,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof h=="object"&&h!==null?{enabled:h.enabled!==!1,maxEntitySize:Math.max(1,h.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,h.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,h.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,h.maxExpandedLength??1e5),maxEntityCount:Math.max(1,h.maxEntityCount??1e3),allowedTags:h.allowedTags??null,tagFilter:h.tagFilter??null,appliesTo:h.appliesTo??"all"}:ut(!0)}let Le=function(h){let d=Object.assign({},et,h),g=[{value:d.attributeNamePrefix,name:"attributeNamePrefix"},{value:d.attributesGroupName,name:"attributesGroupName"},{value:d.textNodeName,name:"textNodeName"},{value:d.cdataPropName,name:"cdataPropName"},{value:d.commentPropName,name:"commentPropName"}];for(let{value:B,name:I}of g)B&&It(B,I);return d.onDangerousProperty===null&&(d.onDangerousProperty=Me),d.processEntities=ut(d.processEntities,d.htmlEntities),d.unpairedTagsSet=new Set(d.unpairedTags),d.stopNodes&&Array.isArray(d.stopNodes)&&(d.stopNodes=d.stopNodes.map(B=>typeof B=="string"&&B.startsWith("*.")?".."+B.substring(2):B)),d},gt;gt=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class nr{constructor(d){this.tagname=d,this.child=[],this[":@"]=Object.create(null)}add(d,g){d==="__proto__"&&(d="#__proto__"),this.child.push({[d]:g})}addChild(d,g){d.tagname==="__proto__Line truncated
|
||||
`);let d=new nr("!xml"),g=d,B="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let I=this.options,Q=new gi(I.processEntities),F=h.length;for(let v=0;v<F;v++)if(h[v]==="<"){let H=h.charCodeAt(v+1);if(H===47){let U=k(h,">",v,"Closing Tag is not closed."),z=h.substring(v+2,U).trim();if(I.removeNSPrefix){let ae=z.indexOf(":");ae!==-1&&(z=z.substr(ae+1))}z=Je(I.transformTagName,z,"",I).tagName,g&&(B=this.saveTextToParentTag(B,g,this.readonlyMatcher));let Z=this.matcher.getCurrentTag();if(z&&I.unpairedTagsSet.has(z))throw new Error(`Unpaired tag can not be used as closing tag: </${z}>`);Z&&I.unpairedTagsSet.has(Z)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,g=this.tagsNodeStack.pop(),B="",v=U}else if(H===63){let U=j(h,v,!1,"?>");if(!U)throw new Error("Pi Tag is not closed.");B=this.saveTextToParentTag(B,g,this.readonlyMatcher);let z=this.buildAttributesMap(U.tagExp,this.matcher,U.tagName,!0);if(z){let Z=z[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(Z)||1)}if(!(I.ignoreDeclaration&&U.tagName==="?xml"||I.ignorePiTags)){let Z=new nr(U.tagName);Z.add(I.textNodeName,""),U.tagName!==U.tagExp&&U.attrExpPresent&&I.ignoreAttributes!==!0&&(Z[":@"]=z),this.addChild(g,Z,this.readonlyMatcher,v)}v=U.closeIndex+1}else if(H===33&&h.charCodeAt(v+2)===45&&h.charCodeAt(v+3)===45){let U=k(h,"-->",v+4,"Comment is not closed.");if(I.commentPropName){let z=h.substring(v+4,U-2);B=this.saveTextToParentTag(B,g,this.readonlyMatcher),g.add(I.commentPropName,[{[I.textNodeName]:z}])}v=U}else if(H===33&&h.charCodeAt(v+2)===68){let U=Q.readDocType(h,v);this.entityDecoder.addInputEntities(U.entities),v=U.i}else if(H===33&&h.charCodeAt(v+2)===91){let U=k(h,"]]>",v,"CDATA is not closed.")-2,z=h.substring(v+9,U);B=this.saveTextToParentTag(B,g,this.readonlyMatcher);let Z=this.parseTextData(z,g.tagname,this.readonlyMatcher,!0,!1,!0,!0);Z==null&&(Z=""),I.cdataPropName?g.add(I.cdataPropName,[{[I.textNodeName]:z}]):g.add(I.textNodeName,Z),v=U+2}else{let U=j(h,v,I.removeNSPrefix);if(!U){let bn=h.substring(Math.max(0,v-50),Math.min(F,v+50));throw new Error(`readTagExp returned undefined at position ${v}. Context: "${bn}"`)}let z=U.tagName,Z=U.rawTagName,ae=U.tagExp,ge=U.attrExpPresent,Ie=U.closeIndex;if({tagName:z,tagExp:ae}=Je(I.transformTagName,z,ae,I),I.strictReservedNames&&(z===I.commentPropName||z===I.cdataPropName||z===I.textNodeName||z===I.attributesGroupName))throw new Error(`Invalid tag name: ${z}`);g&&B&&g.tagname!=="!xml"&&(B=this.saveTextToParentTag(B,g,this.readonlyMatcher,!1));let _e=g;_e&&I.unpairedTagsSet.has(_e.tagname)&&(g=this.tagsNodeStack.pop(),this.matcher.pop());let or=!1;ae.length>0&&ae.lastIndexOf("/")===ae.length-1&&(or=!0,z[z.length-1]==="/"?(z=z.substr(0,z.length-1),ae=z):ae=ae.substr(0,ae.length-1),ge=z!==ae);let In,Bn=null,zo={};In=Cm(Z),z!==d.tagname&&this.matcher.push(z,{},In),z!==ae&&ge&&(Bn=this.buildAttributesMap(ae,this.matcher,z),Bn&&(zo=$d(Bn,I))),z!==d.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let hi=v;if(this.isCurrentNodeStopNode){let bn="";if(or)v=U.closeIndex;else if(I.unpairedTagsSet.has(z))v=U.closeIndex;else{let v0=this.readStopNodeData(h,Z,Ie+1);if(!v0)throw new Error(`Unexpected end of ${Z}`);v=v0.i,bn=v0.tagContent}let _0=new nr(z);Bn&&(_0[":@"]=Bn),_0.add(I.textNodeName,bn),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(g,_0,this.readonlyMatcher,hi)}else{if(or){({tagName:z,tagExp:ae}=Je(I.transformTagName,z,ae,I));let bn=new nr(z);Bn&&(bn[":@"]=Bn),this.addChild(g,bn,this.readonlyMatcher,hi),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(I.unpairedTagsSet.has(z)){let bn=new nr(z);Bn&&(bn[":@"]=Bn),this.addChild(g,bn,this.readonlyMatcher,hi),this.matcher.pop(),this.isCurrentNodeStopNode=!1,v=U.closeIndex;continue}{let bn=new nr(z);if(this.tagsNodeStack.length>I.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(g),Bn&&(bn[":@"]=Bn),this.addChild(g,bn,this.readonlyMatcher,hi),g=bn}}B="",v=Ie}}}else B+=h[v];return d.child};function S0(h,d,g,B){this.options.captureMetaData||(B=void 0);let I=this.options.jPath?g.toString():g,Q=this.options.updateTag(d.tagname,I,d[":@"]);Q===!1||(typeof Q=="string"&&(d.tagname=Q),h.addChild(d,B))}function ce(h,d,g){let B=this.options.processEntities;if(!B||!B.enabled)return h;if(B.allowedTags){let I=this.options.jPath?g.toString():g;if(!(Array.isArray(B.allowedTags)?B.allowedTags.includes(d):B.allowedTags(d,I)))return h}if(B.tagFilter){let I=this.options.jPath?g.toString():g;if(!B.tagFilter(d,I))return h}return this.entityDecoder.decode(h)}function L(h,d,g,B){return h&&(B===void 0&&(B=d.child.length===0),(h=this.parseTextData(h,d.tagname,g,!1,!!d[":@"]&&Object.keys(d[":@"]).length!==0,B))!==void 0&&h!==""&&d.add(this.options.textNodeName,h),h=""),h}function N(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSLine truncated
|
||||
`);let B=[];if(d.stopNodes&&Array.isArray(d.stopNodes))for(let I=0;I<d.stopNodes.length;I++){let Q=d.stopNodes[I];typeof Q=="string"?B.push(new no(Q)):Q instanceof no&&B.push(Q)}return NL(h,d,g,new wl,B)}function NL(h,d,g,B,I){let Q="",F=!1;if(d.maxNestedTags&&B.getDepth()>d.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(h)){if(h!=null){let v=h.toString();return v=x0(v,d),v}return""}for(let v=0;v<h.length;v++){let H=h[v],U=RL(H);if(U===void 0)continue;let z=x7(H[":@"],d);B.push(U,z);let Z=v7(B,I);if(U===d.textNodeName){let _e=H[U];Z||(_e=d.tagValueProcessor(U,_e),_e=x0(_e,d)),F&&(Q+=g),Q+=_e,F=!1,B.pop();continue}if(U===d.cdataPropName){F&&(Q+=g);let _e=H[U][0][d.textNodeName];Q+=`<![CDATA[${String(_e).replace(/\]\]>/g,"]]]]><![CDATA[>")}]]>`,F=!1,B.pop();continue}if(U===d.commentPropName){let _e=H[U][0][d.textNodeName];Q+=g+`<!--${String(_e).replace(/--/g,"- -").replace(/-$/,"- ")}-->`,F=!0,B.pop();continue}if(U[0]==="?"){let _e=xL(H[":@"],d,Z),or=U==="?xml"?"":g,In=H[U][0][d.textNodeName];In=In.length!==0?" "+In:"",Q+=or+`<${U}${In}${_e}?>`,F=!0,B.pop();continue}let ae=g;ae!==""&&(ae+=d.indentBy);let ge=g+`<${U}${xL(H[":@"],d,Z)}`,Ie;Ie=Z?SL(H[U],d):NL(H[U],d,ae,B,I),d.unpairedTags.indexOf(U)!==-1?d.suppressUnpairedNode?Q+=ge+">":Q+=ge+"/>":Ie&&Ie.length!==0||!d.suppressEmptyNode?Ie&&Ie.endsWith(">")?Q+=ge+`>${Ie}${g}</${U}>`:(Q+=ge+">",Ie&&g!==""&&(Ie.includes("/>")||Ie.includes("</"))?Q+=g+d.indentBy+Ie+g:Q+=Ie,Q+=`</${U}>`):Q+=ge+"/>",F=!0,B.pop()}return Q}function x7(h,d){if(!h||d.ignoreAttributes)return null;let g={},B=!1;for(let I in h)Object.prototype.hasOwnProperty.call(h,I)&&(g[I.startsWith(d.attributeNamePrefix)?I.substr(d.attributeNamePrefix.length):I]=h[I],B=!0);return B?g:null}function SL(h,d){if(!Array.isArray(h))return h!=null?h.toString():"";let g="";for(let B=0;B<h.length;B++){let I=h[B],Q=RL(I);if(Q===d.textNodeName)g+=I[Q];else if(Q===d.cdataPropName)g+=I[Q][0][d.textNodeName];else if(Q===d.commentPropName)g+=I[Q][0][d.textNodeName];else{if(Q&&Q[0]==="?")continue;if(Q){let F=_7(I[":@"],d),v=SL(I[Q],d);v&&v.length!==0?g+=`<${Q}${F}>${v}</${Q}>`:g+=`<${Q}${F}/>`}}}return g}function _7(h,d){let g="";if(h&&!d.ignoreAttributes)for(let B in h){if(!Object.prototype.hasOwnProperty.call(h,B))continue;let I=h[B];I===!0&&d.suppressBooleanAttributes?g+=` ${B.substr(d.attributeNamePrefix.length)}`:g+=` ${B.substr(d.attributeNamePrefix.length)}="${I}"`}return g}function RL(h){let d=Object.keys(h);for(let g=0;g<d.length;g++){let B=d[g];if(Object.prototype.hasOwnProperty.call(h,B)&&B!==":@")return B}}function xL(h,d,g){let B="";if(h&&!d.ignoreAttributes)for(let I in h){if(!Object.prototype.hasOwnProperty.call(h,I))continue;let Q;g?Q=h[I]:(Q=d.attributeValueProcessor(I,h[I]),Q=x0(Q,d)),Q===!0&&d.suppressBooleanAttributes?B+=` ${I.substr(d.attributeNamePrefix.length)}`:B+=` ${I.substr(d.attributeNamePrefix.length)}="${Q}"`}return B}function v7(h,d){if(!d||d.length===0)return!1;for(let g=0;g<d.length;g++)if(h.matches(d[g]))return!0;return!1}function x0(h,d){if(h&&h.length>0&&d.processEntities)for(let g=0;g<d.entities.length;g++){let B=d.entities[g];h=h.replace(B.regex,B.val)}return h}let T7={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(h,d){return d},attributeValueProcessor:function(h,d){return d},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function mi(h){if(this.options=Object.assign({},T7,h),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(g=>typeof g=="string"&&g.startsWith("*.")?".."+g.substring(2):g)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let g=0;g<this.options.stopNodes.length;g++){let B=this.options.stopNodes[g];typeof B=="string"?this.stopNodeExpressions.push(new no(B)):B instanceof no&&this.stopNodeExpressions.push(B)}var d;this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=typeof(d=this.options.ignoreAttributes)=="function"?d:Array.isArray(d)?g=>{for(let B of d)if(typeof B=="string"&&g===B||B instanceof RegExp&&B.test(g))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=O7),this.processTextOrObjNode=P7,this.options.format?(this.indentate=D7,this.tagEndChar=`>
|
||||
`,this.newLine=`
|
||||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function P7(h,d,g,B){let I=this.extractAttributes(h);if(B.push(d,I),this.checkStopNode(B)){let F=this.buildRawContent(h),v=this.buildAttributesForStopNode(h);return B.pop(),this.buildObjectNode(F,d,v,g)}let Q=this.j2x(h,g+1,B);return B.pop(),h[this.options.textNodeName]!==void 0&&Object.keys(h).length===1?this.buildTextValNode(h[this.options.textNodeName],d,Q.attrStr,g,B):this.buildObjectNode(Q.val,d,Q.attrStr,g)}function D7(h){return this.options.indentBy.repeat(h)}function O7(h){return!(!h.startsWith(this.options.attributeNamePrefix)||h===this.options.textNodeName)&&h.substr(this.attrPrefixLen)}mi.prototype.build=function(h){if(this.options.preserveOrder)return R7(h,this.options);{Array.isArray(h)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(h={[this.options.arrayNodeName]:h});let d=new wl;return this.j2x(h,0,d).val}},mi.prototype.j2x=function(h,d,g){let B="",I="";if(this.options.maxNestedTags&&g.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let Q=this.options.jPath?g.toString():g,F=this.checkStopNode(g);for(let v in h)if(Object.prototype.hasOwnProperty.call(h,v))if(h[v]===void 0)this.isAttribute(v)&&(I+="");else if(h[v]===null)this.isAttribute(v)||v===this.options.cdataPropName?I+="":v[0]==="?"?I+=this.indentate(d)+"<"+v+"?"+this.tagEndChar:I+=this.indentate(d)+"<"+v+"/"+this.tagEndChar;else if(h[v]instanceof Date)I+=this.buildTextValNode(h[v],v,"",d,g);else if(typeof h[v]!="object"){let H=this.isAttribute(v);if(H&&!this.ignoreAttributesFn(H,Q))B+=this.buildAttrPairStr(H,""+h[v],F);else if(!H)if(v===this.options.textNodeName){let U=this.options.tagValueProcessor(v,""+h[v]);I+=this.replaceEntitiesValue(U)}else{g.push(v);let U=this.checkStopNode(g);if(g.pop(),U){let z=""+h[v];I+=z===""?this.indentate(d)+"<"+v+this.closeTag(v)+this.tagEndChar:this.indentate(d)+"<"+v+">"+z+"</"+v+this.tagEndChar}else I+=this.buildTextValNode(h[v],v,"",d,g)}}else if(Array.isArray(h[v])){let H=h[v].length,U="",z="";for(let Z=0;Z<H;Z++){let ae=h[v][Z];if(ae!==void 0)if(ae===null)v[0]==="?"?I+=this.indentate(d)+"<"+v+"?"+this.tagEndChar:I+=this.indentate(d)+"<"+v+"/"+this.tagEndChar;else if(typeof ae=="object")if(this.options.oneListGroup){g.push(v);let ge=this.j2x(ae,d+1,g);g.pop(),U+=ge.val,this.options.attributesGroupName&&ae.hasOwnProperty(this.options.attributesGroupName)&&(z+=ge.attrStr)}else U+=this.processTextOrObjNode(ae,v,d,g);else if(this.options.oneListGroup){let ge=this.options.tagValueProcessor(v,ae);ge=this.replaceEntitiesValue(ge),U+=ge}else{g.push(v);let ge=this.checkStopNode(g);if(g.pop(),ge){let Ie=""+ae;U+=Ie===""?this.indentate(d)+"<"+v+this.closeTag(v)+this.tagEndChar:this.indentate(d)+"<"+v+">"+Ie+"</"+v+this.tagEndChar}else U+=this.buildTextValNode(ae,v,"",d,g)}}this.options.oneListGroup&&(U=this.buildObjectNode(U,v,z,d)),I+=U}else if(this.options.attributesGroupName&&v===this.options.attributesGroupName){let H=Object.keys(h[v]),U=H.length;for(let z=0;z<U;z++)B+=this.buildAttrPairStr(H[z],""+h[v][H[z]],F)}else I+=this.processTextOrObjNode(h[v],v,d,g);return{attrStr:B,val:I}},mi.prototype.buildAttrPairStr=function(h,d,g){return g||(d=this.options.attributeValueProcessor(h,""+d),d=this.replaceEntitiesValue(d)),this.options.suppressBooleanAttributes&&d==="true"?" "+h:" "+h+'="'+d+'"'},mi.prototype.extractAttributes=function(h){if(!h||typeof h!="object")return null;let d={},g=!1;if(this.options.attributesGroupName&&h[this.options.attributesGroupName]){let B=h[this.options.attributesGroupName];for(let I in B)Object.prototype.hasOwnProperty.call(B,I)&&(d[I.startsWith(this.options.attributeNamePrefix)?I.substring(this.options.attributeNamePrefix.length):I]=B[I],g=!0)}else for(let B in h){if(!Object.prototype.hasOwnProperty.call(h,B))continue;let I=this.isAttribute(B);I&&(d[I]=h[B],g=!0)}return g?d:null},mi.prototype.buildRawContent=function(h){if(typeof h=="string")return h;if(typeof h!="object"||h===null)return String(h);if(h[this.options.textNodeName]!==void 0)return h[this.options.textNodeName];let d="";for(let g in h){if(!Object.prototype.hasOwnProperty.call(h,g)||this.isAttribute(g)||this.options.attributesGroupName&&g===this.options.attributesGroupName)continue;let B=h[g];if(g===this.options.textNodeName)d+=B;else if(Array.isArray(B)){for(let I of B)if(typeof I=="string"||typeof I=="number")d+=`<${g}>${I}</${g}>`;else if(typeof I=="object"&&I!==null){let Q=this.buildRawContent(I),F=this.buildAttributesForStopNode(I);d+=Q===""?`<${g}${F}/>`:`<${g}${F}>${Q}</${g}>`}}else if(typeof B=="object"&&B!==null){let I=this.buildRawContent(B),Q=this.buildAttributesForStopNode(B);d+=I===""?`<${g}${Q}/>`:`<${g}${Q}>${I}</${g}>`}else d+=`<${g}>${B}</${g}>`}return d},mi.prototype.buildAttributesForStopNode=function(h){if(!h||typeof h!="object")return"";let d="";if(this.options.attributesGroupName&&h[this.options.attributesGroupName]){let g=h[this.options.attributesGroupName];for(let
Line truncated
|
||||
`;pe.HTTP_VERSION_1_1="HTTP/1.1";pe.EncryptionAlgorithmAES25="AES256";pe.DevelopmentConnectionString="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;";pe.StorageBlobLoggingAllowedHeaderNames=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"];pe.StorageBlobLoggingAllowedQueryParameters=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"];pe.BlobUsesCustomerSpecifiedEncryptionMsg="BlobUsesCustomerSpecifiedEncryption";pe.BlobDoesNotUseCustomerSpecifiedEncryption="BlobDoesNotUseCustomerSpecifiedEncryption";pe.PathStylePorts=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"]});var Tr=f(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.escapeURLPath=OPe;qe.getValueInConnString=_a;qe.extractConnectionStringParts=kPe;qe.appendToURLPath=FPe;qe.setURLParameter=g8;qe.getURLParameter=f8;qe.setURLHost=UPe;qe.getURLPath=qPe;qe.getURLScheme=HPe;qe.getURLPathAndQuery=GPe;qe.getURLQueries=zPe;qe.appendToURLQuery=jPe;qe.truncatedISO8061Date=VPe;qe.base64encode=m8;qe.base64decode=YPe;qe.generateBlockID=JPe;qe.delay=$Pe;qe.padStart=h8;qe.sanitizeURL=y8;qe.sanitizeHeaders=WPe;qe.iEqual=KPe;qe.getAccountNameFromUrl=E8;qe.isIpEndpointStyle=C8;qe.toBlobTagsString=XPe;qe.toBlobTags=ZPe;qe.toTags=eDe;qe.toQuerySerialization=tDe;qe.parseObjectReplicationRecord=rDe;qe.attachCredential=nDe;qe.httpAuthorizationToString=iDe;qe.BlobNameToString=pI;qe.ConvertInternalResponseOfListBlobFlat=sDe;qe.ConvertInternalResponseOfListBlobHierarchy=oDe;qe.ExtractPageRangeInfoItems=aDe;qe.EscapePath=cDe;qe.assertResponse=lDe;var DPe=Ar(),p8=dt(),jA=dr();function OPe(t){let e=new URL(t),r=e.pathname;return r=r||"/",r=MPe(r),e.pathname=r,e.toString()}function LPe(t){let e="";if(t.search("DevelopmentStorageProxyUri=")!==-1){let r=t.split(";");for(let n of r)n.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=n.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}function _a(t,e){let r=t.split(";");for(let n of r)if(n.trim().startsWith(e))return n.trim().match(e+"=(.*)")[1];return""}function kPe(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=LPe(t),t=jA.DevelopmentConnectionString);let r=_a(t,"BlobEndpoint");if(r=r.endsWith("/")?r.slice(0,-1):r,t.search("DefaultEndpointsProtocol=")!==-1&&t.search("AccountKey=")!==-1){let n="",i="",s=Buffer.from("accountKey","base64"),o="";if(i=_a(t,"AccountName"),s=Buffer.from(_a(t,"AccountKey"),"base64"),!r){n=_a(t,"DefaultEndpointsProtoco
Line truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(Zr.HeaderConstants.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===Zr.HeaderConstants.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(i=>i.name.toLowerCase().startsWith(Zr.HeaderConstants.PREFIX_FOR_STORAGE));r.sort((i,s)=>(0,BDe.compareHeader)(i.name.toLowerCase(),s.name.toLowerCase())),r=r.filter((i,s,o)=>!(s>0&&i.name.toLowerCase()===o[s-1].name.toLowerCase()));let n="";return r.forEach(i=>{n+=`${i.name.toLowerCase().trimRight()}:${i.value.trimLeft()}
|
||||
`}),n}getCanonicalizedResourceString(e){let r=(0,Q8.getURLPath)(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let i=(0,Q8.getURLQueries)(e.url),s={};if(i){let o=[];for(let a in i)if(Object.prototype.hasOwnProperty.call(i,a)){let c=a.toLowerCase();s[c]=i[a],o.push(c)}o.sort();for(let a of o)n+=`
|
||||
${a}:${decodeURIComponent(s[a])}`}return n}};yI.StorageSharedKeyCredentialPolicy=bT});var CI=f(EI=>{"use strict";Object.defineProperty(EI,"__esModule",{value:!0});EI.Credential=void 0;var QT=class{create(e,r){throw new Error("Method should be implemented in children classes.")}};EI.Credential=QT});var Da=f(II=>{"use strict";Object.defineProperty(II,"__esModule",{value:!0});II.StorageSharedKeyCredential=void 0;var bDe=_("node:crypto"),wDe=wT(),QDe=CI(),NT=class extends QDe.Credential{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new wDe.StorageSharedKeyCredentialPolicy(e,r,this)}computeHMACSHA256(e){return(0,bDe.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};II.StorageSharedKeyCredential=NT});var RT=f(BI=>{"use strict";Object.defineProperty(BI,"__esModule",{value:!0});BI.AnonymousCredentialPolicy=void 0;var NDe=hI(),ST=class extends NDe.CredentialPolicy{constructor(e,r){super(e,r)}};BI.AnonymousCredentialPolicy=ST});var Oa=f(bI=>{"use strict";Object.defineProperty(bI,"__esModule",{value:!0});bI.AnonymousCredential=void 0;var SDe=RT(),RDe=CI(),xT=class extends RDe.Credential{create(e,r){return new SDe.AnonymousCredentialPolicy(e,r)}};bI.AnonymousCredential=xT});var N8=f(wI=>{"use strict";Object.defineProperty(wI,"__esModule",{value:!0});wI.BuffersStream=void 0;var xDe=_("node:stream"),_T=class extends xDe.Readable{buffers;byteLength;byteOffsetInCurrentBuffer;bufferIndex;pushedBytesLength;constructor(e,r,n){super(n),this.buffers=e,this.byteLength=r,this.byteOffsetInCurrentBuffer=0,this.bufferIndex=0,this.pushedBytesLength=0;let i=0;for(let s of this.buffers)i+=s.byteLength;if(i<this.byteLength)throw new Error("Data size shouldn't be larger than the total length of buffers.")}_read(e){this.pushedBytesLength>=this.byteLength&&this.push(null),e||(e=this.readableHighWaterMark);let r=[],n=0;for(;n<e&&this.pushedBytesLength<this.byteLength;){let i=this.byteLength-this.pushedBytesLength,s=this.buffers[this.bufferIndex].byteLength-this.byteOffsetInCurrentBuffer,o=Math.min(s,i);if(o>e-n){let a=this.byteOffsetInCurrentBuffer+e-n;r.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,a)),this.pushedBytesLength+=e-n,this.byteOffsetInCurrentBuffer=a,n=e;break}else{let a=this.byteOffsetInCurrentBuffer+o;r.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer,a)),o===s?(this.byteOffsetInCurrentBuffer=0,this.bufferIndex++):this.byteOffsetInCurrentBuffer=a,this.pushedBytesLength+=o,n+=o}}r.length>1?this.push(Buffer.concat(r)):r.length===1&&this.push(r[0])}};wI.BuffersStream=_T});var S8=f(NI=>{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});NI.PooledBuffer=void 0;var _De=(kt(),ft(Lt)),vDe=N8(),TDe=_De.__importDefault(_("node:buffer")),QI=TDe.default.constants.MAX_LENGTH,vT=class{buffers=[];capacity;_size;get size(){return this._size}constructor(e,r,n){this.capacity=e,this._size=0;let i=Math.ceil(e/QI);for(let s=0;s<i;s++){let o=s===i-1?e%QI:QI;o===0&&(o=QI),this.buffers.push(Buffer.allocUnsafe(o))}r&&this.fill(r,n)}fill(e,r){this._size=Math.min(this.capacity,r);let n=0,i=0,s=0,o=0,a=0;for(;a<this._size;){let c=e[n],l=this.buffers[i],u=c.copy(l,s,o);a+=u,o+=u,s+=u,o===c.length&&(n++,o=0),s===l.length&&(i++,s=0)}e.splice(0,n),e.length>0&&(e[0]=e[0].slice(o))}getReadableStream(){return new vDe.BuffersStream(this.buffers,this.size)}};NI.PooledBuffer=vT});var R8=f(SI=>{"use strict";Object.defineProperty(SI,"__esModule",{value:!0});SI.BufferScheduler=void 0;var PDe=_("events"),DDe=S8(),TT=class{bufferSize;maxBuffers;readable;outgoingHandler;emitter=new PDe.EventEmitter;concurrency;offset=0;isStreamEnd=!1;isError=!1;executingOutgoingHandlers=0;encoding;numBuffers=0;unresolvedDataArray=[];unresolvedLength=0;incoming=[];outgoing=[];constructor(e,r,n,i,s,o){if(r<=0)throw new RangeError(`bufferSize must be larger than 0, current is ${r}`);if(n<=0)throw new RangeError(`maxBuffers must be larger than 0, current is ${n}`);if(s<=0)throw new RangeError(`concurrency must be larger than 0, current is ${s}`);this.bufferSize=r,this.maxBuffers=n,this.readable=e,this.outgoingHandler=i,this.concurrency=s,this.encoding=o}async do(){return new Promise((e,r)=>{this.readable.on("data",n=>{n=typeof n=="string"?Buffer.from(n,this.encoding):n,this.appendUnresolvedData(n),this.resolveData()||this.readable.pause()}),this.readable.on("error",n=>{this.emitter.emit("error",n)}),this.readable.on("end",()=>{this.isStreamEnd=!0,this.emitter.emit("checkEnd")}),this.emitter.on("error",n=>{this.isError=!0,this.readable.pause(),r(n)}),this.emitter.on("checkEnd",()=>{if(this.outgoing.length>0){this.triggerOutgoingHandlers();return}if(this.isStreamEnd&&this.executingOutgoingHandlers===0)if(this.unresolvedLength>0&&this.unresolvedLength<this.bufferSize){let n=this.shiftBufferFromUnresolvedDataArray();this.outgoingHandler(()=>n.getReadableStream(),n.size,this.offset).then(e).catch(r)}else{if(this.unresolvedLength>
Line truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(en.HeaderConstants.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===en.HeaderConstants.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(i=>i.name.toLowerCase().startsWith(en.HeaderConstants.PREFIX_FOR_STORAGE));r.sort((i,s)=>(0,yOe.compareHeader)(i.name.toLowerCase(),s.name.toLowerCase())),r=r.filter((i,s,o)=>!(s>0&&i.name.toLowerCase()===o[s-1].name.toLowerCase()));let n="";return r.forEach(i=>{n+=`${i.name.toLowerCase().trimRight()}:${i.value.trimLeft()}
|
||||
`}),n}getCanonicalizedResourceString(e){let r=(0,q8.getURLPath)(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let i=(0,q8.getURLQueries)(e.url),s={};if(i){let o=[];for(let a in i)if(Object.prototype.hasOwnProperty.call(i,a)){let c=a.toLowerCase();s[c]=i[a],o.push(c)}o.sort();for(let a of o)n+=`
|
||||
${a}:${decodeURIComponent(s[a])}`}return n}};LI.StorageSharedKeyCredentialPolicy=YT});var H8=f(kI=>{"use strict";Object.defineProperty(kI,"__esModule",{value:!0});kI.StorageSharedKeyCredential=void 0;var EOe=_("node:crypto"),COe=JT(),IOe=DI(),$T=class extends IOe.Credential{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new COe.StorageSharedKeyCredentialPolicy(e,r,this)}computeHMACSHA256(e){return(0,EOe.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};kI.StorageSharedKeyCredential=$T});var G8=f(MI=>{"use strict";Object.defineProperty(MI,"__esModule",{value:!0});MI.AbortError=void 0;var WT=class extends Error{constructor(e){super(e),this.name="AbortError"}};MI.AbortError=WT});var KT=f(FI=>{"use strict";Object.defineProperty(FI,"__esModule",{value:!0});FI.AbortError=void 0;var BOe=G8();Object.defineProperty(FI,"AbortError",{enumerable:!0,get:function(){return BOe.AbortError}})});var XT=f(UI=>{"use strict";Object.defineProperty(UI,"__esModule",{value:!0});UI.logger=void 0;var bOe=Xc();UI.logger=(0,bOe.createClientLogger)("storage-common")});var HI=f(qI=>{"use strict";Object.defineProperty(qI,"__esModule",{value:!0});qI.StorageRetryPolicyType=void 0;var z8;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(z8||(qI.StorageRetryPolicyType=z8={}))});var tP=f(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.StorageRetryPolicy=void 0;Pf.NewRetryPolicyFactory=NOe;var wOe=KT(),QOe=Tf(),j8=Po(),ZT=nl(),ka=XT(),eP=HI();function NOe(t){return{create:(e,r)=>new GI(e,r,t)}}var Ma={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:eP.StorageRetryPolicyType.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},SOe=new wOe.AbortError("The operation was aborted."),GI=class extends QOe.BaseRequestPolicy{retryOptions;constructor(e,r,n=Ma){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Ma.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Ma.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Ma.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Ma.maxRetryDelayInMs):Ma.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Ma.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Ma.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let i=e.clone(),s=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;s||(i.url=(0,ZT.setURLHost)(i.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(i.url=(0,ZT.setURLParameter)(i.url,j8.URLConstants.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(ka.logger.info(`RetryPolicy: =====> Try=${n} ${s?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(i),!this.shouldRetry(s,n,o))return o;r=r||!s&&o.status===404}catch(a){if(ka.logger.error(`RetryPolicy: Caught error, message: ${a.message}, code: ${a.code}`),!this.shouldRetry(s,n,o,a))throw a}return await this.delay(s,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,i){if(r>=this.retryOptions.maxTries)return ka.logger.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let s=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i){for(let o of s)if(i.name.toUpperCase().includes(o)||i.message.toUpperCase().includes(o)||i.code&&i.code.toString().toUpperCase()===o)return ka.logger.info(`RetryPolicy: Network error ${o} found, will retry.`),!0}if(n||i){let o=n?n.status:i?i.statusCode:0;if(!e&&o===404)return ka.logger.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return ka.logger.info(`RetryPolicy: Will retry for status code ${o}.`),!0}if(n&&n?.status>=400){let o=n.headers.get(j8.HeaderConstants.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return i?.code==="PARSE_ERROR"&&i?.message.startsWith('Error "Error: Unclosed root tag')?(ka.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let i=0;if(e)switch(this.retryOptions.retryPolicyType){case eP.StorageRetryPolicyType.EXPONENTIAL:i=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case eP.StorageRetryPolicyType.FIXED:i=this.retryOptions.retryDelayInMs;break}else i=Math.random()*1e3;return ka.logger.info(`RetryPolicy: Delay for ${i}ms`),(0,ZT.delay)(i,n,SOe)}};Pf.StorageRetryPolicy=GI});var zI=f(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.StorageRetryPolicyFa
Line truncated
|
||||
`)+`
|
||||
`+n(s)+i(s),a=(0,FOe.createHmac)("sha256",t.accountKey).update(o,"utf8").digest("base64");s.headers.set(tn.HeaderConstants.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(s,o){let a=s.headers.get(o);return!a||o===tn.HeaderConstants.CONTENT_LENGTH&&a==="0"?"":a}function n(s){let o=[];for(let[c,l]of s.headers)c.toLowerCase().startsWith(tn.HeaderConstants.PREFIX_FOR_STORAGE)&&o.push({name:c,value:l});o.sort((c,l)=>(0,UOe.compareHeader)(c.name.toLowerCase(),l.name.toLowerCase())),o=o.filter((c,l,u)=>!(l>0&&c.name.toLowerCase()===u[l-1].name.toLowerCase()));let a="";return o.forEach(c=>{a+=`${c.name.toLowerCase().trimRight()}:${c.value.trimLeft()}
|
||||
`}),a}function i(s){let o=(0,X8.getURLPath)(s.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=(0,X8.getURLQueries)(s.url),l={};if(c){let u=[];for(let A in c)if(Object.prototype.hasOwnProperty.call(c,A)){let p=A.toLowerCase();l[p]=c[A],u.push(p)}u.sort();for(let A of u)a+=`
|
||||
${A}:${decodeURIComponent(l[A])}`}return a}return{name:XA.storageSharedKeyCredentialPolicyName,async sendRequest(s,o){return e(s),o(s)}}}});var e5=f(ZA=>{"use strict";Object.defineProperty(ZA,"__esModule",{value:!0});ZA.storageRequestFailureDetailsParserPolicyName=void 0;ZA.storageRequestFailureDetailsParserPolicy=HOe;ZA.storageRequestFailureDetailsParserPolicyName="storageRequestFailureDetailsParserPolicy";function HOe(){return{name:ZA.storageRequestFailureDetailsParserPolicyName,async sendRequest(t,e){try{return await e(t)}catch(r){throw typeof r=="object"&&r!==null&&r.response&&r.response.parsedBody&&r.response.parsedBody.code==="InvalidHeaderValue"&&r.response.parsedBody.HeaderName==="x-ms-version"&&(r.message=`The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.
|
||||
`),r}}}}});var oP=f(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.BaseRequestPolicy=Mt.getCachedDefaultHttpClient=void 0;var Pr=(kt(),ft(Lt));Pr.__exportStar(R8(),Mt);var GOe=x8();Object.defineProperty(Mt,"getCachedDefaultHttpClient",{enumerable:!0,get:function(){return GOe.getCachedDefaultHttpClient}});Pr.__exportStar(F8(),Mt);Pr.__exportStar(U8(),Mt);Pr.__exportStar(DI(),Mt);Pr.__exportStar(H8(),Mt);Pr.__exportStar(zI(),Mt);var zOe=Tf();Object.defineProperty(Mt,"BaseRequestPolicy",{enumerable:!0,get:function(){return zOe.BaseRequestPolicy}});Pr.__exportStar(HT(),Mt);Pr.__exportStar(vI(),Mt);Pr.__exportStar(MT(),Mt);Pr.__exportStar(Y8(),Mt);Pr.__exportStar(J8(),Mt);Pr.__exportStar(HI(),Mt);Pr.__exportStar(tP(),Mt);Pr.__exportStar(K8(),Mt);Pr.__exportStar(JT(),Mt);Pr.__exportStar(Z8(),Mt);Pr.__exportStar(zI(),Mt);Pr.__exportStar(e5(),Mt)});var t5=f(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.storageBrowserPolicyName=void 0;ed.storageBrowserPolicy=YOe;var jOe=dt(),aP=dr(),VOe=Tr();ed.storageBrowserPolicyName="storageBrowserPolicy";function YOe(){return{name:ed.storageBrowserPolicyName,async sendRequest(t,e){return jOe.isNodeLike||((t.method==="GET"||t.method==="HEAD")&&(t.url=(0,VOe.setURLParameter)(t.url,aP.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(aP.HeaderConstants.COOKIE),t.headers.delete(aP.HeaderConstants.CONTENT_LENGTH)),e(t)}}}});var i5=f(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.storageRetryPolicyName=void 0;rd.storageRetryPolicy=XOe;var JOe=Rf(),r5=Ar(),$Oe=dt(),lP=vf(),n5=dr(),cP=Tr(),Oo=zA();rd.storageRetryPolicyName="storageRetryPolicy";var td={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:lP.StorageRetryPolicyType.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},WOe=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],KOe=new JOe.AbortError("The operation was aborted.");function XOe(t={}){let e=t.retryPolicyType??td.retryPolicyType,r=t.maxTries??td.maxTries,n=t.retryDelayInMs??td.retryDelayInMs,i=t.maxRetryDelayInMs??td.maxRetryDelayInMs,s=t.secondaryHost??td.secondaryHost,o=t.tryTimeoutInMs??td.tryTimeoutInMs;function a({isPrimaryRetry:l,attempt:u,response:A,error:p}){if(u>=r)return Oo.logger.info(`RetryPolicy: Attempt(s) ${u} >= maxTries ${r}, no further try.`),!1;if(p){for(let m of WOe)if(p.name.toUpperCase().includes(m)||p.message.toUpperCase().includes(m)||p.code&&p.code.toString().toUpperCase()===m)return Oo.logger.info(`RetryPolicy: Network error ${m} found, will retry.`),!0;if(p?.code==="PARSE_ERROR"&&p?.message.startsWith('Error "Error: Unclosed root tag'))return Oo.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0}if(A||p){let m=A?.status??p?.statusCode??0;if(!l&&m===404)return Oo.logger.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(m===503||m===500)return Oo.logger.info(`RetryPolicy: Will retry for status code ${m}.`),!0}if(A&&A?.status>=400){let m=A.headers.get(n5.HeaderConstants.X_MS_CopySourceErrorCode);if(m!==void 0)switch(m){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return!1}function c(l,u){let A=0;if(l)switch(e){case lP.StorageRetryPolicyType.EXPONENTIAL:A=Math.min((Math.pow(2,u-1)-1)*n,i);break;case lP.StorageRetryPolicyType.FIXED:A=n;break}else A=Math.random()*1e3;return Oo.logger.info(`RetryPolicy: Delay for ${A}ms`),A}return{name:rd.storageRetryPolicyName,async sendRequest(l,u){o&&(l.url=(0,cP.setURLParameter)(l.url,n5.URLConstants.Parameters.TIMEOUT,String(Math.floor(o/1e3))));let A=l.url,p=s?(0,cP.setURLHost)(l.url,s):void 0,m=!1,y=1,b=!0,x,S;for(;b;){let R=m||!p||!["GET","HEAD","OPTIONS"].includes(l.method)||y%2===1;l.url=R?A:p,x=void 0,S=void 0;try{Oo.logger.info(`RetryPolicy: =====> Try=${y} ${R?"Primary":"Secondary"}`),x=await u(l),m=m||!R&&x.status===404}catch(P){if((0,r5.isRestError)(P))Oo.logger.error(`RetryPolicy: Caught error, message: ${P.message}, code: ${P.code}`),S=P;else throw Oo.logger.error(`RetryPolicy: Caught error, message: ${(0,$Oe.getErrorMessage)(P)}`),P}b=a({isPrimaryRetry:R,attempt:y,response:x,error:S}),b&&await(0,cP.delay)(c(R,y),l.abortSignal,KOe),y++}if(x)return x;throw S??new r5.RestError("RetryPolicy failed without known error.")}}}});var uP=f(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});nd.storageSharedKeyCredentialPolicyName=void 0;nd.storageSharedKeyCredentialPolicy=tLe;var ZOe=_("node:crypto"),rn=dr(),s5=Tr(),eLe=BT();nd.storageSharedKeyCredentialPolicyName="storageSharedKeyCredentialPolicy";function tLe(t){function e(s){s.headers.set(rn.HeaderConstants.X_MS_DATE,new Date().toUTCString()),s.body&&(typeof s.body=="string"||Buffer.isBuffer(s.body))&&s.body.length>0&&s.headers.set(rn.HeaderConstants.CONTENT_LENGTH,Buffer.byteLength(s.body));let o=[s.method.toUpperCase(),r(s,rn.HeaderConstants
Line truncated
|
||||
`)+`
|
||||
`+n(s)+i(s),a=(0,ZOe.createHmac)("sha256",t.accountKey).update(o,"utf8").digest("base64");s.headers.set(rn.HeaderConstants.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(s,o){let a=s.headers.get(o);return!a||o===rn.HeaderConstants.CONTENT_LENGTH&&a==="0"?"":a}function n(s){let o=[];for(let[c,l]of s.headers)c.toLowerCase().startsWith(rn.HeaderConstants.PREFIX_FOR_STORAGE)&&o.push({name:c,value:l});o.sort((c,l)=>(0,eLe.compareHeader)(c.name.toLowerCase(),l.name.toLowerCase())),o=o.filter((c,l,u)=>!(l>0&&c.name.toLowerCase()===u[l-1].name.toLowerCase()));let a="";return o.forEach(c=>{a+=`${c.name.toLowerCase().trimRight()}:${c.value.trimLeft()}
|
||||
`}),a}function i(s){let o=(0,s5.getURLPath)(s.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=(0,s5.getURLQueries)(s.url),l={};if(c){let u=[];for(let A in c)if(Object.prototype.hasOwnProperty.call(c,A)){let p=A.toLowerCase();l[p]=c[A],u.push(p)}u.sort();for(let A of u)a+=`
|
||||
${A}:${decodeURIComponent(l[A])}`}return a}return{name:nd.storageSharedKeyCredentialPolicyName,async sendRequest(s,o){return e(s),o(s)}}}});var o5=f(jI=>{"use strict";Object.defineProperty(jI,"__esModule",{value:!0});jI.StorageBrowserPolicy=void 0;var rLe=xf(),nLe=dt(),AP=dr(),iLe=Tr(),dP=class extends rLe.BaseRequestPolicy{constructor(e,r){super(e,r)}async sendRequest(e){return nLe.isNodeLike?this._nextPolicy.sendRequest(e):((e.method.toUpperCase()==="GET"||e.method.toUpperCase()==="HEAD")&&(e.url=(0,iLe.setURLParameter)(e.url,AP.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),e.headers.remove(AP.HeaderConstants.COOKIE),e.headers.remove(AP.HeaderConstants.CONTENT_LENGTH),this._nextPolicy.sendRequest(e))}};jI.StorageBrowserPolicy=dP});var gP=f(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.StorageBrowserPolicyFactory=id.StorageBrowserPolicy=void 0;var a5=o5();Object.defineProperty(id,"StorageBrowserPolicy",{enumerable:!0,get:function(){return a5.StorageBrowserPolicy}});var pP=class{create(e,r){return new a5.StorageBrowserPolicy(e,r)}};id.StorageBrowserPolicyFactory=pP});var c5=f(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.storageCorrectContentLengthPolicyName=void 0;sd.storageCorrectContentLengthPolicy=oLe;var sLe=dr();sd.storageCorrectContentLengthPolicyName="StorageCorrectContentLengthPolicy";function oLe(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(sLe.HeaderConstants.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:sd.storageCorrectContentLengthPolicyName,async sendRequest(e,r){return t(e),r(e)}}}});var Ua=f(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.Pipeline=Hs.StorageOAuthScopes=void 0;Hs.isPipelineLike=gLe;Hs.newPipeline=fLe;Hs.getCoreClientOptions=hLe;Hs.getCredentialFromPipeline=f5;var p5=aI(),l5=Ar(),u5=Us(),A5=pT(),fP=MA(),aLe=zA(),cLe=vf(),g5=Da(),mP=Oa(),Df=dr();Object.defineProperty(Hs,"StorageOAuthScopes",{enumerable:!0,get:function(){return Df.StorageOAuthScopes}});var d5=oP(),lLe=t5(),uLe=i5(),ALe=uP(),dLe=gP(),pLe=c5();function gLe(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}var VI=class{factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};Hs.Pipeline=VI;function fLe(t,e={}){t||(t=new mP.AnonymousCredential);let r=new VI([],e);return r._credential=t,r}function mLe(t){let e=[yLe,m5,ELe,CLe,ILe,BLe,wLe];if(t.factories.length){let r=t.factories.filter(n=>!e.some(i=>i(n)));if(r.length){let n=r.some(i=>bLe(i));return{wrappedPolicies:(0,p5.createRequestPolicyFactoryPolicy)(r),afterRetry:n}}}}function hLe(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?(0,p5.convertHttpClient)(e):(0,d5.getCachedDefaultHttpClient)(),t._coreHttpClient=n);let i=t._corePipeline;if(!i){let s=`azsdk-js-azure-storage-blob/${Df.SDK_VERSION}`,o=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${s}`:`${s}`;i=(0,u5.createClientPipeline)({...r,loggingOptions:{additionalAllowedHeaderNames:Df.StorageBlobLoggingAllowedHeaderNames,additionalAllowedQueryParameters:Df.StorageBlobLoggingAllowedQueryParameters,logger:aLe.logger.info},userAgentOptions:{userAgentPrefix:o},serializationOptions:{stringifyXML:A5.stringifyXML,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:A5.parseXML,serializerOptions:{xml:{xmlCharKey:"#"}}}}),i.removePolicy({phase:"Retry"}),i.removePolicy({name:l5.decompressResponsePolicyName}),i.addPolicy((0,pLe.storageCorrectContentLengthPolicy)()),i.addPolicy((0,uLe.storageRetryPolicy)(r.retryOptions),{phase:"Retry"}),i.addPolicy((0,d5.storageRequestFailureDetailsParserPolicy)()),i.addPolicy((0,lLe.storageBrowserPolicy)());let a=mLe(t);a&&i.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:"Retry"}:void 0);let c=f5(t);(0,fP.isTokenCredential)(c)?i.addPolicy((0,l5.bearerTokenAuthenticationPolicy)({credential:c,scopes:r.audience??Df.StorageOAuthScopes,challengeCallbacks:{authorizeRequestOnChallenge:u5.authorizeRequestOnTenantChallenge}}),{phase:"Sign"}):c instanceof g5.StorageSharedKeyCredential&&i.addPolicy((0,ALe.storageSharedKeyCredentialPolicy)({accountName:c.accountName,accountKey:c.accountKey}),{phase:"Sign"}),t._corePipeline=i}return{...r,allowInsecureConnection:!0,httpClient:n,pipeline:i}}function f5(t){if(t._credential)return t._credential;let e=new mP.AnonymousCredential;for(let r of t.factories)if((0,fP.isTokenCredential)(r.credential))e=r.credential;else if(m5(r))return r;return e}function m5(t){return t instanceof g5.StorageSharedKeyCredential?!0:t.constructor.name==="StorageSharedKeyCredential"}function yLe(t){return t instanceof mP.AnonymousCredential?!0:t.constructor.name==="AnonymousCredential"}function ELe
Line truncated
|
||||
`),s=e.computeHMACSHA256(i);return{sasQueryParameters:new ll.SASQueryParameters(t.version,s,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function oMe(t,e){if(t=Al(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=ol.BlobSASPermissions.parse(t.permissions.toString()).toString():i=al.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,Vt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Vt.truncatedISO8061Date)(t.expiresOn,!1):"",ul(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?(0,cl.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new ll.SASQueryParameters(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}function aMe(t,e){if(t=Al(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=ol.BlobSASPermissions.parse(t.permissions.toString()).toString():i=al.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,Vt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Vt.truncatedISO8061Date)(t.expiresOn,!1):"",ul(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?(0,cl.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new ll.SASQueryParameters(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:s}}function cMe(t,e){if(t=Al(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=ol.BlobSASPermissions.parse(t.permissions.toString()).toString():i=al.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,Vt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Vt.truncatedISO8061Date)(t.expiresOn,!1):"",ul(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,Vt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,Vt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?(0,cl.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new ll.SASQueryParameters(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:s}}function lMe(t,e){if(t=Al(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=ol.BlobSASPermissions.parse(t.permissions.toString()).toString():i=al.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,Vt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Vt.truncatedISO8061Date)(t.expiresOn,!1):"",ul(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,Vt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,Vt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?(0,cl.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new ll.SASQueryParameters(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:s}}function uMe(t,e){if(t=Al(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=ol.BlobSASPermissions.parse(t.permissions.toString()).toString():i=al.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,Vt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Vt.truncatedISO8061Date)(t.expiresOn,!1):"",ul(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,Vt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,Vt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?(0,cl.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new ll.SASQueryParameters(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:s}}function AMe(t,e){if(t=Al(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=ol.BlobSASPermissions.parse(t.permissions.toString()).toString():i=al.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,Vt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,Vt.truncatedISO8061Date)(t.expiresOn,!1):"",ul(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,Vt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,Vt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,void 0,t.ipRange?(0,cl.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new ll.SASQueryParameters(t.version,o,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:s}}function ul(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}function Al(t){let e=t.version?t.version:J5.SERVICE_VERSION;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}});var mB=f(fB=>{"use strict";Object.defineProperty(fB,"__esModule",{value:!0});fB.BlobLeaseClient=void 0;var dMe=dt(),zs=dr(),Lf=sl(),gB=Tr(),UP=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=(0,dMe.randomUUID)()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==zs.ETagNone||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==zs.ETagNone||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Lf.tracingClient.withSpan("BlobLeaseClient-acquireLease",r,async n=>(0,gB.assertResponse)(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==zs.ETagNone||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==zs.ETagNone||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Lf.tracingClient.withSpan("BlobLeaseClient-changeLease",r,async n=>{let i=(0,gB.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,i})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==zs.ETagNone||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==zs.ETagNone||e.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return Lf.tracingClient.withSpan("BlobLeaseClient-releaseLease",e,async r=>(0,gB.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async renewLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==zs.ETagNone||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==zs.ETagNone||
Line truncated
|
||||
Polling from: ${r.config.operationLocation}
|
||||
Operation status: ${u}
|
||||
Polling status: ${gX.terminalStates.includes(u)?"Stopped":"Running"}`),u==="succeeded"){let A=o(l,r);if(A!==void 0)return{response:await e(A).catch(pX({state:r,stateProxy:n,isOperationError:a})),status:u}}return{response:l,status:u}}async function FMe(t){let{poll:e,state:r,stateProxy:n,options:i,getOperationStatus:s,getResourceLocation:o,getOperationLocation:a,isOperationError:c,withOperationLocation:l,getPollingInterval:u,processResult:A,getError:p,updateState:m,setDelay:y,isDone:b,setErrorAsResult:x}=t,{operationLocation:S}=r.config;if(S!==void 0){let{response:R,status:P}=await MMe({poll:e,getOperationStatus:s,state:r,stateProxy:n,operationLocation:S,getResourceLocation:o,isOperationError:c,options:i});if(fX({status:P,response:R,state:r,stateProxy:n,isDone:b,processResult:A,getError:p,setErrorAsResult:x}),!gX.terminalStates.includes(P)){let G=u?.(R);G&&y(G);let oe=a?.(R,r);if(oe!==void 0){let te=S!==oe;r.config.operationLocation=oe,l?.(oe,te)}else l?.(S,!1)}m?.(r,R)}}Ya.pollOperation=FMe});var aD=f(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.pollHttpOperation=Yt.isOperationError=Yt.getResourceLocation=Yt.getOperationStatus=Yt.getOperationLocation=Yt.initHttpOperation=Yt.getStatusFromInitialResponse=Yt.getErrorFromResponse=Yt.parseRetryAfter=Yt.inferLroMode=void 0;var mX=SB(),iD=QB();function hX(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}function yX(t){return t.headers.location}function EX(t){return t.headers["operation-location"]}function CX(t){return t.headers["azure-asyncoperation"]}function UMe(t){var e;let{location:r,requestMethod:n,requestPath:i,resourceLocationConfig:s}=t;switch(n){case"PUT":return i;case"DELETE":return;case"PATCH":return(e=o())!==null&&e!==void 0?e:i;default:return o()}function o(){switch(s){case"azure-async-operation":return;case"original-uri":return i;default:return r}}}function IX(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:i}=t,s=EX(e),o=CX(e),a=hX({operationLocation:s,azureAsyncOperation:o}),c=yX(e),l=r?.toLocaleUpperCase();return a!==void 0?{mode:"OperationLocation",operationLocation:a,resourceLocation:UMe({requestMethod:l,location:c,requestPath:n,resourceLocationConfig:i})}:c!==void 0?{mode:"ResourceLocation",operationLocation:c}:l==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}Yt.inferLroMode=IX;function BX(t){let{status:e,statusCode:r}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return sD(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return iD.logger.verbose(`LRO: unrecognized operation status: ${e}`),e}}function qMe(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return BX({status:r,statusCode:t.statusCode})}function HMe(t){var e,r;let{properties:n,provisioningState:i}=(e=t.body)!==null&&e!==void 0?e:{},s=(r=n?.provisioningState)!==null&&r!==void 0?r:i;return BX({status:s,statusCode:t.statusCode})}function sD(t){return t===202?"running":t<300?"succeeded":"failed"}function bX({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?GMe(new Date(e)):r*1e3}}Yt.parseRetryAfter=bX;function wX(t){let e=SX(t,"error");if(!e){iD.logger.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){iD.logger.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}Yt.getErrorFromResponse=wX;function GMe(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}function QX(t){let{response:e,state:r,operationLocation:n}=t;function i(){var o;switch((o=r.config.metadata)===null||o===void 0?void 0:o.mode){case void 0:return sD(e.rawResponse.statusCode);case"Body":return oD(e,r);default:return"running"}}let s=i();return s==="running"&&n===void 0?"succeeded":s}Yt.getStatusFromInitialResponse=QX;async function zMe(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:i,setErrorAsResult:s}=t;return(0,mX.initOperation)({init:async()=>{let o=await i.sendInitialRequest(),a=IX({rawResponse:o.rawResponse,requestPath:i.requestPath,requestMethod:i.requestMethod,resourceLocationConfig:r});return Object.assign({response:o,operationLocation:a?.operationLocation,resourceLocation:a?.resourceLocation},a?.mode?{metadata:{mode:a.mode}}:{})},stateProxy:e,processResult:n?({flatResponse:o},a)=>n(o,a):({flatResponse:o})=>o,getOperationStatus:QX,setErrorAsResult:s})}Yt.initHttpOperation=zMe;function NX({rawResponse:t},e){var r;switch((r=e.config.metadata)===nLine truncated
|
||||
`):o=[e.accountName,n,i,s,t.startsOn?(0,lb.truncatedISO8061Date)(t.startsOn,!1):"",(0,lb.truncatedISO8061Date)(t.expiresOn,!1),t.ipRange?(0,rZ.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",r,""].join(`
|
||||
`);let a=e.computeHMACSHA256(o);return{sasQueryParameters:new XFe.SASQueryParameters(r,a,n.toString(),i,s,t.protocol,t.startsOn,t.expiresOn,t.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.encryptionScope),stringToSign:o}}});var cZ=f(pb=>{"use strict";Object.defineProperty(pb,"__esModule",{value:!0});pb.BlobServiceClient=void 0;var tUe=MA(),rUe=Ar(),iZ=dt(),Uf=Ua(),nUe=DD(),Ab=Tr(),db=Da(),UD=Oa(),Ws=Tr(),Ks=sl(),iUe=ZB(),sUe=iB(),sZ=sb(),oZ=FD(),aZ=cb(),qD=class t extends sUe.StorageClient{serviceContext;static fromConnectionString(e,r){r=r||{};let n=(0,Ab.extractConnectionStringParts)(e);if(n.kind==="AccountConnString")if(iZ.isNodeLike){let i=new db.StorageSharedKeyCredential(n.accountName,n.accountKey);r.proxyOptions||(r.proxyOptions=(0,rUe.getDefaultProxySettings)(n.proxyUri));let s=(0,Uf.newPipeline)(i,r);return new t(n.url,s)}else throw new Error("Account connection string is only supported in Node.js environment");else if(n.kind==="SASConnString"){let i=(0,Uf.newPipeline)(new UD.AnonymousCredential,r);return new t(n.url+"?"+n.accountSas,i)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}constructor(e,r,n){let i;(0,Uf.isPipelineLike)(r)?i=r:iZ.isNodeLike&&r instanceof db.StorageSharedKeyCredential||r instanceof UD.AnonymousCredential||(0,tUe.isTokenCredential)(r)?i=(0,Uf.newPipeline)(r,n):i=(0,Uf.newPipeline)(new UD.AnonymousCredential,n),super(e,i),this.serviceContext=this.storageClientContext.service}getContainerClient(e){return new nUe.ContainerClient((0,Ab.appendToURLPath)(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,r={}){return Ks.tracingClient.withSpan("BlobServiceClient-createContainer",r,async n=>{let i=this.getContainerClient(e),s=await i.create(n);return{containerClient:i,containerCreateResponse:s}})}async deleteContainer(e,r={}){return Ks.tracingClient.withSpan("BlobServiceClient-deleteContainer",r,async n=>this.getContainerClient(e).delete(n))}async undeleteContainer(e,r,n={}){return Ks.tracingClient.withSpan("BlobServiceClient-undeleteContainer",n,async i=>{let s=this.getContainerClient(n.destinationContainerName||e),o=s.storageClientContext.container,a=(0,Ws.assertResponse)(await o.restore({deletedContainerName:e,deletedContainerVersion:r,tracingOptions:i.tracingOptions}));return{containerClient:s,containerUndeleteResponse:a}})}async getProperties(e={}){return Ks.tracingClient.withSpan("BlobServiceClient-getProperties",e,async r=>(0,Ws.assertResponse)(await this.serviceContext.getProperties({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async setProperties(e,r={}){return Ks.tracingClient.withSpan("BlobServiceClient-setProperties",r,async n=>(0,Ws.assertResponse)(await this.serviceContext.setProperties(e,{abortSignal:r.abortSignal,tracingOptions:n.tracingOptions})))}async getStatistics(e={}){return Ks.tracingClient.withSpan("BlobServiceClient-getStatistics",e,async r=>(0,Ws.assertResponse)(await this.serviceContext.getStatistics({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async getAccountInfo(e={}){return Ks.tracingClient.withSpan("BlobServiceClient-getAccountInfo",e,async r=>(0,Ws.assertResponse)(await this.serviceContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async listContainersSegment(e,r={}){return Ks.tracingClient.withSpan("BlobServiceClient-listContainersSegment",r,async n=>(0,Ws.assertResponse)(await this.serviceContext.listContainersSegment({abortSignal:r.abortSignal,marker:e,...r,include:typeof r.include=="string"?[r.include]:r.include,tracingOptions:n.tracingOptions})))}async findBlobsByTagsSegment(e,r,n={}){return Ks.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment",n,async i=>{let s=(0,Ws.assertResponse)(await this.serviceContext.filterBlobs({abortSignal:n.abortSignal,where:e,marker:r,maxPageSize:n.maxPageSize,tracingOptions:i.tracingOptions}));return{...s,_response:s._response,blobs:s.blobs.map(a=>{let c="";return a.tags?.blobTagSet.length===1&&(c=a.tags.blobTagSet[0].value),{...a,tags:(0,Ab.toTags)(a.tags),tagValue:c}})}})}async*findBlobsByTagsSegments(e,r,n={}){let i;if(r||r===void 0)do i=await this.findBlobsByTagsSegment(e,r,n),i.blobs=i.blobs||[],r=i.continuationToken,yield i;while(r)}async*findBlobsByTagsItems(e,r={}){let n;for await(let i of this.findBlobsByTagsSegments(e,n,r))yield*i.blobs}findBlobsByTags(e,r={}){let n={...r},i=this.findBlobsByTagsItems(e,n);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(s={})=>this.findBlobsByTagsSegments(e,s.continuationToken,{maxPageSize:s.maxPageSize,...n})}}async*listSegments(e,r={}){let n;if(e||e===void 0)do n=await this.listContainersSegment(e,r),n.containerItems=n.containerItems||[],e=n.continuationToken,yield await n;while(e)}async*listItems(e={}){let r;for await(let n of this.listSegments(r,e))yield*n.containerItems}listContainers(e={}){e.prefix===""&&(e.prefix=void 0);let r=[];e.inc
Line truncated
|
||||
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};nn.NetworkError=hb;hb.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var yb=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};nn.UsageError=yb;yb.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var YD=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};nn.RateLimitError=YD});var pZ=f(ai=>{"use strict";var AUe=ai&&ai.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dUe=ai&&ai.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),pUe=ai&&ai.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&AUe(r,e,n[i]);return dUe(r,e),r}})(),gUe=ai&&ai.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(ai,"__esModule",{value:!0});ai.UploadProgress=void 0;ai.uploadCacheArchiveSDK=hUe;var $D=pUe(Dt()),fUe=HD(),mUe=JD(),Eb=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,i=(e/(1024*1024)/(n/1e3)).toFixed(1);$D.info(`Sent ${e} of ${this.contentLength} (${r}%), ${i} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};ai.UploadProgress=Eb;function hUe(t,e,r){return gUe(this,void 0,void 0,function*(){var n;let i=new fUe.BlobClient(t),s=i.getBlockBlobClient(),o=new Eb((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),$D.debug(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let c=yield s.uploadFile(e,a);if(c._response.status>=400)throw new mUe.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw $D.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}});var KD=f(sn=>{"use strict";var yUe=sn&&sn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),EUe=sn&&sn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),CUe=sn&&sn.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&yUe(r,e,n[i]);return EUe(r,e),r}})(),Ib=sn&&sn.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(sn,"__esModule",{value:!0});sn.isSuccessStatusCode=IUe;sn.isServerErrorStatusCode=fZ;sn.isRetryableStatusCode=mZ;sn.retry=WD;sn.retryTypedResponse=bUe;sn.retryHttpClientResponse=wUe;var gZ=CUe(Dt()),Cb=Io(),yd=Fg();function IUe(t){return t?t>=200&&t<300:!1}function fZ(t){return t?t>=500:!0}function mZ(t){return t?[Cb.HttpCodes.BadGateway,Cb.HttpCodes.ServiceUnavailable,Cb.HttpCodes.GatewayTimeout].includes(t):!1}function BUe(t){return Ib(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))
Line truncated
|
||||
Other caches with similar key:`);for(let a of s?.artifactCaches||[])ci.debug(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function s1e(t,e,r){return Mn(this,void 0,void 0,function*(){let n=new KUe.URL(t),i=(0,sO.getDownloadOptions)(r);n.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield(0,wb.downloadCacheStorageSDK)(t,e,i):i.concurrentBlobDownloads?yield(0,wb.downloadCacheHttpClientConcurrent)(t,e,i):yield(0,wb.downloadCacheHttpClient)(t,e):yield(0,wb.downloadCacheHttpClient)(t,e)})}function o1e(t,e,r){return Mn(this,void 0,void 0,function*(){let n=oO(),i=Id.getCacheVersion(e,r?.compressionMethod,r?.enableCrossOsArchive),s={key:t,version:i,cacheSize:r?.cacheSize};return yield(0,Wa.retryTypedResponse)("reserveCache",()=>Mn(this,void 0,void 0,function*(){return n.postJson(Yf("caches"),s)}))})}function RZ(t,e){return`bytes ${t}-${e}/*`}function a1e(t,e,r,n,i){return Mn(this,void 0,void 0,function*(){ci.debug(`Uploading chunk of size ${i-n+1} bytes at offset ${n} with content range: ${RZ(n,i)}`);let s={"Content-Type":"application/octet-stream","Content-Range":RZ(n,i)},o=yield(0,Wa.retryHttpClientResponse)(`uploadChunk (start: ${n}, end: ${i})`,()=>Mn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),s)}));if(!(0,Wa.isSuccessStatusCode)(o.message.statusCode))throw new Error(`Cache service responded with ${o.message.statusCode} during upload chunk.`)})}function c1e(t,e,r,n){return Mn(this,void 0,void 0,function*(){let i=Id.getArchiveFileSizeInBytes(r),s=Yf(`caches/${e.toString()}`),o=nO.openSync(r,"r"),a=(0,sO.getUploadOptions)(n),c=Id.assertDefined("uploadConcurrency",a.uploadConcurrency),l=Id.assertDefined("uploadChunkSize",a.uploadChunkSize),u=[...new Array(c).keys()];ci.debug("Awaiting all uploads");let A=0;try{yield Promise.all(u.map(()=>Mn(this,void 0,void 0,function*(){for(;A<i;){let p=Math.min(i-A,l),m=A,y=A+p-1;A+=l,yield a1e(t,s,()=>nO.createReadStream(r,{fd:o,start:m,end:y,autoClose:!1}).on("error",b=>{throw new Error(`Cache upload failed because file read failed with ${b.message}`)}),m,y)}})))}finally{nO.closeSync(o)}})}function l1e(t,e,r){return Mn(this,void 0,void 0,function*(){let n={size:r};return yield(0,Wa.retryTypedResponse)("commitCache",()=>Mn(this,void 0,void 0,function*(){return t.postJson(Yf(`caches/${e.toString()}`),n)}))})}function u1e(t,e,r,n){return Mn(this,void 0,void 0,function*(){if((0,sO.getUploadOptions)(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,XUe.uploadCacheArchiveSDK)(r,e,n)}else{let s=oO();ci.debug("Upload cache"),yield c1e(s,t,e,n),ci.debug("Commiting cache");let o=Id.getArchiveFileSizeInBytes(e);ci.info(`Cache Size: ~${Math.round(o/(1024*1024))} MB (${o} B)`);let a=yield l1e(s,t,o);if(!(0,Wa.isSuccessStatusCode)(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);ci.info("Cache saved successfully")}})}});var Qb=f(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.isJsonObject=Bd.typeofJsonValue=void 0;function A1e(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}Bd.typeofJsonValue=A1e;function d1e(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}Bd.isJsonObject=d1e});var Sb=f(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.base64encode=bd.base64decode=void 0;var Mo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Nb=[];for(let t=0;t<Mo.length;t++)Nb[Mo[t].charCodeAt(0)]=t;Nb[45]=Mo.indexOf("+");Nb[95]=Mo.indexOf("/");function p1e(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let r=new Uint8Array(e),n=0,i=0,s,o=0;for(let a=0;a<t.length;a++){if(s=Nb[t.charCodeAt(a)],s===void 0)switch(t[a]){case"=":i=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:o=s,i=1;break;case 1:r[n++]=o<<2|(s&48)>>4,o=s,i=2;break;case 2:r[n++]=(o&15)<<4|(s&60)>>2,o=s,i=3;break;case 3:r[n++]=(o&3)<<6|s,i=0;break}}if(i==1)throw Error("invalid base64 string.");return r.subarray(0,n)}bd.base64decode=p1e;function g1e(t){let e="",r=0,n,i=0;for(let s=0;s<t.length;s++)switch(n=t[s],r){case 0:e+=Mo[n>>2],i=(n&3)<<4,r=1;break;case 1:e+=Mo[i|n>>4],i=(n&15)<<2,r=2;break;case 2:e+=Mo[i|n>>6],e+=Mo[n&63],r=0;break}return r&&(e+=Mo[i],e+="=",r==1&&(e+="=")),e}bd.base64encode=g1e});var _Z=f(Rb=>{"use strict";Object.defineProperty(Rb,"__esModule",{value:!0});Rb.utf8read=void 0;var aO=t=>String.fromCharCode.apply(String,t);function f1e(t){if(t.length<1)return"";let e=0,r=[],n=[],i=0,s,o=t.length;for(;e<o;)s=t[e++],s<128?n[i++]=s:s>191&&s<224?n[i++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[i++]=55296+(s>>10),n[i++]=56320+(s&1023)):n[i++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,i>8191&&(r.push(aO(n)),i=0);return r.length?(i&&r.push(aO(n.slice(0,i))),r.join("")):aO(n.slice(0,i))}Rb.utf8read=f1e});var Jf=f(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.WireType=Zs.mergeBinaryOptions=Zs.UnknownFieldHandler=void 0;var m1e;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,i,s,o)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:i,wireType:s,data:o})},t.onWrite=(r,n,i)=>{for(let{no:s,wireType:o,data:a}of t.list(n))i.tag(s,o).raw(a)},t.list=(r,n)=>{if(e(r)){let i=r[t.symbol];return n?i.filter(s=>s.no==n):i}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})(m1e=Zs.UnknownFieldHandler||(Zs.UnknownFieldHandler={}));function h1e(t,e){return Object.assign(Object.assign({},t),e)}Zs.mergeBinaryOptions=h1e;var y1e;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(y1e=Zs.WireType||(Zs.WireType={}))});var _b=f(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.varint32read=Un.varint32write=Un.int64toString=Un.int64fromString=Un.varint64write=Un.varint64read=void 0;function E1e(){let t=0,e=0;for(let n=0;n<28;n+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}Un.varint64read=E1e;function C1e(t,e,r){for(let s=0;s<28;s=s+7){let o=t>>>s,a=!(!(o>>>7)&&e==0),c=(a?o|128:o)&255;if(r.push(c),!a)return}let n=t>>>28&15|(e&7)<<4,i=e>>3!=0;if(r.push((i?n|128:n)&255),!!i){for(let s=3;s<31;s=s+7){let o=e>>>s,a=!!(o>>>7),c=(a?o|128:o)&255;if(r.push(c),!a)return}r.push(e>>>31&1)}}Un.varint64write=C1e;var xb=65536*65536;function I1e(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,i=0;function s(o,a){let c=Number(t.slice(o,a));i*=r,n=n*r+c,n>=xb&&(i=i+(n/xb|0),n=n%xb)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,n,i]}Un.int64fromString=I1e;function B1e(t,e){if(e>>>0<=2097151)return""+(xb*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,i=e>>16&65535,s=r+n*6777216+i*6710656,o=n+i*8147497,a=i*2,c=1e7;s>=c&&(o+=Math.floor(s/c),s%=c),o>=c&&(a+=Math.floor(o/c),o%=c);function l(u,A){let p=u?String(u):"";return A?"0000000".slice(p.length)+p:p}return l(a,0)+l(o,a)+l(s,1)}Un.int64toString=B1e;function b1e(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}Un.varint32write=b1e;function w1e(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}Un.varint32read=w1e});var Xa=f(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.PbLong=Ka.PbULong=Ka.detectBi=void 0;var $f=_b(),pt;function vZ(){let t=new DataView(new ArrayBuffer(8));pt=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}Ka.detectBi=vZ;vZ();function TZ(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var PZ=/^-?[0-9]+$/,Tb=4294967296,vb=2147483648,Pb=class{c
Line truncated
|
||||
`)}};n0.RpcError=DO});var LO=f(s0=>{"use strict";Object.defineProperty(s0,"__esModule",{value:!0});s0.mergeRpcOptions=void 0;var l6=rr();function Vqe(t,e){if(!e)return t;let r={};i0(t,r),i0(e,r);for(let n of Object.keys(e)){let i=e[n];switch(n){case"jsonOptions":r.jsonOptions=l6.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=l6.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},i0(t.meta,r.meta),i0(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(i):i.concat();break}}return r}s0.mergeRpcOptions=Vqe;function i0(t,e){if(!t)return;let r=e;for(let[n,i]of Object.entries(t))i instanceof Date?r[n]=new Date(i.getTime()):Array.isArray(i)?r[n]=i.concat():r[n]=i}});var MO=f(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.Deferred=ml.DeferredState=void 0;var ro;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(ro=ml.DeferredState||(ml.DeferredState={}));var kO=class{constructor(e=!0){this._state=ro.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==ro.PENDING)throw new Error(`cannot resolve ${ro[this.state].toLowerCase()}`);this._resolve(e),this._state=ro.RESOLVED}reject(e){if(this.state!==ro.PENDING)throw new Error(`cannot reject ${ro[this.state].toLowerCase()}`);this._reject(e),this._state=ro.REJECTED}resolvePending(e){this._state===ro.PENDING&&this.resolve(e)}rejectPending(e){this._state===ro.PENDING&&this.reject(e)}};ml.Deferred=kO});var UO=f(o0=>{"use strict";Object.defineProperty(o0,"__esModule",{value:!0});o0.RpcOutputStreamController=void 0;var u6=MO(),hl=rr(),FO=class{constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){hl.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){hl.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){hl.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){hl.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;hl.assert(e,"bad state"),hl.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new u6.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;hl.assert(n.state==u6.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};o0.RpcOutputStreamController=FO});var HO=f(_d=>{"use strict";var Yqe=_d&&_d.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(_d,"__esModule",{value:!0});_d.UnaryCall=void 0;var qO=class{constructor(e,r,n,i,s,o,a){this.method=e,this.requestHeaders=r,this.request=n,this.headers=i,this.response=s,this.status=o,this.trailers=a}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return Yqe(this,void 0,void 0,function*(){let[e,r,n,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:i}})}};_d.UnaryCall=qO});var zO=f(vd=>{"use strict";var Jqe=vd&&vd.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(vd,"__esModule",{value:!0});vd.ServerStreamingCall=void 0;var GO=class{constructor(e,r,n,i
Line truncated
|
||||
`));let n=yield dL(r,"create");yield pL(n,t)})}});var fL=f(Ir=>{"use strict";var GHe=Ir&&Ir.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zHe=Ir&&Ir.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),um=Ir&&Ir.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&GHe(r,e,n[i]);return zHe(r,e),r}})(),Gd=Ir&&Ir.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.FinalizeCacheError=Ir.ReserveCacheError=Ir.ValidationError=void 0;Ir.isFeatureAvailable=jHe;Ir.restoreCache=VHe;Ir.saveCache=$He;var Ce=um(Dt()),f0=um(_("path")),qt=um(Wu()),Hd=um(xZ()),_6=um(N6()),m0=bb(),tc=x6(),h0=Io(),Vi=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};Ir.ValidationError=Vi;var Cl=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};Ir.ReserveCacheError=Cl;var lm=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};Ir.FinalizeCacheError=lm;function v6(t){if(!t||t.length===0)throw new Vi("Path Validation Error: At least one directory or file path is required")}function gL(t){if(t.length>512)throw new Vi(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Vi(`Key Validation Error: ${t} cannot contain commas.`)}function jHe(){return(0,m0.getCacheServiceVersion)()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function VHe(t,e,r,n){return Gd(this,arguments,void 0,function*(i,s,o,a,c=!1){let l=(0,m0.getCacheServiceVersion)();return Ce.debug(`Cache service version: ${l}`),v6(i),l==="v2"?yield JHe(i,s,o,a,c):yield YHe(i,s,o,a,c)})}function YHe(t,e,r,n){return Gd(this,arguments,void 0,function*(i,s,o,a,c=!1){o=o||[];let l=[s,...o];if(Ce.debug("Resolved Keys:"),Ce.debug(JSON.stringify(l)),l.length>10)throw new Vi("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of l)gL(p);let u=yield qt.getCompressionMethod(),A="";try{let p=yield Hd.getCacheEntry(l,i,{compressionMethod:u,enableCrossOsArchive:c});if(!p?.archiveLocation)return;if(a?.lookupOnly)return Ce.info("Lookup only - skipping download"),p.cacheKey;A=f0.join(yield qt.createTempDirectory(),qt.getCacheFileName(u)),Ce.debug(`Archive Path: ${A}`),yield Hd.downloadCache(p.archiveLocation,A,a),Ce.isDebug()&&(yield(0,tc.listTar)(A,u));let m=qt.getArchiveFileSizeInBytes(A);return Ce.info(`Cache Size: ~${Math.round(m/(1024*1024))} MB (${m} B)`),yield(0,tc.extractTar)(A,u),Ce.info("Cache restored successfully"),p.cacheKey}catch(p){let m=p;if(m.name===Vi.name)throw p;m instanceof h0.HttpClientError&&typeof m.statusCode=="number"&&m.statusCode>=500?Ce.error(`Failed to restore: ${p.message}`):Ce.warning(`Failed to restore: ${p.message}`)}finally{try{yield qt.unlinkFile(A)}catch(p){Ce.debug(`Failed to delete archive: ${p}`)}}})}function JHe(t,e,r,n){return Gd(this,arguments,void 0,function*(i,s,o,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),o=o||[];let l=[s,...o];if(Ce.debug("Resolved Keys:"),Ce.debug(JSON.stringify(l)),l.length>10)throw new Vi("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of l)gL(A);let u="";try{let A=_6.internalCacheTwirpClient(),p=yield qt.getCompressionMethod(),m={key:s,restoreKeys:o,version:qt.getCacheVersion(i,p,c)},y=yield A.GetCacheEntryDownloadURL(m);if(!y.ok){Ce.debug(`Cache not found for version ${m.version} of keys: ${l.join(", ")}`);return}if(m.key!==y.matchedKey?Ce.info(`Cache hit for restore-key: ${y.matchedKey}`):Ce.info(`Cache hit for: ${y.matchedKey}`),a?.lookupOnly)return Ce.info("Lookup only - skipping download"),y.matchedKey;u=f0.join(yield qt.createTempDirectory(),qt.getCacheFileName(p)),Ce.debug(`Archive path: ${u}`),Ce.debug(`Starting download of archive to: ${u}`),yield Hd.downloadCache(y.signedDownloadUrl,u,a);let x=qt.getArchiveFileSizeInBytes(u);return Ce.info(`Cache Size: ~${Math.round(x/(1024*1024))} MB (${x} B)`),Ce.isDebug()&&(yield(0,tc.listTar)(u,p)),yield(0,tc.extractTar)(u,p),Ce.info("Cache restored successfully"),y.mat
Line truncated
|
||||
`);for(let i of n){let s=i.split("=");if(s.length===2&&(s[0].trim()==="VERSION_ID"||s[0].trim()==="DISTRIB_RELEASE")){e=s[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return e}function e2e(){let t="/etc/lsb-release",e="/etc/os-release",r="";return b0.existsSync(t)?r=b0.readFileSync(t).toString():b0.existsSync(e)&&(r=b0.readFileSync(e).toString()),r}});var m7=f(Yi=>{"use strict";var t2e=Yi&&Yi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),r2e=Yi&&Yi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),n2e=Yi&&Yi.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&t2e(r,e,n[i]);return r2e(r,e),r}})(),g7=Yi&&Yi.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.RetryHelper=void 0;var f7=n2e(Dt()),BL=class{constructor(e,r,n){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(n),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,r){return g7(this,void 0,void 0,function*(){let n=1;for(;n<this.maxAttempts;){try{return yield e()}catch(s){if(r&&!r(s))throw s;f7.info(s.message)}let i=this.getSleepAmount();f7.info(`Waiting ${i} seconds before trying again`),yield this.sleep(i),n++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return g7(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e*1e3))})}};Yi.RetryHelper=BL});var N2e=f(St=>{"use strict";var i2e=St&&St.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),s2e=St&&St.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hs=St&&St.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&i2e(r,e,n[i]);return s2e(r,e),r}})(),Cn=St&&St.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(A){o(A)}}function c(u){try{l(n.throw(u))}catch(A){o(A)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(St,"__esModule",{value:!0});St.HTTPError=void 0;St.downloadTool=d2e;St.extract7z=g2e;St.extractTar=f2e;St.extractXar=m2e;St.extractZip=h2e;St.cacheDir=C2e;St.cacheFile=I2e;St.find=B2e;St.findAllVersions=E7;St.getManifestFromRepo=b2e;St.findFromManifest=w2e;St.isExplicitVersion=QL;St.evaluateVersions=B7;var Ze=hs(Dt()),pi=hs(Vo()),h7=hs(_("crypto")),Ji=hs(_("fs")),o2e=hs(p7()),gm=hs(_("os")),ms=hs(_("path")),y7=hs(Io()),qo=hs(fa()),a2e=hs(_("stream")),c2e=hs(_("util")),jd=_("assert"),rc=Xp(),l2e=m7(),pm=class extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}};St.HTTPError=pm;var wL=process.platform==="win32",u2e=process.platform==="darwin",A2e="actions/tool-cache";function d2e(t,e,r,n){return Cn(this,void 0,void 0,function*(){e=e||ms.join(b7(),h7.randomUUID()),yield pi.mkdirP(ms.dirname(e)),Ze.debug(`Downloading ${t}`),Ze.debug(`Destination ${e}`);let i=3,s=bL("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=bL("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);return yield new l2e.RetryHelper(i,s,o).execute(()=>Cn(this,void 0,void 0,function*(){return yield p2e(t,e||"",r,n)}),c=>!(c instanceof pm&&c.httpStatusCode&&c.httpStatusCode<500&&c.httpStatusCode!==408&&c.httpStatusCode!==429))})}function p2e(t,e,r,n){return Cn(this,void 0,void 0,function*(){if(Ji.existsSync(e))throw new Error(
Line truncated
|
||||
|
||||
`+t.mark.snippet),n+" "+r):n}function dg(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=EY(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}dg.prototype=Object.create(Error.prototype);dg.prototype.constructor=dg;dg.prototype.toString=function(e){return this.name+": "+EY(this,e)};var pn=dg;function hR(t,e,r,n,i){var s="",o="",a=Math.floor(i/2)-1;return n-e>a&&(s=" ... ",e=n-a+s.length),r-n>a&&(o=" ...",r=n+a-o.length),{str:s+t.slice(e,r).replace(/\t/g,"\u2192")+o,pos:n-e+s.length}}function yR(t,e){return hr.repeat(" ",e-t.length)+t}function yEe(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],s,o=-1;s=r.exec(t.buffer);)i.push(s.index),n.push(s.index+s[0].length),t.position<=s.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var a="",c,l,u=Math.min(t.line+e.linesAfter,i.length).toString().length,A=e.maxLength-(e.indent+u+3);for(c=1;c<=e.linesBefore&&!(o-c<0);c++)l=hR(t.buffer,n[o-c],i[o-c],t.position-(n[o]-n[o-c]),A),a=hr.repeat(" ",e.indent)+yR((t.line-c+1).toString(),u)+" | "+l.str+`
|
||||
`+a;for(l=hR(t.buffer,n[o],i[o],t.position,A),a+=hr.repeat(" ",e.indent)+yR((t.line+1).toString(),u)+" | "+l.str+`
|
||||
`,a+=hr.repeat("-",e.indent+u+3+l.pos)+`^
|
||||
`,c=1;c<=e.linesAfter&&!(o+c>=i.length);c++)l=hR(t.buffer,n[o+c],i[o+c],t.position-(n[o]-n[o+c]),A),a+=hr.repeat(" ",e.indent)+yR((t.line+c+1).toString(),u)+" | "+l.str+`
|
||||
`;return a.replace(/\n$/,"")}var EEe=yEe,CEe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],IEe=["scalar","sequence","mapping"];function BEe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function bEe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(CEe.indexOf(r)===-1)throw new pn('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=BEe(e.styleAliases||null),IEe.indexOf(this.kind)===-1)throw new pn('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Jr=bEe;function nY(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(i=o)}),r[i]=n}),r}function wEe(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}function CR(t){return this.extend(t)}CR.prototype.extend=function(e){var r=[],n=[];if(e instanceof Jr)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new pn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Jr))throw new pn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new pn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new pn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof Jr))throw new pn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(CR.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=nY(i,"implicit"),i.compiledExplicit=nY(i,"explicit"),i.compiledTypeMap=wEe(i.compiledImplicit,i.compiledExplicit),i};var QEe=CR,NEe=new Jr("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),SEe=new Jr("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),REe=new Jr("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),xEe=new QEe({explicit:[NEe,SEe,REe]});function _Ee(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function vEe(){return null}function TEe(t){return t===null}var PEe=new Jr("tag:yaml.org,2002:null",{kind:"scalar",resolve:_Ee,construct:vEe,predicate:TEe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function DEe(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function OEe(t){return t==="true"||t==="True"||t==="TRUE"}function LEe(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var kEe=new Jr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:DEe,construct:OEe,predicate:LEe,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function MEe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function FEe(t){return 48<=t&&t<=55}function UEe(t){return 48<=t&&t<=57}function qEe(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!MEe(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!FEe(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(!UEe(t.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}function HEe(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(
Line truncated
|
||||
\r`;function oCe(t){if(t===null)return!1;var e,r,n=0,i=t.length,s=QR;for(r=0;r<i;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}function aCe(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,s=QR,o=0,a=[];for(e=0;e<i;e++)e%4===0&&e&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(n.charAt(e));return r=i%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),new Uint8Array(a)}function cCe(t){var e="",r=0,n,i,s=t.length,o=QR;for(n=0;n<s;n++)n%3===0&&n&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[n];return i=s%3,i===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):i===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):i===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function lCe(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var uCe=new Jr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:oCe,construct:aCe,predicate:lCe,represent:cCe}),ACe=Object.prototype.hasOwnProperty,dCe=Object.prototype.toString;function pCe(t){if(t===null)return!0;var e=[],r,n,i,s,o,a=t;for(r=0,n=a.length;r<n;r+=1){if(i=a[r],o=!1,dCe.call(i)!=="[object Object]")return!1;for(s in i)if(ACe.call(i,s))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function gCe(t){return t!==null?t:[]}var fCe=new Jr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:pCe,construct:gCe}),mCe=Object.prototype.toString;function hCe(t){if(t===null)return!0;var e,r,n,i,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(n=o[e],mCe.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;s[e]=[i[0],n[i[0]]]}return!0}function yCe(t){if(t===null)return[];var e,r,n,i,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1)n=o[e],i=Object.keys(n),s[e]=[i[0],n[i[0]]];return s}var ECe=new Jr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:hCe,construct:yCe}),CCe=Object.prototype.hasOwnProperty;function ICe(t){if(t===null)return!0;var e,r=t;for(e in r)if(CCe.call(r,e)&&r[e]!==null)return!1;return!0}function BCe(t){return t!==null?t:{}}var bCe=new Jr("tag:yaml.org,2002:set",{kind:"mapping",resolve:ICe,construct:BCe}),BY=ZEe.extend({implicit:[nCe,sCe],explicit:[uCe,fCe,ECe,bCe]}),ha=Object.prototype.hasOwnProperty,nE=1,bY=2,wY=3,iE=4,ER=1,wCe=2,iY=3,QCe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,NCe=/[\x85\u2028\u2029]/,SCe=/[,\[\]\{\}]/,QY=/^(?:!|!!|![a-z\-]+!)$/i,NY=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function sY(t){return Object.prototype.toString.call(t)}function Ls(t){return t===10||t===13}function Oc(t){return t===9||t===32}function Tn(t){return t===9||t===32||t===10||t===13}function _u(t){return t===44||t===91||t===93||t===123||t===125}function RCe(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function xCe(t){return t===120?2:t===117?4:t===85?8:0}function _Ce(t){return 48<=t&&t<=57?t-48:-1}function oY(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
||||
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function vCe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function SY(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}var RY=new Array(256),xY=new Array(256);for(Dc=0;Dc<256;Dc++)RY[Dc]=oY(Dc)?1:0,xY[Dc]=oY(Dc);var Dc;function TCe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||BY,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function _Y(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=EEe(r),new pn(e,r)}function me(t,e){throw _Y(t,e)}function sE(t,e){t.onWarning&&t.onWarning.call(null,_Y(t,e))}var aY={YAML:function(e,r,n){var i,s,o;e.version!==null&&me(e,"duplication of %YAML directive"),n.length!==1&&me(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&me(e,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&me(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&sE(e,"unsupported YAML version of the document")},TAG:function(e,r,n){var i,s;n.length!==2&&me(e,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],QY.test(i)||me(e,"ill-formed tag handle (first argument) of the TAG directive"),ha.call(e.tagMap,i)&&me(e,'there is a previously declared suffix for "'+i+'" tag handle'),NY.test(s)||me(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{me(e,"tag prefix is malformed: "+s)}e.tagMap[i]=s}};function ma(t,e,r,n){var i,s,o,a;if(e<r){if(a=t.input.slice(e,r),n)for(i=0,s=a.length;i<s;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||me(t,"expected valid JSON character");else QCe.test(a)&&me(t,"the stream contains non-printable characters");t.result+=a}}function cY(t,e,r,n){var i,s,o,a;for(hr.isObject(r)||me(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),o=0,a=i.length;o<a;o+=1)s=i[o],ha.call(e,s)||(SY(e,s,r[s]),n[s]=!0)}function vu(t,e,r,n,i,s,o,a,c){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&me(t,"nested arrays are not supported inside keys"),typeof i=="object"&&sY(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&sY(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,u=s.length;l<u;l+=1)cY(t,e,s[l],r);else cY(t,e,s,r);else!t.json&&!ha.call(r,i)&&ha.call(e,i)&&(t.line=o||t.line,t.lineStart=a||t.lineStart,t.position=c||t.position,me(t,"duplicated mapping key")),SY(e,i,s),delete r[i];return e}function NR(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):me(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function lr(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;Oc(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(Ls(i))for(NR(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&sE(t,"deficient indentation"),n}function cE(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Tn(r)))}function SR(t,e){e===1?t.result+=" ":e>1&&(t.result+=hr.repeat(`
|
||||
`,e-1))}function PCe(t,e,r){var n,i,s,o,a,c,l,u,A=t.kind,p=t.result,m;if(m=t.input.charCodeAt(t.position),Tn(m)||_u(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=t.input.charCodeAt(t.position+1),Tn(i)||r&&_u(i)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,a=!1;m!==0;){if(m===58){if(i=t.input.charCodeAt(t.position+1),Tn(i)||r&&_u(i))break}else if(m===35){if(n=t.input.charCodeAt(t.position-1),Tn(n))break}else{if(t.position===t.lineStart&&cE(t)||r&&_u(m))break;if(Ls(m))if(c=t.line,l=t.lineStart,u=t.lineIndent,lr(t,!1,-1),t.lineIndent>=e){a=!0,m=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=c,t.lineStart=l,t.lineIndent=u;break}}a&&(ma(t,s,o,!1),SR(t,t.line-c),s=o=t.position,a=!1),Oc(m)||(o=t.position+1),m=t.input.charCodeAt(++t.position)}return ma(t,s,o,!1),t.result?!0:(t.kind=A,t.result=p,!1)}function DCe(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(ma(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Ls(r)?(ma(t,n,i,!0),SR(t,lr(t,!1,e)),n=i=t.position):t.position===t.lineStart&&cE(t)?me(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);me(t,"unexpected end of the stream within a single quoted scalar")}function OCe(t,e){var r,n,i,s,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return ma(t,r,t.position,!0),t.position++,!0;if(a===92){if(ma(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),Ls(a))lr(t,!1,e);else if(a<256&&RY[a])t.result+=xY[a],t.position++;else if((o=xCe(a))>0){for(i=o,s=0;i>0;i--)a=t.input.charCodeAt(++t.position),(o=RCe(a))>=0?s=(s<<4)+o:me(t,"expected hexadecimal character");t.result+=vCe(s),t.position++}else me(t,"unknown escape sequence");r=n=t.position}else Ls(a)?(ma(t,r,n,!0),SR(t,lr(t,!1,e)),r=n=t.position):t.position===t.lineStart&&cE(t)?me(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}me(t,"unexpected end of the stream within a double quoted scalar")}function LCe(t,e){var r=!0,n,i,s,o=t.tag,a,c=t.anchor,l,u,A,p,m,y=Object.create(null),b,x,S,R;if(R=t.input.charCodeAt(t.position),R===91)u=93,m=!1,a=[];else if(R===123)u=125,m=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),R=t.input.charCodeAt(++t.position);R!==0;){if(lr(t,!0,e),R=t.input.charCodeAt(t.position),R===u)return t.position++,t.tag=o,t.anchor=c,t.kind=m?"mapping":"sequence",t.result=a,!0;r?R===44&&me(t,"expected the node content, but found ','"):me(t,"missed comma between flow collection entries"),x=b=S=null,A=p=!1,R===63&&(l=t.input.charCodeAt(t.position+1),Tn(l)&&(A=p=!0,t.position++,lr(t,!0,e))),n=t.line,i=t.lineStart,s=t.position,Tu(t,e,nE,!1,!0),x=t.tag,b=t.result,lr(t,!0,e),R=t.input.charCodeAt(t.position),(p||t.line===n)&&R===58&&(A=!0,R=t.input.charCodeAt(++t.position),lr(t,!0,e),Tu(t,e,nE,!1,!0),S=t.result),m?vu(t,a,y,x,b,S,n,i,s):A?a.push(vu(t,null,y,x,b,S,n,i,s)):a.push(b),lr(t,!0,e),R=t.input.charCodeAt(t.position),R===44?(r=!0,R=t.input.charCodeAt(++t.position)):r=!1}me(t,"unexpected end of the stream within a flow collection")}function kCe(t,e){var r,n,i=ER,s=!1,o=!1,a=e,c=0,l=!1,u,A;if(A=t.input.charCodeAt(t.position),A===124)n=!1;else if(A===62)n=!0;else return!1;for(t.kind="scalar",t.result="";A!==0;)if(A=t.input.charCodeAt(++t.position),A===43||A===45)ER===i?i=A===43?iY:wCe:me(t,"repeat of a chomping mode identifier");else if((u=_Ce(A))>=0)u===0?me(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?me(t,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(Oc(A)){do A=t.input.charCodeAt(++t.position);while(Oc(A));if(A===35)do A=t.input.charCodeAt(++t.position);while(!Ls(A)&&A!==0)}for(;A!==0;){for(NR(t),t.lineIndent=0,A=t.input.charCodeAt(t.position);(!o||t.lineIndent<a)&&A===32;)t.lineIndent++,A=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>a&&(a=t.lineIndent),Ls(A)){c++;continue}if(t.lineIndent<a){i===iY?t.result+=hr.repeat(`
|
||||
`,s?1+c:c):i===ER&&s&&(t.result+=`
|
||||
`);break}for(n?Oc(A)?(l=!0,t.result+=hr.repeat(`
|
||||
`,s?1+c:c)):l?(l=!1,t.result+=hr.repeat(`
|
||||
`,c+1)):c===0?s&&(t.result+=" "):t.result+=hr.repeat(`
|
||||
`,c):t.result+=hr.repeat(`
|
||||
`,s?1+c:c),s=!0,o=!0,c=0,r=t.position;!Ls(A)&&A!==0;)A=t.input.charCodeAt(++t.position);ma(t,r,t.position,!1)}return!0}function lY(t,e){var r,n=t.tag,i=t.anchor,s=[],o,a=!1,c;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),c=t.input.charCodeAt(t.position);c!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,me(t,"tab characters must not be used in indentation")),!(c!==45||(o=t.input.charCodeAt(t.position+1),!Tn(o))));){if(a=!0,t.position++,lr(t,!0,-1)&&t.lineIndent<=e){s.push(null),c=t.input.charCodeAt(t.position);continue}if(r=t.line,Tu(t,e,wY,!1,!0),s.push(t.result),lr(t,!0,-1),c=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&c!==0)me(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=s,!0):!1}function MCe(t,e,r){var n,i,s,o,a,c,l=t.tag,u=t.anchor,A={},p=Object.create(null),m=null,y=null,b=null,x=!1,S=!1,R;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=A),R=t.input.charCodeAt(t.position);R!==0;){if(!x&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,me(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),s=t.line,(R===63||R===58)&&Tn(n))R===63?(x&&(vu(t,A,p,m,y,null,o,a,c),m=y=b=null),S=!0,x=!0,i=!0):x?(x=!1,i=!0):me(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,R=n;else{if(o=t.line,a=t.lineStart,c=t.position,!Tu(t,r,bY,!1,!0))break;if(t.line===s){for(R=t.input.charCodeAt(t.position);Oc(R);)R=t.input.charCodeAt(++t.position);if(R===58)R=t.input.charCodeAt(++t.position),Tn(R)||me(t,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(vu(t,A,p,m,y,null,o,a,c),m=y=b=null),S=!0,x=!1,i=!1,m=t.tag,y=t.result;else if(S)me(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=l,t.anchor=u,!0}else if(S)me(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=l,t.anchor=u,!0}if((t.line===s||t.lineIndent>e)&&(x&&(o=t.line,a=t.lineStart,c=t.position),Tu(t,e,iE,!0,i)&&(x?y=t.result:b=t.result),x||(vu(t,A,p,m,y,b,o,a,c),m=y=b=null),lr(t,!0,-1),R=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&R!==0)me(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return x&&vu(t,A,p,m,y,null,o,a,c),S&&(t.tag=l,t.anchor=u,t.kind="mapping",t.result=A),S}function FCe(t){var e,r=!1,n=!1,i,s,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&me(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(n=!0,i="!!",o=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(s=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):me(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Tn(o);)o===33&&(n?me(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),QY.test(i)||me(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),SCe.test(s)&&me(t,"tag suffix cannot contain flow indicator characters")}s&&!NY.test(s)&&me(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{me(t,"tag name is malformed: "+s)}return r?t.tag=s:ha.call(t.tagMap,i)?t.tag=t.tagMap[i]+s:i==="!"?t.tag="!"+s:i==="!!"?t.tag="tag:yaml.org,2002:"+s:me(t,'undeclared tag handle "'+i+'"'),!0}function UCe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&me(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Tn(r)&&!_u(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&me(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function qCe(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!Tn(n)&&!_u(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&me(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),ha.call(t.anchorMap,r)||me(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],lr(t,!0,-1),!0}function Tu(t,e,r,n,i){var s,o,a,c=1,l=!1,u=!1,A,p,m,y,b,x;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=o=a=iE===r||wY===r,n&&lr(t,!0,-1)&&(l=!0,t.lineIndent>e?c=1:t.lineIndent===e?c=0:t.lineIndent<e&&(c=-1)),c===1)for(;FCe(t)||UCe(t);)lr(t,!0,-1)?(l=!0,a=s,t.lineIndent>e?c=1:t.lineIndent===e?c=0:t.lineIndent<e&&(c=-1)):a=!1;if(a&&(a=l||i),(c===1||iE===r)&&(nE===r||bY===r?b=e:b=e+1,x=t.position-t.lineStart,c===1?a&&(lY(t,x)||MCe(t,x,b))||LCe(t,b)?u=!0:(o&&kCe(t,b)||DCe(t,b)||OCe(t,b)?u=!0:qCe(t)?(u=!0,(t.tag!==null||t.anchor!=
Line truncated
|
||||
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new TCe(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,me(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)HCe(r);return r.documents}function GCe(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=vY(t,r);if(typeof e!="function")return n;for(var i=0,s=n.length;i<s;i+=1)e(n[i])}function zCe(t,e){var r=vY(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new pn("expected a single document in the stream, but found more")}}var jCe=GCe,VCe=zCe,TY={loadAll:jCe,load:VCe},PY=Object.prototype.toString,DY=Object.prototype.hasOwnProperty,RR=65279,YCe=9,pg=10,JCe=13,$Ce=32,WCe=33,KCe=34,IR=35,XCe=37,ZCe=38,eIe=39,tIe=42,OY=44,rIe=45,oE=58,nIe=61,iIe=62,sIe=63,oIe=64,LY=91,kY=93,aIe=96,MY=123,cIe=124,FY=125,$r={};$r[0]="\\0";$r[7]="\\a";$r[8]="\\b";$r[9]="\\t";$r[10]="\\n";$r[11]="\\v";$r[12]="\\f";$r[13]="\\r";$r[27]="\\e";$r[34]='\\"';$r[92]="\\\\";$r[133]="\\N";$r[160]="\\_";$r[8232]="\\L";$r[8233]="\\P";var lIe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],uIe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function AIe(t,e){var r,n,i,s,o,a,c;if(e===null)return{};for(r={},n=Object.keys(e),i=0,s=n.length;i<s;i+=1)o=n[i],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=t.compiledTypeMap.fallback[o],c&&DY.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[o]=a;return r}function dIe(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new pn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+hr.repeat("0",n-e.length)+e}var pIe=1,gg=2;function gIe(t){this.schema=t.schema||BY,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=hr.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=AIe(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?gg:pIe,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function uY(t,e){for(var r=hr.repeat(" ",e),n=0,i=-1,s="",o,a=t.length;n<a;)i=t.indexOf(`
|
||||
`,n),i===-1?(o=t.slice(n),n=a):(o=t.slice(n,i+1),n=i+1),o.length&&o!==`
|
||||
`&&(s+=r),s+=o;return s}function BR(t,e){return`
|
||||
`+hr.repeat(" ",t.indent*e)}function fIe(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1}function aE(t){return t===$Ce||t===YCe}function fg(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==RR||65536<=t&&t<=1114111}function AY(t){return fg(t)&&t!==RR&&t!==JCe&&t!==pg}function dY(t,e,r){var n=AY(t),i=n&&!aE(t);return(r?n:n&&t!==OY&&t!==LY&&t!==kY&&t!==MY&&t!==FY)&&t!==IR&&!(e===oE&&!i)||AY(e)&&!aE(e)&&t===IR||e===oE&&i}function mIe(t){return fg(t)&&t!==RR&&!aE(t)&&t!==rIe&&t!==sIe&&t!==oE&&t!==OY&&t!==LY&&t!==kY&&t!==MY&&t!==FY&&t!==IR&&t!==ZCe&&t!==tIe&&t!==WCe&&t!==cIe&&t!==nIe&&t!==iIe&&t!==eIe&&t!==KCe&&t!==XCe&&t!==oIe&&t!==aIe}function hIe(t){return!aE(t)&&t!==oE}function Ag(t,e){var r=t.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function UY(t){var e=/^\n* /;return e.test(t)}var qY=1,bR=2,HY=3,GY=4,xu=5;function yIe(t,e,r,n,i,s,o,a){var c,l=0,u=null,A=!1,p=!1,m=n!==-1,y=-1,b=mIe(Ag(t,0))&&hIe(Ag(t,t.length-1));if(e||o)for(c=0;c<t.length;l>=65536?c+=2:c++){if(l=Ag(t,c),!fg(l))return xu;b=b&&dY(l,u,a),u=l}else{for(c=0;c<t.length;l>=65536?c+=2:c++){if(l=Ag(t,c),l===pg)A=!0,m&&(p=p||c-y-1>n&&t[y+1]!==" ",y=c);else if(!fg(l))return xu;b=b&&dY(l,u,a),u=l}p=p||m&&c-y-1>n&&t[y+1]!==" "}return!A&&!p?b&&!o&&!i(t)?qY:s===gg?xu:bR:r>9&&UY(t)?xu:o?s===gg?xu:bR:p?GY:HY}function EIe(t,e,r,n,i){t.dump=(function(){if(e.length===0)return t.quotingType===gg?'""':"''";if(!t.noCompatMode&&(lIe.indexOf(e)!==-1||uIe.test(e)))return t.quotingType===gg?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),a=n||t.flowLevel>-1&&r>=t.flowLevel;function c(l){return fIe(t,l)}switch(yIe(e,a,t.indent,o,c,t.quotingType,t.forceQuotes&&!n,i)){case qY:return e;case bR:return"'"+e.replace(/'/g,"''")+"'";case HY:return"|"+pY(e,t.indent)+gY(uY(e,s));case GY:return">"+pY(e,t.indent)+gY(uY(CIe(e,o),s));case xu:return'"'+IIe(e)+'"';default:throw new pn("impossible error: invalid scalar style")}})()}function pY(t,e){var r=UY(t)?String(e):"",n=t[t.length-1]===`
|
||||
`,i=n&&(t[t.length-2]===`
|
||||
`||t===`
|
||||
`),s=i?"+":n?"":"-";return r+s+`
|
||||
`}function gY(t){return t[t.length-1]===`
|
||||
`?t.slice(0,-1):t}function CIe(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var l=t.indexOf(`
|
||||
`);return l=l!==-1?l:t.length,r.lastIndex=l,fY(t.slice(0,l),e)})(),i=t[0]===`
|
||||
`||t[0]===" ",s,o;o=r.exec(t);){var a=o[1],c=o[2];s=c[0]===" ",n+=a+(!i&&!s&&c!==""?`
|
||||
`:"")+fY(c,e),i=s}return n}function fY(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,s,o=0,a=0,c="";n=r.exec(t);)a=n.index,a-i>e&&(s=o>i?o:a,c+=`
|
||||
`+t.slice(i,s),i=s+1),o=a;return c+=`
|
||||
`,t.length-i>e&&o>i?c+=t.slice(i,o)+`
|
||||
`+t.slice(o+1):c+=t.slice(i),c.slice(1)}function IIe(t){for(var e="",r=0,n,i=0;i<t.length;r>=65536?i+=2:i++)r=Ag(t,i),n=$r[r],!n&&fg(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||dIe(r);return e}function BIe(t,e,r){var n="",i=t.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1)a=r[s],t.replacer&&(a=t.replacer.call(r,String(s),a)),(wo(t,e,a,!1,!1)||typeof a>"u"&&wo(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function mY(t,e,r,n){var i="",s=t.tag,o,a,c;for(o=0,a=r.length;o<a;o+=1)c=r[o],t.replacer&&(c=t.replacer.call(r,String(o),c)),(wo(t,e+1,c,!0,!0,!1,!0)||typeof c>"u"&&wo(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=BR(t,e)),t.dump&&pg===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=s,t.dump=i||"[]"}function bIe(t,e,r){var n="",i=t.tag,s=Object.keys(r),o,a,c,l,u;for(o=0,a=s.length;o<a;o+=1)u="",n!==""&&(u+=", "),t.condenseFlow&&(u+='"'),c=s[o],l=r[c],t.replacer&&(l=t.replacer.call(r,c,l)),wo(t,e,c,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),wo(t,e,l,!1,!1)&&(u+=t.dump,n+=u));t.tag=i,t.dump="{"+n+"}"}function wIe(t,e,r,n){var i="",s=t.tag,o=Object.keys(r),a,c,l,u,A,p;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new pn("sortKeys must be a boolean or a function");for(a=0,c=o.length;a<c;a+=1)p="",(!n||i!=="")&&(p+=BR(t,e)),l=o[a],u=r[l],t.replacer&&(u=t.replacer.call(r,l,u)),wo(t,e+1,l,!0,!0,!0)&&(A=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,A&&(t.dump&&pg===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,A&&(p+=BR(t,e)),wo(t,e+1,u,!0,A)&&(t.dump&&pg===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,i+=p));t.tag=s,t.dump=i||"{}"}function hY(t,e,r){var n,i,s,o,a,c;for(i=r?t.explicitTypes:t.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(c=t.styleMap[a.tag]||a.defaultStyle,PY.call(a.represent)==="[object Function]")n=a.represent(e,c);else if(DY.call(a.represent,c))n=a.represent[c](e,c);else throw new pn("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');t.dump=n}return!0}return!1}function wo(t,e,r,n,i,s,o){t.tag=null,t.dump=r,hY(t,r,!1)||hY(t,r,!0);var a=PY.call(t.dump),c=n,l;n&&(n=t.flowLevel<0||t.flowLevel>e);var u=a==="[object Object]"||a==="[object Array]",A,p;if(u&&(A=t.duplicates.indexOf(r),p=A!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(i=!1),p&&t.usedDuplicates[A])t.dump="*ref_"+A;else{if(u&&p&&!t.usedDuplicates[A]&&(t.usedDuplicates[A]=!0),a==="[object Object]")n&&Object.keys(t.dump).length!==0?(wIe(t,e,t.dump,i),p&&(t.dump="&ref_"+A+t.dump)):(bIe(t,e,t.dump),p&&(t.dump="&ref_"+A+" "+t.dump));else if(a==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?mY(t,e-1,t.dump,i):mY(t,e,t.dump,i),p&&(t.dump="&ref_"+A+t.dump)):(BIe(t,e,t.dump),p&&(t.dump="&ref_"+A+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&EIe(t,t.dump,e,s,c);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new pn("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(l=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",t.dump=l+" "+t.dump)}return!0}function QIe(t,e){var r=[],n=[],i,s;for(wR(t,r,n),i=0,s=n.length;i<s;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(s)}function wR(t,e,r){var n,i,s;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,s=t.length;i<s;i+=1)wR(t[i],e,r);else for(n=Object.keys(t),i=0,s=n.length;i<s;i+=1)wR(t[n[i]],e,r)}function NIe(t,e){e=e||{};var r=new gIe(e);r.noRefs||QIe(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),wo(r,0,n,!0,!0)?r.dump+`
|
||||
`:""}var SIe=NIe,RIe={dump:SIe};function xR(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var Pu=TY.load,RYe=TY.loadAll,zY=RIe.dump,jY=pn;var xYe=xR("safeLoad","load"),_Ye=xR("safeLoadAll","loadAll"),vYe=xR("safeDump","dump");var ls=xt(fa());var YY="3.21",JY="3.16";function TYe(t){return JSON.parse(t)}function lE(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function PYe(t){return Array.isArray(t)}function uE(t){return typeof t=="string"}function DYe(t){return t===void 0||uE(t)}var OYe={validate:uE,required:!0};function LYe(t){return{validate:e=>e==null||t.validate(e),required:!1}}function kYe(t,e){for(let[r,n]of Object.entries(t)){let i=r in e;if(n.required&&!i||n.required&&(e[r]===void 0||e[r]===null)||i&&!n.validate(e[r]))return!1}return!0}var vR="base-database-oids.json",_Ie=["0.0.0-20211207"],DR="https://github.com",UYe="debug-artifacts",qYe="db",vIe=.05,WY=1024*1024;function HYe(){let t="CODEQL_ACTION_EXTRA_OPTIONS",e=process.env[t];if(e===void 0||e.length===0)return{};try{return Pu(e)}catch(r){let n=GIe(r);throw new Ne(`${t} environment variable is set, but does not contain valid JSON: ${n.message}`)}}function TIe(t,e){let r=1024*(e==="win32"?1.5:1),n=PIe()*Math.max(t-8*1024,0);return r+n}function PIe(){let t=Number.parseInt(process.env.CODEQL_ACTION_SCALING_RESERVED_RAM_PERCENTAGE||"",10);return t<0||t>100||Number.isNaN(t)?vIe:t/100}function DIe(t,e,r){let n;if(t){if(n=Number(t),Number.isNaN(n)||n<=0)throw new Ne(`Invalid RAM setting "${t}", specified.`)}else{let i=e/1048576,s=TIe(i,r);n=i-s}return Math.floor(n)}function OIe(t){let e=[No.totalmem()];No.platform()==="linux"&&e.push(...["/sys/fs/cgroup/memory/memory.limit_in_bytes","/sys/fs/cgroup/memory.max"].map(n=>LIe(n,t)).filter(n=>n!==void 0).map(n=>n));let r=Math.min(...e);return t.debug(`While resolving RAM, determined that the total memory available to the Action is ${r/(1024*1024)} MiB.`),r}function LIe(t,e){if(!Qr.existsSync(t)){e.debug(`While resolving RAM, did not find a cgroup memory limit at ${t}.`);return}let r=Number(Qr.readFileSync(t,"utf8"));if(!Number.isInteger(r)){e.debug(`While resolving RAM, ignored the file ${t} that may contain a cgroup memory limit as this file did not contain an integer.`);return}let n=`${Math.floor(r/(1024*1024))} MiB`;if(r>No.totalmem()){e.debug(`While resolving RAM, ignored the file ${t} that may contain a cgroup memory limit as its contents ${n} were greater than the total amount of system memory.`);return}if(r<WY){e.info(`While resolving RAM, ignored a cgroup limit of ${n} in ${t} as it was below ${WY/(1024*1024)} MiB.`);return}return e.info(`While resolving RAM, found a cgroup limit of ${n} in ${t}.`),r}function OR(t,e){return DIe(t,OIe(e),process.platform)}function GYe(t,e){return`--ram=${OR(t,e)}`}function kIe(t,e){let r,n=[No.cpus().length];No.platform()==="linux"&&(n.push(...["/sys/fs/cgroup/cpuset.cpus.effective","/sys/fs/cgroup/cpuset.cpus"].map(s=>FIe(s,e)).filter(s=>s!==void 0&&s>0).map(s=>s)),n.push(...["/sys/fs/cgroup/cpu.max"].map(s=>MIe(s,e)).filter(s=>s!==void 0&&s>0).map(s=>s)));let i=Math.min(...n);if(t){if(r=Number(t),Number.isNaN(r))throw new Ne(`Invalid threads setting "${t}", specified.`);r>i&&(e.info(`Clamping desired number of threads (${r}) to max available (${i}).`),r=i);let s=-i;r<s&&(e.info(`Clamping desired number of free threads (${r}) to max available (${s}).`),r=s)}else r=i;return r}function MIe(t,e){if(!Qr.existsSync(t)){e.debug(`While resolving threads, did not find a cgroup CPU file at ${t}.`);return}let n=Qr.readFileSync(t,"utf-8").split(" ");if(n.length!==2){e.debug(`While resolving threads, did not use cgroup CPU file at ${t} because it contained ${n.length} value(s) rather than the two expected.`);return}let i=n[0];if(i==="max")return;let s=n[1],o=Math.floor(parseInt(i)/parseInt(s));return e.info(`While resolving threads, found a cgroup CPU file with ${o} CPUs in ${t}.`),o}function FIe(t,e){if(!Qr.existsSync(t)){e.debug(`While resolving threads, did not find a cgroup CPUs file at ${t}.`);return}let r=0,n=Qr.readFileSync(t,"utf-8").trim();if(n.length!==0){for(let i of n.split(","))if(!i.includes("-"))++r;else{let s=parseInt(i.split("-")[0]),o=parseInt(i.split("-")[1]);r+=o-s+1}return e.info(`While resolving threads, found a cgroup CPUs file with ${r} CPUs in ${t}.`),r}}function zYe(t,e){return`--threads=${kIe(t,e)}`}function Du(t,e){return Qo.resolve(t.dbLocation,e)}function jYe(t,e){return Qo.resolve(t.dbLocation,e,"temp","config-queries.qls")}function ZY(t){let e=t;if(t.indexOf("://")===-1&&(t=`https://${t}`),!t.startsWith("http://")&&!t.startsWith("https://"))throw new Ne(`"${e}" is not a http or https URL`);let r;try{r=new URL(t)}catch{throw new Ne(`"${e}" is not a valid URL`)}return r.hostname==="github.com"||r.hostname==="api.github.com"?DR:(r.pathname.indexOf("/api/v3")!==-1&&(r.pathname=r.pathname.substring(0,r.pathname.indexOf("/api/v3"))),r.hostname.s
Line truncated
|
||||
`).pop()?.trim()||"n/a");super(`Failed to run "${a}". Exit code was ${i} and last log line was: ${c} See the logs for more details.`);this.cmd=r;this.args=n;this.exitCode=i;this.stderr=s;this.stdout=o}cmd;args;exitCode;stderr;stdout};function JIe(t){return t[t.length-1]==="."?t:`${t}.`}var aJ=2e4;async function fJe(t,e=[],r={}){let n="",i="";r.noStreamStdout||process.stdout.write(`[command]${t} ${e.join(" ")}
|
||||
`);let s=await new FR.ToolRunner(t,e,{ignoreReturnCode:!0,listeners:{stdout:o=>{n+=o.toString("utf8"),r.noStreamStdout||process.stdout.write(o)},stderr:o=>{let a=0;o.length-aJ>0&&(a=o.length-aJ+1),i+=o.toString("utf8",a),process.stdout.write(o)}},silent:!0,...r.stdin?{input:Buffer.from(r.stdin||"")}:{}}).exec();if(s!==0)throw new MR(t,e,s,i,n);return n}var pJ="persisted_inputs",mJe=function(){let t=Object.entries(process.env).filter(([e])=>e.startsWith("INPUT_"));Fr.saveState(pJ,JSON.stringify(t))},hJe=function(){let t=Fr.getState(pJ);if(t)for(let[e,r]of JSON.parse(t))process.env[e]=r};function qR(){let t=cJ.context.payload.pull_request;if(t)return{base:t.base.ref,head:t.head.label};let e=process.env.CODE_SCANNING_REF,r=process.env.CODE_SCANNING_BASE_BRANCH;if(e&&r)return{base:r,head:e}}function gJ(){return qR()!==void 0}var $Ie={"c#":"csharp",cpp:"c-cpp",c:"c-cpp","c++":"c-cpp",java:"java-kotlin",javascript:"javascript-typescript",typescript:"javascript-typescript",kotlin:"java-kotlin"};function fJ(t,e){if(e!==void 0&&UR()&&e.startsWith("/language:")){let r=e.substring(10),n=$Ie[r];if(n){let i=`/language:${n}`;return t.info(`Adjusted category for Code Quality from '${e}' to '${i}'.`),i}}return e}function CE(){return GR("GITHUB_REPOSITORY")}function GR(...t){let e=t.find(r=>process.env[r]);if(!e)throw new Ne(`None of the env vars ${t.join(", ")} are set`);return WIe(wt(e))}function WIe(t){let e=t.split("/");if(e.length!==2)throw new Ne(`"${t}" is not a valid repository name`);return{owner:e[0],repo:e[1]}}var ks=xt(Dt()),IE=xt(WS());var yJ=xt(mJ(),1);MS();var KIe="0.0.0-development";function XIe(t){return t.request!==void 0}async function hJ(t,e,r,n){if(!XIe(r)||!r?.request.request)throw r;if(r.status>=400&&!t.doNotRetry.includes(r.status)){let i=n.request.retries!=null?n.request.retries:t.retries,s=Math.pow((n.request.retryCount||0)+1,2);throw e.retry.retryRequest(r,i,s)}throw r}async function ZIe(t,e,r,n){let i=new yJ.default;return i.on("failed",function(s,o){let a=~~s.request.request?.retries,c=~~s.request.request?.retryAfter;if(n.request.retryCount=o.retryCount+1,a>o.retryCount)return c*t.retryAfterBaseValue}),i.schedule(eBe.bind(null,t,e,r),n)}async function eBe(t,e,r,n){let i=await r(n);if(i.data&&i.data.errors&&i.data.errors.length>0&&/Something went wrong while executing your query/.test(i.data.errors[0].message)){let s=new bo(i.data.errors[0].message,500,{request:n,response:i});return hJ(t,e,s,n)}return i}function VR(t,e){let r=Object.assign({enabled:!0,retryAfterBaseValue:1e3,doNotRetry:[400,401,403,404,410,422,451],retries:3},e.retry),n={retry:{retryRequest:(i,s,o)=>(i.request.request=Object.assign({},i.request.request,{retries:s,retryAfter:o}),i)}};return r.enabled&&(t.hook.error("request",hJ.bind(null,r,n)),t.hook.wrap("request",ZIe.bind(null,r,n))),n}VR.VERSION=KIe;var YR="x-github-enterprise-version",rBe=[400,410,422,451];function CJ(t,{allowExternal:e=!1}={}){let r=e&&t.externalRepoAuth||t.auth,n=IE.GitHub.plugin(VR);return new n(IE.getOctokitOptions(r,{baseUrl:t.apiURL,userAgent:`CodeQL-Action/${ku()}`,log:{debug:ks.debug,info:ks.info,warn:ks.warning,error:ks.error},retry:{doNotRetry:rBe}}))}function IJ(){return{auth:Eg("token"),url:wt("GITHUB_SERVER_URL"),apiURL:wt("GITHUB_API_URL")}}function us(){return CJ(IJ())}function BJ(t){return CJ(t,{allowExternal:!0})}function OJe(t,e,r){if(r.startsWith(`${e.url}/`)||e.apiURL&&r.startsWith(`${e.apiURL}/`))return t.debug("Providing an authorization token."),`token ${e.auth}`;t.debug("Not using an authorization token.")}var JR;async function nBe(t,e){if(ZY(e.url)===DR)return{type:"GitHub.com"};let r=await t.rest.meta.get();if(r.headers[YR]===void 0)return{type:"GitHub.com"};if(r.headers[YR]==="ghe.com")return{type:"GitHub Enterprise Cloud with data residency"};let n=r.headers[YR];return{type:"GitHub Enterprise Server",version:n}}async function bJ(){return JR===void 0&&(JR=await nBe(us(),IJ())),JR}async function iBe(){let t=CE(),e=Number(wt("GITHUB_RUN_ID")),r=us(),n=await r.request("GET /repos/:owner/:repo/actions/runs/:run_id?exclude_pull_requests=true",{owner:t.owner,repo:t.repo,run_id:e}),i=n.data.workflow_url;return!i||/\/repos\/[^/]+\/[^/]+\/actions\/required_workflows\/[^/]+/.test(i)?n.data.path:(await r.request(`GET ${i}`)).data.path}async function sBe(){let t=process.env.CODEQL_ACTION_ANALYSIS_KEY;if(t!==void 0)return t;let e=await iBe(),r=wt("GITHUB_JOB");return t=`${e}:${r}`,ks.exportVariable("CODEQL_ACTION_ANALYSIS_KEY",t),t}async function LJe(){let t=await sBe(),e=Eg("matrix");return oBe(t,e)}function oBe(t,e){let r=`${t}/`,n=rJ(e);if(n!==void 0)for(let i of Object.entries(n).sort())typeof i[1]=="string"?r+=`${i[0]}:${i[1]}/`:r+=`${i[0]}:/`;return r}async function wJ(t,e){let r=CE();return await us().paginate("GET /repos/{owner}/{repo}/actions/caches",{owner:r.owner,repo:r.repo,key:t,ref:e})}async function QJ(t){let e=CE();await us().rest.actions.deleteActionsCacheById({owner:e.owner,repo:e.repo,cache_id:t})}async function NJ(t){return uLine truncated
|
||||
`))a.startsWith("commit ")&&n===""?n=a.substring(7):a.startsWith("parent ")&&(i===""?i=a.substring(7):s===""&&(s=a.substring(7)));return n===e&&s.length===40&&i.length===40?i:void 0}catch{return}},lBe=function(t){return t.startsWith('"')&&t.endsWith('"')?(t=t.substring(1,t.length-1),t.replace(/\\([abfnrtv\\"]|[0-7]{1,3})/g,(e,r)=>{switch(r[0]){case"a":return"\x07";case"b":return"\b";case"f":return"\f";case"n":return`
|
||||
`;case"r":return"\r";case"t":return" ";case"v":return"\v";case"\\":return"\\";case'"':return'"';default:return String.fromCharCode(parseInt(r,8))}})):t},bg=async function(t){try{return(await Mc(t,["rev-parse","--show-toplevel"],`Cannot find Git repository root from the source root ${t}.`)).trim()}catch{return}};function KR(t){return _J.existsSync(vJ.join(t,".gitmodules"))}var XR=async function(t){let e=await bg(t),n=(e===void 0?!0:KR(e))?["ls-files","--recurse-submodules","--stage"]:["ls-files","--stage"],i=await Mc(t,n,"Cannot list Git OIDs of tracked files."),s={},o=/^[0-9]+ ([0-9a-f]{40}) [0-9]+\t(.+)$/;for(let a of i.split(`
|
||||
`))if(a){let c=a.match(o);if(c){let l=c[1],u=lBe(c[2]);s[u]=l}else throw new Error(`Unexpected "git ls-files" output: ${a}`)}return s};function LJ(){let t;try{t=wt("GITHUB_REF")}catch(e){let r=process.env.CODE_SCANNING_REF;if(r===void 0||r.length===0)throw e;t=r}return t}async function ZR(){let t=gn("ref"),e=gn("sha"),r=gn("checkout_path")||gn("source-root")||wt("GITHUB_WORKSPACE"),n=!!t,i=!!e;if((n||i)&&!(n&&i))throw new Ne("Both 'ref' and 'sha' are required if one of them is provided.");let s=t||LJ(),o=e||wt("GITHUB_SHA");if(t)return t;let a=/refs\/pull\/(\d+)\/merge/;if(!a.test(s))return s;let c=await RJ(r,"HEAD");if(o!==c&&await RJ(r,s.replace(/^refs\/pull\//,"refs/remotes/pull/"))!==c){let u=s.replace(a,"refs/pull/$1/head");return Bg.debug(`No longer on merge commit, rewriting ref from ${s} to ${u}.`),u}else return s}function xJ(t){return t.startsWith("refs/heads/")?t.slice(11):t}async function Fu(){if(process.env.CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH==="true")return!0;let t=await ZR();t=xJ(t);let r=uJ()?.repository?.default_branch;return Mu()==="schedule"&&(r=xJ(LJ())),t===r}async function uBe(t){return(await Mc(t,["ls-files"],"Unable to list tracked files.")).split(BE.EOL).filter(r=>r.trim().length>0)}async function kJ(t){let e=await uBe(t),r=await Mc(t,["check-attr","linguist-generated","--stdin"],"Unable to check attributes of files.",{input:Buffer.from(e.join(BE.EOL))}),n=[],i=/^([^:]+): linguist-generated: true$/;for(let s of r.split(BE.EOL)){let o=s.match(i);o&&o[1].trim().length>0&&n.push(o[1].trim())}return n}var MJ=xt(fa());function qJe(t,e){return!!t.features&&t.features[e]}var dBe="2.20.3";function HJe(t){return t?MJ.gte(t,dBe):!0}var wE=xt(fa());import*as Uu from"fs";import*as GJ from"path";var UJ="codeql-bundle-v2.25.4",ex="2.25.4";import*as Fc from"fs";import*as Uc from"path";var wg="2.23.8",tx="2.25.0",rx="2.24.1",nx="2.24.2",ix="2.23.8",sx="2.23.9",ox="2.23.9",ax="2.23.9";async function YJe(t,e){let r=await XR(e),n=JSON.stringify(r),i=gE(t);await Fc.promises.writeFile(i,n)}async function gBe(t,e){let r=gE(t);try{let n=await Fc.promises.readFile(r,"utf-8");return JSON.parse(n)}catch(n){throw e.error(`Failed to read overlay-base file OIDs from ${r}: ${n.message||n}`),n}}async function JJe(t,e,r){let n=await gBe(t,r),i=await XR(e),s=fBe(n,i);r.info(`Found ${s.length} changed file(s) under ${e} from OID comparison.`);let o=await mBe(e,r),a=[...new Set([...s,...o])],c=JSON.stringify({changes:a}),l=Uc.join(kc(),"overlay-changes.json");return r.debug(`Writing overlay changed files to ${l}: ${c}`),await Fc.promises.writeFile(l,c),l}function fBe(t,e){let r=[];for(let[n,i]of Object.entries(e))(!(n in t)||t[n]!==i)&&r.push(n);for(let n of Object.keys(t))n in e||r.push(n);return r}async function mBe(t,e){let r=Cg();if(!Fc.existsSync(r))return e.debug(`No diff ranges JSON file found at ${r}; skipping.`),[];let n;try{n=await Fc.promises.readFile(r,"utf8")}catch(a){return e.warning(`Failed to read diff ranges JSON file at ${r}: ${a}`),[]}let i;try{i=JSON.parse(n)}catch(a){return e.warning(`Failed to parse diff ranges JSON file at ${r}: ${a}`),[]}e.debug(`Read ${i.length} diff range(s) from ${r} for overlay changes.`);let s=await bg(t);if(s===void 0){if(gn("source-root"))throw new Error("Cannot determine git root to convert diff range paths relative to source-root. Failing to avoid omitting files from the analysis.");return e.warning("Cannot determine git root; returning diff range paths as-is."),[...new Set(i.map(a=>a.path))]}let o=i.map(a=>Uc.relative(t,Uc.join(s,a.path)).replaceAll(Uc.sep,"/")).filter(a=>!a.startsWith(".."));return[...new Set(o)]}var qJ="default_codeql_version_",HJ="_enabled",ZJe="2.19.0",zJ={cliVersion:ex,tagName:UJ};var jJ={allow_multiple_analysis_kinds:{defaultValue:!1,envVar:"CODEQL_ACTION_ALLOW_MULTIPLE_ANALYSIS_KINDS",minimumVersion:void 0},allow_toolcache_input:{defaultValue:!1,envVar:"CODEQL_ACTION_ALLOW_TOOLCACHE_INPUT",minimumVersion:void 0},cleanup_trap_caches:{defaultValue:!1,envVar:"CODEQL_ACTION_CLEANUP_TRAP_CACHES",minimumVersion:void 0},cpp_dependency_installation_enabled:{defaultValue:!1,envVar:"CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",legacyApi:!0,minimumVersion:"2.15.0"},csharp_cache_bmn:{defaultValue:!1,envVar:"CODEQL_ACTION_CSHARP_CACHE_BMN",minimumVersion:void 0},csharp_new_cache_key:{defaultValue:!1,envVar:"CODEQL_ACTION_CSHARP_NEW_CACHE_KEY",minimumVersion:void 0},diff_informed_queries:{defaultValue:!0,envVar:"CODEQL_ACTION_DIFF_INFORMED_QUERIES",minimumVersion:"2.21.0"},disable_csharp_buildless:{defaultValue:!1,envVar:"CODEQL_ACTION_DISABLE_CSHARP_BUILDLESS",minimumVersion:void 0},disable_java_buildless_enabled:{defaultValue:!1,envVar:"CODEQL_ACTION_DISABLE_JAVA_BUILDLESS",legacyApi:!0,minimumVersion:void 0},disable_kotlin_analysis_enabled:{defaultValue:!1,envVar:"CODEQL_DISABLE_KOTLIN_ANALYSIS",legacyApi:!0,minimumVersion:void 0},export_diagnostics_enabled:{defaultValue:!0,envVar:"CODEQL_ACTION_EXPORT_DIAGNOSTICS",legacyApi:!0,minimumVersion:voi
Line truncated
|
||||
${r}`)}function U$e(t){let e=Cg();if(!Gu.existsSync(e)){t.debug(`Diff ranges JSON file does not exist at ${e}`);return}let r=Gu.readFileSync(e,"utf8");t.debug(`Read pr-diff-range JSON file from ${e}:
|
||||
${r}`);try{return JSON.parse(r)}catch(n){t.warning(`Failed to parse diff ranges JSON file at ${e}: ${n}`);return}}async function q$e(t,e){let r=await MBe(t,e);if(r===void 0)return;if(r.length>=300){e.warning(`Cannot retrieve the full diff because there are too many (${r.length}) changed files in the pull request.`);return}let n=[];for(let i of r){let s=FBe(i,e);if(s===void 0)return;n.push(...s)}return n}async function MBe(t,e){let r=GR("CODE_SCANNING_REPOSITORY","GITHUB_REPOSITORY"),n=`${t.base}...${t.head}`;try{let i=await us().rest.repos.compareCommitsWithBasehead({owner:r.owner,repo:r.repo,basehead:n,per_page:1});return e.debug(`Response from compareCommitsWithBasehead(${n}):
|
||||
${JSON.stringify(i,null,2)}`),i.data.files}catch(i){if(i.status){e.warning(`Error retrieving diff ${n}: ${i.message}`),e.debug(`Error running compareCommitsWithBasehead(${n}):
|
||||
Request: ${JSON.stringify(i.request,null,2)}
|
||||
Error Response: ${JSON.stringify(i.response,null,2)}`);return}else throw i}}function FBe(t,e){if(t.patch===void 0)return t.changes===0?[]:[{path:t.filename,startLine:0,endLine:0}];let r=0,n,i=[],s=t.patch.split(`
|
||||
`);s.push(" ");for(let o of s)if(!o.startsWith("-")){if(o.startsWith("+")){n===void 0&&(n=r),r++;continue}if(n!==void 0&&(i.push({path:t.filename,startLine:n,endLine:r-1}),n=void 0),o.startsWith("@@ ")){let a=o.match(/^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/);if(a===null){e.warning(`Cannot parse diff hunk header for ${t.filename}: ${o}`);return}r=parseInt(a[1],10);continue}if(o.startsWith(" ")){r++;continue}}return i}var gx={languages:["actions","cpp","csharp","go","java","javascript","python","ruby","rust","swift"],aliases:{c:"cpp","c-c++":"cpp","c-cpp":"cpp","c#":"csharp","c++":"cpp","java-kotlin":"java","javascript-typescript":"javascript",kotlin:"java",typescript:"javascript"}};var fx=(u=>(u.actions="actions",u.cpp="cpp",u.csharp="csharp",u.go="go",u.java="java",u.javascript="javascript",u.python="python",u.ruby="ruby",u.rust="rust",u.swift="swift",u))(fx||{});var qBe=new Set(gx.languages);function HBe(t){return qBe.has(t)}function j$e(t){if(t=t.trim().toLowerCase(),t=gx.aliases[t]??t,HBe(t))return t}var E0=xt(fL());import*as y0 from"fs";import*as Am from"path";var ZHe=1,T6="codeql-trap",eGe=10,P6=12e4;async function D6(t,e,r){let n={},i=await rGe(t,e,r);if(r.info(`Found ${i.length} languages that support TRAP caching`),i.length===0)return n;let s=Am.join(kc(),"trapCaches");for(let c of i){let l=Am.join(s,c);y0.mkdirSync(l,{recursive:!0}),n[c]=l}if(await Fu())return r.info("Analyzing default branch. Skipping downloading of TRAP caches."),n;let o="unknown",a=process.env.GITHUB_EVENT_PATH;Mu()==="pull_request"&&a!==void 0&&(o=JSON.parse(y0.readFileSync(Am.resolve(a),"utf-8")).pull_request?.base?.sha||o);for(let c of e){let l=n[c];if(l===void 0)continue;let u=await O6(t,c,o);r.info(`Looking in Actions cache for TRAP cache with key ${u}`),await Lu(P6,E0.restoreCache([l],u,[await L6(t,c)]),()=>{r.info(`Timed out downloading cache for ${c}, will continue without it`)})===void 0&&(r.info(`No TRAP cache found in Actions cache for ${c}`),delete n[c])}return n}async function v5e(t,e,r){if(!await Fu())return!1;for(let n of e.languages){let i=e.trapCaches[n];if(i===void 0)continue;let s=await fE(i,r);if(s===void 0){r.info(`Skipping upload of TRAP cache for ${n} as we couldn't determine its size`);continue}if(s<eGe*1048576){r.info(`Skipping upload of TRAP cache for ${n} as it is too small`);continue}let o=await O6(t,n,process.env.GITHUB_SHA||"unknown");r.info(`Uploading TRAP cache to Actions cache with key ${o}`),await Lu(P6,E0.saveCache([i],o),()=>{r.info(`Timed out waiting for TRAP cache for ${n} to upload, will continue without uploading`)})}return!0}async function T5e(t,e,r){if(!await e.getValue("cleanup_trap_caches"))return{trap_cache_cleanup_skipped_because:"feature disabled"};if(r.warning("TRAP cache cleanup is deprecated and will be removed in May 2026. We recommend instead disabling TRAP caching by passing the `trap-caching: false` input to the `init` Action."),!await Fu())return{trap_cache_cleanup_skipped_because:"not analyzing default branch"};try{let n=0,i=await wJ(T6,await ZR());for(let s of t.languages)if(t.trapCaches[s]){let o=await tGe(i,s,r);o.sort((u,A)=>u.created_at.localeCompare(A.created_at));let a=o.pop();if(r.debug(`Keeping most recent TRAP cache (${JSON.stringify(a)})`),o.length===0){r.info(`No TRAP caches to clean up for ${s}.`);continue}for(let u of o)r.debug(`Cleaning up TRAP cache (${JSON.stringify(u)})`),await QJ(u.id);let c=o.reduce((u,A)=>u+A.size_in_bytes,0);n+=c;let l=(c/(1024*1024)).toFixed(2);r.info(`Cleaned up ${l} MiB of old TRAP caches for ${s}.`)}return{trap_cache_cleanup_size_bytes:n}}catch(n){return Ou(n)?.status===403?r.warning('Could not cleanup TRAP caches as the token did not have the required permissions. To clean up TRAP caches, ensure the token has the "actions:write" permission. See https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs for more information.'):r.info(`Failed to cleanup TRAP caches, continuing. Details: ${n}`),{trap_cache_cleanup_error:So(n)}}}async function tGe(t,e,r){r.debug(`Listing TRAP caches for ${e}`);for(let n of t)if(!n.created_at||!n.id||!n.key||!n.size_in_bytes)throw new Error(`An unexpected cache item was returned from the API that was missing one or more required fields: ${JSON.stringify(n)}`);return t.filter(n=>n.key?.includes(`-${e}-`))}async function rGe(t,e,r){let n=[],i=await t.betterResolveLanguages();e:for(let s of e){let o=i.extractors[s];if(o===void 0){r.info(`${s} does not support TRAP caching (couldn't find an extractor)`);continue}if(o.length!==1){r.info(`${s} does not support TRAP caching (found multiple extractors)`);continue}let c=o[0].extractor_options?.trap?.properties?.cache?.properties;if(c===void 0){r.info(`${s} does not support TRAP caching (missing option group)`);continue}for(let l of["dir","bound","write"])if(!(l in c)){r.info(`${s} does not support TRAP caching (missing ${l} option)`);continue e}n.push(s)}return n}async function O6(t,e,r){return`${await L6(t,e)}${r}`}async function L6(t,e){retur
Line truncated
|
||||
|
||||
Improved incremental analysis will be automatically retried when the next version of CodeQL is released. You can also manually trigger a retry by [removing](https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manage-caches#deleting-cache-entries) \`codeql-overlay-status-*\` entries from the Actions cache.`,severity:"note",visibility:{cliSummaryTable:!0,statusPage:!0,telemetry:!1}})),r==="disabled-by-repository-property"&&ya(t,RE("codeql-action/overlay-disabled-by-repository-property","Improved incremental analysis disabled by repository property",{attributes:{languages:t.languages},markdownMessage:"Improved incremental analysis has been disabled because the `github-codeql-disable-overlay` repository property is set to `true`. To re-enable improved incremental analysis, set this property to `false` or remove it.",severity:"note",visibility:{cliSummaryTable:!0,statusPage:!0,telemetry:!1}}))}var I0=xt(fL());import*as Bl from"fs";import*as dm from"path";var r7=3e4,uGe="overlay-status.json";function n7(t){return dm.join(kc(),"overlay-status",[...t].sort().join("+"),uGe)}function V5e(t,e){let r={workflowRunId:AJ(),workflowRunAttempt:dJ(),name:wt("GITHUB_JOB"),checkRunId:e};return{...t,job:r}}async function i7(t,e,r,n){let i=await AGe(t,e,r,n);return i===void 0?!1:i.attemptedToBuildOverlayBaseDatabase&&!i.builtOverlayBaseDatabase?(n.debug("Cached overlay status indicates that building an overlay base database was unsuccessful."),!0):(n.debug("Cached overlay status does not indicate a previous unsuccessful attempt to build an overlay base database."),!1)}async function AGe(t,e,r,n){let i=await s7(t,e,r),s=n7(e);try{if(await Bl.promises.mkdir(dm.dirname(s),{recursive:!0}),await Lu(r7,I0.restoreCache([s],i),()=>{n.warning("Timed out restoring overlay status from cache.")})===void 0){n.debug("No overlay status found in Actions cache.");return}if(!Bl.existsSync(s)){n.debug("Overlay status cache entry found but status file is missing.");return}let a=await Bl.promises.readFile(s,"utf-8"),c=JSON.parse(a);if(!lE(c)||typeof c.attemptedToBuildOverlayBaseDatabase!="boolean"||typeof c.builtOverlayBaseDatabase!="boolean"){n.debug("Ignoring overlay status cache entry with unexpected format.");return}return c}catch(o){n.warning(`Failed to restore overlay status from cache: ${So(o)}`);return}}async function Y5e(t,e,r,n,i){let s=await s7(t,e,r),o=n7(e);try{return await Bl.promises.mkdir(dm.dirname(o),{recursive:!0}),await Bl.promises.writeFile(o,JSON.stringify(n)),await Lu(r7,I0.saveCache([o],s),()=>{i.warning("Timed out saving overlay status to cache.")})===void 0?!1:(i.debug(`Saved overlay status to Actions cache with key ${s}`),!0)}catch(a){return i.warning(`Failed to save overlay status to cache: ${So(a)}`),!1}}async function s7(t,e,r){let n=`${10*Math.floor(r.numTotalBytes/10737418240)}GB`;return`codeql-overlay-status-${[...e].sort().join("+")}-${(await t.getVersion()).version}-runner-${n}`}var dGe=2e4,pGe=dGe*1e6,gGe=14e3,fGe=gGe*1e6,yL=5*1024,o7="2.24.3";async function mGe(t,e){let r=await t.supportsFeature("builtinExtractorsSpecifyDefaultQueries"),n=await t.betterResolveLanguages({filterToLanguagesWithQueries:r});r&&e.debug(`The CodeQL CLI supports the following languages: ${Object.keys(n.extractors).join(", ")}`);let i={};for(let s of Object.keys(n.extractors))(r||fx[s]!==void 0)&&(i[s]=s);if(n.aliases)for(let[s,o]of Object.entries(n.aliases))i[s]=o;return i}var hGe=".github/workflows";function yGe(t){let e=Ai.resolve(t,hGe),r=on.lstatSync(e,{throwIfNoEntry:!1});return r!==void 0&&r.isDirectory()&&on.readdirSync(e).length>0}async function EGe(t,e,r){r.debug(`Automatically detecting languages (${t.owner}/${t.repo})`);let n=await us().rest.repos.listLanguages({owner:t.owner,repo:t.repo});r.debug(`Languages API response: ${JSON.stringify(n)}`);let i=Object.keys(n.data).map(s=>s.trim().toLowerCase());return yGe(e)&&(r.debug("Found a .github/workflows directory"),i.push("actions")),r.debug(`Raw languages in repository: ${i.join(", ")}`),i}async function CGe(t,e,r,n,i){let{rawLanguages:s,autodetected:o}=await BGe(e,r,n,i),a=await mGe(t,i),c=new Set,l=[];for(let A of s){let p=a[A];p===void 0?l.push(A):c.add(p)}let u=Array.from(c);if(!o&&l.length>0)throw new Ne(Y6(l));if(u.length===0)throw new Ne(V6());return o?i.info(`Autodetected languages: ${u.join(", ")}`):i.info(`Languages from configuration: ${u.join(", ")}`),u}function IGe(t){return(t||"").split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0)}async function BGe(t,e,r,n){let i=IGe(t);return i.length>0?{rawLanguages:i,autodetected:!1}:{rawLanguages:await EGe(e,r,n),autodetected:!0}}async function bGe({languagesInput:t,queriesInput:e,packsInput:r,buildModeInput:n,dbLocation:i,dependencyCachingEnabled:s,debugMode:o,debugArtifactName:a,debugDatabaseName:c,repository:l,tempDir:u,codeql:A,sourceRoot:p,githubVersion:m,features:y,repositoryProperties:b,analysisKinds:x,logger:S,enableFileCoverageInformation:R},P){let G=await CGe(A,t,l,p,S),oe=await qGe(n,G,y,S)
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
undici/lib/web/fetch/body.js:
|
||||
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
||||
|
||||
undici/lib/web/websocket/frame.js:
|
||||
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
||||
|
||||
@octokit/request-error/dist-src/index.js:
|
||||
(* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist *)
|
||||
|
||||
@octokit/request/dist-bundle/index.js:
|
||||
(* v8 ignore next -- @preserve *)
|
||||
(* v8 ignore else -- @preserve *)
|
||||
|
||||
js-yaml/dist/js-yaml.mjs:
|
||||
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
||||
*/
|
||||
@@ -0,0 +1,154 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{b as $y}from"./chunk-5ZRYQL45.js";import{d as zy}from"./chunk-GX7WDUZJ.js";import{$ as Wf,Ab as Ol,G as Nf,Na as MF,Ob as qF,Sb as GF,Tb as Ye,U as My,Ub as NF,X as qy,_ as jf,a as D,b as y,c as Rl,d as By,e as Gf,f as Uy,fa as nn,g as LF,hb as jy,ib as Wy,k as ot,r as Ly,sa as Gy,ta as Ny}from"./chunk-V6LGBXSF.js";var Ai=y(We=>{"use strict";var jF=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(We,"__esModule",{value:!0});We.getMaxArtifactListCount=We.getUploadChunkTimeout=We.getConcurrency=We.getGitHubWorkspaceDir=We.isGhes=We.getResultsServiceUrl=We.getRuntimeToken=We.getUploadChunkSize=void 0;var WF=jF(D("os")),Hy=ot();function $F(){return 8*1024*1024}We.getUploadChunkSize=$F;function zF(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}We.getRuntimeToken=zF;function HF(){let t=process.env.ACTIONS_RESULTS_URL;if(!t)throw new Error("Unable to get the ACTIONS_RESULTS_URL env variable");return new URL(t).origin}We.getResultsServiceUrl=HF;function VF(){let e=new URL(process.env.GITHUB_SERVER_URL||"https://github.com").hostname.trimEnd().toUpperCase(),r=e==="GITHUB.COM",i=e.endsWith(".GHE.COM"),n=e.endsWith(".LOCALHOST");return!r&&!i&&!n}We.isGhes=VF;function JF(){let t=process.env.GITHUB_WORKSPACE;if(!t)throw new Error("Unable to get the GITHUB_WORKSPACE env variable");return t}We.getGitHubWorkspaceDir=JF;function YF(){let t=WF.default.cpus().length,e=32;if(t>4){let i=16*t;e=i>300?300:i}let r=process.env.ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY;if(r){let i=parseInt(r);if(isNaN(i)||i<1)throw new Error("Invalid value set for ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY env variable");return i<e?((0,Hy.info)("Set concurrency based on the value set in ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY."),i):((0,Hy.info)(`ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY is higher than the cap of ${e} based on the number of cpus. Set it to the maximum value allowed.`),e)}return 5}We.getConcurrency=YF;function KF(){let t=process.env.ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS;if(!t)return 3e5;let e=parseInt(t);if(isNaN(e))throw new Error("Invalid value set for ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS env variable");return e}We.getUploadChunkTimeout=KF;function ZF(){let t=process.env.ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT||"1000",e=parseInt(t);if(isNaN(e)||e<1)throw new Error("Invalid value set for ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT env variable");return e}We.getMaxArtifactListCount=ZF});var zf=y(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.Timestamp=void 0;var Vy=Ye(),Jy=Ye(),QF=Ye(),XF=Ye(),ex=Ye(),wo=Ye(),tx=Ye(),$f=class extends tx.MessageType{constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){let e=this.create(),r=Date.now();return e.seconds=wo.PbLong.from(Math.floor(r/1e3)).toString(),e.nanos=r%1e3*1e6,e}toDate(e){return new Date(wo.PbLong.from(e.seconds).toNumber()*1e3+Math.ceil(e.nanos/1e6))}fromDate(e){let r=this.create(),i=e.getTime();return r.seconds=wo.PbLong.from(Math.floor(i/1e3)).toString(),r.nanos=i%1e3*1e6,r}internalJsonWrite(e,r){let i=wo.PbLong.from(e.seconds).toNumber()*1e3;if(i<Date.parse("0001-01-01T00:00:00Z")||i>Date.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(e.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let n="Z";if(e.nanos>0){let s=(e.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?n="."+s.substring(0,3)+"Z":s.substring(6)==="000"?n="."+s.substring(0,6)+"Z":n="."+s+"Z"}return new Date(i).toISOString().replace(".000Z",n)}internalJsonRead(e,r,i){if(typeof e!="string")throw new Error("Unable to parse Timestamp from JSON "+(0,ex.typeofJsonValue)(e)+".");let n=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!n)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let s=Date.parse(n[1]+"-"+n[2]+"-"+n[3]+"T"+n[4]+":"+n[5]+":"+n[6]+(n[8]?n[8]:"Z"));if(Number.isNaN(s))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");return i||(i=this.create()),i.seconds=wo.PbLong.from(s/1e3).toString(),i.nanos=0,n[7]&&(i.nanos=parseInt("1"+n[7]+"0".repeat(9-n[7].length))-1e9),i}create(e){let r={seconds:"0",nanos:0};return globalThis.Object.defineProperty(r,XF.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,QF.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,i,n){let s=n??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,u]=e.tag();switch(a){case 1:s.seconds=e.int64().toString();break;case 2:s.nanos=e.int32();brLine truncated
|
||||
`," Line feed \\n"]]),Qy=new Map([...bd,["\\"," Backslash \\"],["/"," Forward slash /"]]);function dx(t){if(!t)throw new Error("Provided artifact name input during validation is empty");for(let[e,r]of Qy)if(t.includes(e))throw new Error(`The artifact name is not valid: ${t}. Contains the following character: ${r}
|
||||
|
||||
Invalid characters include: ${Array.from(Qy.values()).toString()}
|
||||
|
||||
These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);(0,fx.info)("Artifact name is valid!")}zn.validateArtifactName=dx;function hx(t){if(!t)throw new Error("Provided file path input during validation is empty");for(let[e,r]of bd)if(t.includes(e))throw new Error(`The path for one of the files in artifact is not valid: ${t}. Contains the following character: ${r}
|
||||
|
||||
Invalid characters include: ${Array.from(bd.values()).toString()}
|
||||
|
||||
The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.
|
||||
`)}zn.validateFilePath=hx});var Xy=y((RX,px)=>{px.exports={name:"@actions/artifact",version:"5.0.3",preview:!0,description:"Actions artifact lib",keywords:["github","actions","artifact"],homepage:"https://github.com/actions/toolkit/tree/main/packages/artifact",license:"MIT",main:"lib/artifact.js",types:"lib/artifact.d.ts",directories:{lib:"lib",test:"__tests__"},files:["lib","!.DS_Store"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/actions/toolkit.git",directory:"packages/artifact"},scripts:{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json",test:"cd ../../ && npm run test ./packages/artifact",bootstrap:"cd ../../ && npm run bootstrap","tsc-run":"tsc",tsc:"npm run bootstrap && npm run tsc-run","gen:docs":"typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"},bugs:{url:"https://github.com/actions/toolkit/issues"},dependencies:{"@actions/core":"^2.0.0","@actions/github":"^6.0.1","@actions/http-client":"^3.0.2","@azure/storage-blob":"^12.29.1","@octokit/core":"^5.2.1","@octokit/plugin-request-log":"^1.0.4","@octokit/plugin-retry":"^3.0.9","@octokit/request":"^8.4.1","@octokit/request-error":"^5.1.1","@protobuf-ts/plugin":"^2.2.3-alpha.1",archiver:"^7.0.1","jwt-decode":"^3.1.2","unzip-stream":"^0.3.1"},devDependencies:{"@types/archiver":"^5.3.2","@types/unzip-stream":"^0.3.4",typedoc:"^0.28.13","typedoc-plugin-markdown":"^3.17.1",typescript:"^5.2.2"},overrides:{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}});var Hn=y(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.getUserAgentString=void 0;var gx=Xy();function mx(){return`@actions/artifact-${gx.version}`}Cl.getUserAgentString=mx});var li=y(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.UsageError=Mt.NetworkError=Mt.GHESNotSupportedError=Mt.ArtifactNotFoundError=Mt.InvalidResponseError=Mt.FilesNotFoundError=void 0;var vd=class extends Error{constructor(e=[]){let r="No files were found to upload";e.length>0&&(r+=`: ${e.join(", ")}`),super(r),this.files=e,this.name="FilesNotFoundError"}};Mt.FilesNotFoundError=vd;var Sd=class extends Error{constructor(e){super(e),this.name="InvalidResponseError"}};Mt.InvalidResponseError=Sd;var Td=class extends Error{constructor(e="Artifact not found"){super(e),this.name="ArtifactNotFoundError"}};Mt.ArtifactNotFoundError=Td;var Ad=class extends Error{constructor(e="@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES."){super(e),this.name="GHESNotSupportedError"}};Mt.GHESNotSupportedError=Ad;var Fl=class extends Error{constructor(e){let r=`Unable to make request: ${e}
|
||||
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};Mt.NetworkError=Fl;Fl.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var xl=class extends Error{constructor(){super(`Artifact storage quota has been hit. Unable to upload any new artifacts. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Mt.UsageError=xl;xl.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var iw=y((PX,rw)=>{"use strict";function Od(t){this.message=t}Od.prototype=new Error,Od.prototype.name="InvalidCharacterError";var ew=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new Od("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,n=0,s=0,o="";i=e.charAt(s++);~i&&(r=n%4?64*r+i:i,n++%4)?o+=String.fromCharCode(255&r>>(-2*n&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function _x(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return(function(r){return decodeURIComponent(ew(r).replace(/(.)/g,(function(i,n){var s=n.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s})))})(e)}catch{return ew(e)}}function bo(t){this.message=t}function tw(t,e){if(typeof t!="string")throw new bo("Invalid token specified");var r=(e=e||{}).header===!0?0:1;try{return JSON.parse(_x(t.split(".")[r]))}catch(i){throw new bo("Invalid token specified: "+i.message)}}bo.prototype=new Error,bo.prototype.name="InvalidTokenError";var Rd=tw;Rd.default=tw,Rd.InvalidTokenError=bo,rw.exports=Rd});var sn=y(_t=>{"use strict";var yx=_t&&_t.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),wx=_t&&_t.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bx=_t&&_t.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&yx(e,t,r);return wx(e,t),e},Ex=_t&&_t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_t,"__esModule",{value:!0});_t.maskSecretUrls=_t.maskSigUrl=_t.getBackendIdsFromToken=void 0;var nw=bx(ot()),vx=Ai(),Sx=Ex(iw()),Ul=ot(),Bl=new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims");function Tx(){let t=(0,vx.getRuntimeToken)(),e=(0,Sx.default)(t);if(!e.scp)throw Bl;let r=e.scp.split(" ");if(r.length===0)throw Bl;for(let i of r){let n=i.split(":");if(n?.[0]!=="Actions.Results")continue;if(n.length!==3)throw Bl;let s={workflowRunBackendId:n[1],workflowJobRunBackendId:n[2]};return nw.debug(`Workflow Run Backend ID: ${s.workflowRunBackendId}`),nw.debug(`Workflow Job Run Backend ID: ${s.workflowJobRunBackendId}`),s}throw Bl}_t.getBackendIdsFromToken=Tx;function Dd(t){if(t)try{let r=new URL(t).searchParams.get("sig");r&&((0,Ul.setSecret)(r),(0,Ul.setSecret)(encodeURIComponent(r)))}catch(e){(0,Ul.debug)(`Failed to parse URL: ${t} ${e instanceof Error?e.message:String(e)}`)}}_t.maskSigUrl=Dd;function Ax(t){if(typeof t!="object"||t===null){(0,Ul.debug)("body is not an object or is null");return}"signed_upload_url"in t&&typeof t.signed_upload_url=="string"&&Dd(t.signed_upload_url),"signed_url"in t&&typeof t.signed_url=="string"&&Dd(t.signed_url)}_t.maskSecretUrls=Ax});var Kn=y(Yn=>{"use strict";var Ll=Yn&&Yn.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):n(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.internalArtifactTwirpClient=void 0;var Vn=Uy(),Rx=LF(),Jn=ot(),Ox=Ri(),sw=Ai(),Dx=Hn(),Eo=li(),Px=sn(),Pd=class{constructor(e,r,i,n){this.maxAttempts=5,this.baseRetryIntervalMilliseconds=3e3,this.retryMultiplier=1.5;let s=(0,sw.getRuntimeToken)();this.baseUrl=(0,sw.getResultsServiceUrl)(),r&&(this.maxAttempts=r),i&&(this.baseRetryIntervalMilliseconds=i),n&&(this.retryMultiplier=n),this.httpClient=new Vn.HttpClient(e,[new Rx.BearerCredentialHandler(s)])}request(e,r,i,n){return Ll(this,void 0,void 0,function*(){let s=new URL(`/twirp/${e}/${r}`,this.baseUrl).href;(0,Jn.debug)(`[Request] ${r} ${s}`);let o={"Content-Type":i};try{let{body:a}=yield this.retryableRequest(()=>Ll(this,void 0,void 0,function*(){return this.httpClient.post(s,JSON.stringify(n),o)}));return a}catch(a){throw new Error(`Failed to ${r}: ${a.message}`)}})}retryableRequest(e){return Ll(this,void 0,void 0,function*(){let r=0,i="",n="";for(;r<this.maxAttempts;){let s=!1;try{let a=yield e(),u=a.message.statusCode;n=yield a.readBody(),(0,Jn.debug)
Line truncated
|
||||
%s`,P,P,b,n);let L=b.type==="*"?Bd:b.type==="?"?Md:"\\"+b.type;s=!0,n=n.slice(0,b.reStart)+L+"\\("+P}C(),o&&(n+="\\\\");let G=eB[n.charAt(0)];for(let P=u.length-1;P>-1;P--){let L=u[P],R=n.slice(0,L.reStart),B=n.slice(L.reStart,L.reEnd-8),U=n.slice(L.reEnd),Y=n.slice(L.reEnd-8,L.reEnd)+U,se=R.split(")").length,fe=R.split("(").length-se,Ee=U;for(let me=0;me<fe;me++)Ee=Ee.replace(/\)[+*?]?/,"");U=Ee;let ge=U===""&&r!==Ud?"(?:$|\\/)":"";n=R+B+U+ge+Y}if(n!==""&&s&&(n="(?=.)"+n),G&&(n=T()+n),r===Ud)return[n,s];if(i.nocase&&!s&&(s=e.toUpperCase()!==e.toLowerCase()),!s)return rB(e);let X=i.nocase?"i":"";try{return Object.assign(new RegExp("^"+n+"$",X),{_glob:e,_src:n})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?Bd:r.dot?Qx:Xx,n=r.nocase?"i":"",s=e.map(o=>(o=o.map(a=>typeof a=="string"?nB(a):a===kt?kt:a._src).reduce((a,u)=>(a[a.length-1]===kt&&u===kt||a.push(u),a),[]),o.forEach((a,u)=>{a!==kt||o[u-1]===kt||(u===0?o.length>1?o[u+1]="(?:\\/|"+i+"\\/)?"+o[u+1]:o[u]=i:u===o.length-1?o[u-1]+="(?:\\/|"+i+")?":(o[u-1]+="(?:\\/|\\/"+i+"\\/)"+o[u+1],o[u+1]=kt))}),o.filter(a=>a!==kt).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;Ld.sep!=="/"&&(e=e.split(Ld.sep).join("/")),e=e.split(Sw),this.debug(this.pattern,"split",e);let n=this.set;this.debug(this.pattern,"set",n);let s;for(let o=e.length-1;o>=0&&(s=e[o],!s);o--);for(let o=0;o<n.length;o++){let a=n[o],u=e;if(i.matchBase&&a.length===1&&(u=[s]),this.matchOne(u,a,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return Kt.defaults(e).Minimatch}};Kt.Minimatch=Qn});var Iw=y((MX,kw)=>{kw.exports=Pw;var Nd=D("fs"),{EventEmitter:oB}=D("events"),{Minimatch:Gd}=Rw(),{resolve:aB}=D("path");function lB(t,e){return new Promise((r,i)=>{Nd.readdir(t,{withFileTypes:!0},(n,s)=>{if(n)switch(n.code){case"ENOTDIR":e?i(n):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:i(n);break}else r(s)})})}function Ow(t,e){return new Promise((r,i)=>{(e?Nd.stat:Nd.lstat)(t,(s,o)=>{s?s.code==="ENOENT"?r(e?Ow(t,!1):null):r(null):r(o)})})}async function*Dw(t,e,r,i,n,s){let o=await lB(e+t,s);for(let a of o){let u=a.name;u===void 0&&(u=a,i=!0);let l=t+"/"+u,c=l.slice(1),f=e+"/"+c,d=null;(i||r)&&(d=await Ow(f,r)),!d&&a.name!==void 0&&(d=a),d===null&&(d={isDirectory:()=>!1}),d.isDirectory()?n(c)||(yield{relative:c,absolute:f,stats:d},yield*Dw(l,e,r,i,n,!1)):yield{relative:c,absolute:f,stats:d}}}async function*uB(t,e,r,i){yield*Dw("",t,e,r,i,!0)}function cB(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var Gl=class extends oB{constructor(e,r,i){if(super(),typeof r=="function"&&(i=r,r=null),this.options=cB(r||{}),this.matchers=[],this.options.pattern){let n=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=n.map(s=>new Gd(s,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let n=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=n.map(s=>new Gd(s,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let n=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=n.map(s=>new Gd(s,{dot:!0}))}this.iterator=uB(aB(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,i&&(this._matches=[],this.on("match",n=>this._matches.push(this.options.absolute?n.absolute:n.relative)),this.on("error",n=>i(n)),this.on("end",()=>i(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let i=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(n=>n.match(i)))&&!this.ignoreMatchers.some(n=>n.match(i))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let i=e.value.relative,n=e.value.absolute;this.options.mark&&r&&(i+="/",n+="/"),this.options.stat?this.emit("match",{relative:i,absolute:n,stat:e.value.stats}):this.emit("match",{relative:i,absolute:n})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit("error",e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive=!0}abort(){this.aborted=!0}pause(){
Line truncated
|
||||
`,w);w=A===-1?m.length:A}else if(S!==-1&&m[w]==="/"&&m[w+1]==="*"){let A=m.indexOf("*/",w);A!==-1?(w=A+2,S=m.indexOf("*/",w)):(p+=m[w],w++)}else p+=m[w],w++;return p}function KC(m){let p=YC(m.toString()),w=p.match(zC);if(w||(w=p.match(HC)),!w)throw new Error(`could not parse args in autoInject
|
||||
Source:
|
||||
`+p);let[,S]=w;return S.replace(/\s/g,"").split(VC).map(A=>A.replace(JC,"").trim())}function Y_(m,p){var w={};return Object.keys(m).forEach(S=>{var A=m[S],O,k=h(A),I=!k&&A.length===1||k&&A.length===0;if(Array.isArray(A))O=[...A],A=O.pop(),w[S]=O.concat(O.length>0?x:A);else if(I)w[S]=A;else{if(O=KC(A),A.length===0&&!k&&O.length===0)throw new Error("autoInject task functions require explicit parameters.");k||O.pop(),w[S]=O.concat(x)}function x(W,oe){var de=O.map(ae=>W[ae]);de.push(oe),E(A)(...de)}}),If(w,p)}class ZC{constructor(){this.head=this.tail=null,this.length=0}removeLink(p){return p.prev?p.prev.next=p.next:this.head=p.next,p.next?p.next.prev=p.prev:this.tail=p.prev,p.prev=p.next=null,this.length-=1,p}empty(){for(;this.head;)this.shift();return this}insertAfter(p,w){w.prev=p,w.next=p.next,p.next?p.next.prev=w:this.tail=w,p.next=w,this.length+=1}insertBefore(p,w){w.prev=p.prev,w.next=p,p.prev?p.prev.next=w:this.head=w,p.prev=w,this.length+=1}unshift(p){this.head?this.insertBefore(this.head,p):K_(this,p)}push(p){this.tail?this.insertAfter(this.tail,p):K_(this,p)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var p=this.head;p;)yield p.data,p=p.next}remove(p){for(var w=this.head;w;){var{next:S}=w;p(w)&&this.removeLink(w),w=S}return this}}function K_(m,p){m.length=1,m.head=m.tail=p}function Cf(m,p,w){if(p==null)p=1;else if(p===0)throw new RangeError("Concurrency must not be zero");var S=E(m),A=0,O=[];let k={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function I($,j){k[$].push(j)}function x($,j){let z=(...le)=>{W($,z),j(...le)};k[$].push(z)}function W($,j){if(!$)return Object.keys(k).forEach(z=>k[z]=[]);if(!j)return k[$]=[];k[$]=k[$].filter(z=>z!==j)}function oe($,...j){k[$].forEach(z=>z(...j))}var de=!1;function ae($,j,z,le){if(le!=null&&typeof le!="function")throw new Error("task callback must be a function");he.started=!0;var Ce,Qe;function nr(rn,...yo){if(rn)return z?Qe(rn):Ce();if(yo.length<=1)return Ce(yo[0]);Ce(yo)}var Wn=he._createTaskItem($,z?nr:le||nr);if(j?he._tasks.unshift(Wn):he._tasks.push(Wn),de||(de=!0,l(()=>{de=!1,he.process()})),z||!le)return new Promise((rn,yo)=>{Ce=rn,Qe=yo})}function ir($){return function(j,...z){A-=1;for(var le=0,Ce=$.length;le<Ce;le++){var Qe=$[le],nr=O.indexOf(Qe);nr===0?O.shift():nr>0&&O.splice(nr,1),Qe.callback(j,...z),j!=null&&oe("error",j,Qe.data)}A<=he.concurrency-he.buffer&&oe("unsaturated"),he.idle()&&oe("drain"),he.process()}}function jn($){return $.length===0&&he.idle()?(l(()=>oe("drain")),!0):!1}let tn=$=>j=>{if(!j)return new Promise((z,le)=>{x($,(Ce,Qe)=>{if(Ce)return le(Ce);z(Qe)})});W($),I($,j)};var _o=!1,he={_tasks:new ZC,_createTaskItem($,j){return{data:$,callback:j}},*[Symbol.iterator](){yield*he._tasks[Symbol.iterator]()},concurrency:p,payload:w,buffer:p/4,started:!1,paused:!1,push($,j){return Array.isArray($)?jn($)?void 0:$.map(z=>ae(z,!1,!1,j)):ae($,!1,!1,j)},pushAsync($,j){return Array.isArray($)?jn($)?void 0:$.map(z=>ae(z,!1,!0,j)):ae($,!1,!0,j)},kill(){W(),he._tasks.empty()},unshift($,j){return Array.isArray($)?jn($)?void 0:$.map(z=>ae(z,!0,!1,j)):ae($,!0,!1,j)},unshiftAsync($,j){return Array.isArray($)?jn($)?void 0:$.map(z=>ae(z,!0,!0,j)):ae($,!0,!0,j)},remove($){he._tasks.remove($)},process(){if(!_o){for(_o=!0;!he.paused&&A<he.concurrency&&he._tasks.length;){var $=[],j=[],z=he._tasks.length;he.payload&&(z=Math.min(z,he.payload));for(var le=0;le<z;le++){var Ce=he._tasks.shift();$.push(Ce),O.push(Ce),j.push(Ce.data)}A+=1,he._tasks.length===0&&oe("empty"),A===he.concurrency&&oe("saturated");var Qe=Y(ir($));S(j,Qe)}_o=!1}},length(){return he._tasks.length},running(){return A},workersList(){return O},idle(){return he._tasks.length+A===0},pause(){he.paused=!0},resume(){he.paused!==!1&&(he.paused=!1,l(he.process))}};return Object.defineProperties(he,{saturated:{writable:!1,value:tn("saturated")},unsaturated:{writable:!1,value:tn("unsaturated")},empty:{writable:!1,value:tn("empty")},drain:{writable:!1,value:tn("drain")},error:{writable:!1,value:tn("error")}}),he}function Z_(m,p){return Cf(m,1,p)}function Q_(m,p,w){return Cf(m,p,w)}function QC(m,p,w,S){S=X(S);var A=E(w);return Sr(m,(O,k,I)=>{A(p,O,(x,W)=>{p=W,I(x)})},O=>S(O,p))}var Ti=v(QC,4);function Ff(...m){var p=m.map(E);return function(...w){var S=this,A=w[w.length-1];return typeof A=="function"?w.pop():A=Gn(),Ti(p,w,(O,k,I)=>{k.apply(S,O.concat((x,...W)=>{I(x,W)}))},(O,k)=>A(O,...k)),A[qn]}}function X_(...m){return Ff(...m.reverse())}function XC(m,p,w,S){return F(fe(p),m,w,S)}var fo=v(XC,4);function eF(m,p,w,S){var A=E(w);return fo(m,p,(O,k)=>{A(O,(I,...x)=>I?k(I):k(I,x))},(O,k)=>{for(var I=[],x=0;x<k.length;x++)k[x]&&(I=I.concat(...k[x]));return S(O,I)})}var Nn=v(eF,4);function tF(m,p,w){return Nn(m,1/0,p,w)}var il=v(tF,3);function rF(m,p,w){return Nn(m,1,p,w)}var nl=v(rF,3);function ey(...m){return function(...p){var w=p.pop();return w(null,...m)}}function ti(m,p){return(w,S,
Line truncated
|
||||
GFS4: `),console.error(t)});Fe[at]||(Nw=global[at]||[],Ww(Fe,Nw),Fe.close=(function(t){function e(r,i){return t.call(Fe,r,function(n){n||jw(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(e,zl,{value:t}),e})(Fe.close),Fe.closeSync=(function(t){function e(r){t.apply(Fe,arguments),jw()}return Object.defineProperty(e,zl,{value:t}),e})(Fe.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){on(Fe[at]),D("assert").equal(Fe[at].length,0)}));var Nw;global[at]||Ww(global,Fe[at]);zd.exports=Wd(wB(Fe));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Fe.__patched&&(zd.exports=Wd(Fe),Fe.__patched=!0);function Wd(t){_B(t),t.gracefulify=Wd,t.createReadStream=G,t.createWriteStream=X;var e=t.readFile;t.readFile=r;function r(R,B,U){return typeof B=="function"&&(U=B,B=null),Y(R,B,U);function Y(se,fe,Ee,ge){return e(se,fe,function(me){me&&(me.code==="EMFILE"||me.code==="ENFILE")?Xn([Y,[se,fe,Ee],me,ge||Date.now(),Date.now()]):typeof Ee=="function"&&Ee.apply(this,arguments)})}}var i=t.writeFile;t.writeFile=n;function n(R,B,U,Y){return typeof U=="function"&&(Y=U,U=null),se(R,B,U,Y);function se(fe,Ee,ge,me,Je){return i(fe,Ee,ge,function(Te){Te&&(Te.code==="EMFILE"||Te.code==="ENFILE")?Xn([se,[fe,Ee,ge,me],Te,Je||Date.now(),Date.now()]):typeof me=="function"&&me.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(R,B,U,Y){return typeof U=="function"&&(Y=U,U=null),se(R,B,U,Y);function se(fe,Ee,ge,me,Je){return s(fe,Ee,ge,function(Te){Te&&(Te.code==="EMFILE"||Te.code==="ENFILE")?Xn([se,[fe,Ee,ge,me],Te,Je||Date.now(),Date.now()]):typeof me=="function"&&me.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=u);function u(R,B,U,Y){return typeof U=="function"&&(Y=U,U=0),se(R,B,U,Y);function se(fe,Ee,ge,me,Je){return a(fe,Ee,ge,function(Te){Te&&(Te.code==="EMFILE"||Te.code==="ENFILE")?Xn([se,[fe,Ee,ge,me],Te,Je||Date.now(),Date.now()]):typeof me=="function"&&me.apply(this,arguments)})}}var l=t.readdir;t.readdir=f;var c=/^v[0-5]\./;function f(R,B,U){typeof B=="function"&&(U=B,B=null);var Y=c.test(process.version)?function(Ee,ge,me,Je){return l(Ee,se(Ee,ge,me,Je))}:function(Ee,ge,me,Je){return l(Ee,ge,se(Ee,ge,me,Je))};return Y(R,B,U);function se(fe,Ee,ge,me){return function(Je,Te){Je&&(Je.code==="EMFILE"||Je.code==="ENFILE")?Xn([Y,[fe,Ee,ge],Je,me||Date.now(),Date.now()]):(Te&&Te.sort&&Te.sort(),typeof ge=="function"&&ge.call(this,Je,Te))}}}if(process.version.substr(0,4)==="v0.8"){var d=yB(t);v=d.ReadStream,F=d.WriteStream}var h=t.ReadStream;h&&(v.prototype=Object.create(h.prototype),v.prototype.open=T);var b=t.WriteStream;b&&(F.prototype=Object.create(b.prototype),F.prototype.open=C),Object.defineProperty(t,"ReadStream",{get:function(){return v},set:function(R){v=R},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return F},set:function(R){F=R},enumerable:!0,configurable:!0});var g=v;Object.defineProperty(t,"FileReadStream",{get:function(){return g},set:function(R){g=R},enumerable:!0,configurable:!0});var E=F;Object.defineProperty(t,"FileWriteStream",{get:function(){return E},set:function(R){E=R},enumerable:!0,configurable:!0});function v(R,B){return this instanceof v?(h.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function T(){var R=this;L(R.path,R.flags,R.mode,function(B,U){B?(R.autoClose&&R.destroy(),R.emit("error",B)):(R.fd=U,R.emit("open",U),R.read())})}function F(R,B){return this instanceof F?(b.apply(this,arguments),this):F.apply(Object.create(F.prototype),arguments)}function C(){var R=this;L(R.path,R.flags,R.mode,function(B,U){B?(R.destroy(),R.emit("error",B)):(R.fd=U,R.emit("open",U))})}function G(R,B){return new t.ReadStream(R,B)}function X(R,B){return new t.WriteStream(R,B)}var P=t.open;t.open=L;function L(R,B,U,Y){return typeof U=="function"&&(Y=U,U=null),se(R,B,U,Y);function se(fe,Ee,ge,me,Je){return P(fe,Ee,ge,function(Te,Lt){Te&&(Te.code==="EMFILE"||Te.code==="ENFILE")?Xn([se,[fe,Ee,ge,me],Te,Je||Date.now(),Date.now()]):typeof me=="function"&&me.apply(this,arguments)})}}return t}function Xn(t){on("ENQUEUE",t[0].name,t[1]),Fe[at].push(t),$d()}var $l;function jw(){for(var t=Date.now(),e=0;e<Fe[at].length;++e)Fe[at][e].length>2&&(Fe[at][e][3]=t,Fe[at][e][4]=t);$d()}function $d(){if(clearTimeout($l),$l=void 0,Fe[at].length!==0){var t=Fe[at].shift(),e=t[0],r=t[1],i=t[2],n=t[3],s=t[4];if(n===void 0)on("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-n>=6e4){on("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,i)}else{var a=Date.now()-s,u=Math.max(s-n,1),l=Math.min(u*1.2,100);a>=l?(on("RETRY",e.name,r),e.apply(null,r.concat([n]))):Fe[at].push(t)}$l===void 0&&($l=setTimeout($d,0))}}});var zw=y((WX,$w)=>{"use strict";var xr=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";xr.writable=t=>xr(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";xr.readable=t=>xr(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t
Line truncated
|
||||
`;super(r),this.name="AggregateError",this.errors=e}};Ih.exports={AggregateError:kh,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((i,n)=>{t=i,e=n}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((i,...n)=>i?r(i):e(...n))})},debuglog(){return function(){}},format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,i]){let n=e.shift();return i==="f"?n.toFixed(6):i==="j"?JSON.stringify(n):i==="s"&&typeof n=="object"?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}},types:{isAsyncFunction(t){return t instanceof rG},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:iG,deprecate(t,e){return t},addAbortListener:D("events").addAbortListener||function(e,r){if(e===void 0)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);L0(e,"signal"),nG(r,"listener");let i;return e.aborted?queueMicrotask(()=>r()):(e.addEventListener("abort",r,{__proto__:null,once:!0,[Qq]:!0}),i=()=>{e.removeEventListener("abort",r)}),{__proto__:null,[Xq](){var n;(n=i)===null||n===void 0||n()}}},AbortSignalAny:eG.any||function(e){if(e.length===1)return e[0];let r=new tG,i=()=>r.abort();return e.forEach(n=>{L0(n,"signals"),n.addEventListener("abort",i,{once:!0})}),r.signal.addEventListener("abort",()=>{e.forEach(n=>n.removeEventListener("abort",i))},{once:!0}),r.signal}};Ih.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")});var It=y((ete,G0)=>{"use strict";var{format:sG,inspect:hu,AggregateError:oG}=wt(),aG=globalThis.AggregateError||oG,lG=Symbol("kIsNodeError"),uG=["string","function","number","object","Function","Object","boolean","bigint","symbol"],cG=/^([A-Z][a-z0-9]*)+$/,fG="__node_internal_",pu={};function un(t,e){if(!t)throw new pu.ERR_INTERNAL_ASSERTION(e)}function M0(t){let e="",r=t.length,i=t[0]==="-"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function dG(t,e,r){if(typeof e=="function")return un(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let i=(e.match(/%[dfijoOs]/g)||[]).length;return un(i===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?e:sG(e,...r)}function ut(t,e,r){r||(r=Error);class i extends r{constructor(...s){super(dG(t,e,s))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=t,i.prototype[lG]=!0,pu[t]=i}function q0(t){let e=fG+t.name;return Object.defineProperty(t,"name",{value:e}),t}function hG(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new aG([e,t],e.message);return r.code=e.code,r}return t||e}var Ch=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new pu.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};ut("ERR_ASSERTION","%s",Error);ut("ERR_INVALID_ARG_TYPE",(t,e,r)=>{un(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let i="The ";t.endsWith(" argument")?i+=`${t} `:i+=`"${t}" ${t.includes(".")?"property":"argument"} `,i+="must be ";let n=[],s=[],o=[];for(let u of e)un(typeof u=="string","All expected entries have to be of type string"),uG.includes(u)?n.push(u.toLowerCase()):cG.test(u)?s.push(u):(un(u!=="object",'The value "object" should be written as "Object"'),o.push(u));if(s.length>0){let u=n.indexOf("object");u!==-1&&(n.splice(n,u,1),s.push("Object"))}if(n.length>0){switch(n.length){case 1:i+=`of type ${n[0]}`;break;case 2:i+=`one of type ${n[0]} or ${n[1]}`;break;default:{let u=n.pop();i+=`one of type ${n.join(", ")}, or ${u}`}}(s.length>0||o.length>0)&&(i+=" or ")}if(s.length>0){switch(s.length){case 1:i+=`an instance of ${s[0]}`;break;case 2:i+=`an instance of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();i+=`an instance of ${s.join(", ")}, or ${u}`}}o.length>0&&(i+=" or ")}switch(o.length){case 0:break;case 1:o[0].toLowerCase()!==o[0]&&(i+="an "),i+=`${o[0]}`;break;case 2:i+=`one of ${o[0]} or ${o[1]}`;break;default:{let u=o.pop();i+=`one of ${o.join(", ")}, or ${u}`}}if(r==null)i+=`. Received ${r}`;else if(typeof r=="function"&&r.name)i+=`. Received function ${r.name}`;else if(typeof r=="object"){var a;if((a=r.constructor)!==null&&a!==void 0&&a.name)i+=`. Received an instance of ${r.construcLine truncated
|
||||
`)),e.linkname&&(r+=sm(" linkpath="+e.linkname+`
|
||||
`));let i=e.pax;if(i)for(let n in i)r+=sm(" "+n+"="+i[n]+`
|
||||
`);return ue.from(r)};js.decodePax=function(e){let r={};for(;e.length;){let i=0;for(;i<e.length&&e[i]!==32;)i++;let n=parseInt(ue.toString(e.subarray(0,i)),10);if(!n)return r;let s=ue.toString(e.subarray(i+1,n-1)),o=s.indexOf("=");if(o===-1)return r;r[s.slice(0,o)]=s.slice(o+1),e=e.subarray(n)}return r};js.encode=function(e){let r=ue.alloc(512),i=e.name,n="";if(e.typeflag===5&&i[i.length-1]!=="/"&&(i+="/"),ue.byteLength(i)!==i.length)return null;for(;ue.byteLength(i)>100;){let s=i.indexOf("/");if(s===-1)return null;n+=n?"/"+i.slice(0,s):i.slice(0,s),i=i.slice(s+1)}return ue.byteLength(i)>100||ue.byteLength(n)>155||e.linkname&&ue.byteLength(e.linkname)>100?null:(ue.write(r,i),ue.write(r,Wi(e.mode&Xz,6),100),ue.write(r,Wi(e.uid,6),108),ue.write(r,Wi(e.gid,6),116),o7(e.size,r,124),ue.write(r,Wi(e.mtime.getTime()/1e3|0,11),136),r[156]=Lc+n7(e.type),e.linkname&&ue.write(r,e.linkname,157),ue.copy(K1,r,xa),ue.copy(Kz,r,om),e.uname&&ue.write(r,e.uname,265),e.gname&&ue.write(r,e.gname,297),ue.write(r,Wi(e.devmajor||0,6),329),ue.write(r,Wi(e.devminor||0,6),337),n&&ue.write(r,n,345),ue.write(r,Wi(Q1(r),6),148),r)};js.decode=function(e,r,i){let n=e[156]===0?0:e[156]-Lc,s=Ns(e,0,100,r),o=ji(e,100,8),a=ji(e,108,8),u=ji(e,116,8),l=ji(e,124,12),c=ji(e,136,12),f=i7(n),d=e[157]===0?null:Ns(e,157,100,r),h=Ns(e,265,32),b=Ns(e,297,32),g=ji(e,329,8),E=ji(e,337,8),v=Q1(e);if(v===256)return null;if(v!==ji(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(e7(e))e[345]&&(s=Ns(e,345,155,r)+"/"+s);else if(!t7(e)){if(!i)throw new Error("Invalid tar header: unknown format.")}return n===0&&s&&s[s.length-1]==="/"&&(n=5),{name:s,mode:o,uid:a,gid:u,size:l,mtime:new Date(1e3*c),type:f,linkname:d,uname:h,gname:b,devmajor:g,devminor:E,pax:null}};function e7(t){return ue.equals(K1,t.subarray(xa,xa+6))}function t7(t){return ue.equals(Zz,t.subarray(xa,xa+6))&&ue.equals(Qz,t.subarray(om,om+2))}function r7(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function i7(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function n7(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function Z1(t,e,r,i){for(;r<i;r++)if(t[r]===e)return r;return i}function Q1(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function Wi(t,e){return t=t.toString(8),t.length>e?Yz.slice(0,e)+" ":Jz.slice(0,e-t.length)+t+" "}function s7(t,e,r){e[r]=128;for(let i=11;i>0;i--)e[r+i]=t&255,t=Math.floor(t/256)}function o7(t,e,r){t.toString(8).length>11?s7(t,e,r):ue.write(e,Wi(t,11),r)}function a7(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let r=[],i;for(i=t.length-1;i>0;i--){let o=t[i];e?r.push(o):r.push(255-o)}let n=0,s=r.length;for(i=0;i<s;i++)n+=r[i]*Math.pow(256,i);return e?n:-1*n}function ji(t,e,r){if(t=t.subarray(e,e+r),e=0,t[e]&128)return a7(t);{for(;e<t.length&&t[e]===32;)e++;let i=r7(Z1(t,32,e,t.length),t.length,t.length);for(;e<i&&t[e]===0;)e++;return i===e?0:parseInt(ue.toString(t.subarray(e,i)),8)}}function Ns(t,e,r,i){return ue.toString(t.subarray(e,Z1(t,0,e,e+r)),i)}function sm(t){let e=ue.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t}});var iD=y((Die,rD)=>{var{Writable:l7,Readable:u7,getStreamError:X1}=nm(),c7=jg(),eD=Bs(),Ws=am(),f7=eD.alloc(0),um=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new c7,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return f7;let r=this._next(e);if(e===r.byteLength)return r;let i=[r];for(;(e-=r.byteLength)>0;)r=this._next(e),i.push(r);return eD.concat(i)}_next(e){let r=this.queue.peek(),i=r.byteLength-this._offset;if(e>=i){let n=this._offset?r.subarray(this._offset,r.byteLength):r;return this.queue.shift(),this._offset=0,this.buffered-=i,this.shifted+=i,n}return this.buffered-=e,this.shifted+=e,r.subarray(this._offset,this._offset+=e)}},cm=class extends u7{constructor(e,r,i){super(),this.header=r,this.offset=i,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(X1(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=tD(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},fm=class extends l7{constructor(e){super(e),e||(e={}),this._buffer=new um
Line truncated
|
||||
`+t.errors.map(e=>` - ${e.message}`).join(`
|
||||
`)}var SP=class extends Error{constructor(t,e,r){super(AH(r)),this.request=t,this.headers=e,this.response=r,this.name="GraphqlResponseError",this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},RH=["method","baseUrl","url","headers","request","query","mediaType"],OH=["query","method","url"],EP=/\/api\/v3\/?$/;function DH(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let o in r)if(OH.includes(o))return Promise.reject(new Error(`[@octokit/graphql] "${o}" cannot be used as variable name`))}let i=typeof e=="string"?Object.assign({query:e},r):e,n=Object.keys(i).reduce((o,a)=>RH.includes(a)?(o[a]=i[a],o):(o.variables||(o.variables={}),o.variables[a]=i[a],o),{}),s=i.baseUrl||t.endpoint.DEFAULTS.baseUrl;return EP.test(s)&&(n.url=s.replace(EP,"/api/graphql")),t(n).then(o=>{if(o.data.errors){let a={};for(let u of Object.keys(o.headers))a[u]=o.headers[u];throw new SP(n,a,o.data)}return o.data.data})}function Mm(t,e){let r=t.defaults(e);return Object.assign((n,s)=>DH(r,n,s),{defaults:Mm.bind(null,r),endpoint:r.endpoint})}var PH=Mm(vH.request,{headers:{"user-agent":`octokit-graphql.js/${TH} ${(0,SH.getUserAgent)()}`},method:"POST",url:"/graphql"});function kH(t){return Mm(t,{method:"POST",url:"/graphql"})}});var DP=y((nne,OP)=>{"use strict";var qm=Object.defineProperty,IH=Object.getOwnPropertyDescriptor,CH=Object.getOwnPropertyNames,FH=Object.prototype.hasOwnProperty,xH=(t,e)=>{for(var r in e)qm(t,r,{get:e[r],enumerable:!0})},BH=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of CH(e))!FH.call(t,n)&&n!==r&&qm(t,n,{get:()=>e[n],enumerable:!(i=IH(e,n))||i.enumerable});return t},UH=t=>BH(qm({},"__esModule",{value:!0}),t),RP={};xH(RP,{createTokenAuth:()=>WH});OP.exports=UH(RP);var LH=/^v1\./,MH=/^ghs_/,qH=/^ghu_/;async function GH(t){let e=t.split(/\./).length===3,r=LH.test(t)||MH.test(t),i=qH.test(t);return{type:"token",token:t,tokenType:e?"app":r?"installation":i?"user-to-server":"oauth"}}function NH(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function jH(t,e,r,i){let n=e.endpoint.merge(r,i);return n.headers.authorization=NH(t),e(n)}var WH=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(GH.bind(null,e),{hook:jH.bind(null,e)})}});var BP=y((sne,xP)=>{"use strict";var Gm=Object.defineProperty,$H=Object.getOwnPropertyDescriptor,zH=Object.getOwnPropertyNames,HH=Object.prototype.hasOwnProperty,VH=(t,e)=>{for(var r in e)Gm(t,r,{get:e[r],enumerable:!0})},JH=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of zH(e))!HH.call(t,n)&&n!==r&&Gm(t,n,{get:()=>e[n],enumerable:!(i=$H(e,n))||i.enumerable});return t},YH=t=>JH(Gm({},"__esModule",{value:!0}),t),CP={};VH(CP,{Octokit:()=>iV});xP.exports=YH(CP);var KH=Ua(),ZH=YD(),PP=Ga(),QH=AP(),XH=DP(),FP="5.2.2",kP=()=>{},eV=console.warn.bind(console),tV=console.error.bind(console);function rV(t={}){return typeof t.debug!="function"&&(t.debug=kP),typeof t.info!="function"&&(t.info=kP),typeof t.warn!="function"&&(t.warn=eV),typeof t.error!="function"&&(t.error=tV),t}var IP=`octokit-core.js/${FP} ${(0,KH.getUserAgent)()}`,iV=class{static{this.VERSION=FP}static defaults(t){return class extends this{constructor(...r){let i=r[0]||{};if(typeof t=="function"){super(t(i));return}super(Object.assign({},t,i,i.userAgent&&t.userAgent?{userAgent:`${i.userAgent} ${t.userAgent}`}:null))}}}static{this.plugins=[]}static plugin(...t){let e=this.plugins;return class extends this{static{this.plugins=e.concat(t.filter(i=>!e.includes(i)))}}}constructor(t={}){let e=new ZH.Collection,r={baseUrl:PP.request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},t.request,{hook:e.bind(null,"request")}),mediaType:{previews:[],format:""}};if(r.headers["user-agent"]=t.userAgent?`${t.userAgent} ${IP}`:IP,t.baseUrl&&(r.baseUrl=t.baseUrl),t.previews&&(r.mediaType.previews=t.previews),t.timeZone&&(r.headers["time-zone"]=t.timeZone),this.request=PP.request.defaults(r),this.graphql=(0,QH.withCustomRequest)(this.request).defaults(r),this.log=rV(t.log),this.hook=e,t.authStrategy){let{authStrategy:n,...s}=t,o=n(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:s},t.auth));e.wrap("request",o.hook),this.auth=o}else if(!t.auth)this.auth=async()=>({type:"unauthenticated"});else{let n=(0,XH.createTokenAuth)(t.auth);e.wrap("request",n.hook),this.auth=n}let i=this.constructor;for(let n=0;n<i.plugins.length;++n)Object.assign(this,i.plugins[n](this,t))}}});var jP=y((une,NP)=>{"use strict";var Nm=Object.defineProperty,nV=Object.getOwnPropertyDescriptor,sV=Object.getOwnPropertyNames,oV=Object.prototype.hasOwnProperty,aV=(t,e)=>{for(var r in e)Nm(t,r,{get:e[r],enumerable:!0})},
Line truncated
|
||||
Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`);u.length>1&>.warning("Multiple artifacts found, defaulting to first.");let l={workflowRunBackendId:u[0].workflowRunBackendId,workflowJobRunBackendId:u[0].workflowJobRunBackendId,name:u[0].name},{signedUrl:c}=yield i.GetSignedArtifactURL(l);gt.info(`Redirecting to blob download url: ${xk(c)}`);try{gt.info(`Starting download of artifact to: ${r}`);let f=yield Bk(c,r);gt.info("Artifact download completed successfully."),e?.expectedHash&&e?.expectedHash!==f.sha256Digest&&(n=!0,gt.debug(`Computed digest: ${f.sha256Digest}`),gt.debug(`Expected digest: ${e.expectedHash}`))}catch(f){throw new Error(`Unable to download and extract artifact: ${f.message}`)}return{downloadPath:r,digestMismatch:n}})}nt.downloadArtifactInternal=SJ;function Lk(){return Zs(this,arguments,void 0,function*(t=(0,mJ.getGitHubWorkspaceDir)()){return(yield EJ(t))?gt.debug(`Artifact destination folder already exists: ${t}`):(gt.debug(`Artifact destination folder does not exist, creating: ${t}`),yield Fk.default.mkdir(t,{recursive:!0})),t})}});var Zc=y(Hr=>{"use strict";var TJ=Hr&&Hr.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),AJ=Hr&&Hr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),RJ=Hr&&Hr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&TJ(e,t,r);return AJ(e,t),e};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.getRetryOptions=void 0;var OJ=RJ(ot()),DJ=5,PJ=[400,401,403,404,422];function kJ(t,e=DJ,r=PJ){var i;if(e<=0)return[{enabled:!1},t.request];let n={enabled:!0};r.length>0&&(n.doNotRetry=r);let s=Object.assign(Object.assign({},t.request),{retries:e});return OJ.debug(`GitHub client configured with: (retries: ${s.retries}, retry-exempt-status-code: ${(i=n.doNotRetry)!==null&&i!==void 0?i:"octokit default: [400, 401, 403, 404, 422]"})`),[n,s]}Hr.getRetryOptions=kJ});var Qc=y(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});var IJ="1.0.4";function qk(t){t.hook.wrap("request",(e,r)=>{t.log.debug("request",r);let i=Date.now(),n=t.request.endpoint.parse(r),s=n.url.replace(r.baseUrl,"");return e(r).then(o=>(t.log.info(`${n.method} ${s} - ${o.status} in ${Date.now()-i}ms`),o)).catch(o=>{throw t.log.info(`${n.method} ${s} - ${o.status} in ${Date.now()-i}ms`),o})})}qk.VERSION=IJ;Ym.requestLog=qk});var ef=y(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});function CJ(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var FJ=CJ(MF());async function xJ(t,e,r,i){if(!r.request||!r.request.request)throw r;if(r.status>=400&&!e.doNotRetry.includes(r.status)){let n=i.request.retries!=null?i.request.retries:e.retries,s=Math.pow((i.request.retryCount||0)+1,2);throw t.retry.retryRequest(r,n,s)}throw r}async function BJ(t,e,r){let i=new FJ;return i.on("failed",function(n,s){let o=~~n.request.request.retries,a=~~n.request.request.retryAfter;if(r.request.retryCount=s.retryCount+1,o>s.retryCount)return a*t.retryAfterBaseValue}),i.schedule(e,r)}var Gk="3.0.9";function Nk(t,e){let r=Object.assign({enabled:!0,retryAfterBaseValue:1e3,doNotRetry:[400,401,403,404,422],retries:3},e.retry);return r.enabled&&(t.hook.error("request",xJ.bind(null,t,r)),t.hook.wrap("request",BJ.bind(null,r))),{retry:{retryRequest:(i,n,s)=>(i.request.request=Object.assign({},i.request.request,{retries:n,retryAfter:s}),i)}}}Nk.VERSION=Gk;Xc.VERSION=Gk;Xc.retry=Nk});var Zm=y(Gt=>{"use strict";var UJ=Gt&&Gt.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),LJ=Gt&&Gt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),MJ=Gt&&Gt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&UJ(e,t,r);return LJ(e,t),e},Wk=Gt&&Gt.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):n(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.getArtifactInternal=Gt.getArtifactPublic=void 0;var qJ=ja(),GJ=ef(),$k=MJ(ot()),NJ=Na(),jJ=Zc(),WJ=QcLine truncated
|
||||
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let f=c.data.artifacts[0];return c.data.artifacts.length>1&&(f=c.data.artifacts.sort((d,h)=>h.id-d.id)[0],$k.debug(`More than one artifact found for a single name, returning newest (id: ${f.id})`)),{artifact:{name:f.name,id:f.id,size:f.size_in_bytes,createdAt:f.created_at?new Date(f.created_at):void 0,digest:f.digest}}})}Gt.getArtifactPublic=VJ;function JJ(t){return Wk(this,void 0,void 0,function*(){var e;let r=(0,HJ.internalArtifactTwirpClient)(),{workflowRunBackendId:i,workflowJobRunBackendId:n}=(0,$J.getBackendIdsFromToken)(),s={workflowRunBackendId:i,workflowJobRunBackendId:n,nameFilter:jk.StringValue.create({value:t})},o=yield r.ListArtifacts(s);if(o.artifacts.length===0)throw new Km.ArtifactNotFoundError(`Artifact not found for name: ${t}
|
||||
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);let a=o.artifacts[0];return o.artifacts.length>1&&(a=o.artifacts.sort((u,l)=>Number(l.databaseId)-Number(u.databaseId))[0],$k.debug(`More than one artifact found for a single name, returning newest (id: ${a.databaseId})`)),{artifact:{name:a.name,id:Number(a.databaseId),size:Number(a.size),createdAt:a.createdAt?jk.Timestamp.toDate(a.createdAt):void 0,digest:(e=a.digest)===null||e===void 0?void 0:e.value}}})}Gt.getArtifactInternal=JJ});var Jk=y(Yi=>{"use strict";var Hk=Yi&&Yi.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):n(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.deleteArtifactInternal=Yi.deleteArtifactPublic=void 0;var zk=ot(),YJ=ja(),KJ=Hn(),ZJ=Zc(),QJ=Na(),XJ=Qc(),eY=ef(),tY=Kn(),rY=sn(),iY=Ri(),nY=Zm(),Vk=li();function sY(t,e,r,i,n){return Hk(this,void 0,void 0,function*(){var s;let[o,a]=(0,ZJ.getRetryOptions)(QJ.defaults),u={log:void 0,userAgent:(0,KJ.getUserAgentString)(),previews:void 0,retry:o,request:a},l=(0,YJ.getOctokit)(n,u,eY.retry,XJ.requestLog),c=yield(0,nY.getArtifactPublic)(t,e,r,i,n),f=yield l.rest.actions.deleteArtifact({owner:r,repo:i,artifact_id:c.artifact.id});if(f.status!==204)throw new Vk.InvalidResponseError(`Invalid response from GitHub API: ${f.status} (${(s=f?.headers)===null||s===void 0?void 0:s["x-github-request-id"]})`);return{id:c.artifact.id}})}Yi.deleteArtifactPublic=sY;function oY(t){return Hk(this,void 0,void 0,function*(){let e=(0,tY.internalArtifactTwirpClient)(),{workflowRunBackendId:r,workflowJobRunBackendId:i}=(0,rY.getBackendIdsFromToken)(),n={workflowRunBackendId:r,workflowJobRunBackendId:i,nameFilter:iY.StringValue.create({value:t})},s=yield e.ListArtifacts(n);if(s.artifacts.length===0)throw new Vk.ArtifactNotFoundError(`Artifact not found for name: ${t}`);let o=s.artifacts[0];s.artifacts.length>1&&(o=s.artifacts.sort((l,c)=>Number(c.databaseId)-Number(l.databaseId))[0],(0,zk.debug)(`More than one artifact found for a single name, returning newest (id: ${o.databaseId})`));let a={workflowRunBackendId:o.workflowRunBackendId,workflowJobRunBackendId:o.workflowJobRunBackendId,name:o.name},u=yield e.DeleteArtifact(a);return(0,zk.info)(`Artifact '${t}' (ID: ${u.artifactId}) deleted`),{id:Number(u.artifactId)}})}Yi.deleteArtifactInternal=oY});var Zk=y(Ki=>{"use strict";var Yk=Ki&&Ki.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):n(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.listArtifactsInternal=Ki.listArtifactsPublic=void 0;var Ja=ot(),aY=ja(),lY=Hn(),uY=Zc(),cY=Na(),fY=Qc(),dY=ef(),hY=Kn(),pY=sn(),gY=Ai(),mY=Ri(),tf=(0,gY.getMaxArtifactListCount)(),rf=100,_Y=Math.ceil(tf/rf);function yY(t,e,r,i){return Yk(this,arguments,void 0,function*(n,s,o,a,u=!1){(0,Ja.info)(`Fetching artifact list for workflow run ${n} in repository ${s}/${o}`);let l=[],[c,f]=(0,uY.getRetryOptions)(cY.defaults),d={log:void 0,userAgent:(0,lY.getUserAgentString)(),previews:void 0,retry:c,request:f},h=(0,aY.getOctokit)(a,d,dY.retry,fY.requestLog),b=1,{data:g}=yield h.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:s,repo:o,run_id:n,per_page:rf,page:b}),E=Math.ceil(g.total_count/rf),v=g.total_count;v>tf&&((0,Ja.warning)(`Workflow run ${n} has ${v} artifacts, exceeding the limit of ${tf}. Results will be incomplete as only the first ${tf} artifacts will be returned`),E=_Y);for(let T of g.artifacts)l.push({name:T.name,id:T.id,size:T.size_in_bytes,createdAt:T.created_at?new Date(T.created_at):void 0,digest:T.digest});for(b++,b;b<=E;b++){(0,Ja.debug)(`Fetching page ${b} of artifact list`);let{data:T}=yield h.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",{owner:s,repo:o,run_id:n,per_page:rf,page:b});for(let F of T.artifacts)l.push({name:F.name,id:F.id,size:F.size_in_bytes,createdAt:F.created_at?new Date(F.created_at):void 0,digest:F.digest})}return u&&(l=Kk(l)),(0,Ja.info)(`Found ${l.length} artifact(s)`),{artifacts:l}})}Ki.listArtifactsPublic=yY;function wY(){return Yk(this,arguments,void 0,function*(t=!1){let e=(0,hY.internalArtifactTwirpClient)(),{workflowRunBackendId:r,workflowJobRunBackendId:i}=(0,pY.getBackendIdsFromToken)(),n={workflowRunBackendId:r,workflowJobRunBackendId:i},o=(yield e.ListArtifacts(n)).artifacts.map(a=>{var u;return{name:a.name,id:Number(a.databaseId),size:Number(a.size),createdAt:a.createdAt?mY.Timestamp.toDate(a.createdAt):void 0,digest:(u=a.digest)===null|
Line truncated
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions is operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),s}})}downloadArtifact(e,r){return Ya(this,void 0,void 0,function*(){try{if((0,Za.isGhes)())throw new Qa.GHESNotSupportedError;if(r?.findBy){let{findBy:{repositoryOwner:i,repositoryName:n,token:s}}=r,o=bY(r,["findBy"]);return(0,Qk.downloadArtifactPublic)(e,i,n,s,o)}return(0,Qk.downloadArtifactInternal)(e,r)}catch(i){throw(0,Ka.warning)(`Download Artifact failed with error: ${i}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),i}})}listArtifacts(e){return Ya(this,void 0,void 0,function*(){try{if((0,Za.isGhes)())throw new Qa.GHESNotSupportedError;if(e?.findBy){let{findBy:{workflowRunId:r,repositoryOwner:i,repositoryName:n,token:s}}=e;return(0,tI.listArtifactsPublic)(r,i,n,s,e?.latest)}return(0,tI.listArtifactsInternal)(e?.latest)}catch(r){throw(0,Ka.warning)(`Listing Artifacts failed with error: ${r}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),r}})}getArtifact(e,r){return Ya(this,void 0,void 0,function*(){try{if((0,Za.isGhes)())throw new Qa.GHESNotSupportedError;if(r?.findBy){let{findBy:{workflowRunId:i,repositoryOwner:n,repositoryName:s,token:o}}=r;return(0,eI.getArtifactPublic)(e,i,n,s,o)}return(0,eI.getArtifactInternal)(e)}catch(i){throw(0,Ka.warning)(`Get Artifact failed with error: ${i}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),i}})}deleteArtifact(e,r){return Ya(this,void 0,void 0,function*(){try{if((0,Za.isGhes)())throw new Qa.GHESNotSupportedError;if(r?.findBy){let{findBy:{repositoryOwner:i,repositoryName:n,workflowRunId:s,token:o}}=r;return(0,Xk.deleteArtifactPublic)(e,s,i,n,o)}return(0,Xk.deleteArtifactInternal)(e)}catch(i){throw(0,Ka.warning)(`Delete Artifact failed with error: ${i}.
|
||||
|
||||
Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
|
||||
|
||||
If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`),i}})}};Zi.DefaultArtifactClient=Qm});var iI=y(rI=>{"use strict";Object.defineProperty(rI,"__esModule",{value:!0})});var nI=y(Vr=>{"use strict";var vY=Vr&&Vr.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),e_=Vr&&Vr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&vY(e,t,r)};Object.defineProperty(Vr,"__esModule",{value:!0});var SY=Xm();e_(iI(),Vr);e_(li(),Vr);e_(Xm(),Vr);var TY=new SY.DefaultArtifactClient;Vr.default=TY});var nf=y(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});Qs.toCommandProperties=Qs.toCommandValue=void 0;function AY(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}Qs.toCommandValue=AY;function RY(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}Qs.toCommandProperties=RY});var lI=y(mr=>{"use strict";var OY=mr&&mr.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),DY=mr&&mr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),PY=mr&&mr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&OY(e,t,r);return DY(e,t),e};Object.defineProperty(mr,"__esModule",{value:!0});mr.issue=mr.issueCommand=void 0;var kY=PY(D("os")),oI=nf();function aI(t,e,r){let i=new t_(t,e,r);process.stdout.write(i.toString()+kY.EOL)}mr.issueCommand=aI;function IY(t,e=""){aI(t,{},e)}mr.issue=IY;var sI="::",t_=class{constructor(e,r,i){e||(e="missing.command"),this.command=e,this.properties=r,this.message=i}toString(){let e=sI+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let i in this.properties)if(this.properties.hasOwnProperty(i)){let n=this.properties[i];n&&(r?r=!1:e+=",",e+=`${i}=${FY(n)}`)}}return e+=`${sI}${CY(this.message)}`,e}};function CY(t){return(0,oI.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function FY(t){return(0,oI.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});var fI=y(_r=>{"use strict";var xY=_r&&_r.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),BY=_r&&_r.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),i_=_r&&_r.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&xY(e,t,r);return BY(e,t),e};Object.defineProperty(_r,"__esModule",{value:!0});_r.prepareKeyValueMessage=_r.issueFileCommand=void 0;var UY=i_(D("crypto")),uI=i_(D("fs")),r_=i_(D("os")),cI=nf();function LY(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unable to find environment variable for file command ${t}`);if(!uI.existsSync(r))throw new Error(`Missing file at path: ${r}`);uI.appendFileSync(r,`${(0,cI.toCommandValue)(e)}${r_.EOL}`,{encoding:"utf8"})}_r.issueFileCommand=LY;function MY(t,e){let r=`ghadelimiter_${UY.randomUUID()}`,i=(0,cI.toCommandValue)(e);if(t.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(i.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${t}<<${r}${r_.EOL}${i}${r_.EOL}${r}`}_r.prepareKeyValueMessage=MY});var hI=y(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.checkBypass=Xs.getProxyUrl=void 0;function qY(t){let e=t.protocol==="https:";if(dI(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new sf(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new sf(`http://${r}`)}else return}Xs.getProxyUrl=qY;function dI(t){if(!t.hostname)return!1;let e=t.hostname;if(GY(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let i;t.port?i=Number(t.port):t.protocol==="http:"?
Line truncated
|
||||
|
||||
Error Code : ${o.statusCode}
|
||||
|
||||
Error Message: ${o.message}`)})).result)===null||r===void 0?void 0:r.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(e){return gI(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let n=encodeURIComponent(e);r=`${r}&audience=${n}`}(0,mI.debug)(`ID token url is ${r}`);let i=yield t.getCall(r);return(0,mI.setSecret)(i),i}catch(r){throw new Error(`Error message: ${r.message}`)}})}};eo.OidcClient=d_});var m_=y(Nt=>{"use strict";var h_=Nt&&Nt.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):n(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.summary=Nt.markdownSummary=Nt.SUMMARY_DOCS_URL=Nt.SUMMARY_ENV_VAR=void 0;var XY=D("os"),p_=D("fs"),{access:eK,appendFile:tK,writeFile:rK}=p_.promises;Nt.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";Nt.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var g_=class{constructor(){this._buffer=""}filePath(){return h_(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[Nt.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${Nt.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield eK(e,p_.constants.R_OK|p_.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,i={}){let n=Object.entries(i).map(([s,o])=>` ${s}="${o}"`).join("");return r?`<${e}${n}>${r}</${e}>`:`<${e}${n}>`}write(e){return h_(this,void 0,void 0,function*(){let r=!!e?.overwrite,i=yield this.filePath();return yield(r?rK:tK)(i,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return h_(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(XY.EOL)}addCodeBlock(e,r){let i=Object.assign({},r&&{lang:r}),n=this.wrap("pre",this.wrap("code",e),i);return this.addRaw(n).addEOL()}addList(e,r=!1){let i=r?"ol":"ul",n=e.map(o=>this.wrap("li",o)).join(""),s=this.wrap(i,n);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(n=>{let s=n.map(o=>{if(typeof o=="string")return this.wrap("td",o);let{header:a,data:u,colspan:l,rowspan:c}=o,f=a?"th":"td",d=Object.assign(Object.assign({},l&&{colspan:l}),c&&{rowspan:c});return this.wrap(f,u,d)}).join("");return this.wrap("tr",s)}).join(""),i=this.wrap("table",r);return this.addRaw(i).addEOL()}addDetails(e,r){let i=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(i).addEOL()}addImage(e,r,i){let{width:n,height:s}=i||{},o=Object.assign(Object.assign({},n&&{width:n}),s&&{height:s}),a=this.wrap("img",null,Object.assign({src:e,alt:r},o));return this.addRaw(a).addEOL()}addHeading(e,r){let i=`h${r}`,n=["h1","h2","h3","h4","h5","h6"].includes(i)?i:"h1",s=this.wrap(n,e);return this.addRaw(s).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let i=Object.assign({},r&&{cite:r}),n=this.wrap("blockquote",e,i);return this.addRaw(n).addEOL()}addLink(e,r){let i=this.wrap("a",e,{href:r});return this.addRaw(i).addEOL()}},yI=new g_;Nt.markdownSummary=yI;Nt.summary=yI});var wI=y(jt=>{"use strict";var iK=jt&&jt.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),nK=jt&&jt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),sK=jt&&jt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&iK(e,t,r);return nK(e,t),e};Object.defineProperty(jt,"__esModule",{value:!0});jt.toPlatformPath=jt.toWin32Path=jt.toPosixPath=void 0;var oK=sK(D("path"));function aK(t){return t.replace(/[\\]/g,"/")}jt.toPosixPath=aK;function lK(t){return t.replace(/[/]/g,"\\")}jt.toWin32Path=lK;function uK(t){return t.replace(/[/\\]/g,oK.sep)}jt.toPlatformPath=uK});var y_=y(N=>{"use strict";var cK=N&&N.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),fK=N&&N.__setModuleDefault||(ObjecLine truncated
|
||||
`);return{name:e,version:r}});ce.platform=qI.default.platform();ce.arch=qI.default.arch();ce.isWindows=ce.platform==="win32";ce.isMacOS=ce.platform==="darwin";ce.isLinux=ce.platform==="linux";function jK(){return mf(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield ce.isWindows?qK():ce.isMacOS?GK():NK()),{platform:ce.platform,arch:ce.arch,isWindows:ce.isWindows,isMacOS:ce.isMacOS,isLinux:ce.isLinux})})}ce.getDetails=jK});var Yr=y(M=>{"use strict";var WK=M&&M.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),$K=M&&M.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),S_=M&&M.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&WK(e,t,r);return $K(e,t),e},NI=M&&M.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):n(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})};Object.defineProperty(M,"__esModule",{value:!0});M.platform=M.toPlatformPath=M.toWin32Path=M.toPosixPath=M.markdownSummary=M.summary=M.getIDToken=M.getState=M.saveState=M.group=M.endGroup=M.startGroup=M.info=M.notice=M.warning=M.error=M.debug=M.isDebug=M.setFailed=M.setCommandEcho=M.setOutput=M.getBooleanInput=M.getMultilineInput=M.getInput=M.addPath=M.setSecret=M.exportVariable=M.ExitCode=void 0;var wr=lI(),Un=fI(),ro=nf(),jI=S_(D("os")),zK=S_(D("path")),HK=_I(),v_;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(v_||(M.ExitCode=v_={}));function VK(t,e){let r=(0,ro.toCommandValue)(e);if(process.env[t]=r,process.env.GITHUB_ENV||"")return(0,Un.issueFileCommand)("ENV",(0,Un.prepareKeyValueMessage)(t,e));(0,wr.issueCommand)("set-env",{name:t},r)}M.exportVariable=VK;function JK(t){(0,wr.issueCommand)("add-mask",{},t)}M.setSecret=JK;function YK(t){process.env.GITHUB_PATH||""?(0,Un.issueFileCommand)("PATH",t):(0,wr.issueCommand)("add-path",{},t),process.env.PATH=`${t}${zK.delimiter}${process.env.PATH}`}M.addPath=YK;function T_(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}M.getInput=T_;function KK(t,e){let r=T_(t,e).split(`
|
||||
`).filter(i=>i!=="");return e&&e.trimWhitespace===!1?r:r.map(i=>i.trim())}M.getMultilineInput=KK;function ZK(t,e){let r=["true","True","TRUE"],i=["false","False","FALSE"],n=T_(t,e);if(r.includes(n))return!0;if(i.includes(n))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}M.getBooleanInput=ZK;function QK(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,Un.issueFileCommand)("OUTPUT",(0,Un.prepareKeyValueMessage)(t,e));process.stdout.write(jI.EOL),(0,wr.issueCommand)("set-output",{name:t},(0,ro.toCommandValue)(e))}M.setOutput=QK;function XK(t){(0,wr.issue)("echo",t?"on":"off")}M.setCommandEcho=XK;function eZ(t){process.exitCode=v_.Failure,WI(t)}M.setFailed=eZ;function tZ(){return process.env.RUNNER_DEBUG==="1"}M.isDebug=tZ;function rZ(t){(0,wr.issueCommand)("debug",{},t)}M.debug=rZ;function WI(t,e={}){(0,wr.issueCommand)("error",(0,ro.toCommandProperties)(e),t instanceof Error?t.toString():t)}M.error=WI;function iZ(t,e={}){(0,wr.issueCommand)("warning",(0,ro.toCommandProperties)(e),t instanceof Error?t.toString():t)}M.warning=iZ;function nZ(t,e={}){(0,wr.issueCommand)("notice",(0,ro.toCommandProperties)(e),t instanceof Error?t.toString():t)}M.notice=nZ;function sZ(t){process.stdout.write(t+jI.EOL)}M.info=sZ;function $I(t){(0,wr.issue)("group",t)}M.startGroup=$I;function zI(){(0,wr.issue)("endgroup")}M.endGroup=zI;function oZ(t,e){return NI(this,void 0,void 0,function*(){$I(t);let r;try{r=yield e()}finally{zI()}return r})}M.group=oZ;function aZ(t,e){if(process.env.GITHUB_STATE||"")return(0,Un.issueFileCommand)("STATE",(0,Un.prepareKeyValueMessage)(t,e));(0,wr.issueCommand)("save-state",{name:t},(0,ro.toCommandValue)(e))}M.saveState=aZ;function lZ(t){return process.env[`STATE_${t}`]||""}M.getState=lZ;function uZ(t){return NI(this,void 0,void 0,function*(){return yield HK.OidcClient.getIDToken(t)})}M.getIDToken=uZ;var cZ=m_();Object.defineProperty(M,"summary",{enumerable:!0,get:function(){return cZ.summary}});var fZ=m_();Object.defineProperty(M,"markdownSummary",{enumerable:!0,get:function(){return fZ.markdownSummary}});var A_=wI();Object.defineProperty(M,"toPosixPath",{enumerable:!0,get:function(){return A_.toPosixPath}});Object.defineProperty(M,"toWin32Path",{enumerable:!0,get:function(){return A_.toWin32Path}});Object.defineProperty(M,"toPlatformPath",{enumerable:!0,get:function(){return A_.toPlatformPath}});M.platform=S_(GI())});var O_=y(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.checkArtifactFilePath=io.checkArtifactName=void 0;var dZ=Yr(),R_=new Map([['"',' Double quote "'],[":"," Colon :"],["<"," Less than <"],[">"," Greater than >"],["|"," Vertical bar |"],["*"," Asterisk *"],["?"," Question mark ?"],["\r"," Carriage return \\r"],[`
|
||||
`," Line feed \\n"]]),HI=new Map([...R_,["\\"," Backslash \\"],["/"," Forward slash /"]]);function hZ(t){if(!t)throw new Error(`Artifact name: ${t}, is incorrectly provided`);for(let[e,r]of HI)if(t.includes(e))throw new Error(`Artifact name is not valid: ${t}. Contains the following character: ${r}
|
||||
|
||||
Invalid characters include: ${Array.from(HI.values()).toString()}
|
||||
|
||||
These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);(0,dZ.info)("Artifact name is valid!")}io.checkArtifactName=hZ;function pZ(t){if(!t)throw new Error(`Artifact path: ${t}, is incorrectly provided`);for(let[e,r]of R_)if(t.includes(e))throw new Error(`Artifact path is not valid: ${t}. Contains the following character: ${r}
|
||||
|
||||
Invalid characters include: ${Array.from(R_.values()).toString()}
|
||||
|
||||
The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.
|
||||
`)}io.checkArtifactFilePath=pZ});var VI=y(Zr=>{"use strict";var gZ=Zr&&Zr.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),mZ=Zr&&Zr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),_Z=Zr&&Zr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&gZ(e,t,r);return mZ(e,t),e};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.getUploadSpecification=void 0;var _f=_Z(D("fs")),yZ=Yr(),Xa=D("path"),wZ=O_();function bZ(t,e,r){let i=[];if(!_f.existsSync(e))throw new Error(`Provided rootDirectory ${e} does not exist`);if(!_f.statSync(e).isDirectory())throw new Error(`Provided rootDirectory ${e} is not a valid directory`);e=(0,Xa.normalize)(e),e=(0,Xa.resolve)(e);for(let n of r){if(!_f.existsSync(n))throw new Error(`File ${n} does not exist`);if(_f.statSync(n).isDirectory())(0,yZ.debug)(`Removing ${n} from rawSearchResults because it is a directory`);else{if(n=(0,Xa.normalize)(n),n=(0,Xa.resolve)(n),!n.startsWith(e))throw new Error(`The rootDirectory: ${e} is not a parent directory of the file: ${n}`);let s=n.replace(e,"");(0,wZ.checkArtifactFilePath)(s),i.push({absoluteFilePath:n,uploadFilePath:(0,Xa.join)(t,s)})}}return i}Zr.getUploadSpecification=bZ});var fC=y((Zne,vi)=>{var Se=D("fs"),wf=D("os"),st=D("path"),JI=D("crypto"),Qr={fs:Se.constants,os:wf.constants},YI="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",XI=/XXXXXX/,EZ=3,eC=(Qr.O_CREAT||Qr.fs.O_CREAT)|(Qr.O_EXCL||Qr.fs.O_EXCL)|(Qr.O_RDWR||Qr.fs.O_RDWR),vZ=wf.platform()==="win32",SZ=Qr.EBADF||Qr.os.errno.EBADF,TZ=Qr.ENOENT||Qr.os.errno.ENOENT,tC=448,rC=384,AZ="exit",no=[],iC=Se.rmdirSync.bind(Se),nC=!1;function RZ(t,e){return Se.rm(t,{recursive:!0},e)}function sC(t){return Se.rmSync(t,{recursive:!0})}function k_(t,e){let r=so(t,e),i=r[0],n=r[1];UZ(i,function(s,o){if(s)return n(s);let a=o.tries;(function u(){try{let l=aC(o);Se.stat(l,function(c){if(!c)return a-- >0?u():n(new Error("Could not get a unique tmp filename, max tries reached "+l));n(null,l)})}catch(l){n(l)}})()})}function I_(t){let e=so(t),r=e[0],i=LZ(r),n=i.tries;do{let s=aC(i);try{Se.statSync(s)}catch{return s}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function OZ(t,e){let r=so(t,e),i=r[0],n=r[1];k_(i,function(o,a){if(o)return n(o);Se.open(a,eC,i.mode||rC,function(l,c){if(l)return n(l);if(i.discardDescriptor)return Se.close(c,function(d){return n(d,a,void 0,D_(a,-1,i,!1))});{let f=i.discardDescriptor||i.detachDescriptor;n(null,a,c,D_(a,f?-1:c,i,!1))}})})}function DZ(t){let e=so(t),r=e[0],i=r.discardDescriptor||r.detachDescriptor,n=I_(r),s=Se.openSync(n,eC,r.mode||rC);return r.discardDescriptor&&(Se.closeSync(s),s=void 0),{name:n,fd:s,removeCallback:D_(n,i?-1:s,r,!0)}}function PZ(t,e){let r=so(t,e),i=r[0],n=r[1];k_(i,function(o,a){if(o)return n(o);Se.mkdir(a,i.mode||tC,function(l){if(l)return n(l);n(null,a,oC(a,i,!1))})})}function kZ(t){let e=so(t),r=e[0],i=I_(r);return Se.mkdirSync(i,r.mode||tC),{name:i,removeCallback:oC(i,r,!0)}}function IZ(t,e){let r=function(i){if(i&&!P_(i))return e(i);e()};0<=t[0]?Se.close(t[0],function(){Se.unlink(t[1],r)}):Se.unlink(t[1],r)}function CZ(t){let e=null;try{0<=t[0]&&Se.closeSync(t[0])}catch(r){if(!MZ(r)&&!P_(r))throw r}finally{try{Se.unlinkSync(t[1])}catch(r){P_(r)||(e=r)}}if(e!==null)throw e}function D_(t,e,r,i){let n=yf(CZ,[e,t],i),s=yf(IZ,[e,t],i,n);return r.keep||no.unshift(n),i?n:s}function oC(t,e,r){let i=e.unsafeCleanup?RZ:Se.rmdir.bind(Se),n=e.unsafeCleanup?sC:iC,s=yf(n,t,r),o=yf(i,t,r,s);return e.keep||no.unshift(s),r?s:o}function yf(t,e,r,i){let n=!1;return function s(o){if(!n){let a=i||s,u=no.indexOf(a);return u>=0&&no.splice(u,1),n=!0,r||t===iC||t===sC?t(e):t(e,o||function(){})}}}function FZ(){if(nC)for(;no.length;)try{no[0]()}catch{}}function KI(t){let e=[],r=null;try{r=JI.randomBytes(t)}catch{r=JI.pseudoRandomBytes(t)}for(let i=0;i<t;i++)e.push(YI[r[i]%YI.length]);return e.join("")}function tr(t){return typeof t>"u"}function so(t,e){if(typeof t=="function")return[{},t];if(tr(t))return[{},e];let r={};for(let i of Object.getOwnPropertyNames(t))r[i]=t[i];return[r,e]}function xZ(t,e,r){let i=st.isAbsolute(t)?t:st.join(e,t);Se.stat(i,function(n){n?Se.realpath(st.dirname(i),function(s,o){if(s)return r(s);r(null,st.join(o,st.basename(i)))}):Se.realpath(st,r)})}function BZ(t,e){let r=st.isAbsolute(t)?t:st.join(e,t);try{return Se.statSync(r),Se.realpathSync(r)}catch{let n=Se.realpathSync(st.dirname(r));return st.join(n,st.basename(r))}}function aC(t){let e=t.tmpdir;if(!tr(t.name))return st.join(e,t.dir,t.name);if(!tr(t.template))return st.join(e,t.dir,t.tem
Line truncated
|
||||
Status Code: ${t.message.statusCode}
|
||||
Status Message: ${t.message.statusMessage}
|
||||
Header Information: ${JSON.stringify(t.message.headers,void 0,2)}
|
||||
###### End Diagnostic HTTP information ######`)}K.displayHttpDiagnostics=_Q;function yQ(t){return ao(this,void 0,void 0,function*(){for(let e of t)yield bf.promises.mkdir(e,{recursive:!0})})}K.createDirectoriesForArtifact=yQ;function wQ(t){return ao(this,void 0,void 0,function*(){for(let e of t)yield(yield bf.promises.open(e,"w")).close()})}K.createEmptyFilesForArtifact=wQ;function bQ(t){return ao(this,void 0,void 0,function*(){let e=yield bf.promises.stat(t);return(0,Mn.debug)(`${t} size:(${e.size}) blksize:(${e.blksize}) blocks:(${e.blocks})`),e.size})}K.getFileSize=bQ;function EQ(t){return ao(this,void 0,void 0,function*(){yield bf.promises.unlink(t)})}K.rmFile=EQ;function vQ(t,e){if(t<0)throw new Error("Invalid retention, minimum value is 1.");let r=t;if(e){let i=parseInt(e);!isNaN(i)&&i<r&&((0,Mn.warning)(`Retention days is greater than the max value allowed by the repository setting, reduce retention to ${i} days`),r=i)}return r}K.getProperRetention=vQ;function SQ(t){return ao(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}K.sleep=SQ;function TQ(t){return ao(this,void 0,void 0,function*(){return new Promise((e,r)=>{let i=new nQ.default,n=rQ.default.createHash("md5");t.on("data",s=>{i.update(s),n.update(s)}).on("end",()=>e({crc64:i.digest("base64"),md5:n.digest("base64")})).on("error",r)})})}K.digestForStream=TQ});var B_=y(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.StatusReporter=void 0;var gC=Yr(),x_=class{constructor(e){this.totalNumberOfFilesToProcess=0,this.processedCount=0,this.largeFiles=new Map,this.totalFileStatus=void 0,this.displayFrequencyInMilliseconds=e}setTotalNumberOfFilesToProcess(e){this.totalNumberOfFilesToProcess=e,this.processedCount=0}start(){this.totalFileStatus=setInterval(()=>{let e=this.formatPercentage(this.processedCount,this.totalNumberOfFilesToProcess);(0,gC.info)(`Total file count: ${this.totalNumberOfFilesToProcess} ---- Processed file #${this.processedCount} (${e.slice(0,e.indexOf(".")+2)}%)`)},this.displayFrequencyInMilliseconds)}updateLargeFileStatus(e,r,i,n){let s=this.formatPercentage(i,n);(0,gC.info)(`Uploaded ${e} (${s.slice(0,s.indexOf(".")+2)}%) bytes ${r}:${i}`)}stop(){this.totalFileStatus&&clearInterval(this.totalFileStatus)}incrementProcessedCount(){this.processedCount++}formatPercentage(e,r){return(e/r*100).toFixed(4).toString()}};Ef.StatusReporter=x_});var L_=y(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.HttpManager=void 0;var mC=lo(),U_=class{constructor(e,r){if(e<1)throw new Error("There must be at least one client");this.userAgent=r,this.clients=new Array(e).fill((0,mC.createHttpClient)(r))}getClient(e){return this.clients[e]}disposeAndReplaceClient(e){this.clients[e].dispose(),this.clients[e]=(0,mC.createHttpClient)(this.userAgent)}disposeAndReplaceAllClients(){for(let[e]of this.clients.entries())this.disposeAndReplaceClient(e)}};vf.HttpManager=U_});var wC=y(At=>{"use strict";var AQ=At&&At.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),RQ=At&&At.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),_C=At&&At.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&AQ(e,t,r);return RQ(e,t),e},Sf=At&&At.__awaiter||function(t,e,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):n(c.value).then(a,u)}l((i=i.apply(t,e||[])).next())})},OQ=At&&At.__asyncValues||function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(s){r[s]=t[s]&&function(o){return new Promise(function(a,u){o=t[s](o),n(a,u,o.done,o.value)})}}function n(s,o,a,u){Promise.resolve(u).then(function(l){s({value:l,done:a})},o)}};Object.defineProperty(At,"__esModule",{value:!0});At.createGZipFileInBuffer=At.createGZipFileOnDisk=void 0;var Tf=_C(D("fs")),yC=_C(D("zlib")),DQ=D("util"),PQ=(0,DQ.promisify)(Tf.stat),kQ=[".gz",".gzip",".tgz",".taz",".Z",".taZ",".bz2",".tbz",".tbz2",".tz2",".lz",".lzma",".tlz",".lzo",".xz",".txz",".zst",".zstd",".tzst",".zip",".7z"];function IQ(t,e){return Sf(this,void 0,void 0,function*(){for(let r of kQ)if(t.endsWith(r))return Number.MAX_SAFE_INTEGER;return new Promise((r,i)=>{let n=Tf.createReadStream(t),s=yC.createGzip(),o=Tf.createWriteStrea
Line truncated
|
||||
For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`),(0,aX.checkArtifactName)(e);let s=(0,sX.getUploadSpecification)(e,i,r),o={artifactName:e,artifactItems:[],size:0,failedItems:[]},a=new oX.UploadHttpClient;if(s.length===0)Jt.warning("No files found that can be uploaded");else{let u=yield a.createArtifactInFileContainer(e,n);if(!u.fileContainerResourceUrl)throw Jt.debug(u.toString()),new Error("No URL provided by the Artifact Service to upload an artifact to");Jt.debug(`Upload Resource URL: ${u.fileContainerResourceUrl}`),Jt.info(`Container for artifact "${e}" successfully created. Starting upload of file(s)`);let l=yield a.uploadArtifactToFileContainer(u.fileContainerResourceUrl,s,n);Jt.info("File upload process has finished. Finalizing the artifact upload"),yield a.patchArtifactSize(l.totalSize,e),l.failedItems.length>0?Jt.info(`Upload finished. There were ${l.failedItems.length} items that failed to upload`):Jt.info("Artifact has been finalized. All files have been successfully uploaded!"),Jt.info(`
|
||||
The raw size of all the files that were specified for upload is ${l.totalSize} bytes
|
||||
The size of all the files that were uploaded is ${l.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage
|
||||
|
||||
Note: The size of downloaded zips can differ significantly from the reported size. For more information see: https://github.com/actions/upload-artifact#zipped-artifact-downloads \r
|
||||
`),o.artifactItems=s.map(c=>c.absoluteFilePath),o.size=l.uploadSize,o.failedItems=l.failedItems}return o})}downloadArtifact(e,r,i){return z_(this,void 0,void 0,function*(){let n=new FC.DownloadHttpClient,s=yield n.listArtifacts();if(s.count===0)throw new Error("Unable to find any artifacts for the associated workflow");let o=s.value.find(l=>l.name===e);if(!o)throw new Error(`Unable to find an artifact with the name: ${e}`);let a=yield n.getContainerItems(o.name,o.fileContainerResourceUrl);r||(r=(0,BC.getWorkSpaceDirectory)()),r=(0,Df.normalize)(r),r=(0,Df.resolve)(r);let u=(0,xC.getDownloadSpecification)(e,a.value,r,i?.createArtifactFolder||!1);return u.filesToDownload.length===0?Jt.info(`No downloadable files were found for the artifact: ${o.name}`):(yield(0,Of.createDirectoriesForArtifact)(u.directoryStructure),Jt.info("Directory structure has been set up for the artifact"),yield(0,Of.createEmptyFilesForArtifact)(u.emptyFilesToCreate),yield n.downloadSingleArtifact(u.filesToDownload)),{artifactName:e,downloadPath:u.rootDownloadLocation}})}downloadAllArtifacts(e){return z_(this,void 0,void 0,function*(){let r=new FC.DownloadHttpClient,i=[],n=yield r.listArtifacts();if(n.count===0)return Jt.info("Unable to find any artifacts for the associated workflow"),i;e||(e=(0,BC.getWorkSpaceDirectory)()),e=(0,Df.normalize)(e),e=(0,Df.resolve)(e);let s=0;for(;s<n.count;){let o=n.value[s];s+=1,Jt.info(`starting download of artifact ${o.name} : ${s}/${n.count}`);let a=yield r.getContainerItems(o.name,o.fileContainerResourceUrl),u=(0,xC.getDownloadSpecification)(o.name,a.value,e,!0);u.filesToDownload.length===0?Jt.info(`No downloadable files were found for any artifact ${o.name}`):(yield(0,Of.createDirectoriesForArtifact)(u.directoryStructure),yield(0,Of.createEmptyFilesForArtifact)(u.emptyFilesToCreate),yield r.downloadSingleArtifact(u.filesToDownload)),i.push({artifactName:o.name,downloadPath:u.rootDownloadLocation})}return i})}};vr.DefaultArtifactClient=H_});var LC=y(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.create=void 0;var lX=UC();function uX(){return lX.DefaultArtifactClient.create()}Pf.create=uX});var MC=Rl(nI()),qC=Rl(LC()),Si=Rl(ot()),GC=Rl(wm());import*as Rt from"fs";import*as Yt from"path";function cX(t){return t.replace(/[^a-zA-Z0-9_-]+/g,"")}async function vse(t,e,r){let i=Ny();process.env.CODEQL_ACTION_DEBUG_COMBINED_SARIF==="true"&&await Ol("Uploading combined SARIF debug artifact",async()=>{t.info("Uploading available combined SARIF files as Actions debugging artifact...");let n=Yt.resolve(i,"combined-sarif"),s=[];if(Rt.existsSync(n)){let o=Rt.readdirSync(n);for(let a of o){let u=Rt.readdirSync(Yt.resolve(n,a)).filter(l=>Yt.extname(l)===".sarif");for(let l of u)s.push(Yt.resolve(n,a,l))}}try{await NC(t,s,n,"combined-sarif-artifacts",e,r)}catch(o){t.warning(`Failed to upload combined SARIF files as Actions debugging artifact. Reason: ${nn(o)}`)}})}function fX(t,e,r){try{let i=process.env.CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR;if(i!==void 0&&Rt.existsSync(i)&&Rt.lstatSync(i).isDirectory()){let n=Yt.resolve(i,`${e}.sarif`);if(Rt.existsSync(n)){let s=Yt.resolve(t.dbLocation,`${e}.sarif`);return Rt.copyFileSync(n,s),s}}}catch(i){r.warning(`Failed to find SARIF results path for ${e}. Reason: ${nn(i)}`)}}async function dX(t,e,r,i){try{if($y(e,r,i))try{return await _X(t,e,r)}catch(n){i.warning(`Failed to bundle database for ${r} using the CLI. Falling back to a partial bundle. Reason: ${nn(n)}`)}return await mX(e,r)}catch(n){i.warning(`Failed to bundle database for ${r}. Reason: ${nn(n)}`);return}}async function Sse(t,e,r,i){let n=[];try{for(let s of e.languages)await Ol(`Uploading debug artifacts for ${s}`,async()=>{r.info("Preparing SARIF result debug artifact...");let o=fX(e,s,r);o&&(n.push(o),r.info("SARIF result debug artifact ready for upload.")),r.info("Preparing database logs debug artifact...");let a=Nf(e,s),u=Yt.resolve(a,"log");jf(u)&&(n.push(...Wf(u)),r.info("Database logs debug artifact ready for upload.")),r.info("Preparing database cluster logs debug artifact...");let l=Yt.resolve(e.dbLocation,"log");jf(l)&&(n.push(...Wf(l)),r.info("Database cluster logs debug artifact ready for upload.")),r.info("Preparing database bundle debug artifact...");let c=await dX(t,e,s,r);c&&(n.push(c),r.info("Database bundle debug artifact ready for upload."))})}catch(s){r.warning(`Failed to prepare debug artifacts. Reason: ${nn(s)}`);return}try{await Ol("Uploading debug artifacts",async()=>NC(r,n,e.dbLocation,e.debugArtifactName,e.gitHubVersion.type,i))}catch(s){r.warning(`Failed to upload debug artifacts. Reason: ${nn(s)}`)}}function hX(t){let e="";if(t)try{let r=JSON.parse(t);if(Ly(r))for(let i of Object.keys(r).sort())e+=`-${r[i]}`;else Si.warning("User-specified `matrix` input is not an object.")}catch{Si.warning("Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.")}return e}async function NC(t,e,r,i,n,s){return
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
normalize-path/index.js:
|
||||
(*!
|
||||
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
||||
*
|
||||
* Copyright (c) 2014-2018, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*)
|
||||
|
||||
archiver/lib/error.js:
|
||||
archiver/lib/core.js:
|
||||
(**
|
||||
* Archiver Core
|
||||
*
|
||||
* @ignore
|
||||
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
||||
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
||||
*)
|
||||
|
||||
crc-32/crc32.js:
|
||||
(*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
|
||||
|
||||
zip-stream/index.js:
|
||||
(**
|
||||
* ZipStream
|
||||
*
|
||||
* @ignore
|
||||
* @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
|
||||
* @copyright (c) 2014 Chris Talkington, contributors.
|
||||
*)
|
||||
|
||||
archiver/lib/plugins/zip.js:
|
||||
(**
|
||||
* ZIP Format Plugin
|
||||
*
|
||||
* @module plugins/zip
|
||||
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
||||
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
||||
*)
|
||||
|
||||
archiver/lib/plugins/tar.js:
|
||||
(**
|
||||
* TAR Format Plugin
|
||||
*
|
||||
* @module plugins/tar
|
||||
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
||||
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
||||
*)
|
||||
|
||||
archiver/lib/plugins/json.js:
|
||||
(**
|
||||
* JSON Format Plugin
|
||||
*
|
||||
* @module plugins/json
|
||||
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
||||
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
||||
*)
|
||||
|
||||
archiver/index.js:
|
||||
(**
|
||||
* Archiver Vending
|
||||
*
|
||||
* @ignore
|
||||
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
||||
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
||||
*)
|
||||
|
||||
tmp/lib/tmp.js:
|
||||
(*!
|
||||
* Tmp
|
||||
*
|
||||
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
|
||||
*
|
||||
* MIT Licensed
|
||||
*)
|
||||
*/
|
||||
@@ -0,0 +1,30 @@
|
||||
import { createRequire as __codeqlCreateRequire } from "module";import { fileURLToPath as __codeqlFileURLToPath } from "url";import { dirname as __codeqlDirname } from "path";var require = __codeqlCreateRequire(import.meta.url);var __filename = __codeqlFileURLToPath(import.meta.url);var __dirname = __codeqlDirname(__filename);
|
||||
import{a as Ae}from"./chunk-2R674E4A.js";import{h as ve}from"./chunk-LYJYPMC2.js";import{Aa as fe,K as B,Lb as be,M as L,N as Y,O as R,Oa as ce,P as ee,Ra as G,Ta as pe,V as te,Va as le,Xa as ue,Y as ie,Z as re,Za as he,ab as me,b as ze,bb as ge,c as J,cb as ye,cc as we,fa as ne,ia as oe,k as Ve,l as We,r as X,ra as M,sa as se,sb as z,ta as K,va as ae,za as de}from"./chunk-V6LGBXSF.js";var De=ze((Dt,at)=>{at.exports={$schema:"https://json-schema.org/draft/2020-12/schema",title:"Static Analysis Results Format (SARIF) Version 2.1.0 JSON Schema",$id:"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",description:"Static Analysis Results Format (SARIF) Version 2.1.0 JSON Schema: a standard format for the output of static analysis tools.",additionalProperties:!1,type:"object",properties:{$schema:{description:"The URI of the JSON schema corresponding to the version.",type:"string",format:"uri"},version:{description:"The SARIF format version of this log file.",enum:["2.1.0"],type:"string"},runs:{description:"The set of runs contained in this log file.",type:["array","null"],minItems:0,uniqueItems:!1,items:{$ref:"#/definitions/run"}},inlineExternalProperties:{description:"References to external property files that share data between runs.",type:"array",minItems:0,uniqueItems:!0,items:{$ref:"#/definitions/externalProperties"}},properties:{description:"Key/value pairs that provide additional information about the log file.",$ref:"#/definitions/propertyBag"}},required:["version","runs"],definitions:{address:{description:"A physical or virtual address, or a range of addresses, in an 'addressable region' (memory or a binary file).",additionalProperties:!1,type:"object",properties:{absoluteAddress:{description:"The address expressed as a byte offset from the start of the addressable region.",type:"integer",minimum:-1,default:-1},relativeAddress:{description:"The address expressed as a byte offset from the absolute address of the top-most parent object.",type:"integer"},length:{description:"The number of bytes in this range of addresses.",type:"integer"},kind:{description:"An open-ended string that identifies the address kind. 'data', 'function', 'header','instruction', 'module', 'page', 'section', 'segment', 'stack', 'stackFrame', 'table' are well-known values.",type:"string"},name:{description:"A name that is associated with the address, e.g., '.text'.",type:"string"},fullyQualifiedName:{description:"A human-readable fully qualified name that is associated with the address.",type:"string"},offsetFromParent:{description:"The byte offset of this address from the absolute or relative address of the parent object.",type:"integer"},index:{description:"The index within run.addresses of the cached object for this address.",type:"integer",default:-1,minimum:-1},parentIndex:{description:"The index within run.addresses of the parent object.",type:"integer",default:-1,minimum:-1},properties:{description:"Key/value pairs that provide additional information about the address.",$ref:"#/definitions/propertyBag"}}},artifact:{description:"A single artifact. In some cases, this artifact might be nested within another artifact.",additionalProperties:!1,type:"object",properties:{description:{description:"A short description of the artifact.",$ref:"#/definitions/message"},location:{description:"The location of the artifact.",$ref:"#/definitions/artifactLocation"},parentIndex:{description:"Identifies the index of the immediate parent of the artifact, if this artifact is nested.",type:"integer",default:-1,minimum:-1},offset:{description:"The offset in bytes of the artifact within its containing artifact.",type:"integer",minimum:0},length:{description:"The length of the artifact in bytes.",type:"integer",default:-1,minimum:-1},roles:{description:"The role or roles played by the artifact in the analysis.",type:"array",minItems:0,uniqueItems:!0,default:[],items:{enum:["analysisTarget","attachment","responseFile","resultFile","standardStream","tracedFile","unmodified","modified","added","deleted","renamed","uncontrolled","driver","extension","translation","taxonomy","policy","referencedOnCommandLine","memoryContents","directory","userSpecifiedConfiguration","toolSpecifiedConfiguration","debugOutputFile"],type:"string"}},mimeType:{description:"The MIME type (RFC 2045) of the artifact.",type:"string",pattern:"[^/]+/.+"},contents:{description:"The contents of the artifact.",$ref:"#/definitions/artifactContent"},encoding:{description:"Specifies the encoding for an artifact object that refers to a text file.",type:"string"},sourceLanguage:{description:"Specifies the source language for any artifact object that refers to a text file that contains source code.",type:"string"},hashes:{description:"A dictionary, each of whose keys is the name of a hash function and each of whose values is the hashed value of the artifact produced by the specified hash function.",type:"object",additionalProperties:{type:"stringLine truncated
|
||||
`,`
|
||||
`],items:{type:"string"}},columnKind:{description:"Specifies the unit in which the tool measures columns.",enum:["utf16CodeUnits","unicodeCodePoints"],type:"string"},externalPropertyFileReferences:{description:"References to external property files that should be inlined with the content of a root log file.",$ref:"#/definitions/externalPropertyFileReferences"},threadFlowLocations:{description:"An array of threadFlowLocation objects cached at run level.",type:"array",minItems:0,uniqueItems:!0,default:[],items:{$ref:"#/definitions/threadFlowLocation"}},taxonomies:{description:"An array of toolComponent objects relevant to a taxonomy in which results are categorized.",type:"array",minItems:0,uniqueItems:!0,default:[],items:{$ref:"#/definitions/toolComponent"}},addresses:{description:"Addresses associated with this run instance, if any.",type:"array",minItems:0,uniqueItems:!1,default:[],items:{$ref:"#/definitions/address"}},translations:{description:"The set of available translations of the localized data provided by the tool.",type:"array",minItems:0,uniqueItems:!0,default:[],items:{$ref:"#/definitions/toolComponent"}},policies:{description:"Contains configurations that may potentially override both reportingDescriptor.defaultConfiguration (the tool's default severities) and invocation.configurationOverrides (severities established at run-time from the command line).",type:"array",minItems:0,uniqueItems:!0,default:[],items:{$ref:"#/definitions/toolComponent"}},webRequests:{description:"An array of request objects cached at run level.",type:"array",minItems:0,uniqueItems:!0,default:[],items:{$ref:"#/definitions/webRequest"}},webResponses:{description:"An array of response objects cached at run level.",type:"array",minItems:0,uniqueItems:!0,default:[],items:{$ref:"#/definitions/webResponse"}},specialLocations:{description:"A specialLocations object that defines locations of special significance to SARIF consumers.",$ref:"#/definitions/specialLocations"},properties:{description:"Key/value pairs that provide additional information about the run.",$ref:"#/definitions/propertyBag"}},required:["tool"]},runAutomationDetails:{description:"Information that describes a run's identity and role within an engineering system process.",additionalProperties:!1,type:"object",properties:{description:{description:"A description of the identity and role played within the engineering system by this object's containing run object.",$ref:"#/definitions/message"},id:{description:"A hierarchical string that uniquely identifies this object's containing run object.",type:"string"},guid:{description:"A stable, unique identifier for this object's containing run object in the form of a GUID.",type:"string",pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},correlationGuid:{description:"A stable, unique identifier for the equivalence class of runs to which this object's containing run object belongs in the form of a GUID.",type:"string",pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},properties:{description:"Key/value pairs that provide additional information about the run automation details.",$ref:"#/definitions/propertyBag"}}},specialLocations:{description:"Defines locations of special significance to SARIF consumers.",type:"object",additionalProperties:!1,properties:{displayBase:{description:"Provides a suggestion to SARIF consumers to display file paths relative to the specified location.",$ref:"#/definitions/artifactLocation"},properties:{description:"Key/value pairs that provide additional information about the special locations.",$ref:"#/definitions/propertyBag"}}},stack:{description:"A call stack that is relevant to a result.",additionalProperties:!1,type:"object",properties:{message:{description:"A message relevant to this call stack.",$ref:"#/definitions/message"},frames:{description:"An array of stack frames that represents a sequence of calls, rendered in reverse chronological order, that comprise the call stack.",type:"array",minItems:0,uniqueItems:!1,items:{$ref:"#/definitions/stackFrame"}},properties:{description:"Key/value pairs that provide additional information about the stack.",$ref:"#/definitions/propertyBag"}},required:["frames"]},stackFrame:{description:"A function call within a stack trace.",additionalProperties:!1,type:"object",properties:{location:{description:"The location to which this stack frame refers.",$ref:"#/definitions/location"},module:{description:"The name of the module that contains the code of this stack frame.",type:"string"},threadId:{description:"The thread identifier of the stack frame.",type:"integer"},parameters:{description:"The parameters of the call that is executing.",type:"array",minItems:0,uniqueItems:!1,default:[],items:{type:"string",default:[]}},properties:{description:"Key/value pairs that provide additional information about the stack frame.",$ref:"#/definitions/propertyBag"}}},sup
Line truncated
|
||||
${f.join(`
|
||||
`)}`)}return!0}function wt(t,e,i,r,n,a,o,d,f,c,p){let m={commit_oid:t,ref:e,analysis_key:i,analysis_name:r,sarif:n,workflow_run_id:a,workflow_run_attempt:o,checkout_uri:d,environment:f,started_at:process.env.CODEQL_WORKFLOW_STARTED_AT,tool_names:c,base_ref:void 0,base_sha:void 0};if(ae()==="pull_request"){if(t===L("GITHUB_SHA")&&p)m.base_ref=`refs/heads/${L("GITHUB_BASE_REF")}`,m.base_sha=p;else if(process.env.GITHUB_EVENT_PATH){let u=JSON.parse(b.readFileSync(process.env.GITHUB_EVENT_PATH,"utf8"));m.base_ref=`refs/heads/${u.pull_request.base.ref}`,m.base_sha=u.pull_request.base.sha}}return m}async function vt(t,e,i,r,n,a){t.info(`Post-processing sarif files: ${JSON.stringify(r)}`);let o=await pe(),d;if(n=a.fixCategory(t,n),r.length>1){for(let p of r){let m=ke(p);Ne(m,p,t)}d=await ut(r,o,e,t)}else{let p=r[0];d=ke(p),Ne(d,p,t),await Ke([d],o)}d=Lt(t,d),d=await je(d,i,t);let f=await le(),c=M("matrix");return d=ht(d,n,f,c),{sarif:d,analysisKey:f,environment:c}}async function si(t,e,i,r){let n=e||Y("CODEQL_ACTION_SARIF_DUMP_DIR");n!==void 0?xt(JSON.stringify(r.sarif),n,t,i):t.debug("Not writing post-processed SARIF files.")}async function ai(t,e,i,r,n,a){let o=yt(t,a.sarifPredicate);return At(o,e,i,r,n,a)}async function At(t,e,i,r,n,a){let o=await vt(n,r,e,t,i,a);return It(n,e,a,o)}async function It(t,e,i,r){t.startGroup(`Uploading ${i.name} results`);let n=r.sarif,a=Ee(n);t.debug("Validating that each SARIF run has a unique category"),Rt(n,i.sentinelPrefix),t.debug("Serializing SARIF for upload");let o=JSON.stringify(n);t.debug("Compressing serialized SARIF");let d=dt.gzipSync(o).toString("base64"),f=Be.pathToFileURL(e).href,c=i.transformPayload(wt(await me(e),await ye(),r.analysisKey,L("GITHUB_WORKFLOW"),d,de(),fe(),f,r.environment,a,await ge())),p=o.length;t.debug(`Raw upload size: ${p} bytes`);let m=d.length;t.debug(`Base64 zipped upload size: ${m} bytes`);let u=bt(o);t.debug(`Number of results in upload: ${u}`);let y=await gt(c,ce(),t,i);return t.endGroup(),{statusReport:{raw_upload_size_bytes:p,zipped_upload_size_bytes:m,num_results_in_sarif:u},sarifID:y}}function xt(t,e,i,r){if(!b.existsSync(e))b.mkdirSync(e,{recursive:!0});else if(!b.lstatSync(e).isDirectory())throw new R(`The path that processed SARIF files should be written to exists, but is not a directory: ${e}`);let n=T.resolve(e,`upload${r.sarifExtension}`);i.info(`Writing processed SARIF file to ${n}`),b.writeFileSync(n,t)}var $t=5*1e3,Tt=120*1e3;async function di(t,e,i,r={isUnsuccessfulExecution:!1}){i.startGroup("Waiting for processing to finish");try{let n=G(),a=Date.now();for(;;){if(Date.now()>a+Tt){i.warning("Timed out waiting for analysis to finish processing. Continuing.");break}let o;try{o=await n.request("GET /repos/:owner/:repo/code-scanning/sarifs/:sarif_id",{owner:t.owner,repo:t.repo,sarif_id:e})}catch(f){i.warning(`An error occurred checking the status of the delivery. ${f} It should still be processed in the background, but errors that occur during processing may not be reported.`);break}let d=o.data.processing_status;if(i.info(`Analysis upload status is ${d}.`),d==="pending")i.debug("Analysis processing is still pending...");else if(r.isUnsuccessfulExecution){Ft(o,d,i);break}else{if(d==="complete")break;if(d==="failed"){let f=`Code Scanning could not process the submitted SARIF file:
|
||||
${o.data.errors}`,c=o.data.errors;throw St(c)?new R(f):qt(c)?new q(f):new Error(f)}else B(d)}await te($t,{allowProcessExit:!1})}}finally{i.endGroup()}}function St(t){let e=["CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled","rejecting delivery as the repository has too many logical alerts","A delivery cannot contain multiple runs with the same category"];return t.length===1&&e.some(i=>t[0].includes(i))}function qt(t){return t.every(e=>e.startsWith("rejecting SARIF")||e.startsWith("an invalid URI was provided as a SARIF location")||e.startsWith("locationFromSarifResult: expected artifact location")||e.startsWith("could not convert rules: invalid security severity value, is not a number")||/^SARIF URI scheme [^\s]* did not match the checkout URI scheme [^\s]*/.test(e))}function Ft(t,e,i){e==="failed"&&Array.isArray(t.data.errors)&&t.data.errors.length===1&&t.data.errors[0].toString().startsWith("unsuccessful execution")?i.info('Successfully uploaded a SARIF file for the unsuccessful execution. Received expected "unsuccessful execution" processing error, and no other errors.'):e==="failed"?i.warning(`Failed to upload a SARIF file for the unsuccessful execution. Code scanning status information for the repository may be out of date as a result. Processing errors: ${t.data.errors}`):e==="complete"?i.debug('Uploaded a SARIF file for the unsuccessful execution, but did not receive the expected "unsuccessful execution" processing error. This is a known transient issue with the code scanning API, and does not cause out of date code scanning status information.'):B(e)}function Rt(t,e){let i={};for(let r of t.runs||[]){let n=r?.automationDetails?.id,a=r.tool?.driver?.name,o=`${Oe(n)}_${Oe(a)}`;i[o]={id:n,tool:a}}for(let[r,{id:n,tool:a}]of Object.entries(i)){let o=`${e}${r}`;if(process.env[o])throw new R(`Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. The easiest fix is to specify a unique value for the \`category\` input. If .runs[].automationDetails.id is specified in the sarif file, that will take precedence over your configured \`category\`. Category: (${n||"none"}) Tool: (${a||"none"})`);C.exportVariable(o,o)}}function Oe(t){return(t??"_").replace(/[^a-zA-Z0-9_]/g,"_").toLocaleUpperCase()}function Lt(t,e){let i=be(t);if(!i?.length||e.runs===void 0)return e;for(let r of e.runs)r.results&&(r.results=r.results.filter(n=>[...(n.locations||[]).map(o=>o.physicalLocation),...(n.relatedLocations||[]).map(o=>o.physicalLocation)].some(o=>{let d=o?.artifactLocation?.uri,f=o?.region?.startLine;return!d||f===void 0?!1:i.some(c=>c.path===d&&(c.startLine<=f&&c.endLine>=f||c.startLine===0&&c.endLine===0))})));return e}export{q as a,pt as b,Ke as c,ht as d,gt as e,Ge as f,oi as g,ke as h,Ne as i,wt as j,vt as k,si as l,ai as m,It as n,di as o,St as p,qt as q,Rt as r,Lt as s};
|
||||
/*! Bundled license information:
|
||||
|
||||
long/index.js:
|
||||
(**
|
||||
* @license
|
||||
* Copyright 2009 The Closure Library Authors
|
||||
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*)
|
||||
*/
|
||||
Generated
+2
-136977
File diff suppressed because it is too large.
Load diff
Generated
+3
-93005
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
{"type":"module"}
|
||||
Generated
+2
-87798
File diff suppressed because it is too large.
Load diff
Generated
+2
-89620
File diff suppressed because it is too large.
Load diff
Generated
+2
-127995
File diff suppressed because it is too large.
Load diff
Generated
+26
-105058
File diff suppressed because it is too large.
Load diff
Generated
+2
-93735
File diff suppressed because it is too large.
Load diff
Generated
+2
-128020
File diff suppressed because it is too large.
Load diff
Generated
+2
-94427
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user