@docupace/pipeline 1.0.2-3.tes2 → 1.0.2-3.test
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 +1 -1
- package/src/next/deploy.js +6 -14
package/package.json
CHANGED
package/src/next/deploy.js
CHANGED
|
@@ -73,7 +73,7 @@ function getConfigPath(application, env, site, name) {
|
|
|
73
73
|
function getAppTypesFromRepo(env, site) {
|
|
74
74
|
const { repoPath } = getRepoLocalPath(env);
|
|
75
75
|
const deployConfigFilePath = path.join(repoPath, `dp/${site}`);
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
const applications = [];
|
|
78
78
|
if (fs.existsSync(deployConfigFilePath)) {
|
|
79
79
|
const files = fs.readdirSync(deployConfigFilePath);
|
|
@@ -367,20 +367,12 @@ export async function deployFromSite(
|
|
|
367
367
|
// Initialize a flag to track changes
|
|
368
368
|
let changesMade = false;
|
|
369
369
|
const applications = await getAppTypesFromRepo(fromEnv, fromSite);
|
|
370
|
-
console.log(applications);
|
|
371
370
|
// Iterate over applications in appInfo
|
|
372
|
-
let appInfoLocal =
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
// );
|
|
378
|
-
|
|
379
|
-
for (const application of applications) {
|
|
380
|
-
if (Object.prototype.hasOwnProperty.call(appInfo, application)) {
|
|
381
|
-
appInfoLocal[application] = appInfo[application];
|
|
382
|
-
}
|
|
383
|
-
}
|
|
371
|
+
let appInfoLocal = Object.fromEntries(
|
|
372
|
+
applications
|
|
373
|
+
.filter((application) => appInfo[application])
|
|
374
|
+
.map((application) => [application, appInfo[application]]),
|
|
375
|
+
);
|
|
384
376
|
|
|
385
377
|
if (Object.keys(appInfoLocal).length === 0) {
|
|
386
378
|
const { deployConfig: toDeployAppConfig } = await readDeployConfig(
|