@unisphere/nx 2.0.0 → 2.1.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.
Files changed (43) hide show
  1. package/README.md +1 -164
  2. package/dist/generators/add-application/add-application.js +1 -1
  3. package/dist/generators/add-application/templates/default/package.json.template +2 -5
  4. package/dist/generators/add-application/templates/local-dev-playground/package.json +1 -0
  5. package/dist/generators/add-package/add-package.d.ts.map +1 -1
  6. package/dist/generators/add-package/add-package.js +0 -83
  7. package/dist/generators/add-package/templates/new-package/package.json.template +1 -10
  8. package/dist/generators/add-package/templates/new-package/src/index.ts.template +0 -1
  9. package/dist/generators/add-package/templates/new-package/src/lib/.keep +0 -0
  10. package/dist/generators/add-runtime/add-runtime.d.ts.map +1 -1
  11. package/dist/generators/add-runtime/add-runtime.js +6 -16
  12. package/dist/generators/add-runtime/schema.d.ts +1 -1
  13. package/dist/generators/add-runtime/schema.json +9 -9
  14. package/dist/migrations/1-22-0/check-nx-version.js +1 -1
  15. package/dist/migrations/1-22-0/patches/@nx+rollup+22.1.3.patch +27 -0
  16. package/dist/migrations/1-22-0/replace-patches.d.ts.map +1 -1
  17. package/dist/migrations/1-22-0/replace-patches.js +22 -1
  18. package/dist/migrations/1-22-2/add-os-and-cpu.js +1 -1
  19. package/dist/migrations/1-22-2/templates/_publish-artifacts.template +28 -12
  20. package/dist/migrations/{summaries/2-0-0-summary.d.ts → 1-22-4/summary.d.ts} +1 -1
  21. package/dist/migrations/1-22-4/summary.d.ts.map +1 -0
  22. package/dist/migrations/{summaries/1-22-4-summary.js → 1-22-4/summary.js} +1 -2
  23. package/dist/migrations/2-0-0/summary.d.ts +2 -0
  24. package/dist/migrations/2-0-0/summary.d.ts.map +1 -0
  25. package/dist/migrations/2-1-0/remove-react-overrides.d.ts +3 -0
  26. package/dist/migrations/2-1-0/remove-react-overrides.d.ts.map +1 -0
  27. package/dist/migrations/2-1-0/remove-react-overrides.js +59 -0
  28. package/dist/migrations/2-1-0/remove-rollup-plugin-node-builtins.d.ts +3 -0
  29. package/dist/migrations/2-1-0/remove-rollup-plugin-node-builtins.d.ts.map +1 -0
  30. package/dist/migrations/2-1-0/remove-rollup-plugin-node-builtins.js +54 -0
  31. package/dist/migrations/2-1-0/remove-storybook.d.ts +3 -0
  32. package/dist/migrations/2-1-0/remove-storybook.d.ts.map +1 -0
  33. package/dist/migrations/2-1-0/remove-storybook.js +88 -0
  34. package/dist/migrations/2-1-0/replace-readme-md.d.ts +3 -0
  35. package/dist/migrations/2-1-0/replace-readme-md.d.ts.map +1 -0
  36. package/dist/migrations/2-1-0/replace-readme-md.js +50 -0
  37. package/dist/migrations/2-1-0/templates/readme.md.template +134 -0
  38. package/migrations.json +58 -10
  39. package/package.json +1 -1
  40. package/dist/migrations/summaries/1-22-4-summary.d.ts +0 -2
  41. package/dist/migrations/summaries/1-22-4-summary.d.ts.map +0 -1
  42. package/dist/migrations/summaries/2-0-0-summary.d.ts.map +0 -1
  43. /package/dist/migrations/{summaries/2-0-0-summary.js → 2-0-0/summary.js} +0 -0
package/README.md CHANGED
@@ -1,167 +1,4 @@
1
- # Getting Started with Unisphere Project
1
+ # Unisphere Workspace NX Plugin
2
2
 
3
- > This is a temporary documentation to the @unisphere/nx plugin until the official documentation is available.
4
3
 
5
- > ⚠️ **This generator is currently available only to Kaltura developers.**
6
- > It depends on internal resources such as CI/CD templates, design systems, and private NPM packages. External support for Kaltura customers is on our roadmap.
7
4
 
8
- Unisphere is Kaltura’s frontend framework for building dynamic, composable experiences. A **Unisphere project** is a structured repository that allows developers to create and organize **applications**, **runtimes**, and **packages** under a single cohesive experience. This setup encourages healthy module separation, runtime decoupling, reusability, and clean ownership boundaries — all key ingredients for scaling product development in a multi-team environment.
9
-
10
- Whether you're building a full application like _Content Lab_ or a lightweight widget like _Chat_, Unisphere gives you the tooling and conventions to do it the right way from the start.
11
-
12
- ## Step 1 - Create a New Unisphere Project
13
-
14
- Before creating a new Unisphere project, make sure you have a valid `GITHUB_TOKEN` exported in your environment. This is required for GitHub operations during setup.
15
-
16
- To scaffold a new project you can use [create-unisphere-project](https://www.npmjs.com/package/create-unisphere-project) npm package with all necessary tooling and structure, run:
17
-
18
- ```bash
19
- npm create unisphere-project@latest
20
- ```
21
-
22
- ### Set Up the GitHub Repository
23
-
24
- Once the project is generated locally, you’ll need to create a new GitHub repository so that CI/CD can operate correctly and your team has proper access.
25
-
26
- Please contact **Eran Sakal** or **Omri Ceisler** to provision the repository. The following steps will be completed as part of this process:
27
-
28
- 1. **Repository Creation**
29
- The new repo will be created with **internal scope** and named according to this convention:
30
-
31
- ```
32
- unisphere-{friendly-experience-name}
33
- ```
34
-
35
- The friendly name is derived from your declared experience name (e.g., `unisphere.widget.reactions` → `reactions` → `unisphere-reactions` as the repository name).
36
-
37
- 2. **Team Access Configuration**
38
- The appropriate GitHub teams will be granted access to the repository to match the experience's ownership and collaboration needs.
39
-
40
- 3. **CI/CD Enablement**
41
- These steps are required to ensure that CI/CD workflows are automatically triggered for builds, deployments, versioning, and testing.
42
-
43
- Once created, you can push your local project into the new repository and begin active development.
44
-
45
- ---
46
-
47
- ## Step 2 - Use the `@unisphere/nx` Plugin
48
-
49
- After your project is set up, you’ll use the `@unisphere/nx` plugin to generate and manage your project’s core elements. All generators are interactive and designed to enforce Unisphere best practices and conventions.
50
-
51
- All generators support interactive usage through `nx g` and prompt you for the correct configuration.
52
-
53
- ### 🧹 `add-runtime`
54
-
55
- Creates a new **runtime**, one of the possible entry points into an experience. Runtimes define **where** and **how** a specific part of the experience is used.
56
-
57
- For example, in the **Genie experience**, there's a runtime called **page** used when the host injects the experience into the main body of a site, and another called **player-plugin** for injecting it into a player drawer. We have additional runtimes, one for each tool that is used by the experience, e.g **flashcards-tool**, **source-tool**, **follow-up-tool** etc.
58
-
59
- Naming your runtime based on its integration point helps communicate its purpose and role clearly.
60
-
61
- ```bash
62
- npx nx g @unisphere/nx:add-runtime
63
- ```
64
-
65
- #### Prompts
66
-
67
- - **Runtime name** – e.g., `page`, `player-plugin`, `flashcards-tool`, `source-tool`, `follow-up-tool`, `content-lab-drawer`.
68
-
69
- - **How will this runtime be used?**
70
-
71
- - **Loaded by External Host**u
72
-
73
- - Deployed independently and loaded at runtime
74
-
75
- - **Embedded in Widget Playground**
76
- - Composed by other runtimes, no standalone deployment
77
-
78
- - **How will this runtime be used?**
79
-
80
- - **Independent experience used as an entry point (loaded by host or another experience)**
81
-
82
- - Includes an Dev playground application for developing and simulating a host environment
83
-
84
- - **Composed into another runtime of this experience (not used as an entry point)**
85
-
86
- - Composed by another runtime within the same experience
87
-
88
- - Assume it is developed using a playground dev application of another runtime in the project
89
-
90
- ### 🎨 `add-visual`
91
-
92
- Creates a **visual component** within a runtime — the building blocks of your UI.
93
-
94
- ```bash
95
- npx nx g @unisphere/nx:add-visual
96
- ```
97
-
98
- #### Prompts
99
-
100
- - **Runtime name** – Where this visual belongs
101
- - **Visual name** – e.g., `card`, `toolbar`, `timeline-visual`
102
- - **Is this visual limited to a single occurrence?**
103
- Choose `Yes` for singleton visuals (e.g., when the visual represent a container that can only have one instance), otherwise `No`.
104
-
105
- ### 📱 `add-application`
106
-
107
- Creates an **application** that acts as a host for your runtime(s). These apps can be used for development, standalone deployments, or iframe integrations. The application can be used as a playground for developing and simulating a host environment without the need to deploy the experience to a customer, or it can be an additional entry point for the experience and use the Unisphere ci/cd to be publically available in multi region environments.
108
-
109
- ```bash
110
- npx nx g @unisphere/nx:add-application
111
- ```
112
-
113
- #### Prompts
114
-
115
- - **Application name**
116
-
117
- - **Serving type**
118
-
119
- - **Local Dev Playground** – Local development playground (for development and testing)
120
- - **Self-Hosted** – Standalone deployment with routing/auth (used for publically available applications)
121
- - **Iframe + Query Params** – Embedded apps with config in URL (used for embedding into other applications like Kaltura Admin or KMC)
122
- - **Iframe + Post Messages** – Embedded apps using `postMessage` API (used for embedding into other applications like Kaltura Admin or KMC) - this will replace eventually the query param method to be more secure and reliable but is not yet available.
123
-
124
- - **Runtime to load in playground** (if Playground selected)
125
-
126
- - **HTML page title** (if not using Playground)
127
-
128
- ### 📦 `add-package`
129
-
130
- Creates a shared **package** for separating concerns within an experience. Most of the actual code in a Unisphere project lives in packages — not in runtimes — making it easier to reuse components, services, and logic across multiple entry points. These packages are usually not distributed externally but serve as internal modules consumed by runtimes.
131
-
132
- By using packages this way, you can introduce multiple runtimes (e.g., page, player-plugin, admin-panel) that share the same functionality while remaining decoupled.
133
-
134
- Some packages, however, are designed for external consumption. For example:
135
-
136
- - Each experience has a `Core` package expose the types needed for runtime integration.
137
- - Differetn `kit` packages act as extendable, design-system-driven building blocks that allow other teams to plug into your experience in a consistent and styled way.
138
-
139
- Packages can be published to GitHub or npm, but in most cases, they serve as a clean internal abstraction layer inside the experience repository without being deployed.
140
-
141
- ```bash
142
- npx nx g @unisphere/nx:add-package
143
- ```
144
-
145
- #### Prompts
146
-
147
- - **Package name**
148
- - **Package scope**
149
-
150
- - **None (no scope)** - Used only internally by the experience runtimes.
151
- - **Internal** - Published to GitHub packages (`@kaltura/unisphere-<experience-name>-<package-name>`)
152
- - **Public** - Published to npm (`@unisphere/<experience-name>-<package-name>`)
153
-
154
- ## Best Practices
155
-
156
- 🧠 Use descriptive names that reflect the purpose of the runtime or visual. For example, use `player-plugin` for a runtime that integrates into a video player, or `container` for visual that represent a container that can only have one instance, or `drawer` if it is a drawer runtime.
157
-
158
- 🎯 Select the correct runtime type depending on the deployment context. Choose "Independent experience" if the runtime will be loaded by a host or standalone app, and "Composed into another runtime" if it will only exist as part of a larger experience.
159
-
160
- ♻️ Share logic and components using packages. Most Unisphere code lives in packages rather than runtimes. This promotes reusability and modularity — for instance, content-lab-drawer and content-lab-modal runtimes may reuse the same internal package. Use the non scoped package if you are not sure what to choose.
161
-
162
- 🔍 Use the interactive CLI mode to generate all project elements. This ensures naming consistency, correct scaffolding, and alignment with Unisphere conventions.
163
-
164
- ## What’s Next?
165
-
166
- Stay tuned for full documentation on each concept and tool at
167
- **[unisphere.kaltura.com](https://unisphere.kaltura.com)** _(coming soon)_
@@ -113,7 +113,7 @@ async function addApplicationGenerator(tree, options) {
113
113
  (0, devkit_1.generateFiles)(tree, path.join(__dirname, templatePath), projectRoot, templateVariables);
114
114
  // Install selected dependencies
115
115
  (0, dependency_config_1.installSelectedDependencies)(tree, selectedDependencies);
116
- const distributionChannel = options.servingType !== 'local-dev-playground' ? 'none' : 'unisphere';
116
+ const distributionChannel = options.servingType === 'local-dev-playground' ? 'none' : 'unisphere';
117
117
  // Update .unisphere configuration
118
118
  (0, utils_1.updateUnisphereConfig)(tree, 'applications', userInputApplicationName, {
119
119
  sourceRoot: `unisphere/applications/${userInputApplicationName}`,
@@ -1,8 +1,5 @@
1
1
  {
2
2
  "name": "unisphere-application-<%= applicationName__lowerDashCase %>",
3
- "version": "1.0.0",
4
- "private": true,
5
- "dependencies": {
6
-
7
- }
3
+ "version": "1.0.0",
4
+ "dependencies": {}
8
5
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "unisphere-application-<%= applicationName__lowerDashCase %>",
3
3
  "version": "1.0.0",
4
+ "private": true,
4
5
  "dependencies": {}
5
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-package.d.ts","sourceRoot":"","sources":["../../../src/generators/add-package/add-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAA2B,MAAM,YAAY,CAAC;AAEvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAyJrD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,uBAgInC;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"add-package.d.ts","sourceRoot":"","sources":["../../../src/generators/add-package/add-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAA2B,MAAM,YAAY,CAAC;AAEvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AA6DrD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,uBA8HnC;AAED,eAAe,mBAAmB,CAAC"}
@@ -36,88 +36,6 @@ function resolveUnisphereRuntimeVersion(tree) {
36
36
  return defaultVersion;
37
37
  }
38
38
  }
39
- function generateDemoComponent(tree, projectRoot, vars) {
40
- // path: packages/<pkg>/src/lib/panel-demo.tsx
41
- const targetPath = `${projectRoot}/src/lib/${vars['packageName__lowerDashCase']}-demo.tsx`;
42
- // component and logger names
43
- const loggerName = `${vars['packageName__lowerDashCase']}-demo`;
44
- const demoName = `${vars['packageName__pascalCase']}Demo`;
45
- let content;
46
- if (demoName.includes('react')) {
47
- content = `import { useContext, useEffect } from 'react';
48
- import {
49
- ScopedUnisphereWorkspaceContext,
50
- useGetScopedWorkspaceLogger,
51
- } from '@unisphere/runtime-react';
52
-
53
- const Hihi = () => {
54
- return (
55
- <div
56
- style={{
57
- border: '2px dashed #888',
58
- borderRadius: '8px',
59
- padding: '2rem',
60
- margin: '2rem auto',
61
- maxWidth: '500px',
62
- textAlign: 'center',
63
- fontFamily: 'sans-serif',
64
- color: '#444',
65
- backgroundColor: '#fcfcfc',
66
- }}
67
- >
68
- <h2
69
- style={{
70
- marginBottom: '1rem',
71
- fontSize: '1.25rem',
72
- fontWeight: 500,
73
- }}
74
- >
75
- Hihi :)
76
- </h2>
77
- <p
78
- style={{
79
- lineHeight: 1.5,
80
- marginBottom: '1.5rem',
81
- fontSize: '1rem',
82
- }}
83
- >
84
- This '${demoName}' component shows you how to connect with the Unisphere workspace and set up a scoped logger.
85
- </p>
86
- </div>
87
- );
88
- };
89
-
90
- export const ${demoName} = () => {
91
- const { unisphereWorkspace } = useContext(ScopedUnisphereWorkspaceContext);
92
- const logger = useGetScopedWorkspaceLogger({
93
- type: 'react',
94
- name: '${loggerName}',
95
- });
96
-
97
- useEffect(() => {
98
- // example only - feel free to remove
99
- logger?.log('${loggerName} mounted');
100
- return () => {
101
- logger?.log('${loggerName} unmounted');
102
- };
103
- }, []);
104
-
105
- useEffect(() => {
106
- if (!unisphereWorkspace) return;
107
-
108
- // you can access the unisphere workspace that renders the runtime this component is mounted in
109
- }, [unisphereWorkspace]);
110
-
111
- // render your visual
112
- return <Hihi />;
113
- };
114
- `;
115
- }
116
- else {
117
- content = `export const ${demoName} = {}`;
118
- }
119
- tree.write(targetPath, content);
120
- }
121
39
  async function addPackageGenerator(tree, options) {
122
40
  // Validate and read .unisphere configuration
123
41
  const unisphereConfig = (0, utils_1.validateUnisphereConfig)(tree);
@@ -194,7 +112,6 @@ async function addPackageGenerator(tree, options) {
194
112
  });
195
113
  // Update tsconfig.base.json with path mapping
196
114
  (0, utils_1.updateTsConfigPaths)(tree, packageJsonName, `unisphere/packages/${userInputPackageName}/src/index.ts`);
197
- generateDemoComponent(tree, projectRoot, templateVariables);
198
115
  // Install selected dependencies
199
116
  (0, dependency_config_1.installSelectedDependencies)(tree, selectedDependencies);
200
117
  await (0, devkit_1.formatFiles)(tree);
@@ -9,14 +9,5 @@
9
9
  "url": "<%= githubUrl %>"
10
10
  },
11
11
  "types": "./index.esm.d.ts",
12
- "dependencies": {
13
- "@unisphere/runtime": "<%= unisphereRuntimeVersion %>"
14
- },
15
- "publishConfig": {
16
- <% if (distributionChannel === 'github') { %>
17
- "registry": "https://npm.pkg.github.com"
18
- <% } else if (distributionChannel === 'npm') { %>
19
- "registry": "https://registry.npmjs.org"
20
- <% } %>
21
- }
12
+ "dependencies": {}
22
13
  }
@@ -1 +0,0 @@
1
- export * from './lib/<%= packageName__lowerDashCase %>-demo';
@@ -1 +1 @@
1
- {"version":3,"file":"add-runtime.d.ts","sourceRoot":"","sources":["../../../src/generators/add-runtime/add-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAAiB,MAAM,YAAY,CAAC;AAE7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AA6CrD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,uBAwInC;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"add-runtime.d.ts","sourceRoot":"","sources":["../../../src/generators/add-runtime/add-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAAiB,MAAM,YAAY,CAAC;AAE7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AA4CrD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,uBAyHnC;AAED,eAAe,mBAAmB,CAAC"}
@@ -26,8 +26,8 @@ function updateTypesIndexExport(tree, runtimeName, basePath) {
26
26
  tree.write(indexPath, updatedContent);
27
27
  }
28
28
  async function addRuntimeGenerator(tree, options) {
29
- // Normalize standalone option - Nx list prompts may return string labels instead of boolean values
30
- let isStandalone = options?.standalone === 'yes' ? true : false;
29
+ // Normalize consumer option - Nx list prompts may return string labels instead of boolean values
30
+ let isExternal = options?.consumer === 'external' ? true : false;
31
31
  // Validate and read .unisphere configuration
32
32
  const unisphereConfig = (0, utils_1.validateUnisphereConfig)(tree);
33
33
  // Validate dependencies
@@ -38,7 +38,6 @@ async function addRuntimeGenerator(tree, options) {
38
38
  const widgetName = unisphereConfig.name;
39
39
  // Validate and correct runtime naming for React/DS dependencies
40
40
  let userInputRuntimeName = (0, devkit_1.names)(options.name).fileName;
41
- userInputRuntimeName = (0, dependency_config_1.validateReactNaming)(userInputRuntimeName, selectedDependencies);
42
41
  // Find types package (or fallback to core)
43
42
  const typesPackageInfo = (0, utils_1.findTypesOrCorePackageInfo)(tree);
44
43
  // Prepare template variables
@@ -78,17 +77,8 @@ async function addRuntimeGenerator(tree, options) {
78
77
  const runtimePathKey = `unisphere-runtime-${userInputRuntimeName}`;
79
78
  const runtimePathValue = `unisphere/runtimes/${userInputRuntimeName}/src/index.ts`;
80
79
  (0, utils_1.updateTsConfigPaths)(tree, runtimePathKey, runtimePathValue);
81
- // // Create a package with the same name as the runtime and distribution set to none
82
- // const packageResult = await addPackageGenerator(tree, {
83
- // packageName: userInputRuntimeName,
84
- // scope: 'none',
85
- // });
86
- // // Execute the package generation callback if it exists
87
- // if (packageResult && typeof packageResult === 'function') {
88
- // packageResult();
89
- // }
90
- // Handle standalone usage - create dev application
91
- if (isStandalone === true) {
80
+ // Handle internal usage - create dev application
81
+ if (!!isExternal) {
92
82
  // Create a dev application without prompts
93
83
  const applicationResult = await (0, add_application_1.addApplicationGenerator)(tree, {
94
84
  name: `${userInputRuntimeName}-dev`,
@@ -111,8 +101,8 @@ async function addRuntimeGenerator(tree, options) {
111
101
  devkit_1.logger.info('');
112
102
  devkit_1.logger.info(`🚀 Runtime Name: ${userInputRuntimeName}`);
113
103
  devkit_1.logger.info(`📁 Location: ${projectRoot}`);
114
- devkit_1.logger.info(`🔧 Standalone: ${isStandalone ? 'Yes' : 'No'}`);
115
- if (isStandalone === true) {
104
+ devkit_1.logger.info(`🔧 Consumer: ${isExternal ? 'External' : 'Internal'}`);
105
+ if (isExternal === true) {
116
106
  devkit_1.logger.info('');
117
107
  devkit_1.logger.info('📦 Additional components created:');
118
108
  devkit_1.logger.info(` • Dev Application: ${userInputRuntimeName}-dev`);
@@ -1,5 +1,5 @@
1
1
  export interface AddRuntimeGeneratorSchema {
2
2
  name: string;
3
- standalone: string;
3
+ consumer: string;
4
4
  dependencies?: string[];
5
5
  }
@@ -10,20 +10,20 @@
10
10
  "pattern": "^[a-zA-Z][a-zA-Z0-9\\-\\s]*$",
11
11
  "x-prompt": "What's the runtime name? (letters, numbers, dashes and spaces allowed)"
12
12
  },
13
- "standalone": {
13
+ "consumer": {
14
14
  "type": "string",
15
- "description": "Is this experience being loaded by the host application, or by another experience (not this one)?",
15
+ "description": "Is this runtime loaded from within the same experience or by an external consumer?",
16
16
  "x-prompt": {
17
- "message": "Is this experience being loaded by the host application, or by another experience (not this one)?",
17
+ "message": "Is this runtime loaded from within the same experience or by an external consumer?",
18
18
  "type": "list",
19
19
  "items": [
20
20
  {
21
- "value": "yes",
22
- "label": "Yes -loaded by host application"
21
+ "value": "external",
22
+ "label": "Loaded by an external consumer"
23
23
  },
24
24
  {
25
- "value": "no",
26
- "label": "No - loaded by another experience"
25
+ "value": "internal",
26
+ "label": "Loaded by another runtime or application within this experience"
27
27
  }
28
28
  ]
29
29
  }
@@ -63,6 +63,6 @@
63
63
  },
64
64
  "required": [
65
65
  "name",
66
- "standalone"
66
+ "consumer"
67
67
  ]
68
- }
68
+ }
@@ -12,7 +12,7 @@ function checkNxVersion(tree) {
12
12
  }
13
13
  const majorVersion = parseInt(nxVersion.match(/\d+/)?.[0] ?? '0');
14
14
  if (majorVersion < 22) {
15
- const errorMessage = `❌ This migration requires Nx 22 or higher. read https://unisphere.kaltura.com/docs/create/changelog/1-22-4-changelog`;
15
+ const errorMessage = `❌ This migration requires Nx 22 or higher. read https://unisphere.kaltura.com/docs/create/changelog/1-22-6-changelog`;
16
16
  devkit_1.logger.error(errorMessage);
17
17
  throw new Error(errorMessage);
18
18
  }
@@ -0,0 +1,27 @@
1
+ diff --git a/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js b/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js
2
+ index 1135bba..4762053 100644
3
+ --- a/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js
4
+ +++ b/node_modules/@nx/rollup/src/plugins/with-nx/with-nx.js
5
+ @@ -149,7 +149,13 @@ dependencies) {
6
+ else {
7
+ options.generatePackageJson ??= true;
8
+ }
9
+ - const compilerOptions = createTsCompilerOptions(projectRoot, tsConfig, options, dependencies);
10
+ + let compilerOptionsInterceptor = ((config) => config);
11
+ + if (rollupConfig.unisphere?.interceptors?.compilerOptions) {
12
+ + console.log(`[unisphere.nx.rollup] using monkey patched interceptor for TS compiler options`);
13
+ + compilerOptionsInterceptor = rollupConfig.unisphere?.interceptors?.compilerOptions;
14
+ + }
15
+ +
16
+ + const compilerOptions = compilerOptionsInterceptor(createTsCompilerOptions(projectRoot, tsConfig, options, dependencies));
17
+ compilerOptions.outDir = Array.isArray(finalConfig.output)
18
+ ? finalConfig.output[0].dir
19
+ : finalConfig.output.dir;
20
+ @@ -170,6 +176,7 @@ dependencies) {
21
+ return require('rollup-plugin-typescript2')({
22
+ check: !options.skipTypeCheck,
23
+ tsconfig: tsConfigPath,
24
+ + exclude: ['**/*.stories.ts', '**/*.stories.tsx'],
25
+ tsconfigOverride: {
26
+ compilerOptions,
27
+ },
@@ -1 +1 @@
1
- {"version":3,"file":"replace-patches.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-22-0/replace-patches.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAyB,MAAM,YAAY,CAAC;AAKzD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAiC9D"}
1
+ {"version":3,"file":"replace-patches.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-22-0/replace-patches.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmC,MAAM,YAAY,CAAC;AASnE,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAwD9D"}
@@ -3,10 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = update;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const path_1 = require("path");
6
- const removePatchList = ['@changesets+cli'];
6
+ const removePatchList = ['nx+rollup+', '@changesets+cli'];
7
+ const forcePatchVersions = {
8
+ '@nx/rollup': '22.1.3',
9
+ '@changesets/cli': '2.29.7'
10
+ };
7
11
  async function update(tree) {
8
12
  devkit_1.logger.info('🔄 Creating patches');
9
13
  try {
14
+ // Check @nx/rollup version
15
+ if (Object.keys(forcePatchVersions).length !== 0) {
16
+ devkit_1.logger.info('removing patches of older versions');
17
+ const pkg = (0, devkit_1.readJson)(tree, 'package.json');
18
+ Object.keys(forcePatchVersions).forEach(key => {
19
+ const version = pkg.devDependencies?.[key] || pkg.dependencies?.[key];
20
+ if (version !== forcePatchVersions[key]) {
21
+ devkit_1.logger.error(`❌ ${key} version must be exactly ${forcePatchVersions[key]}`);
22
+ throw new Error(`${key} version must be exactly ${forcePatchVersions[key]}. did you migrate nx to other version?`);
23
+ }
24
+ });
25
+ }
10
26
  // Create patches
11
27
  const patchesPath = 'patches';
12
28
  const patchesTemplatePath = (0, path_1.join)(__dirname, 'patches');
@@ -26,6 +42,11 @@ async function update(tree) {
26
42
  }
27
43
  // Copy all patch files using generateFiles
28
44
  (0, devkit_1.generateFiles)(tree, patchesTemplatePath, `./${patchesPath}`, {});
45
+ // Log created patches
46
+ const createdPatches = tree.children(patchesPath);
47
+ for (const patchFile of createdPatches) {
48
+ devkit_1.logger.info(`✅ Created patch: ${patchFile}`);
49
+ }
29
50
  // Always log that patches were created
30
51
  devkit_1.logger.info(`✅ All patches created successfully`);
31
52
  }
@@ -9,7 +9,7 @@ async function update(tree) {
9
9
  json.os = [
10
10
  "darwin",
11
11
  "linux",
12
- "windows"
12
+ "win32"
13
13
  ];
14
14
  json.cpu = [
15
15
  "x64",
@@ -12,7 +12,7 @@ jobs:
12
12
  has_applications: ${{ steps.check.outputs.has_applications }}
13
13
  steps:
14
14
  - name: Checkout Repo
15
- uses: actions/checkout@v3
15
+ uses: actions/checkout@v4
16
16
  with:
17
17
  ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
18
18
  fetch-tags: true
@@ -58,7 +58,7 @@ jobs:
58
58
  commit_sha: ${{ steps.capture_commit_sha.outputs.commit_sha }}
59
59
  steps:
60
60
  - name: Checkout Repo
61
- uses: actions/checkout@v3
61
+ uses: actions/checkout@v4
62
62
  with:
63
63
  ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
64
64
  fetch-tags: true
@@ -107,14 +107,14 @@ jobs:
107
107
  runs-on: codebuild-ovp-unisphere-runner-${{ github.run_id }}-${{ github.attempt }}
108
108
  steps:
109
109
  - name: Checkout Repo
110
- uses: actions/checkout@v3
110
+ uses: actions/checkout@v4
111
111
  with:
112
112
  ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
113
113
  fetch-tags: true
114
114
  - name: Setup Node.js
115
115
  uses: actions/setup-node@v4
116
116
  with:
117
- node-version: 20
117
+ node-version-file: '.nvmrc'
118
118
 
119
119
  - name: Setup JFrog
120
120
  uses: jfrog/setup-jfrog-cli@v4
@@ -140,7 +140,7 @@ jobs:
140
140
  # Debug token existence (safely)
141
141
  echo "::debug::Token exists: $([ ! -z "$NPM_TOKEN" ] && echo 'true' || echo 'false')"
142
142
  - name: Deploy to registry
143
- run: npx unisphere package publish --verbose --githubToken ${{ secrets.GITHUB_TOKEN }} --jfrogToken ${{ steps.setup-jfrog.outputs.oidc-token }} --npmToken ${{ env.NPM_TOKEN }} --branch "${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}"
143
+ run: npx unisphere package publish --verbose --githubToken ${{ secrets.GITHUB_TOKEN }} --npmToken ${{ env.NPM_TOKEN }} --branch "${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}"
144
144
 
145
145
  deploy-runtimes:
146
146
  if: needs.prepare-runtimes.outputs.hasArtifacts == 'true'
@@ -162,14 +162,14 @@ jobs:
162
162
  - name: Check available disk space
163
163
  run: df -h
164
164
  - name: Checkout Repo at specific commit
165
- uses: actions/checkout@v3
165
+ uses: actions/checkout@v4
166
166
  with:
167
167
  ref: ${{ needs.prepare-runtimes.outputs.commit_sha }}
168
168
  fetch-tags: true
169
169
  - name: Setup Node.js
170
170
  uses: actions/setup-node@v4
171
171
  with:
172
- node-version: 20
172
+ node-version-file: '.nvmrc'
173
173
 
174
174
  - name: Setup JFrog
175
175
  uses: jfrog/setup-jfrog-cli@v4
@@ -212,7 +212,7 @@ jobs:
212
212
  commit_sha: ${{ steps.capture_commit_sha.outputs.commit_sha }}
213
213
  steps:
214
214
  - name: Checkout Repo
215
- uses: actions/checkout@v3
215
+ uses: actions/checkout@v4
216
216
  with:
217
217
  ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
218
218
  fetch-tags: true
@@ -224,10 +224,18 @@ jobs:
224
224
  run: git reset --hard HEAD
225
225
  - name: Clean npm cache
226
226
  run: npm cache clean --force
227
+ - name: Setup JFrog
228
+ uses: jfrog/setup-jfrog-cli@v4
229
+ id: setup-jfrog
230
+ env:
231
+ JF_URL: https://kalturaa.jfrog.io
232
+ with:
233
+ oidc-provider-name: ovp-github-oidc
227
234
  - name: Install dependencies
228
- run: npm ci --ignore-scripts
235
+ run: npm ci --ignore-scripts
229
236
  env:
230
237
  GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
238
+ KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
231
239
  - name: Prepare Unisphere Applications
232
240
  id: prepare-applications
233
241
  run: npx unisphere application publish prepare --verbose
@@ -263,18 +271,26 @@ jobs:
263
271
  fail-fast: false
264
272
  steps:
265
273
  - name: Checkout Repo at specific commit
266
- uses: actions/checkout@v3
274
+ uses: actions/checkout@v4
267
275
  with:
268
276
  ref: ${{ needs.prepare-applications.outputs.commit_sha }}
269
277
  fetch-tags: true
270
278
  - name: Setup Node.js
271
279
  uses: actions/setup-node@v4
272
280
  with:
273
- node-version: 20
281
+ node-version-file: '.nvmrc'
282
+ - name: Setup JFrog
283
+ uses: jfrog/setup-jfrog-cli@v4
284
+ id: setup-jfrog
285
+ env:
286
+ JF_URL: https://kalturaa.jfrog.io
287
+ with:
288
+ oidc-provider-name: ovp-github-oidc
274
289
  - name: Install dependencies
275
- run: npm ci --ignore-scripts
290
+ run: npm ci --ignore-scripts
276
291
  env:
277
292
  GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
293
+ KALTURA_JFROG_TOKEN: ${{ steps.setup-jfrog.outputs.oidc-token }}
278
294
  - name: Download artifacts folder
279
295
  uses: actions/download-artifact@v4
280
296
  with:
@@ -1,2 +1,2 @@
1
1
  export default function (): Promise<void>;
2
- //# sourceMappingURL=2-0-0-summary.d.ts.map
2
+ //# sourceMappingURL=summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../../src/migrations/1-22-4/summary.ts"],"names":[],"mappings":"AAEA,0CAOC"}
@@ -7,6 +7,5 @@ async function default_1() {
7
7
  devkit_1.logger.info('🎉 Migration to @unisphere/nx 1.22.4 finished successfully!');
8
8
  devkit_1.logger.info('');
9
9
  devkit_1.logger.info('📋 Full details:');
10
- devkit_1.logger.info('https://unisphere.kaltura.com/docs/create/changelog/1-22-4-changelog');
11
- devkit_1.logger.info('');
10
+ devkit_1.logger.info('https://unisphere.kaltura.com/docs/create/changelog/1-22-6-changelog');
12
11
  }
@@ -0,0 +1,2 @@
1
+ export default function (): Promise<void>;
2
+ //# sourceMappingURL=summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../../src/migrations/2-0-0/summary.ts"],"names":[],"mappings":"AAEA,0CAOC"}
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
3
+ //# sourceMappingURL=remove-react-overrides.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-react-overrides.d.ts","sourceRoot":"","sources":["../../../src/migrations/2-1-0/remove-react-overrides.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAsB,MAAM,YAAY,CAAC;AAEtD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA+D9D"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const devkit_1 = require("@nx/devkit");
5
+ async function update(tree) {
6
+ devkit_1.logger.info('🔄 Removing React overrides from package.json...');
7
+ const packageJsonPath = 'package.json';
8
+ if (!tree.exists(packageJsonPath)) {
9
+ devkit_1.logger.warn('⚠️ package.json not found');
10
+ throw new Error('package.json not found');
11
+ }
12
+ try {
13
+ (0, devkit_1.updateJson)(tree, packageJsonPath, (packageJson) => {
14
+ let overridesRemoved = 0;
15
+ if (packageJson.overrides) {
16
+ // Find overrides that contain React-related dependencies
17
+ const overridesToRemove = Object.keys(packageJson.overrides).filter(key => {
18
+ const override = packageJson.overrides[key];
19
+ // Check if the override contains React-related dependencies
20
+ if (typeof override === 'object' && override !== null) {
21
+ return Object.entries(override).some(([dep, version]) => (dep === 'react' ||
22
+ dep.startsWith('react-') ||
23
+ dep.startsWith('@types/react')) && (typeof version === 'string' && (version.startsWith('18') || version.startsWith('^18'))));
24
+ }
25
+ // Check if the key itself is React-related
26
+ return key === 'react' ||
27
+ key.startsWith('react-') ||
28
+ key.startsWith('@types/react');
29
+ });
30
+ // Remove the identified overrides
31
+ overridesToRemove.forEach(key => {
32
+ delete packageJson.overrides[key];
33
+ overridesRemoved++;
34
+ });
35
+ // If overrides object is now empty, remove it entirely
36
+ if (Object.keys(packageJson.overrides).length === 0) {
37
+ delete packageJson.overrides;
38
+ devkit_1.logger.info('📦 Removed empty overrides object');
39
+ }
40
+ if (overridesRemoved > 0) {
41
+ devkit_1.logger.info(`📦 Removed ${overridesRemoved} React-related overrides from package.json`);
42
+ }
43
+ else {
44
+ devkit_1.logger.info('ℹ️ No React-related overrides found to remove');
45
+ }
46
+ }
47
+ else {
48
+ devkit_1.logger.info('ℹ️ No overrides section found in package.json');
49
+ }
50
+ return packageJson;
51
+ });
52
+ devkit_1.logger.info('✅ Successfully processed React overrides removal');
53
+ }
54
+ catch (error) {
55
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
56
+ devkit_1.logger.error(`❌ Could not update package.json: ${errorMessage}`);
57
+ throw new Error(`Could not update package.json: ${errorMessage}`);
58
+ }
59
+ }
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
3
+ //# sourceMappingURL=remove-rollup-plugin-node-builtins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-rollup-plugin-node-builtins.d.ts","sourceRoot":"","sources":["../../../src/migrations/2-1-0/remove-rollup-plugin-node-builtins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAsB,MAAM,YAAY,CAAC;AAEtD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAwD9D"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const devkit_1 = require("@nx/devkit");
5
+ async function update(tree) {
6
+ devkit_1.logger.info('🔄 Removing rollup-plugin-node-builtins dependency...');
7
+ const packageJsonPath = 'package.json';
8
+ if (!tree.exists(packageJsonPath)) {
9
+ devkit_1.logger.warn('⚠️ package.json not found');
10
+ throw new Error('package.json not found');
11
+ }
12
+ try {
13
+ let dependencyRemoved = false;
14
+ (0, devkit_1.updateJson)(tree, packageJsonPath, (packageJson) => {
15
+ const targetDependency = 'rollup-plugin-node-builtins';
16
+ // Check and remove from dependencies
17
+ if (packageJson.dependencies && packageJson.dependencies[targetDependency]) {
18
+ delete packageJson.dependencies[targetDependency];
19
+ dependencyRemoved = true;
20
+ devkit_1.logger.info(`📦 Removed ${targetDependency} from dependencies`);
21
+ }
22
+ // Check and remove from devDependencies
23
+ if (packageJson.devDependencies && packageJson.devDependencies[targetDependency]) {
24
+ delete packageJson.devDependencies[targetDependency];
25
+ dependencyRemoved = true;
26
+ devkit_1.logger.info(`📦 Removed ${targetDependency} from devDependencies`);
27
+ }
28
+ // Check and remove from peerDependencies
29
+ if (packageJson.peerDependencies && packageJson.peerDependencies[targetDependency]) {
30
+ delete packageJson.peerDependencies[targetDependency];
31
+ dependencyRemoved = true;
32
+ devkit_1.logger.info(`📦 Removed ${targetDependency} from peerDependencies`);
33
+ }
34
+ // Check and remove from optionalDependencies
35
+ if (packageJson.optionalDependencies && packageJson.optionalDependencies[targetDependency]) {
36
+ delete packageJson.optionalDependencies[targetDependency];
37
+ dependencyRemoved = true;
38
+ devkit_1.logger.info(`📦 Removed ${targetDependency} from optionalDependencies`);
39
+ }
40
+ return packageJson;
41
+ });
42
+ if (dependencyRemoved) {
43
+ devkit_1.logger.info('✅ Successfully removed rollup-plugin-node-builtins dependency');
44
+ }
45
+ else {
46
+ devkit_1.logger.info('ℹ️ rollup-plugin-node-builtins dependency not found');
47
+ }
48
+ }
49
+ catch (error) {
50
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
51
+ devkit_1.logger.error(`❌ Could not update package.json: ${errorMessage}`);
52
+ throw new Error(`Could not update package.json: ${errorMessage}`);
53
+ }
54
+ }
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
3
+ //# sourceMappingURL=remove-storybook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-storybook.d.ts","sourceRoot":"","sources":["../../../src/migrations/2-1-0/remove-storybook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAsB,MAAM,YAAY,CAAC;AAEtD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAsG9D"}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const devkit_1 = require("@nx/devkit");
5
+ async function update(tree) {
6
+ devkit_1.logger.info('🔄 Removing Storybook files and dependencies...');
7
+ let removedItems = 0;
8
+ // 1. Remove storybook folder if it exists
9
+ if (tree.exists('storybook')) {
10
+ tree.delete('storybook');
11
+ devkit_1.logger.info('📁 Removed storybook folder');
12
+ removedItems++;
13
+ }
14
+ // 2. Remove storybook dependencies from package.json
15
+ const packageJsonPath = 'package.json';
16
+ if (tree.exists(packageJsonPath)) {
17
+ try {
18
+ (0, devkit_1.updateJson)(tree, packageJsonPath, (packageJson) => {
19
+ let dependenciesRemoved = 0;
20
+ // Remove from dependencies
21
+ if (packageJson.dependencies) {
22
+ const depsToRemove = Object.keys(packageJson.dependencies).filter(dep => dep === 'storybook' || dep.startsWith('@storybook/'));
23
+ depsToRemove.forEach(dep => {
24
+ delete packageJson.dependencies[dep];
25
+ dependenciesRemoved++;
26
+ });
27
+ }
28
+ // Remove from devDependencies
29
+ if (packageJson.devDependencies) {
30
+ const devDepsToRemove = Object.keys(packageJson.devDependencies).filter(dep => dep === 'storybook' || dep.startsWith('@storybook/'));
31
+ devDepsToRemove.forEach(dep => {
32
+ delete packageJson.devDependencies[dep];
33
+ dependenciesRemoved++;
34
+ });
35
+ }
36
+ // Remove from peerDependencies
37
+ if (packageJson.peerDependencies) {
38
+ const peerDepsToRemove = Object.keys(packageJson.peerDependencies).filter(dep => dep === 'storybook' || dep.startsWith('@storybook/'));
39
+ peerDepsToRemove.forEach(dep => {
40
+ delete packageJson.peerDependencies[dep];
41
+ dependenciesRemoved++;
42
+ });
43
+ }
44
+ if (dependenciesRemoved > 0) {
45
+ devkit_1.logger.info(`📦 Removed ${dependenciesRemoved} Storybook dependencies from package.json`);
46
+ removedItems++;
47
+ }
48
+ return packageJson;
49
+ });
50
+ }
51
+ catch (error) {
52
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
53
+ devkit_1.logger.warn(`⚠️ Could not update package.json: ${errorMessage}`);
54
+ throw new Error(`⚠️ Could not update package.json: ${errorMessage}`);
55
+ }
56
+ }
57
+ // 3. Remove storybook paths from tsconfig.base.json
58
+ const tsconfigPath = 'tsconfig.base.json';
59
+ if (tree.exists(tsconfigPath)) {
60
+ try {
61
+ (0, devkit_1.updateJson)(tree, tsconfigPath, (tsconfig) => {
62
+ let pathsRemoved = 0;
63
+ if (tsconfig.compilerOptions?.paths) {
64
+ const pathsToRemove = Object.entries(tsconfig.compilerOptions.paths).filter(([key, paths]) => paths.some(path => path.startsWith('storybook/'))).map(([key]) => key);
65
+ pathsToRemove.forEach(key => {
66
+ delete tsconfig.compilerOptions.paths[key];
67
+ pathsRemoved++;
68
+ });
69
+ if (pathsRemoved > 0) {
70
+ devkit_1.logger.info(`� Removed ${pathsRemoved} Storybook paths from tsconfig.base.json`);
71
+ removedItems++;
72
+ }
73
+ }
74
+ return tsconfig;
75
+ });
76
+ }
77
+ catch (error) {
78
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
79
+ throw new Error(`⚠️ Could not update tsconfig.base.json: ${errorMessage}`);
80
+ }
81
+ }
82
+ if (removedItems === 0) {
83
+ devkit_1.logger.info('ℹ️ No Storybook files, dependencies, or paths found to remove');
84
+ }
85
+ else {
86
+ devkit_1.logger.info(`✅ Successfully removed Storybook components (${removedItems} operations completed)`);
87
+ }
88
+ }
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
3
+ //# sourceMappingURL=replace-readme-md.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replace-readme-md.d.ts","sourceRoot":"","sources":["../../../src/migrations/2-1-0/replace-readme-md.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAoB,MAAM,YAAY,CAAC;AAIpD,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAiD9D"}
@@ -0,0 +1,50 @@
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('🔄 Replacing README.md from template...');
9
+ const readmePath = 'README.md';
10
+ const readmeTemplatePath = (0, path_1.join)(__dirname, 'templates', 'readme.md.template');
11
+ const unispherePath = '.unisphere';
12
+ // Read the template content
13
+ const readmeTemplateContent = (0, fs_1.readFileSync)(readmeTemplatePath, 'utf-8');
14
+ // Read and parse .unisphere file
15
+ let processedContent = readmeTemplateContent;
16
+ if (tree.exists(unispherePath)) {
17
+ try {
18
+ const unisphereContent = (0, devkit_1.readJson)(tree, unispherePath);
19
+ if (!unisphereContent) {
20
+ throw new Error('.unisphere file is empty');
21
+ }
22
+ const unisphereConfig = JSON.parse(unisphereContent);
23
+ // Replace placeholders with values from .unisphere
24
+ if (unisphereConfig.company) {
25
+ processedContent = processedContent.replace(/\{\{company-name\|human-readable\}\}/g, unisphereConfig.company);
26
+ }
27
+ if (unisphereConfig.name) {
28
+ processedContent = processedContent.replace(/\{\{project-name\|human-readable\}\}/g, unisphereConfig.name);
29
+ }
30
+ devkit_1.logger.info(` Replaced template placeholders with company: "${unisphereConfig.company}", name: "${unisphereConfig.name}"`);
31
+ }
32
+ catch (error) {
33
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
34
+ devkit_1.logger.warn(` Could not parse .unisphere file: ${errorMessage}`);
35
+ devkit_1.logger.info(' Using template content without placeholder replacement');
36
+ }
37
+ }
38
+ else {
39
+ devkit_1.logger.warn(' .unisphere file not found');
40
+ devkit_1.logger.info(' Using template content without placeholder replacement');
41
+ }
42
+ const readmeExists = tree.exists(readmePath);
43
+ tree.write(readmePath, processedContent);
44
+ if (readmeExists) {
45
+ devkit_1.logger.info(`✅ Updated ${readmePath}`);
46
+ }
47
+ else {
48
+ devkit_1.logger.info(`✅ Created ${readmePath}`);
49
+ }
50
+ }
@@ -0,0 +1,134 @@
1
+ # Unisphere - {{company-name|human-readable}} {{project-name|human-readable}}
2
+
3
+ ## Overview
4
+
5
+ This repository is a **Unisphere workspace** for an experience named **{{project-name|human-readable}}**.
6
+
7
+ It contains everything you need to:
8
+ - Create and publish npm / JFrog packages
9
+ - Bundle and version runtime artifacts
10
+ - Build and deploy applications
11
+ - Develop locally and promote changes to production
12
+
13
+ The Unisphere workspace acts as the single entry point for the entire lifecycle — from local development, through CI/CD, and all the way to production deployment.
14
+
15
+ To better understand the ideas behind Unisphere and how it works, read more at:
16
+ https://unisphere.kaltura.com/
17
+
18
+ ---
19
+
20
+ ## Prerequisites
21
+
22
+ At the moment, **deploying Unisphere experiences is available only to Kaltura employees**.
23
+
24
+ Before doing anything else, make sure your machine is properly configured to access:
25
+ - Kaltura GitHub repositories
26
+ - Kaltura JFrog Artifactory registries
27
+
28
+ Follow the setup guide here:
29
+ https://unisphere.kaltura.com/docs/create/kaltura-employees/setup-machine
30
+
31
+ ---
32
+
33
+ ## Add the Experience to Kaltura Github Organization
34
+
35
+ Before you can deploy or activate this experience, it must be registered in Github under Kaltura Organization.
36
+
37
+ This step connects your Unisphere workspace to the relevant Kaltura infrastructure and enables CI/CD, deployment, and activation flows.
38
+
39
+ Follow the guide here:
40
+ https://unisphere.kaltura.com/docs/create/devops/create-github-repository
41
+
42
+ ---
43
+
44
+ ## Create Artifacts
45
+
46
+ Unisphere allows you to create and manage different types of artifacts, including:
47
+ - Packages
48
+ - Runtimes
49
+ - Applications
50
+
51
+ Each artifact type has its own role in the ecosystem, but they all live and evolve together inside this workspace.
52
+
53
+ Read more about creating artifacts here:
54
+ https://unisphere.kaltura.com/docs/create/overview
55
+
56
+ ---
57
+
58
+ ## Deploy
59
+
60
+ To deploy **packages, applications, and runtimes**, follow the deployment guide:
61
+ https://unisphere.kaltura.com/docs/create/devops/deploy
62
+
63
+ For **applications and runtimes**, deployment is only part of the process.
64
+ After deployment, they must also be activated to become available in production.
65
+
66
+ Activation guide:
67
+ https://unisphere.kaltura.com/docs/create/devops/activate
68
+
69
+ ---
70
+
71
+ ## Local Development
72
+
73
+ Unisphere provides a structured local development flow that mirrors production as closely as possible, while still keeping things fast and developer-friendly.
74
+
75
+ This includes:
76
+ - Local builds
77
+ - Watching and rebuilding artifacts
78
+ - Running applications in isolation or as part of a larger workspace
79
+
80
+ Read more about local development here:
81
+ https://unisphere.kaltura.com/docs/create/local-development
82
+
83
+ ---
84
+
85
+ ## Available Commands
86
+
87
+ This workspace exposes a small set of opinionated commands to help you explore, validate, and manage the experience.
88
+
89
+ ### Start
90
+ Lists all available commands for each artifact in the experience, including how to build and serve runtimes, and how to spawn applications.
91
+
92
+ ```bash
93
+ npm run start
94
+ ```
95
+
96
+
97
+ ### Info
98
+ Displays information about the current workspace, including detected artifacts, configuration, and environment details.
99
+
100
+ ```bash
101
+ npm run info
102
+ ```
103
+
104
+ ### Check
105
+ Validates the workspace setup and verifies that all required artifacts and configurations are in place.
106
+
107
+ ```bash
108
+ npm run check
109
+ ```
110
+
111
+ ### Reset
112
+ Resets the workspace to a clean state. Useful when experimenting or when local state becomes inconsistent.
113
+
114
+ ```bash
115
+ npm run reset
116
+ ```
117
+
118
+
119
+ ---
120
+
121
+ ## Next Steps
122
+
123
+ If this is your first time working with Unisphere, a great next step is to **create a runtime with a playground**.
124
+
125
+ Follow the Hello World walkthrough here:
126
+ [https://unisphere.kaltura.com/docs/create/overview](https://unisphere.kaltura.com/docs/create/overview)
127
+
128
+ The walkthrough will guide you through:
129
+
130
+ * Creating your first runtime
131
+ * Running it locally with a playground
132
+ * Understanding how runtimes, packages, and applications connect together
133
+
134
+ This will give you a strong foundation for building and evolving the experience over time.
package/migrations.json CHANGED
@@ -18,10 +18,10 @@
18
18
  },
19
19
  "1-22-0-replace-patches": {
20
20
  "version": "1.22.0",
21
- "description": "Replaces patches with updated version for Nx 22.1.3",
21
+ "description": "Replaces patches with updated version for Nx 22.1.3 and changeset cli",
22
22
  "factory": "./dist/migrations/1-22-0/replace-patches.js",
23
23
  "cli": {
24
- "postUpdateMessage": "✅ Patches have been replaced with updated version for Nx 22.1.3."
24
+ "postUpdateMessage": "✅ Patches have been replaced with updated version for Nx 22.1.3 and changeset cli."
25
25
  }
26
26
  },
27
27
  "1-22-1-sync-inner-package-json-dependencies": {
@@ -58,6 +58,11 @@
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
+ "1-22-4-summary": {
62
+ "version": "1.22.4",
63
+ "description": "Migration completion summary for 1.22.4",
64
+ "factory": "./dist/migrations/1-22-4/summary.js"
65
+ },
61
66
  "2-0-0-update-npmrc": {
62
67
  "version": "2.0.0",
63
68
  "description": "Updates .npmrc to remove legacy-peer-deps=true",
@@ -102,15 +107,42 @@
102
107
  "postUpdateMessage": "✅ Patches have been replaced"
103
108
  }
104
109
  },
105
- "000-1-22-4-summary": {
106
- "version": "1.22.4",
107
- "description": "Migration completion summary for 1.22.4",
108
- "factory": "./dist/migrations/summaries/1-22-4-summary.js"
109
- },
110
- "000-2-0-0-summary": {
110
+ "2-0-0-summary": {
111
111
  "version": "2.0.0",
112
112
  "description": "Migration completion summary for 2.0.0",
113
- "factory": "./dist/migrations/summaries/2-0-0-summary.js"
113
+ "factory": "./dist/migrations/2-0-0/summary.js"
114
+ },
115
+ "2-1-0-replace-readme-md": {
116
+ "version": "2.1.0",
117
+ "description": "Replaces README.md from template",
118
+ "factory": "./dist/migrations/2-1-0/replace-readme-md.js",
119
+ "cli": {
120
+ "postUpdateMessage": "✅ README.md has been replaced"
121
+ }
122
+ },
123
+ "2-1-0-remove-storybook": {
124
+ "version": "2.1.0",
125
+ "description": "Removes storybook files and dependencies",
126
+ "factory": "./dist/migrations/2-1-0/remove-storybook.js",
127
+ "cli": {
128
+ "postUpdateMessage": "✅ Storybook files and dependencies have been removed"
129
+ }
130
+ },
131
+ "2-1-0-remove-react-overrides": {
132
+ "version": "2.1.0",
133
+ "description": "Removes React overrides from package.json",
134
+ "factory": "./dist/migrations/2-1-0/remove-react-overrides.js",
135
+ "cli": {
136
+ "postUpdateMessage": "✅ React overrides have been removed"
137
+ }
138
+ },
139
+ "2-1-0-remove-rollup-plugin-node-builtins": {
140
+ "version": "2.1.0",
141
+ "description": "Removes rollup-plugin-node-builtins dependency",
142
+ "factory": "./dist/migrations/2-1-0/remove-rollup-plugin-node-builtins.js",
143
+ "cli": {
144
+ "postUpdateMessage": "✅ rollup-plugin-node-builtins dependency has been removed"
145
+ }
114
146
  }
115
147
  },
116
148
  "packageJsonUpdates": {
@@ -162,6 +194,14 @@
162
194
  "version": "^7.3.4",
163
195
  "alwaysAddToPackageJson": false
164
196
  },
197
+ "@mui/x-date-pickers": {
198
+ "version": "8.11.3",
199
+ "alwaysAddToPackageJson": false
200
+ },
201
+ "@mui/x-tree-view": {
202
+ "version": "7.29.1",
203
+ "alwaysAddToPackageJson": false
204
+ },
165
205
  "@mui/icons-material": {
166
206
  "version": "^7.3.4",
167
207
  "alwaysAddToPackageJson": false
@@ -191,7 +231,11 @@
191
231
  "alwaysAddToPackageJson": false
192
232
  },
193
233
  "@types/node": {
194
- "@types/node": "24.3.2",
234
+ "version": "24.3.2",
235
+ "alwaysAddToPackageJson": false
236
+ },
237
+ "@unisphere/runtime-react": {
238
+ "version": "^1.80.1",
195
239
  "alwaysAddToPackageJson": false
196
240
  },
197
241
  "@types/react": {
@@ -213,6 +257,10 @@
213
257
  "@emotion/styled": {
214
258
  "version": "11.14.1",
215
259
  "alwaysAddToPackageJson": false
260
+ },
261
+ "@vitejs/plugin-react": {
262
+ "version": "^4.7.0",
263
+ "alwaysAddToPackageJson": false
216
264
  }
217
265
  }
218
266
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,2 +0,0 @@
1
- export default function (): Promise<void>;
2
- //# sourceMappingURL=1-22-4-summary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"1-22-4-summary.d.ts","sourceRoot":"","sources":["../../../src/migrations/summaries/1-22-4-summary.ts"],"names":[],"mappings":"AAEA,0CAOC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"2-0-0-summary.d.ts","sourceRoot":"","sources":["../../../src/migrations/summaries/2-0-0-summary.ts"],"names":[],"mappings":"AAEA,0CAOC"}