-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathget-value.ts
More file actions
33 lines (25 loc) · 959 Bytes
/
get-value.ts
File metadata and controls
33 lines (25 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { outputRecordFromDefaultStore } from '../../lib/actor.js';
import { ApifyCommand } from '../../lib/command-framework/apify-command.js';
import { Args } from '../../lib/command-framework/args.js';
export class ActorGetValueCommand extends ApifyCommand<typeof ActorGetValueCommand> {
static override name = 'get-value' as const;
static override description = 'Gets a value from the default key-value store associated with the Actor run.';
static override group = 'Actor Runtime';
static override examples = [
{
description: 'Read the record stored under the key "INPUT".',
command: 'actor get-value INPUT',
},
];
static override docsUrl = 'https://docs.apify.com/cli/docs/reference#actor-get-value';
static override args = {
key: Args.string({
required: true,
description: 'Key of the record in the key-value store.',
}),
};
async run() {
const { key } = this.args;
await outputRecordFromDefaultStore(key);
}
}