camstreamerlib 1.8.7 → 1.8.8

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/CreatePackage.js +8 -3
  2. package/package.json +1 -1
package/CreatePackage.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const fs = require("fs");
4
- const Path = require("path");
5
3
  const AdmZip = require("adm-zip");
4
+ const Path = require("path");
5
+ const fs = require("fs");
6
6
  function isDirectory(path) {
7
7
  const stat = fs.statSync(path);
8
8
  return stat.isDirectory();
@@ -26,7 +26,8 @@ function createZipArchive(zip, folder, options) {
26
26
  if (file[0] === '.' ||
27
27
  zipFileRegex.test(file) ||
28
28
  (file === 'node_modules' && !options.includeNodeModules) ||
29
- (file === 'src' && options.typeScriptPackage)) {
29
+ (file === 'src' && options.typeScriptPackage) ||
30
+ options.excludedFileNames.includes(file)) {
30
31
  continue;
31
32
  }
32
33
  else if (file === 'dist' && options.typeScriptPackage) {
@@ -44,11 +45,15 @@ function main(args) {
44
45
  const options = {
45
46
  includeNodeModules: false,
46
47
  typeScriptPackage: false,
48
+ excludedFileNames: [],
47
49
  };
48
50
  for (let arg of args) {
49
51
  if (arg === '-i' || arg === '-includeNodeModules') {
50
52
  options.includeNodeModules = true;
51
53
  }
54
+ if (arg.startsWith('-e=') || arg.startsWith('-exclude=')) {
55
+ options.excludedFileNames = arg.substring(arg.indexOf('=') + 1).split(',');
56
+ }
52
57
  }
53
58
  if (fs.existsSync('dist')) {
54
59
  options.typeScriptPackage = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "1.8.7",
3
+ "version": "1.8.8",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "dependencies": {