1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.ScratchOrgCache = void 0;
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | const kit_1 = require("@salesforce/kit");
|
11 | const global_1 = require("../global");
|
12 | const ttlConfig_1 = require("../config/ttlConfig");
|
13 | class ScratchOrgCache extends ttlConfig_1.TTLConfig {
|
14 | static getFileName() {
|
15 | return 'scratch-create-cache.json';
|
16 | }
|
17 | static getDefaultOptions() {
|
18 | return {
|
19 | isGlobal: true,
|
20 | isState: true,
|
21 | filename: ScratchOrgCache.getFileName(),
|
22 | stateFolder: global_1.Global.SF_STATE_FOLDER,
|
23 | ttl: kit_1.Duration.days(1),
|
24 | };
|
25 | }
|
26 | static async unset(key) {
|
27 | const cache = await ScratchOrgCache.create();
|
28 | cache.unset(key);
|
29 | await cache.write();
|
30 | }
|
31 | }
|
32 | exports.ScratchOrgCache = ScratchOrgCache;
|
33 |
|
\ | No newline at end of file |