apify-cli 0.21.10-beta.23 → 0.21.10-beta.24
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-DMDGM4U7.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-DMDGM4U7.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 Pa=Object.defineProperty;var c=(r,e)=>Pa(r,"name",{value:e,configurable:!0});import Te from"process";import{parseArgs as pn}from"util";import Lr from"chalk";import{satisfies as $c}from"semver";import _s from"chalk";import ac from"indent-string";import lc from"widest-line";import cc from"wrap-ansi";import La from"chalk";function I(r,...e){process.env.APIFY_CLI_DEBUG&&console.error(La.gray(`[${r}]`),...e)}c(I,"cliDebugPrint");import{realpathSync as Da}from"fs";import{dirname as Fa}from"path";import ct from"chalk";function ze(r){r.stdoutOutput&&console.log(...r.stdoutOutput),r.stderrOutput&&console.error(...r.stderrOutput)}c(ze,"internalLog");function _(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[r.message]})}c(_,"simpleLog");function p(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.red("Error:"),r.message]})}c(p,"error");function x(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.yellow.bold("Warning:"),r.message]})}c(x,"warning");function $(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.green("Success:"),r.message]})}c($,"success");function ye(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.gray("Run:"),r.message]})}c(ye,"run");function v(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.white("Info:"),r.message]})}c(v,"info");function cs(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.blue(r.message),r.url]})}c(cs,"link");var si="0.0.0";var ka="0.21.10-beta.23",Ua="79c0aef4785e5b359c3bad3f6a60190fd9f78c4a";function Ma(){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=Da(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"}c(Ma,"detectInstallMethod");function ja(){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}}c(ja,"getRuntimeInfo");var $t=null;function K(){if($t)return $t;let r=Ma(),e=ja();return $t={version:ka,hash:Ua,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==="0.21.10-beta.23"}},r==="bundle"&&($t.installPath=Fa(process.execPath)),$t}c(K,"useCLIMetadata");import{existsSync as bl,mkdirSync as vl,readFileSync as Tl,writeFileSync as Il}from"fs";import{dirname as Cl}from"path";import{cryptoRandomObjectId as El}from"@apify/utilities";import{homedir as Ba}from"os";import{join as Xe}from"path";import{KEY_VALUE_STORE_KEYS as Ga,META_ORIGINS as Ya}from"@apify/consts";var ii={name:"apify-cli",version:"0.21.10-beta.23",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-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":"^10.1.15","@inquirer/input":"^4.2.1","@inquirer/password":"^4.0.17","@inquirer/select":"^4.3.1","@root/walk":"~1.1.0","@sapphire/duration":"^1.1.2","@sapphire/result":"^2.7.2","@sapphire/timestamp":"^1.0.3","@skyra/jaro-winkler":"^1.1.1","adm-zip":"~0.5.15",ajv:"~8.17.1","apify-client":"^2.14.0",archiver:"~7.0.1",axios:"^1.11.0",chalk:"~5.5.0","cli-table3":"^0.6.5","computer-name":"~0.1.0",configparser:"~0.3.10",cors:"~2.8.5","detect-indent":"~7.0.1","escape-string-regexp":"~5.0.0",execa:"^9.5.2",express:"~5.1.0",globby:"~14.1.0",handlebars:"~4.7.8","indent-string":"^5.0.0","is-ci":"~4.1.0",istextorbinary:"~9.5.0",jju:"~1.4.0","js-levenshtein":"^1.1.6","lodash.clonedeep":"^4.5.0",mime:"~4.0.4",open:"~10.2.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"},devDependencies:{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@biomejs/biome":"^2.0.0","@crawlee/types":"^3.11.1","@cucumber/cucumber":"^12.0.0","@types/adm-zip":"^0.5.5","@types/archiver":"^6.0.2","@types/bun":"^1.2.5","@types/chai":"^4.3.17","@types/cors":"^2.8.17","@types/execa":"^2.0.2","@types/express":"^5.0.0","@types/fs-extra":"^11","@types/is-ci":"^3.0.4","@types/jju":"^1.4.5","@types/js-levenshtein":"^1","@types/lodash.clonedeep":"^4","@types/mime":"^4.0.0","@types/node":"^22.0.0","@types/semver":"^7.5.8","@types/which":"^3.0.4","@yarnpkg/core":"^4.1.2",apify:"^3.2.4",chai:"^4.4.1","cross-env":"^10.0.0",eslint:"^9.25.1","eslint-config-prettier":"^10.1.2","lint-staged":"^16.0.0","mdast-util-from-markdown":"^2.0.2","mock-stdin":"^1.0.0",prettier:"^3.5.3",tsup:"^8.5.0",tsx:"^4.16.5",typescript:"^5.8.3","typescript-eslint":"^8.31.0",vitest:"^3.0.0"},volta:{node:"22.18.0",yarn:"4.9.2"},packageManager:"yarn@4.9.2",devEngines:{runtime:[{name:"node",version:">= 20",onFail:"error"},{name:"bun",version:">= 1.2.5",onFail:"ignore"}],packageManager:{name:"yarn",version:">= 4",onFail:"warn"}},"lint-staged":{"*":"biome format --write --no-errors-on-unmatched","*.{mjs,js,ts}":"eslint --fix --ext mjs,js,ts","*.md":"prettier --write"}};var Ze="storage",us="apify_storage",ms=1,rr={actorSpecification:ms,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},ni=1440*60*1e3,ut=c(()=>{let r=Xe(Ba(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?Xe(r,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):r},"GLOBAL_CONFIGS_FOLDER"),ne=c(()=>Xe(ut(),"auth.json"),"AUTH_FILE_PATH"),or=c(()=>Xe(ut(),"secrets.json"),"SECRETS_FILE_PATH"),sr=c(()=>Xe(ut(),"state.json"),"STATE_FILE_PATH"),ir=c(()=>Xe(ut(),"telemetry.json"),"TELEMETRY_FILE_PATH"),nr="apify.json",ds=".actor",Ha="actor.json",j=Xe(ds,Ha),ps=new RegExp(`^${Ga.INPUT}\\..*`),we=ii.engines.node,ai={"X-Apify-Request-Origin":Ya.CLI},Qe="3.9.0",li=".venv";import{createWriteStream as Qa,existsSync as le,mkdirSync as el,readdirSync as fi,readFileSync as Nt,writeFileSync as lr}from"fs";import{mkdir as tl,readFile as rl}from"fs/promises";import{get as ol}from"https";import{dirname as gi,join as Ae}from"path";import ae from"process";import{finished as sl}from"stream/promises";import{DurationFormatter as hi,TimeTypes as et}from"@sapphire/duration";import{Timestamp as fs}from"@sapphire/timestamp";import il from"adm-zip";import nl from"ajv/dist/2019.js";import{ApifyClient as yi}from"apify-client";import al from"archiver";import{AxiosHeaders as ll}from"axios";import cl from"escape-string-regexp";import{globby as wi}from"globby";import{getEncoding as ul}from"istextorbinary";import{Mime as ml}from"mime";import dl from"mime/types/other.js";import pl from"mime/types/standard.js";import{gte as fl,minVersion as gl,satisfies as hl}from"semver";import{ACTOR_ENV_VARS as gs,ACTOR_JOB_TERMINAL_STATUSES as yl,ACTOR_NAME as Ot,APIFY_ENV_VARS as wl,KEY_VALUE_STORE_KEYS as pi,LOCAL_ACTOR_ENV_VARS as hs,LOCAL_STORAGE_SUBDIRS as ys,SOURCE_FILE_FORMATS as xt}from"@apify/consts";import{existsSync as Ja,mkdirSync as Ka}from"fs";import{readFile as qa,stat as ci,unlink as Wa,writeFile as za}from"fs/promises";import{join as ui,sep as Xa}from"path";import{rimraf as Za}from"rimraf";var mi=c(async(r,e={},t=null)=>{let o=await qa(r,"utf-8"),s=JSON.parse(o),i;t?(i=s,i[t]={...s[t],...e}):i={...s,...e},await za(r,JSON.stringify(i,null," "))},"updateLocalJson"),ar=c((r,e)=>{e||(e=r,r="."),e.split(Xa).reduce((o,s)=>(o=ui(o,s),Ja(o)||Ka(o),o),r)},"ensureFolderExistsSync"),Rt=c(async r=>{await Za(r)},"rimrafPromised"),_t=c(async r=>{(await ci(r)).isFile()&&await Wa(r)},"deleteFile"),di=c(async(r,e)=>(await Promise.all(r.map(async s=>ci(ui(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var mt=nl,cr=c(async r=>new Promise((e,t)=>{ol(r,o=>{o.statusCode===301||o.statusCode===302?(e(cr(o.headers.location)),o.destroy()):e(o)}).on("error",t)}),"httpsGet"),ce=c(()=>{let r=wl.LOCAL_STORAGE_DIR;return ae.env[r]||ae.env.CRAWLEE_STORAGE_DIR||Ze},"getLocalStorageDir"),Ce=c(r=>{let e=gs.DEFAULT_KEY_VALUE_STORE_ID,t=r||ae.env[e]||hs[e];return Ae(ce(),ys.keyValueStores,t)},"getLocalKeyValueStorePath"),Ai=c(r=>{let e=gs.DEFAULT_DATASET_ID,t=r||ae.env[e]||hs[e];return Ae(ce(),ys.datasets,t)},"getLocalDatasetPath"),Si=c(r=>{let e=gs.DEFAULT_REQUEST_QUEUE_ID,t=r||ae.env[e]||hs[e];return Ae(ce(),ys.requestQueues,t)},"getLocalRequestQueuePath"),F=c(async()=>{let r={};try{let e=await rl(ne(),"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 C(){let r=await Pt();if(!r)throw new Error('You are not logged in with your Apify account. Call "apify login" to fix that.');return r}c(C,"getLoggedClientOrThrow");var bi=c(r=>{if(!r&&le(ut())&&le(ne())){let e=Nt(ne(),"utf-8");return JSON.parse(e).token}return r},"getTokenWithAuthFileFallback"),ws=c((r,e)=>(r=bi(r),{token:r,baseUrl:e||ae.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[t=>{t.headers??=new ll;for(let[o,s]of Object.entries(ai))t.headers[o]=s;return t}]}),"getApifyClientOptions");async function Pt(r,e){r=bi(r);let t=new yi(ws(r,e)),o;try{o=await t.user("me").get()}catch{return null}return Ss(ne()),lr(ne(),JSON.stringify({token:t.token,...o},null," ")),t}c(Pt,"getLoggedClient");var As=c(r=>Ae(r,j),"getLocalConfigPath"),Ee=c(r=>{if(le(r))return JSON.parse(Nt(r,{encoding:"utf-8"}))},"getJsonFileContent"),Fe=c(r=>Ee(As(r)),"getLocalConfig"),ur=c(async(r,e)=>{let t=Ae(e||ae.cwd(),j);await tl(gi(t),{recursive:!0}),lr(t,JSON.stringify(r,null," "))},"setLocalConfig"),Al=[ce(),"node_modules",".venv"],mr=c(async r=>{let e=Ce();ar(r,Ai()),ar(r,Si()),ar(r,e);let t=Ae(r,".gitignore"),o="";le(t)&&(o=Nt(t,{encoding:"utf-8"}));let s=[];for(let i of Al)RegExp(`^${cl(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),lr(t,`
|
|
1
|
+
var Pa=Object.defineProperty;var c=(r,e)=>Pa(r,"name",{value:e,configurable:!0});import Te from"process";import{parseArgs as pn}from"util";import Lr from"chalk";import{satisfies as $c}from"semver";import _s from"chalk";import ac from"indent-string";import lc from"widest-line";import cc from"wrap-ansi";import La from"chalk";function I(r,...e){process.env.APIFY_CLI_DEBUG&&console.error(La.gray(`[${r}]`),...e)}c(I,"cliDebugPrint");import{realpathSync as Da}from"fs";import{dirname as Fa}from"path";import ct from"chalk";function ze(r){r.stdoutOutput&&console.log(...r.stdoutOutput),r.stderrOutput&&console.error(...r.stderrOutput)}c(ze,"internalLog");function _(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[r.message]})}c(_,"simpleLog");function p(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.red("Error:"),r.message]})}c(p,"error");function x(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.yellow.bold("Warning:"),r.message]})}c(x,"warning");function $(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.green("Success:"),r.message]})}c($,"success");function ye(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.gray("Run:"),r.message]})}c(ye,"run");function v(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.white("Info:"),r.message]})}c(v,"info");function cs(r){ze({[r.stdout?"stdoutOutput":"stderrOutput"]:[ct.blue(r.message),r.url]})}c(cs,"link");var si="0.0.0";var ka="0.21.10-beta.24",Ua="f2ded90ab3986058e811be4c825f2b4eeb69c6f0";function Ma(){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=Da(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"}c(Ma,"detectInstallMethod");function ja(){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}}c(ja,"getRuntimeInfo");var $t=null;function K(){if($t)return $t;let r=Ma(),e=ja();return $t={version:ka,hash:Ua,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==="0.21.10-beta.24"}},r==="bundle"&&($t.installPath=Fa(process.execPath)),$t}c(K,"useCLIMetadata");import{existsSync as bl,mkdirSync as vl,readFileSync as Tl,writeFileSync as Il}from"fs";import{dirname as Cl}from"path";import{cryptoRandomObjectId as El}from"@apify/utilities";import{homedir as Ba}from"os";import{join as Xe}from"path";import{KEY_VALUE_STORE_KEYS as Ga,META_ORIGINS as Ya}from"@apify/consts";var ii={name:"apify-cli",version:"0.21.10-beta.24",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-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":"^10.1.15","@inquirer/input":"^4.2.1","@inquirer/password":"^4.0.17","@inquirer/select":"^4.3.1","@root/walk":"~1.1.0","@sapphire/duration":"^1.1.2","@sapphire/result":"^2.7.2","@sapphire/timestamp":"^1.0.3","@skyra/jaro-winkler":"^1.1.1","adm-zip":"~0.5.15",ajv:"~8.17.1","apify-client":"^2.14.0",archiver:"~7.0.1",axios:"^1.11.0",chalk:"~5.5.0","cli-table3":"^0.6.5","computer-name":"~0.1.0",configparser:"~0.3.10",cors:"~2.8.5","detect-indent":"~7.0.1","escape-string-regexp":"~5.0.0",execa:"^9.5.2",express:"~5.1.0",globby:"~14.1.0",handlebars:"~4.7.8","indent-string":"^5.0.0","is-ci":"~4.1.0",istextorbinary:"~9.5.0",jju:"~1.4.0","js-levenshtein":"^1.1.6","lodash.clonedeep":"^4.5.0",mime:"~4.0.4",open:"~10.2.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"},devDependencies:{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@biomejs/biome":"^2.0.0","@crawlee/types":"^3.11.1","@cucumber/cucumber":"^12.0.0","@types/adm-zip":"^0.5.5","@types/archiver":"^6.0.2","@types/bun":"^1.2.5","@types/chai":"^4.3.17","@types/cors":"^2.8.17","@types/execa":"^2.0.2","@types/express":"^5.0.0","@types/fs-extra":"^11","@types/is-ci":"^3.0.4","@types/jju":"^1.4.5","@types/js-levenshtein":"^1","@types/lodash.clonedeep":"^4","@types/mime":"^4.0.0","@types/node":"^22.0.0","@types/semver":"^7.5.8","@types/which":"^3.0.4","@yarnpkg/core":"^4.1.2",apify:"^3.2.4",chai:"^4.4.1","cross-env":"^10.0.0",eslint:"^9.25.1","eslint-config-prettier":"^10.1.2","lint-staged":"^16.0.0","mdast-util-from-markdown":"^2.0.2","mock-stdin":"^1.0.0",prettier:"^3.5.3",tsup:"^8.5.0",tsx:"^4.16.5",typescript:"^5.8.3","typescript-eslint":"^8.31.0",vitest:"^3.0.0"},volta:{node:"22.18.0",yarn:"4.9.2"},packageManager:"yarn@4.9.2",devEngines:{runtime:[{name:"node",version:">= 20",onFail:"error"},{name:"bun",version:">= 1.2.5",onFail:"ignore"}],packageManager:{name:"yarn",version:">= 4",onFail:"warn"}},"lint-staged":{"*":"biome format --write --no-errors-on-unmatched","*.{mjs,js,ts}":"eslint --fix --ext mjs,js,ts","*.md":"prettier --write"}};var Ze="storage",us="apify_storage",ms=1,rr={actorSpecification:ms,name:null,version:"0.0",buildTag:"latest",environmentVariables:{}},ni=1440*60*1e3,ut=c(()=>{let r=Xe(Ba(),".apify");return process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__?Xe(r,process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__):r},"GLOBAL_CONFIGS_FOLDER"),ne=c(()=>Xe(ut(),"auth.json"),"AUTH_FILE_PATH"),or=c(()=>Xe(ut(),"secrets.json"),"SECRETS_FILE_PATH"),sr=c(()=>Xe(ut(),"state.json"),"STATE_FILE_PATH"),ir=c(()=>Xe(ut(),"telemetry.json"),"TELEMETRY_FILE_PATH"),nr="apify.json",ds=".actor",Ha="actor.json",j=Xe(ds,Ha),ps=new RegExp(`^${Ga.INPUT}\\..*`),we=ii.engines.node,ai={"X-Apify-Request-Origin":Ya.CLI},Qe="3.9.0",li=".venv";import{createWriteStream as Qa,existsSync as le,mkdirSync as el,readdirSync as fi,readFileSync as Nt,writeFileSync as lr}from"fs";import{mkdir as tl,readFile as rl}from"fs/promises";import{get as ol}from"https";import{dirname as gi,join as Ae}from"path";import ae from"process";import{finished as sl}from"stream/promises";import{DurationFormatter as hi,TimeTypes as et}from"@sapphire/duration";import{Timestamp as fs}from"@sapphire/timestamp";import il from"adm-zip";import nl from"ajv/dist/2019.js";import{ApifyClient as yi}from"apify-client";import al from"archiver";import{AxiosHeaders as ll}from"axios";import cl from"escape-string-regexp";import{globby as wi}from"globby";import{getEncoding as ul}from"istextorbinary";import{Mime as ml}from"mime";import dl from"mime/types/other.js";import pl from"mime/types/standard.js";import{gte as fl,minVersion as gl,satisfies as hl}from"semver";import{ACTOR_ENV_VARS as gs,ACTOR_JOB_TERMINAL_STATUSES as yl,ACTOR_NAME as Ot,APIFY_ENV_VARS as wl,KEY_VALUE_STORE_KEYS as pi,LOCAL_ACTOR_ENV_VARS as hs,LOCAL_STORAGE_SUBDIRS as ys,SOURCE_FILE_FORMATS as xt}from"@apify/consts";import{existsSync as Ja,mkdirSync as Ka}from"fs";import{readFile as qa,stat as ci,unlink as Wa,writeFile as za}from"fs/promises";import{join as ui,sep as Xa}from"path";import{rimraf as Za}from"rimraf";var mi=c(async(r,e={},t=null)=>{let o=await qa(r,"utf-8"),s=JSON.parse(o),i;t?(i=s,i[t]={...s[t],...e}):i={...s,...e},await za(r,JSON.stringify(i,null," "))},"updateLocalJson"),ar=c((r,e)=>{e||(e=r,r="."),e.split(Xa).reduce((o,s)=>(o=ui(o,s),Ja(o)||Ka(o),o),r)},"ensureFolderExistsSync"),Rt=c(async r=>{await Za(r)},"rimrafPromised"),_t=c(async r=>{(await ci(r)).isFile()&&await Wa(r)},"deleteFile"),di=c(async(r,e)=>(await Promise.all(r.map(async s=>ci(ui(e,s))))).map(s=>s.size).reduce((s,i)=>s+i,0),"sumFilesSizeInBytes");var mt=nl,cr=c(async r=>new Promise((e,t)=>{ol(r,o=>{o.statusCode===301||o.statusCode===302?(e(cr(o.headers.location)),o.destroy()):e(o)}).on("error",t)}),"httpsGet"),ce=c(()=>{let r=wl.LOCAL_STORAGE_DIR;return ae.env[r]||ae.env.CRAWLEE_STORAGE_DIR||Ze},"getLocalStorageDir"),Ce=c(r=>{let e=gs.DEFAULT_KEY_VALUE_STORE_ID,t=r||ae.env[e]||hs[e];return Ae(ce(),ys.keyValueStores,t)},"getLocalKeyValueStorePath"),Ai=c(r=>{let e=gs.DEFAULT_DATASET_ID,t=r||ae.env[e]||hs[e];return Ae(ce(),ys.datasets,t)},"getLocalDatasetPath"),Si=c(r=>{let e=gs.DEFAULT_REQUEST_QUEUE_ID,t=r||ae.env[e]||hs[e];return Ae(ce(),ys.requestQueues,t)},"getLocalRequestQueuePath"),F=c(async()=>{let r={};try{let e=await rl(ne(),"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 C(){let r=await Pt();if(!r)throw new Error('You are not logged in with your Apify account. Call "apify login" to fix that.');return r}c(C,"getLoggedClientOrThrow");var bi=c(r=>{if(!r&&le(ut())&&le(ne())){let e=Nt(ne(),"utf-8");return JSON.parse(e).token}return r},"getTokenWithAuthFileFallback"),ws=c((r,e)=>(r=bi(r),{token:r,baseUrl:e||ae.env.APIFY_CLIENT_BASE_URL,requestInterceptors:[t=>{t.headers??=new ll;for(let[o,s]of Object.entries(ai))t.headers[o]=s;return t}]}),"getApifyClientOptions");async function Pt(r,e){r=bi(r);let t=new yi(ws(r,e)),o;try{o=await t.user("me").get()}catch{return null}return Ss(ne()),lr(ne(),JSON.stringify({token:t.token,...o},null," ")),t}c(Pt,"getLoggedClient");var As=c(r=>Ae(r,j),"getLocalConfigPath"),Ee=c(r=>{if(le(r))return JSON.parse(Nt(r,{encoding:"utf-8"}))},"getJsonFileContent"),Fe=c(r=>Ee(As(r)),"getLocalConfig"),ur=c(async(r,e)=>{let t=Ae(e||ae.cwd(),j);await tl(gi(t),{recursive:!0}),lr(t,JSON.stringify(r,null," "))},"setLocalConfig"),Al=[ce(),"node_modules",".venv"],mr=c(async r=>{let e=Ce();ar(r,Ai()),ar(r,Si()),ar(r,e);let t=Ae(r,".gitignore"),o="";le(t)&&(o=Nt(t,{encoding:"utf-8"}));let s=[];for(let i of Al)RegExp(`^${cl(i)}$`,"mg").test(o)||s.push(i);s.length>0&&(o.length>0?(s.unshift("# Added by Apify CLI"),lr(t,`
|
|
2
2
|
${s.join(`
|
|
3
3
|
`)}
|
|
4
4
|
`,{flag:"a"})):lr(t,`${s.join(`
|
|
@@ -239,4 +239,4 @@ Read more: https://docs.apify.com/cli/docs/telemetry`;static subcommands=[as,ns]
|
|
|
239
239
|
4. INPUT_SCHEMA.json
|
|
240
240
|
|
|
241
241
|
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:t}=await lt({forcePath:this.args.path,cwd:Ad.cwd()});if(!e)throw new Error(`Input schema has not been found at ${t}.`);t?v({message:`Validating input schema stored at ${t}`}):v({message:`Validating input schema embedded in '${j}'`});let o=new mt({strict:!1});Sd(o,e),$({message:"Input schema is valid."})}};var vx=[Fr,Wr,eo,yo,Lo,Mo,es,os,is,er,to,Wt,qt,no,wo,So,Io,To,Do,Fo,ko,Uo,Yo,ls,zt],Tx=[wt,yt,ht,gt,ft,pt,zt,Wt,qt,er];export{Ph as a,Lh as b,vx as c,Tx as d};
|
|
242
|
-
//# sourceMappingURL=chunk-
|
|
242
|
+
//# sourceMappingURL=chunk-DMDGM4U7.js.map
|