Skip to content

Commit fc2acd4

Browse files
author
TomArt
committed
refactoring pushStuccoJson.ts
1 parent b490608 commit fc2acd4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/cli/src/commands/cloud/pushStuccoJson.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,19 @@ import { Editor } from '@/Editor.js';
44
import { CLOUD_FOLDERS } from '@/gshared/constants/index.js';
55
import path from 'path';
66
import fs from 'fs';
7-
import mime from 'mime';
87

98
export const pushStuccoJson = async ({ namespace, project }: { namespace?: string; project?: string }) => {
109
const resolve = await Config.configure({ namespace, project }, ['namespace', 'project']);
1110
const p = await Editor.fetchProject({ accountName: resolve.namespace, projectName: resolve.project });
12-
// const stuccoFile = fs.readFileSync('stucco.json').toString('utf-8');
13-
const stuccoFile = 'stucco.json';
1411
if (!p.team?.id) {
1512
throw new Error('No team for this project. Invalid project');
1613
}
1714
logger('Pushing the stucco file to cloud', 'info');
1815
await Editor.saveFilesToCloud(
1916
p.id,
2017
[{
21-
name: path.join(CLOUD_FOLDERS.microserviceJs, stuccoFile),
22-
content: fs.readFileSync(stuccoFile),
18+
name: path.join(CLOUD_FOLDERS.microserviceJs, 'stucco.json'),
19+
content: fs.readFileSync('stucco.json'),
2320
type: 'text/plain',
2421
}]
2522
);

0 commit comments

Comments
 (0)