@payfit/nx-core 4.22.3-ephemeral-c489308.0 → 4.23.0
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/nx-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"get-port": "^7.1.0",
|
|
17
17
|
"ky": "^1.8.1",
|
|
18
18
|
"semver": "7.7.2",
|
|
19
|
-
"tinyexec": "0.
|
|
19
|
+
"tinyexec": "1.0.1",
|
|
20
20
|
"tslib": "^2.8.1",
|
|
21
21
|
"yaml": "2.8.0",
|
|
22
22
|
"zod": "^3.24.3"
|
|
@@ -6,7 +6,6 @@ orbs:
|
|
|
6
6
|
node: circleci/node@7.1
|
|
7
7
|
<% if (keepContinuationJobs) { %>
|
|
8
8
|
continuation: circleci/continuation@1.0.0
|
|
9
|
-
payfit-nx: payfit/nx@2
|
|
10
9
|
<% } %>
|
|
11
10
|
|
|
12
11
|
references:
|
|
@@ -26,30 +25,6 @@ references:
|
|
|
26
25
|
error-on-no-successful-workflow: false
|
|
27
26
|
main-branch-name: main
|
|
28
27
|
workflow-name: build-test-release
|
|
29
|
-
<% if (keepContinuationJobs) { %>
|
|
30
|
-
only_main_and_deploy_branches: &only_main_and_deploy_branches
|
|
31
|
-
branches:
|
|
32
|
-
only:
|
|
33
|
-
- main
|
|
34
|
-
- /^deploy.*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
parameters:
|
|
38
|
-
affected-list:
|
|
39
|
-
description: Path to the file where the affected list of apps is generated
|
|
40
|
-
type: string
|
|
41
|
-
default: affected-list.txt
|
|
42
|
-
shared-config:
|
|
43
|
-
description: |
|
|
44
|
-
Path to the config providing shared resources
|
|
45
|
-
(such as prerequisite jobs and common commands)
|
|
46
|
-
type: string
|
|
47
|
-
default: .circleci/shared-config.yml
|
|
48
|
-
continue-config:
|
|
49
|
-
description: Path to the internally-used config for continuation
|
|
50
|
-
type: string
|
|
51
|
-
default: .circleci/continue-config.yml
|
|
52
|
-
<% } %>
|
|
53
28
|
|
|
54
29
|
jobs:
|
|
55
30
|
install_packages:
|
|
@@ -261,26 +236,6 @@ workflows:
|
|
|
261
236
|
<% } %>
|
|
262
237
|
|
|
263
238
|
<% if (keepContinuationJobs) { %>
|
|
264
|
-
- payfit-nx/affected-apps:
|
|
265
|
-
name: affected-apps
|
|
266
|
-
output-file: << pipeline.parameters.affected-list >>
|
|
267
|
-
main-branch-name: main
|
|
268
|
-
allow-on-hold-workflow: true
|
|
269
|
-
nx-ci-execution-id: $CIRCLE_WORKFLOW_ID
|
|
270
|
-
context: GLOBAL_ORG
|
|
271
|
-
requires:
|
|
272
|
-
- install_packages
|
|
273
|
-
filters: *only_main_and_deploy_branches
|
|
274
|
-
|
|
275
|
-
- payfit-nx/merge-circle-config:
|
|
276
|
-
name: merge-configs
|
|
277
|
-
shared-config-file: << pipeline.parameters.shared-config >>
|
|
278
|
-
affected-list-file: << pipeline.parameters.affected-list >>
|
|
279
|
-
config-output: << pipeline.parameters.continue-config >>
|
|
280
|
-
requires:
|
|
281
|
-
- affected-apps
|
|
282
|
-
filters: *only_main_and_deploy_branches
|
|
283
|
-
|
|
284
239
|
- continuation:
|
|
285
240
|
requires:
|
|
286
241
|
- build
|
|
@@ -4,7 +4,6 @@ exports.initGenerator = initGenerator;
|
|
|
4
4
|
const fs = require("fs");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const logger_1 = require("../../utils/logger");
|
|
8
7
|
function injectNxReleaseConfiguration(tree) {
|
|
9
8
|
(0, devkit_1.updateJson)(tree, 'nx.json', nxJson => {
|
|
10
9
|
nxJson.release = {
|
|
@@ -63,27 +62,24 @@ async function initGenerator(tree, options = {}) {
|
|
|
63
62
|
const projectRoot = projectConfig.root;
|
|
64
63
|
const templateYamlPath = path.join(projectRoot, 'template.yaml');
|
|
65
64
|
const cdkJsonPath = path.join(projectRoot, 'cdk.json');
|
|
66
|
-
// Check if either file exists
|
|
65
|
+
// Check if either file exists
|
|
67
66
|
if (fs.existsSync(templateYamlPath) || fs.existsSync(cdkJsonPath)) {
|
|
68
67
|
hasCdkOrTemplateFile = true;
|
|
69
|
-
|
|
68
|
+
break; // We found at least one project with the required files, no need to check further
|
|
70
69
|
}
|
|
71
|
-
|
|
70
|
+
}
|
|
71
|
+
// If no project has template.yaml or cdk.json files, delete all project-specific CircleCI config files
|
|
72
|
+
if (!hasCdkOrTemplateFile) {
|
|
73
|
+
// We don't delete the shared-config.yml file anymore as it should already exist in the project
|
|
74
|
+
// Delete all project-specific CircleCI config files
|
|
75
|
+
for (const [projectName, projectConfig] of projects.entries()) {
|
|
76
|
+
const projectRoot = projectConfig.root;
|
|
72
77
|
const projectCircleCIPath = path.join(projectRoot, '.circleci/config.yml');
|
|
73
78
|
if (tree.exists(projectCircleCIPath)) {
|
|
74
79
|
tree.delete(projectCircleCIPath);
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
}
|
|
78
|
-
// If there is no project with a template.yaml or cdk.json file,
|
|
79
|
-
// we can delete the .circleci/shared-config.yml file
|
|
80
|
-
if (!hasCdkOrTemplateFile) {
|
|
81
|
-
logger_1.consola.info('No project with a template.yaml or cdk.json file found, deleting .circleci/shared-config.yml');
|
|
82
|
-
const sharedConfigPath = path.join(workspaceRoot, '.circleci/shared-config.yml');
|
|
83
|
-
if (tree.exists(sharedConfigPath)) {
|
|
84
|
-
tree.delete(sharedConfigPath);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
83
|
// Delete the .circleci/config.yml file if it exists
|
|
88
84
|
tree.delete(path.join(workspaceRoot, '.circleci/config.yml'));
|
|
89
85
|
// Generate the .circleci/config.yml file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/nx-core/src/generators/init/init.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/nx-core/src/generators/init/init.ts"],"names":[],"mappings":";;AA8DA,sCAqDC;AAnHD,yBAAwB;AACxB,6BAA4B;AAE5B,uCAMmB;AAInB,SAAS,4BAA4B,CAAC,IAAU;IAC9C,IAAA,mBAAU,EAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE;QACnC,MAAM,CAAC,OAAO,GAAG;YACf,oBAAoB,EAAE,aAAa;YACnC,QAAQ,EAAE,CAAC,GAAG,CAAC;YACf,iBAAiB,EAAE,yBAAyB;YAC5C,SAAS,EAAE;gBACT,iBAAiB,EAAE;oBACjB,aAAa,EAAE,QAAQ;oBACvB,IAAI,EAAE,KAAK;iBACZ;gBACD,gBAAgB,EAAE,IAAI;aACvB;YACD,OAAO,EAAE;gBACP,mBAAmB,EAAE,KAAK;gBAC1B,sBAAsB,EAAE,SAAS;gBACjC,8BAA8B,EAAE,MAAM;gBACtC,eAAe,EAAE,sBAAsB;gBACvC,qBAAqB,EAAE,CAAC,oCAAoC,CAAC;gBAC7D,gCAAgC,EAAE,KAAK;aACxC;YACD,GAAG,EAAE;gBACH,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,IAAI;aACV;SACF,CAAA;QACD,+CAA+C;QAC/C,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;QAErC,yDAAyD;QACzD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC;YAChD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;QACxC,CAAC;QAED,+CAA+C;QAC/C,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc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