myskillshub 1.0.3 → 1.0.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myskillshub",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "CLI tool for SkillHub skill management",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -118,7 +118,8 @@ function parseSkillMd(content) {
118
118
 
119
119
  function createZipPackage(directory) {
120
120
  return new Promise((resolve, reject) => {
121
- const zipPath = path.join(process.cwd(), `${path.basename(directory)}-package.zip`);
121
+ const baseName = path.basename(path.resolve(directory));
122
+ const zipPath = path.join(process.cwd(), `${baseName}-package-${Date.now()}.zip`);
122
123
  const output = createWriteStream(zipPath);
123
124
  const archive = archiver('zip', {
124
125
  zlib: { level: 9 }
@@ -131,14 +132,21 @@ function createZipPackage(directory) {
131
132
  output.on('error', (err) => {
132
133
  reject(err);
133
134
  });
135
+ archive.on('error', (err) => {
136
+ reject(err);
137
+ });
134
138
 
135
139
  archive.pipe(output);
136
140
 
137
- // Add all files except node_modules and .git
138
- archive.directory(directory, false, (data) => {
139
- return data.stats.isDirectory() &&
140
- !data.name.includes('node_modules') &&
141
- !data.name.includes('.git');
141
+ // Add all files recursively, excluding typical VCS/dependency artifacts.
142
+ archive.glob('**/*', {
143
+ cwd: directory,
144
+ dot: true,
145
+ ignore: [
146
+ '**/node_modules/**',
147
+ '**/.git/**',
148
+ '**/.DS_Store'
149
+ ]
142
150
  });
143
151
 
144
152
  archive.finalize();