@unisphere/cli 1.19.0 → 1.20.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.
- package/bundler/context/rollup.js +30 -38
- package/package.json +1 -1
- package/src/lib/commands/context/publish/execute/execute.js +2 -2
- package/src/lib/commands/context/publish/execute/execute.js.map +1 -1
- package/src/lib/commands/context/serve-command.js +1 -1
- package/src/lib/commands/how-to/command.js +39 -20
- package/src/lib/commands/how-to/command.js.map +1 -1
- package/src/lib/commands/init/command.js +2 -2
- package/src/lib/commands/init/command.js.map +1 -1
- package/src/lib/commands/local/list/command.d.ts +2 -0
- package/src/lib/commands/local/list/command.js +93 -0
- package/src/lib/commands/local/list/command.js.map +1 -0
- package/src/lib/commands/local/local-command.js +6 -4
- package/src/lib/commands/local/local-command.js.map +1 -1
- package/src/lib/commands/local/publish/command.d.ts +2 -0
- package/src/lib/commands/local/{link → publish}/command.js +23 -26
- package/src/lib/commands/local/publish/command.js.map +1 -0
- package/src/lib/commands/local/remove/command.d.ts +2 -0
- package/src/lib/commands/local/remove/command.js +29 -0
- package/src/lib/commands/local/remove/command.js.map +1 -0
- package/src/lib/utils/unisphere/get-global-file.d.ts +7 -2
- package/src/lib/utils/unisphere/get-global-file.js +10 -5
- package/src/lib/utils/unisphere/get-global-file.js.map +1 -1
- package/src/lib/utils/unisphere/types.d.ts +4 -9
- package/src/lib/utils/unisphere/types.js +6 -0
- package/src/lib/utils/unisphere/types.js.map +1 -1
- package/src/lib/utils/unisphere/unisphere-workspace-file.d.ts +2 -0
- package/src/lib/utils/unisphere/{find-unisphere-workspace-file.js → unisphere-workspace-file.js} +9 -8
- package/src/lib/utils/unisphere/unisphere-workspace-file.js.map +1 -0
- package/src/lib/utils/unisphere/workspace.js +6 -15
- package/src/lib/utils/unisphere/workspace.js.map +1 -1
- package/src/lib/commands/local/link/command.d.ts +0 -2
- package/src/lib/commands/local/link/command.js.map +0 -1
- package/src/lib/commands/local/projects-list/command.d.ts +0 -2
- package/src/lib/commands/local/projects-list/command.js +0 -50
- package/src/lib/commands/local/projects-list/command.js.map +0 -1
- package/src/lib/utils/unisphere/find-unisphere-workspace-file.d.ts +0 -2
- package/src/lib/utils/unisphere/find-unisphere-workspace-file.js.map +0 -1
|
@@ -9,8 +9,8 @@ const shim = require('rollup-plugin-shim');
|
|
|
9
9
|
const { withNx } = require('@nx/rollup/with-nx');
|
|
10
10
|
const url = require('@rollup/plugin-url');
|
|
11
11
|
const svg = require('@svgr/rollup');
|
|
12
|
-
const { findUnisphereWorkspaceFile } = require('../../src/lib/utils/unisphere/find-unisphere-workspace-file');
|
|
13
12
|
const { getEnvVariables } = require('../../src/lib/utils/unisphere/get-env-variables');
|
|
13
|
+
const { getUnisphereWorkspaceFile } = require('../../src/lib/utils/unisphere/unisphere-workspace-file');
|
|
14
14
|
|
|
15
15
|
const { envVariables, isUnisphereEnvironment } = getEnvVariables();
|
|
16
16
|
|
|
@@ -26,31 +26,23 @@ const isProduction = envVariables.UNISPHERE_ENV === 'production';
|
|
|
26
26
|
console.log('[unisphere] Helpful Tip: When running a build if it is using outdated rollup file, you should clear the nx cache by running `rm -rf node_modules/.cache/nx && npx nx reset`.');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
const getUnisphereTSInterceptorsConfig = () => {
|
|
29
|
+
const getUnisphereTSInterceptorsConfig = (unispherePackagesDistList) => {
|
|
30
30
|
return {
|
|
31
31
|
interceptors: {
|
|
32
32
|
compilerOptions : (options) => {
|
|
33
33
|
// Monkey patch TS paths for shared libraries to be consumed by contexts from dist like other dependencies
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// acc[packageJson.name] = [`dist/unisphere/shared-packages/${folder}`];
|
|
42
|
-
// }
|
|
43
|
-
// return acc;
|
|
44
|
-
// }, {});
|
|
45
|
-
|
|
46
|
-
const sharedPackages = {};
|
|
47
|
-
|
|
48
|
-
console.log(`mapping shared packages to dist folders:`, sharedPackages)
|
|
34
|
+
const projectPackages = unispherePackagesDistList.reduce((acc, item) => {
|
|
35
|
+
acc[item.packageName] = [item.distPath];
|
|
36
|
+
return acc;
|
|
37
|
+
}, {});
|
|
38
|
+
|
|
39
|
+
console.log(`mapping project packages to dist folders:`, projectPackages)
|
|
40
|
+
|
|
49
41
|
const result = {
|
|
50
42
|
...options,
|
|
51
43
|
paths: {
|
|
52
44
|
...options.paths,
|
|
53
|
-
...
|
|
45
|
+
...projectPackages
|
|
54
46
|
}
|
|
55
47
|
};
|
|
56
48
|
|
|
@@ -62,7 +54,7 @@ const getUnisphereTSInterceptorsConfig = () => {
|
|
|
62
54
|
|
|
63
55
|
const getWithNx = (unisphereConfig) => {
|
|
64
56
|
|
|
65
|
-
const relativeSourcePath = path.relative(unisphereConfig.cwd, unisphereConfig.
|
|
57
|
+
const relativeSourcePath = path.relative(unisphereConfig.cwd, unisphereConfig.workspaceConfiguration.cwd);
|
|
66
58
|
|
|
67
59
|
const outputPath = `${relativeSourcePath}/dist/${unisphereConfig.sourcePath.join('/')}`;
|
|
68
60
|
|
|
@@ -88,13 +80,15 @@ const getWithNx = (unisphereConfig) => {
|
|
|
88
80
|
}),
|
|
89
81
|
]
|
|
90
82
|
}
|
|
91
|
-
|
|
83
|
+
|
|
92
84
|
if (isDeployingContext) {
|
|
93
|
-
|
|
94
|
-
|
|
85
|
+
const unispherePackagesDistList = getUnispherePackagesDistList(unisphereConfig.workspaceConfiguration.cwd);
|
|
86
|
+
|
|
87
|
+
secondArgument.unisphere = getUnisphereTSInterceptorsConfig(unispherePackagesDistList);
|
|
88
|
+
return withUnisphere(withNx(
|
|
95
89
|
firstArgument,
|
|
96
90
|
secondArgument
|
|
97
|
-
));
|
|
91
|
+
), unispherePackagesDistList);
|
|
98
92
|
}
|
|
99
93
|
|
|
100
94
|
return withNx(
|
|
@@ -103,7 +97,7 @@ const getWithNx = (unisphereConfig) => {
|
|
|
103
97
|
);
|
|
104
98
|
}
|
|
105
99
|
|
|
106
|
-
function
|
|
100
|
+
function getUnispherePackagesDistList(cwd) {
|
|
107
101
|
|
|
108
102
|
const folderPattern = path.resolve(cwd, 'dist/unisphere/packages/*');
|
|
109
103
|
|
|
@@ -112,26 +106,25 @@ function getSubfoldersWithPackageNames(cwd) {
|
|
|
112
106
|
const result = [];
|
|
113
107
|
|
|
114
108
|
// Iterate through each subfolder
|
|
115
|
-
folderPaths.forEach(
|
|
116
|
-
const packageJsonPath = path.join(
|
|
109
|
+
folderPaths.forEach(distPath => {
|
|
110
|
+
const packageJsonPath = path.join(distPath, 'package.json');
|
|
117
111
|
if (fs.existsSync(packageJsonPath)) {
|
|
118
112
|
// Read and parse the package.json file
|
|
119
113
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
120
114
|
const packageName = packageJson.name;
|
|
121
115
|
|
|
122
116
|
if (packageName) {
|
|
123
|
-
result.push({
|
|
117
|
+
result.push({distPath, packageName});
|
|
124
118
|
}
|
|
125
119
|
}
|
|
126
120
|
});
|
|
127
121
|
|
|
122
|
+
console.log('[unisphere] found packages', result);
|
|
123
|
+
|
|
128
124
|
return result;
|
|
129
125
|
}
|
|
130
126
|
|
|
131
|
-
const withUnisphere = (
|
|
132
|
-
|
|
133
|
-
const subfoldersWithPackageNames = getSubfoldersWithPackageNames(unisphereConfig.repositoryRootPath);
|
|
134
|
-
|
|
127
|
+
const withUnisphere = (rollupConfig, unispherePackagesDistList) => {
|
|
135
128
|
|
|
136
129
|
console.log('[unisphere] removing unisphere config used to monkey patch @nw/rollup');
|
|
137
130
|
delete rollupConfig.unisphere;
|
|
@@ -152,8 +145,8 @@ const withUnisphere = (unisphereConfig, rollupConfig) => {
|
|
|
152
145
|
|
|
153
146
|
rollupConfig.plugins.push(
|
|
154
147
|
alias({
|
|
155
|
-
entries:
|
|
156
|
-
return {find: item.packageName, replacement: item.
|
|
148
|
+
entries: unispherePackagesDistList.map(item => {
|
|
149
|
+
return {find: item.packageName, replacement: item.distPath}
|
|
157
150
|
})
|
|
158
151
|
}),
|
|
159
152
|
analyze({
|
|
@@ -181,29 +174,28 @@ module.exports = (unisphereConfig) => {
|
|
|
181
174
|
|
|
182
175
|
console.log('[unisphere] unisphere rollup args before stripping', unisphereConfig);
|
|
183
176
|
|
|
184
|
-
const
|
|
177
|
+
const workspaceConfiguration = getUnisphereWorkspaceFile(unisphereConfig.cwd);
|
|
185
178
|
|
|
186
|
-
if (!
|
|
179
|
+
if (!workspaceConfiguration) {
|
|
187
180
|
throw new Error('the library must be run from the root of the unisphere workspace');
|
|
188
181
|
}
|
|
189
|
-
|
|
190
182
|
|
|
191
183
|
const projectJsonPath = path.join(unisphereConfig.cwd, 'project.json');
|
|
192
184
|
|
|
193
185
|
const projectJson = JSON.parse(fs.readFileSync(projectJsonPath, 'utf8'));
|
|
194
186
|
const sourcePath = projectJson.sourceRoot.replace(/\/src$/, '').split('/');
|
|
195
187
|
|
|
196
|
-
|
|
197
188
|
const expectedType = (unisphereConfig.allowedType || 'contexts');
|
|
198
189
|
const pathCheck = unisphereConfig.bypassPathHierarchyCheck ? true : (sourcePath.length === 3);
|
|
199
190
|
if (!pathCheck || sourcePath[0] !== 'unisphere' || sourcePath[1] !== expectedType) {
|
|
200
191
|
throw new Error(`sourcePath must follow pattern unisphere/${expectedType}/<context-name>, got ${sourcePath.join('/')}`)
|
|
201
192
|
}
|
|
202
193
|
|
|
194
|
+
// todo can improve code readability by moving the calculation of the 'outputPath' here instead of in getWithNx
|
|
203
195
|
return getWithNx(
|
|
204
196
|
{
|
|
205
197
|
...unisphereConfig,
|
|
206
|
-
|
|
198
|
+
workspaceConfiguration,
|
|
207
199
|
sourcePath
|
|
208
200
|
}
|
|
209
201
|
);
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ function execute(options) {
|
|
|
14
14
|
debug(`options: ${JSON.stringify(options)}`);
|
|
15
15
|
const unisphereWorkspace = yield (0, workspace_1.getUnisphereWorkspace)(options.cwd);
|
|
16
16
|
const unisphereElements = unisphereWorkspace.config.elements;
|
|
17
|
-
debug(`Executing upload for elements in repository ${unisphereWorkspace.name}`);
|
|
17
|
+
debug(`Executing upload for elements in repository ${unisphereWorkspace.config.name}`);
|
|
18
18
|
const tasks = new listr2_1.Listr([
|
|
19
19
|
{
|
|
20
20
|
title: 'Sync workspace elements',
|
|
@@ -93,7 +93,7 @@ function execute(options) {
|
|
|
93
93
|
return false;
|
|
94
94
|
},
|
|
95
95
|
task: () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
const bucketPrefix = (0, unisphere_utils_1.getElementContextBucketPrefix)(unisphereWorkspace.name, context, version);
|
|
96
|
+
const bucketPrefix = (0, unisphere_utils_1.getElementContextBucketPrefix)(unisphereWorkspace.config.name, context, version);
|
|
97
97
|
yield (0, sync_element_1.syncElement)({
|
|
98
98
|
options,
|
|
99
99
|
bucketPrefix,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../../../../packages/unisphere-cli/src/lib/commands/context/publish/execute/execute.ts"],"names":[],"mappings":";;;;AAAA,iCAA0B;AAC1B,mCAA+B;AAE/B,qEAA8E;AAC9E,iDAA6C;AAC7C,uEAI2C;AAC3C,gEAA2E;AAE3E,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,kCAAkC,CAAC,CAAC;AAExD,SAAsB,OAAO,CAAC,OAAoB;;QAChD,KAAK,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAE7C,MAAM,kBAAkB,GAAG,MAAM,IAAA,iCAAqB,EAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpE,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC;QAE7D,KAAK,CACH,+CAA+C,kBAAkB,CAAC,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../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,iCAAsB,GAAE,CACzB,CAAC;QAEF,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC;IACpB,CAAC;CAAA;AAxID,0BAwIC"}
|
|
@@ -23,7 +23,7 @@ const createServeCommand = (parentCommand) => {
|
|
|
23
23
|
var _a, _b;
|
|
24
24
|
const { verbose, cwd, port } = options;
|
|
25
25
|
const workingDirectory = cwd || process.cwd();
|
|
26
|
-
const servePort = port || '
|
|
26
|
+
const servePort = port || '8300';
|
|
27
27
|
try {
|
|
28
28
|
console.log(`Starting context server for context: ${context}`);
|
|
29
29
|
debug(`Working directory: ${workingDirectory}`);
|
|
@@ -45,6 +45,27 @@ const createHowToCommand = () => {
|
|
|
45
45
|
head: ['green', 'bold'],
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
|
+
table.push([
|
|
49
|
+
{
|
|
50
|
+
colSpan: 3,
|
|
51
|
+
hAlign: 'center',
|
|
52
|
+
content: (0, colorette_1.bold)((0, colorette_1.green)('Local Environment Commands')),
|
|
53
|
+
},
|
|
54
|
+
]);
|
|
55
|
+
table.push([
|
|
56
|
+
(0, colorette_1.bold)('List projects'),
|
|
57
|
+
'Display list of registered projects in the local environment',
|
|
58
|
+
'npx unisphere local list',
|
|
59
|
+
]);
|
|
60
|
+
table.push([
|
|
61
|
+
(0, colorette_1.bold)('Publish package locally'),
|
|
62
|
+
{
|
|
63
|
+
colSpan: 2,
|
|
64
|
+
hAlign: 'center',
|
|
65
|
+
content: (0, colorette_1.dim)(`To see list of available packages,run command 'npx unisphere local list'
|
|
66
|
+
in the target project directory and then choose the desired package command`),
|
|
67
|
+
},
|
|
68
|
+
]);
|
|
48
69
|
table.push([
|
|
49
70
|
{
|
|
50
71
|
colSpan: 3,
|
|
@@ -54,7 +75,7 @@ const createHowToCommand = () => {
|
|
|
54
75
|
]);
|
|
55
76
|
table.push([
|
|
56
77
|
(0, colorette_1.bold)('Init'),
|
|
57
|
-
'Register the project in the
|
|
78
|
+
'Register the project in the local environment (useful for local development)',
|
|
58
79
|
'npx unisphere init',
|
|
59
80
|
]);
|
|
60
81
|
table.push([
|
|
@@ -72,18 +93,6 @@ const createHowToCommand = () => {
|
|
|
72
93
|
'Reset the cache to resolve build issues',
|
|
73
94
|
'npx unisphere reset',
|
|
74
95
|
]);
|
|
75
|
-
table.push([
|
|
76
|
-
{
|
|
77
|
-
colSpan: 3,
|
|
78
|
-
hAlign: 'center',
|
|
79
|
-
content: (0, colorette_1.bold)((0, colorette_1.green)('Global Commands')),
|
|
80
|
-
},
|
|
81
|
-
]);
|
|
82
|
-
table.push([
|
|
83
|
-
(0, colorette_1.bold)('Projects list'),
|
|
84
|
-
'Display list of registered projects in the global environment',
|
|
85
|
-
'npx unisphere local projects-list',
|
|
86
|
-
]);
|
|
87
96
|
let showInitComment = false;
|
|
88
97
|
if (ctx.workspace.config.elements.workspace) {
|
|
89
98
|
table.push([
|
|
@@ -98,6 +107,11 @@ const createHowToCommand = () => {
|
|
|
98
107
|
'Build the workspace',
|
|
99
108
|
'npx unisphere context build workspace',
|
|
100
109
|
]);
|
|
110
|
+
table.push([
|
|
111
|
+
(0, colorette_1.bold)('Lint'),
|
|
112
|
+
'Lint the workspace',
|
|
113
|
+
'npx nx run unisphere-workspace:lint --fix',
|
|
114
|
+
]);
|
|
101
115
|
table.push([
|
|
102
116
|
(0, colorette_1.bold)('Serve'),
|
|
103
117
|
'Serve the workspace',
|
|
@@ -122,6 +136,11 @@ const createHowToCommand = () => {
|
|
|
122
136
|
'Build the loader',
|
|
123
137
|
'npx unisphere context build loader',
|
|
124
138
|
]);
|
|
139
|
+
table.push([
|
|
140
|
+
(0, colorette_1.bold)('Lint'),
|
|
141
|
+
'Lint the loader',
|
|
142
|
+
'npx nx run unisphere-loader:lint --fix',
|
|
143
|
+
]);
|
|
125
144
|
table.push([
|
|
126
145
|
(0, colorette_1.bold)('Serve'),
|
|
127
146
|
'Serve the loader',
|
|
@@ -136,7 +155,7 @@ const createHowToCommand = () => {
|
|
|
136
155
|
if (Object.keys(ctx.workspace.config.elements.packages || {})
|
|
137
156
|
.length > 0) {
|
|
138
157
|
showInitComment = true;
|
|
139
|
-
for (const [name
|
|
158
|
+
for (const [name] of Object.entries(ctx.workspace.config.elements.packages)) {
|
|
140
159
|
table.push([
|
|
141
160
|
{
|
|
142
161
|
colSpan: 3,
|
|
@@ -150,9 +169,9 @@ const createHowToCommand = () => {
|
|
|
150
169
|
`npx unisphere package build ${name}`,
|
|
151
170
|
]);
|
|
152
171
|
table.push([
|
|
153
|
-
(0, colorette_1.bold)('
|
|
154
|
-
'
|
|
155
|
-
`npx
|
|
172
|
+
(0, colorette_1.bold)('Lint'),
|
|
173
|
+
'Lint the package',
|
|
174
|
+
`npx nx run unisphere-packages-${name}:lint --fix`,
|
|
156
175
|
]);
|
|
157
176
|
}
|
|
158
177
|
}
|
|
@@ -173,13 +192,13 @@ const createHowToCommand = () => {
|
|
|
173
192
|
]);
|
|
174
193
|
table.push([
|
|
175
194
|
(0, colorette_1.bold)('Serve'),
|
|
176
|
-
'Serve the context',
|
|
195
|
+
'Serve the context (default port is 8300)',
|
|
177
196
|
`npx unisphere context serve ${name}`,
|
|
178
197
|
]);
|
|
179
198
|
table.push([
|
|
180
199
|
(0, colorette_1.bold)('Serve (custom port)'),
|
|
181
|
-
'Serve the context with a specific port (e.g.
|
|
182
|
-
`npx unisphere context serve ${name} --port
|
|
200
|
+
'Serve the context with a specific port (e.g. 8320)',
|
|
201
|
+
`npx unisphere context serve ${name} --port 8320`,
|
|
183
202
|
]);
|
|
184
203
|
}
|
|
185
204
|
}
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../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AC,GAAG,EAAE,CAAC;IACnB,CAAC,CAAA,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AA3PW,QAAA,kBAAkB,sBA2P7B"}
|
|
@@ -33,9 +33,9 @@ const createInitCommand = () => {
|
|
|
33
33
|
if (!workspaceFile) {
|
|
34
34
|
(0, prompts_1.logErrorAndExit)(`No .unisphere file found in the widget directory`);
|
|
35
35
|
}
|
|
36
|
-
const widgetName = workspaceFile.config.name
|
|
36
|
+
const widgetName = `${workspaceFile.config.company}.${workspaceFile.config.type || 'widget'}.${workspaceFile.config.name}`;
|
|
37
37
|
const globalFile = (0, get_global_file_1.getGlobalFile)();
|
|
38
|
-
globalFile[widgetName] = cwd;
|
|
38
|
+
globalFile.projects[widgetName] = { cwd };
|
|
39
39
|
(0, get_global_file_1.setGlobalFile)(globalFile);
|
|
40
40
|
console.log(`${(0, colorette_1.green)('✔')} ${(0, colorette_2.bold)(`registered project '${widgetName}'`)} ${(0, prompts_1.onlyUnix)('🎉')} ${(0, colorette_3.dim)(cwd)}`);
|
|
41
41
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/init/command.ts"],"names":[],"mappings":";;;;AAAA,yCAAoC;AACpC,6CAAqD;AACrD,mCAAmC;AACnC,iCAA0B;AAC1B,2EAG+C;AAC/C,yCAAuC;AACvC,yCAAiC;AACjC,yCAAgC;AAChC,yDAAwE;AACxE,yBAAyB;AACzB,+DAAwE;AAExE,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,gBAAgB,CAAC,CAAC;AAE/B,MAAM,iBAAiB,GAAG,GAAY,EAAE;IAC7C,MAAM,WAAW,GAAG,IAAI,mBAAO,CAAC,MAAM,CAAC,CAAC;IAExC,WAAW;SACR,WAAW,CAAC,gCAAgC,CAAC;SAC7C,MAAM,CAAC,WAAW,EAAE,mBAAmB,EAAE,KAAK,CAAC;SAC/C,MAAM,CAAC,cAAc,EAAE,8BAA8B,CAAC;SACtD,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;QACzC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAA,eAAG,EAAC,2BAA2B,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;QAExD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACvB,IAAA,yBAAe,EAAC,6BAA6B,GAAG,EAAE,CAAC,CAAC;SACrD;QAED,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAqB,EAAC,GAAG,EAAE;YACrD,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;QAEH,IAAI,CAAC,aAAa,EAAE;YAClB,IAAA,yBAAe,EAAC,kDAAkD,CAAC,CAAC;SACrE;QAED,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/init/command.ts"],"names":[],"mappings":";;;;AAAA,yCAAoC;AACpC,6CAAqD;AACrD,mCAAmC;AACnC,iCAA0B;AAC1B,2EAG+C;AAC/C,yCAAuC;AACvC,yCAAiC;AACjC,yCAAgC;AAChC,yDAAwE;AACxE,yBAAyB;AACzB,+DAAwE;AAExE,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,gBAAgB,CAAC,CAAC;AAE/B,MAAM,iBAAiB,GAAG,GAAY,EAAE;IAC7C,MAAM,WAAW,GAAG,IAAI,mBAAO,CAAC,MAAM,CAAC,CAAC;IAExC,WAAW;SACR,WAAW,CAAC,gCAAgC,CAAC;SAC7C,MAAM,CAAC,WAAW,EAAE,mBAAmB,EAAE,KAAK,CAAC;SAC/C,MAAM,CAAC,cAAc,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B"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createListCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const utils_1 = require("../../../utils/utils");
|
|
6
|
+
const debug_1 = require("debug");
|
|
7
|
+
const colorette_1 = require("colorette");
|
|
8
|
+
const colorette_2 = require("colorette");
|
|
9
|
+
const colorette_3 = require("colorette");
|
|
10
|
+
const fs = require("fs");
|
|
11
|
+
const Table = require("cli-table3");
|
|
12
|
+
const get_global_file_1 = require("../../../utils/unisphere/get-global-file");
|
|
13
|
+
const workspace_1 = require("../../../utils/unisphere/workspace");
|
|
14
|
+
const debug = (0, debug_1.default)('unisphere:local:list');
|
|
15
|
+
const createListCommand = (parentCommand) => {
|
|
16
|
+
const listCommand = parentCommand.command('list');
|
|
17
|
+
listCommand
|
|
18
|
+
.description('display list of Unisphere widgets registered in local environment')
|
|
19
|
+
.option('--verbose', 'output debug logs', false)
|
|
20
|
+
.hook('preAction', utils_1.printVerboseHook)
|
|
21
|
+
.action((options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
+
const globalFile = (0, get_global_file_1.getGlobalFile)();
|
|
23
|
+
const tableWidgets = new Table({
|
|
24
|
+
head: ['Widget', 'Path', 'Available'],
|
|
25
|
+
style: {
|
|
26
|
+
head: ['green', 'bold'],
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
const tablePackages = new Table({
|
|
30
|
+
head: ['Package', 'Command'],
|
|
31
|
+
style: {
|
|
32
|
+
head: ['green', 'bold'],
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
for (const [widgetName, { cwd }] of Object.entries(globalFile.projects)) {
|
|
36
|
+
let status = '';
|
|
37
|
+
let exists = false;
|
|
38
|
+
try {
|
|
39
|
+
exists = fs.existsSync(cwd);
|
|
40
|
+
status = exists ? (0, colorette_1.green)('✓') : (0, colorette_1.red)('✗');
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
status = (0, colorette_1.red)('✗');
|
|
44
|
+
}
|
|
45
|
+
tableWidgets.push([(0, colorette_2.bold)(widgetName), (0, colorette_3.dim)(cwd), status]);
|
|
46
|
+
const workspaceFile = yield (0, workspace_1.getUnisphereWorkspace)(cwd, {
|
|
47
|
+
suspendRecursion: true,
|
|
48
|
+
});
|
|
49
|
+
if (workspaceFile) {
|
|
50
|
+
const { packages } = workspaceFile.config.elements;
|
|
51
|
+
tablePackages.push([
|
|
52
|
+
{
|
|
53
|
+
hAlign: 'center',
|
|
54
|
+
colSpan: 2,
|
|
55
|
+
content: (0, colorette_2.bold)((0, colorette_1.green)(widgetName)),
|
|
56
|
+
},
|
|
57
|
+
]);
|
|
58
|
+
if (exists) {
|
|
59
|
+
for (const packageName of Object.keys(packages)) {
|
|
60
|
+
tablePackages.push([
|
|
61
|
+
(0, colorette_2.bold)(packageName),
|
|
62
|
+
`npx unisphere local publish ${widgetName} ${packageName}`,
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
tablePackages.push([
|
|
68
|
+
{
|
|
69
|
+
colSpan: 2,
|
|
70
|
+
content: (0, colorette_2.bold)((0, colorette_1.red)(`Cannot find ${widgetName} project.
|
|
71
|
+
You need to run 'unisphere init' in ${widgetName} project`)),
|
|
72
|
+
},
|
|
73
|
+
]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (tableWidgets.length === 0) {
|
|
78
|
+
console.log('No Unisphere widgets registered');
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
console.log((0, colorette_2.bold)(`Available widgets:`));
|
|
82
|
+
console.log(tableWidgets.toString());
|
|
83
|
+
console.log((0, colorette_2.bold)(`Missing a widget? Run 'npx unisphere init' in the missing widget directory`));
|
|
84
|
+
console.log((0, colorette_2.bold)(`
|
|
85
|
+
|
|
86
|
+
Available packages:`));
|
|
87
|
+
console.log(tablePackages.toString());
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
return listCommand;
|
|
91
|
+
};
|
|
92
|
+
exports.createListCommand = createListCommand;
|
|
93
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../../packages/unisphere-cli/src/lib/commands/local/list/command.ts"],"names":[],"mappings":";;;;AACA,gDAAwD;AACxD,iCAA0B;AAC1B,yCAAuC;AACvC,yCAAiC;AACjC,yCAAgC;AAChC,yBAAyB;AACzB,oCAAoC;AACpC,8EAAyE;AACzE,kEAA2E;AAE3E,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,sBAAsB,CAAC,CAAC;AAErC,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,MAAM,UAAU,GAAG,IAAA,+BAAa,GAAE,CAAC;QAEnC,MAAM,YAAY,GAAG,IAAI,KAAK,CAAC;YAC7B,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC;YACrC,KAAK,EAAE;gBACL,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;aACxB;SACF,CAAC,CAAC;QAEH,MAAM,aAAa,GAAG,IAAI,KAAK,CAAC;YAC9B,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;YAC5B,KAAK,EAAE;gBACL,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;aACxB;SACF,CAAC,CAAC;QAEH,KA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,CAAC;qBACJ;iBACF;qBAAM;oBACL,aAAa,CAAC,IAAI,CAAC;wBACjB;4BACE,OAAO,EAAE,CAAC;4BACV,OAAO,EAAE,IAAA,gBAAI,EACX,IAAA,eAAG,EACD,eAAe,UAAU;sCACP,UAAU,UAAU,CACvC,CACF;yBACF;qBACF,CAAC,CAAC;iBACJ;aACF;SACF;QAED,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;YAC7B,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;SAChD;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,IAAA,gBAAI,EAAC,oBAAoB,CAAC,CAAC,CAAC;YACxC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;YACrC,OAAO,CAAC,GAAG,CACT,IAAA,gBAAI,EACF,4EAA4E,CAC7E,CACF,CAAC;YAEF,OAAO,CAAC,GAAG,CACT,IAAA,gBAAI,EAAC;;oBAEK,CAAC,CACZ,CAAC;YACF,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC;SACvC;IACH,CAAC,CAAA,CAAC,CAAC;IAEL,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAjGW,QAAA,iBAAiB,qBAiG5B"}
|
|
@@ -2,13 +2,15 @@
|
|
|
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("./
|
|
6
|
-
const command_2 = require("./
|
|
5
|
+
const command_1 = require("./list/command");
|
|
6
|
+
const command_2 = require("./publish/command");
|
|
7
|
+
const command_3 = require("./remove/command");
|
|
7
8
|
const createLocalCommand = () => {
|
|
8
9
|
const localCommand = new commander_1.Command('local');
|
|
9
10
|
localCommand.description('manage Unisphere projects in local environment');
|
|
10
|
-
(0, command_1.
|
|
11
|
-
(0,
|
|
11
|
+
(0, command_1.createListCommand)(localCommand);
|
|
12
|
+
(0, command_3.createRemoveCommand)(localCommand);
|
|
13
|
+
(0, command_2.createPublishCommand)(localCommand);
|
|
12
14
|
return localCommand;
|
|
13
15
|
};
|
|
14
16
|
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,
|
|
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;AACnD,+CAAyD;AACzD,8CAAuD;AAEhD,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,IAAA,6BAAmB,EAAC,YAAY,CAAC,CAAC;IAClC,IAAA,8BAAoB,EAAC,YAAY,CAAC,CAAC;IACnC,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AATW,QAAA,kBAAkB,sBAS7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createPublishCommand = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const commander_1 = require("commander");
|
|
6
6
|
const utils_1 = require("../../../utils/utils");
|
|
@@ -15,28 +15,25 @@ const create_exec_task_1 = require("../../../utils/listr2/create-exec-task");
|
|
|
15
15
|
const fs = require("fs");
|
|
16
16
|
const defaults_1 = require("../../../utils/listr2/defaults");
|
|
17
17
|
const debug = (0, debug_1.default)('unisphere:package:link');
|
|
18
|
-
const
|
|
19
|
-
const command = parentCommand.command('
|
|
18
|
+
const createPublishCommand = (parentCommand) => {
|
|
19
|
+
const command = parentCommand.command('publish');
|
|
20
20
|
command
|
|
21
|
-
.description('
|
|
21
|
+
.description('publish a package from a local unisphere project into the current project')
|
|
22
22
|
.option('--verbose', 'output debug logs', false)
|
|
23
|
-
.addArgument(new commander_1.Argument('widget', 'the widget to
|
|
24
|
-
.addArgument(new commander_1.Argument('packageName', 'the package to
|
|
23
|
+
.addArgument(new commander_1.Argument('widget', 'the widget to publish'))
|
|
24
|
+
.addArgument(new commander_1.Argument('packageName', 'the package to publish'))
|
|
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
28
|
.action((widgetName, packageName, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
29
29
|
var _a, _b;
|
|
30
30
|
const cwd = options.cwd || process.cwd();
|
|
31
|
-
|
|
32
|
-
? widgetName
|
|
33
|
-
: `unisphere.widget.${widgetName}`;
|
|
34
|
-
(0, prompts_1.logSuccess)(`Linking ${packageName} to ${resolvedWidgetName}`);
|
|
31
|
+
debug(`Publishing package ${packageName} of widget '${widgetName}' into '${cwd}'`);
|
|
35
32
|
// Get widget path from global config
|
|
36
33
|
const globalConfig = (0, get_global_file_1.getGlobalFile)();
|
|
37
|
-
const widgetPath = globalConfig[
|
|
34
|
+
const widgetPath = globalConfig.projects[widgetName].cwd;
|
|
38
35
|
if (!widgetPath) {
|
|
39
|
-
(0, prompts_1.logErrorAndExit)(`Widget ${
|
|
36
|
+
(0, prompts_1.logErrorAndExit)(`Widget ${widgetName} not found in global config. Please register it first using 'unisphere local-env register'`);
|
|
40
37
|
}
|
|
41
38
|
const workspaceFile = yield (0, workspace_1.getUnisphereWorkspace)(widgetPath, {
|
|
42
39
|
suspendRecursion: true,
|
|
@@ -48,12 +45,12 @@ const createLinkCommand = (parentCommand) => {
|
|
|
48
45
|
if (!nxProjectName) {
|
|
49
46
|
(0, prompts_1.logErrorAndExit)(`No nx project name found for package ${packageName} (did you remember to include it in the .unisphere file?)`);
|
|
50
47
|
}
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
(0, prompts_1.logSuccess)(`deploying package ${packageName} to ${
|
|
48
|
+
const publishToPath = path.join(cwd, 'bin');
|
|
49
|
+
const publishFromPath = path.join(widgetPath, 'dist/unisphere/packages', packageName);
|
|
50
|
+
(0, prompts_1.logSuccess)(`deploying package ${packageName} to ${publishToPath}`);
|
|
54
51
|
debug({
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
publishToPath,
|
|
53
|
+
publishFromPath,
|
|
57
54
|
cwd,
|
|
58
55
|
packageName,
|
|
59
56
|
nxProjectName,
|
|
@@ -67,7 +64,7 @@ const createLinkCommand = (parentCommand) => {
|
|
|
67
64
|
return (0, build_unisphere_elements_1.createListrForBuildingUnispherePackage)({
|
|
68
65
|
cwd: widgetPath,
|
|
69
66
|
nxProjectName,
|
|
70
|
-
distFolder:
|
|
67
|
+
distFolder: publishFromPath,
|
|
71
68
|
production: false,
|
|
72
69
|
lint: false,
|
|
73
70
|
verbose: options.verbose,
|
|
@@ -78,22 +75,22 @@ const createLinkCommand = (parentCommand) => {
|
|
|
78
75
|
(0, create_exec_task_1.createExecTask)({
|
|
79
76
|
title: 'Running npm pack',
|
|
80
77
|
command: `npm pack`,
|
|
81
|
-
cwd:
|
|
78
|
+
cwd: publishFromPath,
|
|
82
79
|
}),
|
|
83
80
|
{
|
|
84
81
|
title: 'Ensuring directory exists',
|
|
85
|
-
task: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return yield fs.promises.mkdir(
|
|
82
|
+
task: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return yield fs.promises.mkdir(publishToPath, { recursive: true }); }),
|
|
86
83
|
},
|
|
87
84
|
{
|
|
88
85
|
title: 'Copying package to local target',
|
|
89
86
|
skip: options.dryRun,
|
|
90
87
|
task: (ctx, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
91
|
-
const tgzFiles = yield fs.promises.readdir(
|
|
92
|
-
const
|
|
88
|
+
const tgzFiles = yield fs.promises.readdir(publishFromPath);
|
|
89
|
+
const publishFromTgz = path.join(publishFromPath, tgzFiles.find((f) => f.endsWith('.tgz')));
|
|
93
90
|
const packageFileName = (ctx.packageFileName =
|
|
94
|
-
path.basename(
|
|
95
|
-
task.title = `copying '${packageFileName}' to '${
|
|
96
|
-
yield fs.promises.copyFile(
|
|
91
|
+
path.basename(publishFromTgz));
|
|
92
|
+
task.title = `copying '${packageFileName}' to '${publishToPath}'`;
|
|
93
|
+
yield fs.promises.copyFile(publishFromTgz, path.join(publishToPath, packageFileName));
|
|
97
94
|
}),
|
|
98
95
|
},
|
|
99
96
|
(0, create_exec_task_1.createExecTask)({
|
|
@@ -107,5 +104,5 @@ const createLinkCommand = (parentCommand) => {
|
|
|
107
104
|
}));
|
|
108
105
|
return command;
|
|
109
106
|
};
|
|
110
|
-
exports.
|
|
107
|
+
exports.createPublishCommand = createPublishCommand;
|
|
111
108
|
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../../packages/unisphere-cli/src/lib/commands/local/publish/command.ts"],"names":[],"mappings":";;;;AAAA,yCAAsD;AACtD,gDAAwD;AACxD,iCAA0B;AAC1B,4DAA6E;AAC7E,kEAA2E;AAC3E,8EAAyE;AACzE,gGAA2G;AAC3G,mCAA+B;AAC/B,6BAA8B;AAC9B,6EAAwE;AACxE,yBAA0B;AAC1B,6DAAwE;AAExE,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,wBAAwB,CAAC,CAAC;AAEvC,MAAM,oBAAoB,GAAG,CAAC,aAAsB,EAAW,EAAE;IACtE,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,CAA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oBACxB,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;oBAC5D,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAC9B,eAAe,EACf,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CACzC,CAAC;oBACF,MAAM,eAAe,GAAG,CAAC,GAAG,CAAC,eAAe;wBAC1C,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;oBACjC,IAAI,CAAC,KAAK,GAAG,YAAY,eAAe,SAAS,aAAa,GAAG,CAAC;oBAElE,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CACxB,cAAc,EACd,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,CAC1C,CAAC;gBACJ,CAAC,CAAA;aACF;YACD,IAAA,iCAAc,EAAC;gBACb,KAAK,EAAE,0BAA0B;gBACjC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,kBAAkB,GAAG,CAAC,eAAe,EAAE;gBACzD,GAAG;gBACH,IAAI,EAAE,OAAO,CAAC,MAAM;aACrB,CAAC;SACH,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;AA3HW,QAAA,oBAAoB,wBA2H/B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createRemoveCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const commander_1 = require("commander");
|
|
6
|
+
const utils_1 = require("../../../utils/utils");
|
|
7
|
+
const debug_1 = require("debug");
|
|
8
|
+
const colorette_1 = require("colorette");
|
|
9
|
+
const colorette_2 = require("colorette");
|
|
10
|
+
const get_global_file_1 = require("../../../utils/unisphere/get-global-file");
|
|
11
|
+
const prompts_1 = require("../../../utils/prompts/prompts");
|
|
12
|
+
const debug = (0, debug_1.default)('unisphere:remove');
|
|
13
|
+
const createRemoveCommand = (parentCommand) => {
|
|
14
|
+
const removeCommand = parentCommand.command('remove');
|
|
15
|
+
removeCommand
|
|
16
|
+
.description('remove a Unisphere widget from local environment')
|
|
17
|
+
.option('--verbose', 'output debug logs', false)
|
|
18
|
+
.addArgument(new commander_1.Argument('widget', 'the widget to remove'))
|
|
19
|
+
.hook('preAction', utils_1.printVerboseHook)
|
|
20
|
+
.action((widgetName, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
const globalFile = (0, get_global_file_1.getGlobalFile)();
|
|
22
|
+
delete globalFile.projects[widgetName];
|
|
23
|
+
(0, get_global_file_1.setGlobalFile)(globalFile);
|
|
24
|
+
console.log(`${(0, colorette_1.green)('✔')} ${(0, colorette_2.bold)(`removed widget '${widgetName}'`)} ${(0, prompts_1.onlyUnix)('🎉')}`);
|
|
25
|
+
}));
|
|
26
|
+
return removeCommand;
|
|
27
|
+
};
|
|
28
|
+
exports.createRemoveCommand = createRemoveCommand;
|
|
29
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../../packages/unisphere-cli/src/lib/commands/local/remove/command.ts"],"names":[],"mappings":";;;;AAAA,yCAA8C;AAC9C,gDAAwD;AACxD,iCAA0B;AAC1B,yCAAuC;AACvC,yCAAiC;AACjC,8EAGkD;AAClD,4DAA0D;AAE1D,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,kBAAkB,CAAC,CAAC;AAEjC,MAAM,mBAAmB,GAAG,CAAC,aAAsB,EAAW,EAAE;IACrE,MAAM,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEtD,aAAa;SACV,WAAW,CAAC,kDAAkD,CAAC;SAC/D,MAAM,CAAC,WAAW,EAAE,mBAAmB,EAAE,KAAK,CAAC;SAC/C,WAAW,CAAC,IAAI,oBAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;SAC3D,IAAI,CAAC,WAAW,EAAE,wBAAgB,CAAC;SACnC,MAAM,CAAC,CAAO,UAAU,EAAE,OAAO,EAAE,EAAE;QACpC,MAAM,UAAU,GAAG,IAAA,+BAAa,GAAE,CAAC;QAEnC,OAAO,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACvC,IAAA,+BAAa,EAAC,UAAU,CAAC,CAAC;QAE1B,OAAO,CAAC,GAAG,CACT,GAAG,IAAA,iBAAK,EAAC,GAAG,CAAC,IAAI,IAAA,gBAAI,EAAC,mBAAmB,UAAU,GAAG,CAAC,IAAI,IAAA,kBAAQ,EACjE,IAAI,CACL,EAAE,CACJ,CAAC;IACJ,CAAC,CAAA,CAAC,CAAC;IAEL,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAtBW,QAAA,mBAAmB,uBAsB9B"}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export interface GlobalFile {
|
|
2
|
+
projects: Record<string, {
|
|
3
|
+
cwd: string;
|
|
4
|
+
}>;
|
|
5
|
+
}
|
|
6
|
+
export declare const getGlobalFile: () => GlobalFile;
|
|
7
|
+
export declare const setGlobalFile: (file: GlobalFile) => void;
|
|
@@ -11,17 +11,22 @@ const getGlobalFile = () => {
|
|
|
11
11
|
const globalFile = (0, path_1.join)(info.homedir, '.config', 'unisphere', 'projects.json');
|
|
12
12
|
if (!fs.existsSync(globalFile)) {
|
|
13
13
|
debug(`Creating global file ${globalFile}`);
|
|
14
|
-
fs.mkdirSync((0, path_1.join)(info.homedir, '.config', 'unisphere'), {
|
|
14
|
+
fs.mkdirSync((0, path_1.join)(info.homedir, '.config', 'unisphere'), {
|
|
15
|
+
recursive: true,
|
|
16
|
+
});
|
|
15
17
|
fs.writeFileSync(globalFile, '{}');
|
|
16
18
|
}
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
+
const file = JSON.parse(fs.readFileSync(globalFile, 'utf8'));
|
|
20
|
+
if (!file.projects) {
|
|
21
|
+
file.projects = {};
|
|
22
|
+
}
|
|
23
|
+
return file;
|
|
19
24
|
};
|
|
20
25
|
exports.getGlobalFile = getGlobalFile;
|
|
21
|
-
const setGlobalFile = (
|
|
26
|
+
const setGlobalFile = (file) => {
|
|
22
27
|
const info = (0, os_1.userInfo)();
|
|
23
28
|
const globalFile = (0, path_1.join)(info.homedir, '.config', 'unisphere', 'projects.json');
|
|
24
|
-
fs.writeFileSync(globalFile, JSON.stringify(
|
|
29
|
+
fs.writeFileSync(globalFile, JSON.stringify(file, null, 2));
|
|
25
30
|
};
|
|
26
31
|
exports.setGlobalFile = setGlobalFile;
|
|
27
32
|
//# sourceMappingURL=get-global-file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-global-file.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/unisphere/get-global-file.ts"],"names":[],"mappings":";;;AAAA,2BAA8B;AAC9B,+BAA4B;AAC5B,yBAAyB;AAEzB,qCAAqC;
|
|
1
|
+
{"version":3,"file":"get-global-file.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/unisphere/get-global-file.ts"],"names":[],"mappings":";;;AAAA,2BAA8B;AAC9B,+BAA4B;AAC5B,yBAAyB;AAEzB,qCAAqC;AAWrC,MAAM,KAAK,GAAG,WAAW,CAAC,2CAA2C,CAAC,CAAC;AAEhE,MAAM,aAAa,GAAG,GAAe,EAAE;IAC5C,MAAM,IAAI,GAAG,IAAA,aAAQ,GAAE,CAAC;IACxB,MAAM,UAAU,GAAG,IAAA,WAAI,EACrB,IAAI,CAAC,OAAO,EACZ,SAAS,EACT,WAAW,EACX,eAAe,CAChB,CAAC;IACF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;QAC9B,KAAK,CAAC,wBAAwB,UAAU,EAAE,CAAC,CAAC;QAC5C,EAAE,CAAC,SAAS,CAAC,IAAA,WAAI,EAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE;YACvD,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;QACH,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;KACpC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IAE7D,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;QAClB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;KACpB;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAvBW,QAAA,aAAa,iBAuBxB;AAEK,MAAM,aAAa,GAAG,CAAC,IAAgB,EAAE,EAAE;IAChD,MAAM,IAAI,GAAG,IAAA,aAAQ,GAAE,CAAC;IACxB,MAAM,UAAU,GAAG,IAAA,WAAI,EACrB,IAAI,CAAC,OAAO,EACZ,SAAS,EACT,WAAW,EACX,eAAe,CAChB,CAAC;IACF,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC;AATW,QAAA,aAAa,iBASxB"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import { Schema } from '../validator';
|
|
2
|
-
export interface UnisphereWorkspace {
|
|
3
|
-
company: string;
|
|
4
|
-
name: string;
|
|
5
|
-
repository: {
|
|
6
|
-
repositoryRootPath: string;
|
|
7
|
-
};
|
|
8
|
-
config: UnisphereWorkspaceConfig;
|
|
9
|
-
}
|
|
10
2
|
export interface UnisphereElement {
|
|
11
3
|
sourceRoot: string;
|
|
12
4
|
}
|
|
@@ -26,7 +18,9 @@ interface AugmentedUnisphereElement {
|
|
|
26
18
|
}
|
|
27
19
|
export declare const UnisphereRepositoryFileSchema: Schema;
|
|
28
20
|
export interface UnisphereRepositoryFile {
|
|
21
|
+
cwd: string;
|
|
29
22
|
name: string;
|
|
23
|
+
type?: 'widget' | 'core';
|
|
30
24
|
company: string;
|
|
31
25
|
schemaVersion: string;
|
|
32
26
|
constraints?: {
|
|
@@ -53,7 +47,9 @@ export interface UnisphereRepositoryFile {
|
|
|
53
47
|
};
|
|
54
48
|
}
|
|
55
49
|
export interface UnisphereWorkspaceConfig {
|
|
50
|
+
company: string;
|
|
56
51
|
name: string;
|
|
52
|
+
type?: 'widget' | 'core';
|
|
57
53
|
schemaVersion: string;
|
|
58
54
|
constraints?: {
|
|
59
55
|
type: 'same-version';
|
|
@@ -79,7 +75,6 @@ export interface UnisphereWorkspaceConfig {
|
|
|
79
75
|
};
|
|
80
76
|
}
|
|
81
77
|
export interface UnisphereWorkspace {
|
|
82
|
-
name: string;
|
|
83
78
|
repository: {
|
|
84
79
|
repositoryRootPath: string;
|
|
85
80
|
};
|
|
@@ -4,8 +4,14 @@ exports.UnisphereRepositoryFileSchema = void 0;
|
|
|
4
4
|
exports.UnisphereRepositoryFileSchema = {
|
|
5
5
|
type: 'object',
|
|
6
6
|
properties: {
|
|
7
|
+
cwd: { type: 'primitive', value: 'string' },
|
|
7
8
|
company: { type: 'primitive', value: 'string' },
|
|
8
9
|
name: { type: 'primitive', value: 'string' },
|
|
10
|
+
type: {
|
|
11
|
+
type: 'enum',
|
|
12
|
+
values: ['widget', 'core'],
|
|
13
|
+
optional: true,
|
|
14
|
+
},
|
|
9
15
|
schemaVersion: { type: 'primitive', value: 'string' },
|
|
10
16
|
constraints: {
|
|
11
17
|
type: 'array',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/unisphere/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/unisphere/types.ts"],"names":[],"mappings":";;;AAuBa,QAAA,6BAA6B,GAAW;IACnD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,GAAG,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;QAC3C,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;QAC/C,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;QAC5C,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC;YAC1B,QAAQ,EAAE,IAAI;SACf;QACD,aAAa,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;QACrD,WAAW,EAAE;YACX,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;oBAC5C,QAAQ,EAAE;wBACR,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE;4BACL,IAAI,EAAE,WAAW;4BACjB,KAAK,EAAE,QAAQ;yBAChB;qBACF;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE;4BACL,IAAI,EAAE,WAAW;4BACjB,KAAK,EAAE,QAAQ;yBAChB;qBACF;iBACF;gBACD,sBAAsB,EAAE,KAAK;aAC9B;SACF;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,KAAK;o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AAM,EAAE,WAAW,CAAC;yBAC9B;qBACF;iBACF;aACF;YACD,sBAAsB,EAAE,KAAK;SAC9B;KACF;CACF,CAAC"}
|
package/src/lib/utils/unisphere/{find-unisphere-workspace-file.js → unisphere-workspace-file.js}
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getUnisphereWorkspaceFile =
|
|
3
|
+
exports.getUnisphereWorkspaceFile = void 0;
|
|
4
4
|
const fs = require("fs");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const process = require("process");
|
|
7
7
|
const createDebug = require("debug");
|
|
8
|
+
const read_json_file_1 = require("../read-json-file");
|
|
8
9
|
const debug = createDebug('unisphere:utils:unisphere:find-unisphere-workspace-file');
|
|
9
10
|
function findUnisphereWorkspaceFile(dir = process.cwd(), suspendRecursion = false) {
|
|
10
11
|
const filePath = path.join(dir, '.unisphere');
|
|
@@ -23,13 +24,13 @@ function findUnisphereWorkspaceFile(dir = process.cwd(), suspendRecursion = fals
|
|
|
23
24
|
// Recursively search in the parent directory
|
|
24
25
|
return findUnisphereWorkspaceFile(parentDir);
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return null;
|
|
27
|
+
function getUnisphereWorkspaceFile(dir = process.cwd(), suspendRecursion = false) {
|
|
28
|
+
const repositoryRootPath = findUnisphereWorkspaceFile(dir, suspendRecursion);
|
|
29
|
+
if (!repositoryRootPath) {
|
|
30
|
+
throw new Error('Failed to find repository root path');
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
const workspaceConfigurationPath = path.join(repositoryRootPath, '.unisphere');
|
|
33
|
+
return Object.assign(Object.assign({}, (0, read_json_file_1.readJsonFile)(workspaceConfigurationPath)), { cwd: repositoryRootPath });
|
|
33
34
|
}
|
|
34
35
|
exports.getUnisphereWorkspaceFile = getUnisphereWorkspaceFile;
|
|
35
|
-
//# sourceMappingURL=
|
|
36
|
+
//# sourceMappingURL=unisphere-workspace-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unisphere-workspace-file.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/unisphere/unisphere-workspace-file.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,6BAA6B;AAC7B,mCAAmC;AACnC,qCAAqC;AACrC,sDAAiD;AAGjD,MAAM,KAAK,GAAG,WAAW,CACvB,yDAAyD,CAC1D,CAAC;AAEF,SAAS,0BAA0B,CACjC,MAAc,OAAO,CAAC,GAAG,EAAE,EAC3B,mBAA4B,KAAK;IAEjC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAE9C,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC3B,KAAK,CAAC,qCAAqC,GAAG,EAAE,CAAC,CAAC;QAClD,OAAO,GAAG,CAAC,CAAC,8CAA8C;KAC3D;IAED,IAAI,gBAAgB,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAE1C,IAAI,SAAS,KAAK,GAAG,EAAE;QACrB,4DAA4D;QAC5D,OAAO,IAAI,CAAC;KACb;IAED,6CAA6C;IAC7C,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,SAAgB,yBAAyB,CACvC,MAAc,OAAO,CAAC,GAAG,EAAE,EAC3B,mBAA4B,KAAK;IAEjC,MAAM,kBAAkB,GAAG,0BAA0B,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IAE7E,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KACxD;IAED,MAAM,0BAA0B,GAAG,IAAI,CAAC,IAAI,CAC1C,kBAAkB,EAClB,YAAY,CACb,CAAC;IAEF,uCACK,IAAA,6BAAY,EAAC,0BAA0B,CAAC,KAC3C,GAAG,EAAE,kBAAkB,IACvB;AACJ,CAAC;AAnBD,8DAmBC"}
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getUnisphereWorkspace = exports.getRuntimeBucketKey = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const path = require("path");
|
|
7
|
-
const read_json_file_1 = require("../read-json-file");
|
|
5
|
+
const unisphere_workspace_file_1 = require("./unisphere-workspace-file");
|
|
8
6
|
const debug_1 = require("debug");
|
|
9
7
|
const types_1 = require("./types");
|
|
10
8
|
const prompts_1 = require("../prompts/prompts");
|
|
@@ -16,12 +14,7 @@ exports.getRuntimeBucketKey = getRuntimeBucketKey;
|
|
|
16
14
|
const getUnisphereWorkspace = (cwd, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
17
15
|
var _a;
|
|
18
16
|
debug('looking for workspace root (assume root contains file named .unisphere)');
|
|
19
|
-
const
|
|
20
|
-
if (!repositoryRootPath) {
|
|
21
|
-
throw new Error('Failed to find repository root path');
|
|
22
|
-
}
|
|
23
|
-
const workspaceConfigurationPath = path.join(repositoryRootPath, '.unisphere');
|
|
24
|
-
const workspaceConfiguration = yield (0, read_json_file_1.readJsonFile)(workspaceConfigurationPath);
|
|
17
|
+
const workspaceConfiguration = (0, unisphere_workspace_file_1.getUnisphereWorkspaceFile)(cwd, (_a = options === null || options === void 0 ? void 0 : options.suspendRecursion) !== null && _a !== void 0 ? _a : false);
|
|
25
18
|
if (!workspaceConfiguration) {
|
|
26
19
|
(0, prompts_1.logErrorAndExit)('Failed to read workspace configuration');
|
|
27
20
|
}
|
|
@@ -33,15 +26,13 @@ const getUnisphereWorkspace = (cwd, options) => tslib_1.__awaiter(void 0, void 0
|
|
|
33
26
|
});
|
|
34
27
|
(0, prompts_1.logErrorAndExit)('Invalid workspace configuration');
|
|
35
28
|
}
|
|
36
|
-
if (workspaceConfiguration.company
|
|
37
|
-
(0, prompts_1.logErrorAndExit)(`Only Kaltura
|
|
29
|
+
if (!['kaltura', 'unisphere'].includes(workspaceConfiguration.company)) {
|
|
30
|
+
(0, prompts_1.logErrorAndExit)(`Only Kaltura widgets are supported, got '${workspaceConfiguration.company}'`);
|
|
38
31
|
}
|
|
39
|
-
const config = (0, augment_workspace_config_1.augmentWorkspaceConfig)(
|
|
32
|
+
const config = (0, augment_workspace_config_1.augmentWorkspaceConfig)(workspaceConfiguration.cwd, workspaceConfiguration);
|
|
40
33
|
return {
|
|
41
|
-
company: workspaceConfiguration.company,
|
|
42
|
-
name: workspaceConfiguration.name,
|
|
43
34
|
repository: {
|
|
44
|
-
repositoryRootPath,
|
|
35
|
+
repositoryRootPath: workspaceConfiguration.cwd,
|
|
45
36
|
},
|
|
46
37
|
config,
|
|
47
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/unisphere/workspace.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/unisphere/workspace.ts"],"names":[],"mappings":";;;;AAAA,yEAAuE;AACvE,iCAA0B;AAC1B,mCAA4E;AAC5E,gDAAiE;AACjE,yEAAoE;AACpE,4CAA8C;AAE9C,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,2BAA2B,CAAC,CAAC;AAE1C,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAAC;AAA9C,QAAA,mBAAmB,uBAA2B;AAEpD,MAAM,qBAAqB,GAAG,CACnC,GAAW,EACX,OAEC,EAC4B,EAAE;;IAC/B,KAAK,CACH,yEAAyE,CAC1E,CAAC;IAEF,MAAM,sBAAsB,GAAG,IAAA,oDAAyB,EACtD,GAAG,EACH,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,mCAAI,KAAK,CACnC,CAAC;IAEF,IAAI,CAAC,sBAAsB,EAAE;QAC3B,IAAA,yBAAe,EAAC,wCAAwC,CAAC,CAAC;KAC3D;IAED,MAAM,gBAAgB,GAAG,IAAA,0BAAc,EACrC,sBAAsB,EACtB,qCAA6B,EAC7B,yBAAyB,CAC1B,CAAC;IAEF,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/B,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAC1C,gBAAgB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACjC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QACH,IAAA,yBAAe,EAAC,iCAAiC,CAAC,CAAC;KACpD;IAED,IAAI,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE;QACtE,IAAA,yBAAe,EACb,4CAA4C,sBAAsB,CAAC,OAAO,GAAG,CAC9E,CAAC;KACH;IAED,MAAM,MAAM,GAAG,IAAA,iDAAsB,EACnC,sBAAsB,CAAC,GAAG,EAC1B,sBAAsB,CACvB,CAAC;IAEF,OAAO;QACL,UAAU,EAAE;YACV,kBAAkB,EAAE,sBAAsB,CAAC,GAAG;SAC/C;QACD,MAAM;KACP,CAAC;AACJ,CAAC,CAAA,CAAC;AAlDW,QAAA,qBAAqB,yBAkDhC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../../packages/unisphere-cli/src/lib/commands/local/link/command.ts"],"names":[],"mappings":";;;;AAAA,yCAAsD;AACtD,gDAAwD;AACxD,iCAA0B;AAC1B,4DAA6E;AAC7E,kEAA2E;AA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EF,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;IACnB,CAAC,CAAA,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AA3HW,QAAA,iBAAiB,qBA2H5B"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createProjectsListCommand = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const utils_1 = require("../../../utils/utils");
|
|
6
|
-
const debug_1 = require("debug");
|
|
7
|
-
const colorette_1 = require("colorette");
|
|
8
|
-
const colorette_2 = require("colorette");
|
|
9
|
-
const colorette_3 = require("colorette");
|
|
10
|
-
const fs = require("fs");
|
|
11
|
-
const Table = require("cli-table3");
|
|
12
|
-
const get_global_file_1 = require("../../../utils/unisphere/get-global-file");
|
|
13
|
-
const debug = (0, debug_1.default)('unisphere:info');
|
|
14
|
-
const createProjectsListCommand = (parentCommand) => {
|
|
15
|
-
const infoCommand = parentCommand.command('projects-list');
|
|
16
|
-
infoCommand
|
|
17
|
-
.description('display list of Unisphere projects registered in local environment')
|
|
18
|
-
.option('--verbose', 'output debug logs', false)
|
|
19
|
-
.hook('preAction', utils_1.printVerboseHook)
|
|
20
|
-
.action((options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
-
const globalFile = (0, get_global_file_1.getGlobalFile)();
|
|
22
|
-
const table = new Table({
|
|
23
|
-
head: ['Project', 'Path', 'Available'],
|
|
24
|
-
style: {
|
|
25
|
-
head: ['green', 'bold'],
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
for (const [moduleName, modulePath] of Object.entries(globalFile)) {
|
|
29
|
-
let status = '';
|
|
30
|
-
try {
|
|
31
|
-
const exists = fs.existsSync(modulePath);
|
|
32
|
-
status = exists ? (0, colorette_1.green)('✓') : (0, colorette_1.red)('✗');
|
|
33
|
-
}
|
|
34
|
-
catch (err) {
|
|
35
|
-
status = (0, colorette_1.red)('✗');
|
|
36
|
-
}
|
|
37
|
-
table.push([(0, colorette_2.bold)(moduleName), (0, colorette_3.dim)(modulePath), status]);
|
|
38
|
-
}
|
|
39
|
-
if (table.length === 0) {
|
|
40
|
-
console.log('No Unisphere projects registered');
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
console.log(table.toString());
|
|
44
|
-
console.log((0, colorette_2.bold)(`Missing a project? Run 'npx unisphere init' in the missing project directory`));
|
|
45
|
-
}
|
|
46
|
-
}));
|
|
47
|
-
return infoCommand;
|
|
48
|
-
};
|
|
49
|
-
exports.createProjectsListCommand = createProjectsListCommand;
|
|
50
|
-
//# sourceMappingURL=command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../../packages/unisphere-cli/src/lib/commands/local/projects-list/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,yBAAyB,GAAG,CAAC,aAAsB,EAAW,EAAE;IAC3E,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAE3D,WAAW;SACR,WAAW,CACV,oEAAoE,CACrE;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,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,CAAC,CAAC,IAAA,eAAG,EAAC,GAAG,CAAC,CAAC;aACzC;YAAC,OAAO,GAAG,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;AA5CW,QAAA,yBAAyB,6BA4CpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-unisphere-workspace-file.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/utils/unisphere/find-unisphere-workspace-file.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,6BAA6B;AAC7B,mCAAmC;AACnC,qCAAqC;AAErC,MAAM,KAAK,GAAG,WAAW,CAAC,yDAAyD,CAAC,CAAC;AAErF,SAAgB,0BAA0B,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE,EAAE,mBAA4B,KAAK;IACvG,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAE9C,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC3B,KAAK,CAAC,qCAAqC,GAAG,EAAE,CAAC,CAAC;QAClD,OAAO,GAAG,CAAC,CAAE,8CAA8C;KAC5D;IAED,IAAI,gBAAgB,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAE1C,IAAI,SAAS,KAAK,GAAG,EAAE;QACrB,4DAA4D;QAC5D,OAAO,IAAI,CAAC;KACb;IAED,6CAA6C;IAC7C,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC;AArBD,gEAqBC;AAED,SAAgB,yBAAyB,CAAC,MAAc,OAAO,CAAC,GAAG,EAAE;IACnE,MAAM,kBAAkB,GAAG,0BAA0B,CAAC,GAAG,CAAC,CAAC;IAC3D,IAAI,CAAC,kBAAkB,EAAE;QACvB,OAAO,IAAI,CAAC;KACb;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;AACrD,CAAC;AAND,8DAMC"}
|