apify-cli 0.21.10-beta.7 → 0.21.10-beta.8

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-RGQHG4D4.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-YKVSNV3T.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-RGQHG4D4.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-YKVSNV3T.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 Aa=Object.defineProperty;var l=(t,e)=>Aa(t,"name",{value:e,configurable:!0});import de from"process";import ue from"chalk";import{satisfies as kc}from"semver";import Fc from"yargs/yargs";import $i from"chalk";import gc from"indent-string";import hc from"widest-line";import yc from"wrap-ansi";import st from"chalk";function Je(t){t.stdoutOutput&&console.log(...t.stdoutOutput),t.stderrOutput&&console.error(...t.stderrOutput)}l(Je,"internalLog");function _(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[t.message]})}l(_,"simpleLog");function m(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.red("Error:"),t.message]})}l(m,"error");function x(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.yellow.bold("Warning:"),t.message]})}l(x,"warning");function R(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.green("Success:"),t.message]})}l(R,"success");function ye(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.gray("Run:"),t.message]})}l(ye,"run");function T(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.white("Info:"),t.message]})}l(T,"info");function Vs(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.blue(t.message),t.url]})}l(Vs,"link");import kt from"chalk";import Ti from"indent-string";import Si from"widest-line";import Ci from"wrap-ansi";import{realpathSync as ba}from"fs";import{dirname as va}from"path";var Gs="0.0.0";var Ta="0.21.10-beta.7",Sa="df71348af9567e33f4f3ed411c0b734f6d99d259";function Ca(){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=ba(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(Ca,"detectInstallMethod");function Ia(){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(Ia,"getRuntimeInfo");var Ct=null;function ee(){if(Ct)return Ct;let t=Ca(),e=Ia();return Ct={version:Ta,hash:Sa,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"&&(Ct.installPath=va(process.execPath)),Ct}l(ee,"useCLIMetadata");import{createWriteStream as Ua,existsSync as ne,mkdirSync as ja,readdirSync as ti,readFileSync as _t,writeFileSync as or}from"fs";import{mkdir as Ma,readFile as Ba}from"fs/promises";import{get as Va}from"https";import{dirname as ri,join as Ae}from"path";import ie from"process";import{finished as Ga}from"stream/promises";import{DurationFormatter as oi,TimeTypes as ze}from"@sapphire/duration";import{Timestamp as es}from"@sapphire/timestamp";import Ha from"adm-zip";import Ya from"ajv/dist/2019.js";import{ApifyClient as si}from"apify-client";import Ja from"archiver";import{AxiosHeaders as qa}from"axios";import Ka from"escape-string-regexp";import{globby as ii}from"globby";import{getEncoding as Wa}from"istextorbinary";import{Mime as za}from"mime";import Xa from"mime/types/other.js";import Qa from"mime/types/standard.js";import{gte as Za,minVersion as ec,satisfies as tc}from"semver";import{ACTOR_ENV_VARS as ts,ACTOR_JOB_TERMINAL_STATUSES as rc,ACTOR_NAME as Rt,APIFY_ENV_VARS as oc,KEY_VALUE_STORE_KEYS as ei,LOCAL_ACTOR_ENV_VARS as rs,LOCAL_STORAGE_SUBDIRS as os,SOURCE_FILE_FORMATS as Et}from"@apify/consts";import{homedir as Ea}from"os";import{join as qe}from"path";import{KEY_VALUE_STORE_KEYS as Ra,META_ORIGINS as _a}from"@apify/consts";var Hs={name:"apify-cli",version:"0.21.10-beta.7",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","@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.4.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",inquirer:"~12.9.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/inquirer":"^9.0.7","@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.17.1",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 Ke="storage",zo="apify_storage",Xo=1,Qt={actorSpecification:Xo,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},Ys={SCRAPY:"scrapy",CRAWLEE:"crawlee",PRE_CRAWLEE_APIFY_SDK:"apify",UNKNOWN:"unknown"},Js=1440*60*1e3,it=l(()=>{let t=qe(Ea(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?qe(t,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):t},"GLOBAL_CONFIGS_FOLDER"),se=l(()=>qe(it(),"auth.json"),"AUTH_FILE_PATH"),Zt=l(()=>qe(it(),"secrets.json"),"SECRETS_FILE_PATH"),er=l(()=>qe(it(),"state.json"),"STATE_FILE_PATH"),Le=l(()=>qe(it(),"telemetry.json"),"TELEMETRY_FILE_PATH"),tr="apify.json",Qo=".actor",xa="actor.json",M=qe(Qo,xa),Zo=new RegExp(`^${Ra.INPUT}\\..*`),we=Hs.engines.node,qs={"X-Apify-Request-Origin":_a.CLI},We="3.9.0",Ks=".venv",Ws="ea75e434d4b4d2405d79ed9d14bfc93b";import{existsSync as Oa,mkdirSync as Na}from"fs";import{readFile as La,stat as zs,unlink as Da,writeFile as Pa}from"fs/promises";import{join as Xs,sep as ka}from"path";import{rimraf as Fa}from"rimraf";var Qs=l(async(t,e={},r=null)=>{let o=await La(t,"utf-8"),s=JSON.parse(o),i;r?(i=s,i[r]={...s[r],...e}):i={...s,...e},await Pa(t,JSON.stringify(i,null," "))},"updateLocalJson"),rr=l((t,e)=>{e||(e=t,t="."),e.split(ka).reduce((o,s)=>(o=Xs(o,s),Oa(o)||Na(o),o),t)},"ensureFolderExistsSync"),It=l(async t=>{await Fa(t)},"rimrafPromised"),$t=l(async t=>{(await zs(t)).isFile()&&await Da(t)},"deleteFile"),Zs=l(async(t,e)=>(await Promise.all(t.map(async s=>zs(Xs(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var nt=Ya,sr=l(async t=>new Promise((e,r)=>{Va(t,o=>{o.statusCode===301||o.statusCode===302?(e(sr(o.headers.location)),o.destroy()):e(o)}).on("error",r)}),"httpsGet"),ae=l(()=>{let t=oc.LOCAL_STORAGE_DIR;return ie.env[t]||ie.env.CRAWLEE_STORAGE_DIR||Ke},"getLocalStorageDir"),ve=l(t=>{let e=ts.DEFAULT_KEY_VALUE_STORE_ID,r=t||ie.env[e]||rs[e];return Ae(ae(),os.keyValueStores,r)},"getLocalKeyValueStorePath"),ni=l(t=>{let e=ts.DEFAULT_DATASET_ID,r=t||ie.env[e]||rs[e];return Ae(ae(),os.datasets,r)},"getLocalDatasetPath"),ai=l(t=>{let e=ts.DEFAULT_REQUEST_QUEUE_ID,r=t||ie.env[e]||rs[e];return Ae(ae(),os.requestQueues,r)},"getLocalRequestQueuePath"),k=l(async()=>{let t={};try{let e=await Ba(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 xt();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 ci=l(t=>{if(!t&&ne(it())&&ne(se())){let e=_t(se(),"utf-8");return JSON.parse(e).token}return t},"getTokenWithAuthFileFallback"),ss=l((t,e)=>(t=ci(t),{token:t,baseUrl:e||ie.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[r=>{r.headers??=new qa;for(let[o,s]of Object.entries(qs))r.headers[o]=s;return r}]}),"getApifyClientOptions");async function xt(t,e){t=ci(t);let r=new si(ss(t,e)),o;try{o=await r.user("me").get()}catch{return null}return Xe(se()),or(se(),JSON.stringify({token:r.token,...o},null," ")),r}l(xt,"getLoggedClient");var is=l(t=>Ae(t,M),"getLocalConfigPath"),Te=l(t=>{if(ne(t))return JSON.parse(_t(t,{encoding:"utf-8"}))},"getJsonFileContent"),De=l(t=>Te(is(t)),"getLocalConfig"),ir=l(async(t,e)=>{let r=Ae(e||ie.cwd(),M);await Ma(ri(r),{recursive:!0}),or(r,JSON.stringify(t,null," "))},"setLocalConfig"),sc=[ae(),"node_modules",".venv"],nr=l(async t=>{let e=ve();rr(t,ni()),rr(t,ai()),rr(t,e);let r=Ae(t,".gitignore"),o="";ne(r)&&(o=_t(r,{encoding:"utf-8"}));let s=[];for(let i of sc)RegExp(`^${Ka(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),or(r,`
1
+ var Aa=Object.defineProperty;var l=(t,e)=>Aa(t,"name",{value:e,configurable:!0});import de from"process";import ue from"chalk";import{satisfies as kc}from"semver";import Fc from"yargs/yargs";import $i from"chalk";import gc from"indent-string";import hc from"widest-line";import yc from"wrap-ansi";import st from"chalk";function Je(t){t.stdoutOutput&&console.log(...t.stdoutOutput),t.stderrOutput&&console.error(...t.stderrOutput)}l(Je,"internalLog");function _(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[t.message]})}l(_,"simpleLog");function m(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.red("Error:"),t.message]})}l(m,"error");function x(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.yellow.bold("Warning:"),t.message]})}l(x,"warning");function R(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.green("Success:"),t.message]})}l(R,"success");function ye(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.gray("Run:"),t.message]})}l(ye,"run");function T(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.white("Info:"),t.message]})}l(T,"info");function Vs(t){Je({[t.stdout?"stdoutOutput":"stderrOutput"]:[st.blue(t.message),t.url]})}l(Vs,"link");import kt from"chalk";import Ti from"indent-string";import Si from"widest-line";import Ci from"wrap-ansi";import{realpathSync as ba}from"fs";import{dirname as va}from"path";var Gs="0.0.0";var Ta="0.21.10-beta.8",Sa="2445edbc701843cbfcf47effea6367fdae83a3f3";function Ca(){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=ba(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(Ca,"detectInstallMethod");function Ia(){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(Ia,"getRuntimeInfo");var Ct=null;function ee(){if(Ct)return Ct;let t=Ca(),e=Ia();return Ct={version:Ta,hash:Sa,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"&&(Ct.installPath=va(process.execPath)),Ct}l(ee,"useCLIMetadata");import{createWriteStream as Ua,existsSync as ne,mkdirSync as ja,readdirSync as ti,readFileSync as _t,writeFileSync as or}from"fs";import{mkdir as Ma,readFile as Ba}from"fs/promises";import{get as Va}from"https";import{dirname as ri,join as Ae}from"path";import ie from"process";import{finished as Ga}from"stream/promises";import{DurationFormatter as oi,TimeTypes as ze}from"@sapphire/duration";import{Timestamp as es}from"@sapphire/timestamp";import Ha from"adm-zip";import Ya from"ajv/dist/2019.js";import{ApifyClient as si}from"apify-client";import Ja from"archiver";import{AxiosHeaders as qa}from"axios";import Ka from"escape-string-regexp";import{globby as ii}from"globby";import{getEncoding as Wa}from"istextorbinary";import{Mime as za}from"mime";import Xa from"mime/types/other.js";import Qa from"mime/types/standard.js";import{gte as Za,minVersion as ec,satisfies as tc}from"semver";import{ACTOR_ENV_VARS as ts,ACTOR_JOB_TERMINAL_STATUSES as rc,ACTOR_NAME as Rt,APIFY_ENV_VARS as oc,KEY_VALUE_STORE_KEYS as ei,LOCAL_ACTOR_ENV_VARS as rs,LOCAL_STORAGE_SUBDIRS as os,SOURCE_FILE_FORMATS as Et}from"@apify/consts";import{homedir as Ea}from"os";import{join as qe}from"path";import{KEY_VALUE_STORE_KEYS as Ra,META_ORIGINS as _a}from"@apify/consts";var Hs={name:"apify-cli",version:"0.21.10-beta.8",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","@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.4.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",inquirer:"~12.9.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/inquirer":"^9.0.7","@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 Ke="storage",zo="apify_storage",Xo=1,Qt={actorSpecification:Xo,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},Ys={SCRAPY:"scrapy",CRAWLEE:"crawlee",PRE_CRAWLEE_APIFY_SDK:"apify",UNKNOWN:"unknown"},Js=1440*60*1e3,it=l(()=>{let t=qe(Ea(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?qe(t,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):t},"GLOBAL_CONFIGS_FOLDER"),se=l(()=>qe(it(),"auth.json"),"AUTH_FILE_PATH"),Zt=l(()=>qe(it(),"secrets.json"),"SECRETS_FILE_PATH"),er=l(()=>qe(it(),"state.json"),"STATE_FILE_PATH"),Le=l(()=>qe(it(),"telemetry.json"),"TELEMETRY_FILE_PATH"),tr="apify.json",Qo=".actor",xa="actor.json",M=qe(Qo,xa),Zo=new RegExp(`^${Ra.INPUT}\\..*`),we=Hs.engines.node,qs={"X-Apify-Request-Origin":_a.CLI},We="3.9.0",Ks=".venv",Ws="ea75e434d4b4d2405d79ed9d14bfc93b";import{existsSync as Oa,mkdirSync as Na}from"fs";import{readFile as La,stat as zs,unlink as Da,writeFile as Pa}from"fs/promises";import{join as Xs,sep as ka}from"path";import{rimraf as Fa}from"rimraf";var Qs=l(async(t,e={},r=null)=>{let o=await La(t,"utf-8"),s=JSON.parse(o),i;r?(i=s,i[r]={...s[r],...e}):i={...s,...e},await Pa(t,JSON.stringify(i,null," "))},"updateLocalJson"),rr=l((t,e)=>{e||(e=t,t="."),e.split(ka).reduce((o,s)=>(o=Xs(o,s),Oa(o)||Na(o),o),t)},"ensureFolderExistsSync"),It=l(async t=>{await Fa(t)},"rimrafPromised"),$t=l(async t=>{(await zs(t)).isFile()&&await Da(t)},"deleteFile"),Zs=l(async(t,e)=>(await Promise.all(t.map(async s=>zs(Xs(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var nt=Ya,sr=l(async t=>new Promise((e,r)=>{Va(t,o=>{o.statusCode===301||o.statusCode===302?(e(sr(o.headers.location)),o.destroy()):e(o)}).on("error",r)}),"httpsGet"),ae=l(()=>{let t=oc.LOCAL_STORAGE_DIR;return ie.env[t]||ie.env.CRAWLEE_STORAGE_DIR||Ke},"getLocalStorageDir"),ve=l(t=>{let e=ts.DEFAULT_KEY_VALUE_STORE_ID,r=t||ie.env[e]||rs[e];return Ae(ae(),os.keyValueStores,r)},"getLocalKeyValueStorePath"),ni=l(t=>{let e=ts.DEFAULT_DATASET_ID,r=t||ie.env[e]||rs[e];return Ae(ae(),os.datasets,r)},"getLocalDatasetPath"),ai=l(t=>{let e=ts.DEFAULT_REQUEST_QUEUE_ID,r=t||ie.env[e]||rs[e];return Ae(ae(),os.requestQueues,r)},"getLocalRequestQueuePath"),k=l(async()=>{let t={};try{let e=await Ba(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 xt();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 ci=l(t=>{if(!t&&ne(it())&&ne(se())){let e=_t(se(),"utf-8");return JSON.parse(e).token}return t},"getTokenWithAuthFileFallback"),ss=l((t,e)=>(t=ci(t),{token:t,baseUrl:e||ie.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[r=>{r.headers??=new qa;for(let[o,s]of Object.entries(qs))r.headers[o]=s;return r}]}),"getApifyClientOptions");async function xt(t,e){t=ci(t);let r=new si(ss(t,e)),o;try{o=await r.user("me").get()}catch{return null}return Xe(se()),or(se(),JSON.stringify({token:r.token,...o},null," ")),r}l(xt,"getLoggedClient");var is=l(t=>Ae(t,M),"getLocalConfigPath"),Te=l(t=>{if(ne(t))return JSON.parse(_t(t,{encoding:"utf-8"}))},"getJsonFileContent"),De=l(t=>Te(is(t)),"getLocalConfig"),ir=l(async(t,e)=>{let r=Ae(e||ie.cwd(),M);await Ma(ri(r),{recursive:!0}),or(r,JSON.stringify(t,null," "))},"setLocalConfig"),sc=[ae(),"node_modules",".venv"],nr=l(async t=>{let e=ve();rr(t,ni()),rr(t,ai()),rr(t,e);let r=Ae(t,".gitignore"),o="";ne(r)&&(o=_t(r,{encoding:"utf-8"}));let s=[];for(let i of sc)RegExp(`^${Ka(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),or(r,`
2
2
  ${s.join(`
3
3
  `)}
4
4
  `,{flag:"a"})):or(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 ot({forcePath:this.args.path,cwd:zd.cwd()});if(!e)throw new Error(`Input schema has not been found at ${r}.`);r?T({message:`Validating input schema stored at ${r}`}):T({message:`Validating input schema embedded in '${M}'`});let o=new nt({strict:!1});Xd(o,e),R({message:"Input schema is valid."})}};var WR=[Ar,Nr,Fr,so,To,Eo,Vo,Yo,qo,Ur,Yt,Ht,Kr,io,ao,mo,uo,So,Co,Io,$o,No,Ko,qt],zR=[ft,pt,mt,dt,ut,lt,qt,Yt,Ht];export{yr as a,Df as b,Pf as c,WR as d,zR as e};
236
- //# sourceMappingURL=chunk-RGQHG4D4.js.map
236
+ //# sourceMappingURL=chunk-YKVSNV3T.js.map