This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
exports.main_handler = async (event, context, callback) => { | |
const axios = require("axios"); | |
const url = | |
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=f0dae1fb-43d9-4047-a9e5-78989503e238"; | |
await axios.post(url, { | |
msgtype: "text", | |
text: { | |
content: "又一天过去了,今天我做了什么,收获了什么,记得写周报总结一下吧", | |
mentioned_list: ["@all"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ts from 'typescript'; | |
const filename = ts.findConfigFile(process.cwd(), ts.sys.fileExists, 'tsconfig.json'); | |
if (!filename) throw Error('tsconfig.json not found'); | |
const { config } = ts.readConfigFile(filename, ts.sys.readFile); | |
const { options, fileNames } = ts.parseJsonConfigFileContent(config, ts.sys, process.cwd()); | |
const program = ts.createProgram({ | |
options, | |
rootNames: fileNames, |