@unisphere/nx 4.15.6 → 4.15.7

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":"add-application.d.ts","sourceRoot":"","sources":["../../../src/generators/add-application/add-application.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAAgD,MAAM,YAAY,CAAC;AAE5G,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAwEzD,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,6BAA6B,uBA6KvC;AAED,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"add-application.d.ts","sourceRoot":"","sources":["../../../src/generators/add-application/add-application.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAAsC,MAAM,YAAY,CAAC;AAElG,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAwEzD,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,6BAA6B,uBA4KvC;AAED,eAAe,uBAAuB,CAAC"}
@@ -115,16 +115,17 @@ async function addApplicationGenerator(tree, options) {
115
115
  (0, devkit_1.generateFiles)(tree, path.join(__dirname, templatePath), projectRoot, templateVariables);
116
116
  // For local-dev-playground apps, generate setup-local-runtimes.ts
117
117
  if (isPlayground) {
118
- const rawConfig = (0, devkit_1.readJson)(tree, '.unisphere');
119
- const experienceName = `unisphere.${rawConfig.type}.${rawConfig.name}`;
120
118
  const setupLocalRuntimesContent = `export function setupLocalRuntimes() {
121
119
  if (!process.env.LOCAL_RUNTIMES) return;
122
120
 
123
- const runtimes: Record<string, { token: string; baseEnvName: string }> = {};
121
+ const runtimes: Record<string, Record<string, { token: string; baseEnvName: string }>> = {};
124
122
  process.env.LOCAL_RUNTIMES.split(',').forEach((entry) => {
125
- const [name, port] = entry.split('@');
126
- if (name && port) {
127
- runtimes[name] = { token: port, baseEnvName: '' };
123
+ const [experience, name, port] = entry.split('@');
124
+ if (experience && name && port) {
125
+ if (!runtimes[experience]) {
126
+ runtimes[experience] = {};
127
+ }
128
+ runtimes[experience][name] = { token: port, baseEnvName: '' };
128
129
  }
129
130
  });
130
131
 
@@ -133,9 +134,7 @@ async function addApplicationGenerator(tree, options) {
133
134
  mode: 'integration',
134
135
  options: { verbose: 'inherit' },
135
136
  baseEnvScope: { core: 'inherit', presets: 'inherit' },
136
- runtimes: {
137
- '${experienceName}': runtimes,
138
- },
137
+ runtimes,
139
138
  };
140
139
 
141
140
  (window as any).unisphereRuntimeOverrides = btoa(JSON.stringify(overrides));
@@ -66,7 +66,7 @@ export function App() {
66
66
  visuals: [
67
67
  <% if (!visualName) { %>/*<% } %>{
68
68
  type: '<%= visualName ? visualName__camelCase : "~~provide-the-visual-name-to-mount-here~~" %>',
69
- target: 'mainContainer',
69
+ target: { type: 'element', elementId: 'mainContainer' },
70
70
  settings: {}<% if (visualName) { %> as <%= runtimeName__pascalCase %>Runtime<%= visualName__pascalCase %>VisualSettings<% } %>
71
71
  }<% if (!visualName) { %>*/<% } %>
72
72
  ],
@@ -18,7 +18,10 @@ export const HelloWorldExperience = ({ preload }: { preload?: boolean }) => {
18
18
  if (runtime) {
19
19
  const { unsubscribe } = runtime.mountVisual({
20
20
  type: 'docs',
21
- target: 'hello-world-experience-container',
21
+ target: {
22
+ type: 'element',
23
+ elementId: 'hello-world-experience-container',
24
+ },
22
25
  settings: {}
23
26
  });
24
27
 
package/migrations.json CHANGED
@@ -1164,6 +1164,17 @@
1164
1164
  "alwaysAddToPackageJson": false
1165
1165
  }
1166
1166
  }
1167
+ },
1168
+ "4.15.7": {
1169
+ "version": "4.15.7",
1170
+ "cli": "nx",
1171
+ "postUpdateMessage": "🎉 Migration to @unisphere/nx 4.15.7 completed successfully!",
1172
+ "packages": {
1173
+ "@unisphere/cli": {
1174
+ "version": "6.1.2",
1175
+ "alwaysAddToPackageJson": false
1176
+ }
1177
+ }
1167
1178
  }
1168
1179
  }
1169
1180
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "4.15.6",
3
+ "version": "4.15.7",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",