apify-cli 1.0.0-beta.99 → 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 +50 -535
- 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 +116 -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 -16
- package/dist/commands/call.d.ts.map +0 -1
- package/dist/commands/call.js +0 -108
- 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 -13
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -257
- 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 -22
- package/dist/lib/apify_command.d.ts.map +0 -1
- package/dist/lib/apify_command.js +0 -103
- package/dist/lib/apify_command.js.map +0 -1
- package/dist/lib/commands/run-on-cloud.d.ts +0 -19
- package/dist/lib/commands/run-on-cloud.d.ts.map +0 -1
- package/dist/lib/commands/run-on-cloud.js +0 -90
- 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 -53
- package/dist/lib/consts.d.ts.map +0 -1
- package/dist/lib/consts.js +0 -64
- 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 -4
- 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 -26
- package/dist/lib/input_schema.d.ts.map +0 -1
- package/dist/lib/input_schema.js +0 -93
- 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 -105
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -575
- 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 -815
package/dist/commands/info.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
3
|
-
import { getLocalUserInfo, getLoggedClientOrThrow } from '../lib/utils.js';
|
|
4
|
-
export class InfoCommand extends ApifyCommand {
|
|
5
|
-
async run() {
|
|
6
|
-
await getLoggedClientOrThrow();
|
|
7
|
-
const info = await getLocalUserInfo();
|
|
8
|
-
if (info) {
|
|
9
|
-
const niceInfo = {
|
|
10
|
-
username: info.username,
|
|
11
|
-
userId: info.id,
|
|
12
|
-
};
|
|
13
|
-
for (const key of Object.keys(niceInfo)) {
|
|
14
|
-
console.log(`${chalk.gray(key)}: ${chalk.bold(niceInfo[key])}`);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(InfoCommand, "description", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true,
|
|
23
|
-
value: 'Displays information about the currently active Apify account.\n'
|
|
24
|
-
+ 'The information is printed to the console.'
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/commands/info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,MAAM,OAAO,WAAY,SAAQ,YAAgC;IAI7D,KAAK,CAAC,GAAG;QACL,MAAM,sBAAsB,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,MAAM,gBAAgB,EAAE,CAAC;QAEtC,IAAI,IAAI,EAAE,CAAC;YACP,MAAM,QAAQ,GAAG;gBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,MAAM,EAAE,IAAI,CAAC,EAAE;aACT,CAAC;YAEX,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAA8B,EAAE,CAAC;gBACnE,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;YACpE,CAAC;QACL,CAAC;IACL,CAAC;;AAjBe;;;;WAAc,kEAAkE;UAC9F,4CAA4C;GAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
2
|
-
export declare class WrapScrapyCommand extends ApifyCommand<typeof WrapScrapyCommand> {
|
|
3
|
-
static description: string;
|
|
4
|
-
static args: {
|
|
5
|
-
path: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>;
|
|
6
|
-
};
|
|
7
|
-
static hidden: boolean;
|
|
8
|
-
run(): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=init-wrap-scrapy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-wrap-scrapy.d.ts","sourceRoot":"","sources":["../../src/commands/init-wrap-scrapy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAIvD,qBAAa,iBAAkB,SAAQ,YAAY,CAAC,OAAO,iBAAiB,CAAC;IACzE,OAAgB,WAAW,SAO7B;IAEE,OAAgB,IAAI;;MAKlB;IAEF,OAAgB,MAAM,UAAQ;IAExB,GAAG;CAKZ"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Args } from '@oclif/core';
|
|
2
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
3
|
-
import { info } from '../lib/outputs.js';
|
|
4
|
-
import { wrapScrapyProject } from '../lib/projects/scrapy/wrapScrapyProject.js';
|
|
5
|
-
export class WrapScrapyCommand extends ApifyCommand {
|
|
6
|
-
async run() {
|
|
7
|
-
await wrapScrapyProject({ projectPath: this.args.path });
|
|
8
|
-
info({ message: 'Scrapy project wrapped successfully.' });
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(WrapScrapyCommand, "description", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
writable: true,
|
|
15
|
-
value: `Wraps your existing Scrapy project to work like an Apify Actor.
|
|
16
|
-
|
|
17
|
-
It adds the following features:
|
|
18
|
-
- Automatic retry of failed requests
|
|
19
|
-
- Automatic proxy rotation
|
|
20
|
-
- Automatic user agent rotation
|
|
21
|
-
...
|
|
22
|
-
`
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(WrapScrapyCommand, "args", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: {
|
|
29
|
-
path: Args.string({
|
|
30
|
-
required: false,
|
|
31
|
-
description: 'Optional path to your scrapy project. If not provided, the current directory is used.',
|
|
32
|
-
}),
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
Object.defineProperty(WrapScrapyCommand, "hidden", {
|
|
36
|
-
enumerable: true,
|
|
37
|
-
configurable: true,
|
|
38
|
-
writable: true,
|
|
39
|
-
value: true
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=init-wrap-scrapy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init-wrap-scrapy.js","sourceRoot":"","sources":["../../src/commands/init-wrap-scrapy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAEhF,MAAM,OAAO,iBAAkB,SAAQ,YAAsC;IAmBzE,KAAK,CAAC,GAAG;QACL,MAAM,iBAAiB,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAEzD,IAAI,CAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAtBe;;;;WAAc;;;;;;;CAOjC;GAAC;AAEkB;;;;WAAO;QACnB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;YACd,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,uFAAuF;SACvG,CAAC;KACL;GAAC;AAEc;;;;WAAS,IAAI;GAAC"}
|
package/dist/commands/init.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
2
|
-
export declare class InitCommand extends ApifyCommand<typeof InitCommand> {
|
|
3
|
-
static description: string;
|
|
4
|
-
static args: {
|
|
5
|
-
actorName: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>;
|
|
6
|
-
};
|
|
7
|
-
static flags: {
|
|
8
|
-
yes: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
9
|
-
};
|
|
10
|
-
run(): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAQvD,qBAAa,WAAY,SAAQ,YAAY,CAAC,OAAO,WAAW,CAAC;IAC7D,OAAgB,WAAW,SAI4E;IAEvG,OAAgB,IAAI;;MAKlB;IAEF,OAAgB,KAAK;;MAOnB;IAEI,GAAG;CA+CZ"}
|
package/dist/commands/init.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { basename } from 'node:path';
|
|
2
|
-
import process from 'node:process';
|
|
3
|
-
import { Args, Flags } from '@oclif/core';
|
|
4
|
-
import inquirer from 'inquirer';
|
|
5
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
6
|
-
import { DEFAULT_LOCAL_STORAGE_DIR, EMPTY_LOCAL_CONFIG, LANGUAGE, LOCAL_CONFIG_PATH, PROJECT_TYPES } from '../lib/consts.js';
|
|
7
|
-
import { createPrefilledInputFileFromInputSchema } from '../lib/input_schema.js';
|
|
8
|
-
import { error, info, success, warning } from '../lib/outputs.js';
|
|
9
|
-
import { ProjectAnalyzer } from '../lib/project_analyzer.js';
|
|
10
|
-
import { wrapScrapyProject } from '../lib/projects/scrapy/wrapScrapyProject.js';
|
|
11
|
-
import { detectLocalActorLanguage, getLocalConfig, getLocalConfigOrThrow, setLocalConfig, setLocalEnv, validateActorName } from '../lib/utils.js';
|
|
12
|
-
export class InitCommand extends ApifyCommand {
|
|
13
|
-
async run() {
|
|
14
|
-
let { actorName } = this.args;
|
|
15
|
-
const cwd = process.cwd();
|
|
16
|
-
if (ProjectAnalyzer.getProjectType(cwd) === PROJECT_TYPES.SCRAPY) {
|
|
17
|
-
info({ message: 'The current directory looks like a Scrapy project. Using automatic project wrapping.' });
|
|
18
|
-
this.telemetryData.actorWrapper = PROJECT_TYPES.SCRAPY;
|
|
19
|
-
return wrapScrapyProject({ projectPath: cwd });
|
|
20
|
-
}
|
|
21
|
-
if (!this.flags.yes && detectLocalActorLanguage(cwd).language === LANGUAGE.UNKNOWN) {
|
|
22
|
-
warning({ message: 'The current directory does not look like a Node.js or Python project.' });
|
|
23
|
-
const { c } = await inquirer.prompt([{ name: 'c', message: 'Do you want to continue?', type: 'confirm' }]);
|
|
24
|
-
if (!c)
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
if (getLocalConfig(cwd)) {
|
|
28
|
-
warning({ message: `Skipping creation of "${LOCAL_CONFIG_PATH}", the file already exists in the current directory.` });
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
if (!actorName) {
|
|
32
|
-
let response = null;
|
|
33
|
-
while (!response) {
|
|
34
|
-
try {
|
|
35
|
-
const answer = await inquirer.prompt([{ name: 'actName', message: 'Actor name:', default: basename(cwd) }]);
|
|
36
|
-
validateActorName(answer.actName);
|
|
37
|
-
response = answer;
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
error({ message: err.message });
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
({ actName: actorName } = response);
|
|
44
|
-
}
|
|
45
|
-
// Migrate apify.json to .actor/actor.json
|
|
46
|
-
const localConfig = { ...EMPTY_LOCAL_CONFIG, ...await getLocalConfigOrThrow(cwd) };
|
|
47
|
-
await setLocalConfig(Object.assign(localConfig, { name: actorName }), cwd);
|
|
48
|
-
}
|
|
49
|
-
await setLocalEnv(cwd);
|
|
50
|
-
// Create prefilled INPUT.json file from the input schema prefills
|
|
51
|
-
await createPrefilledInputFileFromInputSchema(cwd);
|
|
52
|
-
success({ message: 'The Actor has been initialized in the current directory.' });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
Object.defineProperty(InitCommand, "description", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true,
|
|
59
|
-
value: 'Initializes a new Actor project in an existing directory.\n'
|
|
60
|
-
+ `If the directory contains a Scrapy project in Python, the command automatically creates wrappers so that you can run your scrapers without changes.\n\n`
|
|
61
|
-
+ `The command creates the "${LOCAL_CONFIG_PATH}" file and the "${DEFAULT_LOCAL_STORAGE_DIR}" directory in the current directory, `
|
|
62
|
-
+ 'but does not touch any other existing files or directories.\n\n'
|
|
63
|
-
+ `WARNING: The directory at "${DEFAULT_LOCAL_STORAGE_DIR}" will be overwritten if it already exists.`
|
|
64
|
-
});
|
|
65
|
-
Object.defineProperty(InitCommand, "args", {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
configurable: true,
|
|
68
|
-
writable: true,
|
|
69
|
-
value: {
|
|
70
|
-
actorName: Args.string({
|
|
71
|
-
required: false,
|
|
72
|
-
description: 'Name of the Actor. If not provided, you will be prompted for it.',
|
|
73
|
-
}),
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
Object.defineProperty(InitCommand, "flags", {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
configurable: true,
|
|
79
|
-
writable: true,
|
|
80
|
-
value: {
|
|
81
|
-
yes: Flags.boolean({
|
|
82
|
-
char: 'y',
|
|
83
|
-
description: 'Automatic yes to prompts; assume "yes" as answer to all prompts. Note that in some cases, the command may still ask for confirmation.',
|
|
84
|
-
required: false,
|
|
85
|
-
}),
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
//# sourceMappingURL=init.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,k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AAC,EAAE,OAAO,EAAE,0DAA0D,EAAE,CAAC,CAAC;IACrF,CAAC;;AApEe;;;;WAAc,6DAA6D;UACzF,yJAAyJ;UACzJ,4BAA4B,iBAAiB,mBAAmB,yBAAyB,wCAAwC;UACjI,iEAAiE;UACjE,8BAA8B,yBAAyB,6CAA6C;GAAC;AAEvF;;;;WAAO;QACnB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC;YACnB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,kEAAkE;SAClF,CAAC;KACL;GAAC;AAEc;;;;WAAQ;QACpB,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC;YACf,IAAI,EAAE,GAAG;YACT,WAAW,EACP,uIAAuI;YAC3I,QAAQ,EAAE,KAAK;SAClB,CAAC;KACL;GAAC"}
|
package/dist/commands/login.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
2
|
-
export declare class LoginCommand extends ApifyCommand<typeof LoginCommand> {
|
|
3
|
-
static description: string;
|
|
4
|
-
static flags: {
|
|
5
|
-
token: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
6
|
-
method: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
7
|
-
};
|
|
8
|
-
run(): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=login.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AA0BvD,qBAAa,YAAa,SAAQ,YAAY,CAAC,OAAO,YAAY,CAAC;IAC/D,OAAgB,WAAW,SAEU;IAErC,OAAgB,KAAK;;;MAYnB;IAEI,GAAG;CA6HZ"}
|
package/dist/commands/login.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { cryptoRandomObjectId } from '@apify/utilities';
|
|
2
|
-
import { Flags } from '@oclif/core';
|
|
3
|
-
import computerName from 'computer-name';
|
|
4
|
-
import cors from 'cors';
|
|
5
|
-
import express from 'express';
|
|
6
|
-
import inquirer from 'inquirer';
|
|
7
|
-
import open from 'open';
|
|
8
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
9
|
-
import { error, info, success } from '../lib/outputs.js';
|
|
10
|
-
import { useApifyIdentity } from '../lib/telemetry.js';
|
|
11
|
-
import { getLocalUserInfo, getLoggedClient } from '../lib/utils.js';
|
|
12
|
-
const CONSOLE_BASE_URL = 'https://console.apify.com/account?tab=integrations';
|
|
13
|
-
// const CONSOLE_BASE_URL = 'http://localhost:3000/account?tab=integrations';
|
|
14
|
-
const CONSOLE_URL_ORIGIN = new URL(CONSOLE_BASE_URL).origin;
|
|
15
|
-
const API_BASE_URL = CONSOLE_BASE_URL.includes('localhost') ? 'http://localhost:3333' : undefined;
|
|
16
|
-
// Not really checked right now, but it might come useful if we ever need to do some breaking changes
|
|
17
|
-
const API_VERSION = 'v1';
|
|
18
|
-
const tryToLogin = async (token) => {
|
|
19
|
-
const isUserLogged = await getLoggedClient(token, API_BASE_URL);
|
|
20
|
-
const userInfo = await getLocalUserInfo();
|
|
21
|
-
if (isUserLogged) {
|
|
22
|
-
await useApifyIdentity(userInfo.id);
|
|
23
|
-
success({ message: `You are logged in to Apify as ${userInfo.username || userInfo.id}!` });
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
error({ message: 'Login to Apify failed, the provided API token is not valid.' });
|
|
27
|
-
}
|
|
28
|
-
return isUserLogged;
|
|
29
|
-
};
|
|
30
|
-
export class LoginCommand extends ApifyCommand {
|
|
31
|
-
async run() {
|
|
32
|
-
const { token, method } = this.flags;
|
|
33
|
-
if (token) {
|
|
34
|
-
await tryToLogin(token);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
let selectedMethod = method;
|
|
38
|
-
if (!method) {
|
|
39
|
-
const answer = await inquirer.prompt([{
|
|
40
|
-
type: 'list',
|
|
41
|
-
name: 'loginMethod',
|
|
42
|
-
message: 'Choose how you want to log in to Apify',
|
|
43
|
-
choices: [
|
|
44
|
-
{
|
|
45
|
-
value: 'console',
|
|
46
|
-
name: 'Through Apify Console in your default browser',
|
|
47
|
-
short: 'Through Apify Console',
|
|
48
|
-
},
|
|
49
|
-
{ value: 'manual', name: 'Enter API token manually', short: 'Manually' },
|
|
50
|
-
],
|
|
51
|
-
loop: true,
|
|
52
|
-
}]);
|
|
53
|
-
selectedMethod = answer.loginMethod;
|
|
54
|
-
}
|
|
55
|
-
if (selectedMethod === 'console') {
|
|
56
|
-
let server;
|
|
57
|
-
const app = express();
|
|
58
|
-
// To send requests from browser to localhost, CORS has to be configured properly
|
|
59
|
-
app.use(cors({
|
|
60
|
-
origin: CONSOLE_URL_ORIGIN,
|
|
61
|
-
allowedHeaders: ['Content-Type', 'Authorization'],
|
|
62
|
-
}));
|
|
63
|
-
// Turn off keepalive, otherwise closing the server when command is finished is lagging
|
|
64
|
-
app.use((_, res, next) => {
|
|
65
|
-
res.set('Connection', 'close');
|
|
66
|
-
next();
|
|
67
|
-
});
|
|
68
|
-
app.use(express.json());
|
|
69
|
-
// Basic authorization via a random token, which is passed to the Apify Console,
|
|
70
|
-
// and that sends it back via the `token` query param, or `Authorization` header
|
|
71
|
-
const authToken = cryptoRandomObjectId();
|
|
72
|
-
app.use((req, res, next) => {
|
|
73
|
-
let { token: serverToken } = req.query;
|
|
74
|
-
if (!serverToken) {
|
|
75
|
-
const authorizationHeader = req.get('Authorization');
|
|
76
|
-
if (authorizationHeader) {
|
|
77
|
-
const [schema, tokenFromHeader, ...extra] = authorizationHeader.trim().split(/\s+/);
|
|
78
|
-
if (schema.toLowerCase() === 'bearer' && tokenFromHeader && extra.length === 0) {
|
|
79
|
-
serverToken = tokenFromHeader;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (serverToken !== authToken) {
|
|
84
|
-
res.status(401);
|
|
85
|
-
res.send('Authorization failed');
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
next();
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
const apiRouter = express.Router();
|
|
92
|
-
app.use(`/api/${API_VERSION}`, apiRouter);
|
|
93
|
-
apiRouter.post('/login-token', async (req, res) => {
|
|
94
|
-
try {
|
|
95
|
-
if (req.body.apiToken) {
|
|
96
|
-
await tryToLogin(req.body.apiToken);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
throw new Error('Request did not contain API token');
|
|
100
|
-
}
|
|
101
|
-
res.end();
|
|
102
|
-
}
|
|
103
|
-
catch (err) {
|
|
104
|
-
const errorMessage = `Login to Apify failed with error: ${err.message}`;
|
|
105
|
-
error({ message: errorMessage });
|
|
106
|
-
res.status(500);
|
|
107
|
-
res.send(errorMessage);
|
|
108
|
-
}
|
|
109
|
-
server.close();
|
|
110
|
-
});
|
|
111
|
-
apiRouter.post('/exit', (req, res) => {
|
|
112
|
-
if (req.body.isWindowClosed) {
|
|
113
|
-
error({ message: 'Login to Apify failed, the console window was closed.' });
|
|
114
|
-
}
|
|
115
|
-
else if (req.body.actionCanceled) {
|
|
116
|
-
error({ message: 'Login to Apify failed, the action was canceled in the Apify Console.' });
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
error({ message: 'Login to Apify failed.' });
|
|
120
|
-
}
|
|
121
|
-
res.end();
|
|
122
|
-
server.close();
|
|
123
|
-
});
|
|
124
|
-
// Listening on port 0 will assign a random available port
|
|
125
|
-
server = app.listen(0);
|
|
126
|
-
const { port } = server.address();
|
|
127
|
-
const consoleUrl = new URL(CONSOLE_BASE_URL);
|
|
128
|
-
consoleUrl.searchParams.set('localCliCommand', 'login');
|
|
129
|
-
consoleUrl.searchParams.set('localCliPort', `${port}`);
|
|
130
|
-
consoleUrl.searchParams.set('localCliToken', authToken);
|
|
131
|
-
consoleUrl.searchParams.set('localCliApiVersion', API_VERSION);
|
|
132
|
-
try {
|
|
133
|
-
consoleUrl.searchParams.set('localCliComputerName', encodeURIComponent(computerName()));
|
|
134
|
-
}
|
|
135
|
-
catch {
|
|
136
|
-
// Ignore errors from fetching computer name as it's not critical
|
|
137
|
-
}
|
|
138
|
-
info({ message: `Opening Apify Console at "${consoleUrl.href}"...` });
|
|
139
|
-
await open(consoleUrl.href);
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
console.log('Enter your Apify API token. You can find it at https://console.apify.com/account#/integrations');
|
|
143
|
-
const tokenAnswer = await inquirer.prompt([{ name: 'token', message: 'token:', type: 'password' }]);
|
|
144
|
-
await tryToLogin(tokenAnswer.token);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
Object.defineProperty(LoginCommand, "description", {
|
|
149
|
-
enumerable: true,
|
|
150
|
-
configurable: true,
|
|
151
|
-
writable: true,
|
|
152
|
-
value: 'Logs in to your Apify account.\nThe API token and other account '
|
|
153
|
-
+ 'information is stored in the ~/.apify directory, from where it is read by all other "apify" commands. '
|
|
154
|
-
+ 'To log out, call "apify logout".'
|
|
155
|
-
});
|
|
156
|
-
Object.defineProperty(LoginCommand, "flags", {
|
|
157
|
-
enumerable: true,
|
|
158
|
-
configurable: true,
|
|
159
|
-
writable: true,
|
|
160
|
-
value: {
|
|
161
|
-
token: Flags.string({
|
|
162
|
-
char: 't',
|
|
163
|
-
description: '[Optional] Apify API token',
|
|
164
|
-
required: false,
|
|
165
|
-
}),
|
|
166
|
-
method: Flags.string({
|
|
167
|
-
char: 'm',
|
|
168
|
-
description: '[Optional] Method of logging in to Apify',
|
|
169
|
-
options: ['console', 'manual'],
|
|
170
|
-
required: false,
|
|
171
|
-
}),
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
//# sourceMappingURL=login.js.map
|
|
@@ -1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kEAAkE;UAC9F,wGAAwG;UACxG,kCAAkC;GAAC;AAErB;;;;WAAQ;QACpB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;YAChB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,0CAA0C;YACvD,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;YAC9B,QAAQ,EAAE,KAAK;SAClB,CAAC;KACL;GAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../src/commands/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAMvD,qBAAa,aAAc,SAAQ,YAAY,CAAC,OAAO,aAAa,CAAC;IACjE,OAAgB,WAAW,SACoE;IAEzF,GAAG;CAKZ"}
|
package/dist/commands/logout.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ApifyCommand } from '../lib/apify_command.js';
|
|
2
|
-
import { AUTH_FILE_PATH } from '../lib/consts.js';
|
|
3
|
-
import { rimrafPromised } from '../lib/files.js';
|
|
4
|
-
import { success } from '../lib/outputs.js';
|
|
5
|
-
import { regenerateLocalDistinctId } from '../lib/telemetry.js';
|
|
6
|
-
export class LogoutCommand extends ApifyCommand {
|
|
7
|
-
async run() {
|
|
8
|
-
await rimrafPromised(AUTH_FILE_PATH());
|
|
9
|
-
regenerateLocalDistinctId();
|
|
10
|
-
success({ message: 'You are logged out from your Apify account.' });
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(LogoutCommand, "description", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true,
|
|
17
|
-
value: 'Logs out of your Apify account.\nThe command deletes the API token and all other '
|
|
18
|
-
+ 'account information stored in the ~/.apify directory. To log in again, call "apify login".'
|
|
19
|
-
});
|
|
20
|
-
//# sourceMappingURL=logout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../src/commands/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,MAAM,OAAO,aAAc,SAAQ,YAAkC;IAIjE,KAAK,CAAC,GAAG;QACL,MAAM,cAAc,CAAC,cAAc,EAAE,CAAC,CAAC;QACvC,yBAAyB,EAAE,CAAC;QAC5B,OAAO,CAAC,EAAE,OAAO,EAAE,6CAA6C,EAAE,CAAC,CAAC;IACxE,CAAC;;AAPe;;;;WAAc,mFAAmF;UAC/G,4FAA4F;GAAC"}
|
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/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
6
|
-
};
|
|
7
|
-
static args: {
|
|
8
|
-
actorId: import("@oclif/core/lib/interfaces/parser.js").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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
|
-
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/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
6
|
-
version: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
7
|
-
'build-tag': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
8
|
-
'wait-for-finish': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
9
|
-
'no-prompt': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
10
|
-
force: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
11
|
-
};
|
|
12
|
-
static args: {
|
|
13
|
-
actorId: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>;
|
|
14
|
-
};
|
|
15
|
-
catch(caughtError: Error): Promise<void>;
|
|
16
|
-
run(): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=push.d.ts.map
|