2 Commits

Author SHA1 Message Date
Space-Banane dddb352457 Added some more unpushable files (for now) 2026-04-01 17:28:42 +02:00
Space-Banane 3fe3dc96da fix: update version number to 2.2.5 in package.json and enhance file reading logic in push command 2026-04-01 17:24:42 +02:00
2 changed files with 25 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "shsf-cli",
"version": "2.2.4",
"version": "2.2.6",
"description": "",
"type": "module",
"files": [
+23 -4
View File
@@ -25,7 +25,18 @@ const unpushableFiles = [
".exe",
".dll",
".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(
@@ -79,9 +90,17 @@ export const pushDefinition = {
);
const currentFiles = currentFilesResponse.data.data; // Expecting { name: string, id: string [...] }[]
const files = fs.readdirSync(options.from).map((file) => ({
filename: file,
content: fs.readFileSync(path.join(options.from, file), "utf-8"),
// Read local files and filter to only include files (exclude directories)
const files = fs
.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) {