@unisphere/nx 1.22.8 → 1.22.9
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/dist/migrations/1-22-4/summary.d.ts.map +1 -1
- package/dist/migrations/1-22-4/summary.js +3 -0
- package/dist/migrations/1-22-9/fix-prerelease-deploy.d.ts +3 -0
- package/dist/migrations/1-22-9/fix-prerelease-deploy.d.ts.map +1 -0
- package/dist/migrations/1-22-9/fix-prerelease-deploy.js +27 -0
- package/dist/migrations/1-22-9/templates/cicd.template +79 -0
- package/dist/migrations/utils/open.d.ts +2 -0
- package/dist/migrations/utils/open.d.ts.map +1 -0
- package/dist/migrations/utils/open.js +16 -0
- package/migrations.json +15 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-22-4/summary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-22-4/summary.ts"],"names":[],"mappings":"AAGA,0CAUC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = default_1;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const open_1 = require("../utils/open");
|
|
5
6
|
async function default_1() {
|
|
6
7
|
devkit_1.logger.info('');
|
|
7
8
|
devkit_1.logger.info('🎉 Migration to @unisphere/nx 1.22.4 finished successfully!');
|
|
@@ -9,4 +10,6 @@ async function default_1() {
|
|
|
9
10
|
devkit_1.logger.info('📋 Full details:');
|
|
10
11
|
devkit_1.logger.info('https://unisphere.kaltura.com/docs/create/changelog/1-22-7-changelog');
|
|
11
12
|
devkit_1.logger.info('');
|
|
13
|
+
(0, open_1.openBrowser)('https://unisphere.kaltura.com/docs/create/changelog/1-22-7-changelog');
|
|
14
|
+
devkit_1.logger.info('Opening changelog in browser...');
|
|
12
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix-prerelease-deploy.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-22-9/fix-prerelease-deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAU,MAAM,YAAY,CAAC;AAI1C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB9D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
async function update(tree) {
|
|
8
|
+
devkit_1.logger.info('🔄 Updating .github/workflows/cicd file - fixing prerelease deploy logic');
|
|
9
|
+
try {
|
|
10
|
+
// Update cicd.yml
|
|
11
|
+
const cicdWorkflowPath = '.github/workflows/cicd.yml';
|
|
12
|
+
const cicdTemplatePath = (0, path_1.join)(__dirname, 'templates', 'cicd.template');
|
|
13
|
+
const cicdTemplateContent = (0, fs_1.readFileSync)(cicdTemplatePath, 'utf-8');
|
|
14
|
+
const cicdExists = tree.exists(cicdWorkflowPath);
|
|
15
|
+
tree.write(cicdWorkflowPath, cicdTemplateContent);
|
|
16
|
+
if (cicdExists) {
|
|
17
|
+
devkit_1.logger.info(`✅ Updated ${cicdWorkflowPath}`);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
devkit_1.logger.info(`✅ Created ${cicdWorkflowPath}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
devkit_1.logger.error(`❌ Failed to update GitHub workflows: ${error?.message || 'Unknown error'}`);
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: CI/CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- 'prerelease/**'
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
id-token: write
|
|
11
|
+
contents: write
|
|
12
|
+
packages: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
release:
|
|
16
|
+
name: Release
|
|
17
|
+
runs-on:
|
|
18
|
+
- codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.attempt }}
|
|
19
|
+
- instance-size:medium
|
|
20
|
+
outputs:
|
|
21
|
+
hasChangesets: ${{ steps.changesets.outputs.hasChangesets }}
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout Repo
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Check if part of prerelease or official release
|
|
27
|
+
id: check
|
|
28
|
+
run: |
|
|
29
|
+
if [ "${{ github.ref }}" = "refs/heads/main" ] && [ -f ".changeset/pre.json" ]; then
|
|
30
|
+
echo "main branch should not have pre.json file, skipping job"
|
|
31
|
+
exit 1
|
|
32
|
+
elif [[ "${{ github.ref }}" == "refs/heads/prerelease/"* ]] && [ ! -f ".changeset/pre.json" ]; then
|
|
33
|
+
echo "prerelease branch must have pre.json file, skipping job"
|
|
34
|
+
exit 1
|
|
35
|
+
elif [ "${{ github.ref }}" != "refs/heads/main" ] && [[ "${{ github.ref }}" != "refs/heads/prerelease/"* ]]; then
|
|
36
|
+
echo "not part of prerelease or official release, skipping job"
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
- name: Setup Node.js
|
|
41
|
+
uses: actions/setup-node@v4
|
|
42
|
+
with:
|
|
43
|
+
node-version-file: '.nvmrc'
|
|
44
|
+
|
|
45
|
+
- name: Run Kaltura Tools Check
|
|
46
|
+
uses: kaltura/kaltura-tools@unisphere
|
|
47
|
+
with:
|
|
48
|
+
repo-path: '${{ github.workspace }}'
|
|
49
|
+
|
|
50
|
+
- name: Setup JFrog
|
|
51
|
+
uses: jfrog/setup-jfrog-cli@v4
|
|
52
|
+
id: setup-jfrog
|
|
53
|
+
env:
|
|
54
|
+
JF_URL: https://kalturaa.jfrog.io
|
|
55
|
+
with:
|
|
56
|
+
oidc-provider-name: ovp-github-oidc
|
|
57
|
+
|
|
58
|
+
- name: Install Dependencies
|
|
59
|
+
run: npm ci --include=optional
|
|
60
|
+
env:
|
|
61
|
+
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
62
|
+
KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
|
|
63
|
+
|
|
64
|
+
- name: Create Release Pull Request or Publish to npm
|
|
65
|
+
id: changesets
|
|
66
|
+
uses: changesets/action@v1
|
|
67
|
+
env:
|
|
68
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
69
|
+
|
|
70
|
+
- name: Create release tags
|
|
71
|
+
if: steps.changesets.outputs.hasChangesets == 'false'
|
|
72
|
+
run: |
|
|
73
|
+
npx changeset tag
|
|
74
|
+
git push --follow-tags
|
|
75
|
+
|
|
76
|
+
publish-artifacts:
|
|
77
|
+
needs: release
|
|
78
|
+
if: needs.release.outputs.hasChangesets == 'false'
|
|
79
|
+
uses: ./.github/workflows/_publish-artifacts.yml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../src/migrations/utils/open.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,SAYtC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.openBrowser = void 0;
|
|
4
|
+
const node_child_process_1 = require("node:child_process");
|
|
5
|
+
const openBrowser = (url) => {
|
|
6
|
+
try {
|
|
7
|
+
const command = process.platform === 'darwin' ? `open "${url}"` :
|
|
8
|
+
process.platform === 'win32' ? `start "" "${url}"` :
|
|
9
|
+
`xdg-open "${url}"`;
|
|
10
|
+
(0, node_child_process_1.exec)(command);
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
console.error('Failed to open browser:', error);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
exports.openBrowser = openBrowser;
|
package/migrations.json
CHANGED
|
@@ -76,6 +76,11 @@
|
|
|
76
76
|
"postUpdateMessage": "✅ Storybook files and dependencies have been removed"
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
+
"1-22-9-fix-prerelease-deploy": {
|
|
80
|
+
"version": "1.22.9",
|
|
81
|
+
"description": "Fix prerelease deploy logic in GitHub workflow",
|
|
82
|
+
"factory": "./dist/migrations/1-22-9/fix-prerelease-deploy.js"
|
|
83
|
+
}
|
|
79
84
|
},
|
|
80
85
|
"packageJsonUpdates": {
|
|
81
86
|
"1.22.0": {
|
|
@@ -108,6 +113,16 @@
|
|
|
108
113
|
"alwaysAddToPackageJson": true
|
|
109
114
|
}
|
|
110
115
|
}
|
|
116
|
+
},
|
|
117
|
+
"1.22.9": {
|
|
118
|
+
"version": "1.22.9",
|
|
119
|
+
"cli": "nx",
|
|
120
|
+
"packages": {
|
|
121
|
+
"@unisphere/cli": {
|
|
122
|
+
"version": "^1.58.7",
|
|
123
|
+
"alwaysAddToPackageJson": true
|
|
124
|
+
}
|
|
125
|
+
}
|
|
111
126
|
}
|
|
112
127
|
}
|
|
113
128
|
}
|