apify-cli 1.2.2-beta.26 → 1.2.2-beta.28
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-WPWD5ZUF.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-WPWD5ZUF.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 rc=Object.defineProperty;var u=(r,e)=>rc(r,"name",{value:e,configurable:!0});import Ie from"process";import{parseArgs as kn}from"util";import Hr from"chalk";import{satisfies as Ql}from"semver";import Js from"chalk";import Nl from"indent-string";import kl from"widest-line";import Ll from"wrap-ansi";import oc from"chalk";function C(r,...e){process.env.APIFY_CLI_DEBUG&&console.error(oc.gray(`[${r}]`),...e)}u(C,"cliDebugPrint");import{realpathSync as sc}from"fs";import{dirname as ic}from"path";import dt from"chalk";function Ze(r){r.stdoutOutput&&console.log(...r.stdoutOutput),r.stderrOutput&&console.error(...r.stderrOutput)}u(Ze,"internalLog");function _(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[r.message]})}u(_,"simpleLog");function d(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.red("Error:"),r.message]})}u(d,"error");function R(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.yellow.bold("Warning:"),r.message]})}u(R,"warning");function E(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.green("Success:"),r.message]})}u(E,"success");function be(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.gray("Run:"),r.message]})}u(be,"run");function S(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.white("Info:"),r.message]})}u(S,"info");function Is(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.blue(r.message),r.url]})}u(Is,"link");var $s="0.0.0";var nc="1.2.2-beta.26",ac="6292d3c79cb3df086860402211aba4f3582ac016";function cc(){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 R({message:"Failed to detect install method of CLI, assuming npm"}),"npm";let e=sc(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(cc,"detectInstallMethod");function lc(){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(lc,"getRuntimeInfo");var Nt=null;function K(){if(Nt)return Nt;let r=cc(),e=lc();return Nt={version:nc,hash:ac,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===$s}},r==="bundle"&&(Nt.installPath=ic(process.execPath)),Nt}u(K,"useCLIMetadata");import{existsSync as Yc,mkdirSync as Hc,readFileSync as Jc,writeFileSync as Kc}from"fs";import{dirname as qc}from"path";import{cryptoRandomObjectId as Wc}from"@apify/utilities";import{homedir as mc}from"os";import{join as Qe}from"path";import{KEY_VALUE_STORE_KEYS as dc,META_ORIGINS as pc}from"@apify/consts";var vi={name:"apify-cli",version:"1.2.2-beta.26",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:">=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",globby:"~15.0.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.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",which:"^6.0.0","widest-line":"^6.0.0","wrap-ansi":"^9.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/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":"^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","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.13.1",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.9"}};var et="storage",Es="apify_storage",_s=1,mr={actorSpecification:_s,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},Si=1440*60*1e3,pt=u(()=>{let r=Qe(mc(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?Qe(r,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):r},"GLOBAL_CONFIGS_FOLDER"),ce=u(()=>Qe(pt(),"auth.json"),"AUTH_FILE_PATH"),dr=u(()=>Qe(pt(),"secrets.json"),"SECRETS_FILE_PATH"),pr=u(()=>Qe(pt(),"state.json"),"STATE_FILE_PATH"),fr=u(()=>Qe(pt(),"telemetry.json"),"TELEMETRY_FILE_PATH"),gr="apify.json",Rs=".actor",fc="actor.json",V=Qe(Rs,fc),xs=new RegExp(`(^${dc.INPUT}(?:\\.[^.]+)?$)`),ve=vi.engines.node,Ti={"X-Apify-Request-Origin":pc.CLI},tt="3.9.0",Ci=".venv";import{createWriteStream as Sc,existsSync as ue,mkdirSync as Tc,readdirSync as Oi,readFileSync as Mt,writeFileSync as yr}from"fs";import{mkdir as Cc,readFile as Ic}from"fs/promises";import{get as $c}from"https";import{homedir as Ri}from"os";import{dirname as Pi,join as le}from"path";import se from"process";import{finished as Ec}from"stream/promises";import{DurationFormatter as Ni,TimeTypes as rt}from"@sapphire/duration";import{Timestamp as Os}from"@sapphire/timestamp";import _c from"adm-zip";import Rc from"ajv/dist/2019.js";import{ApifyClient as ki}from"apify-client";import xc from"archiver";import{AxiosHeaders as Oc}from"axios";import Pc from"escape-string-regexp";import{globby as Li}from"globby";import{getEncoding as Nc}from"istextorbinary";import{Mime as kc}from"mime";import Lc from"mime/types/other.js";import Dc from"mime/types/standard.js";import{gte as Fc,minVersion as Mc,satisfies as Uc}from"semver";import{ACTOR_ENV_VARS as Ps,ACTOR_JOB_TERMINAL_STATUSES as jc,ACTOR_NAME as Ft,APIFY_ENV_VARS as Bc,KEY_VALUE_STORE_KEYS as xi,LOCAL_ACTOR_ENV_VARS as Ns,LOCAL_STORAGE_SUBDIRS as ks,SOURCE_FILE_FORMATS as Dt}from"@apify/consts";import{existsSync as gc,mkdirSync as hc}from"fs";import{readFile as yc,stat as Ii,unlink as wc,writeFile as Ac}from"fs/promises";import{join as $i,sep as bc}from"path";import{rimraf as vc}from"rimraf";var Ei=u(async(r,e={},t=null)=>{let o=await yc(r,"utf-8"),s=JSON.parse(o),i;t?(i=s,i[t]={...s[t],...e}):i={...s,...e},await Ac(r,JSON.stringify(i,null," "))},"updateLocalJson"),hr=u((r,e)=>{e||(e=r,r="."),e.split(bc).reduce((o,s)=>(o=$i(o,s),gc(o)||hc(o),o),r)},"ensureFolderExistsSync"),kt=u(async r=>{await vc(r)},"rimrafPromised"),Lt=u(async r=>{(await Ii(r)).isFile()&&await wc(r)},"deleteFile"),_i=u(async(r,e)=>(await Promise.all(r.map(async s=>Ii($i(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var ft=Rc,wr=u(async r=>new Promise((e,t)=>{$c(r,o=>{o.statusCode===301||o.statusCode===302?(e(wr(o.headers.location)),o.destroy()):e(o)}).on("error",t)}),"httpsGet"),de=u(()=>{let r=Bc.LOCAL_STORAGE_DIR;return se.env[r]||se.env.CRAWLEE_STORAGE_DIR||et},"getLocalStorageDir"),me=u(r=>{let e=Ps.DEFAULT_KEY_VALUE_STORE_ID,t=r||se.env[e]||Ns[e];return le(de(),ks.keyValueStores,t)},"getLocalKeyValueStorePath"),Di=u(r=>{let e=Ps.DEFAULT_DATASET_ID,t=r||se.env[e]||Ns[e];return le(de(),ks.datasets,t)},"getLocalDatasetPath"),Fi=u(r=>{let e=Ps.DEFAULT_REQUEST_QUEUE_ID,t=r||se.env[e]||Ns[e];return le(de(),ks.requestQueues,t)},"getLocalRequestQueuePath"),F=u(async()=>{let r={};try{let e=await Ic(ce(),"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 Ut();if(!r)throw se.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 Mi=u(r=>{if(!r&&ue(pt())&&ue(ce())){let e=Mt(ce(),"utf-8");return JSON.parse(e).token}return r},"getTokenWithAuthFileFallback"),Ls=u((r,e)=>(r=Mi(r),{token:r,baseUrl:e||se.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[t=>{t.headers??=new Oc;for(let[o,s]of Object.entries(Ti))t.headers[o]=s;return t}]}),"getApifyClientOptions");async function Ut(r,e){r=Mi(r);let t=new ki(Ls(r,e)),o;try{o=await t.user("me").get()}catch{return null}return Fs(ce()),yr(ce(),JSON.stringify({token:t.token,...o},null," ")),t}u(Ut,"getLoggedClient");var Ds=u(r=>le(r,V),"getLocalConfigPath"),pe=u(r=>{if(ue(r))return JSON.parse(Mt(r,{encoding:"utf-8"}))},"getJsonFileContent"),Ue=u(r=>pe(Ds(r)),"getLocalConfig"),Ar=u(async(r,e)=>{let t=le(e||se.cwd(),V);await Cc(Pi(t),{recursive:!0}),yr(t,JSON.stringify(r,null," "))},"setLocalConfig"),Vc=[de(),"node_modules",".venv"],br=u(async r=>{let e=me();hr(r,Di()),hr(r,Fi()),hr(r,e);let t=le(r,".gitignore"),o="";ue(t)&&(o=Mt(t,{encoding:"utf-8"}));let s=[];for(let i of Vc)RegExp(`^${Pc(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),yr(t,`
|
|
1
|
+
var rc=Object.defineProperty;var u=(r,e)=>rc(r,"name",{value:e,configurable:!0});import Ie from"process";import{parseArgs as kn}from"util";import Hr from"chalk";import{satisfies as Ql}from"semver";import Js from"chalk";import Nl from"indent-string";import kl from"widest-line";import Ll from"wrap-ansi";import oc from"chalk";function C(r,...e){process.env.APIFY_CLI_DEBUG&&console.error(oc.gray(`[${r}]`),...e)}u(C,"cliDebugPrint");import{realpathSync as sc}from"fs";import{dirname as ic}from"path";import dt from"chalk";function Ze(r){r.stdoutOutput&&console.log(...r.stdoutOutput),r.stderrOutput&&console.error(...r.stderrOutput)}u(Ze,"internalLog");function _(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[r.message]})}u(_,"simpleLog");function d(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.red("Error:"),r.message]})}u(d,"error");function R(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.yellow.bold("Warning:"),r.message]})}u(R,"warning");function E(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.green("Success:"),r.message]})}u(E,"success");function be(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.gray("Run:"),r.message]})}u(be,"run");function S(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.white("Info:"),r.message]})}u(S,"info");function Is(r){Ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.blue(r.message),r.url]})}u(Is,"link");var $s="0.0.0";var nc="1.2.2-beta.28",ac="597e7322ca931056e85f9372815b7d0126822d5a";function cc(){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 R({message:"Failed to detect install method of CLI, assuming npm"}),"npm";let e=sc(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(cc,"detectInstallMethod");function lc(){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(lc,"getRuntimeInfo");var Nt=null;function K(){if(Nt)return Nt;let r=cc(),e=lc();return Nt={version:nc,hash:ac,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===$s}},r==="bundle"&&(Nt.installPath=ic(process.execPath)),Nt}u(K,"useCLIMetadata");import{existsSync as Yc,mkdirSync as Hc,readFileSync as Jc,writeFileSync as Kc}from"fs";import{dirname as qc}from"path";import{cryptoRandomObjectId as Wc}from"@apify/utilities";import{homedir as mc}from"os";import{join as Qe}from"path";import{KEY_VALUE_STORE_KEYS as dc,META_ORIGINS as pc}from"@apify/consts";var vi={name:"apify-cli",version:"1.2.2-beta.28",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:">=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",globby:"~15.0.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.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",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/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":"^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","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.13.1",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.9"}};var et="storage",Es="apify_storage",_s=1,mr={actorSpecification:_s,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},Si=1440*60*1e3,pt=u(()=>{let r=Qe(mc(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?Qe(r,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):r},"GLOBAL_CONFIGS_FOLDER"),ce=u(()=>Qe(pt(),"auth.json"),"AUTH_FILE_PATH"),dr=u(()=>Qe(pt(),"secrets.json"),"SECRETS_FILE_PATH"),pr=u(()=>Qe(pt(),"state.json"),"STATE_FILE_PATH"),fr=u(()=>Qe(pt(),"telemetry.json"),"TELEMETRY_FILE_PATH"),gr="apify.json",Rs=".actor",fc="actor.json",V=Qe(Rs,fc),xs=new RegExp(`(^${dc.INPUT}(?:\\.[^.]+)?$)`),ve=vi.engines.node,Ti={"X-Apify-Request-Origin":pc.CLI},tt="3.9.0",Ci=".venv";import{createWriteStream as Sc,existsSync as ue,mkdirSync as Tc,readdirSync as Oi,readFileSync as Mt,writeFileSync as yr}from"fs";import{mkdir as Cc,readFile as Ic}from"fs/promises";import{get as $c}from"https";import{homedir as Ri}from"os";import{dirname as Pi,join as le}from"path";import se from"process";import{finished as Ec}from"stream/promises";import{DurationFormatter as Ni,TimeTypes as rt}from"@sapphire/duration";import{Timestamp as Os}from"@sapphire/timestamp";import _c from"adm-zip";import Rc from"ajv/dist/2019.js";import{ApifyClient as ki}from"apify-client";import xc from"archiver";import{AxiosHeaders as Oc}from"axios";import Pc from"escape-string-regexp";import{globby as Li}from"globby";import{getEncoding as Nc}from"istextorbinary";import{Mime as kc}from"mime";import Lc from"mime/types/other.js";import Dc from"mime/types/standard.js";import{gte as Fc,minVersion as Mc,satisfies as Uc}from"semver";import{ACTOR_ENV_VARS as Ps,ACTOR_JOB_TERMINAL_STATUSES as jc,ACTOR_NAME as Ft,APIFY_ENV_VARS as Bc,KEY_VALUE_STORE_KEYS as xi,LOCAL_ACTOR_ENV_VARS as Ns,LOCAL_STORAGE_SUBDIRS as ks,SOURCE_FILE_FORMATS as Dt}from"@apify/consts";import{existsSync as gc,mkdirSync as hc}from"fs";import{readFile as yc,stat as Ii,unlink as wc,writeFile as Ac}from"fs/promises";import{join as $i,sep as bc}from"path";import{rimraf as vc}from"rimraf";var Ei=u(async(r,e={},t=null)=>{let o=await yc(r,"utf-8"),s=JSON.parse(o),i;t?(i=s,i[t]={...s[t],...e}):i={...s,...e},await Ac(r,JSON.stringify(i,null," "))},"updateLocalJson"),hr=u((r,e)=>{e||(e=r,r="."),e.split(bc).reduce((o,s)=>(o=$i(o,s),gc(o)||hc(o),o),r)},"ensureFolderExistsSync"),kt=u(async r=>{await vc(r)},"rimrafPromised"),Lt=u(async r=>{(await Ii(r)).isFile()&&await wc(r)},"deleteFile"),_i=u(async(r,e)=>(await Promise.all(r.map(async s=>Ii($i(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var ft=Rc,wr=u(async r=>new Promise((e,t)=>{$c(r,o=>{o.statusCode===301||o.statusCode===302?(e(wr(o.headers.location)),o.destroy()):e(o)}).on("error",t)}),"httpsGet"),de=u(()=>{let r=Bc.LOCAL_STORAGE_DIR;return se.env[r]||se.env.CRAWLEE_STORAGE_DIR||et},"getLocalStorageDir"),me=u(r=>{let e=Ps.DEFAULT_KEY_VALUE_STORE_ID,t=r||se.env[e]||Ns[e];return le(de(),ks.keyValueStores,t)},"getLocalKeyValueStorePath"),Di=u(r=>{let e=Ps.DEFAULT_DATASET_ID,t=r||se.env[e]||Ns[e];return le(de(),ks.datasets,t)},"getLocalDatasetPath"),Fi=u(r=>{let e=Ps.DEFAULT_REQUEST_QUEUE_ID,t=r||se.env[e]||Ns[e];return le(de(),ks.requestQueues,t)},"getLocalRequestQueuePath"),F=u(async()=>{let r={};try{let e=await Ic(ce(),"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 Ut();if(!r)throw se.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 Mi=u(r=>{if(!r&&ue(pt())&&ue(ce())){let e=Mt(ce(),"utf-8");return JSON.parse(e).token}return r},"getTokenWithAuthFileFallback"),Ls=u((r,e)=>(r=Mi(r),{token:r,baseUrl:e||se.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[t=>{t.headers??=new Oc;for(let[o,s]of Object.entries(Ti))t.headers[o]=s;return t}]}),"getApifyClientOptions");async function Ut(r,e){r=Mi(r);let t=new ki(Ls(r,e)),o;try{o=await t.user("me").get()}catch{return null}return Fs(ce()),yr(ce(),JSON.stringify({token:t.token,...o},null," ")),t}u(Ut,"getLoggedClient");var Ds=u(r=>le(r,V),"getLocalConfigPath"),pe=u(r=>{if(ue(r))return JSON.parse(Mt(r,{encoding:"utf-8"}))},"getJsonFileContent"),Ue=u(r=>pe(Ds(r)),"getLocalConfig"),Ar=u(async(r,e)=>{let t=le(e||se.cwd(),V);await Cc(Pi(t),{recursive:!0}),yr(t,JSON.stringify(r,null," "))},"setLocalConfig"),Vc=[de(),"node_modules",".venv"],br=u(async r=>{let e=me();hr(r,Di()),hr(r,Fi()),hr(r,e);let t=le(r,".gitignore"),o="";ue(t)&&(o=Mt(t,{encoding:"utf-8"}));let s=[];for(let i of Vc)RegExp(`^${Pc(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),yr(t,`
|
|
2
2
|
${s.join(`
|
|
3
3
|
`)}
|
|
4
4
|
`,{flag:"a"})):yr(t,`${s.join(`
|
|
@@ -277,4 +277,4 @@ Read more: https://docs.apify.com/cli/docs/telemetry`;static subcommands=[Ts,Ss]
|
|
|
277
277
|
4. INPUT_SCHEMA.json
|
|
278
278
|
|
|
279
279
|
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(){let{inputSchema:e,inputSchemaPath:t}=await lt({forcePath:this.args.path,cwd:Wd.cwd()});if(!e)throw new Error(`Input schema has not been found at ${t}.`);t?S({message:`Validating input schema stored at ${t}`}):S({message:`Validating input schema embedded in '${V}'`});let o=new ft({strict:!1});zd(o,e),E({message:"Input schema is valid."})}};var ZO=[Wr,io,ao,ho,Po,Wo,es,gs,As,vs,lr,yo,sr,or,So,No,Lo,Uo,Mo,zo,Xo,Zo,Qo,is,Cs,ir],QO=[Tt,St,vt,bt,At,wt,yt,ir,sr,or,lr];export{dy as a,py as b,ZO as c,QO as d};
|
|
280
|
-
//# sourceMappingURL=chunk-
|
|
280
|
+
//# sourceMappingURL=chunk-WPWD5ZUF.js.map
|