apify-cli 0.21.10-beta.12 → 0.21.10-beta.13

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,c as m,e as a}from"./chunk-4RVGU54O.js";r("Actor");for(let n of a)n.registerCommand("actor",o);await m("actor");
2
+ import{a as o,b as r,c as m,e as a}from"./chunk-45KF77CD.js";r("Actor");for(let n of a)n.registerCommand("actor",o);await m("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 i,c as r,d as m}from"./chunk-4RVGU54O.js";i("Apify");for(let a of m)a.registerCommand("apify",o);await r("apify");
2
+ import{a as o,b as i,c as r,d as m}from"./chunk-45KF77CD.js";i("Apify");for(let a of m)a.registerCommand("apify",o);await r("apify");
3
3
  //# sourceMappingURL=apify.js.map
@@ -1,4 +1,4 @@
1
- var Ra=Object.defineProperty;var l=(t,e)=>Ra(t,"name",{value:e,configurable:!0});import de from"process";import ue from"chalk";import{satisfies as Hc}from"semver";import Jc from"yargs/yargs";import Oi from"chalk";import Cc from"indent-string";import Ic from"widest-line";import $c from"wrap-ansi";import at from"chalk";function qe(t){t.stdoutOutput&&console.log(...t.stdoutOutput),t.stderrOutput&&console.error(...t.stderrOutput)}l(qe,"internalLog");function _(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[t.message]})}l(_,"simpleLog");function m(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.red("Error:"),t.message]})}l(m,"error");function x(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.yellow.bold("Warning:"),t.message]})}l(x,"warning");function R(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.green("Success:"),t.message]})}l(R,"success");function ye(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.gray("Run:"),t.message]})}l(ye,"run");function v(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.white("Info:"),t.message]})}l(v,"info");function Ks(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.blue(t.message),t.url]})}l(Ks,"link");import Ut from"chalk";import Ei from"indent-string";import Ri from"widest-line";import _i from"wrap-ansi";import{realpathSync as _a}from"fs";import{dirname as xa}from"path";var qs="0.0.0";var Oa="0.21.10-beta.12",Na="2ded2585f91480c9a6f029690e05959695b8b6e7";function La(){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 t=process.argv[1];if(!t)return x({message:"Failed to detect install method of CLI, assuming npm"}),"npm";let e=_a(t);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"}l(La,"detectInstallMethod");function Da(){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}}l(Da,"getRuntimeInfo");var $t=null;function ee(){if($t)return $t;let t=La(),e=Da();return $t={version:Oa,hash:Na,arch:process.env.APIFY_BUNDLE_ARCH??process.arch,platform:process.platform==="win32"?"windows":process.platform,runtime:e.runtime,extraRuntimeData:e.nodeVersion?`(emulating node ${e.nodeVersion})`:"",installMethod:t,get fullVersionString(){return`apify-cli/${this.version} (${this.hash.slice(0,7)}) running on ${this.platform}-${this.arch} with ${this.runtime}-${e.version}${this.extraRuntimeData?` ${this.extraRuntimeData}`:""}, installed via ${this.installMethod}`}},t==="bundle"&&($t.installPath=xa(process.execPath)),$t}l(ee,"useCLIMetadata");import{createWriteStream as Ka,existsSync as ne,mkdirSync as qa,readdirSync as ni,readFileSync as Ot,writeFileSync as ir}from"fs";import{mkdir as Wa,readFile as za}from"fs/promises";import{get as Xa}from"https";import{dirname as ai,join as Ae}from"path";import ie from"process";import{finished as Za}from"stream/promises";import{DurationFormatter as ci,TimeTypes as Ze}from"@sapphire/duration";import{Timestamp as os}from"@sapphire/timestamp";import Qa from"adm-zip";import ec from"ajv/dist/2019.js";import{ApifyClient as li}from"apify-client";import tc from"archiver";import{AxiosHeaders as rc}from"axios";import oc from"escape-string-regexp";import{globby as ui}from"globby";import{getEncoding as sc}from"istextorbinary";import{Mime as ic}from"mime";import nc from"mime/types/other.js";import ac from"mime/types/standard.js";import{gte as cc,minVersion as lc,satisfies as uc}from"semver";import{ACTOR_ENV_VARS as ss,ACTOR_JOB_TERMINAL_STATUSES as dc,ACTOR_NAME as xt,APIFY_ENV_VARS as mc,KEY_VALUE_STORE_KEYS as ii,LOCAL_ACTOR_ENV_VARS as is,LOCAL_STORAGE_SUBDIRS as ns,SOURCE_FILE_FORMATS as _t}from"@apify/consts";import{homedir as ka}from"os";import{join as We}from"path";import{KEY_VALUE_STORE_KEYS as Fa,META_ORIGINS as Ua}from"@apify/consts";var Ws={name:"apify-cli",version:"0.21.10-beta.12",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.');"`},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:">=18"},dependencies:{"@apify/actor-templates":"^0.1.5","@apify/consts":"^2.36.0","@apify/input_schema":"^3.17.0","@apify/utilities":"^2.15.1","@crawlee/memory-storage":"^3.12.0","@inquirer/core":"^10.1.15","@inquirer/input":"^4.2.1","@inquirer/password":"^4.0.17","@inquirer/select":"^4.3.1","@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.17.1","apify-client":"^2.12.6",archiver:"~7.0.1",axios:"^1.11.0",chalk:"~5.5.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.1.0",globby:"~14.1.0",handlebars:"~4.7.8","indent-string":"^5.0.0","is-ci":"~4.1.0",istextorbinary:"~9.5.0",jju:"~1.4.0","js-levenshtein":"^1.1.6","lodash.clonedeep":"^4.5.0",mime:"~4.0.4",mixpanel:"~0.18.0",open:"~10.2.0",ow:"~2.0.0",rimraf:"~6.0.1",semver:"~7.7.0","string-width":"^7.2.0","strip-ansi":"^7.1.0",tiged:"~2.12.7",which:"^5.0.0","widest-line":"^5.0.0","wrap-ansi":"^9.0.0",yargs:"^17.7.2"},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":"^6.0.2","@types/bun":"^1.2.5","@types/chai":"^4.3.17","@types/cors":"^2.8.17","@types/execa":"^2.0.2","@types/express":"^5.0.0","@types/fs-extra":"^11","@types/is-ci":"^3.0.4","@types/jju":"^1.4.5","@types/js-levenshtein":"^1","@types/lodash.clonedeep":"^4","@types/mime":"^4.0.0","@types/node":"^22.0.0","@types/semver":"^7.5.8","@types/which":"^3.0.4","@types/yargs":"^17.0.33","@yarnpkg/core":"^4.1.2",apify:"^3.2.4",chai:"^4.4.1","cross-env":"^10.0.0",eslint:"^9.25.1","eslint-config-prettier":"^10.1.2","lint-staged":"^16.0.0","mdast-util-from-markdown":"^2.0.2","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:"^3.0.0"},volta:{node:"22.18.0",yarn:"4.9.2"},packageManager:"yarn@4.9.2",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"}};var ze="storage",Qo="apify_storage",es=1,er={actorSpecification:es,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},zs={SCRAPY:"scrapy",CRAWLEE:"crawlee",PRE_CRAWLEE_APIFY_SDK:"apify",UNKNOWN:"unknown"},Xs=1440*60*1e3,ct=l(()=>{let t=We(ka(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?We(t,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):t},"GLOBAL_CONFIGS_FOLDER"),se=l(()=>We(ct(),"auth.json"),"AUTH_FILE_PATH"),tr=l(()=>We(ct(),"secrets.json"),"SECRETS_FILE_PATH"),rr=l(()=>We(ct(),"state.json"),"STATE_FILE_PATH"),De=l(()=>We(ct(),"telemetry.json"),"TELEMETRY_FILE_PATH"),or="apify.json",ts=".actor",ja="actor.json",M=We(ts,ja),rs=new RegExp(`^${Fa.INPUT}\\..*`),we=Ws.engines.node,Zs={"X-Apify-Request-Origin":Ua.CLI},Xe="3.9.0",Qs=".venv",ei="ea75e434d4b4d2405d79ed9d14bfc93b";import{existsSync as Ma,mkdirSync as Ba}from"fs";import{readFile as Va,stat as ti,unlink as Ya,writeFile as Ga}from"fs/promises";import{join as ri,sep as Ha}from"path";import{rimraf as Ja}from"rimraf";var oi=l(async(t,e={},r=null)=>{let o=await Va(t,"utf-8"),s=JSON.parse(o),i;r?(i=s,i[r]={...s[r],...e}):i={...s,...e},await Ga(t,JSON.stringify(i,null," "))},"updateLocalJson"),sr=l((t,e)=>{e||(e=t,t="."),e.split(Ha).reduce((o,s)=>(o=ri(o,s),Ma(o)||Ba(o),o),t)},"ensureFolderExistsSync"),Et=l(async t=>{await Ja(t)},"rimrafPromised"),Rt=l(async t=>{(await ti(t)).isFile()&&await Ya(t)},"deleteFile"),si=l(async(t,e)=>(await Promise.all(t.map(async s=>ti(ri(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var lt=ec,nr=l(async t=>new Promise((e,r)=>{Xa(t,o=>{o.statusCode===301||o.statusCode===302?(e(nr(o.headers.location)),o.destroy()):e(o)}).on("error",r)}),"httpsGet"),ae=l(()=>{let t=mc.LOCAL_STORAGE_DIR;return ie.env[t]||ie.env.CRAWLEE_STORAGE_DIR||ze},"getLocalStorageDir"),Te=l(t=>{let e=ss.DEFAULT_KEY_VALUE_STORE_ID,r=t||ie.env[e]||is[e];return Ae(ae(),ns.keyValueStores,r)},"getLocalKeyValueStorePath"),di=l(t=>{let e=ss.DEFAULT_DATASET_ID,r=t||ie.env[e]||is[e];return Ae(ae(),ns.datasets,r)},"getLocalDatasetPath"),mi=l(t=>{let e=ss.DEFAULT_REQUEST_QUEUE_ID,r=t||ie.env[e]||is[e];return Ae(ae(),ns.requestQueues,r)},"getLocalRequestQueuePath"),k=l(async()=>{let t={};try{let e=await za(se(),"utf-8");t=JSON.parse(e)}catch{return{}}if(!t.username&&!t.id)throw new Error('Corrupted local user info was found. Please run "apify login" to fix it.');return t},"getLocalUserInfo");async function S(){let t=await Nt();if(!t)throw new Error('You are not logged in with your Apify account. Call "apify login" to fix that.');return t}l(S,"getLoggedClientOrThrow");var pi=l(t=>{if(!t&&ne(ct())&&ne(se())){let e=Ot(se(),"utf-8");return JSON.parse(e).token}return t},"getTokenWithAuthFileFallback"),as=l((t,e)=>(t=pi(t),{token:t,baseUrl:e||ie.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[r=>{r.headers??=new rc;for(let[o,s]of Object.entries(Zs))r.headers[o]=s;return r}]}),"getApifyClientOptions");async function Nt(t,e){t=pi(t);let r=new li(as(t,e)),o;try{o=await r.user("me").get()}catch{return null}return Qe(se()),ir(se(),JSON.stringify({token:r.token,...o},null," ")),r}l(Nt,"getLoggedClient");var cs=l(t=>Ae(t,M),"getLocalConfigPath"),ve=l(t=>{if(ne(t))return JSON.parse(Ot(t,{encoding:"utf-8"}))},"getJsonFileContent"),Pe=l(t=>ve(cs(t)),"getLocalConfig"),ar=l(async(t,e)=>{let r=Ae(e||ie.cwd(),M);await Wa(ai(r),{recursive:!0}),ir(r,JSON.stringify(t,null," "))},"setLocalConfig"),pc=[ae(),"node_modules",".venv"],cr=l(async t=>{let e=Te();sr(t,di()),sr(t,mi()),sr(t,e);let r=Ae(t,".gitignore"),o="";ne(r)&&(o=Ot(r,{encoding:"utf-8"}));let s=[];for(let i of pc)RegExp(`^${oc(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),ir(r,`
1
+ var Ra=Object.defineProperty;var l=(t,e)=>Ra(t,"name",{value:e,configurable:!0});import de from"process";import ue from"chalk";import{satisfies as Hc}from"semver";import Jc from"yargs/yargs";import Oi from"chalk";import Cc from"indent-string";import Ic from"widest-line";import $c from"wrap-ansi";import at from"chalk";function qe(t){t.stdoutOutput&&console.log(...t.stdoutOutput),t.stderrOutput&&console.error(...t.stderrOutput)}l(qe,"internalLog");function _(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[t.message]})}l(_,"simpleLog");function m(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.red("Error:"),t.message]})}l(m,"error");function x(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.yellow.bold("Warning:"),t.message]})}l(x,"warning");function R(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.green("Success:"),t.message]})}l(R,"success");function ye(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.gray("Run:"),t.message]})}l(ye,"run");function v(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.white("Info:"),t.message]})}l(v,"info");function Ks(t){qe({[t.stdout?"stdoutOutput":"stderrOutput"]:[at.blue(t.message),t.url]})}l(Ks,"link");import Ut from"chalk";import Ei from"indent-string";import Ri from"widest-line";import _i from"wrap-ansi";import{realpathSync as _a}from"fs";import{dirname as xa}from"path";var qs="0.0.0";var Oa="0.21.10-beta.13",Na="1f29f18aef6112e0c4b4f42f8c8d20b531203028";function La(){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 t=process.argv[1];if(!t)return x({message:"Failed to detect install method of CLI, assuming npm"}),"npm";let e=_a(t);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"}l(La,"detectInstallMethod");function Da(){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}}l(Da,"getRuntimeInfo");var $t=null;function ee(){if($t)return $t;let t=La(),e=Da();return $t={version:Oa,hash:Na,arch:process.env.APIFY_BUNDLE_ARCH??process.arch,platform:process.platform==="win32"?"windows":process.platform,runtime:e.runtime,extraRuntimeData:e.nodeVersion?`(emulating node ${e.nodeVersion})`:"",installMethod:t,get fullVersionString(){return`apify-cli/${this.version} (${this.hash.slice(0,7)}) running on ${this.platform}-${this.arch} with ${this.runtime}-${e.version}${this.extraRuntimeData?` ${this.extraRuntimeData}`:""}, installed via ${this.installMethod}`}},t==="bundle"&&($t.installPath=xa(process.execPath)),$t}l(ee,"useCLIMetadata");import{createWriteStream as Ka,existsSync as ne,mkdirSync as qa,readdirSync as ni,readFileSync as Ot,writeFileSync as ir}from"fs";import{mkdir as Wa,readFile as za}from"fs/promises";import{get as Xa}from"https";import{dirname as ai,join as Ae}from"path";import ie from"process";import{finished as Za}from"stream/promises";import{DurationFormatter as ci,TimeTypes as Ze}from"@sapphire/duration";import{Timestamp as os}from"@sapphire/timestamp";import Qa from"adm-zip";import ec from"ajv/dist/2019.js";import{ApifyClient as li}from"apify-client";import tc from"archiver";import{AxiosHeaders as rc}from"axios";import oc from"escape-string-regexp";import{globby as ui}from"globby";import{getEncoding as sc}from"istextorbinary";import{Mime as ic}from"mime";import nc from"mime/types/other.js";import ac from"mime/types/standard.js";import{gte as cc,minVersion as lc,satisfies as uc}from"semver";import{ACTOR_ENV_VARS as ss,ACTOR_JOB_TERMINAL_STATUSES as dc,ACTOR_NAME as xt,APIFY_ENV_VARS as mc,KEY_VALUE_STORE_KEYS as ii,LOCAL_ACTOR_ENV_VARS as is,LOCAL_STORAGE_SUBDIRS as ns,SOURCE_FILE_FORMATS as _t}from"@apify/consts";import{homedir as ka}from"os";import{join as We}from"path";import{KEY_VALUE_STORE_KEYS as Fa,META_ORIGINS as Ua}from"@apify/consts";var Ws={name:"apify-cli",version:"0.21.10-beta.13",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.');"`},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:">=18"},dependencies:{"@apify/actor-templates":"^0.1.5","@apify/consts":"^2.36.0","@apify/input_schema":"^3.17.0","@apify/utilities":"^2.15.1","@crawlee/memory-storage":"^3.12.0","@inquirer/core":"^10.1.15","@inquirer/input":"^4.2.1","@inquirer/password":"^4.0.17","@inquirer/select":"^4.3.1","@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.17.1","apify-client":"^2.12.6",archiver:"~7.0.1",axios:"^1.11.0",chalk:"~5.5.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.1.0",globby:"~14.1.0",handlebars:"~4.7.8","indent-string":"^5.0.0","is-ci":"~4.1.0",istextorbinary:"~9.5.0",jju:"~1.4.0","js-levenshtein":"^1.1.6","lodash.clonedeep":"^4.5.0",mime:"~4.0.4",mixpanel:"~0.18.0",open:"~10.2.0",ow:"~2.0.0",rimraf:"~6.0.1",semver:"~7.7.0","string-width":"^7.2.0","strip-ansi":"^7.1.0",tiged:"~2.12.7",which:"^5.0.0","widest-line":"^5.0.0","wrap-ansi":"^9.0.0",yargs:"^17.7.2"},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":"^6.0.2","@types/bun":"^1.2.5","@types/chai":"^4.3.17","@types/cors":"^2.8.17","@types/execa":"^2.0.2","@types/express":"^5.0.0","@types/fs-extra":"^11","@types/is-ci":"^3.0.4","@types/jju":"^1.4.5","@types/js-levenshtein":"^1","@types/lodash.clonedeep":"^4","@types/mime":"^4.0.0","@types/node":"^22.0.0","@types/semver":"^7.5.8","@types/which":"^3.0.4","@types/yargs":"^17.0.33","@yarnpkg/core":"^4.1.2",apify:"^3.2.4",chai:"^4.4.1","cross-env":"^10.0.0",eslint:"^9.25.1","eslint-config-prettier":"^10.1.2","lint-staged":"^16.0.0","mdast-util-from-markdown":"^2.0.2","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:"^3.0.0"},volta:{node:"22.18.0",yarn:"4.9.2"},packageManager:"yarn@4.9.2",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"}};var ze="storage",Qo="apify_storage",es=1,er={actorSpecification:es,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},zs={SCRAPY:"scrapy",CRAWLEE:"crawlee",PRE_CRAWLEE_APIFY_SDK:"apify",UNKNOWN:"unknown"},Xs=1440*60*1e3,ct=l(()=>{let t=We(ka(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?We(t,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):t},"GLOBAL_CONFIGS_FOLDER"),se=l(()=>We(ct(),"auth.json"),"AUTH_FILE_PATH"),tr=l(()=>We(ct(),"secrets.json"),"SECRETS_FILE_PATH"),rr=l(()=>We(ct(),"state.json"),"STATE_FILE_PATH"),De=l(()=>We(ct(),"telemetry.json"),"TELEMETRY_FILE_PATH"),or="apify.json",ts=".actor",ja="actor.json",M=We(ts,ja),rs=new RegExp(`^${Fa.INPUT}\\..*`),we=Ws.engines.node,Zs={"X-Apify-Request-Origin":Ua.CLI},Xe="3.9.0",Qs=".venv",ei="ea75e434d4b4d2405d79ed9d14bfc93b";import{existsSync as Ma,mkdirSync as Ba}from"fs";import{readFile as Va,stat as ti,unlink as Ya,writeFile as Ga}from"fs/promises";import{join as ri,sep as Ha}from"path";import{rimraf as Ja}from"rimraf";var oi=l(async(t,e={},r=null)=>{let o=await Va(t,"utf-8"),s=JSON.parse(o),i;r?(i=s,i[r]={...s[r],...e}):i={...s,...e},await Ga(t,JSON.stringify(i,null," "))},"updateLocalJson"),sr=l((t,e)=>{e||(e=t,t="."),e.split(Ha).reduce((o,s)=>(o=ri(o,s),Ma(o)||Ba(o),o),t)},"ensureFolderExistsSync"),Et=l(async t=>{await Ja(t)},"rimrafPromised"),Rt=l(async t=>{(await ti(t)).isFile()&&await Ya(t)},"deleteFile"),si=l(async(t,e)=>(await Promise.all(t.map(async s=>ti(ri(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var lt=ec,nr=l(async t=>new Promise((e,r)=>{Xa(t,o=>{o.statusCode===301||o.statusCode===302?(e(nr(o.headers.location)),o.destroy()):e(o)}).on("error",r)}),"httpsGet"),ae=l(()=>{let t=mc.LOCAL_STORAGE_DIR;return ie.env[t]||ie.env.CRAWLEE_STORAGE_DIR||ze},"getLocalStorageDir"),Te=l(t=>{let e=ss.DEFAULT_KEY_VALUE_STORE_ID,r=t||ie.env[e]||is[e];return Ae(ae(),ns.keyValueStores,r)},"getLocalKeyValueStorePath"),di=l(t=>{let e=ss.DEFAULT_DATASET_ID,r=t||ie.env[e]||is[e];return Ae(ae(),ns.datasets,r)},"getLocalDatasetPath"),mi=l(t=>{let e=ss.DEFAULT_REQUEST_QUEUE_ID,r=t||ie.env[e]||is[e];return Ae(ae(),ns.requestQueues,r)},"getLocalRequestQueuePath"),k=l(async()=>{let t={};try{let e=await za(se(),"utf-8");t=JSON.parse(e)}catch{return{}}if(!t.username&&!t.id)throw new Error('Corrupted local user info was found. Please run "apify login" to fix it.');return t},"getLocalUserInfo");async function S(){let t=await Nt();if(!t)throw new Error('You are not logged in with your Apify account. Call "apify login" to fix that.');return t}l(S,"getLoggedClientOrThrow");var pi=l(t=>{if(!t&&ne(ct())&&ne(se())){let e=Ot(se(),"utf-8");return JSON.parse(e).token}return t},"getTokenWithAuthFileFallback"),as=l((t,e)=>(t=pi(t),{token:t,baseUrl:e||ie.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[r=>{r.headers??=new rc;for(let[o,s]of Object.entries(Zs))r.headers[o]=s;return r}]}),"getApifyClientOptions");async function Nt(t,e){t=pi(t);let r=new li(as(t,e)),o;try{o=await r.user("me").get()}catch{return null}return Qe(se()),ir(se(),JSON.stringify({token:r.token,...o},null," ")),r}l(Nt,"getLoggedClient");var cs=l(t=>Ae(t,M),"getLocalConfigPath"),ve=l(t=>{if(ne(t))return JSON.parse(Ot(t,{encoding:"utf-8"}))},"getJsonFileContent"),Pe=l(t=>ve(cs(t)),"getLocalConfig"),ar=l(async(t,e)=>{let r=Ae(e||ie.cwd(),M);await Wa(ai(r),{recursive:!0}),ir(r,JSON.stringify(t,null," "))},"setLocalConfig"),pc=[ae(),"node_modules",".venv"],cr=l(async t=>{let e=Te();sr(t,di()),sr(t,mi()),sr(t,e);let r=Ae(t,".gitignore"),o="";ne(r)&&(o=Ot(r,{encoding:"utf-8"}));let s=[];for(let i of pc)RegExp(`^${oc(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),ir(r,`
2
2
  ${s.join(`
3
3
  `)}
4
4
  `,{flag:"a"})):ir(r,`${s.join(`
@@ -233,4 +233,4 @@ Customize with --memory and --timeout flags.
233
233
  4. INPUT_SCHEMA.json
234
234
 
235
235
  Optionally specify custom schema path to validate.`;static args={path:w.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(){let{inputSchema:e,inputSchemaPath:r}=await nt({forcePath:this.args.path,cwd:lm.cwd()});if(!e)throw new Error(`Input schema has not been found at ${r}.`);r?v({message:`Validating input schema stored at ${r}`}):v({message:`Validating input schema embedded in '${M}'`});let o=new lt({strict:!1});um(o,e),R({message:"Input schema is valid."})}};var N_=[vr,Pr,Mr,ao,Io,xo,Ho,qo,zo,Br,Kt,Jt,Xr,co,uo,go,fo,$o,Eo,Ro,_o,Po,Xo,Wt],L_=[yt,ht,gt,ft,pt,mt,Wt,Kt,Jt];export{br as a,Kf as b,qf as c,N_ as d,L_ as e};
236
- //# sourceMappingURL=chunk-4RVGU54O.js.map
236
+ //# sourceMappingURL=chunk-45KF77CD.js.map