Commit 9189c4e7 authored by anycodes's avatar anycodes
Browse files

fix dep

parent 4766e1da
Showing with 9 additions and 9 deletions
+9 -9
{
"name": "@serverless-devs/s",
"version": "2.0.33",
"version": "2.0.34",
"description": "Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",
"homepage": "https://www.serverless-devs.com",
"keywords": [
......@@ -50,7 +50,7 @@
"fs-extra": "^8.1.0",
"inquirer": "^7.3.3",
"inquirer-autocomplete-prompt": "^1.3.0",
"js-yaml": "^3.14.0",
"js-yaml": "^4.1.0",
"lodash": "^4.17.20",
"@types/lodash": "^4.14.168",
"@types/fs-extra": "^9.0.1",
......
......@@ -90,7 +90,7 @@ export default class CliManager {
}
}) || {};
let outResult = yaml.safeDump(JSON.parse(JSON.stringify(result)));
let outResult = yaml.dump(JSON.parse(JSON.stringify(result)));
logger.success(
Object.keys(result).length === 0
......
......@@ -77,7 +77,7 @@ export class CommandManager {
}
}
}
let outResult = yaml.safeDump(JSON.parse(JSON.stringify(outPutData)));
let outResult = yaml.dump(JSON.parse(JSON.stringify(outPutData)));
if (process.env['s-execute-file']) {
logger.error(`All projects were not deployed successfully.
......
......@@ -21,7 +21,7 @@ const getCredentialAliasList = () => {
}
try {
const result = yaml.safeLoad(fs.readFileSync(ACCESS_PATH, 'utf8'));
const result = yaml.load(fs.readFileSync(ACCESS_PATH, 'utf8'));
return Object.keys(result);
} catch (error) {
return [];
......
......@@ -36,7 +36,7 @@ export class Parse {
try {
const extname = path.extname(filePath);
if (extname.indexOf('.yaml') !== -1 || extname.indexOf('.yml') !== -1) {
fileObj = yaml.safeLoad(fs.readFileSync(filePath, 'utf8'));
fileObj = yaml.load(fs.readFileSync(filePath, 'utf8'));
}
if (extname.indexOf('.json') !== -1) {
fileObj = JSON.parse(fs.readFileSync(filePath).toString());
......
......@@ -7,7 +7,7 @@ import { handlerProfileFile } from './handler-set-config';
function checkTemplateFormat(filePath: string, json = false) {
const content = fs.readFileSync(filePath, 'utf8')
let fileObj = json ? JSON.parse(content) : yaml.safeLoad(content);
let fileObj = json ? JSON.parse(content) : yaml.load(content);
for (const eveKey in fileObj) {
if (fileObj[eveKey].Component && fileObj[eveKey].Provider && fileObj[eveKey].Properties) {
return true
......
......@@ -25,7 +25,7 @@ function getProfileFile(): Profile {
return {};
}
try {
const profileResult = yaml.safeLoad(fs.readFileSync(profileFilePath, 'utf8')) as Profile || {};
const profileResult = yaml.load(fs.readFileSync(profileFilePath, 'utf8')) as Profile || {};
return profileResult;
} catch (e) {
throw e;
......@@ -66,7 +66,7 @@ export async function handlerProfileFile(params: ProfileParams) {
}
} else {
try {
profile = yaml.safeLoad(fs.readFileSync(profPath, 'utf8')) as Profile || {};
profile = yaml.load(fs.readFileSync(profPath, 'utf8')) as Profile || {};
} catch (e) {
throw e;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment