UNPKG

@lcap/nasl

Version:

NetEase Application Specific Language

26 lines 861 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HasUuidCache = void 0; const types_1 = require("../types"); const storage_1 = require("../storage"); const storageKey = '__uuid_cache'; const { setter, getter } = (0, storage_1.getStorageController)(storageKey); exports.HasUuidCache = { name: 'has-uuid-cache', async afterSuccessDeploy({ app }) { await setter({ ...app._callLogicUuidToHeaderMap }); }, async beforeDeploy({ app }) { const cache = await getter(); // 有缓存则使用缓存 if (cache) { app._callLogicUuidToHeaderMap = cache; return types_1.RuleResult.Frontend; } // 无缓存,必须要发全端 else { return types_1.RuleResult.Backend; } }, }; //# sourceMappingURL=has-uuid-cache.js.map