@unisphere/cli 1.15.1 → 1.16.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/cli",
3
- "version": "1.15.1",
3
+ "version": "1.16.0",
4
4
  "bin": {
5
5
  "unisphere": "./src/index.js"
6
6
  },
@@ -33,11 +33,11 @@
33
33
  "commander": "9.4.1",
34
34
  "debug": "4.3.4",
35
35
  "listr2": "8.2.5",
36
+ "colorette": "2.0.20",
37
+ "cli-table3": "0.6.5",
36
38
  "fs-extra": "10.1.0",
37
39
  "execa": "5.1.1",
38
40
  "@octokit/rest": "19.0.5",
39
- "colorette": "2.0.20",
40
- "cli-table3": "0.6.5",
41
41
  "@aws-sdk/client-s3": "3.216.0",
42
42
  "@aws-sdk/client-sts": "3.216.0",
43
43
  "sisteransi": "1.0.5",
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare const createCheckCommand: () => Command;
@@ -0,0 +1,301 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCheckCommand = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const commander_1 = require("commander");
6
+ const debug_1 = require("debug");
7
+ const listr2_1 = require("listr2");
8
+ const utils_1 = require("../../utils/utils");
9
+ const workspace_1 = require("../../utils/unisphere/workspace");
10
+ const defaults_1 = require("../../utils/listr2/defaults");
11
+ const colorette_1 = require("colorette");
12
+ const Table = require("cli-table3");
13
+ const build_unisphere_elements_1 = require("../../utils/unisphere/build-unisphere-elements");
14
+ const debug = (0, debug_1.default)('unisphere:package:build');
15
+ const createCheckCommand = () => {
16
+ const command = new commander_1.Command('check');
17
+ command
18
+ .description('check the project readiness for deployment')
19
+ .option('--verbose', 'output debug logs', false)
20
+ .option('--cwd <name>', 'the working directory')
21
+ .hook('preAction', utils_1.printVerboseHook)
22
+ .action((options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
23
+ const cwd = options.cwd || process.cwd();
24
+ const mainTask = new listr2_1.Listr([
25
+ {
26
+ title: 'Getting workspace',
27
+ task: (ctx) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
28
+ const workspace = yield (0, workspace_1.getUnisphereWorkspace)(cwd, {
29
+ suspendRecursion: true,
30
+ });
31
+ if (!workspace) {
32
+ debug(`No .unisphere file found in the directory ${cwd}`);
33
+ throw new Error(`No .unisphere file found in the directory`);
34
+ }
35
+ ctx.workspace = workspace;
36
+ }),
37
+ },
38
+ {
39
+ title: `Checking workspace readiness`,
40
+ task: (ctx, task) => {
41
+ const tasks = task.newListr([], {
42
+ concurrent: true,
43
+ exitOnError: false,
44
+ });
45
+ if (ctx.workspace.config.elements.workspace) {
46
+ tasks.add({
47
+ title: `Checking workspace`,
48
+ task: (ctx, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
49
+ return (0, build_unisphere_elements_1.createListrForBuildingUnisphereContext)({
50
+ cwd,
51
+ nxProjectName: ctx.workspace.config.elements.workspace.nxProjectName,
52
+ parentTask: task,
53
+ production: options.production,
54
+ lint: false,
55
+ lintFix: false,
56
+ verbose: options.verbose,
57
+ ctx: {
58
+ failure: {
59
+ type: 'workspace',
60
+ name: 'workspace',
61
+ command: 'npx unisphere context build workspace --verbose',
62
+ status: false,
63
+ },
64
+ },
65
+ postTask: {
66
+ title: 'Reporting success',
67
+ task: () => {
68
+ ctx.report.workspace = {
69
+ name: 'workspace',
70
+ command: 'npx unisphere context build workspace --verbose',
71
+ status: true,
72
+ };
73
+ },
74
+ },
75
+ });
76
+ }),
77
+ });
78
+ }
79
+ if (ctx.workspace.config.elements.loader) {
80
+ tasks.add({
81
+ title: `Checking loader`,
82
+ task: (ctx, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
83
+ return (0, build_unisphere_elements_1.createListrForBuildingUnisphereContext)({
84
+ cwd,
85
+ nxProjectName: ctx.workspace.config.elements.loader.nxProjectName,
86
+ parentTask: task,
87
+ production: options.production,
88
+ lint: false,
89
+ lintFix: false,
90
+ verbose: options.verbose,
91
+ ctx: {
92
+ failure: {
93
+ type: 'loader',
94
+ name: 'loader',
95
+ command: 'npx unisphere context build loader --verbose',
96
+ status: false,
97
+ },
98
+ },
99
+ postTask: {
100
+ title: 'Reporting success',
101
+ task: () => {
102
+ ctx.report.workspace = {
103
+ name: 'loader',
104
+ command: 'npx unisphere context build loader --verbose',
105
+ status: true,
106
+ };
107
+ },
108
+ },
109
+ });
110
+ }),
111
+ });
112
+ }
113
+ if (ctx.workspace.config.elements.contexts) {
114
+ for (const [contextName, contextConfig] of Object.entries(ctx.workspace.config.elements.contexts)) {
115
+ tasks.add({
116
+ title: `Checking context '${contextName}'`,
117
+ task: (ctx, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
118
+ return (0, build_unisphere_elements_1.createListrForBuildingUnisphereContext)({
119
+ cwd,
120
+ nxProjectName: contextConfig.nxProjectName,
121
+ parentTask: task,
122
+ production: options.production,
123
+ lint: false,
124
+ lintFix: false,
125
+ verbose: options.verbose,
126
+ ctx: {
127
+ failure: {
128
+ type: 'context',
129
+ name: contextName,
130
+ command: `npx unisphere context build ${contextName} --verbose`,
131
+ status: false,
132
+ },
133
+ },
134
+ postTask: {
135
+ title: 'Reporting success',
136
+ task: () => {
137
+ ctx.report.contexts.push({
138
+ name: contextName,
139
+ command: `npx unisphere context build ${contextName} --verbose`,
140
+ status: true,
141
+ });
142
+ },
143
+ },
144
+ });
145
+ }),
146
+ });
147
+ }
148
+ }
149
+ if (ctx.workspace.config.elements.packages) {
150
+ for (const [packageName, packageConfig] of Object.entries(ctx.workspace.config.elements.packages)) {
151
+ tasks.add({
152
+ title: `Checking package '${packageName}'`,
153
+ task: (ctx, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
154
+ return (0, build_unisphere_elements_1.createListrForBuildingUnispherePackage)({
155
+ cwd,
156
+ nxProjectName: packageConfig.nxProjectName,
157
+ distFolder: packageConfig.distFolder,
158
+ parentTask: task,
159
+ production: options.production,
160
+ lint: true,
161
+ lintFix: true,
162
+ verbose: options.verbose,
163
+ ctx: {
164
+ failure: {
165
+ type: 'package',
166
+ name: packageName,
167
+ command: `npx unisphere package build ${packageName} --verbose`,
168
+ status: false,
169
+ },
170
+ },
171
+ postTask: {
172
+ title: 'Reporting success',
173
+ task: () => {
174
+ ctx.report.packages.push({
175
+ name: packageName,
176
+ command: `npx unisphere package build ${packageName} --verbose`,
177
+ status: true,
178
+ });
179
+ },
180
+ },
181
+ });
182
+ }),
183
+ });
184
+ }
185
+ }
186
+ return tasks;
187
+ },
188
+ },
189
+ {
190
+ title: `Collecting errors`,
191
+ task: (ctx, task) => {
192
+ var _a;
193
+ (_a = mainTask.errors) === null || _a === void 0 ? void 0 : _a.forEach((error) => {
194
+ var _a;
195
+ if ((_a = error.ctx) === null || _a === void 0 ? void 0 : _a.failure) {
196
+ const failure = error.ctx.failure;
197
+ switch (failure.type) {
198
+ case 'workspace':
199
+ ctx.report.workspace = failure;
200
+ break;
201
+ case 'loader':
202
+ ctx.report.loader = failure;
203
+ break;
204
+ case 'context':
205
+ ctx.report.contexts.push(failure);
206
+ break;
207
+ case 'package':
208
+ ctx.report.packages.push(failure);
209
+ break;
210
+ }
211
+ }
212
+ });
213
+ },
214
+ },
215
+ {
216
+ title: `Create report`,
217
+ task: (ctx, task) => {
218
+ const table = new Table({
219
+ head: ['Element', 'Type', 'Status', 'Command'],
220
+ style: {
221
+ head: ['green', 'bold'],
222
+ },
223
+ });
224
+ if (ctx.report.workspace || ctx.report.loader) {
225
+ table.push([
226
+ {
227
+ colSpan: 4,
228
+ hAlign: 'center',
229
+ content: (0, colorette_1.bold)((0, colorette_1.green)('Core')),
230
+ },
231
+ ]);
232
+ if (ctx.report.workspace) {
233
+ const { name, command, status } = ctx.report.workspace;
234
+ table.push([
235
+ (0, colorette_1.bold)('workspace'),
236
+ 'Context',
237
+ status ? (0, colorette_1.green)('OK') : (0, colorette_1.red)('FAILED'),
238
+ command,
239
+ ]);
240
+ }
241
+ if (ctx.report.loader) {
242
+ const { name, command, status } = ctx.report.loader;
243
+ table.push([
244
+ (0, colorette_1.bold)('loader'),
245
+ 'Context',
246
+ status ? (0, colorette_1.green)('OK') : (0, colorette_1.red)('FAILED'),
247
+ command,
248
+ ]);
249
+ }
250
+ }
251
+ if (ctx.report.packages.length > 0) {
252
+ table.push([
253
+ {
254
+ colSpan: 4,
255
+ hAlign: 'center',
256
+ content: (0, colorette_1.bold)((0, colorette_1.green)('Packages')),
257
+ },
258
+ ]);
259
+ for (const { name, command, status } of ctx.report.packages) {
260
+ table.push([
261
+ (0, colorette_1.bold)(name),
262
+ 'Package',
263
+ status ? (0, colorette_1.green)('OK') : (0, colorette_1.red)('FAILED'),
264
+ command,
265
+ ]);
266
+ }
267
+ }
268
+ if (ctx.report.contexts.length > 0) {
269
+ table.push([{ colSpan: 4, content: (0, colorette_1.bold)((0, colorette_1.green)('Contexts')) }]);
270
+ for (const { name, command, status } of ctx.report.contexts) {
271
+ table.push([
272
+ (0, colorette_1.bold)(name),
273
+ 'Context',
274
+ status ? (0, colorette_1.green)('OK') : (0, colorette_1.red)('FAILED'),
275
+ command,
276
+ ]);
277
+ }
278
+ }
279
+ if (table.length === 0) {
280
+ console.log('The project has no Unisphere elements');
281
+ }
282
+ else {
283
+ console.log(table.toString());
284
+ }
285
+ },
286
+ },
287
+ ], Object.assign(Object.assign({}, (0, defaults_1.getDefaultListrOptions)()), { collectErrors: 'full' }));
288
+ yield mainTask.run({
289
+ report: {
290
+ workspace: null,
291
+ loader: null,
292
+ packages: [],
293
+ contexts: [],
294
+ },
295
+ workspace: null,
296
+ });
297
+ }));
298
+ return command;
299
+ };
300
+ exports.createCheckCommand = createCheckCommand;
301
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/check/command.ts"],"names":[],"mappings":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C,MAAM,KAAK,CAAC,EAAE;wBACtB,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;qBACtD;yBAAM;wBACL,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;qBAC/B;gBACH,CAAC;aACF;SACF,kCAEI,IAAA,iCAAsB,GAAE,KAC3B,aAAa,EAAE,MAAM,IAExB,CAAC;QAEF,MAAM,QAAQ,CAAC,GAAG,CAAC;YACjB,MAAM,EAAE;gBACN,SAAS,EAAE,IAAI;gBACf,MAAM,EAAE,IAAI;gBACZ,QAAQ,EAAE,EAAE;gBACZ,QAAQ,EAAE,EAAE;aACb;YACD,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAxTW,QAAA,kBAAkB,sBAwT7B"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare const createHowToCommand: () => Command;
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createHowToCommand = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const commander_1 = require("commander");
6
+ const debug_1 = require("debug");
7
+ const listr2_1 = require("listr2");
8
+ const utils_1 = require("../../utils/utils");
9
+ const workspace_1 = require("../../utils/unisphere/workspace");
10
+ const defaults_1 = require("../../utils/listr2/defaults");
11
+ const colorette_1 = require("colorette");
12
+ const Table = require("cli-table3");
13
+ const debug = (0, debug_1.default)('unisphere:package:build');
14
+ const createHowToCommand = () => {
15
+ const command = new commander_1.Command('how-to');
16
+ command
17
+ .description('get help on how to use unisphere')
18
+ .option('--verbose', 'output debug logs', false)
19
+ .option('--cwd <name>', 'the working directory')
20
+ .hook('preAction', utils_1.printVerboseHook)
21
+ .action((options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
22
+ const cwd = options.cwd || process.cwd();
23
+ const task = new listr2_1.Listr([
24
+ {
25
+ title: 'Getting workspace',
26
+ task: (ctx) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
27
+ const workspace = yield (0, workspace_1.getUnisphereWorkspace)(cwd, {
28
+ suspendRecursion: true,
29
+ });
30
+ if (!workspace) {
31
+ debug(`No .unisphere file found in the directory ${cwd}`);
32
+ throw new Error(`No .unisphere file found in the directory`);
33
+ }
34
+ ctx.workspace = workspace;
35
+ }),
36
+ },
37
+ {
38
+ title: `Displaying information`,
39
+ task: (ctx, task) => {
40
+ const table = new Table({
41
+ wordWrap: true,
42
+ colWidths: [null, null, 50],
43
+ head: ['Action', 'Description', 'Command'],
44
+ style: {
45
+ head: ['green', 'bold'],
46
+ },
47
+ });
48
+ let showInitComment = false;
49
+ if (ctx.workspace.config.elements.workspace) {
50
+ table.push([
51
+ {
52
+ colSpan: 3,
53
+ hAlign: 'center',
54
+ content: (0, colorette_1.bold)((0, colorette_1.green)('Workspace')),
55
+ },
56
+ ]);
57
+ table.push([
58
+ (0, colorette_1.bold)('Build'),
59
+ 'Build the workspace',
60
+ 'npx unisphere context build workspace',
61
+ ]);
62
+ table.push([
63
+ (0, colorette_1.bold)('Serve'),
64
+ 'Serve the workspace',
65
+ 'npx unisphere context serve workspace',
66
+ ]);
67
+ table.push([
68
+ (0, colorette_1.bold)('Serve (custom port)'),
69
+ 'Serve the workspace with a specific port (e.g. 8080)',
70
+ 'npx unisphere context serve workspace --port 8080',
71
+ ]);
72
+ }
73
+ if (ctx.workspace.config.elements.loader) {
74
+ table.push([
75
+ {
76
+ colSpan: 3,
77
+ hAlign: 'center',
78
+ content: (0, colorette_1.bold)((0, colorette_1.green)('Loader')),
79
+ },
80
+ ]);
81
+ table.push([
82
+ (0, colorette_1.bold)('Build'),
83
+ 'Build the loader',
84
+ 'npx unisphere context build loader',
85
+ ]);
86
+ table.push([
87
+ (0, colorette_1.bold)('Serve'),
88
+ 'Serve the loader',
89
+ 'npx unisphere context serve loader',
90
+ ]);
91
+ table.push([
92
+ (0, colorette_1.bold)('Serve with port'),
93
+ 'Serve the loader with a specific port',
94
+ 'npx unisphere context serve loader --port 8080',
95
+ ]);
96
+ }
97
+ if (Object.keys(ctx.workspace.config.elements.packages || {})
98
+ .length > 0) {
99
+ showInitComment = true;
100
+ for (const [name, { distributionChannel, version },] of Object.entries(ctx.workspace.config.elements.packages)) {
101
+ table.push([
102
+ {
103
+ colSpan: 3,
104
+ hAlign: 'center',
105
+ content: (0, colorette_1.bold)((0, colorette_1.green)(`Package ${name}`)),
106
+ },
107
+ ]);
108
+ table.push([
109
+ (0, colorette_1.bold)('Build'),
110
+ 'Build the package',
111
+ `npx unisphere package build ${name}`,
112
+ ]);
113
+ table.push([
114
+ (0, colorette_1.bold)('Link'),
115
+ 'Link the package to the current project (*)',
116
+ `npx unisphere package link {widget name} {package name}`,
117
+ ]);
118
+ }
119
+ }
120
+ if (Object.keys(ctx.workspace.config.elements.contexts || {})
121
+ .length > 0) {
122
+ for (const [name, { distributionChannel, version },] of Object.entries(ctx.workspace.config.elements.contexts)) {
123
+ table.push([
124
+ {
125
+ colSpan: 3,
126
+ hAlign: 'center',
127
+ content: (0, colorette_1.bold)((0, colorette_1.green)(`Context ${name}`)),
128
+ },
129
+ ]);
130
+ table.push([
131
+ (0, colorette_1.bold)('Build'),
132
+ 'Build the context',
133
+ `npx unisphere context build ${name}`,
134
+ ]);
135
+ table.push([
136
+ (0, colorette_1.bold)('Serve'),
137
+ 'Serve the context',
138
+ `npx unisphere context serve ${name}`,
139
+ ]);
140
+ table.push([
141
+ (0, colorette_1.bold)('Serve (custom port)'),
142
+ 'Serve the context with a specific port (e.g. 8080)',
143
+ `npx unisphere context serve ${name} --port 8080`,
144
+ ]);
145
+ }
146
+ }
147
+ if (table.length === 0) {
148
+ console.log('The project has no Unisphere elements');
149
+ }
150
+ else {
151
+ console.log(table.toString());
152
+ if (showInitComment) {
153
+ console.log(`(*) To see list of available projects, run ${(0, colorette_1.bold)('npx unisphere local projects-list')}`);
154
+ }
155
+ }
156
+ },
157
+ },
158
+ ], (0, defaults_1.getDefaultListrOptions)());
159
+ yield task.run();
160
+ }));
161
+ return command;
162
+ };
163
+ exports.createHowToCommand = createHowToCommand;
164
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/how-to/command.ts"],"names":[],"mappings":";;;;AAAA,yCAAsD;AACtD,iCAA0B;AAC1B,mCAA+B;AAC/B,6CAAqD;AACrD,+DAAwE;AACxE,0DAAqE;AAErE,yCAA6C;AAC7C,oCAAoC;AAMpC,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,yBAAyB,CAAC,CAAC;AAYxC,MAAM,kBAAkB,GAAG,GAAY,EAAE;IAC9C,MAAM,OAAO,GAAG,IAAI,mBAAO,CAAC,QAAQ,CAAC,CAAC;IAEtC,OAAO;SACJ,WAAW,CAAC,kCAAkC,CAAC;SAC/C,MAAM,CAAC,WAAW,EAAE,mBAAmB,EAAE,KAAK,CAAC;SAC/C,MAAM,CAAC,cAAc,EAAE,uBAAuB,CAAC;SAC/C,IAAI,CAAC,WAAW,EAAE,wBAAgB,CAAC;SACnC,MAAM,CAAC,CAAO,OAAO,EAAE,EAAE;QACxB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAEzC,MAAM,IAAI,GAAG,IAAI,cAAK,CACpB;YACE;gBACE,KAAK,EAAE,mBAAmB;gBAC1B,IAAI,EAAE,CAAO,GAAG,EAAE,EAAE;oBAClB,MAAM,SAAS,GAAG,MAAM,IAAA,iCAAqB,EAAC,GAAG,EAAE;wBACjD,gBAAgB,EAAE,IAAI;qBACvB,CAAC,CAAC;oBAEH,IAAI,CAAC,SAAS,EAAE;wBACd,KAAK,CAAC,6CAA6C,GAAG,EAAE,CAAC,CAAC;wBAC1D,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;qBA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AC,GAAG,CACT,8CAA8C,IAAA,gBAAI,EAChD,mCAAmC,CACpC,EAAE,CACJ,CAAC;yBACH;qBACF;gBACH,CAAC;aACF;SACF,EACD,IAAA,iCAAsB,GAAE,CACzB,CAAC;QAEF,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;IACnB,CAAC,CAAA,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAzLW,QAAA,kBAAkB,sBAyL7B"}
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createLocalCommand = void 0;
4
4
  const commander_1 = require("commander");
5
- const command_1 = require("./info/command");
5
+ const command_1 = require("./projects-list/command");
6
6
  const createLocalCommand = () => {
7
7
  const localCommand = new commander_1.Command('local');
8
8
  localCommand.description('manage Unisphere projects in local environment');
9
- (0, command_1.createInfoCommand)(localCommand);
9
+ (0, command_1.createProjectsListCommand)(localCommand);
10
10
  return localCommand;
11
11
  };
12
12
  exports.createLocalCommand = createLocalCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"local-command.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/local/local-command.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,4CAAmD;AAC5C,MAAM,kBAAkB,GAAG,GAAY,EAAE;IAC9C,MAAM,YAAY,GAAG,IAAI,mBAAO,CAAC,OAAO,CAAC,CAAC;IAE1C,YAAY,CAAC,WAAW,CAAC,gDAAgD,CAAC,CAAC;IAE3E,IAAA,2BAAiB,EAAC,YAAY,CAAC,CAAC;IAChC,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAPW,QAAA,kBAAkB,sBAO7B"}
1
+ {"version":3,"file":"local-command.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/local/local-command.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,qDAAoE;AAC7D,MAAM,kBAAkB,GAAG,GAAY,EAAE;IAC9C,MAAM,YAAY,GAAG,IAAI,mBAAO,CAAC,OAAO,CAAC,CAAC;IAE1C,YAAY,CAAC,WAAW,CAAC,gDAAgD,CAAC,CAAC;IAE3E,IAAA,mCAAyB,EAAC,YAAY,CAAC,CAAC;IACxC,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAPW,QAAA,kBAAkB,sBAO7B"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare const createProjectsListCommand: (parentCommand: Command) => Command;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createInfoCommand = void 0;
3
+ exports.createProjectsListCommand = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const utils_1 = require("../../../utils/utils");
6
6
  const debug_1 = require("debug");
@@ -11,10 +11,10 @@ const fs = require("fs");
11
11
  const Table = require("cli-table3");
12
12
  const get_global_file_1 = require("../../../utils/unisphere/get-global-file");
13
13
  const debug = (0, debug_1.default)('unisphere:info');
14
- const createInfoCommand = (parentCommand) => {
15
- const infoCommand = parentCommand.command('info');
14
+ const createProjectsListCommand = (parentCommand) => {
15
+ const infoCommand = parentCommand.command('projects-list');
16
16
  infoCommand
17
- .description('display information about Unisphere projects in local environment')
17
+ .description('display list of Unisphere projects registered in local environment')
18
18
  .option('--verbose', 'output debug logs', false)
19
19
  .hook('preAction', utils_1.printVerboseHook)
20
20
  .action((options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
@@ -42,9 +42,10 @@ const createInfoCommand = (parentCommand) => {
42
42
  }
43
43
  else {
44
44
  console.log(table.toString());
45
+ console.log((0, colorette_2.bold)(`Missing a project? Run 'npx unisphere init' in the missing project directory`));
45
46
  }
46
47
  }));
47
48
  return infoCommand;
48
49
  };
49
- exports.createInfoCommand = createInfoCommand;
50
+ exports.createProjectsListCommand = createProjectsListCommand;
50
51
  //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["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AAG,EAAE;gBACZ,MAAM,GAAG,IAAA,eAAG,EAAC,GAAG,CAAC,CAAC;aACnB;YAED,KAAK,CAAC,IAAI,CAAC,CAAC,IAAA,gBAAI,EAAC,UAAU,CAAC,EAAE,IAAA,eAAG,EAAC,UAAoB,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;SACnE;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;SACjD;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC9B,OAAO,CAAC,GAAG,CACT,IAAA,gBAAI,EACF,8EAA8E,CAC/E,CACF,CAAC;SACH;IACH,CAAC,CAAA,CAAC,CAAC;IAEL,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AA9CW,QAAA,yBAAyB,6BA8CpC"}
@@ -20,24 +20,24 @@ const createLinkCommand = () => {
20
20
  command
21
21
  .description('link a package to the current project')
22
22
  .option('--verbose', 'output debug logs', false)
23
- .addArgument(new commander_1.Argument('module', 'the module to link'))
23
+ .addArgument(new commander_1.Argument('widget', 'the widget to link'))
24
24
  .addArgument(new commander_1.Argument('packageName', 'the package to link'))
25
25
  .option('--dry-run', 'run the deployment in dry-run mode', false)
26
26
  .option('--cwd <name>', 'the working directory')
27
27
  .hook('preAction', utils_1.printVerboseHook)
28
- .action((moduleName, packageName, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
28
+ .action((widgetName, packageName, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
29
29
  var _a, _b;
30
30
  debug(`options: ${JSON.stringify(options)}`);
31
31
  const cwd = options.cwd || process.cwd();
32
- const resolvedModuleName = moduleName.indexOf('.') > -1
33
- ? moduleName
34
- : `unisphere.module.${moduleName}`;
35
- (0, prompts_1.logSuccess)(`Linking ${packageName} to ${resolvedModuleName}`);
36
- // Get module path from global config
32
+ const resolvedWidgetName = widgetName.indexOf('.') > -1
33
+ ? widgetName
34
+ : `unisphere.widget.${widgetName}`;
35
+ (0, prompts_1.logSuccess)(`Linking ${packageName} to ${resolvedWidgetName}`);
36
+ // Get widget path from global config
37
37
  const globalConfig = (0, get_global_file_1.getGlobalFile)();
38
- const widgetPath = globalConfig[resolvedModuleName];
38
+ const widgetPath = globalConfig[resolvedWidgetName];
39
39
  if (!widgetPath) {
40
- (0, prompts_1.logErrorAndExit)(`Module ${resolvedModuleName} not found in global config. Please register it first using 'unisphere local-env register'`);
40
+ (0, prompts_1.logErrorAndExit)(`Widget ${resolvedWidgetName} not found in global config. Please register it first using 'unisphere local-env register'`);
41
41
  }
42
42
  const workspaceFile = yield (0, workspace_1.getUnisphereWorkspace)(widgetPath, {
43
43
  suspendRecursion: true,
@@ -58,7 +58,7 @@ const createLinkCommand = () => {
58
58
  cwd,
59
59
  packageName,
60
60
  nxProjectName,
61
- modulePath: widgetPath,
61
+ widgetPath: widgetPath,
62
62
  });
63
63
  const task = new listr2_1.Listr([
64
64
  {
@@ -4,6 +4,8 @@ const { createContextCommand } = require('./commands/context/context-command');
4
4
  const { createPackageCommand } = require('./commands/package/package-command');
5
5
  const { createInfoCommand } = require('./commands/info/command');
6
6
  const { createInitCommand } = require('./commands/init/command');
7
+ const { createCheckCommand } = require('./commands/check/command');
8
+ const { createHowToCommand } = require('./commands/how-to/command');
7
9
  const { createLocalCommand } = require('./commands/local/local-command');
8
10
  module.exports = () => tslib_1.__awaiter(this, void 0, void 0, function* () {
9
11
  const program = new Command();
@@ -14,6 +16,8 @@ module.exports = () => tslib_1.__awaiter(this, void 0, void 0, function* () {
14
16
  // program.addCommand(createGithubCommand());
15
17
  program.addCommand(createPackageCommand());
16
18
  program.addCommand(createInfoCommand());
19
+ program.addCommand(createCheckCommand());
20
+ program.addCommand(createHowToCommand());
17
21
  program.addCommand(createInitCommand());
18
22
  program.addCommand(createLocalCommand());
19
23
  program.parse(process.argv);
@@ -1 +1 @@
1
- {"version":3,"file":"unisphere.js","sourceRoot":"","sources":["../../../../../packages/unisphere-cli/src/lib/unisphere.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACzC,MAAM,EAAE,oBAAoB,EAAC,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAA;AAC7E,MAAM,EAAE,oBAAoB,EAAC,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAA;AAC7E,MAAM,EAAE,iBAAiB,EAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAA;AAC/D,MAAM,EAAE,iBAAiB,EAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAA;AAC/D,MAAM,EAAE,kBAAkB,EAAC,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAA;AACvE,MAAM,CAAC,OAAO,GAAG,GAAS,EAAE;IAC1B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO;SACJ,IAAI,CAAC,gCAAgC,CAAC;SACtC,WAAW,CAAC,iDAAiD,CAAC,CAAA;IAEjE,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC3C,6CAA6C;IAC7C,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC3C,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACzC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAA,CAAA"}
1
+ {"version":3,"file":"unisphere.js","sourceRoot":"","sources":["../../../../../packages/unisphere-cli/src/lib/unisphere.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACzC,MAAM,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({ collapseSubtasks = false, } = {}) => {
5
5
  if (process.env.CI) {
6
6
  return {
7
+ exitOnError: true,
7
8
  concurrent: false,
8
9
  renderer: 'simple',
9
10
  };
10
11
  }
11
12
  else {
12
13
  return {
14
+ exitOnError: true,
13
15
  concurrent: false,
14
16
  rendererOptions: {
15
17
  outputBar: Infinity,
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/listr2/defaults.ts"],"names":[],"mappings":";;;AAEO,MAAM,sBAAsB,GAAG,CAAC,EACrC,gBAAgB,GAAG,KAAK,MAGtB,EAAE,EAAwC,EAAE;IAC9C,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE;QAClB,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,QAAQ;SACnB,CAAC;KACH;SAAM;QACL,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,eAAe,EAAE;gBACf,SAAS,EAAE,QAAQ;gBACnB,gBAAgB,EAAE,IAAI;gBACtB,cAAc,EAAE,KAAK;gBACrB,gBAAgB;gBAChB,gBAAgB,EAAE,KAAK;aACxB;SACF,CAAC;KACH;AACH,CAAC,CAAC;AAtBW,QAAA,sBAAsB,0BAsBjC"}
1
+ {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/listr2/defaults.ts"],"names":[],"mappings":";;;AAEO,MAAM,sBAAsB,GAAG,CAAC,EACrC,gBAAgB,GAAG,KAAK,MAGtB,EAAE,EAAwC,EAAE;IAC9C,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE;QAClB,OAAO;YACL,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,QAAQ;SACnB,CAAC;KACH;SAAM;QACL,OAAO;YACL,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,KAAK;YACjB,eAAe,EAAE;gBACf,SAAS,EAAE,QAAQ;gBACnB,gBAAgB,EAAE,IAAI;gBACtB,cAAc,EAAE,KAAK;gBACrB,gBAAgB;gBAChB,gBAAgB,EAAE,KAAK;aACxB;SACF,CAAC;KACH;AACH,CAAC,CAAC;AAxBW,QAAA,sBAAsB,0BAwBjC"}
@@ -1,5 +1,5 @@
1
- import { Listr, ListrTaskWrapper } from 'listr2';
2
- export declare const createListrForBuildingUnispherePackage: ({ cwd, nxProjectName, distFolder, production, lint, lintFix, verbose, parentTask, }: {
1
+ import { Listr, ListrTask, ListrTaskWrapper } from 'listr2';
2
+ export declare const createListrForBuildingUnispherePackage: ({ cwd, nxProjectName, distFolder, production, lint, lintFix, verbose, parentTask, postTask, ctx, }: {
3
3
  cwd: string;
4
4
  nxProjectName: string;
5
5
  distFolder: string;
@@ -8,6 +8,8 @@ export declare const createListrForBuildingUnispherePackage: ({ cwd, nxProjectNa
8
8
  lintFix: boolean;
9
9
  verbose: boolean;
10
10
  parentTask: ListrTaskWrapper<any, any, any>;
11
+ postTask?: ListrTask<any, any, any>;
12
+ ctx?: any;
11
13
  }) => Promise<Listr<any, any, any>>;
12
14
  export declare const getUnisphereEnv: (production: boolean, mode: 'package' | 'context') => {
13
15
  UNISPHERE: string;
@@ -15,7 +17,7 @@ export declare const getUnisphereEnv: (production: boolean, mode: 'package' | 'c
15
17
  UNISPHERE_DEV: string;
16
18
  UNISPHERE_MODE: "package" | "context";
17
19
  };
18
- export declare const createListrForBuildingUnisphereContext: ({ cwd, nxProjectName, lint, lintFix, parentTask, production, verbose, }: {
20
+ export declare const createListrForBuildingUnisphereContext: ({ cwd, nxProjectName, lint, lintFix, parentTask, production, verbose, postTask, ctx, }: {
19
21
  cwd: string;
20
22
  nxProjectName: string;
21
23
  production: boolean;
@@ -23,4 +25,6 @@ export declare const createListrForBuildingUnisphereContext: ({ cwd, nxProjectNa
23
25
  lintFix: boolean;
24
26
  parentTask: ListrTaskWrapper<any, any, any>;
25
27
  verbose: boolean;
28
+ postTask?: ListrTask<any, any, any>;
29
+ ctx?: any;
26
30
  }) => Promise<Listr<any, any, any>>;
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const path = require("path");
6
6
  const create_exec_task_1 = require("../listr2/create-exec-task");
7
7
  const defaults_1 = require("../listr2/defaults");
8
- const createListrForBuildingUnispherePackage = ({ cwd, nxProjectName, distFolder, production, lint, lintFix, verbose, parentTask, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
8
+ const createListrForBuildingUnispherePackage = ({ cwd, nxProjectName, distFolder, production, lint, lintFix, verbose, parentTask, postTask, ctx = {}, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
9
9
  // notice - I didn't set --skip-nx-cache here
10
10
  return parentTask.newListr([
11
11
  (0, create_exec_task_1.createExecTask)({
@@ -37,7 +37,8 @@ const createListrForBuildingUnispherePackage = ({ cwd, nxProjectName, distFolder
37
37
  UNISPHERE_MODE: 'package',
38
38
  },
39
39
  }),
40
- ], (0, defaults_1.getDefaultListrOptions)());
40
+ postTask,
41
+ ].filter(Boolean), Object.assign(Object.assign({}, (0, defaults_1.getDefaultListrOptions)()), { ctx }));
41
42
  });
42
43
  exports.createListrForBuildingUnispherePackage = createListrForBuildingUnispherePackage;
43
44
  const getUnisphereEnv = (production, mode) => ({
@@ -47,7 +48,7 @@ const getUnisphereEnv = (production, mode) => ({
47
48
  UNISPHERE_MODE: mode,
48
49
  });
49
50
  exports.getUnisphereEnv = getUnisphereEnv;
50
- const createListrForBuildingUnisphereContext = ({ cwd, nxProjectName, lint, lintFix, parentTask, production, verbose, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
51
+ const createListrForBuildingUnisphereContext = ({ cwd, nxProjectName, lint, lintFix, parentTask, production, verbose, postTask, ctx = {}, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
51
52
  return parentTask.newListr([
52
53
  (0, create_exec_task_1.createExecTask)({
53
54
  title: 'Checking nx availability',
@@ -67,7 +68,8 @@ const createListrForBuildingUnisphereContext = ({ cwd, nxProjectName, lint, lint
67
68
  cwd,
68
69
  env: (0, exports.getUnisphereEnv)(production, 'context'),
69
70
  }),
70
- ], (0, defaults_1.getDefaultListrOptions)());
71
+ postTask,
72
+ ].filter(Boolean), Object.assign(Object.assign({}, (0, defaults_1.getDefaultListrOptions)()), { ctx }));
71
73
  });
72
74
  exports.createListrForBuildingUnisphereContext = createListrForBuildingUnisphereContext;
73
75
  //# sourceMappingURL=build-unisphere-elements.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-unisphere-elements.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/unisphere/build-unisphere-elements.ts"],"names":[],"mappings":";;;;AACA,6BAA8B;AAC9B,iEAA4D;AAC5D,iDAA4D;AAErD,MAAM,sCAAsC,GAAG,CAAO,EAC3D,GAAG,EACH,aAAa,EACb,UAAU,EACV,UAAU,EACV,IAAI,EACJ,OAAO,EACP,OAAO,EACP,UAAU,GAUX,EAAE,EAAE;IACH,6CAA6C;IAC7C,OAAO,UAAU,CAAC,QAAQ,CACxB;QACE,IAAA,iCAAc,EAAC;YACb,KAAK,EAAE,0BAA0B;YACjC,OAAO,EAAE,cAAc;YACvB,GAAG;SACJ,CAAC;QACF,IAAA,iCAAc,EAAC;YACb,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI;YACjB,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,UAAU,aAAa,SAAS,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAC7D,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAC1B,EAAE;YACF,GAAG;YACH,GAAG,EAAE,IAAA,uBAAe,EAAC,KAAK,EAAE,SAAS,CAAC;SACvC,CAAC;QACF,IAAA,iCAAc,EAAC;YACb,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,UAAU,aAAa,UAAU,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAClE,O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YACb,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI;YACjB,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,UAAU,aAAa,SAAS,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACjE,GAAG;YACH,GAAG,EAAE,IAAA,uBAAe,EAAC,UAAU,EAAE,SAAS,CAAC;SAC5C,CAAC;QACF,IAAA,iCAAc,EAAC;YACb,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,UAAU,aAAa,UAAU,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAClE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAC1B,EAAE;YACF,GAAG;YACH,GAAG,EAAE,IAAA,uBAAe,EAAC,UAAU,EAAE,SAAS,CAAC;SAC5C,CAAC;KACH,EACD,IAAA,iCAAsB,GAAE,CACzB,CAAC;AACJ,CAAC,CAAA,CAAC;AA1CW,QAAA,sCAAsC,0CA0CjD"}
1
+ {"version":3,"file":"build-unisphere-elements.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/unisphere/build-unisphere-elements.ts"],"names":[],"mappings":";;;;AACA,6BAA8B;AAC9B,iEAA4D;AAC5D,iDAA4D;AAErD,MAAM,sCAAsC,GAAG,CAAO,EAC3D,GAAG,EACH,aAAa,EACb,UAAU,EACV,UAAU,EACV,IAAI,EACJ,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,GAAG,GAAG,EAAE,GAYT,EAAE,EAAE;IACH,6CAA6C;IAC7C,OAAO,UAAU,CAAC,QAAQ,CACxB;QACE,IAAA,iCAAc,EAAC;YACb,KAAK,EAAE,0BAA0B;YACjC,OAAO,EAAE,cAAc;YACvB,GAAG;SACJ,CAAC;QACF,IAAA,iCAAc,EAAC;YACb,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI;YACjB,KAAK,EAAE,cAAc;YACrB,O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parentCommand: Command) => Command;
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../../packages/unisphere-cli/src/lib/commands/local/info/command.ts"],"names":[],"mappings":";;;;AACA,gDAAwD;AAExD,iCAA0B;AAC1B,yCAAuC;AACvC,yCAAiC;AACjC,yCAAgC;AAChC,yBAAyB;AACzB,oCAAoC;AACpC,8EAAyE;AAEzE,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,gBAAgB,CAAC,CAAC;AAE/B,MAAM,iBAAiB,GAAG,CAAC,aAAsB,EAAW,EAAE;IACnE,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAElD,WAAW;SACR,WAAW,CACV,mEAAmE,CACpE;SACA,MAAM,CAAC,WAAW,EAAE,mBAAmB,EAAE,KAAK,CAAC;SAC/C,IAAI,CAAC,WAAW,EAAE,wBAAgB,CAAC;SACnC,MAAM,CAAC,CAAO,OAAO,EAAE,EAAE;QACxB,KAAK,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAE7C,MAAM,UAAU,GAAG,IAAA,+BAAa,GAAE,CAAC;QAEnC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC;YACtB,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC;YACtC,KAAK,EAAE;gBACL,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;aACxB;SACF,CAAC,CAAC;QAEH,KAAK,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YACjE,IAAI,MAAM,GAAG,EAAE,CAAC;YAChB,IAAI;gBACF,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,UAAoB,CAAC,CAAC;gBACnD,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,IAAA,iBAAK,EAAC,GAAG,CAAC,CAAC,CAA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