micro-service-maker 1.0.6 → 1.0.7

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/app.js +3 -3
  2. package/package.json +1 -1
package/dist/app.js CHANGED
@@ -127,8 +127,8 @@ const createDockerFileForService = (pipelinePath, servicePath, newPort) => {
127
127
  const replacedWithDocker = dockerFileData.replace(/EXPOSE\s*\d+/, `EXPOSE ${newPort}`);
128
128
  fs_1.default.writeFileSync(newDockerFilePath, replacedWithDocker);
129
129
  };
130
- const ceratePackageDotJsonFileForService = (pipeLinePath, servicePath, serviceName) => {
131
- const sourcePath = 'package.json';
130
+ const ceratePackageDotJsonFileForService = (pipeLinePath, servicePath, serviceName, rootPath) => {
131
+ const sourcePath = path_1.default.join(rootPath, 'package.json');
132
132
  const destinationPath = path_1.default.join(servicePath, 'package.json');
133
133
  let packageJsonRaw = fs_1.default.readFileSync(sourcePath, "utf-8");
134
134
  const packageJson = JSON.parse(packageJsonRaw);
@@ -223,7 +223,7 @@ const app = async () => {
223
223
  updateLastPort(pipeLinePath);
224
224
  createEnvForNewService(pipeLinePath, servicePath);
225
225
  //crete Packages.json file
226
- ceratePackageDotJsonFileForService(pipeLinePath, servicePath, serviceName);
226
+ ceratePackageDotJsonFileForService(pipeLinePath, servicePath, serviceName, rootPath);
227
227
  // update port and crete new docker file
228
228
  const newPort = getNewPort(pipeLinePath);
229
229
  createDockerFileForService(pipeLinePath, servicePath, newPort);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "micro-service-maker",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "main": "dist/app.js",
5
5
  "types": "dist/app.d.ts",
6
6
  "bin": {