@unisphere/nx 3.2.4 → 3.3.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.
- package/dist/generators/add-application/add-application.d.ts.map +1 -1
- package/dist/generators/add-application/add-application.js +12 -117
- package/dist/generators/add-application/schema.d.ts +1 -1
- package/dist/generators/add-application/schema.json +0 -4
- package/dist/generators/add-documentation/add-documentation.d.ts +5 -0
- package/dist/generators/add-documentation/add-documentation.d.ts.map +1 -0
- package/dist/generators/add-documentation/add-documentation.js +97 -0
- package/dist/generators/add-documentation/schema.d.ts +3 -0
- package/dist/generators/add-documentation/schema.json +21 -0
- package/dist/generators/utils.d.ts +1 -1
- package/dist/generators/utils.d.ts.map +1 -1
- package/generators.json +5 -0
- package/package.json +1 -1
|
@@ -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,EAAsC,MAAM,YAAY,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;AAkHzD,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,6BAA6B,uBAiIvC;AAED,eAAe,uBAAuB,CAAC"}
|
|
@@ -4,8 +4,6 @@ exports.addApplicationGenerator = addApplicationGenerator;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const path = tslib_1.__importStar(require("path"));
|
|
7
|
-
const child_process_1 = require("child_process");
|
|
8
|
-
const fs = tslib_1.__importStar(require("fs"));
|
|
9
7
|
const utils_1 = require("../utils");
|
|
10
8
|
const dependency_config_1 = require("../dependency-config");
|
|
11
9
|
async function getEnquirerPrompt() {
|
|
@@ -62,7 +60,7 @@ async function promptForHtmlPageTitle() {
|
|
|
62
60
|
});
|
|
63
61
|
return response.htmlPageTitle;
|
|
64
62
|
}
|
|
65
|
-
async function promptForDependencies(
|
|
63
|
+
async function promptForDependencies(_isPlayground) {
|
|
66
64
|
const prompt = await getEnquirerPrompt();
|
|
67
65
|
const choices = [
|
|
68
66
|
{ value: 'ds', label: 'Kaltura DS - Design System (requires GIT_TOKEN)' },
|
|
@@ -81,50 +79,19 @@ async function addApplicationGenerator(tree, options) {
|
|
|
81
79
|
throw new Error('iframe-with-post-messages serving type is not currently supported. Please choose a different serving type.');
|
|
82
80
|
}
|
|
83
81
|
const isPlayground = options.servingType === 'local-dev-playground';
|
|
84
|
-
const isDocumentation = options.servingType === 'documentation';
|
|
85
|
-
// Check workspace pattern for documentation apps
|
|
86
|
-
if (isDocumentation) {
|
|
87
|
-
const rootPackageJsonPath = 'package.json';
|
|
88
|
-
if (tree.exists(rootPackageJsonPath)) {
|
|
89
|
-
const packageJson = JSON.parse(tree.read(rootPackageJsonPath, 'utf-8') || '{}');
|
|
90
|
-
const workspaces = packageJson.workspaces || [];
|
|
91
|
-
// Check if using the old catch-all pattern that doesn't work with documentation apps
|
|
92
|
-
const hasCatchAllPattern = workspaces.includes('unisphere/**');
|
|
93
|
-
const hasNegationPattern = workspaces.some((pattern) => pattern.startsWith('!'));
|
|
94
|
-
if (hasCatchAllPattern || hasNegationPattern) {
|
|
95
|
-
throw new Error('Documentation applications require @unisphere/nx version 3.1.0 or higher.\n\n' +
|
|
96
|
-
'Your workspace is using an old npm workspaces pattern that prevents documentation apps ' +
|
|
97
|
-
'from having their own node_modules.\n\n' +
|
|
98
|
-
'Please upgrade by running:\n' +
|
|
99
|
-
' npx nx migrate @unisphere/nx@latest\n' +
|
|
100
|
-
' npx nx migrate --run-migrations\n\n' +
|
|
101
|
-
'This will update your workspace pattern to support documentation apps.');
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
82
|
// Validate and read .unisphere configuration
|
|
106
83
|
const unisphereConfig = (0, utils_1.validateUnisphereConfig)(tree);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (!
|
|
111
|
-
const promptResult = await promptForRuntimeName(unisphereConfig.runtimes, options.runtimeName || '', options.visualName || '', options.skipDynamicRuntimeVisualPrompt || false);
|
|
112
|
-
runtimeName = promptResult.runtimeName;
|
|
113
|
-
visualName = promptResult.visualName;
|
|
114
|
-
}
|
|
115
|
-
// Skip HTML page title prompt for documentation (Docusaurus has its own config)
|
|
116
|
-
if (!isPlayground && !isDocumentation && !options.htmlPageTitle) {
|
|
84
|
+
const promptResult = await promptForRuntimeName(unisphereConfig.runtimes, options.runtimeName || '', options.visualName || '', options.skipDynamicRuntimeVisualPrompt || false);
|
|
85
|
+
const runtimeName = promptResult.runtimeName;
|
|
86
|
+
const visualName = promptResult.visualName;
|
|
87
|
+
if (!isPlayground && !options.htmlPageTitle) {
|
|
117
88
|
options.htmlPageTitle = options.htmlPageTitle || await promptForHtmlPageTitle();
|
|
118
89
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
if (!isDocumentation) {
|
|
122
|
-
if (options.dependencies === undefined) {
|
|
123
|
-
options.dependencies = await promptForDependencies(isPlayground);
|
|
124
|
-
}
|
|
125
|
-
const baseDependencies = ['react'];
|
|
126
|
-
selectedDependencies = [...baseDependencies, ...(options.dependencies || [])];
|
|
90
|
+
if (options.dependencies === undefined) {
|
|
91
|
+
options.dependencies = await promptForDependencies(isPlayground);
|
|
127
92
|
}
|
|
93
|
+
const baseDependencies = ['react'];
|
|
94
|
+
const selectedDependencies = [...baseDependencies, ...(options.dependencies || [])];
|
|
128
95
|
// Validate runtime exists if runtimeName is provided
|
|
129
96
|
if (runtimeName) {
|
|
130
97
|
if (!(0, utils_1.checkIfRuntimeExists)(tree, runtimeName)) {
|
|
@@ -138,83 +105,11 @@ async function addApplicationGenerator(tree, options) {
|
|
|
138
105
|
applicationName += '-dev';
|
|
139
106
|
}
|
|
140
107
|
const applicationNameAsLowerDashCase = (0, devkit_1.names)(applicationName).fileName;
|
|
141
|
-
|
|
142
|
-
const typesPackageInfo = isDocumentation ? null : (0, utils_1.findTypesOrCorePackageInfo)(tree);
|
|
108
|
+
const typesPackageInfo = (0, utils_1.findTypesOrCorePackageInfo)(tree);
|
|
143
109
|
// Determine subdirectory based on serving type
|
|
144
|
-
// local-dev-playground -> local/,
|
|
145
|
-
const subdirectory = isPlayground ? 'local' :
|
|
110
|
+
// local-dev-playground -> local/, other types -> server/
|
|
111
|
+
const subdirectory = isPlayground ? 'local' : 'server';
|
|
146
112
|
const projectRoot = `unisphere/applications/${subdirectory}/${applicationNameAsLowerDashCase}`;
|
|
147
|
-
// Handle documentation type separately
|
|
148
|
-
if (isDocumentation) {
|
|
149
|
-
// Check if the application already exists
|
|
150
|
-
if (tree.exists(projectRoot)) {
|
|
151
|
-
throw new Error(`Application "${applicationNameAsLowerDashCase}" already exists at ${projectRoot}.\n` +
|
|
152
|
-
'Please choose a different application name or remove the existing application first.');
|
|
153
|
-
}
|
|
154
|
-
// Update .unisphere configuration (applicationType is derived from folder path)
|
|
155
|
-
(0, utils_1.updateUnisphereConfig)(tree, 'applications', applicationNameAsLowerDashCase, {
|
|
156
|
-
sourceRoot: projectRoot,
|
|
157
|
-
});
|
|
158
|
-
// Add documentation folder to .nxignore to prevent NX from scanning it
|
|
159
|
-
// Docusaurus has its own node_modules which can slow down NX
|
|
160
|
-
const nxIgnorePath = '.nxignore';
|
|
161
|
-
const ignoreEntry = `${projectRoot}/node_modules`;
|
|
162
|
-
let nxIgnoreContent = '';
|
|
163
|
-
if (tree.exists(nxIgnorePath)) {
|
|
164
|
-
nxIgnoreContent = tree.read(nxIgnorePath, 'utf-8') || '';
|
|
165
|
-
}
|
|
166
|
-
if (!nxIgnoreContent.includes(ignoreEntry)) {
|
|
167
|
-
const newContent = nxIgnoreContent
|
|
168
|
-
? `${nxIgnoreContent.trimEnd()}\n\n# Documentation site (Docusaurus) - has its own node_modules\n${ignoreEntry}\n`
|
|
169
|
-
: `# Documentation site (Docusaurus) - has its own node_modules\n${ignoreEntry}\n`;
|
|
170
|
-
tree.write(nxIgnorePath, newContent);
|
|
171
|
-
}
|
|
172
|
-
// Documentation folders are automatically excluded from npm workspaces
|
|
173
|
-
// because the root package.json uses explicit workspace patterns that don't include
|
|
174
|
-
// unisphere/applications/documentation/**
|
|
175
|
-
// This allows documentation sites (like Docusaurus) to have their own node_modules
|
|
176
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
177
|
-
// Return a function that will be executed after all file operations are complete
|
|
178
|
-
return () => {
|
|
179
|
-
const workspaceRoot = process.cwd();
|
|
180
|
-
const fullProjectPath = path.join(workspaceRoot, projectRoot);
|
|
181
|
-
devkit_1.logger.info('');
|
|
182
|
-
devkit_1.logger.info('📚 Setting up Docusaurus documentation site...');
|
|
183
|
-
devkit_1.logger.info('');
|
|
184
|
-
try {
|
|
185
|
-
// Create the parent directory if it doesn't exist
|
|
186
|
-
const parentDir = path.dirname(fullProjectPath);
|
|
187
|
-
if (!fs.existsSync(parentDir)) {
|
|
188
|
-
fs.mkdirSync(parentDir, { recursive: true });
|
|
189
|
-
}
|
|
190
|
-
// Run Docusaurus CLI to scaffold the project
|
|
191
|
-
// Docusaurus creates a self-contained project with its own package.json
|
|
192
|
-
// No NX integration needed - we just delegate to Docusaurus CLI for serve/build
|
|
193
|
-
// Use public npm registry explicitly (workspaces may have private registry configured)
|
|
194
|
-
devkit_1.logger.info('Running Docusaurus CLI...');
|
|
195
|
-
(0, child_process_1.execSync)(`npx --yes --registry https://registry.npmjs.org create-docusaurus@3 "${fullProjectPath}" classic --typescript`, {
|
|
196
|
-
stdio: 'inherit',
|
|
197
|
-
cwd: workspaceRoot,
|
|
198
|
-
});
|
|
199
|
-
devkit_1.logger.info('');
|
|
200
|
-
devkit_1.logger.info('✅ Documentation site generated successfully!');
|
|
201
|
-
devkit_1.logger.info('');
|
|
202
|
-
devkit_1.logger.info(`📚 Application Name: ${applicationNameAsLowerDashCase}`);
|
|
203
|
-
devkit_1.logger.info(`🔧 Type: Documentation Site (Docusaurus)`);
|
|
204
|
-
devkit_1.logger.info(`📁 Location: ${projectRoot}`);
|
|
205
|
-
devkit_1.logger.info('');
|
|
206
|
-
devkit_1.logger.info(`📜 To serve: npx unisphere application serve ${applicationNameAsLowerDashCase}`);
|
|
207
|
-
devkit_1.logger.info(`📦 To build: npx unisphere application build ${applicationNameAsLowerDashCase}`);
|
|
208
|
-
devkit_1.logger.info('');
|
|
209
|
-
}
|
|
210
|
-
catch (error) {
|
|
211
|
-
devkit_1.logger.error('Failed to create Docusaurus project:');
|
|
212
|
-
devkit_1.logger.error(error instanceof Error ? error.message : String(error));
|
|
213
|
-
throw error;
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
// Standard application flow (non-documentation)
|
|
218
113
|
const hasDs = selectedDependencies.includes('ds');
|
|
219
114
|
const templateVariables = {
|
|
220
115
|
htmlPageTitle: options.servingType === 'local-dev-playground'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface AddApplicationGeneratorSchema {
|
|
2
2
|
name: string;
|
|
3
3
|
htmlPageTitle?: string;
|
|
4
|
-
servingType: 'local-dev-playground' | 'self-hosted' | 'iframe-with-post-messages'
|
|
4
|
+
servingType: 'local-dev-playground' | 'self-hosted' | 'iframe-with-post-messages';
|
|
5
5
|
runtimeName?: string;
|
|
6
6
|
visualName?: string;
|
|
7
7
|
skipDynamicRuntimeVisualPrompt?: boolean; // Internal option to skip the dynamic prompt for visual when runtime is selected
|
|
@@ -33,10 +33,6 @@
|
|
|
33
33
|
{
|
|
34
34
|
"value": "iframe-with-post-messages",
|
|
35
35
|
"label": "Iframe + Post Messages (suitible to applications that gets required configuration from post messages)"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"value": "documentation",
|
|
39
|
-
"label": "Documentation Site (Docusaurus)"
|
|
40
36
|
}
|
|
41
37
|
]
|
|
42
38
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
import { AddDocumentationGeneratorSchema } from './schema';
|
|
3
|
+
export declare function addDocumentationGenerator(tree: Tree, options: AddDocumentationGeneratorSchema): Promise<() => void>;
|
|
4
|
+
export default addDocumentationGenerator;
|
|
5
|
+
//# sourceMappingURL=add-documentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-documentation.d.ts","sourceRoot":"","sources":["../../../src/generators/add-documentation/add-documentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAAiB,MAAM,YAAY,CAAC;AAI9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAM3D,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,+BAA+B,uBA4GzC;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addDocumentationGenerator = addDocumentationGenerator;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const path = tslib_1.__importStar(require("path"));
|
|
7
|
+
const child_process_1 = require("child_process");
|
|
8
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
9
|
+
const utils_1 = require("../utils");
|
|
10
|
+
async function addDocumentationGenerator(tree, options) {
|
|
11
|
+
// Validate .unisphere configuration exists
|
|
12
|
+
(0, utils_1.validateUnisphereConfig)(tree);
|
|
13
|
+
// Check workspace pattern for documentation apps
|
|
14
|
+
const rootPackageJsonPath = 'package.json';
|
|
15
|
+
if (tree.exists(rootPackageJsonPath)) {
|
|
16
|
+
const packageJson = JSON.parse(tree.read(rootPackageJsonPath, 'utf-8') || '{}');
|
|
17
|
+
const workspaces = packageJson.workspaces || [];
|
|
18
|
+
// Check if using the old catch-all pattern that doesn't work with documentation apps
|
|
19
|
+
const hasCatchAllPattern = workspaces.includes('unisphere/**');
|
|
20
|
+
if (hasCatchAllPattern) {
|
|
21
|
+
throw new Error('Documentation sites require @unisphere/nx version 3.1.0 or higher.\n\n' +
|
|
22
|
+
'Your workspace is using an old npm workspaces pattern that prevents documentation sites ' +
|
|
23
|
+
'from having their own node_modules.\n\n' +
|
|
24
|
+
'Please upgrade by running:\n' +
|
|
25
|
+
' npx nx migrate @unisphere/nx@latest\n' +
|
|
26
|
+
' npx nx migrate --run-migrations\n\n' +
|
|
27
|
+
'This will update your workspace pattern to support documentation sites.');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const documentationName = options.name;
|
|
31
|
+
const documentationNameAsLowerDashCase = (0, devkit_1.names)(documentationName).fileName;
|
|
32
|
+
const projectRoot = `unisphere/documentation/${documentationNameAsLowerDashCase}`;
|
|
33
|
+
// Check if the documentation site already exists
|
|
34
|
+
if (tree.exists(projectRoot)) {
|
|
35
|
+
throw new Error(`Documentation site "${documentationNameAsLowerDashCase}" already exists at ${projectRoot}.\n` +
|
|
36
|
+
'Please choose a different name or remove the existing documentation site first.');
|
|
37
|
+
}
|
|
38
|
+
// Update .unisphere configuration
|
|
39
|
+
(0, utils_1.updateUnisphereConfig)(tree, 'documentation', documentationNameAsLowerDashCase, {
|
|
40
|
+
sourceRoot: projectRoot,
|
|
41
|
+
});
|
|
42
|
+
// Add documentation folder to .nxignore to prevent NX from scanning it
|
|
43
|
+
// Docusaurus has its own node_modules which can slow down NX
|
|
44
|
+
const nxIgnorePath = '.nxignore';
|
|
45
|
+
const ignoreEntry = `${projectRoot}/node_modules`;
|
|
46
|
+
let nxIgnoreContent = '';
|
|
47
|
+
if (tree.exists(nxIgnorePath)) {
|
|
48
|
+
nxIgnoreContent = tree.read(nxIgnorePath, 'utf-8') || '';
|
|
49
|
+
}
|
|
50
|
+
if (!nxIgnoreContent.includes(ignoreEntry)) {
|
|
51
|
+
const newContent = nxIgnoreContent
|
|
52
|
+
? `${nxIgnoreContent.trimEnd()}\n\n# Documentation site (Docusaurus) - has its own node_modules\n${ignoreEntry}\n`
|
|
53
|
+
: `# Documentation site (Docusaurus) - has its own node_modules\n${ignoreEntry}\n`;
|
|
54
|
+
tree.write(nxIgnorePath, newContent);
|
|
55
|
+
}
|
|
56
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
57
|
+
// Return a function that will be executed after all file operations are complete
|
|
58
|
+
return () => {
|
|
59
|
+
const workspaceRoot = process.cwd();
|
|
60
|
+
const fullProjectPath = path.join(workspaceRoot, projectRoot);
|
|
61
|
+
devkit_1.logger.info('');
|
|
62
|
+
devkit_1.logger.info('Setting up Docusaurus documentation site...');
|
|
63
|
+
devkit_1.logger.info('');
|
|
64
|
+
try {
|
|
65
|
+
// Create the parent directory if it doesn't exist
|
|
66
|
+
const parentDir = path.dirname(fullProjectPath);
|
|
67
|
+
if (!fs.existsSync(parentDir)) {
|
|
68
|
+
fs.mkdirSync(parentDir, { recursive: true });
|
|
69
|
+
}
|
|
70
|
+
// Run Docusaurus CLI to scaffold the project
|
|
71
|
+
// Docusaurus creates a self-contained project with its own package.json
|
|
72
|
+
// No NX integration needed - we just delegate to Docusaurus CLI for serve/build
|
|
73
|
+
// Use public npm registry explicitly (workspaces may have private registry configured)
|
|
74
|
+
devkit_1.logger.info('Running Docusaurus CLI...');
|
|
75
|
+
(0, child_process_1.execSync)(`npx --yes --registry https://registry.npmjs.org create-docusaurus@3 "${fullProjectPath}" classic --typescript`, {
|
|
76
|
+
stdio: 'inherit',
|
|
77
|
+
cwd: workspaceRoot,
|
|
78
|
+
});
|
|
79
|
+
devkit_1.logger.info('');
|
|
80
|
+
devkit_1.logger.info('Documentation site generated successfully!');
|
|
81
|
+
devkit_1.logger.info('');
|
|
82
|
+
devkit_1.logger.info(`Name: ${documentationNameAsLowerDashCase}`);
|
|
83
|
+
devkit_1.logger.info(`Type: Documentation Site (Docusaurus)`);
|
|
84
|
+
devkit_1.logger.info(`Location: ${projectRoot}`);
|
|
85
|
+
devkit_1.logger.info('');
|
|
86
|
+
devkit_1.logger.info(`To serve: npx unisphere documentation serve ${documentationNameAsLowerDashCase}`);
|
|
87
|
+
devkit_1.logger.info(`To build: npx unisphere documentation build ${documentationNameAsLowerDashCase}`);
|
|
88
|
+
devkit_1.logger.info('');
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
devkit_1.logger.error('Failed to create Docusaurus project:');
|
|
92
|
+
devkit_1.logger.error(error instanceof Error ? error.message : String(error));
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
exports.default = addDocumentationGenerator;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "AddDocumentation",
|
|
4
|
+
"title": "Add Documentation Generator",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the documentation site to create",
|
|
10
|
+
"pattern": "^[a-zA-Z][a-zA-Z0-9\\-\\s]*$",
|
|
11
|
+
"$default": {
|
|
12
|
+
"$source": "argv",
|
|
13
|
+
"index": 0
|
|
14
|
+
},
|
|
15
|
+
"x-prompt": "What is the documentation site name? (letters, numbers, dashes and spaces allowed)"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"name"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -9,7 +9,7 @@ export interface UnisphereConfig {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function validateUnisphereConfig(tree: Tree): UnisphereConfig;
|
|
11
11
|
export declare function updateTsConfigPaths(tree: Tree, pathKey: string, pathValue: string): void;
|
|
12
|
-
export declare function updateUnisphereConfig(tree: Tree, elementType: 'packages' | 'runtimes' | 'applications', elementName: string, elementConfig: Record<string, any>): void;
|
|
12
|
+
export declare function updateUnisphereConfig(tree: Tree, elementType: 'packages' | 'runtimes' | 'applications' | 'documentation', elementName: string, elementConfig: Record<string, any>): void;
|
|
13
13
|
export declare function validateRuntimeExists(tree: Tree, runtimeName: string): string;
|
|
14
14
|
export declare function findCorePackageAlias(tree: Tree): string;
|
|
15
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/generators/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;QACvB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC,CAAC;CACJ;AA+FD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,CAkEnE;AAGD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,QA2BjF;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,UAAU,GAAG,UAAU,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/generators/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAKL,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;QACvB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC,CAAC;CACJ;AA+FD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,CAkEnE;AAGD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,QA2BjF;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,eAAe,EACvE,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QA0BnC;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CA4C7E;AA0BD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CA6BvD;AAsBD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAuB/D;AAED,MAAM,WAAW,gBAAgB;IAC/B,yFAAyF;IACzF,KAAK,EAAE,MAAM,CAAC;IACd,0GAA0G;IAC1G,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,eAAe,EAAE,OAAO,CAAC;CAC1B;AAgCD;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,GAAG,gBAAgB,CA8BvE;AAGD,KAAK,mBAAmB,CAAC,MAAM,SAAS,MAAM,IAAI;KAC/C,CAAC,IACA,GAAG,MAAM,EAAE,GACX,GAAG,MAAM,iBAAiB,GAC1B,GAAG,MAAM,aAAa,GACtB,GAAG,MAAM,cAAc,GACvB,GAAG,MAAM,gBAAgB,GACzB,GAAG,MAAM,iBAAiB,GAAG,MAAM;CACtC,CAAC;AAKF,wBAAgB,oBAAoB,CAAC,MAAM,SAAS,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAwBzH;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAwBlF;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAgB7E;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,CAQrG;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWnF;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAI3E;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GACpB,IAAI,CAyBN"}
|
package/generators.json
CHANGED
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
"schema": "./dist/generators/add-application/schema.json",
|
|
16
16
|
"description": "add-application generator"
|
|
17
17
|
},
|
|
18
|
+
"add-documentation": {
|
|
19
|
+
"factory": "./dist/generators/add-documentation/add-documentation",
|
|
20
|
+
"schema": "./dist/generators/add-documentation/schema.json",
|
|
21
|
+
"description": "Add a documentation site (Docusaurus)"
|
|
22
|
+
},
|
|
18
23
|
"add-visual": {
|
|
19
24
|
"factory": "./dist/generators/add-visual/add-visual",
|
|
20
25
|
"schema": "./dist/generators/add-visual/schema.json",
|