UNPKG

zcatalyst-cli

Version:

Command Line Tool for CATALYST

21 lines (20 loc) 858 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.fillFunctionsInitPayload = void 0; const path_1 = require("path"); const runtime_store_1 = __importDefault(require("../../runtime-store")); const fillFunctionsInitPayload = (source, name, stack, type) => { const existingFns = runtime_store_1.default.get('context.payload.functions.targets', []); existingFns.push({ source, name, stack, type }); runtime_store_1.default.set('context.payload.functions.targets', existingFns); runtime_store_1.default.set('context.payload.functions.source', (0, path_1.dirname)(source)); }; exports.fillFunctionsInitPayload = fillFunctionsInitPayload;