1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "manifests": [
12 {
13 "name": "web/package.json",
14 "type": "package.json",
15 "content": "{\n \"name\": \"demo-web\",\n \"dependencies\": {\n \"express\": \"^4.18.2\",\n \"request\": \"^2.88.2\",\n \"left-pad\": \"^1.3.0\"\n }\n}\n"
16 },
17 {
18 "name": "api/requirements.txt",
19 "type": "requirements.txt",
20 "content": "requests==2.31.0\ndjango>=4.2\n"
21 },
22 {
23 "name": "gateway/go.mod",
24 "type": "go.mod",
25 "content": "module example.com/demo\n\ngo 1.21\n\nrequire (\n\tgithub.com/gorilla/mux v1.8.1\n\tgithub.com/sirupsen/logrus v1.9.3\n)\n"
26 },
27 {
28 "name": "worker/Cargo.toml",
29 "type": "Cargo.toml",
30 "content": "[package]\nname = \"demo-worker\"\nversion = \"0.1.0\"\n\n[dependencies]\nserde = \"1.0\"\nrand = \"0.8\"\n"
31 }
32 ],
33 "licensePolicy": [
34 "GPL-3.0-only",
35 "AGPL-3.0-only"
36 ],
37 "abandonmentDays": 730,
38 "includeTransitive": false,
39 "failOnDeprecated": true,
40 "failOnAbandoned": false,
41 "failOnUnknownLicense": false,
42 "baselineKey": ""
43};
44
45
46const run = await client.actor("kingii98/polyglot-manifest-license-and-end-of-life-gate").call(input);
47
48
49console.log('Results from dataset');
50console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
51const { items } = await client.dataset(run.defaultDatasetId).listItems();
52items.forEach((item) => {
53 console.dir(item);
54});
55
56