@unisphere/nx 4.4.0 → 4.4.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":"add-runtime.d.ts","sourceRoot":"","sources":["../../../src/generators/add-runtime/add-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAAsC,MAAM,YAAY,CAAC;AAElG,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAgFrD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,uBA8GnC;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,EAAsC,MAAM,YAAY,CAAC;AAElG,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AA+DrD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,uBAyGnC;AAED,eAAe,mBAAmB,CAAC"}
@@ -12,7 +12,7 @@ function validateOptions(options) {
12
12
  ` Description: The name of the runtime to create\n` +
13
13
  ` Type: string\n` +
14
14
  ` Pattern: ^[a-zA-Z][a-zA-Z0-9\\-\\s]*$\n` +
15
- ` Example: nx g @unisphere/nx:add-runtime --name=my-runtime --consumer=external`);
15
+ ` Example: nx g @unisphere/nx:add-runtime --name=my-runtime`);
16
16
  }
17
17
  const namePattern = /^[a-zA-Z][a-zA-Z0-9\-\s]*$/;
18
18
  if (!namePattern.test(options.name)) {
@@ -20,17 +20,6 @@ function validateOptions(options) {
20
20
  ` Pattern: ^[a-zA-Z][a-zA-Z0-9\\-\\s]*$\n` +
21
21
  ` Received: ${options.name}`);
22
22
  }
23
- if (!options.consumer) {
24
- throw new Error(`Missing required option: 'consumer'\n` +
25
- ` Description: Is this runtime loaded from within the same experience or by an external consumer?\n` +
26
- ` Allowed values: external, internal\n` +
27
- ` Example: nx g @unisphere/nx:add-runtime --name=my-runtime --consumer=external`);
28
- }
29
- if (!['external', 'internal'].includes(options.consumer)) {
30
- throw new Error(`Invalid value '${options.consumer}' for option 'consumer'\n` +
31
- ` Allowed values: external, internal\n` +
32
- ` Received: ${options.consumer}`);
33
- }
34
23
  }
35
24
  function updateTypesIndexExport(tree, runtimeName, basePath) {
36
25
  const indexPath = `${basePath}/src/index.ts`;
@@ -52,7 +41,6 @@ function updateTypesIndexExport(tree, runtimeName, basePath) {
52
41
  }
53
42
  async function addRuntimeGenerator(tree, options) {
54
43
  validateOptions(options);
55
- let isExternal = options?.consumer === 'external' ? true : false;
56
44
  // Validate and read .unisphere configuration
57
45
  const unisphereConfig = (0, utils_1.validateUnisphereConfig)(tree);
58
46
  // Validate dependencies
@@ -117,8 +105,6 @@ async function addRuntimeGenerator(tree, options) {
117
105
  if (analyticsAppId) {
118
106
  devkit_1.logger.info(`📊 Analytics App ID: ${analyticsAppId}`);
119
107
  }
120
- devkit_1.logger.info(`🔧 Consumer: ${isExternal ? 'External' : 'Internal'}`);
121
- devkit_1.logger.info('');
122
108
  devkit_1.logger.info('📝 Next steps:');
123
109
  devkit_1.logger.info(` 1. Add a visual: nx g @unisphere/nx:add-visual --runtimeName=${userInputRuntimeName}`);
124
110
  devkit_1.logger.info(` 2. Add a dev app: nx g @unisphere/nx:add-application --name=${userInputRuntimeName}-dev --runtimeName=${userInputRuntimeName}`);
@@ -1,6 +1,5 @@
1
1
  export interface AddRuntimeGeneratorSchema {
2
2
  name: string;
3
- consumer: 'external' | 'internal';
4
3
  dependencies?: string[];
5
4
  analyticsAppId?: number;
6
5
  }
@@ -9,11 +9,6 @@
9
9
  "description": "The name of the runtime to create",
10
10
  "pattern": "^[a-zA-Z][a-zA-Z0-9\\-\\s]*$"
11
11
  },
12
- "consumer": {
13
- "type": "string",
14
- "description": "Is this runtime loaded from within the same experience or by an external consumer?",
15
- "enum": ["external", "internal"]
16
- },
17
12
  "dependencies": {
18
13
  "type": "array",
19
14
  "description": "Packages to install (react, ds, or mui)",
@@ -29,7 +24,6 @@
29
24
  }
30
25
  },
31
26
  "required": [
32
- "name",
33
- "consumer"
27
+ "name"
34
28
  ]
35
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/nx",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",