micro-service-maker 1.0.5 → 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 +4 -4
  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);
@@ -193,7 +193,7 @@ const app = async () => {
193
193
  const currentDir = process.cwd();
194
194
  const pipeLinePath = path_1.default.resolve(appPath, "../");
195
195
  const gatewayPath = path_1.default.join(currentDir, "gateway");
196
- const rootPath = currentDir; //path.resolve(appPath, "../../")
196
+ const rootPath = path_1.default.resolve(appPath, "../"); //path.resolve(appPath, "../../")
197
197
  const servicePath = path_1.default.join(rootPath, serviceName);
198
198
  const srcPath = path_1.default.join(servicePath, "src");
199
199
  const appFilePath = path_1.default.join(srcPath, "app.ts");
@@ -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.5",
3
+ "version": "1.0.7",
4
4
  "main": "dist/app.js",
5
5
  "types": "dist/app.d.ts",
6
6
  "bin": {