apify-cli 1.6.2-beta.3 → 1.6.2-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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"node:process";import t from"chalk";import n from"indent-string";import r from"widest-line";import i from"wrap-ansi";import{inspect as a,parseArgs as s,promisify as c}from"node:util";import{gt as l,gte as u,minVersion as f,satisfies as p}from"semver";import{appendFileSync as m,constants as h,copyFileSync as g,createWriteStream as _,existsSync as v,fstat as y,mkdirSync as b,openSync as x,readFileSync as S,readdirSync as C,realpathSync as ee,renameSync as w,rmSync as T,statSync as E,unlinkSync as te,writeFileSync as D}from"node:fs";import O,{basename as ne,dirname as k,isAbsolute as re,join as A,relative as ie,resolve as ae,sep as oe}from"node:path";import se from"string-width";import ce from"strip-ansi";import{once as le}from"node:events";import{homedir as ue,platform as de}from"node:os";import fe from"ci-info";import{ACTOR_ENV_VARS as j,ACTOR_JOB_STATUSES as M,ACTOR_JOB_TERMINAL_STATUSES as pe,ACTOR_NAME as me,ACTOR_SOURCE_TYPES as he,APIFY_ENV_VARS as N,KEY_VALUE_STORE_KEYS as ge,LOCAL_ACTOR_ENV_VARS as _e,LOCAL_STORAGE_SUBDIRS as ve,MAX_MULTIFILE_BYTES as ye,META_ORIGINS as be,SOURCE_FILE_FORMATS as xe}from"@apify/consts";import{jaroWinkler as Se}from"@skyra/jaro-winkler";import Ce from"js-levenshtein";import{createHmacSignature as we,cryptoRandomObjectId as Te}from"@apify/utilities";import{execSync as Ee,spawn as De}from"node:child_process";import{access as Oe,lstat as ke,mkdir as P,readFile as F,readdir as I,rename as Ae,stat as L,symlink as je,unlink as Me,writeFile as R}from"node:fs/promises";import{get as Ne}from"node:https";import{finished as Pe,pipeline as Fe}from"node:stream/promises";import{DurationFormatter as Ie,Time as Le,TimeTypes as z}from"@sapphire/duration";import{Timestamp as Re}from"@sapphire/timestamp";import ze from"adm-zip";import Be from"ajv/dist/2019.js";import{ApifyClient as Ve,DownloadItemsFormat as B}from"apify-client";import He from"archiver";import Ue,{AxiosHeaders as We}from"axios";import Ge from"escape-string-regexp";import Ke from"ignore";import{getEncoding as qe}from"istextorbinary";import Je,{Mime as Ye}from"mime";import Xe from"mime/types/other.js";import Ze from"mime/types/standard.js";import{glob as Qe}from"tinyglobby";import{rimraf as $e}from"rimraf";import{Result as et,err as tt,none as V,ok as H,some as nt}from"@sapphire/result";import rt from"configparser";import it from"@inquirer/input";import at from"is-ci";import{execa as ot}from"execa";import st from"which";import{calculateRunDynamicMemory as ct}from"@apify/actor-memory-expression";import{Separator as lt,createPrompt as ut,isEnterKey as dt,makeTheme as ft,useKeypress as pt,usePrefix as mt,useState as ht}from"@inquirer/core";import{MemoryStorage as gt}from"@crawlee/memory-storage";import{compile as _t}from"json-schema-to-typescript";import{cloneDeep as vt}from"es-toolkit";import{validateInputSchema as yt,validateInputUsingValidator as bt}from"@apify/input_schema";import{getDatasetSchemaValidator as xt,getKeyValueStoreSchemaValidator as St,getOutputSchemaValidator as Ct}from"@apify/json_schemas";import wt from"cli-table3";import Tt from"jju";import Et from"tiged";import Dt from"open";import{fetchManifest as Ot,manifestUrl as kt,wrapperManifestUrl as At}from"@apify/actor-templates";import jt from"computer-name";import Mt from"cors";import Nt from"express";import Pt from"@inquirer/password";import Ft from"@inquirer/select";import It from"node:assert";import{ReadStream as Lt}from"node:tty";import Rt from"detect-indent";import{fileURLToPath as zt}from"node:url";import Bt from"@root/walk";import Vt from"handlebars";function internalLog(e){e.stdoutOutput&&console.log(...e.stdoutOutput),e.stderrOutput&&console.error(...e.stderrOutput)}function simpleLog(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[e.message]})}function error(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.red(`Error:`),e.message]})}function warning(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.yellow.bold(`Warning:`),e.message]})}function success(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.green(`Success:`),e.message]})}function run(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.gray(`Run:`),e.message]})}function info(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.white(`Info:`),e.message]})}function link(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.blue(e.message),e.url]})}function detectInstallMethod(){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 e=process.argv[1];if(!e)return warning({message:`Failed to detect install method of CLI, assuming npm`}),`npm`;let t=ee(e);return process.env.VOLTA_HOME&&t.includes(process.env.VOLTA_HOME)?`volta`:t.includes(`homebrew/Cellar`)||t.includes(`linuxbrew/Cellar`)?`homebrew`:process.env.PNPM_HOME&&t.includes(process.env.PNPM_HOME)?`pnpm`:process.env.BUN_INSTALL&&t.includes(process.env.BUN_INSTALL)?`bun`:`npm`}function getRuntimeInfo(){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}}let Ht=null;function useCLIMetadata(){if(Ht)return Ht;let e=detectInstallMethod(),t=getRuntimeInfo();return Ht={version:`1.6.2-beta.
|
|
1
|
+
import e from"node:process";import t from"chalk";import n from"indent-string";import r from"widest-line";import i from"wrap-ansi";import{inspect as a,parseArgs as s,promisify as c}from"node:util";import{gt as l,gte as u,minVersion as f,satisfies as p}from"semver";import{appendFileSync as m,constants as h,copyFileSync as g,createWriteStream as _,existsSync as v,fstat as y,mkdirSync as b,openSync as x,readFileSync as S,readdirSync as C,realpathSync as ee,renameSync as w,rmSync as T,statSync as E,unlinkSync as te,writeFileSync as D}from"node:fs";import O,{basename as ne,dirname as k,isAbsolute as re,join as A,relative as ie,resolve as ae,sep as oe}from"node:path";import se from"string-width";import ce from"strip-ansi";import{once as le}from"node:events";import{homedir as ue,platform as de}from"node:os";import fe from"ci-info";import{ACTOR_ENV_VARS as j,ACTOR_JOB_STATUSES as M,ACTOR_JOB_TERMINAL_STATUSES as pe,ACTOR_NAME as me,ACTOR_SOURCE_TYPES as he,APIFY_ENV_VARS as N,KEY_VALUE_STORE_KEYS as ge,LOCAL_ACTOR_ENV_VARS as _e,LOCAL_STORAGE_SUBDIRS as ve,MAX_MULTIFILE_BYTES as ye,META_ORIGINS as be,SOURCE_FILE_FORMATS as xe}from"@apify/consts";import{jaroWinkler as Se}from"@skyra/jaro-winkler";import Ce from"js-levenshtein";import{createHmacSignature as we,cryptoRandomObjectId as Te}from"@apify/utilities";import{execSync as Ee,spawn as De}from"node:child_process";import{access as Oe,lstat as ke,mkdir as P,readFile as F,readdir as I,rename as Ae,stat as L,symlink as je,unlink as Me,writeFile as R}from"node:fs/promises";import{get as Ne}from"node:https";import{finished as Pe,pipeline as Fe}from"node:stream/promises";import{DurationFormatter as Ie,Time as Le,TimeTypes as z}from"@sapphire/duration";import{Timestamp as Re}from"@sapphire/timestamp";import ze from"adm-zip";import Be from"ajv/dist/2019.js";import{ApifyClient as Ve,DownloadItemsFormat as B}from"apify-client";import He from"archiver";import Ue,{AxiosHeaders as We}from"axios";import Ge from"escape-string-regexp";import Ke from"ignore";import{getEncoding as qe}from"istextorbinary";import Je,{Mime as Ye}from"mime";import Xe from"mime/types/other.js";import Ze from"mime/types/standard.js";import{glob as Qe}from"tinyglobby";import{rimraf as $e}from"rimraf";import{Result as et,err as tt,none as V,ok as H,some as nt}from"@sapphire/result";import rt from"configparser";import it from"@inquirer/input";import at from"is-ci";import{execa as ot}from"execa";import st from"which";import{calculateRunDynamicMemory as ct}from"@apify/actor-memory-expression";import{Separator as lt,createPrompt as ut,isEnterKey as dt,makeTheme as ft,useKeypress as pt,usePrefix as mt,useState as ht}from"@inquirer/core";import{MemoryStorage as gt}from"@crawlee/memory-storage";import{compile as _t}from"json-schema-to-typescript";import{cloneDeep as vt}from"es-toolkit";import{validateInputSchema as yt,validateInputUsingValidator as bt}from"@apify/input_schema";import{getDatasetSchemaValidator as xt,getKeyValueStoreSchemaValidator as St,getOutputSchemaValidator as Ct}from"@apify/json_schemas";import wt from"cli-table3";import Tt from"jju";import Et from"tiged";import Dt from"open";import{fetchManifest as Ot,manifestUrl as kt,wrapperManifestUrl as At}from"@apify/actor-templates";import jt from"computer-name";import Mt from"cors";import Nt from"express";import Pt from"@inquirer/password";import Ft from"@inquirer/select";import It from"node:assert";import{ReadStream as Lt}from"node:tty";import Rt from"detect-indent";import{fileURLToPath as zt}from"node:url";import Bt from"@root/walk";import Vt from"handlebars";function internalLog(e){e.stdoutOutput&&console.log(...e.stdoutOutput),e.stderrOutput&&console.error(...e.stderrOutput)}function simpleLog(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[e.message]})}function error(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.red(`Error:`),e.message]})}function warning(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.yellow.bold(`Warning:`),e.message]})}function success(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.green(`Success:`),e.message]})}function run(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.gray(`Run:`),e.message]})}function info(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.white(`Info:`),e.message]})}function link(e){internalLog({[e.stdout?`stdoutOutput`:`stderrOutput`]:[t.blue(e.message),e.url]})}function detectInstallMethod(){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 e=process.argv[1];if(!e)return warning({message:`Failed to detect install method of CLI, assuming npm`}),`npm`;let t=ee(e);return process.env.VOLTA_HOME&&t.includes(process.env.VOLTA_HOME)?`volta`:t.includes(`homebrew/Cellar`)||t.includes(`linuxbrew/Cellar`)?`homebrew`:process.env.PNPM_HOME&&t.includes(process.env.PNPM_HOME)?`pnpm`:process.env.BUN_INSTALL&&t.includes(process.env.BUN_INSTALL)?`bun`:`npm`}function getRuntimeInfo(){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}}let Ht=null;function useCLIMetadata(){if(Ht)return Ht;let e=detectInstallMethod(),t=getRuntimeInfo();return Ht={version:`1.6.2-beta.4`,hash:`c59628d3e43892096cc0e6e916c0180ed17e9886`,arch:process.env.APIFY_BUNDLE_ARCH??process.arch,platform:process.platform===`win32`?`windows`:process.platform,runtime:t,extraRuntimeData:t.nodeVersion?`(emulating node ${t.nodeVersion})`:``,installMethod:e,get fullVersionString(){return`apify-cli/${this.version} (${this.hash.slice(0,7)}) running on ${this.platform}-${this.arch} with ${this.runtime.runtime}-${t.version}${this.extraRuntimeData?` ${this.extraRuntimeData}`:``}, installed via ${this.installMethod}`},get isBeta(){return this.version.includes(`beta`)||this.version===`0.0.0`}},e===`bundle`&&(Ht.installPath=k(process.execPath)),Ht}let Ut;function getMaxLineWidth(){if(Ut)return Ut;let e=Number(process.env.APIFY_CLI_MAX_LINE_WIDTH);if(!Number.isNaN(e))Ut=e;else if(!process.stdout.isTTY)Ut=80;else{let e=process.stdout.getWindowSize?.()[0]??-1;Ut=e<1?80:e<40?40:e}return Ut}var BaseCommandRenderer=class{command;entrypoint;constructor(e,t){this.entrypoint=e,this.command=t}pushShortDescription(e){let n=this.command.interactive?`${t.yellow(`[INTERACTIVE]`)} `:``;this.command.shortDescription?e.push(`${n}${this.command.shortDescription}`,``):this.command.description&&e.push(`${n}${this.command.description.split(`
|
|
2
2
|
`)[0]}`,``)}pushDescription(e){if(!this.command.description)return;e.push(t.bold(`DESCRIPTION`));let r=n(i(this.command.description,getMaxLineWidth()-2,{trim:!1}),2);e.push(r),e.push(``)}pushExamples(e){let{examples:r}=this.command;if(r?.length){e.push(t.bold(`EXAMPLES`));for(let a of r){if(a.description){let r=n(i(a.description,getMaxLineWidth()-4,{trim:!1}).split(`
|
|
3
3
|
`).map(e=>`# ${e}`).join(`
|
|
4
4
|
`),2);e.push(t.dim(r))}e.push(` $ ${this.normalizeExampleCommand(a.command)}`),e.push(``)}}}normalizeExampleCommand(e){let t=this.entrypoint.split(` `);if(t.length<2)return e;let n=t[t.length-1],r=`${t.slice(0,-1).join(` `)} `,i=n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),a=e;return a.startsWith(`${n} `)&&(a=`${r}${a}`),a=a.replace(RegExp(`\\|\\s+${i}\\s`,`g`),`| ${r}${n} `),a}pushInteractiveNote(e){if(!this.command.interactive)return;e.push(t.bold(`NOTE`));let r=n(i(this.command.interactiveNote||`This command prompts the user for input. To run non-interactively (e.g. in CI or from an AI agent), pass all required arguments and flags explicitly.`,getMaxLineWidth()-2,{trim:!1}),2);e.push(r),e.push(``)}pushLearnMore(e){this.command.docsUrl&&(e.push(t.bold(`LEARN MORE`)),e.push(` ${this.command.docsUrl}`),e.push(``))}pushNewLineBeforeNewEntryIfLengthIsPastTheLimit({state:e,itemToAdd:t,indentSize:n}){se(e.join(` `).split(`
|
|
@@ -82,7 +82,8 @@ just as if the command were run from that directory with no argument.`;static gr
|
|
|
82
82
|
- If options.contentType is set, value is taken as is.`})};static flags={contentType:Y.string({char:`c`,description:`Specifies a custom MIME content type of the record. By default "application/json" is used.`,required:!1})};async run(){let{key:e,value:t}=this.args,{contentType:n=`application/json; charset=utf-8`}=this.flags,r=t||process.stdin,i=(await getApifyStorageClient()).keyValueStore(getDefaultStorageId(Un.KEY_VALUE_STORE));r==null||r===``||r===`null`||r===`undefined`?await i.deleteRecord(e):await i.setRecord({key:e,value:r,contentType:n})}},ActorIndexCommand=class extends ApifyCommand{static name=`actor`;static description=`Runtime data operations intended to be called from inside a running Actor: read input, push data, get/set records in the default key-value store, charge pay-per-event, generate schema types.
|
|
83
83
|
|
|
84
84
|
For platform-level management (deploy, list, call Actors), see 'apify actors' (plural).`;static group=`Apify Console`;static docsUrl=`https://docs.apify.com/cli/docs/reference#apify-actor`;static subcommands=[ActorSetValueCommand,ActorPushDataCommand,ActorGetValueCommand,ActorGetPublicUrlCommand,ActorGetInputCommand,ActorChargeCommand,ActorCalculateMemoryCommand,ActorGenerateSchemaTypesCommand];async run(){this.printHelp()}};function OverrideClassName(e){return e}async function resolveActorContext({providedActorNameOrId:t,client:n}){let r=await getLocalUserInfo(),i=r.username||r.id,a=getLocalConfig(e.cwd())||{};if(t?.includes(`/`)){let e=await n.actor(t).get();return e?{valid:!0,userFriendlyId:`${e.username}/${e.name}`,id:e.id}:{valid:!1,reason:`Actor with ID "${t}" was not found`}}if(t){let e=await n.actor(t).get();if(e)return{valid:!0,userFriendlyId:`${e.username}/${e.name}`,id:e.id};let r=await n.actor(`${i}/${t.toLowerCase()}`).get();return r?{valid:!0,userFriendlyId:`${r.username}/${r.name}`,id:r.id}:{valid:!1,reason:`Actor with name or ID "${t}" was not found`}}if(a.name){let e=await n.actor(`${i}/${a.name}`).get();return e?{valid:!0,userFriendlyId:`${e.username}/${e.name}`,id:e.id}:{valid:!1,reason:`Actor with name "${a.name}" was not found`}}return{valid:!1,reason:`Unable to detect what Actor to create a build for`}}function useSignalHandler({signals:e,handler:t,cleanTerminalLine:n=!0,once:r=!0}){let i=!1,wrapped=a=>{if(!i){if(r){i=!0;for(let t of e)process.off(t,wrapped)}n&&process.stderr.isTTY&&process.stderr.write(`\r\x1B[2K\x1B[0m`),cliDebugPrint(`useSignalHandler`,{event:`fired`,signal:a,once:r}),(async()=>{try{await t(a)}catch(e){cliDebugPrint(`useSignalHandler`,{event:`handler-threw`,signal:a,err:e})}})()}};for(let t of e)process.on(t,wrapped);return cliDebugPrint(`useSignalHandler`,{event:`registered`,signals:e,once:r}),{[Symbol.dispose](){if(!i){i=!0;for(let t of e)process.off(t,wrapped);cliDebugPrint(`useSignalHandler`,{event:`disposed`,signals:e})}}}}function useAbortJobOnSignal(e){let{apifyClient:n,silent:r=!1}=e,i=0;return useSignalHandler({signals:tn,once:!1,handler:async a=>{if(i+=1,e.kind===`build`){if(i>1)return;r||info({message:t.gray(`Received ${t.yellow(a)}, aborting build "${t.yellow(e.jobId)}" on the Apify platform...`),stdout:!0});try{await n.build(e.jobId).abort()}catch(t){error({message:`Failed to abort build "${e.jobId}": ${t.message}`,stdout:!0})}return}if(i>2)return;let s=i===1,c=`${e.runType.toLowerCase()} run`;if(!r){let n=s?`Received ${t.yellow(a)}, gracefully aborting ${c} "${t.yellow(e.jobId)}" on the Apify platform... ${t.dim(`(press Ctrl+C again to abort immediately)`)}`:`Received ${t.yellow(a)} again, aborting ${c} "${t.yellow(e.jobId)}" immediately...`;info({message:t.gray(n),stdout:!0})}try{await n.run(e.jobId).abort({gracefully:s})}catch(t){error({message:`Failed to abort run "${e.jobId}": ${t.message}`,stdout:!0})}}})}function _usingCtx(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function using(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function o(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:using.bind(null,!1),a:using.bind(null,!0),d:function d(){var r,i=this.e,a=0;function next(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(next);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(next,err)}else a|=1}catch(e){return err(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function err(n){return i=i===t?n:new e(n,i),next()}return next()}}}var BuildsCreateCommand=class extends ApifyCommand{static name=`create`;static description=`Creates a new build of the Actor.`;static examples=[{description:`Build the Actor in the current directory with the default "latest" tag.`,command:`apify builds create`},{description:`Build a specific Actor with a custom tag and stream the build log.`,command:`apify builds create apify/hello-world --tag beta --log`}];static docsUrl=`https://docs.apify.com/cli/docs/reference#apify-builds-create`;static flags={tag:Y.string({description:`Build tag to be applied to the successful Actor build. By default, this is "latest".`}),version:Y.string({description:`Optional Actor Version to build. By default, this will be inferred from the tag, but this flag is required when multiple versions have the same tag.`,required:!1}),log:Y.boolean({description:`Whether to print out the build log after the build is triggered.`})};static args={actorId:Z.string({description:`Optional Actor ID or Name to trigger a build for. By default, it will use the Actor from the current directory.`})};static enableJsonFlag=!0;async run(){let{tag:e,version:n,json:r,log:i}=this.flags,{actorId:a}=this.args,s=await getLoggedClientOrThrow(),c=await resolveActorContext({providedActorNameOrId:a,client:s});if(!c.valid){error({message:`${c.reason}. Please run this command in an Actor directory, or specify the Actor ID.`,stdout:!0});return}let l=await s.actor(c.id).get(),u=objectGroupBy(l.versions,e=>e.buildTag??`latest`)[e??`latest`],f=l.versions.find(e=>e.versionNumber===n),p,m=e;if(f){if(e&&(!u||!u.some(e=>e.versionNumber===n))){error({message:`The Actor Version "${n}" does not have the tag "${e}".`,stdout:!0});return}p=n,m=f.buildTag??`latest`}else if(u&&(p=u[0].versionNumber,m=e??`latest`,u.length>1&&!n)){error({message:`Multiple Actor versions with the tag "${e}" found. Please specify the version number using the "--version" flag.\n Available versions for this tag: ${u.map(e=>t.yellow(e.versionNumber)).join(`, `)}`,stdout:!0});return}if(!p){error({message:`No Actor versions with the tag "${e}" found. You can push a new version with this tag by using "apify push --build-tag=${e}".`,stdout:!0});return}let h=await s.actor(c.id).build(p,{tag:e});if(r){printJsonToStdout(h);return}let g=[`${t.yellow(`Actor`)}: ${l?.username?`${l.username}/`:``}${l?.name??`unknown-actor`} (${t.gray(h.actId)})`,` ${t.yellow(`Version`)}: ${p} (tagged with ${t.yellow(m)})`,``,`${t.greenBright(`Build Started`)} (ID: ${t.gray(h.id)})`,` ${t.yellow(`Build Number`)}: ${h.buildNumber} (will get tagged once finished)`,` ${t.yellow(`Started`)}: ${G.display(h.startedAt)}`,``],_=`https://console.apify.com/actors/${h.actId}/builds/${h.buildNumber}`,v=`${t.blue(`View in Apify Console`)}: ${_}`;if(simpleLog({message:g.join(`
|
|
85
|
-
`),stdout:!0}),i)try{var y=_usingCtx();y.u(useAbortJobOnSignal({apifyClient:s,kind:`build`,jobId:h.id}));try{await outputJobLog({job:h,apifyClient:s})}catch(e){error({message:`Failed to print log for build with ID "${h.id}": ${e.message}`,stdout:!0})}simpleLog({message:``,stdout:!0})}catch(e){y.e=e}finally{y.d()}simpleLog({message:v,stdout:!0})}},ActorsBuildCommand=class extends OverrideClassName(BuildsCreateCommand){static name=`build`};function resolveInput(e,t){let n,r;if(t)n=t,r=`application/json`;else{let t=getLocalInput(e);t&&(Je.getExtension(t.contentType)===`json`?(n=JSON.parse(t.body.toString(`utf8`)),r=`application/json`):(n=t.body,r=t.contentType))}return!n||!r?null:{inputToUse:n,contentType:r}}async function getInputOverride(t,n,r){let i,a;if(!n&&!r){let t=fn;if(t)try{let n=JSON.parse(t.toString(`utf8`));if(Array.isArray(n))return error({message:`The provided input is invalid. It should be an object, not an array.`}),e.exitCode=5,!1;i=n,a=`stdin`}catch(t){return error({message:`Cannot parse JSON input from standard input.\n ${t.message}`}),e.exitCode=5,!1}}if(n)switch(n[0]){case`-`:return error({message:"You need to pipe something into standard input when you specify the `-` value to `--input`."}),e.exitCode=5,!1;default:{let r=await Oe(ae(t,n)).then(()=>!0).catch(()=>!1),s=n.endsWith(`.json`)||n.endsWith(`.json5`)||O.isAbsolute(n)||n.startsWith(`./`)||n.startsWith(`../`)||n.includes(`~`)||n.startsWith(`.\\`)||n.startsWith(`..\\`);if(r||s)return error({message:`Providing a JSON file path in the --input flag is not supported. Use the "--input-file=" flag instead`}),e.exitCode=5,!1;try{let t=JSON.parse(n);if(Array.isArray(t))return error({message:`The provided input is invalid. It should be an object, not an array.`}),e.exitCode=5,!1;i=t,a=`input`}catch(t){return error({message:`Cannot parse JSON input.\n ${t.message}`}),e.exitCode=5,!1}}}else if(r)switch(r[0]){case`-`:return error({message:"You need to pipe something into standard input when you specify the `-` value to `--input-file`."}),e.exitCode=5,!1;default:{let n=ae(t,r),s;try{let t=await F(n,`utf8`),s=JSON.parse(t);if(Array.isArray(s))return error({message:`The provided input is invalid. It should be an object, not an array.`}),e.exitCode=5,!1;i=s,a=r}catch(e){s=e}if(s)try{let t=JSON.parse(r);if(Array.isArray(t))return error({message:`The provided input is invalid. It should be an object, not an array.`}),e.exitCode=5,!1;i=t,a=r}catch{return error({message:`Cannot read input file at path "${n}".\n ${s.message}`}),e.exitCode=5,!1}}}return i?{input:i,source:a}:void 0}const Gn=[M.SUCCEEDED,M.ABORTED,M.FAILED,M.TIMED_OUT];async function*runActorOrTaskOnCloud(n,r){try{var i=_usingCtx();let a=e.cwd(),{actorOrTaskData:s,runOptions:c,type:l,waitForFinishMillis:u,inputOverride:f,silent:p,waitForRunToFinish:m,printRunLogs:h}=r,g=l===`Actor`?`actor`:`task`,_=resolveInput(a,f);p||(l===`Actor`?run({message:`Calling ${l} ${s.userFriendlyId} (${t.gray(s.id)})\n`}):s.title?run({message:`Calling ${l} ${s.title} (${s.userFriendlyId}, ${t.gray(s.id)})\n`}):run({message:`Calling ${l} ${s.userFriendlyId} (${t.gray(s.id)})\n`}));let v;try{v=_&&l===`Actor`?await n[g](s.id).start(_.inputToUse,{...c,contentType:_.contentType}):await n[g](s.id).start(void 0,c)}catch(e){
|
|
85
|
+
`),stdout:!0}),i)try{var y=_usingCtx();y.u(useAbortJobOnSignal({apifyClient:s,kind:`build`,jobId:h.id}));try{await outputJobLog({job:h,apifyClient:s})}catch(e){error({message:`Failed to print log for build with ID "${h.id}": ${e.message}`,stdout:!0})}simpleLog({message:``,stdout:!0})}catch(e){y.e=e}finally{y.d()}simpleLog({message:v,stdout:!0})}},ActorsBuildCommand=class extends OverrideClassName(BuildsCreateCommand){static name=`build`};function resolveInput(e,t){let n,r;if(t)n=t,r=`application/json`;else{let t=getLocalInput(e);t&&(Je.getExtension(t.contentType)===`json`?(n=JSON.parse(t.body.toString(`utf8`)),r=`application/json`):(n=t.body,r=t.contentType))}return!n||!r?null:{inputToUse:n,contentType:r}}async function getInputOverride(t,n,r){let i,a;if(!n&&!r){let t=fn;if(t)try{let n=JSON.parse(t.toString(`utf8`));if(Array.isArray(n))return error({message:`The provided input is invalid. It should be an object, not an array.`}),e.exitCode=5,!1;i=n,a=`stdin`}catch(t){return error({message:`Cannot parse JSON input from standard input.\n ${t.message}`}),e.exitCode=5,!1}}if(n)switch(n[0]){case`-`:return error({message:"You need to pipe something into standard input when you specify the `-` value to `--input`."}),e.exitCode=5,!1;default:{let r=await Oe(ae(t,n)).then(()=>!0).catch(()=>!1),s=n.endsWith(`.json`)||n.endsWith(`.json5`)||O.isAbsolute(n)||n.startsWith(`./`)||n.startsWith(`../`)||n.includes(`~`)||n.startsWith(`.\\`)||n.startsWith(`..\\`);if(r||s)return error({message:`Providing a JSON file path in the --input flag is not supported. Use the "--input-file=" flag instead`}),e.exitCode=5,!1;try{let t=JSON.parse(n);if(Array.isArray(t))return error({message:`The provided input is invalid. It should be an object, not an array.`}),e.exitCode=5,!1;i=t,a=`input`}catch(t){return error({message:`Cannot parse JSON input.\n ${t.message}`}),e.exitCode=5,!1}}}else if(r)switch(r[0]){case`-`:return error({message:"You need to pipe something into standard input when you specify the `-` value to `--input-file`."}),e.exitCode=5,!1;default:{let n=ae(t,r),s;try{let t=await F(n,`utf8`),s=JSON.parse(t);if(Array.isArray(s))return error({message:`The provided input is invalid. It should be an object, not an array.`}),e.exitCode=5,!1;i=s,a=r}catch(e){s=e}if(s)try{let t=JSON.parse(r);if(Array.isArray(t))return error({message:`The provided input is invalid. It should be an object, not an array.`}),e.exitCode=5,!1;i=t,a=r}catch{return error({message:`Cannot read input file at path "${n}".\n ${s.message}`}),e.exitCode=5,!1}}}return i?{input:i,source:a}:void 0}const Gn=[M.SUCCEEDED,M.ABORTED,M.FAILED,M.TIMED_OUT];async function*runActorOrTaskOnCloud(n,r){try{var i=_usingCtx();let a=e.cwd(),{actorOrTaskData:s,runOptions:c,type:l,waitForFinishMillis:u,inputOverride:f,silent:p,waitForRunToFinish:m,printRunLogs:h}=r,g=l===`Actor`?`actor`:`task`,_=resolveInput(a,f);p||(l===`Actor`?run({message:`Calling ${l} ${s.userFriendlyId} (${t.gray(s.id)})\n`}):s.title?run({message:`Calling ${l} ${s.title} (${s.userFriendlyId}, ${t.gray(s.id)})\n`}):run({message:`Calling ${l} ${s.userFriendlyId} (${t.gray(s.id)})\n`}));let v;try{v=_&&l===`Actor`?await n[g](s.id).start(_.inputToUse,{...c,contentType:_.contentType}):await n[g](s.id).start(void 0,c)}catch(e){if(e.type===`record-not-found`)throw Error(`${l} ${s.userFriendlyId} (${s.id}) not found!`);if(e.type===`full-permission-actor-not-approved`){let n=e.data?.approvalUrl,r=[`${l} ${s.userFriendlyId} requires full access to your Apify account and has not been approved yet.`];throw n&&r.push(``,`Approve here: ${t.blue(n)}`),Error(r.join(`
|
|
86
|
+
`))}throw e}if(i.u(useAbortJobOnSignal({apifyClient:n,kind:`run`,jobId:v.id,runType:l,silent:p})),yield v,!p&&h)try{await outputJobLog({job:v,timeoutMillis:u,apifyClient:n})===`timeouts`?console.error(`\n${t.gray(`Timeout for printing logs was hit, there may be future logs.`)}\n`):console.error()}catch(e){warning({message:`Can not get log:`}),console.error(e)}if(v=await n.run(v.id).get(),m)for(;!Gn.includes(v.status)&&(v=await n.run(v.id).get(),!Gn.includes(v.status));)await new Promise(e=>{setTimeout(e,1e3)});p||(v.status===M.SUCCEEDED?success({message:`${l} finished.`}):v.status===M.RUNNING?warning({message:`${l} is still running!`}):v.status===M.ABORTED||v.status===M.ABORTING?(warning({message:`${l} was aborted!`}),e.exitCode=3):(error({message:`${l} failed!`}),e.exitCode=1)),yield v}catch(e){i.e=e}finally{i.d()}}const SharedRunOnCloudFlags=e=>({build:Y.string({char:`b`,description:`Tag or number of the build to run (e.g. "latest" or "1.2.34").`,required:!1}),timeout:Y.integer({char:`t`,description:`Timeout for the ${e} run in seconds. Zero value means there is no timeout.`,required:!1}),memory:Y.integer({char:`m`,description:`Amount of memory allocated for the ${e} run, in megabytes.`,required:!1})});var Kn=class ActorsCallCommand extends ApifyCommand{static name=`call`;static description=`Executes Actor remotely using your authenticated account.
|
|
86
87
|
Reads input from local key-value store by default.`;static group=`Apify Console`;static examples=[{description:`Call the Actor defined in the current directory (from .actor/actor.json).`,command:`apify call`},{description:`Call a specific Actor by its full name.`,command:`apify call apify/hello-world`},{description:`Call an Actor with inline JSON input.`,command:`apify call apify/hello-world --input '{"url":"https://example.com"}'`},{description:`Call an Actor with input from a file and print the dataset on success.`,command:`apify call apify/web-scraper --input-file input.json --output-dataset`}];static docsUrl=`https://docs.apify.com/cli/docs/reference#apify-call`;static flags={...SharedRunOnCloudFlags(`Actor`),input:Y.string({char:`i`,description:`Optional JSON input to be given to the Actor.`,required:!1,stdin:2,exclusive:[`input-file`]}),"input-file":Y.string({char:`f`,description:"Optional path to a file with JSON input to be given to the Actor. The file must be a valid JSON file. You can also specify `-` to read from standard input.",required:!1,stdin:2,exclusive:[`input`]}),silent:Y.boolean({char:`s`,description:`Prevents printing the logs of the Actor run to the console.`,default:!1}),"output-dataset":Y.boolean({char:`o`,description:`Prints out the entire default dataset on successful run of the Actor.`})};static enableJsonFlag=!0;static args={actorId:Z.string({required:!1,description:`Name or ID of the Actor to run (e.g. "my-actor", "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). If not provided, the command runs the remote Actor specified in the '${W}' file.`})};async run(){let n=e.cwd(),r=getLocalConfig(n)||{},i=await getLoggedClientOrThrow(),a=await getLocalUserInfo(),s=a.username||a.id;if(this.flags.json&&this.flags.outputDataset){error({message:`You cannot use both the --json and --output-dataset flags when running this command.`}),e.exitCode=5;return}let{id:c,userFriendlyId:l,actorData:u}=await ActorsCallCommand.resolveActorId({client:i,localActorName:r.name,usernameOrId:s,providedActorNameOrId:this.args.actorId}),f={waitForFinish:2};this.flags.build&&(f.build=this.flags.build),this.flags.timeout&&(f.timeout=this.flags.timeout),this.flags.memory&&(f.memory=this.flags.memory);let p=await getInputOverride(n,this.flags.input,this.flags.inputFile);if(p===!1)return;let m=!1,h,g,_,v=runActorOrTaskOnCloud(i,{actorOrTaskData:{id:c,userFriendlyId:l},runOptions:f,type:`Actor`,inputOverride:p?.input,silent:this.flags.silent,waitForRunToFinish:!0,printRunLogs:!0});for await(let e of v)if(h=e,!m&&(m=!0,!this.flags.silent)){g=`https://console.apify.com/actors/${c}/runs/${e.id}`,_=`https://console.apify.com/storage/datasets/${e.defaultDatasetId}`;let n=[`${t.yellow(`Started`)}: ${G.display(e.startedAt)}`];e.containerUrl&&n.push(`${t.yellow(`Container URL`)}: ${t.blue(e.containerUrl)}`);let r=h.buildNumber.split(`.`).slice(0,2).join(`.`),i=u.versions.find(e=>e.versionNumber===r),a=Object.entries(u.taggedBuilds??{}).find(([,t])=>t.buildNumber===e.buildNumber)?.[0],s=[`${t.yellow(`Build`)}:`,t.cyan(h.buildNumber)];a?s.push(`(${t.yellow(a)})`):s.push(`(${t.gray(`N/A`)})`),i&&s.push(`| ${t.gray(`Actor version:`)} ${t.cyan(i.versionNumber)} (${t.yellow(i.buildTag)})`),n.push(s.join(` `)),n.push(`${t.yellow(`Timeout`)}: ${h.options.timeoutSecs.toLocaleString(`en-US`)} seconds`),n.push(`${t.yellow(`Memory`)}: ${h.options.memoryMbytes} MB`),n.push(`${t.blue(`View on Apify Console`)}: ${g}`,``),simpleLog({message:n.join(`
|
|
87
88
|
`),stdout:!this.flags.json})}if(this.flags.json){printJsonToStdout(h);return}if(this.flags.silent||simpleLog({message:[``,`${t.blue(`Export results`)}: ${_}`,`${t.blue(`View on Apify Console`)}: ${g}`].join(`
|
|
88
89
|
`),stdout:!0}),this.flags.outputDataset){let e=h.defaultDatasetId,t,n=4;do{if(t=await i.dataset(e).get(),t?.itemCount)break;await new Promise(e=>{setTimeout(e,250)})}while(n--);let r=await i.dataset(e).downloadItems(B.JSON,{clean:!0});console.log(r.toString())}}static async resolveActorId({client:e,localActorName:t,usernameOrId:n,providedActorNameOrId:r}){if(r?.includes(`/`)){let t=await e.actor(r).get();if(!t)throw Error(`Cannot find Actor with ID '${r}' in your account.`);return{userFriendlyId:`${t.username}/${t.name}`,id:t.id,actorData:t}}if(r){let t=await e.actor(r).get();if(t)return{userFriendlyId:`${t.username}/${t.name}`,id:t.id,actorData:t};let i=await e.actor(`${n}/${r.toLowerCase()}`).get();if(i)return{userFriendlyId:`${i.username}/${i.name}`,id:i.id,actorData:i};throw Error(`Cannot find Actor with name or ID '${r}' in your account.`)}if(t){let r=await e.actor(`${n}/${t}`).get();if(!r)throw Error(`Cannot find Actor with ID '${n}/${t}' in your account. Call "apify push" to push this Actor to Apify platform.`);return{userFriendlyId:`${r.username}/${r.name}`,id:r.id,actorData:r}}throw Error(`Please provide an Actor ID or name, or run this command from a directory with a valid Apify Actor.`)}};const qn={[-1]:void 0,0:{mid:``,"left-mid":``,"mid-mid":``,"right-mid":``,middle:` `,"top-mid":`─`,"bottom-mid":`─`},1:{middle:` `,"top-mid":`─`,"bottom-mid":`─`,top:`─`,bottom:`─`,"left-mid":`├`,mid:`─`,"mid-mid":`─`,"right-mid":`┤`},2:{left:``,right:``,mid:``,"bottom-left":``,"bottom-mid":``,"bottom-right":``,top:``,"top-left":``,"top-mid":``,"top-right":``,"left-mid":``,"mid-mid":``,"right-mid":``,bottom:``,middle:` `}};function generateHeaderColors(e){return Array.from({length:e},()=>`cyan`)}const Jn=process.stdout.columns??100,Yn=Symbol.for(`@apify/cli:responsive-table:skip-column`);var Q=class ResponsiveTable{options;rows=[];constructor(e){this.options=e}pushRow(e){this.rows.push(e)}render(e){let t=ResponsiveTable.isSmallTerminal()?this.options.mandatoryColumns:this.options.allColumns,n=generateHeaderColors(t.length),r=e===0||e===2,i=qn[e],a=[],s=[],c=[];for(let e of t)this.options.hiddenColumns?.includes(e)||this.rows.some(t=>t[e]===Yn)||(a.push(this.options.columnAlignments?.[e]||`left`),ResponsiveTable.isSmallTerminal()?(s.push(this.options.breakpointOverrides?.small?.[e]?.label??e),c.push(this.options.breakpointOverrides?.small?.[e]?.valueFrom??e)):(s.push(e),c.push(e)));let l=new wt({head:s,style:{head:n,compact:r},colAligns:a,chars:i});for(let e of this.rows){let t=c.map(t=>e[t]);l.push(t)}return l.toString()}static isSmallTerminal(){return Jn<100}};const Xn=``,Zn=new Q({allColumns:[``,Xn],mandatoryColumns:[``,Xn],columnAlignments:{"":`left`,[Xn]:`right`}});var ActorsInfoCommand=class extends ApifyCommand{static name=`info`;static description=`Get information about an Actor.`;static examples=[{description:`Print summary information about an Actor.`,command:`apify actors info apify/hello-world`},{description:`Print the Actor README only.`,command:`apify actors info apify/hello-world --readme`},{description:`Print the Actor input schema as JSON.`,command:`apify actors info apify/hello-world --input`}];static docsUrl=`https://docs.apify.com/cli/docs/reference#apify-actors-info`;static flags={readme:Y.boolean({description:`Return the Actor README.`,exclusive:[`input`]}),input:Y.boolean({description:`Return the Actor input schema.`,exclusive:[`readme`]})};static args={actorId:Z.string({description:`The ID of the Actor to return information about.`,required:!0})};static enableJsonFlag=!0;async run(){let{actorId:e}=this.args,{readme:n,input:r,json:i}=this.flags,a=await getLoggedClientOrThrow(),s=await resolveActorContext({providedActorNameOrId:e,client:a});if(!s.valid){error({message:`${s.reason}. Please specify the Actor ID.`,stdout:!0});return}let c=await a.actor(s.id).get();c.actorMaker=await a.user(c.userId).get();for(let e of Object.values(c.taggedBuilds??{}))e.buildId&&(e.build=await a.build(e.buildId).get());if(i){printJsonToStdout(c);return}let l=c.taggedBuilds?.latest;if(n){if(!l){error({message:`No README found for this Actor.`,stdout:!0});return}if(!l.build?.readme){error({message:`No README found for this Actor.`,stdout:!0});return}simpleLog({message:l.build.readme,stdout:!0});return}if(r){if(!l){error({message:`No input schema found for this Actor.`,stdout:!0});return}if(!l.build?.inputSchema){error({message:`No input schema found for this Actor.`,stdout:!0});return}simpleLog({message:l.build.inputSchema,stdout:!0});return}let u=[`Information about Actor ${t.yellow(`${c.username}/${c.name}`)} (${t.gray(c.id)})`,``];c.title&&u.push(`${t.yellow(`Title:`)} ${t.bold(c.title)}`),c.description&&u.push(`${t.yellow(`Description:`)} ${c.description}`),u.push(`${t.yellow(`Created at:`)} ${t.cyan(G.display(c.createdAt))} ${t.gray(`|`)} ${t.yellow(`Updated at:`)} ${t.cyan(G.display(c.modifiedAt))}`),c.actorMaker&&(u.push(``,`${t.yellow(`Made by:`)} ${t.cyan(c.actorMaker.profile.name??c.actorMaker.username)}`),Reflect.get(c,`isCritical`)&&(u[u.length-1]+=` ${t.bgGray(`Maintained by Apify`)}`)),c.isPublic?u.push(``,`${t.yellow(`Actor is`)} ${t.green(`PUBLIC`)}`):u.push(``,`${t.yellow(`Actor is`)} ${t.cyan(`PRIVATE`)}`),c.isDeprecated&&u.push(``,`${t.yellow(`Actor is`)} ${t.red(`DEPRECATED`)}`);let f=Reflect.get(c,`pricingInfos`);if(f?.length){let e=f.at(-1);switch(e.pricingModel){case`FLAT_PRICE_PER_MONTH`:if(u.push(`${t.yellow(`Pricing information:`)} ${t.bgGray(`$${e.pricePerUnitUsd}/month + usage`)}`),e.trialMinutes){let n=e.trialMinutes*60*1e3,r=Cn.format(n);u.push(` ${t.yellow(`Trial duration:`)} ${t.bold(r)}`)}break;case`PRICE_PER_DATASET_ITEM`:{let n=e.pricePerUnitUsd*1e3;u.push(`${t.yellow(`Pricing information:`)} ${t.bgGray(`$${n.toFixed(2)} / 1,000 results`)}`);break}case`PAY_PER_EVENT`:{u.push(`${t.yellow(`Pricing information:`)} ${t.bgGray(`Pay per event`)}`);let n=Object.values(e.pricingPerEvent?.actorChargeEvents??{});for(let e of n)Zn.pushRow({"":e.eventTitle,[Xn]:t.bold(`$${e.eventPriceUsd.toFixed(2)}`)});let r=Zn.render(0).split(`
|
|
@@ -221,4 +222,4 @@ When no path is provided, validates all schemas found in '${W}':
|
|
|
221
222
|
- Dataset schema (from "storages.dataset")
|
|
222
223
|
- Output schema (from "output")
|
|
223
224
|
- Key-Value Store schema (from "storages.keyValueStore")`;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:Z.string({required:!1,description:`Optional path to your INPUT_SCHEMA.json file. If not provided, validates all schemas in '${W}'.`})};static hiddenAliases=[`vis`];async run(){if(this.args.path){await this.validateInputSchemaAtPath(this.args.path);return}await this.validateAllSchemas()}async validateInputSchemaAtPath(t){await readAndValidateInputSchema({forcePath:t,cwd:e.cwd(),getMessage:e=>`Validating input schema at ${e??t}`}),success({message:`Input schema is valid.`})}async validateAllSchemas(){let t=e.cwd(),n=!1,r=!1;try{let{inputSchema:e,inputSchemaPath:r}=await readInputSchema({cwd:t,throwOnMissing:!0});e&&(n=!0,info({message:`Validating input schema ${r?`at ${r}`:`embedded in '${W}'`}`}),yt(new vn({strict:!1}),e),success({message:`Input schema is valid.`}))}catch(e){n=!0,r=!0,error({message:e.message})}let i=[{label:`Dataset`,read:()=>readStorageSchema({cwd:t,key:`dataset`,label:`Dataset`,throwOnMissing:!0}),validate:validateDatasetSchema},{label:`Output`,read:()=>readStorageSchema({cwd:t,key:`output`,label:`Output`,getRef:e=>e?.output,throwOnMissing:!0}),validate:validateOutputSchema},{label:`Key-Value Store`,read:()=>readStorageSchema({cwd:t,key:`keyValueStore`,label:`Key-Value Store`,throwOnMissing:!0}),validate:validateKvsSchema}];for(let{label:e,read:t,validate:a}of i)try{let r=t();r&&(n=!0,info({message:`Validating ${e} schema ${r.schemaPath?`at ${r.schemaPath}`:`embedded in '${W}'`}`}),a(r.schema),success({message:`${e} schema is valid.`}))}catch(e){n=!0,r=!0,error({message:e.message})}if(!n)throw Error(`No schemas found. Make sure '${W}' exists and defines at least one schema.`);r&&(e.exitCode=5)}};const Br=[ActorIndexCommand,ActorsIndexCommand,AuthIndexCommand,BuildsIndexCommand,DatasetsIndexCommand,KeyValueStoresIndexCommand,RequestQueuesIndexCommand,RunsIndexCommand,SecretsIndexCommand,TasksIndexCommand,TelemetryIndexCommand,ApiCommand,TopLevelCallCommand,UpgradeCommand,InstallCommand,CreateCommand,EditInputSchemaCommand,InfoCommand,WrapScrapyCommand,InitCommand,LoginCommand,LogoutCommand,TopLevelPullCommand,ToplevelPushCommand,RunCommand,ValidateSchemaCommand,HelpCommand],Vr=[ActorSetValueCommand,ActorPushDataCommand,ActorGetValueCommand,ActorGetPublicUrlCommand,ActorGetInputCommand,ActorChargeCommand,ActorCalculateMemoryCommand,ActorGenerateSchemaTypesCommand,HelpCommand,UpgradeCommand,InstallCommand,TelemetryIndexCommand];export{runCLI as i,Br as n,processVersionCheck as r,Vr as t};
|
|
224
|
-
//# sourceMappingURL=_register-
|
|
225
|
+
//# sourceMappingURL=_register-DTtWZUIN.js.map
|