mirror of https://github.com/aminya/setup-cpp
7 lines
1.4 MiB
JavaScript
7 lines
1.4 MiB
JavaScript
|
var $kC5q1$path=require("path"),$kC5q1$os=require("os"),$kC5q1$fs=require("fs"),$kC5q1$util=require("util"),$kC5q1$assert=require("assert"),$kC5q1$crypto=require("crypto"),$kC5q1$url=require("url"),$kC5q1$buffer=require("buffer"),$kC5q1$stream=require("stream"),$kC5q1$events=require("events"),$kC5q1$timers=require("timers"),$kC5q1$string_decoder=require("string_decoder"),$kC5q1$http=require("http"),$kC5q1$https=require("https"),$kC5q1$zlib=require("zlib"),$kC5q1$child_process=require("child_process");function $parcel$export(e,t,r,i){Object.defineProperty(e,t,{get:r,set:i,enumerable:!0,configurable:!0});}function $parcel$interopDefault(e){return e&&e.__esModule?e.default:e;}var $parcel$global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},parcelRequire=$parcel$global.parcelRequire810d;parcelRequire.register("8L9T2",function(e,t){$parcel$export(e.exports,"setupActionsPython",()=>x);var r=parcelRequire("goj9k"),i=parcelRequire("fSdF9"),a=parcelRequire("hHq4F"),n=parcelRequire("2heqc"),o=parcelRequire("A8hFE"),s=parcelRequire("cLprm"),u=parcelRequire("87la8"),c=parcelRequire("cBC6L"),l=parcelRequire("3WkGD"),p=$kC5q1$path.resolve(__dirname,"../../src/python");function d(e){return e.startsWith("pypy");}async function m(e,t){let r=void 0,i=(0,c.getCacheDistributor)(e,t,r);await i.restoreCache();}let h=!1;async function x(e,t,o){var c;u.IS_MAC&&(process.env.AGENT_TOOLSDIRECTORY="/Users/runner/hostedtoolcache");let l=null===(c=process.env.AGENT_TOOLSDIRECTORY)||void 0===c?void 0:c.trim();if("string"==typeof l&&""!==l&&(process.env.RUNNER_TOOL_CACHE=process.env.AGENT_TOOLSDIRECTORY),(0,n.debug)(`Python is expected to be installed into ${process.env.RUNNER_TOOL_CACHE}`),e){let t;if(d(e)){let r=await(0,i.findPyPyVersion)(e,o,!0,h,!1);t=`${r.resolvedPyPyVersion}-${r.resolvedPythonVersion}`,(0,a.info)(`Successfully set up PyPy ${r.resolvedPyPyVersion} with Python (${r.resolvedPythonVersion})`);}else{let i=await(0,r.useCpythonVersion)(e,o,!0,h,!1);t=i.version,(0,a.info)(`Successfully set up ${i.impl} (${t})`);}if((0,u.isCacheFeatureAvailable)()){let e="pip";await m(e,t);}}s.GITHUB_ACTIONS&&(await f());}async function f(){let e=(0,o.join)(p,"python_matcher.json");if(!(await(0,l.pathExists)(e)))return(0,a.warning)("the python_matcher.json file does not exist in the same folder as setup-cpp.js");(0,a.info)(`::add-matcher::${e}`);}}),parcelRequire.register("goj9k",function(e,t){$parcel$export(e.exports,"useCpythonVersion",()=>u);var r=parcelRequire("87la8"),i=parcelRequire("lqN0l"),a=parcelRequire("aZ4db"),n=parcelRequire("2heqc"),o=parcelRequire("9aCWy");function s(e){return r.IS_WINDOWS?$kC5q1$path.join(e,"Scripts"):$kC5q1$path.join(e,"bin");}async function u(e,t,u,d,m){let h=null,x=c(e),f=p(x,m);if(n.debug(`Semantic version spec of ${e} is ${f}`),d){var g;h=await a.getManifest();let e=null===(g=await a.findReleaseFromManifest(f,t,h))||void 0===g?void 0:g.version;e?(f=e,n.info(`Resolved as '${f}'`)):n.info(`Failed to resolve version ${f} from manifest`);}let D=o.find("Python",f,t);if(!D){n.info(`Version ${f} was not found in the local cache`);let e=await a.findReleaseFromManifest(f,t,h);e&&e.files&&e.files.length>0&&(n.info(`Version ${f} is available for downloading`),await a.installCpythonFromRelease(e),D=o.find("Python",f,t));}if(!D){let i=await(0,r.getOSInfo)();throw Error([`The version '${e}' with architecture '${t}' was not found for ${i?`${i.osName} ${i.osVersion}`:"this operating system"}.`,`The list of all available versions can be found here: ${a.MANIFEST_URL}`].join($kC5q1$os.EOL));}let y=s(D),b=r.IS_WINDOWS?".exe":"",v=$kC5q1$path.join(r.IS_WINDOWS?D:y,`python${b}`);if(u){if(n.exportVariable("pythonLocation",D),n.exportVariable("PKG_CONFIG_PATH",D+"/lib/pkgconfig"),n.exportVariable("pythonLocation",D),n.exportVariable("Python_ROOT_DIR",D),n.exportVariable("Python2_ROOT_DIR",D),n.exportVariable("Python3_ROOT_DIR",D),n.exportVariable("PKG_CONFIG_PATH",D+"/lib/pkgconfig"),r.IS_LINUX){let e=process.env.LD_LIBRARY_PATH?`:${process.env.
|
||
|
Other caches with similar key:`),(null==t?void 0:t.artifactCaches)||[]))o.debug(`Cache Key: ${null==i?void 0:i.cacheKey}, Cache Version: ${null==i?void 0:i.cacheVersion}, Cache Scope: ${null==i?void 0:i.scope}, Cache Created: ${null==i?void 0:i.creationTime}`);}});}function E(e,t,r){return n(this,void 0,void 0,function*(){let i=new $kC5q1$url.URL(e),a=(0,m.getDownloadOptions)(r);a.useAzureSdk&&i.hostname.endsWith(".blob.core.windows.net")?yield(0,d.downloadCacheStorageSDK)(e,t,a):yield(0,d.downloadCacheHttpClient)(e,t);});}function A(e,t,r){return n(this,void 0,void 0,function*(){let i=y(),a=b(t,null==r?void 0:r.compressionMethod,null==r?void 0:r.enableCrossOsArchive),o={key:e,version:a,cacheSize:null==r?void 0:r.cacheSize},s=yield(0,h.retryTypedResponse)("reserveCache",()=>n(this,void 0,void 0,function*(){return i.postJson(f("caches"),o);}));return s;});}function S(e,t){return`bytes ${e}-${t}/*`;}function B(e,t,r,i,a){return n(this,void 0,void 0,function*(){o.debug(`Uploading chunk of size ${a-i+1} bytes at offset ${i} with content range: ${S(i,a)}`);let s={"Content-Type":"application/octet-stream","Content-Range":S(i,a)},u=yield(0,h.retryHttpClientResponse)(`uploadChunk (start: ${i}, end: ${a})`,()=>n(this,void 0,void 0,function*(){return e.sendStream("PATCH",t,r(),s);}));if(!(0,h.isSuccessStatusCode)(u.message.statusCode))throw Error(`Cache service responded with ${u.message.statusCode} during upload chunk.`);});}function N(e,t,r,i){return n(this,void 0,void 0,function*(){let a=p.getArchiveFileSizeInBytes(r),s=f(`caches/${t.toString()}`),u=l.openSync(r,"r"),c=(0,m.getUploadOptions)(i),d=p.assertDefined("uploadConcurrency",c.uploadConcurrency),h=p.assertDefined("uploadChunkSize",c.uploadChunkSize),x=[...Array(d).keys()];o.debug("Awaiting all uploads");let g=0;try{yield Promise.all(x.map(()=>n(this,void 0,void 0,function*(){for(;g<a;){let t=Math.min(a-g,h),i=g,n=g+t-1;g+=h,yield B(e,s,()=>l.createReadStream(r,{fd:u,start:i,end:n,autoClose:!1}).on("error",e=>{throw Error(`Cache upload failed because file read failed with ${e.message}`);}),i,n);}})));}finally{l.closeSync(u);}});}function F(e,t,r){return n(this,void 0,void 0,function*(){let i={size:r};return yield(0,h.retryTypedResponse)("commitCache",()=>n(this,void 0,void 0,function*(){return e.postJson(f(`caches/${t.toString()}`),i);}));});}function w(e,t,r){return n(this,void 0,void 0,function*(){let i=y();o.debug("Upload cache"),yield N(i,e,t,r),o.debug("Commiting cache");let a=p.getArchiveFileSizeInBytes(t);o.info(`Cache Size: ~${Math.round(a/1048576)} MB (${a} B)`);let n=yield F(i,e,a);if(!(0,h.isSuccessStatusCode)(n.statusCode))throw Error(`Cache service responded with ${n.statusCode} during commit cache.`);o.info("Cache saved successfully");});}e.exports.getCacheVersion=b,e.exports.getCacheEntry=v,e.exports.downloadCache=E,e.exports.reserveCache=A,e.exports.saveCache=w;}),parcelRequire.register("l3Ivq",function(e,t){var r=e.exports&&e.exports.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r];}}),Object.defineProperty(e,i,a);}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r];}),i=e.exports&&e.exports.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),a=e.exports&&e.exports.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&r(t,e,a);return i(t,e),t;},n=e.exports&&e.exports.__awaiter||function(e,t,r,i){function a(e){return e instanceof r?e:new r(function(t){t(e);});}return new(r||(r=Promise))(function(r,n){function o(e){try{u(i.next(e));}catch(e){n(e);}}function s(e){try{u(i.throw(e));}catch(e){n(e);}}function u(e){e.done?r(e.value):a(e.value).then(o,s);}u((i=i.apply(e,t||[])).next());});};Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports.downloadCacheStorageSDK=e.exports.downloadCacheHttpClient=e.exports.Dow
|
||
|
`;}),i;}getCanonicalizedResourceString(e){let t=(0,i.getURLPath)(e.url)||"/",r="";r+=`/${this.factory.accountName}${t}`;let a=(0,i.getURLQueries)(e.url),n={};if(a){let e=[];for(let t in a)if(Object.prototype.hasOwnProperty.call(a,t)){let r=t.toLowerCase();n[r]=a[t],e.push(r);}for(let t of(e.sort(),e))r+=`
|
||
|
${t}:${decodeURIComponent(n[t])}`;}return r;}}}),parcelRequire.register("7STSD",function(e,t){$parcel$export(e.exports,"SDK_VERSION",()=>r),$parcel$export(e.exports,"SERVICE_VERSION",()=>i),$parcel$export(e.exports,"BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES",()=>a),$parcel$export(e.exports,"BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES",()=>n),$parcel$export(e.exports,"BLOCK_BLOB_MAX_BLOCKS",()=>o),$parcel$export(e.exports,"DEFAULT_BLOCK_BUFFER_SIZE_BYTES",()=>s),$parcel$export(e.exports,"DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES",()=>u),$parcel$export(e.exports,"DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS",()=>c),$parcel$export(e.exports,"REQUEST_TIMEOUT",()=>l),$parcel$export(e.exports,"StorageOAuthScopes",()=>p),$parcel$export(e.exports,"URLConstants",()=>d),$parcel$export(e.exports,"HeaderConstants",()=>m),$parcel$export(e.exports,"ETagNone",()=>h),$parcel$export(e.exports,"ETagAny",()=>x),$parcel$export(e.exports,"EncryptionAlgorithmAES25",()=>f),$parcel$export(e.exports,"DevelopmentConnectionString",()=>g),$parcel$export(e.exports,"StorageBlobLoggingAllowedHeaderNames",()=>D),$parcel$export(e.exports,"StorageBlobLoggingAllowedQueryParameters",()=>y),$parcel$export(e.exports,"BlobUsesCustomerSpecifiedEncryptionMsg",()=>b),$parcel$export(e.exports,"BlobDoesNotUseCustomerSpecifiedEncryption",()=>v),$parcel$export(e.exports,"PathStylePorts",()=>C);let r="12.15.0",i="2023-01-03",a=268435456,n=4194304e3,o=5e4,s=8388608,u=4194304,c=5,l=1e5,p="https://storage.azure.com/.default",d={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}},m={AUTHORIZATION:"Authorization",AUTHORIZATION_SCHEME:"Bearer",CONTENT_ENCODING:"Content-Encoding",CONTENT_ID:"Content-ID",CONTENT_LANGUAGE:"Content-Language",CONTENT_LENGTH:"Content-Length",CONTENT_MD5:"Content-Md5",CONTENT_TRANSFER_ENCODING:"Content-Transfer-Encoding",CONTENT_TYPE:"Content-Type",COOKIE:"Cookie",DATE:"date",IF_MATCH:"if-match",IF_MODIFIED_SINCE:"if-modified-since",IF_NONE_MATCH:"if-none-match",IF_UNMODIFIED_SINCE:"if-unmodified-since",PREFIX_FOR_STORAGE:"x-ms-",RANGE:"Range",USER_AGENT:"User-Agent",X_MS_CLIENT_REQUEST_ID:"x-ms-client-request-id",X_MS_COPY_SOURCE:"x-ms-copy-source",X_MS_DATE:"x-ms-date",X_MS_ERROR_CODE:"x-ms-error-code",X_MS_VERSION:"x-ms-version"},h="",x="*",f="AES256",g="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",D=["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-se
|
||
|
${a.sanitize(this)}`;}}n.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",n.PARSE_ERROR="PARSE_ERROR";}),parcelRequire.register("2e9Ys",function(e,t){$parcel$export(e.exports,"Sanitizer",()=>s);var r=parcelRequire("fqSAF"),i=parcelRequire("32HMS");let a="REDACTED",n=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],o=["api-version"];class s{constructor({allowedHeaderNames:e=[],allowedQueryParameters:t=[]}={}){e=Array.isArray(e)?n.concat(e):n,t=Array.isArray(t)?o.concat(t):o,this.allowedHeaderNames=new Set(e.map(e=>e.toLowerCase())),this.allowedQueryParameters=new Set(t.map(e=>e.toLowerCase()));}sanitize(e){let t=new Set();return JSON.stringify(e,(e,r)=>{if(r instanceof Error)return Object.assign(Object.assign({},r),{name:r.name,message:r.message});if("_headersMap"===e)return this.sanitizeHeaders(r);if("url"===e)return this.sanitizeUrl(r);if("query"===e)return this.sanitizeQuery(r);if("body"!==e){if("response"===e)return;if("operationSpec"===e)return;else if(Array.isArray(r)||(0,i.isObject)(r)){if(t.has(r))return"[Circular]";t.add(r);}return r;}},2);}sanitizeHeaders(e){return this.sanitizeObject(e,this.allowedHeaderNames,(e,t)=>e[t].value);}sanitizeQuery(e){return this.sanitizeObject(e,this.allowedQueryParameters,(e,t)=>e[t]);}sanitizeObject(e,t,r){if("object"!=typeof e||null===e)return e;let i={};for(let n of Object.keys(e))t.has(n.toLowerCase())?i[n]=r(e,n):i[n]=a;return i;}sanitizeUrl(e){if("string"!=typeof e||null===e)return e;let t=(0,r.URLBuilder).parse(e),i=t.getQuery();if(!i)return e;let n=(0,r.URLQuery).parse(i);for(let e of n.keys())this.allowedQueryParameters.has(e.toLowerCase())||n.set(e,a);return t.setQuery(n.toString()),t.toString();}}}),parcelRequire.register("6NYuJ",function(e,t){$parcel$export(e.exports,"custom",()=>r);let r=$kC5q1$util.inspect.custom;}),parcelRequire.register("2oudT",function(e,t){$parcel$export(e.exports,"stringifyXML",()=>s),$parcel$export(e.exports,"parseXML",()=>u);var r=parcelRequire("fkZEj"),i=parcelRequire("kH4Ka");let a={explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:i.XML_ATTRKEY,explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:void 0,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:void 0,attrValueProcessors:void 0,tagNameProcessors:void 0,valueProcessors:void 0,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:void 0,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1},n=Object.assign({},a);n.explicitArray=!1;let o=Object.assign({},a);function s(e,t={}){var a;o.rootName=t.rootName,o.charkey=null!==(a=t.xmlCharKey)&&void 0!==a?a:i.XML_CHARKEY;let n=new r.Builder(o);return n.buildObject(e);}function u(e,t={}){var a;n.explicitRoot=!!t.includeRoot,n.charkey=null!==(a=t.xmlCharKey)&&void 0!==a?a:i.XML_CHARKEY;let o=new r.Parser(n);return new Promise((t,r)=>{e?o.parseString(e,(e,i)=>{e?r(e):t(i);}):r(Error("Document is empty"));});}o.explicitArray=!1,o.renderOpts={pretty:!1};}),parcelRequire.register("fkZEj",function(e,t){(function(){var t,r,i,a,n=function(e,t){for(var r in t)o.call(t,r)&&(e[r]=t[r]);function i(){this.constructor=e;}return i.prototype=t.prototype,e.prototype=new i(),e.__super__=t.prototype,e;},o={}.hasOwnProperty;r=parcelRequire("530nM"),t=parcelRequire("iKJ0N"),i=parcelRequire("iBX9L")
|
||
|
`,t&&t.split){let i=t.split(/\n/),a=String(Math.min(i.length,e.line+3)).length,n=" ";for(;n.length<a;)n+=" ";for(let t=Math.max(0,e.line-1);t<Math.min(i.length,e.line+2);++t){let o=String(t+1);if(o.length<a&&(o=" "+o),e.line===t){r+=o+"> "+i[t]+"\n"+n+" ";for(let t=0;t<e.col;++t)r+=" ";r+="^\n";}else r+=o+": "+i[t]+"\n";}}return e.message=r+"\n",e;}e.exports=r;}),parcelRequire.register("2S5Eu",function(e,t){e.exports=a;var r=parcelRequire("3XGwc"),i=parcelRequire("gBYD8");function a(e,t){t||(t={});let a=0,n=t.blocksize||40960,o=new r();return new Promise((e,t)=>{setImmediate(s,a,n,e,t);});function s(t,r,a,n){if(t>=e.length)try{return a(o.finish());}catch(t){return n(i(t,e));}try{o.parse(e.slice(t,t+r)),setImmediate(s,t+r,r,a,n);}catch(t){n(i(t,e));}}}}),parcelRequire.register("9JW1y",function(e,t){e.exports=i;var r=parcelRequire("3XGwc");function i(e){return e?a(e):n(e);}function a(e){let t=new r();return e.setEncoding("utf8"),new Promise((r,i)=>{let a;let n=!1,o=!1;function s(){if(n=!0,!a)try{r(t.finish());}catch(e){i(e);}}function u(e){o=!0,i(e);}function c(){let r;for(a=!0;null!==(r=e.read());)try{t.parse(r);}catch(e){return u(e);}if(a=!1,n)return s();o||e.once("readable",c);}e.once("end",s),e.once("error",u),c();});}function n(){let e=new r();return new $kC5q1$stream.Transform({objectMode:!0,transform(t,r,i){try{e.parse(t.toString(r));}catch(e){this.emit("error",e);}i();},flush(t){try{this.push(e.finish());}catch(e){this.emit("error",e);}t();}});}}),parcelRequire.register("bhUE6",function(e,t){function r(e){if(null===e)throw i("null");if(void 0===e)throw i("undefined");if("object"!=typeof e)throw i(typeof e);if("function"==typeof e.toJSON&&(e=e.toJSON()),null==e)return null;let t=l(e);if("table"!==t)throw i(t);return u("","",e);}function i(e){return Error("Can only stringify objects, not "+e);}function a(){return Error("Array values can't have mixed types");}function n(e){return Object.keys(e).filter(t=>c(e[t]));}function o(e){return Object.keys(e).filter(t=>!c(e[t]));}function s(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))!e[r]||"function"!=typeof e[r].toJSON||"toISOString"in e[r]?t[r]=e[r]:t[r]=e[r].toJSON();return t;}function u(e,t,r){i=n(r=s(r)),a=o(r);var i,a,u=[],c=t||"";i.forEach(e=>{var t=l(r[e]);"undefined"!==t&&"null"!==t&&u.push(c+p(e)+" = "+g(r[e],!0));}),u.length>0&&u.push("");var d=e&&i.length>0?t+" ":"";return a.forEach(t=>{u.push(F(e,d,t,r[t]));}),u.join("\n");}function c(e){switch(l(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return 0===e.length||"table"!==l(e[0]);case"table":return 0===Object.keys(e).length;default:return!1;}}function l(e){if(void 0===e)return"undefined";if(null===e)return"null";if("bigint"==typeof e||Number.isInteger(e)&&!Object.is(e,-0))return"integer";if("number"==typeof e)return"float";if("boolean"==typeof e)return"boolean";if("string"==typeof e)return"string";if("toISOString"in e)return isNaN(e)?"undefined":"datetime";else if(Array.isArray(e))return"array";else return"table";}function p(e){var t=String(e);return /^[-A-Za-z0-9_]+$/.test(t)?t:d(t);}function d(e){return'"'+x(e).replace(/"/g,'\\"')+'"';}function m(e){return"'"+e+"'";}function h(e,t){for(;t.length<e;)t="0"+t;return t;}function x(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,e=>"\\u"+h(4,e.codePointAt(0).toString(16)));}function f(e){let t=e.split(/\n/).map(e=>x(e).replace(/"(?="")/g,'\\"')).join("\n");return'"'===t.slice(-1)&&(t+="\\\n"),'"""\n'+t+'"""';}function g(e,t){let r=l(e);return"string"===r&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),D(e,r);}function D(e,t){switch(t||(t=l(e)),t){case"string-multiline":return f(e);case"string":return d(e);case"string-literal":return m(e);case"integer":return y(e);case"float":return b(e);case"boolean":return v(e);case
|
||
|
//# sourceMappingURL=actions_python.cd609164.js.map
|