@salesforce/core
Version:
Core libraries to interact with SFDX projects, orgs, and APIs.
35 lines • 1.22 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScratchOrgCache = void 0;
/*
* Copyright (c) 2020, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
const kit_1 = require("@salesforce/kit");
const global_1 = require("../global");
const ttlConfig_1 = require("../config/ttlConfig");
class ScratchOrgCache extends ttlConfig_1.TTLConfig {
static encryptedKeys = ['clientSecret'];
static getFileName() {
return 'scratch-create-cache.json';
}
static getDefaultOptions() {
return {
isGlobal: true,
isState: true,
filename: ScratchOrgCache.getFileName(),
stateFolder: global_1.Global.SF_STATE_FOLDER,
encryptedKeys: ScratchOrgCache.encryptedKeys,
ttl: kit_1.Duration.days(1),
};
}
static async unset(key) {
const cache = await ScratchOrgCache.create();
cache.unset(key);
await cache.write();
}
}
exports.ScratchOrgCache = ScratchOrgCache;
//# sourceMappingURL=scratchOrgCache.js.map
;