apify-cli 1.4.2-beta.4 → 1.4.2-beta.5
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-
|
|
2
|
+
import{a as o,b as r,d as m}from"./chunk-B2LAUVVL.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-
|
|
2
|
+
import{a as o,b as r,c as i}from"./chunk-B2LAUVVL.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 Lc=Object.defineProperty;var m=(r,e)=>Lc(r,"name",{value:e,configurable:!0});import Re from"process";import{parseArgs as ra}from"util";import so from"chalk";import{satisfies as Md}from"semver";import di from"chalk";import Ad from"indent-string";import vd from"widest-line";import bd from"wrap-ansi";import Bi from"ci-info";var Dc=[["CLAUDECODE","claude_code"],["CLAUDE_CODE_ENTRYPOINT","claude_code"],["CURSOR_AGENT","cursor"],["CLINE_ACTIVE","cline"],["CODEX_SANDBOX","codex_cli"],["CODEX_THREAD_ID","codex_cli"],["GEMINI_CLI","gemini_cli"],["OPENCODE","open_code"],["OPENCLAW_SHELL","openclaw"]];function Vi(){for(let[r,e]of Dc)if(process.env[r])return e}m(Vi,"detectAiAgent");function Gi(){return Bi.isCI?{isCi:!0,ciProvider:Bi.id?.toLowerCase()??"unknown"}:{isCi:!1,ciProvider:void 0}}m(Gi,"detectCi");function Yi(){return!!process.stdin.isTTY&&!!process.stdout.isTTY}m(Yi,"detectIsInteractive");import Fc from"chalk";function T(r,...e){process.env.APIFY_CLI_DEBUG&&console.error(Fc.gray(`[${r}]`),...e)}m(T,"cliDebugPrint");import{realpathSync as Uc}from"fs";import{dirname as Mc}from"path";import pt from"chalk";function Qe(r){r.stdoutOutput&&console.log(...r.stdoutOutput),r.stderrOutput&&console.error(...r.stderrOutput)}m(Qe,"internalLog");function R(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[r.message]})}m(R,"simpleLog");function f(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.red("Error:"),r.message]})}m(f,"error");function x(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.yellow.bold("Warning:"),r.message]})}m(x,"warning");function $(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.green("Success:"),r.message]})}m($,"success");function Se(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.gray("Run:"),r.message]})}m(Se,"run");function v(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.white("Info:"),r.message]})}m(v,"info");function Bs(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.blue(r.message),r.url]})}m(Bs,"link");var Vs="0.0.0";var jc="1.4.2-beta.4",Bc="7695b3b51e5063c0d2276509470cadf649245c72";function Vc(){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 x({message:"Failed to detect install method of CLI, assuming npm"}),"npm";let e=Uc(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"}m(Vc,"detectInstallMethod");function Gc(){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}}m(Gc,"getRuntimeInfo");var jt=null;function z(){if(jt)return jt;let r=Vc(),e=Gc();return jt={version:jc,hash:Bc,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===Vs}},r==="bundle"&&(jt.installPath=Mc(process.execPath)),jt}m(z,"useCLIMetadata");import{existsSync as Rl,mkdirSync as xl,readFileSync as _l,writeFileSync as kl}from"fs";import{dirname as Pl}from"path";import{cryptoRandomObjectId as Ol}from"@apify/utilities";import{homedir as Hc}from"os";import{join as et}from"path";import{KEY_VALUE_STORE_KEYS as qc,META_ORIGINS as Jc}from"@apify/consts";var Hi={name:"apify-cli",version:"1.4.2-beta.4",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 --exclude ./test/e2e","test:e2e":"vitest run --testNamePattern '\\[e2e\\]' --exclude ./test/api","test:e2e:local":"vitest run --testNamePattern '^(?=.*\\[e2e\\])(?!.*\\[api\\]).*$' --exclude ./test/api","test:api":"vitest run --testNamePattern '^(?=.*\\[api\\])(?!.*\\[e2e\\]).*$' --exclude ./test/e2e","test:python":"vitest run --testNamePattern '\\[python\\]'",lint:"eslint src test scripts --ext .ts,.cjs,.mjs","lint:fix":"eslint src test scripts --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","ci-info":"~4.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","es-toolkit":"^1.45.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","@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:"^6.0.0","typescript-eslint":"^8.31.0",vitest:"^4.0.0"},volta:{node:"24.14.1",yarn:"4.13.0"},packageManager:"yarn@4.13.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.13"}};var tt="storage",Gs="apify_storage",Ys=1,br={actorSpecification:Ys,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},qi=1440*60*1e3,ft=m(()=>{let r=et(Hc(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?et(r,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):r},"GLOBAL_CONFIGS_FOLDER"),fe=m(()=>et(ft(),"auth.json"),"AUTH_FILE_PATH"),Sr=m(()=>et(ft(),"secrets.json"),"SECRETS_FILE_PATH"),Tr=m(()=>et(ft(),"state.json"),"STATE_FILE_PATH"),Cr=m(()=>et(ft(),"telemetry.json"),"TELEMETRY_FILE_PATH"),Ir="apify.json",Er=".actor",Kc="actor.json",D=et(Er,Kc),Hs=new RegExp(`(^${qc.INPUT}(?:\\.[^.]+)?$)`),Te=Hi.engines.node,Ji={"X-Apify-Request-Origin":Jc.CLI},rt="3.9.0",Ki=".venv";import{execSync as rl}from"child_process";import{createWriteStream as ol,existsSync as oe,mkdirSync as sl,readdirSync as en,readFileSync as qt,writeFileSync as Rr}from"fs";import{mkdir as il,readFile as xr}from"fs/promises";import{get as nl}from"https";import{homedir as qs}from"os";import{dirname as gt,join as J,relative as al}from"path";import X from"process";import{finished as cl}from"stream/promises";import{DurationFormatter as tn,TimeTypes as ot}from"@sapphire/duration";import{Timestamp as Js}from"@sapphire/timestamp";import ll from"adm-zip";import dl from"ajv/dist/2019.js";import{ApifyClient as rn}from"apify-client";import ml from"archiver";import{AxiosHeaders as ul}from"axios";import pl from"escape-string-regexp";import fl from"ignore";import{getEncoding as gl}from"istextorbinary";import{Mime as yl}from"mime";import hl from"mime/types/other.js";import wl from"mime/types/standard.js";import{gte as Al,minVersion as vl,satisfies as bl}from"semver";import{glob as Ks}from"tinyglobby";import{ACTOR_ENV_VARS as Ws,ACTOR_JOB_TERMINAL_STATUSES as Sl,ACTOR_NAME as Yt,APIFY_ENV_VARS as Tl,KEY_VALUE_STORE_KEYS as Qi,LOCAL_ACTOR_ENV_VARS as zs,LOCAL_STORAGE_SUBDIRS as Xs,SOURCE_FILE_FORMATS as Gt}from"@apify/consts";import{existsSync as Wc,mkdirSync as zc}from"fs";import{readFile as Xc,stat as Wi,unlink as Zc,writeFile as Qc}from"fs/promises";import{join as zi,sep as el}from"path";import{rimraf as tl}from"rimraf";var Xi=m(async(r,e={},t=null)=>{let o=await Xc(r,"utf-8"),s=JSON.parse(o),i;t?(i=s,i[t]={...s[t],...e}):i={...s,...e},await Qc(r,JSON.stringify(i,null," "))},"updateLocalJson"),$r=m((r,e)=>{e||(e=r,r="."),e.split(el).reduce((o,s)=>(o=zi(o,s),Wc(o)||zc(o),o),r)},"ensureFolderExistsSync"),Bt=m(async r=>{await tl(r)},"rimrafPromised"),Vt=m(async r=>{(await Wi(r)).isFile()&&await Zc(r)},"deleteFile"),Zi=m(async(r,e)=>(await Promise.all(r.map(async s=>Wi(zi(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var Ht=fl,Jt=dl,_r=m(async r=>new Promise((e,t)=>{nl(r,o=>{o.statusCode===301||o.statusCode===302?(e(_r(o.headers.location)),o.destroy()):e(o)}).on("error",t)}),"httpsGet"),ye=m(()=>{let r=Tl.LOCAL_STORAGE_DIR;return X.env[r]||X.env.CRAWLEE_STORAGE_DIR||tt},"getLocalStorageDir"),ge=m(r=>{let e=Ws.DEFAULT_KEY_VALUE_STORE_ID,t=r||X.env[e]||zs[e];return J(ye(),Xs.keyValueStores,t)},"getLocalKeyValueStorePath"),on=m(r=>{let e=Ws.DEFAULT_DATASET_ID,t=r||X.env[e]||zs[e];return J(ye(),Xs.datasets,t)},"getLocalDatasetPath"),sn=m(r=>{let e=Ws.DEFAULT_REQUEST_QUEUE_ID,t=r||X.env[e]||zs[e];return J(ye(),Xs.requestQueues,t)},"getLocalRequestQueuePath"),M=m(async()=>{let r={};try{let e=await xr(fe(),"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 Wt();if(!r)throw X.exitCode=1,new Error('You are not logged in with your Apify account. Call "apify login" to fix that.');return r}m(I,"getLoggedClientOrThrow");var nn=m(r=>{if(!r&&oe(ft())&&oe(fe())){let e=qt(fe(),"utf-8");return JSON.parse(e).token}return r},"getTokenWithAuthFileFallback"),Kt=m((r,e)=>(r=nn(r),{token:r,baseUrl:e||X.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[t=>{t.headers??=new ul;for(let[o,s]of Object.entries(Ji))t.headers[o]=s;return t}]}),"getApifyClientOptions");async function Wt(r,e){r=nn(r);let t=new rn(Kt(r,e)),o;try{o=await t.user("me").get()}catch(s){return T("[getLoggedClient] error getting user info",{error:s,apiBaseUrl:e}),null}return Qs(fe()),Rr(fe(),JSON.stringify({token:t.token,...o},null," ")),t}m(Wt,"getLoggedClient");var Zs=m(r=>J(r,D),"getLocalConfigPath"),le=m(r=>{if(oe(r))return JSON.parse(qt(r,{encoding:"utf-8"}))},"getJsonFileContent"),Ue=m(r=>le(Zs(r)),"getLocalConfig"),kr=m(async(r,e)=>{let t=J(e||X.cwd(),D);await il(gt(t),{recursive:!0}),Rr(t,JSON.stringify(r,null," "))},"setLocalConfig"),Cl=[ye(),"node_modules",".venv"],Pr=m(async r=>{let e=ge();$r(r,on()),$r(r,sn()),$r(r,e);let t=J(r,".gitignore"),o="";oe(t)&&(o=qt(t,{encoding:"utf-8"}));let s=[];for(let i of Cl)RegExp(`^${pl(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),Rr(t,`
|
|
1
|
+
var Lc=Object.defineProperty;var m=(r,e)=>Lc(r,"name",{value:e,configurable:!0});import Re from"process";import{parseArgs as ra}from"util";import so from"chalk";import{satisfies as Md}from"semver";import di from"chalk";import Ad from"indent-string";import vd from"widest-line";import bd from"wrap-ansi";import Bi from"ci-info";var Dc=[["CLAUDECODE","claude_code"],["CLAUDE_CODE_ENTRYPOINT","claude_code"],["CURSOR_AGENT","cursor"],["CLINE_ACTIVE","cline"],["CODEX_SANDBOX","codex_cli"],["CODEX_THREAD_ID","codex_cli"],["GEMINI_CLI","gemini_cli"],["OPENCODE","open_code"],["OPENCLAW_SHELL","openclaw"]];function Vi(){for(let[r,e]of Dc)if(process.env[r])return e}m(Vi,"detectAiAgent");function Gi(){return Bi.isCI?{isCi:!0,ciProvider:Bi.id?.toLowerCase()??"unknown"}:{isCi:!1,ciProvider:void 0}}m(Gi,"detectCi");function Yi(){return!!process.stdin.isTTY&&!!process.stdout.isTTY}m(Yi,"detectIsInteractive");import Fc from"chalk";function T(r,...e){process.env.APIFY_CLI_DEBUG&&console.error(Fc.gray(`[${r}]`),...e)}m(T,"cliDebugPrint");import{realpathSync as Uc}from"fs";import{dirname as Mc}from"path";import pt from"chalk";function Qe(r){r.stdoutOutput&&console.log(...r.stdoutOutput),r.stderrOutput&&console.error(...r.stderrOutput)}m(Qe,"internalLog");function R(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[r.message]})}m(R,"simpleLog");function f(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.red("Error:"),r.message]})}m(f,"error");function x(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.yellow.bold("Warning:"),r.message]})}m(x,"warning");function $(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.green("Success:"),r.message]})}m($,"success");function Se(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.gray("Run:"),r.message]})}m(Se,"run");function v(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.white("Info:"),r.message]})}m(v,"info");function Bs(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[pt.blue(r.message),r.url]})}m(Bs,"link");var Vs="0.0.0";var jc="1.4.2-beta.5",Bc="551cf5513ab814ddd6f7bd6a35a9cbbc004fe400";function Vc(){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 x({message:"Failed to detect install method of CLI, assuming npm"}),"npm";let e=Uc(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"}m(Vc,"detectInstallMethod");function Gc(){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}}m(Gc,"getRuntimeInfo");var jt=null;function z(){if(jt)return jt;let r=Vc(),e=Gc();return jt={version:jc,hash:Bc,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===Vs}},r==="bundle"&&(jt.installPath=Mc(process.execPath)),jt}m(z,"useCLIMetadata");import{existsSync as Rl,mkdirSync as xl,readFileSync as _l,writeFileSync as kl}from"fs";import{dirname as Pl}from"path";import{cryptoRandomObjectId as Ol}from"@apify/utilities";import{homedir as Hc}from"os";import{join as et}from"path";import{KEY_VALUE_STORE_KEYS as qc,META_ORIGINS as Jc}from"@apify/consts";var Hi={name:"apify-cli",version:"1.4.2-beta.5",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 --exclude ./test/e2e","test:e2e":"vitest run --testNamePattern '\\[e2e\\]' --exclude ./test/api","test:e2e:local":"vitest run --testNamePattern '^(?=.*\\[e2e\\])(?!.*\\[api\\]).*$' --exclude ./test/api","test:api":"vitest run --testNamePattern '^(?=.*\\[api\\])(?!.*\\[e2e\\]).*$' --exclude ./test/e2e","test:python":"vitest run --testNamePattern '\\[python\\]'",lint:"eslint src test scripts --ext .ts,.cjs,.mjs","lint:fix":"eslint src test scripts --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.12","@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.15.0",chalk:"~5.6.0","ci-info":"~4.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","es-toolkit":"^1.45.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","@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:"^6.0.0","typescript-eslint":"^8.31.0",vitest:"^4.0.0"},volta:{node:"24.14.1",yarn:"4.13.0"},packageManager:"yarn@4.13.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.13"}};var tt="storage",Gs="apify_storage",Ys=1,br={actorSpecification:Ys,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},qi=1440*60*1e3,ft=m(()=>{let r=et(Hc(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?et(r,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):r},"GLOBAL_CONFIGS_FOLDER"),fe=m(()=>et(ft(),"auth.json"),"AUTH_FILE_PATH"),Sr=m(()=>et(ft(),"secrets.json"),"SECRETS_FILE_PATH"),Tr=m(()=>et(ft(),"state.json"),"STATE_FILE_PATH"),Cr=m(()=>et(ft(),"telemetry.json"),"TELEMETRY_FILE_PATH"),Ir="apify.json",Er=".actor",Kc="actor.json",D=et(Er,Kc),Hs=new RegExp(`(^${qc.INPUT}(?:\\.[^.]+)?$)`),Te=Hi.engines.node,Ji={"X-Apify-Request-Origin":Jc.CLI},rt="3.9.0",Ki=".venv";import{execSync as rl}from"child_process";import{createWriteStream as ol,existsSync as oe,mkdirSync as sl,readdirSync as en,readFileSync as qt,writeFileSync as Rr}from"fs";import{mkdir as il,readFile as xr}from"fs/promises";import{get as nl}from"https";import{homedir as qs}from"os";import{dirname as gt,join as J,relative as al}from"path";import X from"process";import{finished as cl}from"stream/promises";import{DurationFormatter as tn,TimeTypes as ot}from"@sapphire/duration";import{Timestamp as Js}from"@sapphire/timestamp";import ll from"adm-zip";import dl from"ajv/dist/2019.js";import{ApifyClient as rn}from"apify-client";import ml from"archiver";import{AxiosHeaders as ul}from"axios";import pl from"escape-string-regexp";import fl from"ignore";import{getEncoding as gl}from"istextorbinary";import{Mime as yl}from"mime";import hl from"mime/types/other.js";import wl from"mime/types/standard.js";import{gte as Al,minVersion as vl,satisfies as bl}from"semver";import{glob as Ks}from"tinyglobby";import{ACTOR_ENV_VARS as Ws,ACTOR_JOB_TERMINAL_STATUSES as Sl,ACTOR_NAME as Yt,APIFY_ENV_VARS as Tl,KEY_VALUE_STORE_KEYS as Qi,LOCAL_ACTOR_ENV_VARS as zs,LOCAL_STORAGE_SUBDIRS as Xs,SOURCE_FILE_FORMATS as Gt}from"@apify/consts";import{existsSync as Wc,mkdirSync as zc}from"fs";import{readFile as Xc,stat as Wi,unlink as Zc,writeFile as Qc}from"fs/promises";import{join as zi,sep as el}from"path";import{rimraf as tl}from"rimraf";var Xi=m(async(r,e={},t=null)=>{let o=await Xc(r,"utf-8"),s=JSON.parse(o),i;t?(i=s,i[t]={...s[t],...e}):i={...s,...e},await Qc(r,JSON.stringify(i,null," "))},"updateLocalJson"),$r=m((r,e)=>{e||(e=r,r="."),e.split(el).reduce((o,s)=>(o=zi(o,s),Wc(o)||zc(o),o),r)},"ensureFolderExistsSync"),Bt=m(async r=>{await tl(r)},"rimrafPromised"),Vt=m(async r=>{(await Wi(r)).isFile()&&await Zc(r)},"deleteFile"),Zi=m(async(r,e)=>(await Promise.all(r.map(async s=>Wi(zi(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var Ht=fl,Jt=dl,_r=m(async r=>new Promise((e,t)=>{nl(r,o=>{o.statusCode===301||o.statusCode===302?(e(_r(o.headers.location)),o.destroy()):e(o)}).on("error",t)}),"httpsGet"),ye=m(()=>{let r=Tl.LOCAL_STORAGE_DIR;return X.env[r]||X.env.CRAWLEE_STORAGE_DIR||tt},"getLocalStorageDir"),ge=m(r=>{let e=Ws.DEFAULT_KEY_VALUE_STORE_ID,t=r||X.env[e]||zs[e];return J(ye(),Xs.keyValueStores,t)},"getLocalKeyValueStorePath"),on=m(r=>{let e=Ws.DEFAULT_DATASET_ID,t=r||X.env[e]||zs[e];return J(ye(),Xs.datasets,t)},"getLocalDatasetPath"),sn=m(r=>{let e=Ws.DEFAULT_REQUEST_QUEUE_ID,t=r||X.env[e]||zs[e];return J(ye(),Xs.requestQueues,t)},"getLocalRequestQueuePath"),M=m(async()=>{let r={};try{let e=await xr(fe(),"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 Wt();if(!r)throw X.exitCode=1,new Error('You are not logged in with your Apify account. Call "apify login" to fix that.');return r}m(I,"getLoggedClientOrThrow");var nn=m(r=>{if(!r&&oe(ft())&&oe(fe())){let e=qt(fe(),"utf-8");return JSON.parse(e).token}return r},"getTokenWithAuthFileFallback"),Kt=m((r,e)=>(r=nn(r),{token:r,baseUrl:e||X.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[t=>{t.headers??=new ul;for(let[o,s]of Object.entries(Ji))t.headers[o]=s;return t}]}),"getApifyClientOptions");async function Wt(r,e){r=nn(r);let t=new rn(Kt(r,e)),o;try{o=await t.user("me").get()}catch(s){return T("[getLoggedClient] error getting user info",{error:s,apiBaseUrl:e}),null}return Qs(fe()),Rr(fe(),JSON.stringify({token:t.token,...o},null," ")),t}m(Wt,"getLoggedClient");var Zs=m(r=>J(r,D),"getLocalConfigPath"),le=m(r=>{if(oe(r))return JSON.parse(qt(r,{encoding:"utf-8"}))},"getJsonFileContent"),Ue=m(r=>le(Zs(r)),"getLocalConfig"),kr=m(async(r,e)=>{let t=J(e||X.cwd(),D);await il(gt(t),{recursive:!0}),Rr(t,JSON.stringify(r,null," "))},"setLocalConfig"),Cl=[ye(),"node_modules",".venv"],Pr=m(async r=>{let e=ge();$r(r,on()),$r(r,sn()),$r(r,e);let t=J(r,".gitignore"),o="";oe(t)&&(o=qt(t,{encoding:"utf-8"}));let s=[];for(let i of Cl)RegExp(`^${pl(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),Rr(t,`
|
|
2
2
|
${s.join(`
|
|
3
3
|
`)}
|
|
4
4
|
`,{flag:"a"})):Rr(t,`${s.join(`
|
|
@@ -300,4 +300,4 @@ Customize with --memory and --timeout flags.
|
|
|
300
300
|
4. INPUT_SCHEMA.json
|
|
301
301
|
|
|
302
302
|
Optionally specify custom schema path to validate.`;static group="Local Actor Development";static examples=[{description:"Validate the input schema discovered from the default locations.",command:"apify validate-schema"},{description:"Validate a specific INPUT_SCHEMA.json file.",command:"apify validate-schema ./my-schema.json"}];static docsUrl="https://docs.apify.com/cli/docs/reference#apify-validate-schema";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 co({forcePath:this.args.path,cwd:Bp.cwd(),getMessage:m(e=>e?`Validating input schema at ${e}`:`Validating input schema embedded in '${D}'`,"getMessage")}),$({message:"Input schema is valid."})}};var $O=[fo,Io,$o,Lo,Ko,ms,ys,ks,Ls,Fs,Ar,Do,fr,pr,Uo,Wo,Xo,ts,es,us,ps,fs,gs,bs,js,gr],RO=[_t,xt,Rt,$t,Et,vt,At,It,gr,fr,pr,Ar];export{dw as a,mw as b,$O as c,RO as d};
|
|
303
|
-
//# sourceMappingURL=chunk-
|
|
303
|
+
//# sourceMappingURL=chunk-B2LAUVVL.js.map
|