UNPKG

kitten-cloud-function

Version:

用于编程猫源码云功能(云变量、云列表等)的客户端工具

29 lines (28 loc) 889 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.KittenCloudDataUpdateCommand = void 0; const other_1 = require("../../../../utils/other"); class KittenCloudDataUpdateCommand { constructor(source, data) { this.source = source; this.data = data; this.promise = new Promise((resolve, reject) => { this.resolve = resolve; this.reject = reject; }); } finish() { this.resolve(); } fail(error) { error.message = `${this.toString()}失败:${error.message}`; if (error.stack != other_1.None) { error.stack = `${this.toString()}失败:${error.stack}`; } this.reject(error); } toCloudString() { return JSON.stringify(this.toCloudJSON()); } } exports.KittenCloudDataUpdateCommand = KittenCloudDataUpdateCommand;