apify-cli 1.3.0 → 1.3.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/actor.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{a as o,b as r,d as m}from"./chunk-YCUUD3VH.js";o("Actor");for(let a of m)a.registerCommand("actor");await r("actor");
2
+ import{a as o,b as r,d as m}from"./chunk-FRLTGPB3.js";o("Actor");for(let a of m)a.registerCommand("actor");await r("actor");
3
3
  //# sourceMappingURL=actor.js.map
package/dist/apify.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{a as o,b as r,c as i}from"./chunk-YCUUD3VH.js";o("Apify");for(let m of i)m.registerCommand("apify");await r("apify");
2
+ import{a as o,b as r,c as i}from"./chunk-FRLTGPB3.js";o("Apify");for(let m of i)m.registerCommand("apify");await r("apify");
3
3
  //# sourceMappingURL=apify.js.map
@@ -1,4 +1,4 @@
1
- var Cc=Object.defineProperty;var u=(r,e)=>Cc(r,"name",{value:e,configurable:!0});import Ee from"process";import{parseArgs as Hn}from"util";import Zr from"chalk";import{satisfies as Iu}from"semver";import oi from"chalk";import iu from"indent-string";import nu from"widest-line";import au from"wrap-ansi";import Ic from"chalk";function C(r,...e){process.env.APIFY_CLI_DEBUG&&console.error(Ic.gray(`[${r}]`),...e)}u(C,"cliDebugPrint");import{realpathSync as $c}from"fs";import{dirname as Ec}from"path";import dt from"chalk";function Qe(r){r.stdoutOutput&&console.log(...r.stdoutOutput),r.stderrOutput&&console.error(...r.stderrOutput)}u(Qe,"internalLog");function R(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[r.message]})}u(R,"simpleLog");function p(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.red("Error:"),r.message]})}u(p,"error");function _(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.yellow.bold("Warning:"),r.message]})}u(_,"warning");function $(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.green("Success:"),r.message]})}u($,"success");function ve(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.gray("Run:"),r.message]})}u(ve,"run");function b(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.white("Info:"),r.message]})}u(b,"info");function Ns(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.blue(r.message),r.url]})}u(Ns,"link");var Ds="0.0.0";var Rc="1.3.0",_c="b61db4163e21d10b1d286acce39487655f65a9a6";function xc(){if(process.env.APIFY_CLI_MARKED_INSTALL_METHOD)return process.env.APIFY_CLI_MARKED_INSTALL_METHOD;if(process.env.APIFY_CLI_BUNDLE)return"bundle";let r=process.argv[1];if(!r)return _({message:"Failed to detect install method of CLI, assuming npm"}),"npm";let e=$c(r);return process.env.VOLTA_HOME&&e.includes(process.env.VOLTA_HOME)?"volta":e.includes("homebrew/Cellar")||e.includes("linuxbrew/Cellar")?"homebrew":process.env.PNPM_HOME&&e.includes(process.env.PNPM_HOME)?"pnpm":process.env.BUN_INSTALL&&e.includes(process.env.BUN_INSTALL)?"bun":"npm"}u(xc,"detectInstallMethod");function Oc(){return process.versions.bun?{runtime:"bun",version:process.versions.bun,nodeVersion:process.versions.node}:process.versions.deno?{runtime:"deno",version:process.versions.deno,nodeVersion:process.versions.node}:{runtime:"node",version:process.versions.node}}u(Oc,"getRuntimeInfo");var Ft=null;function W(){if(Ft)return Ft;let r=xc(),e=Oc();return Ft={version:Rc,hash:_c,arch:process.env.APIFY_BUNDLE_ARCH??process.arch,platform:process.platform==="win32"?"windows":process.platform,runtime:e,extraRuntimeData:e.nodeVersion?`(emulating node ${e.nodeVersion})`:"",installMethod:r,get fullVersionString(){return`apify-cli/${this.version} (${this.hash.slice(0,7)}) running on ${this.platform}-${this.arch} with ${this.runtime.runtime}-${e.version}${this.extraRuntimeData?` ${this.extraRuntimeData}`:""}, installed via ${this.installMethod}`},get isBeta(){return this.version.includes("beta")||this.version===Ds}},r==="bundle"&&(Ft.installPath=Ec(process.execPath)),Ft}u(W,"useCLIMetadata");import{existsSync as hl,mkdirSync as yl,readFileSync as wl,writeFileSync as Al}from"fs";import{dirname as bl}from"path";import{cryptoRandomObjectId as Sl}from"@apify/utilities";import{homedir as kc}from"os";import{join as et}from"path";import{KEY_VALUE_STORE_KEYS as Nc,META_ORIGINS as Dc}from"@apify/consts";var ki={name:"apify-cli",version:"1.3.0",description:"Apify command-line interface (CLI) helps you manage the Apify cloud platform and develop, build, and deploy Apify Actors.",exports:"./dist/index.js",type:"module",scripts:{"dev:apify":"tsx ./src/entrypoints/apify.ts","dev:actor":"tsx ./src/entrypoints/actor.ts","test:all":"yarn test:local && yarn test:api","test:local":"vitest run --testNamePattern '^((?!\\[api]).)*$' --exclude ./test/api","test:api":"vitest run --testNamePattern '\\[api\\]'","test:python":"vitest run --testNamePattern '\\[python\\]'","test:cucumber":'cross-env NODE_OPTIONS="--import tsx" cucumber-js',lint:"eslint src test scripts features --ext .ts,.cjs,.mjs","lint:fix":"eslint src test scripts features --fix --ext .ts,.cjs,.mjs",format:'biome format . && prettier --check "**/*.{md,yml,yaml}"',"format:fix":'biome format --write . && prettier --write "**/*.{md,yml,yaml}"',clean:"rimraf dist",build:"yarn clean && tsc && tsup","build-bundles":"bun run scripts/build-cli-bundles.ts",prepack:"yarn insert-cli-metadata && yarn build && yarn update-docs","insert-cli-metadata":"tsx scripts/insert-cli-metadata.ts","update-docs":"tsx scripts/generate-cli-docs.ts",postinstall:`node -e "console.log('We have an active developer community on Discord. You can find it on https://discord.gg/crawlee-apify-801163717915574323.');"`,prepare:"husky"},files:["dist"],bin:{actor:"./dist/actor.js",apify:"./dist/apify.js","apify-cli":"./dist/apify.js"},contributors:["Jakub Drobn\xEDk <jakub.drobnik@apify.com>","Jan Curn <jan@apify.com>","Vlad Frangu <vlad.frangu@apify.com>"],repository:{type:"git",url:"git+https://github.com/apify/apify-cli.git"},keywords:["apify","client","node","command","line","bash"],author:{name:"Apify",email:"support@apify.com",url:"https://www.apify.com"},license:"Apache-2.0",bugs:{url:"https://github.com/apify/apify-cli/issues"},homepage:"https://github.com/apify/apify-cli#readme",engines:{node:">=20"},dependencies:{"@apify/actor-memory-expression":"^0.1.3","@apify/actor-templates":"^0.1.5","@apify/consts":"^2.36.0","@apify/input_schema":"^3.17.0","@apify/utilities":"^2.18.0","@crawlee/memory-storage":"^3.12.0","@inquirer/core":"^11.0.0","@inquirer/input":"^5.0.0","@inquirer/password":"^5.0.0","@inquirer/select":"^5.0.0","@root/walk":"~1.1.0","@sapphire/duration":"^1.1.2","@sapphire/result":"^2.7.2","@sapphire/timestamp":"^1.0.3","@skyra/jaro-winkler":"^1.1.1","adm-zip":"~0.5.15",ajv:"~8.18.0","apify-client":"^2.22.0",archiver:"~7.0.1",axios:"^1.11.0",chalk:"~5.6.0","cli-table3":"^0.6.5","computer-name":"~0.1.0",configparser:"~0.3.10",cors:"~2.8.5","detect-indent":"~7.0.1","escape-string-regexp":"~5.0.0",execa:"^9.5.2",express:"~5.2.0",handlebars:"~4.7.8",ignore:"^7.0.0","indent-string":"^5.0.0","is-ci":"~4.1.0",istextorbinary:"~9.5.0",jju:"~1.4.0","js-levenshtein":"^1.1.6","json-schema-to-typescript":"^15.0.4",mime:"~4.1.0",open:"~11.0.0",rimraf:"~6.1.0",semver:"~7.7.0","string-width":"^8.0.0","strip-ansi":"^7.1.0",tiged:"~2.12.7",tinyglobby:"^0.2.15",which:"^6.0.0","widest-line":"^6.0.0","wrap-ansi":"^10.0.0"},devDependencies:{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@biomejs/biome":"^2.0.0","@crawlee/types":"^3.11.1","@cucumber/cucumber":"^12.0.0","@types/adm-zip":"^0.5.5","@types/archiver":"^7.0.0","@types/bun":"^1.2.5","@types/cors":"^2.8.17","@types/execa":"^2.0.2","@types/express":"^5.0.0","@types/jju":"^1.4.5","@types/js-levenshtein":"^1","@types/mime":"^4.0.0","@types/node":"^24.0.0","@types/semver":"^7.5.8","@types/which":"^3.0.4","@yarnpkg/core":"^4.1.2",apify:"^3.2.4","cross-env":"^10.0.0",eslint:"^9.25.1","eslint-config-prettier":"^10.1.2",husky:"^9","lint-staged":"^16.0.0","mock-stdin":"^1.0.0",prettier:"^3.5.3",tsup:"^8.5.0",tsx:"^4.16.5",typescript:"^5.8.3","typescript-eslint":"^8.31.0",vitest:"^4.0.0"},volta:{node:"24.14.0",yarn:"4.12.0"},packageManager:"yarn@4.12.0",devEngines:{runtime:[{name:"node",version:">= 20",onFail:"error"},{name:"bun",version:">= 1.2.5",onFail:"ignore"}],packageManager:{name:"yarn",version:">= 4",onFail:"warn"}},"lint-staged":{"*":"biome format --write --no-errors-on-unmatched","*.{mjs,js,ts}":"eslint --fix --ext mjs,js,ts","*.md":"prettier --write"},resolutions:{tar:"7.5.11"}};var tt="storage",Ls="apify_storage",Fs=1,yr={actorSpecification:Fs,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},Ni=1440*60*1e3,pt=u(()=>{let r=et(kc(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?et(r,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):r},"GLOBAL_CONFIGS_FOLDER"),pe=u(()=>et(pt(),"auth.json"),"AUTH_FILE_PATH"),wr=u(()=>et(pt(),"secrets.json"),"SECRETS_FILE_PATH"),Ar=u(()=>et(pt(),"state.json"),"STATE_FILE_PATH"),br=u(()=>et(pt(),"telemetry.json"),"TELEMETRY_FILE_PATH"),Sr="apify.json",vr=".actor",Lc="actor.json",L=et(vr,Lc),Ms=new RegExp(`(^${Nc.INPUT}(?:\\.[^.]+)?$)`),Te=ki.engines.node,Di={"X-Apify-Request-Origin":Dc.CLI},rt="3.9.0",Li=".venv";import{execSync as Yc}from"child_process";import{createWriteStream as Hc,existsSync as ie,mkdirSync as Jc,readdirSync as Vi,readFileSync as Vt,writeFileSync as Cr}from"fs";import{mkdir as qc,readFile as Us}from"fs/promises";import{get as Kc}from"https";import{homedir as js}from"os";import{dirname as ft,join as q,relative as Wc}from"path";import z from"process";import{finished as zc}from"stream/promises";import{DurationFormatter as Gi,TimeTypes as ot}from"@sapphire/duration";import{Timestamp as Bs}from"@sapphire/timestamp";import Xc from"adm-zip";import Zc from"ajv/dist/2019.js";import{ApifyClient as Yi}from"apify-client";import Qc from"archiver";import{AxiosHeaders as el}from"axios";import tl from"escape-string-regexp";import rl from"ignore";import{getEncoding as ol}from"istextorbinary";import{Mime as sl}from"mime";import il from"mime/types/other.js";import nl from"mime/types/standard.js";import{gte as al,minVersion as cl,satisfies as ll}from"semver";import{escapePath as ul,glob as Vs}from"tinyglobby";import{ACTOR_ENV_VARS as Gs,ACTOR_JOB_TERMINAL_STATUSES as ml,ACTOR_NAME as Bt,APIFY_ENV_VARS as dl,KEY_VALUE_STORE_KEYS as Bi,LOCAL_ACTOR_ENV_VARS as Ys,LOCAL_STORAGE_SUBDIRS as Hs,SOURCE_FILE_FORMATS as jt}from"@apify/consts";import{existsSync as Fc,mkdirSync as Mc}from"fs";import{readFile as Uc,stat as Fi,unlink as jc,writeFile as Bc}from"fs/promises";import{join as Mi,sep as Vc}from"path";import{rimraf as Gc}from"rimraf";var Ui=u(async(r,e={},t=null)=>{let o=await Uc(r,"utf-8"),s=JSON.parse(o),i;t?(i=s,i[t]={...s[t],...e}):i={...s,...e},await Bc(r,JSON.stringify(i,null," "))},"updateLocalJson"),Tr=u((r,e)=>{e||(e=r,r="."),e.split(Vc).reduce((o,s)=>(o=Mi(o,s),Fc(o)||Mc(o),o),r)},"ensureFolderExistsSync"),Mt=u(async r=>{await Gc(r)},"rimrafPromised"),Ut=u(async r=>{(await Fi(r)).isFile()&&await jc(r)},"deleteFile"),ji=u(async(r,e)=>(await Promise.all(r.map(async s=>Fi(Mi(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var Gt=Zc,Ir=u(async r=>new Promise((e,t)=>{Kc(r,o=>{o.statusCode===301||o.statusCode===302?(e(Ir(o.headers.location)),o.destroy()):e(o)}).on("error",t)}),"httpsGet"),ge=u(()=>{let r=dl.LOCAL_STORAGE_DIR;return z.env[r]||z.env.CRAWLEE_STORAGE_DIR||tt},"getLocalStorageDir"),fe=u(r=>{let e=Gs.DEFAULT_KEY_VALUE_STORE_ID,t=r||z.env[e]||Ys[e];return q(ge(),Hs.keyValueStores,t)},"getLocalKeyValueStorePath"),Hi=u(r=>{let e=Gs.DEFAULT_DATASET_ID,t=r||z.env[e]||Ys[e];return q(ge(),Hs.datasets,t)},"getLocalDatasetPath"),Ji=u(r=>{let e=Gs.DEFAULT_REQUEST_QUEUE_ID,t=r||z.env[e]||Ys[e];return q(ge(),Hs.requestQueues,t)},"getLocalRequestQueuePath"),U=u(async()=>{let r={};try{let e=await Us(pe(),"utf-8");r=JSON.parse(e)}catch{return{}}if(!r.username&&!r.id)throw new Error('Corrupted local user info was found. Please run "apify login" to fix it.');return r},"getLocalUserInfo");async function I(){let r=await Yt();if(!r)throw z.exitCode=1,new Error('You are not logged in with your Apify account. Call "apify login" to fix that.');return r}u(I,"getLoggedClientOrThrow");var qi=u(r=>{if(!r&&ie(pt())&&ie(pe())){let e=Vt(pe(),"utf-8");return JSON.parse(e).token}return r},"getTokenWithAuthFileFallback"),Js=u((r,e)=>(r=qi(r),{token:r,baseUrl:e||z.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[t=>{t.headers??=new el;for(let[o,s]of Object.entries(Di))t.headers[o]=s;return t}]}),"getApifyClientOptions");async function Yt(r,e){r=qi(r);let t=new Yi(Js(r,e)),o;try{o=await t.user("me").get()}catch(s){return C("[getLoggedClient] error getting user info",{error:s,apiBaseUrl:e}),null}return Ks(pe()),Cr(pe(),JSON.stringify({token:t.token,...o},null," ")),t}u(Yt,"getLoggedClient");var qs=u(r=>q(r,L),"getLocalConfigPath"),le=u(r=>{if(ie(r))return JSON.parse(Vt(r,{encoding:"utf-8"}))},"getJsonFileContent"),Me=u(r=>le(qs(r)),"getLocalConfig"),$r=u(async(r,e)=>{let t=q(e||z.cwd(),L);await qc(ft(t),{recursive:!0}),Cr(t,JSON.stringify(r,null," "))},"setLocalConfig"),pl=[ge(),"node_modules",".venv"],Er=u(async r=>{let e=fe();Tr(r,Hi()),Tr(r,Ji()),Tr(r,e);let t=q(r,".gitignore"),o="";ie(t)&&(o=Vt(t,{encoding:"utf-8"}));let s=[];for(let i of pl)RegExp(`^${tl(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),Cr(t,`
1
+ var Cc=Object.defineProperty;var u=(r,e)=>Cc(r,"name",{value:e,configurable:!0});import Ee from"process";import{parseArgs as Hn}from"util";import Zr from"chalk";import{satisfies as Iu}from"semver";import oi from"chalk";import iu from"indent-string";import nu from"widest-line";import au from"wrap-ansi";import Ic from"chalk";function C(r,...e){process.env.APIFY_CLI_DEBUG&&console.error(Ic.gray(`[${r}]`),...e)}u(C,"cliDebugPrint");import{realpathSync as $c}from"fs";import{dirname as Ec}from"path";import dt from"chalk";function Qe(r){r.stdoutOutput&&console.log(...r.stdoutOutput),r.stderrOutput&&console.error(...r.stderrOutput)}u(Qe,"internalLog");function R(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[r.message]})}u(R,"simpleLog");function p(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.red("Error:"),r.message]})}u(p,"error");function _(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.yellow.bold("Warning:"),r.message]})}u(_,"warning");function $(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.green("Success:"),r.message]})}u($,"success");function ve(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.gray("Run:"),r.message]})}u(ve,"run");function b(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.white("Info:"),r.message]})}u(b,"info");function Ns(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.blue(r.message),r.url]})}u(Ns,"link");var Ds="0.0.0";var Rc="1.3.1-beta.1",_c="ef6844d31accfdae2bd5462a0a5dc85824d2539c";function xc(){if(process.env.APIFY_CLI_MARKED_INSTALL_METHOD)return process.env.APIFY_CLI_MARKED_INSTALL_METHOD;if(process.env.APIFY_CLI_BUNDLE)return"bundle";let r=process.argv[1];if(!r)return _({message:"Failed to detect install method of CLI, assuming npm"}),"npm";let e=$c(r);return process.env.VOLTA_HOME&&e.includes(process.env.VOLTA_HOME)?"volta":e.includes("homebrew/Cellar")||e.includes("linuxbrew/Cellar")?"homebrew":process.env.PNPM_HOME&&e.includes(process.env.PNPM_HOME)?"pnpm":process.env.BUN_INSTALL&&e.includes(process.env.BUN_INSTALL)?"bun":"npm"}u(xc,"detectInstallMethod");function Oc(){return process.versions.bun?{runtime:"bun",version:process.versions.bun,nodeVersion:process.versions.node}:process.versions.deno?{runtime:"deno",version:process.versions.deno,nodeVersion:process.versions.node}:{runtime:"node",version:process.versions.node}}u(Oc,"getRuntimeInfo");var Ft=null;function W(){if(Ft)return Ft;let r=xc(),e=Oc();return Ft={version:Rc,hash:_c,arch:process.env.APIFY_BUNDLE_ARCH??process.arch,platform:process.platform==="win32"?"windows":process.platform,runtime:e,extraRuntimeData:e.nodeVersion?`(emulating node ${e.nodeVersion})`:"",installMethod:r,get fullVersionString(){return`apify-cli/${this.version} (${this.hash.slice(0,7)}) running on ${this.platform}-${this.arch} with ${this.runtime.runtime}-${e.version}${this.extraRuntimeData?` ${this.extraRuntimeData}`:""}, installed via ${this.installMethod}`},get isBeta(){return this.version.includes("beta")||this.version===Ds}},r==="bundle"&&(Ft.installPath=Ec(process.execPath)),Ft}u(W,"useCLIMetadata");import{existsSync as hl,mkdirSync as yl,readFileSync as wl,writeFileSync as Al}from"fs";import{dirname as bl}from"path";import{cryptoRandomObjectId as Sl}from"@apify/utilities";import{homedir as kc}from"os";import{join as et}from"path";import{KEY_VALUE_STORE_KEYS as Nc,META_ORIGINS as Dc}from"@apify/consts";var ki={name:"apify-cli",version:"1.3.1-beta.1",description:"Apify command-line interface (CLI) helps you manage the Apify cloud platform and develop, build, and deploy Apify Actors.",exports:"./dist/index.js",type:"module",scripts:{"dev:apify":"tsx ./src/entrypoints/apify.ts","dev:actor":"tsx ./src/entrypoints/actor.ts","test:all":"yarn test:local && yarn test:api","test:local":"vitest run --testNamePattern '^((?!\\[api]).)*$' --exclude ./test/api","test:api":"vitest run --testNamePattern '\\[api\\]'","test:python":"vitest run --testNamePattern '\\[python\\]'","test:cucumber":'cross-env NODE_OPTIONS="--import tsx" cucumber-js',lint:"eslint src test scripts features --ext .ts,.cjs,.mjs","lint:fix":"eslint src test scripts features --fix --ext .ts,.cjs,.mjs",format:'biome format . && prettier --check "**/*.{md,yml,yaml}"',"format:fix":'biome format --write . && prettier --write "**/*.{md,yml,yaml}"',clean:"rimraf dist",build:"yarn clean && tsc && tsup","build-bundles":"bun run scripts/build-cli-bundles.ts",prepack:"yarn insert-cli-metadata && yarn build && yarn update-docs","insert-cli-metadata":"tsx scripts/insert-cli-metadata.ts","update-docs":"tsx scripts/generate-cli-docs.ts",postinstall:`node -e "console.log('We have an active developer community on Discord. You can find it on https://discord.gg/crawlee-apify-801163717915574323.');"`,prepare:"husky"},files:["dist"],bin:{actor:"./dist/actor.js",apify:"./dist/apify.js","apify-cli":"./dist/apify.js"},contributors:["Jakub Drobn\xEDk <jakub.drobnik@apify.com>","Jan Curn <jan@apify.com>","Vlad Frangu <vlad.frangu@apify.com>"],repository:{type:"git",url:"git+https://github.com/apify/apify-cli.git"},keywords:["apify","client","node","command","line","bash"],author:{name:"Apify",email:"support@apify.com",url:"https://www.apify.com"},license:"Apache-2.0",bugs:{url:"https://github.com/apify/apify-cli/issues"},homepage:"https://github.com/apify/apify-cli#readme",engines:{node:">=20"},dependencies:{"@apify/actor-memory-expression":"^0.1.3","@apify/actor-templates":"^0.1.5","@apify/consts":"^2.36.0","@apify/input_schema":"^3.17.0","@apify/utilities":"^2.18.0","@crawlee/memory-storage":"^3.12.0","@inquirer/core":"^11.0.0","@inquirer/input":"^5.0.0","@inquirer/password":"^5.0.0","@inquirer/select":"^5.0.0","@root/walk":"~1.1.0","@sapphire/duration":"^1.1.2","@sapphire/result":"^2.7.2","@sapphire/timestamp":"^1.0.3","@skyra/jaro-winkler":"^1.1.1","adm-zip":"~0.5.15",ajv:"~8.18.0","apify-client":"^2.22.0",archiver:"~7.0.1",axios:"^1.11.0",chalk:"~5.6.0","cli-table3":"^0.6.5","computer-name":"~0.1.0",configparser:"~0.3.10",cors:"~2.8.5","detect-indent":"~7.0.1","escape-string-regexp":"~5.0.0",execa:"^9.5.2",express:"~5.2.0",handlebars:"~4.7.8",ignore:"^7.0.0","indent-string":"^5.0.0","is-ci":"~4.1.0",istextorbinary:"~9.5.0",jju:"~1.4.0","js-levenshtein":"^1.1.6","json-schema-to-typescript":"^15.0.4",mime:"~4.1.0",open:"~11.0.0",rimraf:"~6.1.0",semver:"~7.7.0","string-width":"^8.0.0","strip-ansi":"^7.1.0",tiged:"~2.12.7",tinyglobby:"^0.2.15",which:"^6.0.0","widest-line":"^6.0.0","wrap-ansi":"^10.0.0"},devDependencies:{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@biomejs/biome":"^2.0.0","@crawlee/types":"^3.11.1","@cucumber/cucumber":"^12.0.0","@types/adm-zip":"^0.5.5","@types/archiver":"^7.0.0","@types/bun":"^1.2.5","@types/cors":"^2.8.17","@types/execa":"^2.0.2","@types/express":"^5.0.0","@types/jju":"^1.4.5","@types/js-levenshtein":"^1","@types/mime":"^4.0.0","@types/node":"^24.0.0","@types/semver":"^7.5.8","@types/which":"^3.0.4","@yarnpkg/core":"^4.1.2",apify:"^3.2.4","cross-env":"^10.0.0",eslint:"^9.25.1","eslint-config-prettier":"^10.1.2",husky:"^9","lint-staged":"^16.0.0","mock-stdin":"^1.0.0",prettier:"^3.5.3",tsup:"^8.5.0",tsx:"^4.16.5",typescript:"^5.8.3","typescript-eslint":"^8.31.0",vitest:"^4.0.0"},volta:{node:"24.14.0",yarn:"4.12.0"},packageManager:"yarn@4.12.0",devEngines:{runtime:[{name:"node",version:">= 20",onFail:"error"},{name:"bun",version:">= 1.2.5",onFail:"ignore"}],packageManager:{name:"yarn",version:">= 4",onFail:"warn"}},"lint-staged":{"*":"biome format --write --no-errors-on-unmatched","*.{mjs,js,ts}":"eslint --fix --ext mjs,js,ts","*.md":"prettier --write"},resolutions:{tar:"7.5.11"}};var tt="storage",Ls="apify_storage",Fs=1,yr={actorSpecification:Fs,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},Ni=1440*60*1e3,pt=u(()=>{let r=et(kc(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?et(r,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):r},"GLOBAL_CONFIGS_FOLDER"),pe=u(()=>et(pt(),"auth.json"),"AUTH_FILE_PATH"),wr=u(()=>et(pt(),"secrets.json"),"SECRETS_FILE_PATH"),Ar=u(()=>et(pt(),"state.json"),"STATE_FILE_PATH"),br=u(()=>et(pt(),"telemetry.json"),"TELEMETRY_FILE_PATH"),Sr="apify.json",vr=".actor",Lc="actor.json",L=et(vr,Lc),Ms=new RegExp(`(^${Nc.INPUT}(?:\\.[^.]+)?$)`),Te=ki.engines.node,Di={"X-Apify-Request-Origin":Dc.CLI},rt="3.9.0",Li=".venv";import{execSync as Yc}from"child_process";import{createWriteStream as Hc,existsSync as ie,mkdirSync as Jc,readdirSync as Vi,readFileSync as Vt,writeFileSync as Cr}from"fs";import{mkdir as qc,readFile as Us}from"fs/promises";import{get as Kc}from"https";import{homedir as js}from"os";import{dirname as ft,join as q,relative as Wc}from"path";import z from"process";import{finished as zc}from"stream/promises";import{DurationFormatter as Gi,TimeTypes as ot}from"@sapphire/duration";import{Timestamp as Bs}from"@sapphire/timestamp";import Xc from"adm-zip";import Zc from"ajv/dist/2019.js";import{ApifyClient as Yi}from"apify-client";import Qc from"archiver";import{AxiosHeaders as el}from"axios";import tl from"escape-string-regexp";import rl from"ignore";import{getEncoding as ol}from"istextorbinary";import{Mime as sl}from"mime";import il from"mime/types/other.js";import nl from"mime/types/standard.js";import{gte as al,minVersion as cl,satisfies as ll}from"semver";import{escapePath as ul,glob as Vs}from"tinyglobby";import{ACTOR_ENV_VARS as Gs,ACTOR_JOB_TERMINAL_STATUSES as ml,ACTOR_NAME as Bt,APIFY_ENV_VARS as dl,KEY_VALUE_STORE_KEYS as Bi,LOCAL_ACTOR_ENV_VARS as Ys,LOCAL_STORAGE_SUBDIRS as Hs,SOURCE_FILE_FORMATS as jt}from"@apify/consts";import{existsSync as Fc,mkdirSync as Mc}from"fs";import{readFile as Uc,stat as Fi,unlink as jc,writeFile as Bc}from"fs/promises";import{join as Mi,sep as Vc}from"path";import{rimraf as Gc}from"rimraf";var Ui=u(async(r,e={},t=null)=>{let o=await Uc(r,"utf-8"),s=JSON.parse(o),i;t?(i=s,i[t]={...s[t],...e}):i={...s,...e},await Bc(r,JSON.stringify(i,null," "))},"updateLocalJson"),Tr=u((r,e)=>{e||(e=r,r="."),e.split(Vc).reduce((o,s)=>(o=Mi(o,s),Fc(o)||Mc(o),o),r)},"ensureFolderExistsSync"),Mt=u(async r=>{await Gc(r)},"rimrafPromised"),Ut=u(async r=>{(await Fi(r)).isFile()&&await jc(r)},"deleteFile"),ji=u(async(r,e)=>(await Promise.all(r.map(async s=>Fi(Mi(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var Gt=Zc,Ir=u(async r=>new Promise((e,t)=>{Kc(r,o=>{o.statusCode===301||o.statusCode===302?(e(Ir(o.headers.location)),o.destroy()):e(o)}).on("error",t)}),"httpsGet"),ge=u(()=>{let r=dl.LOCAL_STORAGE_DIR;return z.env[r]||z.env.CRAWLEE_STORAGE_DIR||tt},"getLocalStorageDir"),fe=u(r=>{let e=Gs.DEFAULT_KEY_VALUE_STORE_ID,t=r||z.env[e]||Ys[e];return q(ge(),Hs.keyValueStores,t)},"getLocalKeyValueStorePath"),Hi=u(r=>{let e=Gs.DEFAULT_DATASET_ID,t=r||z.env[e]||Ys[e];return q(ge(),Hs.datasets,t)},"getLocalDatasetPath"),Ji=u(r=>{let e=Gs.DEFAULT_REQUEST_QUEUE_ID,t=r||z.env[e]||Ys[e];return q(ge(),Hs.requestQueues,t)},"getLocalRequestQueuePath"),U=u(async()=>{let r={};try{let e=await Us(pe(),"utf-8");r=JSON.parse(e)}catch{return{}}if(!r.username&&!r.id)throw new Error('Corrupted local user info was found. Please run "apify login" to fix it.');return r},"getLocalUserInfo");async function I(){let r=await Yt();if(!r)throw z.exitCode=1,new Error('You are not logged in with your Apify account. Call "apify login" to fix that.');return r}u(I,"getLoggedClientOrThrow");var qi=u(r=>{if(!r&&ie(pt())&&ie(pe())){let e=Vt(pe(),"utf-8");return JSON.parse(e).token}return r},"getTokenWithAuthFileFallback"),Js=u((r,e)=>(r=qi(r),{token:r,baseUrl:e||z.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[t=>{t.headers??=new el;for(let[o,s]of Object.entries(Di))t.headers[o]=s;return t}]}),"getApifyClientOptions");async function Yt(r,e){r=qi(r);let t=new Yi(Js(r,e)),o;try{o=await t.user("me").get()}catch(s){return C("[getLoggedClient] error getting user info",{error:s,apiBaseUrl:e}),null}return Ks(pe()),Cr(pe(),JSON.stringify({token:t.token,...o},null," ")),t}u(Yt,"getLoggedClient");var qs=u(r=>q(r,L),"getLocalConfigPath"),le=u(r=>{if(ie(r))return JSON.parse(Vt(r,{encoding:"utf-8"}))},"getJsonFileContent"),Me=u(r=>le(qs(r)),"getLocalConfig"),$r=u(async(r,e)=>{let t=q(e||z.cwd(),L);await qc(ft(t),{recursive:!0}),Cr(t,JSON.stringify(r,null," "))},"setLocalConfig"),pl=[ge(),"node_modules",".venv"],Er=u(async r=>{let e=fe();Tr(r,Hi()),Tr(r,Ji()),Tr(r,e);let t=q(r,".gitignore"),o="";ie(t)&&(o=Vt(t,{encoding:"utf-8"}));let s=[];for(let i of pl)RegExp(`^${tl(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),Cr(t,`
2
2
  ${s.join(`
3
3
  `)}
4
4
  `,{flag:"a"})):Cr(t,`${s.join(`
@@ -308,4 +308,4 @@ Read more: https://docs.apify.com/cli/docs/telemetry`;static subcommands=[Ps,Os]
308
308
  4. INPUT_SCHEMA.json
309
309
 
310
310
  Optionally specify custom schema path to validate.`;static args={path:A.string({required:!1,description:"Optional path to your INPUT_SCHEMA.json file. If not provided ./INPUT_SCHEMA.json is used."})};static hiddenAliases=["vis"];async run(){await ro({forcePath:this.args.path,cwd:vp.cwd(),getMessage:u(e=>e?`Validating input schema at ${e}`:`Validating input schema embedded in '${L}'`,"getMessage")}),$({message:"Input schema is valid."})}};var YP=[ao,wo,bo,Ro,Bo,ss,ls,Cs,Rs,xs,gr,_o,ur,lr,Oo,Vo,Yo,Ko,qo,is,ns,as,cs,fs,ks,mr],HP=[Et,$t,It,Ct,Tt,wt,yt,vt,mr,ur,lr,gr];export{By as a,Vy as b,YP as c,HP as d};
311
- //# sourceMappingURL=chunk-YCUUD3VH.js.map
311
+ //# sourceMappingURL=chunk-FRLTGPB3.js.map