apify-cli 1.3.1-beta.3 → 1.3.1-beta.4
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-ECZXL32K.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-ECZXL32K.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 $c=Object.defineProperty;var m=(r,e)=>$c(r,"name",{value:e,configurable:!0});import Ee from"process";import{parseArgs as qi}from"util";import to from"chalk";import{satisfies as Eu}from"semver";import nn from"chalk";import au from"indent-string";import cu from"widest-line";import lu from"wrap-ansi";import Ec from"chalk";function C(r,...e){process.env.APIFY_CLI_DEBUG&&console.error(Ec.gray(`[${r}]`),...e)}m(C,"cliDebugPrint");import{realpathSync as Rc}from"fs";import{dirname as _c}from"path";import dt 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"]:[dt.red("Error:"),r.message]})}m(f,"error");function _(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.yellow.bold("Warning:"),r.message]})}m(_,"warning");function $(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.green("Success:"),r.message]})}m($,"success");function ve(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.gray("Run:"),r.message]})}m(ve,"run");function b(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.white("Info:"),r.message]})}m(b,"info");function Ls(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.blue(r.message),r.url]})}m(Ls,"link");var Ms="0.0.0";var xc="1.3.1-beta.3",Oc="6600aa1759ffc9431d85c1eef1f4f6fca9a7c947";function Pc(){if(process.env.APIFY_CLI_MARKED_INSTALL_METHOD)return process.env.APIFY_CLI_MARKED_INSTALL_METHOD;if(process.env.APIFY_CLI_BUNDLE)return"bundle";let r=process.argv[1];if(!r)return _({message:"Failed to detect install method of CLI, assuming npm"}),"npm";let e=Rc(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(Pc,"detectInstallMethod");function kc(){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(kc,"getRuntimeInfo");var Mt=null;function W(){if(Mt)return Mt;let r=Pc(),e=kc();return Mt={version:xc,hash:Oc,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===Ms}},r==="bundle"&&(Mt.installPath=_c(process.execPath)),Mt}m(W,"useCLIMetadata");import{existsSync as wl,mkdirSync as Al,readFileSync as bl,writeFileSync as Sl}from"fs";import{dirname as vl}from"path";import{cryptoRandomObjectId as Tl}from"@apify/utilities";import{homedir as Fc}from"os";import{join as et}from"path";import{KEY_VALUE_STORE_KEYS as Dc,META_ORIGINS as Lc}from"@apify/consts";var Dn={name:"apify-cli",version:"1.3.1-beta.3",description:"Apify command-line interface (CLI) helps you manage the Apify cloud platform and develop, build, and deploy Apify Actors.",exports:"./dist/index.js",type:"module",scripts:{"dev:apify":"tsx ./src/entrypoints/apify.ts","dev:actor":"tsx ./src/entrypoints/actor.ts","test:all":"yarn test:local && yarn test:api","test:local":"vitest run --testNamePattern '^((?!\\[api]).)*$' --exclude ./test/api","test:api":"vitest run --testNamePattern '\\[api\\]'","test:python":"vitest run --testNamePattern '\\[python\\]'","test:cucumber":'cross-env NODE_OPTIONS="--import tsx" cucumber-js',lint:"eslint src test scripts features --ext .ts,.cjs,.mjs","lint:fix":"eslint src test scripts features --fix --ext .ts,.cjs,.mjs",format:'biome format . && prettier --check "**/*.{md,yml,yaml}"',"format:fix":'biome format --write . && prettier --write "**/*.{md,yml,yaml}"',clean:"rimraf dist",build:"yarn clean && tsc && tsup","build-bundles":"bun run scripts/build-cli-bundles.ts",prepack:"yarn insert-cli-metadata && yarn build && yarn update-docs","insert-cli-metadata":"tsx scripts/insert-cli-metadata.ts","update-docs":"tsx scripts/generate-cli-docs.ts",postinstall:`node -e "console.log('We have an active developer community on Discord. You can find it on https://discord.gg/crawlee-apify-801163717915574323.');"`,prepare:"husky"},files:["dist"],bin:{actor:"./dist/actor.js",apify:"./dist/apify.js","apify-cli":"./dist/apify.js"},contributors:["Jakub Drobn\xEDk <jakub.drobnik@apify.com>","Jan Curn <jan@apify.com>","Vlad Frangu <vlad.frangu@apify.com>"],repository:{type:"git",url:"git+https://github.com/apify/apify-cli.git"},keywords:["apify","client","node","command","line","bash"],author:{name:"Apify",email:"support@apify.com",url:"https://www.apify.com"},license:"Apache-2.0",bugs:{url:"https://github.com/apify/apify-cli/issues"},homepage:"https://github.com/apify/apify-cli#readme",engines:{node:">=20"},dependencies:{"@apify/actor-memory-expression":"^0.1.3","@apify/actor-templates":"^0.1.5","@apify/consts":"^2.36.0","@apify/input_schema":"^3.17.0","@apify/utilities":"^2.18.0","@crawlee/memory-storage":"^3.12.0","@inquirer/core":"^11.0.0","@inquirer/input":"^5.0.0","@inquirer/password":"^5.0.0","@inquirer/select":"^5.0.0","@root/walk":"~1.1.0","@sapphire/duration":"^1.1.2","@sapphire/result":"^2.7.2","@sapphire/timestamp":"^1.0.3","@skyra/jaro-winkler":"^1.1.1","adm-zip":"~0.5.15",ajv:"~8.18.0","apify-client":"^2.22.0",archiver:"~7.0.1",axios:"^1.11.0",chalk:"~5.6.0","cli-table3":"^0.6.5","computer-name":"~0.1.0",configparser:"~0.3.10",cors:"~2.8.5","detect-indent":"~7.0.1","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","@cucumber/cucumber":"^12.0.0","@types/adm-zip":"^0.5.5","@types/archiver":"^7.0.0","@types/bun":"^1.2.5","@types/cors":"^2.8.17","@types/execa":"^2.0.2","@types/express":"^5.0.0","@types/jju":"^1.4.5","@types/js-levenshtein":"^1","@types/mime":"^4.0.0","@types/node":"^24.0.0","@types/semver":"^7.5.8","@types/which":"^3.0.4","@yarnpkg/core":"^4.1.2",apify:"^3.2.4","cross-env":"^10.0.0",eslint:"^9.25.1","eslint-config-prettier":"^10.1.2",husky:"^9","lint-staged":"^16.0.0","mock-stdin":"^1.0.0",prettier:"^3.5.3",tsup:"^8.5.0",tsx:"^4.16.5",typescript:"^5.8.3","typescript-eslint":"^8.31.0",vitest:"^4.0.0"},volta:{node:"24.14.0",yarn:"4.12.0"},packageManager:"yarn@4.12.0",devEngines:{runtime:[{name:"node",version:">= 20",onFail:"error"},{name:"bun",version:">= 1.2.5",onFail:"ignore"}],packageManager:{name:"yarn",version:">= 4",onFail:"warn"}},"lint-staged":{"*":"biome format --write --no-errors-on-unmatched","*.{mjs,js,ts}":"eslint --fix --ext mjs,js,ts","*.md":"prettier --write"},resolutions:{tar:"7.5.11"}};var tt="storage",Us="apify_storage",js=1,Ar={actorSpecification:js,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},Ln=1440*60*1e3,pt=m(()=>{let r=et(Fc(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?et(r,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):r},"GLOBAL_CONFIGS_FOLDER"),pe=m(()=>et(pt(),"auth.json"),"AUTH_FILE_PATH"),br=m(()=>et(pt(),"secrets.json"),"SECRETS_FILE_PATH"),Sr=m(()=>et(pt(),"state.json"),"STATE_FILE_PATH"),vr=m(()=>et(pt(),"telemetry.json"),"TELEMETRY_FILE_PATH"),Tr="apify.json",Cr=".actor",Mc="actor.json",D=et(Cr,Mc),Bs=new RegExp(`(^${Dc.INPUT}(?:\\.[^.]+)?$)`),Te=Dn.engines.node,Mn={"X-Apify-Request-Origin":Lc.CLI},rt="3.9.0",Un=".venv";import{execSync as Jc}from"child_process";import{createWriteStream as qc,existsSync as oe,mkdirSync as Kc,readdirSync as Hn,readFileSync as Yt,writeFileSync as $r}from"fs";import{mkdir as Wc,readFile as Er}from"fs/promises";import{get as zc}from"https";import{homedir as Vs}from"os";import{dirname as ft,join as J,relative as Xc}from"path";import z from"process";import{finished as Zc}from"stream/promises";import{DurationFormatter as Jn,TimeTypes as ot}from"@sapphire/duration";import{Timestamp as Gs}from"@sapphire/timestamp";import Qc from"adm-zip";import el from"ajv/dist/2019.js";import{ApifyClient as qn}from"apify-client";import tl from"archiver";import{AxiosHeaders as rl}from"axios";import ol from"escape-string-regexp";import sl from"ignore";import{getEncoding as nl}from"istextorbinary";import{Mime as il}from"mime";import al from"mime/types/other.js";import cl from"mime/types/standard.js";import{gte as ll,minVersion as ul,satisfies as ml}from"semver";import{glob as Ys}from"tinyglobby";import{ACTOR_ENV_VARS as Hs,ACTOR_JOB_TERMINAL_STATUSES as dl,ACTOR_NAME as Vt,APIFY_ENV_VARS as pl,KEY_VALUE_STORE_KEYS as Yn,LOCAL_ACTOR_ENV_VARS as Js,LOCAL_STORAGE_SUBDIRS as qs,SOURCE_FILE_FORMATS as Bt}from"@apify/consts";import{existsSync as Uc,mkdirSync as jc}from"fs";import{readFile as Bc,stat as jn,unlink as Vc,writeFile as Gc}from"fs/promises";import{join as Bn,sep as Yc}from"path";import{rimraf as Hc}from"rimraf";var Vn=m(async(r,e={},t=null)=>{let o=await Bc(r,"utf-8"),s=JSON.parse(o),n;t?(n=s,n[t]={...s[t],...e}):n={...s,...e},await Gc(r,JSON.stringify(n,null," "))},"updateLocalJson"),Ir=m((r,e)=>{e||(e=r,r="."),e.split(Yc).reduce((o,s)=>(o=Bn(o,s),Uc(o)||jc(o),o),r)},"ensureFolderExistsSync"),Ut=m(async r=>{await Hc(r)},"rimrafPromised"),jt=m(async r=>{(await jn(r)).isFile()&&await Vc(r)},"deleteFile"),Gn=m(async(r,e)=>(await Promise.all(r.map(async s=>jn(Bn(e,s))))).map(s=>s.size).reduce((s,n)=>s+n,0),"sumFilesSizeInBytes");var Gt=sl,Ht=el,Rr=m(async r=>new Promise((e,t)=>{zc(r,o=>{o.statusCode===301||o.statusCode===302?(e(Rr(o.headers.location)),o.destroy()):e(o)}).on("error",t)}),"httpsGet"),ge=m(()=>{let r=pl.LOCAL_STORAGE_DIR;return z.env[r]||z.env.CRAWLEE_STORAGE_DIR||tt},"getLocalStorageDir"),fe=m(r=>{let e=Hs.DEFAULT_KEY_VALUE_STORE_ID,t=r||z.env[e]||Js[e];return J(ge(),qs.keyValueStores,t)},"getLocalKeyValueStorePath"),Kn=m(r=>{let e=Hs.DEFAULT_DATASET_ID,t=r||z.env[e]||Js[e];return J(ge(),qs.datasets,t)},"getLocalDatasetPath"),Wn=m(r=>{let e=Hs.DEFAULT_REQUEST_QUEUE_ID,t=r||z.env[e]||Js[e];return J(ge(),qs.requestQueues,t)},"getLocalRequestQueuePath"),U=m(async()=>{let r={};try{let e=await Er(pe(),"utf-8");r=JSON.parse(e)}catch{return{}}if(!r.username&&!r.id)throw new Error('Corrupted local user info was found. Please run "apify login" to fix it.');return r},"getLocalUserInfo");async function I(){let r=await Jt();if(!r)throw z.exitCode=1,new Error('You are not logged in with your Apify account. Call "apify login" to fix that.');return r}m(I,"getLoggedClientOrThrow");var zn=m(r=>{if(!r&&oe(pt())&&oe(pe())){let e=Yt(pe(),"utf-8");return JSON.parse(e).token}return r},"getTokenWithAuthFileFallback"),Ks=m((r,e)=>(r=zn(r),{token:r,baseUrl:e||z.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[t=>{t.headers??=new rl;for(let[o,s]of Object.entries(Mn))t.headers[o]=s;return t}]}),"getApifyClientOptions");async function Jt(r,e){r=zn(r);let t=new qn(Ks(r,e)),o;try{o=await t.user("me").get()}catch(s){return C("[getLoggedClient] error getting user info",{error:s,apiBaseUrl:e}),null}return zs(pe()),$r(pe(),JSON.stringify({token:t.token,...o},null," ")),t}m(Jt,"getLoggedClient");var Ws=m(r=>J(r,D),"getLocalConfigPath"),le=m(r=>{if(oe(r))return JSON.parse(Yt(r,{encoding:"utf-8"}))},"getJsonFileContent"),Me=m(r=>le(Ws(r)),"getLocalConfig"),_r=m(async(r,e)=>{let t=J(e||z.cwd(),D);await Wc(ft(t),{recursive:!0}),$r(t,JSON.stringify(r,null," "))},"setLocalConfig"),fl=[ge(),"node_modules",".venv"],xr=m(async r=>{let e=fe();Ir(r,Kn()),Ir(r,Wn()),Ir(r,e);let t=J(r,".gitignore"),o="";oe(t)&&(o=Yt(t,{encoding:"utf-8"}));let s=[];for(let n of fl)RegExp(`^${ol(n)}$`,"mg").test(o)||s.push(n);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),$r(t,`
|
|
1
|
+
var $c=Object.defineProperty;var m=(r,e)=>$c(r,"name",{value:e,configurable:!0});import Ee from"process";import{parseArgs as qi}from"util";import to from"chalk";import{satisfies as Eu}from"semver";import nn from"chalk";import au from"indent-string";import cu from"widest-line";import lu from"wrap-ansi";import Ec from"chalk";function C(r,...e){process.env.APIFY_CLI_DEBUG&&console.error(Ec.gray(`[${r}]`),...e)}m(C,"cliDebugPrint");import{realpathSync as Rc}from"fs";import{dirname as _c}from"path";import dt 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"]:[dt.red("Error:"),r.message]})}m(f,"error");function _(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.yellow.bold("Warning:"),r.message]})}m(_,"warning");function $(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.green("Success:"),r.message]})}m($,"success");function ve(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.gray("Run:"),r.message]})}m(ve,"run");function b(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.white("Info:"),r.message]})}m(b,"info");function Ls(r){Qe({[r.stdout?"stdoutOutput":"stderrOutput"]:[dt.blue(r.message),r.url]})}m(Ls,"link");var Ms="0.0.0";var xc="1.3.1-beta.4",Oc="1cc8e8820866a65c09256959a35f1f4ccd989f76";function Pc(){if(process.env.APIFY_CLI_MARKED_INSTALL_METHOD)return process.env.APIFY_CLI_MARKED_INSTALL_METHOD;if(process.env.APIFY_CLI_BUNDLE)return"bundle";let r=process.argv[1];if(!r)return _({message:"Failed to detect install method of CLI, assuming npm"}),"npm";let e=Rc(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(Pc,"detectInstallMethod");function kc(){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(kc,"getRuntimeInfo");var Mt=null;function W(){if(Mt)return Mt;let r=Pc(),e=kc();return Mt={version:xc,hash:Oc,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===Ms}},r==="bundle"&&(Mt.installPath=_c(process.execPath)),Mt}m(W,"useCLIMetadata");import{existsSync as wl,mkdirSync as Al,readFileSync as bl,writeFileSync as Sl}from"fs";import{dirname as vl}from"path";import{cryptoRandomObjectId as Tl}from"@apify/utilities";import{homedir as Fc}from"os";import{join as et}from"path";import{KEY_VALUE_STORE_KEYS as Dc,META_ORIGINS as Lc}from"@apify/consts";var Dn={name:"apify-cli",version:"1.3.1-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","test:api":"vitest run --testNamePattern '\\[api\\]'","test:python":"vitest run --testNamePattern '\\[python\\]'","test:cucumber":'cross-env NODE_OPTIONS="--import tsx" cucumber-js',lint:"eslint src test scripts features --ext .ts,.cjs,.mjs","lint:fix":"eslint src test scripts features --fix --ext .ts,.cjs,.mjs",format:'biome format . && prettier --check "**/*.{md,yml,yaml}"',"format:fix":'biome format --write . && prettier --write "**/*.{md,yml,yaml}"',clean:"rimraf dist",build:"yarn clean && tsc && tsup","build-bundles":"bun run scripts/build-cli-bundles.ts",prepack:"yarn insert-cli-metadata && yarn build && yarn update-docs","insert-cli-metadata":"tsx scripts/insert-cli-metadata.ts","update-docs":"tsx scripts/generate-cli-docs.ts",postinstall:`node -e "console.log('We have an active developer community on Discord. You can find it on https://discord.gg/crawlee-apify-801163717915574323.');"`,prepare:"husky"},files:["dist"],bin:{actor:"./dist/actor.js",apify:"./dist/apify.js","apify-cli":"./dist/apify.js"},contributors:["Jakub Drobn\xEDk <jakub.drobnik@apify.com>","Jan Curn <jan@apify.com>","Vlad Frangu <vlad.frangu@apify.com>"],repository:{type:"git",url:"git+https://github.com/apify/apify-cli.git"},keywords:["apify","client","node","command","line","bash"],author:{name:"Apify",email:"support@apify.com",url:"https://www.apify.com"},license:"Apache-2.0",bugs:{url:"https://github.com/apify/apify-cli/issues"},homepage:"https://github.com/apify/apify-cli#readme",engines:{node:">=20"},dependencies:{"@apify/actor-memory-expression":"^0.1.3","@apify/actor-templates":"^0.1.5","@apify/consts":"^2.36.0","@apify/input_schema":"^3.17.0","@apify/utilities":"^2.18.0","@crawlee/memory-storage":"^3.12.0","@inquirer/core":"^11.0.0","@inquirer/input":"^5.0.0","@inquirer/password":"^5.0.0","@inquirer/select":"^5.0.0","@root/walk":"~1.1.0","@sapphire/duration":"^1.1.2","@sapphire/result":"^2.7.2","@sapphire/timestamp":"^1.0.3","@skyra/jaro-winkler":"^1.1.1","adm-zip":"~0.5.15",ajv:"~8.18.0","apify-client":"^2.22.0",archiver:"~7.0.1",axios:"^1.11.0",chalk:"~5.6.0","cli-table3":"^0.6.5","computer-name":"~0.1.0",configparser:"~0.3.10",cors:"~2.8.5","detect-indent":"~7.0.1","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","@cucumber/cucumber":"^12.0.0","@types/adm-zip":"^0.5.5","@types/archiver":"^7.0.0","@types/bun":"^1.2.5","@types/cors":"^2.8.17","@types/execa":"^2.0.2","@types/express":"^5.0.0","@types/jju":"^1.4.5","@types/js-levenshtein":"^1","@types/mime":"^4.0.0","@types/node":"^24.0.0","@types/semver":"^7.5.8","@types/which":"^3.0.4","@yarnpkg/core":"^4.1.2",apify:"^3.2.4","cross-env":"^10.0.0",eslint:"^9.25.1","eslint-config-prettier":"^10.1.2",husky:"^9","lint-staged":"^16.0.0","mock-stdin":"^1.0.0",prettier:"^3.5.3",tsup:"^8.5.0",tsx:"^4.16.5",typescript:"^5.8.3","typescript-eslint":"^8.31.0",vitest:"^4.0.0"},volta:{node:"24.14.0",yarn:"4.12.0"},packageManager:"yarn@4.12.0",devEngines:{runtime:[{name:"node",version:">= 20",onFail:"error"},{name:"bun",version:">= 1.2.5",onFail:"ignore"}],packageManager:{name:"yarn",version:">= 4",onFail:"warn"}},"lint-staged":{"*":"biome format --write --no-errors-on-unmatched","*.{mjs,js,ts}":"eslint --fix --ext mjs,js,ts","*.md":"prettier --write"},resolutions:{tar:"7.5.11"}};var tt="storage",Us="apify_storage",js=1,Ar={actorSpecification:js,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},Ln=1440*60*1e3,pt=m(()=>{let r=et(Fc(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?et(r,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):r},"GLOBAL_CONFIGS_FOLDER"),pe=m(()=>et(pt(),"auth.json"),"AUTH_FILE_PATH"),br=m(()=>et(pt(),"secrets.json"),"SECRETS_FILE_PATH"),Sr=m(()=>et(pt(),"state.json"),"STATE_FILE_PATH"),vr=m(()=>et(pt(),"telemetry.json"),"TELEMETRY_FILE_PATH"),Tr="apify.json",Cr=".actor",Mc="actor.json",D=et(Cr,Mc),Bs=new RegExp(`(^${Dc.INPUT}(?:\\.[^.]+)?$)`),Te=Dn.engines.node,Mn={"X-Apify-Request-Origin":Lc.CLI},rt="3.9.0",Un=".venv";import{execSync as Jc}from"child_process";import{createWriteStream as qc,existsSync as oe,mkdirSync as Kc,readdirSync as Hn,readFileSync as Yt,writeFileSync as $r}from"fs";import{mkdir as Wc,readFile as Er}from"fs/promises";import{get as zc}from"https";import{homedir as Vs}from"os";import{dirname as ft,join as J,relative as Xc}from"path";import z from"process";import{finished as Zc}from"stream/promises";import{DurationFormatter as Jn,TimeTypes as ot}from"@sapphire/duration";import{Timestamp as Gs}from"@sapphire/timestamp";import Qc from"adm-zip";import el from"ajv/dist/2019.js";import{ApifyClient as qn}from"apify-client";import tl from"archiver";import{AxiosHeaders as rl}from"axios";import ol from"escape-string-regexp";import sl from"ignore";import{getEncoding as nl}from"istextorbinary";import{Mime as il}from"mime";import al from"mime/types/other.js";import cl from"mime/types/standard.js";import{gte as ll,minVersion as ul,satisfies as ml}from"semver";import{glob as Ys}from"tinyglobby";import{ACTOR_ENV_VARS as Hs,ACTOR_JOB_TERMINAL_STATUSES as dl,ACTOR_NAME as Vt,APIFY_ENV_VARS as pl,KEY_VALUE_STORE_KEYS as Yn,LOCAL_ACTOR_ENV_VARS as Js,LOCAL_STORAGE_SUBDIRS as qs,SOURCE_FILE_FORMATS as Bt}from"@apify/consts";import{existsSync as Uc,mkdirSync as jc}from"fs";import{readFile as Bc,stat as jn,unlink as Vc,writeFile as Gc}from"fs/promises";import{join as Bn,sep as Yc}from"path";import{rimraf as Hc}from"rimraf";var Vn=m(async(r,e={},t=null)=>{let o=await Bc(r,"utf-8"),s=JSON.parse(o),n;t?(n=s,n[t]={...s[t],...e}):n={...s,...e},await Gc(r,JSON.stringify(n,null," "))},"updateLocalJson"),Ir=m((r,e)=>{e||(e=r,r="."),e.split(Yc).reduce((o,s)=>(o=Bn(o,s),Uc(o)||jc(o),o),r)},"ensureFolderExistsSync"),Ut=m(async r=>{await Hc(r)},"rimrafPromised"),jt=m(async r=>{(await jn(r)).isFile()&&await Vc(r)},"deleteFile"),Gn=m(async(r,e)=>(await Promise.all(r.map(async s=>jn(Bn(e,s))))).map(s=>s.size).reduce((s,n)=>s+n,0),"sumFilesSizeInBytes");var Gt=sl,Ht=el,Rr=m(async r=>new Promise((e,t)=>{zc(r,o=>{o.statusCode===301||o.statusCode===302?(e(Rr(o.headers.location)),o.destroy()):e(o)}).on("error",t)}),"httpsGet"),ge=m(()=>{let r=pl.LOCAL_STORAGE_DIR;return z.env[r]||z.env.CRAWLEE_STORAGE_DIR||tt},"getLocalStorageDir"),fe=m(r=>{let e=Hs.DEFAULT_KEY_VALUE_STORE_ID,t=r||z.env[e]||Js[e];return J(ge(),qs.keyValueStores,t)},"getLocalKeyValueStorePath"),Kn=m(r=>{let e=Hs.DEFAULT_DATASET_ID,t=r||z.env[e]||Js[e];return J(ge(),qs.datasets,t)},"getLocalDatasetPath"),Wn=m(r=>{let e=Hs.DEFAULT_REQUEST_QUEUE_ID,t=r||z.env[e]||Js[e];return J(ge(),qs.requestQueues,t)},"getLocalRequestQueuePath"),U=m(async()=>{let r={};try{let e=await Er(pe(),"utf-8");r=JSON.parse(e)}catch{return{}}if(!r.username&&!r.id)throw new Error('Corrupted local user info was found. Please run "apify login" to fix it.');return r},"getLocalUserInfo");async function I(){let r=await Jt();if(!r)throw z.exitCode=1,new Error('You are not logged in with your Apify account. Call "apify login" to fix that.');return r}m(I,"getLoggedClientOrThrow");var zn=m(r=>{if(!r&&oe(pt())&&oe(pe())){let e=Yt(pe(),"utf-8");return JSON.parse(e).token}return r},"getTokenWithAuthFileFallback"),Ks=m((r,e)=>(r=zn(r),{token:r,baseUrl:e||z.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[t=>{t.headers??=new rl;for(let[o,s]of Object.entries(Mn))t.headers[o]=s;return t}]}),"getApifyClientOptions");async function Jt(r,e){r=zn(r);let t=new qn(Ks(r,e)),o;try{o=await t.user("me").get()}catch(s){return C("[getLoggedClient] error getting user info",{error:s,apiBaseUrl:e}),null}return zs(pe()),$r(pe(),JSON.stringify({token:t.token,...o},null," ")),t}m(Jt,"getLoggedClient");var Ws=m(r=>J(r,D),"getLocalConfigPath"),le=m(r=>{if(oe(r))return JSON.parse(Yt(r,{encoding:"utf-8"}))},"getJsonFileContent"),Me=m(r=>le(Ws(r)),"getLocalConfig"),_r=m(async(r,e)=>{let t=J(e||z.cwd(),D);await Wc(ft(t),{recursive:!0}),$r(t,JSON.stringify(r,null," "))},"setLocalConfig"),fl=[ge(),"node_modules",".venv"],xr=m(async r=>{let e=fe();Ir(r,Kn()),Ir(r,Wn()),Ir(r,e);let t=J(r,".gitignore"),o="";oe(t)&&(o=Yt(t,{encoding:"utf-8"}));let s=[];for(let n of fl)RegExp(`^${ol(n)}$`,"mg").test(o)||s.push(n);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),$r(t,`
|
|
2
2
|
${s.join(`
|
|
3
3
|
`)}
|
|
4
4
|
`,{flag:"a"})):$r(t,`${s.join(`
|
|
@@ -320,4 +320,4 @@ Read more: https://docs.apify.com/cli/docs/telemetry`;static subcommands=[Fs,Ns]
|
|
|
320
320
|
4. INPUT_SCHEMA.json
|
|
321
321
|
|
|
322
322
|
Optionally specify custom schema path to validate.`;static args={path:A.string({required:!1,description:"Optional path to your INPUT_SCHEMA.json file. If not provided ./INPUT_SCHEMA.json is used."})};static hiddenAliases=["vis"];async run(){await no({forcePath:this.args.path,cwd:Ip.cwd(),getMessage:m(e=>e?`Validating input schema at ${e}`:`Validating input schema embedded in '${D}'`,"getMessage")}),$({message:"Input schema is valid."})}};var WP=[uo,So,To,Oo,Yo,as,ds,Es,Os,ks,yr,Po,dr,mr,No,Ho,qo,Xo,zo,cs,ls,us,ms,ys,Ds,pr],zP=[Rt,Et,$t,It,Ct,wt,yt,Tt,pr,dr,mr,yr];export{Yy as a,Hy as b,WP as c,zP as d};
|
|
323
|
-
//# sourceMappingURL=chunk-
|
|
323
|
+
//# sourceMappingURL=chunk-ECZXL32K.js.map
|