cdm-kafkaconnector 1.1.2 → 1.1.3

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,11 +1,11 @@
1
1
  {
2
2
  "name": "cdm-kafkaconnector",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
- "pack": "tsc && node packAndSend.js"
8
+ "pack": "tsc"
9
9
  },
10
10
  "author": "Chaim-Dovid-M",
11
11
  "license": "ISC",
package/tsconfig.json CHANGED
@@ -55,7 +55,7 @@
55
55
  // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
56
56
  // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
57
57
  // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
58
- "outDir": "./dist", /* Specify an output folder for all emitted files. */
58
+ // "outDir": "./dist", /* Specify an output folder for all emitted files. */
59
59
  // "removeComments": true, /* Disable emitting comments. */
60
60
  // "noEmit": true, /* Disable emitting files from a compilation. */
61
61
  // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
Binary file
package/packAndSend.js DELETED
@@ -1,53 +0,0 @@
1
- const { execSync } = require('child_process');
2
- const fs = require('fs');
3
- const path = require('path');
4
-
5
- // Run TypeScript compilation and npm pack
6
- execSync('tsc && npm pack', { stdio: 'inherit' });
7
-
8
- // Get the generated .tgz file name and the new version from package.json
9
- const packageJson = require('./package.json');
10
- const packageName = `${packageJson.name}-${packageJson.version}.tgz`;
11
- const newVersion = packageJson.version;
12
- const servicesDir = '../../services/';
13
-
14
- // Define target directories (root directories for each service)
15
- const targetDirs = [
16
- 'itemService',
17
- 'userService',
18
- 'scannerManagerService',
19
- 'scannerService',
20
- 'clientUpdater'
21
- ];
22
-
23
- // Copy the .tgz file, update package.json, and run npm install for each directory
24
- targetDirs.forEach(dir => {
25
- const packagePath = path.join(servicesDir, dir, 'packages', packageName);
26
-
27
- // Copy the .tgz file to the 'packages' folder within each service
28
- const packagesDir = path.join(servicesDir, dir, 'packages');
29
- if (!fs.existsSync(packagesDir)) {
30
- fs.mkdirSync(packagesDir, { recursive: true });
31
- }
32
- fs.copyFileSync(packageName, packagePath);
33
- console.log(`Copied to ${packagePath}`);
34
-
35
- // Update the package.json version in the root of the service
36
- const packageJsonPath = path.join(servicesDir, dir, 'package.json');
37
- const targetPackageJson = require(packageJsonPath);
38
-
39
- if (targetPackageJson.dependencies && targetPackageJson.dependencies[packageJson.name]) {
40
- targetPackageJson.dependencies[packageJson.name] = `file:packages/${packageName}`;
41
-
42
- // Write the updated package.json back to the file system
43
- fs.writeFileSync(packageJsonPath, JSON.stringify(targetPackageJson, null, 2));
44
- console.log(`Updated version in ${packageJsonPath} to ^${newVersion}`);
45
-
46
- // Run npm install in the service root directory
47
- execSync('npm install', { stdio: 'inherit', cwd: path.join(servicesDir, dir) });
48
- console.log(`Ran npm install in ${dir}`);
49
- } else {
50
- console.log(`Package ${packageJson.name} not found in dependencies for ${dir}`);
51
- }
52
- });
53
-
File without changes