@infomiho/buzz-cli 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.mjs +17 -1
  2. package/package.json +2 -1
package/dist/cli.mjs CHANGED
@@ -80,6 +80,17 @@ async function apiRequest(path, options = {}, { requireAuth = true } = {}) {
80
80
  if (response.status === 403) throw new ApiError((await response.json()).error || "Permission denied", 403);
81
81
  return response;
82
82
  }
83
+ const IGNORED_DIRS = [
84
+ ".git",
85
+ "node_modules",
86
+ ".vscode",
87
+ ".idea"
88
+ ];
89
+ const IGNORED_FILES = [
90
+ "**/.DS_Store",
91
+ "**/.env",
92
+ "**/.env.*"
93
+ ];
83
94
  async function createZipBuffer(directory, callbacks) {
84
95
  const archiver = await import("archiver");
85
96
  return new Promise((resolve, reject) => {
@@ -91,7 +102,12 @@ async function createZipBuffer(directory, callbacks) {
91
102
  archive.on("progress", (progress) => {
92
103
  callbacks?.onProgress?.(progress.entries.processed, progress.entries.total);
93
104
  });
94
- archive.directory(directory, false);
105
+ archive.glob("**/*", {
106
+ cwd: directory,
107
+ dot: true,
108
+ skip: IGNORED_DIRS,
109
+ ignore: IGNORED_FILES
110
+ });
95
111
  archive.finalize();
96
112
  });
97
113
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomiho/buzz-cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "CLI for deploying static sites to Buzz hosting",
5
5
  "type": "module",
6
6
  "bin": {
@@ -32,6 +32,7 @@
32
32
  "@types/archiver": "^7.0.0",
33
33
  "@types/cli-progress": "^3.11.6",
34
34
  "@types/node": "^22.0.0",
35
+ "jszip": "^3.10.1",
35
36
  "publint": "^0.3.16",
36
37
  "tsdown": "^0.20.0-beta.4",
37
38
  "typescript": "^5.7.0",