@payfit/nx-core 5.13.4-ephemeral-renovate-node-24x.2 → 5.13.4-ephemeral-fix-frontend-version-patching.1
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
|
-
export declare function updateNeedleInFilesWithVersions(
|
|
2
|
+
export declare function updateNeedleInFilesWithVersions(directory: string, tree: Tree, version: string): Promise<void>;
|
|
3
3
|
export declare function applyTreeChanges(tree: Tree, dryRun: boolean, workspaceRoot?: string): Promise<void>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateNeedleInFilesWithVersions = updateNeedleInFilesWithVersions;
|
|
4
4
|
exports.applyTreeChanges = applyTreeChanges;
|
|
5
|
+
const path = require("node:path");
|
|
5
6
|
const process = require("node:process");
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
8
|
const tree_1 = require("nx/src/generators/tree");
|
|
@@ -19,31 +20,14 @@ function assertVersionJsonIsValid(path, tree) {
|
|
|
19
20
|
throw new Error(`appVersion in version.json in ${path} is not set to '${VERSION_NEEDLE_PATTERN}', promotion will fail.`);
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
|
-
async function updateNeedleInFilesWithVersions(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (tree.isFile(fullPath)) {
|
|
31
|
-
if ((fullPath.endsWith('.json') || fullPath.endsWith('.html')) &&
|
|
32
|
-
fullPath !== dir.replace(/\/$/, '') + '/version.json') {
|
|
33
|
-
files.push(fullPath);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
files = files.concat(collectFiles(fullPath));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return files;
|
|
41
|
-
}
|
|
42
|
-
const allFiles = collectFiles(path);
|
|
43
|
-
const potentialFiles = allFiles.filter(file => {
|
|
44
|
-
const content = tree.read(file, 'utf-8');
|
|
45
|
-
return content && content.includes(VERSION_NEEDLE_PATTERN);
|
|
46
|
-
});
|
|
23
|
+
async function updateNeedleInFilesWithVersions(directory, tree, version) {
|
|
24
|
+
logger_1.consola.log('Directory path ' + directory);
|
|
25
|
+
assertVersionJsonIsValid(directory, tree);
|
|
26
|
+
//[]
|
|
27
|
+
const searchPattern = await (0, devkit_1.globAsync)(tree, [
|
|
28
|
+
path.join(directory + '/**/*.{json,html}'),
|
|
29
|
+
]);
|
|
30
|
+
const potentialFiles = searchPattern.filter(file => tree.read(file, 'utf-8').includes(VERSION_NEEDLE_PATTERN));
|
|
47
31
|
logger_1.consola.log(`✏️ Updating ${potentialFiles.length} files with version ${version}:
|
|
48
32
|
- ${potentialFiles.join('\n - ')}`);
|
|
49
33
|
potentialFiles.forEach(file => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-version.js","sourceRoot":"","sources":["../../../../src/utils/frontend/update-version.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"update-version.js","sourceRoot":"","sources":["../../../../src/utils/frontend/update-version.ts"],"names":[],"mappings":";;AA+BA,0EA8BC;AAED,4CAaC;AA5ED,kCAAiC;AACjC,wCAAuC;AAEvC,uCAAsD;AACtD,iDAA2E;AAE3E,6CAA0C;AAE1C,MAAM,sBAAsB,GAAG,qCAAqC,CAAA;AAEpE,SAAS,wBAAwB,CAAC,IAAY,EAAE,IAAU;IACxD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,wBAAwB,CAAC,CAAA;IAC3E,CAAC;IAED,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAC1B,IAAI,EACJ,GAAG,IAAI,eAAe,CACvB,CA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