@unisphere/nx 1.22.8 → 1.23.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 +1 @@
1
- {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-22-4/summary.ts"],"names":[],"mappings":"AAEA,0CAOC"}
1
+ {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-22-4/summary.ts"],"names":[],"mappings":"AAIA,0CAUC"}
@@ -2,11 +2,15 @@
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");
6
+ const url = 'https://unisphere.kaltura.com/docs/create/changelog/v1-x-major-release';
5
7
  async function default_1() {
6
8
  devkit_1.logger.info('');
7
- devkit_1.logger.info('🎉 Migration to @unisphere/nx 1.22.4 finished successfully!');
9
+ devkit_1.logger.info('🎉 Migration to Major 1 finished successfully!');
8
10
  devkit_1.logger.info('');
9
11
  devkit_1.logger.info('📋 Full details:');
10
- devkit_1.logger.info('https://unisphere.kaltura.com/docs/create/changelog/1-22-7-changelog');
12
+ devkit_1.logger.info(url);
11
13
  devkit_1.logger.info('');
14
+ (0, open_1.openBrowser)(url);
15
+ devkit_1.logger.info('Opening changelog in browser...');
12
16
  }
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
3
+ //# sourceMappingURL=fix-prerelease-deploy.d.ts.map
@@ -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,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
3
+ //# sourceMappingURL=delete-rollup-patch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-rollup-patch.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-23-0/delete-rollup-patch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAS9D"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ async function update(tree) {
5
+ // Delete rollup patch file
6
+ const rollupPatchPath = 'patches/@nx+rollup+22.1.3.patch';
7
+ if (tree.exists(rollupPatchPath)) {
8
+ console.log(`Deleting rollup patch file: ${rollupPatchPath}`);
9
+ tree.delete(rollupPatchPath);
10
+ }
11
+ else {
12
+ throw new Error(`Rollup patch file not found at ${rollupPatchPath}`);
13
+ }
14
+ }
@@ -0,0 +1,2 @@
1
+ export declare const openBrowser: (url: string) => void;
2
+ //# sourceMappingURL=open.d.ts.map
@@ -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
@@ -58,7 +58,7 @@
58
58
  "description": "Adds kaltura-tools to preinstall script",
59
59
  "factory": "./dist/migrations/1-22-4/add-kaltura-tools-to-pre-install.js"
60
60
  },
61
- "000-1-22-4-summary": {
61
+ "1-22-4-summary": {
62
62
  "version": "1.22.4",
63
63
  "description": "Migration completion summary for 1.22.4",
64
64
  "factory": "./dist/migrations/1-22-4/summary.js"
@@ -76,6 +76,16 @@
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
+ },
84
+ "1-23-0-delete-rollup-patch": {
85
+ "version": "1.23.0",
86
+ "description": "Delete rollup patch file",
87
+ "factory": "./dist/migrations/1-23-0/delete-rollup-patch.js"
88
+ }
79
89
  },
80
90
  "packageJsonUpdates": {
81
91
  "1.22.0": {
@@ -108,6 +118,16 @@
108
118
  "alwaysAddToPackageJson": true
109
119
  }
110
120
  }
121
+ },
122
+ "1.22.9": {
123
+ "version": "1.22.9",
124
+ "cli": "nx",
125
+ "packages": {
126
+ "@unisphere/cli": {
127
+ "version": "^1.58.7",
128
+ "alwaysAddToPackageJson": true
129
+ }
130
+ }
111
131
  }
112
132
  }
113
133
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "1.22.8",
3
+ "version": "1.23.1",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",