@payfit/nx-core 4.60.2 → 4.60.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.
|
@@ -10,13 +10,20 @@ const execAsync = promisify(exec)
|
|
|
10
10
|
// Configuration
|
|
11
11
|
const NX_CORE_VERSION = '4.60.1'
|
|
12
12
|
const REPOSITORIES = [
|
|
13
|
+
'authorization',
|
|
14
|
+
'company-lifecycle',
|
|
13
15
|
'core-platform',
|
|
16
|
+
'declaration',
|
|
14
17
|
'documents',
|
|
15
|
-
'
|
|
16
|
-
'
|
|
18
|
+
'edp-showcase',
|
|
19
|
+
'employee-management',
|
|
17
20
|
'holding-management',
|
|
18
|
-
'
|
|
19
|
-
'
|
|
21
|
+
'hr-apps',
|
|
22
|
+
'jetlang',
|
|
23
|
+
'organization-structure',
|
|
24
|
+
'payfit-domains',
|
|
25
|
+
'talent-management',
|
|
26
|
+
'time-absences',
|
|
20
27
|
]
|
|
21
28
|
const WORK_DIR = '/tmp/nx-core-updater'
|
|
22
29
|
|
|
@@ -7,26 +7,20 @@ const logger_1 = require("../common/logger");
|
|
|
7
7
|
async function pushToS3(path, bucketFolder, s3FilesWithoutCache, s3FoldersWithoutCache, cacheControl) {
|
|
8
8
|
// copy files and folders except those with cache age to 0
|
|
9
9
|
const excludeArgs = buildExcludeArgs(s3FilesWithoutCache, s3FoldersWithoutCache);
|
|
10
|
-
const command = `aws s3 cp
|
|
11
|
-
--cache-control '${cacheControl}' \
|
|
12
|
-
--recursive \
|
|
13
|
-
${excludeArgs} \
|
|
14
|
-
"${path}" \
|
|
15
|
-
"${bucketFolder}"`;
|
|
10
|
+
const command = `aws s3 cp --cache-control '${cacheControl}' --recursive ${excludeArgs} "${path}" "${bucketFolder}"`;
|
|
16
11
|
logger_1.consola.log(`🖨️ Copying files from ${path} to ${bucketFolder} with cache control: ${cacheControl}`);
|
|
17
12
|
await (0, exec_1.exec)(command, { throwOnError: true });
|
|
18
13
|
// copy files and folders with cache age to 0
|
|
19
|
-
const itemsWithoutCache = [
|
|
20
|
-
|
|
14
|
+
const itemsWithoutCache = [
|
|
15
|
+
...s3FilesWithoutCache.map(item => [false, item]),
|
|
16
|
+
...s3FoldersWithoutCache.map(item => [true, item]),
|
|
17
|
+
];
|
|
18
|
+
for (const [isFolder, item] of itemsWithoutCache) {
|
|
21
19
|
logger_1.consola.log(`🖨️ Copying ${item} with no-cache headers`);
|
|
22
20
|
const sourcePath = `${path}/${item}`;
|
|
23
21
|
const targetPath = `${bucketFolder}/${item}`;
|
|
24
22
|
if (fs.existsSync(sourcePath)) {
|
|
25
|
-
const command = `aws s3 cp
|
|
26
|
-
--recursive \
|
|
27
|
-
--cache-control 'no-cache, max-age=0' \
|
|
28
|
-
"${sourcePath}" \
|
|
29
|
-
"${targetPath}"`;
|
|
23
|
+
const command = `aws s3 cp ${isFolder ? '--recursive' : ''} --cache-control 'no-cache, max-age=0' "${sourcePath}" "${targetPath}"`;
|
|
30
24
|
const result = await (0, exec_1.exec)(command, { throwOnError: false });
|
|
31
25
|
if (result.exitCode !== 0) {
|
|
32
26
|
logger_1.consola.warn(`❌ Failed to copy ${item}, but continuing... Error: ${result.stderr}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"s3.js","sourceRoot":"","sources":["../../../../src/utils/frontend/s3.ts"],"names":[],"mappings":";;AAKA,
|
|
1
|
+
{"version":3,"file":"s3.js","sourceRoot":"","sources":["../../../../src/utils/frontend/s3.ts"],"names":[],"mappings":";;AAKA,4BA6CC;AAlDD,8BAA6B;AAE7B,yCAAqC;AACrC,6CAA0C;AAEnC,KAAK,UAAU,QAAQ,CAC5B,IAAY,EACZ,YAAoB,EACpB,mBAA6B,EAC7B,qBAA+B,EAC/B,YAAoB;IAEpB,0DAA0D;IAC1D,MAAM,WAAW,GAAG,gBAAgB,CAClC,mBAAmB,EACnB,qBAAqB,CACtB,CAAA;IACD,MAAM,OAAO,GAAG,8BAA8B,YAAY,iBAAiB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