apify-cli 1.0.0 → 1.1.0
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/CHANGELOG.md +236 -84
- package/LICENSE.md +201 -0
- package/README.md +49 -543
- package/dist/.tsbuildinfo +1 -1
- package/dist/actor.js +3 -0
- package/dist/actor.js.map +1 -0
- package/dist/apify.js +3 -0
- package/dist/apify.js.map +1 -0
- package/dist/chunk-TJMCNXPV.js +242 -0
- package/dist/chunk-TJMCNXPV.js.map +1 -0
- package/dist/index.js +2 -3
- package/package.json +113 -89
- package/bin/dev.cmd +0 -3
- package/bin/dev.js +0 -21
- package/bin/dev.sh +0 -4
- package/bin/run.cmd +0 -3
- package/bin/run.js +0 -23
- package/dist/commands/actor/get-input.d.ts +0 -6
- package/dist/commands/actor/get-input.d.ts.map +0 -1
- package/dist/commands/actor/get-input.js +0 -14
- package/dist/commands/actor/get-input.js.map +0 -1
- package/dist/commands/actor/get-value.d.ts +0 -9
- package/dist/commands/actor/get-value.d.ts.map +0 -1
- package/dist/commands/actor/get-value.js +0 -27
- package/dist/commands/actor/get-value.js.map +0 -1
- package/dist/commands/actor/index.d.ts +0 -6
- package/dist/commands/actor/index.d.ts.map +0 -1
- package/dist/commands/actor/index.js +0 -13
- package/dist/commands/actor/index.js.map +0 -1
- package/dist/commands/actor/push-data.d.ts +0 -11
- package/dist/commands/actor/push-data.d.ts.map +0 -1
- package/dist/commands/actor/push-data.js +0 -56
- package/dist/commands/actor/push-data.js.map +0 -1
- package/dist/commands/actor/set-value.d.ts +0 -15
- package/dist/commands/actor/set-value.d.ts.map +0 -1
- package/dist/commands/actor/set-value.js +0 -76
- package/dist/commands/actor/set-value.js.map +0 -1
- package/dist/commands/call.d.ts +0 -19
- package/dist/commands/call.d.ts.map +0 -1
- package/dist/commands/call.js +0 -193
- package/dist/commands/call.js.map +0 -1
- package/dist/commands/check-version.d.ts +0 -11
- package/dist/commands/check-version.d.ts.map +0 -1
- package/dist/commands/check-version.js +0 -39
- package/dist/commands/check-version.js.map +0 -1
- package/dist/commands/create.d.ts +0 -15
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -201
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/edit-input-schema.d.ts +0 -11
- package/dist/commands/edit-input-schema.d.ts.map +0 -1
- package/dist/commands/edit-input-schema.js +0 -176
- package/dist/commands/edit-input-schema.js.map +0 -1
- package/dist/commands/info.d.ts +0 -6
- package/dist/commands/info.d.ts.map +0 -1
- package/dist/commands/info.js +0 -26
- package/dist/commands/info.js.map +0 -1
- package/dist/commands/init-wrap-scrapy.d.ts +0 -10
- package/dist/commands/init-wrap-scrapy.d.ts.map +0 -1
- package/dist/commands/init-wrap-scrapy.js +0 -41
- package/dist/commands/init-wrap-scrapy.js.map +0 -1
- package/dist/commands/init.d.ts +0 -12
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -88
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/login.d.ts +0 -10
- package/dist/commands/login.d.ts.map +0 -1
- package/dist/commands/login.js +0 -174
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/logout.d.ts +0 -6
- package/dist/commands/logout.d.ts.map +0 -1
- package/dist/commands/logout.js +0 -20
- package/dist/commands/logout.js.map +0 -1
- package/dist/commands/pull.d.ts +0 -12
- package/dist/commands/pull.d.ts.map +0 -1
- package/dist/commands/pull.js +0 -148
- package/dist/commands/pull.js.map +0 -1
- package/dist/commands/push.d.ts +0 -18
- package/dist/commands/push.d.ts.map +0 -1
- package/dist/commands/push.js +0 -298
- package/dist/commands/push.js.map +0 -1
- package/dist/commands/run.d.ts +0 -16
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -383
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/secrets/add.d.ts +0 -10
- package/dist/commands/secrets/add.d.ts.map +0 -1
- package/dist/commands/secrets/add.js +0 -31
- package/dist/commands/secrets/add.js.map +0 -1
- package/dist/commands/secrets/index.d.ts +0 -6
- package/dist/commands/secrets/index.d.ts.map +0 -1
- package/dist/commands/secrets/index.js +0 -24
- package/dist/commands/secrets/index.js.map +0 -1
- package/dist/commands/secrets/rm.d.ts +0 -9
- package/dist/commands/secrets/rm.d.ts.map +0 -1
- package/dist/commands/secrets/rm.js +0 -27
- package/dist/commands/secrets/rm.js.map +0 -1
- package/dist/commands/task/index.d.ts +0 -6
- package/dist/commands/task/index.d.ts.map +0 -1
- package/dist/commands/task/index.js +0 -13
- package/dist/commands/task/index.js.map +0 -1
- package/dist/commands/task/run.d.ts +0 -16
- package/dist/commands/task/run.d.ts.map +0 -1
- package/dist/commands/task/run.js +0 -91
- package/dist/commands/task/run.js.map +0 -1
- package/dist/commands/validate-schema.d.ts +0 -10
- package/dist/commands/validate-schema.d.ts.map +0 -1
- package/dist/commands/validate-schema.js +0 -58
- package/dist/commands/validate-schema.js.map +0 -1
- package/dist/hooks/deprecations.d.ts +0 -4
- package/dist/hooks/deprecations.d.ts.map +0 -1
- package/dist/hooks/deprecations.js +0 -18
- package/dist/hooks/deprecations.js.map +0 -1
- package/dist/hooks/init.d.ts +0 -7
- package/dist/hooks/init.d.ts.map +0 -1
- package/dist/hooks/init.js +0 -17
- package/dist/hooks/init.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/actor.d.ts +0 -27
- package/dist/lib/actor.d.ts.map +0 -1
- package/dist/lib/actor.js +0 -67
- package/dist/lib/actor.js.map +0 -1
- package/dist/lib/apify-oclif-help.d.ts +0 -15
- package/dist/lib/apify-oclif-help.d.ts.map +0 -1
- package/dist/lib/apify-oclif-help.js +0 -19
- package/dist/lib/apify-oclif-help.js.map +0 -1
- package/dist/lib/apify_command.d.ts +0 -21
- package/dist/lib/apify_command.d.ts.map +0 -1
- package/dist/lib/apify_command.js +0 -104
- package/dist/lib/apify_command.js.map +0 -1
- package/dist/lib/commands/resolve-input.d.ts +0 -5
- package/dist/lib/commands/resolve-input.d.ts.map +0 -1
- package/dist/lib/commands/resolve-input.js +0 -29
- package/dist/lib/commands/resolve-input.js.map +0 -1
- package/dist/lib/commands/run-on-cloud.d.ts +0 -20
- package/dist/lib/commands/run-on-cloud.d.ts.map +0 -1
- package/dist/lib/commands/run-on-cloud.js +0 -89
- package/dist/lib/commands/run-on-cloud.js.map +0 -1
- package/dist/lib/community.d.ts +0 -2
- package/dist/lib/community.d.ts.map +0 -1
- package/dist/lib/community.js +0 -4
- package/dist/lib/community.js.map +0 -1
- package/dist/lib/consts.d.ts +0 -54
- package/dist/lib/consts.d.ts.map +0 -1
- package/dist/lib/consts.js +0 -65
- package/dist/lib/consts.js.map +0 -1
- package/dist/lib/create-utils.d.ts +0 -8
- package/dist/lib/create-utils.d.ts.map +0 -1
- package/dist/lib/create-utils.js +0 -148
- package/dist/lib/create-utils.js.map +0 -1
- package/dist/lib/exec.d.ts +0 -3
- package/dist/lib/exec.d.ts.map +0 -1
- package/dist/lib/exec.js +0 -40
- package/dist/lib/exec.js.map +0 -1
- package/dist/lib/files.d.ts +0 -14
- package/dist/lib/files.d.ts.map +0 -1
- package/dist/lib/files.js +0 -58
- package/dist/lib/files.js.map +0 -1
- package/dist/lib/input_schema.d.ts +0 -28
- package/dist/lib/input_schema.d.ts.map +0 -1
- package/dist/lib/input_schema.js +0 -126
- package/dist/lib/input_schema.js.map +0 -1
- package/dist/lib/local_state.d.ts +0 -11
- package/dist/lib/local_state.d.ts.map +0 -1
- package/dist/lib/local_state.js +0 -27
- package/dist/lib/local_state.js.map +0 -1
- package/dist/lib/outputs.d.ts +0 -19
- package/dist/lib/outputs.d.ts.map +0 -1
- package/dist/lib/outputs.js +0 -45
- package/dist/lib/outputs.js.map +0 -1
- package/dist/lib/project_analyzer.d.ts +0 -4
- package/dist/lib/project_analyzer.d.ts.map +0 -1
- package/dist/lib/project_analyzer.js +0 -30
- package/dist/lib/project_analyzer.js.map +0 -1
- package/dist/lib/projects/CrawleeAnalyzer.d.ts +0 -4
- package/dist/lib/projects/CrawleeAnalyzer.d.ts.map +0 -1
- package/dist/lib/projects/CrawleeAnalyzer.js +0 -20
- package/dist/lib/projects/CrawleeAnalyzer.js.map +0 -1
- package/dist/lib/projects/OldApifySDKAnalyzer.d.ts +0 -4
- package/dist/lib/projects/OldApifySDKAnalyzer.d.ts.map +0 -1
- package/dist/lib/projects/OldApifySDKAnalyzer.js +0 -38
- package/dist/lib/projects/OldApifySDKAnalyzer.js.map +0 -1
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts +0 -17
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts.map +0 -1
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.js +0 -87
- package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.js.map +0 -1
- package/dist/lib/projects/scrapy/Spider.d.ts +0 -14
- package/dist/lib/projects/scrapy/Spider.d.ts.map +0 -1
- package/dist/lib/projects/scrapy/Spider.js +0 -33
- package/dist/lib/projects/scrapy/Spider.js.map +0 -1
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts +0 -7
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts.map +0 -1
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js +0 -25
- package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js.map +0 -1
- package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts +0 -4
- package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts.map +0 -1
- package/dist/lib/projects/scrapy/wrapScrapyProject.js +0 -109
- package/dist/lib/projects/scrapy/wrapScrapyProject.js.map +0 -1
- package/dist/lib/projects/shared.d.ts +0 -2
- package/dist/lib/projects/shared.d.ts.map +0 -1
- package/dist/lib/projects/shared.js +0 -13
- package/dist/lib/projects/shared.js.map +0 -1
- package/dist/lib/secrets.d.ts +0 -22
- package/dist/lib/secrets.d.ts.map +0 -1
- package/dist/lib/secrets.js +0 -104
- package/dist/lib/secrets.js.map +0 -1
- package/dist/lib/telemetry.d.ts +0 -21
- package/dist/lib/telemetry.d.ts.map +0 -1
- package/dist/lib/telemetry.js +0 -87
- package/dist/lib/telemetry.js.map +0 -1
- package/dist/lib/types.d.ts +0 -11
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/types.js +0 -2
- package/dist/lib/types.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -102
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -577
- package/dist/lib/utils.js.map +0 -1
- package/dist/lib/version_check.d.ts +0 -14
- package/dist/lib/version_check.d.ts.map +0 -1
- package/dist/lib/version_check.js +0 -90
- package/dist/lib/version_check.js.map +0 -1
- package/oclif.manifest.json +0 -867
package/dist/commands/pull.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
2
|
-
export declare class PullCommand extends ApifyCommand<typeof PullCommand> {
|
|
3
|
-
static description: string;
|
|
4
|
-
static flags: {
|
|
5
|
-
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
-
};
|
|
7
|
-
static args: {
|
|
8
|
-
actorId: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
9
|
-
};
|
|
10
|
-
run(): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=pull.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../src/commands/pull.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAavD,qBAAa,WAAY,SAAQ,YAAY,CAAC,OAAO,WAAW,CAAC;IAC7D,OAAgB,WAAW,SACsF;IAEjH,OAAgB,KAAK;;MAMnB;IAEF,OAAgB,IAAI;;MAMlB;IAEI,GAAG;CA2GZ"}
|
package/dist/commands/pull.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { mkdirSync, readdirSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { dirname, join } from 'node:path';
|
|
3
|
-
import process from 'node:process';
|
|
4
|
-
import { Args, Flags } from '@oclif/core';
|
|
5
|
-
import AdmZip from 'adm-zip';
|
|
6
|
-
import axios from 'axios';
|
|
7
|
-
import jju from 'jju';
|
|
8
|
-
import { gt } from 'semver';
|
|
9
|
-
import tiged from 'tiged';
|
|
10
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
11
|
-
import { LOCAL_CONFIG_PATH } from '../lib/consts.js';
|
|
12
|
-
import { error, success } from '../lib/outputs.js';
|
|
13
|
-
import { getLocalConfigOrThrow, getLocalUserInfo, getLoggedClientOrThrow } from '../lib/utils.js';
|
|
14
|
-
const extractGitHubZip = async (url, directoryPath) => {
|
|
15
|
-
const { data } = await axios.get(url, { responseType: 'arraybuffer' });
|
|
16
|
-
const zipFile = new AdmZip(Buffer.from(data, 'binary'));
|
|
17
|
-
zipFile.extractEntryTo(zipFile.getEntries()[0].entryName, directoryPath, false);
|
|
18
|
-
};
|
|
19
|
-
export class PullCommand extends ApifyCommand {
|
|
20
|
-
async run() {
|
|
21
|
-
const cwd = process.cwd();
|
|
22
|
-
const localConfig = await getLocalConfigOrThrow(cwd);
|
|
23
|
-
const userInfo = await getLocalUserInfo();
|
|
24
|
-
const apifyClient = await getLoggedClientOrThrow();
|
|
25
|
-
const isActorAutomaticallyDetected = !this.args?.actorId;
|
|
26
|
-
const usernameOrId = userInfo.username || userInfo.id;
|
|
27
|
-
const actorId = this.args?.actorId || localConfig?.id || (localConfig?.name ? `${usernameOrId}/${localConfig.name}` : undefined);
|
|
28
|
-
if (!actorId)
|
|
29
|
-
throw new Error('Cannot find Actor in this directory.');
|
|
30
|
-
let actor;
|
|
31
|
-
try {
|
|
32
|
-
actor = await apifyClient.actor(actorId).get();
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
throw new Error(`Cannot find Actor with ID/name '${actorId}' in your account.`);
|
|
36
|
-
}
|
|
37
|
-
if (!actor)
|
|
38
|
-
throw new Error(`Cannot find Actor with ID/name '${actorId}' in your account.`);
|
|
39
|
-
const { name, versions } = actor;
|
|
40
|
-
let correctVersion = null;
|
|
41
|
-
if (this.flags?.version) {
|
|
42
|
-
correctVersion = versions.find((version) => version.versionNumber === this.flags?.version);
|
|
43
|
-
if (!correctVersion) {
|
|
44
|
-
throw new Error(`Cannot find version ${this.flags?.version} of Actor ${actorId}.`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (!correctVersion) {
|
|
48
|
-
correctVersion = versions.reduce((match, curr) => {
|
|
49
|
-
if (gt(`${curr.versionNumber}.0`, `${match.versionNumber}.0`))
|
|
50
|
-
return curr;
|
|
51
|
-
return match;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
const dirpath = isActorAutomaticallyDetected ? cwd : join(cwd, name);
|
|
55
|
-
mkdirSync(dirpath, { recursive: true });
|
|
56
|
-
if (!isActorAutomaticallyDetected && !(readdirSync(dirpath).length === 0)) {
|
|
57
|
-
error({ message: `Directory ${dirpath} is not empty. Please empty it or choose another directory.` });
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
switch (correctVersion.sourceType) {
|
|
61
|
-
case 'TARBALL': {
|
|
62
|
-
await extractGitHubZip(correctVersion.tarballUrl, dirpath);
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
case 'SOURCE_FILES': {
|
|
66
|
-
const { sourceFiles } = correctVersion;
|
|
67
|
-
for (const file of sourceFiles) {
|
|
68
|
-
const folderPath = dirname(file.name);
|
|
69
|
-
mkdirSync(`${dirpath}/${folderPath}`, { recursive: true });
|
|
70
|
-
// @ts-expect-error TODO: is this an actual field?
|
|
71
|
-
if (!file.folder) {
|
|
72
|
-
const fileContent = file.format === 'BASE64' ? Buffer.from(file.content, 'base64').toString() : file.content;
|
|
73
|
-
if (file.name === LOCAL_CONFIG_PATH) {
|
|
74
|
-
const actorJson = jju.parse(fileContent);
|
|
75
|
-
actorJson.name = actor.name;
|
|
76
|
-
writeFileSync(`${dirpath}/${file.name}`, jju.update(fileContent, actorJson));
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
writeFileSync(`${dirpath}/${file.name}`, fileContent);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
case 'GIT_REPO': {
|
|
86
|
-
// e.g. https://github.com/jakubbalada/Datasety.git#master:RejstrikPolitickychStran
|
|
87
|
-
const { gitRepoUrl } = correctVersion;
|
|
88
|
-
const [repoUrl, branchDirPart] = gitRepoUrl.split('#');
|
|
89
|
-
let branch;
|
|
90
|
-
let dir;
|
|
91
|
-
if (branchDirPart)
|
|
92
|
-
[branch, dir] = branchDirPart.split(':');
|
|
93
|
-
let branchDirRepoUrl = repoUrl;
|
|
94
|
-
if (dir)
|
|
95
|
-
branchDirRepoUrl += `/${dir}`;
|
|
96
|
-
if (branch)
|
|
97
|
-
branchDirRepoUrl += `#${branch}`;
|
|
98
|
-
const emitter = tiged(branchDirRepoUrl);
|
|
99
|
-
try {
|
|
100
|
-
await emitter.clone(dirpath);
|
|
101
|
-
}
|
|
102
|
-
catch (err) {
|
|
103
|
-
throw new Error(`Failed to pull Actor from ${gitRepoUrl}. ${err.message}`);
|
|
104
|
-
}
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
case 'GITHUB_GIST': {
|
|
108
|
-
await extractGitHubZip(`${correctVersion.gitHubGistUrl}/archive/master.zip`, dirpath);
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
default:
|
|
112
|
-
throw new Error(`Unknown source type: ${correctVersion.sourceType}`);
|
|
113
|
-
}
|
|
114
|
-
success({ message: isActorAutomaticallyDetected ? `Actor ${name} updated at ${dirpath}/` : `Pulled to ${dirpath}/` });
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
Object.defineProperty(PullCommand, "description", {
|
|
118
|
-
enumerable: true,
|
|
119
|
-
configurable: true,
|
|
120
|
-
writable: true,
|
|
121
|
-
value: 'Pulls an Actor from the Apify platform to the current directory. '
|
|
122
|
-
+ 'If it is defined as Git repository, it will be cloned. If it is defined as Web IDE, it will fetch the files.'
|
|
123
|
-
});
|
|
124
|
-
Object.defineProperty(PullCommand, "flags", {
|
|
125
|
-
enumerable: true,
|
|
126
|
-
configurable: true,
|
|
127
|
-
writable: true,
|
|
128
|
-
value: {
|
|
129
|
-
version: Flags.string({
|
|
130
|
-
char: 'v',
|
|
131
|
-
description: 'Actor version number which will be pulled, e.g. 1.2. Default: the highest version',
|
|
132
|
-
required: false,
|
|
133
|
-
}),
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
Object.defineProperty(PullCommand, "args", {
|
|
137
|
-
enumerable: true,
|
|
138
|
-
configurable: true,
|
|
139
|
-
writable: true,
|
|
140
|
-
value: {
|
|
141
|
-
actorId: Args.string({
|
|
142
|
-
required: false,
|
|
143
|
-
description: 'Name or ID of the Actor to run (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). '
|
|
144
|
-
+ 'If not provided, the command will update the Actor in the current directory based on its name in ".actor/actor.json" file.',
|
|
145
|
-
}),
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
//# sourceMappingURL=pull.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../src/commands/pull.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,MAAM,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AC,OAAO,GAAG,EAAE,CAAC;oBACX,MAAM,IAAI,KAAK,CAAC,6BAA6B,UAAU,KAAM,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;gBAC1F,CAAC;gBAED,MAAM;YACV,CAAC;YACD,KAAK,aAAa,CAAC,CAAC,CAAC;gBACjB,MAAM,gBAAgB,CAAC,GAAG,cAAc,CAAC,aAAa,qBAAqB,EAAE,OAAO,CAAC,CAAC;gBAEtF,MAAM;YACV,CAAC;YACD;gBACI,MAAM,IAAI,KAAK,CAAC,wBAAwB,cAAc,CAAC,UAAU,EAAE,CAAC,CAAC;QAC7E,CAAC;QAED,OAAO,CAAC,EAAE,OAAO,EAAE,4BAA4B,CAAC,CAAC,CAAC,SAAS,IAAI,eAAe,OAAO,GAAG,CAAC,CAAC,CAAC,aAAa,OAAO,GAAG,EAAE,CAAC,CAAC;IAC1H,CAAC;;AA7He;;;;WAAc,mEAAmE;UAC/F,8GAA8G;GAAC;AAEjG;;;;WAAQ;QACpB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC;YAClB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,mFAAmF;YAChG,QAAQ,EAAE,KAAK;SAClB,CAAC;KACL;GAAC;AAEc;;;;WAAO;QACnB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;YACjB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,oFAAoF;kBAC/F,4HAA4H;SACjI,CAAC;KACL;GAAC"}
|
package/dist/commands/push.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
2
|
-
export declare class PushCommand extends ApifyCommand<typeof PushCommand> {
|
|
3
|
-
static description: string;
|
|
4
|
-
static flags: {
|
|
5
|
-
'version-number': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
-
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
-
'build-tag': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
-
'wait-for-finish': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
-
'no-prompt': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
-
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
};
|
|
12
|
-
static args: {
|
|
13
|
-
actorId: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
14
|
-
};
|
|
15
|
-
catch(caughtError: Error): Promise<void>;
|
|
16
|
-
run(): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=push.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../src/commands/push.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AA6BvD,qBAAa,WAAY,SAAQ,YAAY,CAAC,OAAO,WAAW,CAAC;IAC7D,OAAgB,WAAW,SAI4H;IAEvJ,OAAgB,KAAK;;;;;;;MAgCnB;IAEF,OAAgB,IAAI;;MAMlB;IAGa,KAAK,CAAC,WAAW,EAAE,KAAK;IAIjC,GAAG;CA8NZ"}
|
package/dist/commands/push.js
DELETED
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
import { readFileSync, unlinkSync, statSync } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import process from 'node:process';
|
|
4
|
-
import { fetchManifest } from '@apify/actor-templates';
|
|
5
|
-
import { ACTOR_JOB_STATUSES, ACTOR_SOURCE_TYPES, MAX_MULTIFILE_BYTES } from '@apify/consts';
|
|
6
|
-
import { Args, Flags } from '@oclif/core';
|
|
7
|
-
import inquirer from 'inquirer';
|
|
8
|
-
import isCI from 'is-ci';
|
|
9
|
-
import open from 'open';
|
|
10
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
11
|
-
import { CommandExitCodes, DEPRECATED_LOCAL_CONFIG_NAME, LOCAL_CONFIG_PATH, UPLOADS_STORE_NAME } from '../lib/consts.js';
|
|
12
|
-
import { sumFilesSizeInBytes } from '../lib/files.js';
|
|
13
|
-
import { error, info, link, run, success, warning } from '../lib/outputs.js';
|
|
14
|
-
import { transformEnvToEnvVars } from '../lib/secrets.js';
|
|
15
|
-
import { createActZip, createSourceFiles, getActorLocalFilePaths, getLocalConfigOrThrow, getLocalUserInfo, getLoggedClientOrThrow, outputJobLog, } from '../lib/utils.js';
|
|
16
|
-
const TEMP_ZIP_FILE_NAME = 'temp_file.zip';
|
|
17
|
-
const DEFAULT_RUN_OPTIONS = {
|
|
18
|
-
build: 'latest',
|
|
19
|
-
memoryMbytes: 4096,
|
|
20
|
-
timeoutSecs: 3600,
|
|
21
|
-
};
|
|
22
|
-
const DEFAULT_ACTOR_VERSION_NUMBER = '0.0';
|
|
23
|
-
// It would be better to use `version-0.0` or similar,
|
|
24
|
-
// or even have no default tag, but the platform complains when
|
|
25
|
-
// Actor does not have a build with a `latest` tag, so until
|
|
26
|
-
// that changes, we have to add it.
|
|
27
|
-
const DEFAULT_BUILD_TAG = 'latest';
|
|
28
|
-
export class PushCommand extends ApifyCommand {
|
|
29
|
-
// TODO: Global handler in ApifyCommand
|
|
30
|
-
async catch(caughtError) {
|
|
31
|
-
throw caughtError;
|
|
32
|
-
}
|
|
33
|
-
async run() {
|
|
34
|
-
const cwd = process.cwd();
|
|
35
|
-
// Validate there are files before rest of the logic
|
|
36
|
-
const filePathsToPush = await getActorLocalFilePaths(cwd);
|
|
37
|
-
if (!filePathsToPush.length) {
|
|
38
|
-
error({ message: 'You need to call this command from a folder that has an Actor in it!' });
|
|
39
|
-
process.exitCode = CommandExitCodes.NoFilesToPush;
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
if (
|
|
43
|
-
// Check that some of these files exist, cuz otherwise we cannot do much
|
|
44
|
-
![
|
|
45
|
-
// old apify project
|
|
46
|
-
DEPRECATED_LOCAL_CONFIG_NAME,
|
|
47
|
-
// new apify project
|
|
48
|
-
'actor.json',
|
|
49
|
-
'.actor/actor.json',
|
|
50
|
-
// The .actor folder existing in general
|
|
51
|
-
'.actor',
|
|
52
|
-
].some((filePath) => filePathsToPush.some((fp) => fp === filePath || fp.startsWith(filePath)))) {
|
|
53
|
-
error({
|
|
54
|
-
message: [
|
|
55
|
-
'A valid Actor could not be found in the current directory. Please make sure you are in the correct directory.',
|
|
56
|
-
'You can also turn this directory into an Actor by running `apify init`.',
|
|
57
|
-
].join('\n'),
|
|
58
|
-
});
|
|
59
|
-
process.exitCode = CommandExitCodes.NoFilesToPush;
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const apifyClient = await getLoggedClientOrThrow();
|
|
63
|
-
const localConfig = await getLocalConfigOrThrow(cwd);
|
|
64
|
-
const userInfo = await getLocalUserInfo();
|
|
65
|
-
const isOrganizationLoggedIn = !!userInfo.organizationOwnerUserId;
|
|
66
|
-
const redirectUrlPart = isOrganizationLoggedIn ? `/organization/${userInfo.id}` : '';
|
|
67
|
-
let actorId;
|
|
68
|
-
let actor;
|
|
69
|
-
let isActorCreatedNow = false;
|
|
70
|
-
// User can override Actor version and build tag, attributes in localConfig will remain same.
|
|
71
|
-
const version = this.flags.version || this.flags.versionNumber || localConfig?.version || DEFAULT_ACTOR_VERSION_NUMBER;
|
|
72
|
-
let buildTag = this.flags.buildTag || localConfig.buildTag;
|
|
73
|
-
// We can't add the default build tag to everything. If a user creates a new
|
|
74
|
-
// version, e.g. for testing, but forgets to add a tag, it would use the default
|
|
75
|
-
// tag and their production runs might be affected ❌
|
|
76
|
-
// TODO: revisit this when we have better build tagging system on platform.
|
|
77
|
-
if (!buildTag && version === DEFAULT_ACTOR_VERSION_NUMBER) {
|
|
78
|
-
buildTag = DEFAULT_BUILD_TAG;
|
|
79
|
-
}
|
|
80
|
-
const waitForFinishMillis = Number.isNaN(this.flags.waitForFinish)
|
|
81
|
-
? undefined
|
|
82
|
-
: Number.parseInt(this.flags.waitForFinish, 10) * 1000;
|
|
83
|
-
// User can override actorId of pushing Actor.
|
|
84
|
-
// It causes that we push Actor to this id but attributes in localConfig will remain same.
|
|
85
|
-
const forceActorId = this.args.actorId;
|
|
86
|
-
if (forceActorId) {
|
|
87
|
-
actor = (await apifyClient.actor(forceActorId).get());
|
|
88
|
-
if (!actor)
|
|
89
|
-
throw new Error(`Cannot find Actor with ID '${forceActorId}' in your account.`);
|
|
90
|
-
actorId = actor.id;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
const usernameOrId = userInfo.username || userInfo.id;
|
|
94
|
-
actor = (await apifyClient.actor(`${usernameOrId}/${localConfig.name}`).get());
|
|
95
|
-
if (actor) {
|
|
96
|
-
actorId = actor.id;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
const { templates } = await fetchManifest();
|
|
100
|
-
const actorTemplate = templates.find((t) => t.name === localConfig.template);
|
|
101
|
-
const defaultRunOptions = (actorTemplate?.defaultRunOptions || DEFAULT_RUN_OPTIONS);
|
|
102
|
-
const newActor = {
|
|
103
|
-
name: localConfig.name,
|
|
104
|
-
defaultRunOptions,
|
|
105
|
-
versions: [{
|
|
106
|
-
versionNumber: version,
|
|
107
|
-
buildTag,
|
|
108
|
-
// TODO: export enum from apify-client
|
|
109
|
-
sourceType: ACTOR_SOURCE_TYPES.SOURCE_FILES,
|
|
110
|
-
sourceFiles: [],
|
|
111
|
-
}],
|
|
112
|
-
};
|
|
113
|
-
actor = await apifyClient.actors().create(newActor);
|
|
114
|
-
actorId = actor.id;
|
|
115
|
-
isActorCreatedNow = true;
|
|
116
|
-
info({ message: `Created Actor with name ${localConfig.name} on Apify.` });
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
info({ message: `Deploying Actor '${localConfig.name}' to Apify.` });
|
|
120
|
-
const filesSize = await sumFilesSizeInBytes(filePathsToPush, cwd);
|
|
121
|
-
const actorClient = apifyClient.actor(actorId);
|
|
122
|
-
let sourceType;
|
|
123
|
-
let sourceFiles;
|
|
124
|
-
let tarballUrl;
|
|
125
|
-
if (filesSize < MAX_MULTIFILE_BYTES) {
|
|
126
|
-
const client = await actorClient.get();
|
|
127
|
-
if (!isActorCreatedNow) {
|
|
128
|
-
// Check when was files modified last
|
|
129
|
-
const mostRecentModifiedFileMs = filePathsToPush.reduce((modifiedMs, filePath) => {
|
|
130
|
-
const { mtimeMs, ctimeMs } = statSync(join(cwd, filePath));
|
|
131
|
-
// Sometimes it's possible mtimeMs is some messed up value (like 2000/01/01 midnight), then we want to check created if it's newer
|
|
132
|
-
const fileModifiedMs = mtimeMs > ctimeMs ? mtimeMs : ctimeMs;
|
|
133
|
-
return modifiedMs > fileModifiedMs ? modifiedMs : fileModifiedMs;
|
|
134
|
-
}, 0);
|
|
135
|
-
const actorModifiedMs = client?.modifiedAt.valueOf();
|
|
136
|
-
if (!this.flags.force && actorModifiedMs && mostRecentModifiedFileMs < actorModifiedMs && (localConfig?.name || forceActorId)) {
|
|
137
|
-
throw new Error(`Actor with identifier "${localConfig?.name || forceActorId}" is already on the platform and was modified there since modified locally.
|
|
138
|
-
Skipping push. Use --force to override.`);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
sourceFiles = await createSourceFiles(filePathsToPush, cwd);
|
|
142
|
-
sourceType = ACTOR_SOURCE_TYPES.SOURCE_FILES;
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
// Create zip
|
|
146
|
-
run({ message: 'Zipping Actor files' });
|
|
147
|
-
await createActZip(TEMP_ZIP_FILE_NAME, filePathsToPush, cwd);
|
|
148
|
-
// Upload it to Apify.keyValueStores
|
|
149
|
-
const store = await apifyClient.keyValueStores().getOrCreate(UPLOADS_STORE_NAME);
|
|
150
|
-
const key = `${actor.name}-${version}.zip`;
|
|
151
|
-
const buffer = readFileSync(TEMP_ZIP_FILE_NAME);
|
|
152
|
-
await apifyClient.keyValueStore(store.id).setRecord({
|
|
153
|
-
key,
|
|
154
|
-
// TODO: fix this type too
|
|
155
|
-
value: buffer,
|
|
156
|
-
contentType: 'application/zip',
|
|
157
|
-
});
|
|
158
|
-
unlinkSync(TEMP_ZIP_FILE_NAME);
|
|
159
|
-
tarballUrl = `${apifyClient.baseUrl}/key-value-stores/${store.id}/records/${key}?disableRedirect=true`;
|
|
160
|
-
sourceType = ACTOR_SOURCE_TYPES.TARBALL;
|
|
161
|
-
}
|
|
162
|
-
// Update Actor version
|
|
163
|
-
const actorCurrentVersion = await actorClient.version(version).get();
|
|
164
|
-
const envVars = localConfig.environmentVariables
|
|
165
|
-
? transformEnvToEnvVars(localConfig.environmentVariables)
|
|
166
|
-
: undefined;
|
|
167
|
-
if (actorCurrentVersion) {
|
|
168
|
-
const actorVersionModifier = { tarballUrl, sourceFiles, buildTag, sourceType, envVars };
|
|
169
|
-
// TODO: fix this type too -.-
|
|
170
|
-
await actorClient.version(version).update(actorVersionModifier);
|
|
171
|
-
run({ message: `Updated version ${version} for Actor ${actor.name}.` });
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
const actorNewVersion = {
|
|
175
|
-
versionNumber: version,
|
|
176
|
-
tarballUrl,
|
|
177
|
-
sourceFiles,
|
|
178
|
-
buildTag,
|
|
179
|
-
sourceType,
|
|
180
|
-
envVars,
|
|
181
|
-
};
|
|
182
|
-
await actorClient.versions().create({
|
|
183
|
-
...actorNewVersion,
|
|
184
|
-
});
|
|
185
|
-
run({ message: `Created version ${version} for Actor ${actor.name}.` });
|
|
186
|
-
}
|
|
187
|
-
// Build Actor on Apify and wait for build to finish
|
|
188
|
-
run({ message: `Building Actor ${actor.name}` });
|
|
189
|
-
let build = await actorClient.build(version, {
|
|
190
|
-
useCache: true,
|
|
191
|
-
waitForFinish: 2, // NOTE: We need to wait some time to Apify open stream and we can create connection
|
|
192
|
-
});
|
|
193
|
-
try {
|
|
194
|
-
await outputJobLog(build, waitForFinishMillis);
|
|
195
|
-
}
|
|
196
|
-
catch (err) {
|
|
197
|
-
warning({ message: 'Can not get log:' });
|
|
198
|
-
console.error(err);
|
|
199
|
-
}
|
|
200
|
-
build = (await apifyClient.build(build.id).get());
|
|
201
|
-
link({ message: 'Actor build detail', url: `https://console.apify.com${redirectUrlPart}/actors/${build.actId}#/builds/${build.buildNumber}` });
|
|
202
|
-
// Disable open browser on CI, or if user passed --no-prompt flag
|
|
203
|
-
if (!isCI && !this.flags.noPrompt) {
|
|
204
|
-
const shouldOpenBrowser = await inquirer.prompt([
|
|
205
|
-
{ type: 'confirm', name: 'continue', message: 'Do you want to open the Actor detail in your browser?', default: true },
|
|
206
|
-
]);
|
|
207
|
-
if (shouldOpenBrowser.continue) {
|
|
208
|
-
await open(`https://console.apify.com${redirectUrlPart}/actors/${build.actId}`);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
if (build.status === ACTOR_JOB_STATUSES.SUCCEEDED) {
|
|
212
|
-
success({ message: 'Actor was deployed to Apify cloud and built there.' });
|
|
213
|
-
// @ts-expect-error FIX THESE TYPES 😢
|
|
214
|
-
}
|
|
215
|
-
else if (build.status === ACTOR_JOB_STATUSES.READY) {
|
|
216
|
-
warning({ message: 'Build is waiting for allocation.' });
|
|
217
|
-
// @ts-expect-error FIX THESE TYPES 😢
|
|
218
|
-
}
|
|
219
|
-
else if (build.status === ACTOR_JOB_STATUSES.RUNNING) {
|
|
220
|
-
warning({ message: 'Build is still running.' });
|
|
221
|
-
// @ts-expect-error FIX THESE TYPES 😢
|
|
222
|
-
}
|
|
223
|
-
else if (build.status === ACTOR_JOB_STATUSES.ABORTED || build.status === ACTOR_JOB_STATUSES.ABORTING) {
|
|
224
|
-
warning({ message: 'Build was aborted!' });
|
|
225
|
-
process.exitCode = CommandExitCodes.BuildAborted;
|
|
226
|
-
// @ts-expect-error FIX THESE TYPES 😢
|
|
227
|
-
}
|
|
228
|
-
else if (build.status === ACTOR_JOB_STATUSES.TIMED_OUT || build.status === ACTOR_JOB_STATUSES.TIMING_OUT) {
|
|
229
|
-
warning({ message: 'Build timed out!' });
|
|
230
|
-
process.exitCode = CommandExitCodes.BuildTimedOut;
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
error({ message: 'Build failed!' });
|
|
234
|
-
process.exitCode = CommandExitCodes.BuildFailed;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
Object.defineProperty(PushCommand, "description", {
|
|
239
|
-
enumerable: true,
|
|
240
|
-
configurable: true,
|
|
241
|
-
writable: true,
|
|
242
|
-
value: 'Uploads the Actor to the Apify platform and builds it there.\n'
|
|
243
|
-
+ `The Actor settings are read from the "${LOCAL_CONFIG_PATH}" file in the current directory, but they can be overridden using command-line options.\n`
|
|
244
|
-
+ `NOTE: If the source files are smaller than ${MAX_MULTIFILE_BYTES / (1024 ** 2)} MB then they are uploaded as \n`
|
|
245
|
-
+ '"Multiple source files", otherwise they are uploaded as "Zip file".\n\n'
|
|
246
|
-
+ 'When there\'s an attempt to push files that are older than the Actor on the platform, the command will fail. Can be overwritten with --force flag.'
|
|
247
|
-
});
|
|
248
|
-
Object.defineProperty(PushCommand, "flags", {
|
|
249
|
-
enumerable: true,
|
|
250
|
-
configurable: true,
|
|
251
|
-
writable: true,
|
|
252
|
-
value: {
|
|
253
|
-
'version-number': Flags.string({
|
|
254
|
-
description: 'DEPRECATED: Use flag version instead. Actor version number to which the files should be pushed. '
|
|
255
|
-
+ `By default, it is taken from the "${LOCAL_CONFIG_PATH}" file.`,
|
|
256
|
-
required: false,
|
|
257
|
-
deprecated: true,
|
|
258
|
-
}),
|
|
259
|
-
version: Flags.string({
|
|
260
|
-
char: 'v',
|
|
261
|
-
description: `Actor version number to which the files should be pushed. By default, it is taken from the "${LOCAL_CONFIG_PATH}" file.`,
|
|
262
|
-
required: false,
|
|
263
|
-
}),
|
|
264
|
-
'build-tag': Flags.string({
|
|
265
|
-
char: 'b',
|
|
266
|
-
description: `Build tag to be applied to the successful Actor build. By default, it is taken from the "${LOCAL_CONFIG_PATH}" file`,
|
|
267
|
-
required: false,
|
|
268
|
-
}),
|
|
269
|
-
'wait-for-finish': Flags.string({
|
|
270
|
-
char: 'w',
|
|
271
|
-
description: 'Seconds for waiting to build to finish, if no value passed, it waits forever.',
|
|
272
|
-
required: false,
|
|
273
|
-
}),
|
|
274
|
-
'no-prompt': Flags.boolean({
|
|
275
|
-
description: 'Do not prompt for opening the Actor details in a browser. This will also not open the browser automatically.',
|
|
276
|
-
default: false,
|
|
277
|
-
required: false,
|
|
278
|
-
}),
|
|
279
|
-
force: Flags.boolean({
|
|
280
|
-
description: 'Push an Actor even when the local files are older than the Actor on the platform.',
|
|
281
|
-
default: false,
|
|
282
|
-
required: false,
|
|
283
|
-
}),
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
Object.defineProperty(PushCommand, "args", {
|
|
287
|
-
enumerable: true,
|
|
288
|
-
configurable: true,
|
|
289
|
-
writable: true,
|
|
290
|
-
value: {
|
|
291
|
-
actorId: Args.string({
|
|
292
|
-
required: false,
|
|
293
|
-
description: 'Name or ID of the Actor to push (e.g. "apify/hello-world" or "E2jjCZBezvAZnX8Rb"). '
|
|
294
|
-
+ `If not provided, the command will create or modify the Actor with the name specified in "${LOCAL_CONFIG_PATH}" file.`,
|
|
295
|
-
}),
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
//# sourceMappingURL=push.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../src/commands/push.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAA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AC5F,4FAA4F,iBAAiB,SAAS;SAC/H,CAAC;KACL;GAAC"}
|
package/dist/commands/run.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
2
|
-
export declare class RunCommand extends ApifyCommand<typeof RunCommand> {
|
|
3
|
-
static description: string;
|
|
4
|
-
static flags: {
|
|
5
|
-
purge: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
6
|
-
'purge-queue': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
-
'purge-dataset': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
'purge-key-value-store': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
-
entrypoint: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
input: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
'input-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
};
|
|
13
|
-
run(): Promise<void>;
|
|
14
|
-
private validateAndStoreInput;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=run.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AA2BvD,qBAAa,UAAW,SAAQ,YAAY,CAAC,OAAO,UAAU,CAAC;IAC3D,OAAgB,WAAW,SAOwD;IAEnF,OAAgB,KAAK;;;;;;;;MA2CnB;IAEI,GAAG;YAuQK,qBAAqB;CA+EtC"}
|