Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dddb352457 | |||
| 3fe3dc96da |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "shsf-cli",
|
"name": "shsf-cli",
|
||||||
"version": "2.2.4",
|
"version": "2.2.6",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@@ -25,7 +25,18 @@ const unpushableFiles = [
|
|||||||
".exe",
|
".exe",
|
||||||
".dll",
|
".dll",
|
||||||
".so",
|
".so",
|
||||||
".dylib"
|
".dylib",
|
||||||
|
"docker-compose.yml",
|
||||||
|
"docker-compose.yaml",
|
||||||
|
"compose.yaml",
|
||||||
|
"compose.yml",
|
||||||
|
"dockerfile",
|
||||||
|
"dockerfile.dev",
|
||||||
|
"dockerfile.prod",
|
||||||
|
".gitignore",
|
||||||
|
".env",
|
||||||
|
".gitkeep",
|
||||||
|
".md"
|
||||||
];
|
];
|
||||||
|
|
||||||
async function deleteNonexistentFiles(
|
async function deleteNonexistentFiles(
|
||||||
@@ -79,10 +90,18 @@ export const pushDefinition = {
|
|||||||
);
|
);
|
||||||
const currentFiles = currentFilesResponse.data.data; // Expecting { name: string, id: string [...] }[]
|
const currentFiles = currentFilesResponse.data.data; // Expecting { name: string, id: string [...] }[]
|
||||||
|
|
||||||
const files = fs.readdirSync(options.from).map((file) => ({
|
// Read local files and filter to only include files (exclude directories)
|
||||||
filename: file,
|
const files = fs
|
||||||
content: fs.readFileSync(path.join(options.from, file), "utf-8"),
|
.readdirSync(options.from)
|
||||||
}));
|
.map((file) => {
|
||||||
|
const filePath = path.join(options.from, file);
|
||||||
|
return { filename: file, filePath };
|
||||||
|
})
|
||||||
|
.filter(({ filePath }) => fs.statSync(filePath).isFile())
|
||||||
|
.map(({ filename, filePath }) => ({
|
||||||
|
filename,
|
||||||
|
content: fs.readFileSync(filePath, "utf-8"),
|
||||||
|
}));
|
||||||
|
|
||||||
if (!options.force && files.length > 5) {
|
if (!options.force && files.length > 5) {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
Reference in New Issue
Block a user