UNPKG

1.11 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.ScratchOrgCache = void 0;
4/*
5 * Copyright (c) 2020, salesforce.com, inc.
6 * All rights reserved.
7 * Licensed under the BSD 3-Clause license.
8 * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9 */
10const kit_1 = require("@salesforce/kit");
11const global_1 = require("../global");
12const ttlConfig_1 = require("../config/ttlConfig");
13class 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}
32exports.ScratchOrgCache = ScratchOrgCache;
33//# sourceMappingURL=scratchOrgCache.js.map
\No newline at end of file