@unisphere/cli 1.58.7 → 1.58.9
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/package/rollup.js +14 -171
- package/bundler/runtime/rollup.js +207 -95
- package/package.json +1 -1
- package/src/lib/commands/package/package-commands.js.map +1 -1
- package/src/lib/utils/unisphere/build-unisphere-elements.js +0 -1
- package/src/lib/utils/unisphere/build-unisphere-elements.js.map +1 -1
|
@@ -9,137 +9,8 @@ const path = require('path');
|
|
|
9
9
|
const { getEnvVariables } = require('../../src/lib/utils/unisphere/get-env-variables');
|
|
10
10
|
const os = require('os');
|
|
11
11
|
|
|
12
|
-
function createTempBuildTsconfig({
|
|
13
|
-
projectRoot,
|
|
14
|
-
baseTsconfigPath, // can be absolute OR relative to projectRoot
|
|
15
|
-
compilerOptions = {},
|
|
16
|
-
}) {
|
|
17
|
-
if (!projectRoot) {
|
|
18
|
-
throw new Error('createTempBuildTsconfig: projectRoot is required');
|
|
19
|
-
}
|
|
20
|
-
if (!baseTsconfigPath) {
|
|
21
|
-
throw new Error('createTempBuildTsconfig: baseTsconfigPath is required');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const resolvedProjectRoot = path.resolve(projectRoot);
|
|
25
|
-
|
|
26
|
-
// ✅ resolve base tsconfig relative to projectRoot (unless already absolute)
|
|
27
|
-
const resolvedBaseTsconfig = path.isAbsolute(baseTsconfigPath)
|
|
28
|
-
? baseTsconfigPath
|
|
29
|
-
: path.resolve(resolvedProjectRoot, baseTsconfigPath);
|
|
30
|
-
|
|
31
|
-
if (!fs.existsSync(resolvedBaseTsconfig)) {
|
|
32
|
-
throw new Error(
|
|
33
|
-
`createTempBuildTsconfig: base tsconfig not found at: ${resolvedBaseTsconfig}`
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'unisphere-tsc-'));
|
|
38
|
-
const tempTsconfigPath = path.join(tempDir, 'tsconfig.build.json');
|
|
39
|
-
|
|
40
|
-
// ✅ important: "extends" can be absolute; TS supports it.
|
|
41
|
-
const tsconfig = {
|
|
42
|
-
extends: resolvedBaseTsconfig,
|
|
43
|
-
compilerOptions: {
|
|
44
|
-
...compilerOptions,
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
console.log(`creating temporary build file in '${tempTsconfigPath}'`)
|
|
49
|
-
fs.writeFileSync(tempTsconfigPath, JSON.stringify(tsconfig, null, 2), 'utf8');
|
|
50
|
-
|
|
51
|
-
// Optional cleanup
|
|
52
|
-
const cleanup = () => {
|
|
53
|
-
try {
|
|
54
|
-
console.log(`removing temporary folder '${tempDir}'`)
|
|
55
|
-
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
56
|
-
} catch { }
|
|
57
|
-
};
|
|
58
|
-
process.on('exit', cleanup);
|
|
59
|
-
process.on('SIGINT', cleanup);
|
|
60
|
-
process.on('SIGTERM', cleanup);
|
|
61
|
-
|
|
62
|
-
return tempTsconfigPath;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
12
|
const { envVariables, isUnisphereEnvironment } = getEnvVariables();
|
|
66
13
|
|
|
67
|
-
function generateDynamicPaths(projectRoot) {
|
|
68
|
-
const paths = {};
|
|
69
|
-
|
|
70
|
-
try {
|
|
71
|
-
// Find workspace root by following tsconfig extends chain
|
|
72
|
-
const { workspaceRoot, baseTsconfigPath } = findWorkspaceRoot(projectRoot);
|
|
73
|
-
console.log(`[unisphere] Found workspace root: ${workspaceRoot}`);
|
|
74
|
-
console.log(`[unisphere] Base tsconfig path: ${baseTsconfigPath}`);
|
|
75
|
-
|
|
76
|
-
// Read base tsconfig to get original paths
|
|
77
|
-
if (fs.existsSync(baseTsconfigPath)) {
|
|
78
|
-
const baseTsconfig = JSON.parse(fs.readFileSync(baseTsconfigPath, 'utf8'));
|
|
79
|
-
const originalPaths = baseTsconfig.compilerOptions?.paths || {};
|
|
80
|
-
|
|
81
|
-
console.log(`[unisphere] Found ${Object.keys(originalPaths).length} original paths in base tsconfig`);
|
|
82
|
-
|
|
83
|
-
// Convert each path from .ts to .d.ts in dist folder
|
|
84
|
-
Object.entries(originalPaths).forEach(([key, pathArray]) => {
|
|
85
|
-
const convertedPaths = pathArray.map(originalPath => {
|
|
86
|
-
// Convert index.ts to index.d.ts and prefix with dist
|
|
87
|
-
return originalPath.replace(/index\.ts$/, 'index.d.ts').replace(/^/, 'dist/');
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
paths[key] = convertedPaths;
|
|
91
|
-
console.log(`[unisphere] Converted path mapping: ${key} -> ${convertedPaths.join(', ')}`);
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
} catch (error) {
|
|
95
|
-
console.warn(`[unisphere] Failed to generate dynamic paths: ${error.message}`);
|
|
96
|
-
console.log(`[unisphere] Falling back to basic path generation`);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
console.log(`[unisphere] Generated ${Object.keys(paths).length} path mappings`);
|
|
100
|
-
return paths;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function findWorkspaceRoot(projectRoot) {
|
|
104
|
-
let currentPath = projectRoot;
|
|
105
|
-
let tsconfigPath = path.join(currentPath, 'tsconfig.json');
|
|
106
|
-
|
|
107
|
-
console.log(`[unisphere] Starting search from: ${projectRoot}`);
|
|
108
|
-
|
|
109
|
-
while (fs.existsSync(tsconfigPath)) {
|
|
110
|
-
const tsconfig = JSON.parse(fs.readFileSync(tsconfigPath, 'utf8'));
|
|
111
|
-
const extendsPath = tsconfig.extends;
|
|
112
|
-
|
|
113
|
-
if (!extendsPath) {
|
|
114
|
-
// No extends, this might be the base
|
|
115
|
-
return { workspaceRoot: currentPath, baseTsconfigPath: tsconfigPath };
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
console.log(`[unisphere] Found extends: ${extendsPath} in ${tsconfigPath}`);
|
|
119
|
-
|
|
120
|
-
// Resolve the extends path
|
|
121
|
-
const resolvedExtendsPath = path.resolve(path.dirname(tsconfigPath), extendsPath);
|
|
122
|
-
|
|
123
|
-
if (!fs.existsSync(resolvedExtendsPath)) {
|
|
124
|
-
// Can't follow the chain further
|
|
125
|
-
return { workspaceRoot: currentPath, baseTsconfigPath: tsconfigPath };
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// Check if this is tsconfig.base.json (likely the root)
|
|
129
|
-
if (path.basename(resolvedExtendsPath) === 'tsconfig.base.json') {
|
|
130
|
-
const workspaceRoot = path.dirname(resolvedExtendsPath);
|
|
131
|
-
return { workspaceRoot, baseTsconfigPath: resolvedExtendsPath };
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Continue following the chain
|
|
135
|
-
currentPath = path.dirname(resolvedExtendsPath);
|
|
136
|
-
tsconfigPath = resolvedExtendsPath;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// Fallback - couldn't find the chain
|
|
140
|
-
throw new Error('Could not find workspace root through tsconfig extends chain');
|
|
141
|
-
}
|
|
142
|
-
|
|
143
14
|
if (!isUnisphereEnvironment) {
|
|
144
15
|
console.warn(
|
|
145
16
|
'WARNING: Building or linting unisphere elements from outside the unisphere cli will not handle runtimes.'
|
|
@@ -151,27 +22,18 @@ console.log('[unisphere] Helpful Tip: When running a build if it is using outdat
|
|
|
151
22
|
const isDeployingRuntime = envVariables.UNISPHERE_MODE === 'runtime';
|
|
152
23
|
console.log(`Building the package in '${isDeployingRuntime ? 'runtime' : 'package'}' mode`);
|
|
153
24
|
|
|
154
|
-
const withUnisphere = (
|
|
155
|
-
console.log('[unisphere] removing unisphere config used to monkey patch @nw/rollup');
|
|
156
|
-
delete config.unisphere;
|
|
25
|
+
const withUnisphere = (rollupConfig) => {
|
|
157
26
|
|
|
158
|
-
const onwarn =
|
|
27
|
+
const onwarn = rollupConfig.onwarn;
|
|
159
28
|
|
|
160
|
-
|
|
29
|
+
rollupConfig.onwarn = function (warning) {
|
|
161
30
|
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
|
|
162
31
|
return onwarn?.(warning)
|
|
163
32
|
}
|
|
164
33
|
|
|
165
|
-
const externalFn =
|
|
166
|
-
if (isDeployingRuntime) {
|
|
167
|
-
|
|
168
|
-
if (id.includes(`node_modules`)) {
|
|
169
|
-
return true;
|
|
170
|
-
}
|
|
171
|
-
return false;
|
|
172
|
-
};
|
|
173
|
-
} else {
|
|
174
|
-
config.external = (id, parent) => {
|
|
34
|
+
const externalFn = rollupConfig.external;
|
|
35
|
+
if (!isDeployingRuntime) {
|
|
36
|
+
rollupConfig.external = (id, parent) => {
|
|
175
37
|
if (
|
|
176
38
|
bundledPackages.find(
|
|
177
39
|
(bundledPackage) =>
|
|
@@ -187,29 +49,16 @@ const withUnisphere = (config) => {
|
|
|
187
49
|
};
|
|
188
50
|
}
|
|
189
51
|
|
|
190
|
-
|
|
52
|
+
rollupConfig.plugins.push(analyze({
|
|
191
53
|
summaryOnly: true, // Adjusts the output to show summary information
|
|
192
54
|
limit: 20 // Limits the output to the top 10 items
|
|
193
55
|
}), replace({
|
|
194
56
|
"process.env['NODE_ENV']": JSON.stringify(`${envVariables.UNISPHERE_ENV}`),
|
|
195
57
|
preventAssignment: true,
|
|
196
58
|
}),);
|
|
197
|
-
return
|
|
59
|
+
return rollupConfig;
|
|
198
60
|
};
|
|
199
61
|
|
|
200
|
-
const withUnisphereInterceptors = (config) => {
|
|
201
|
-
console.log('patching rollup package config');
|
|
202
|
-
config.unisphere = {
|
|
203
|
-
interceptors: {
|
|
204
|
-
compilerOptions: (options) => {
|
|
205
|
-
return options;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
return config
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
62
|
module.exports = (unisphereConfig) => {
|
|
214
63
|
|
|
215
64
|
const projectJsonPath = path.join(unisphereConfig.cwd, 'project.json');
|
|
@@ -220,26 +69,20 @@ module.exports = (unisphereConfig) => {
|
|
|
220
69
|
}
|
|
221
70
|
const outputPath = path.join('..', '..', '..', 'dist', ...sourcePath);
|
|
222
71
|
|
|
72
|
+
// dev note - this one is copied from the original rollup config file created by npm create nx-workspace
|
|
73
|
+
// when upgrading nx from 22 should compare the file created by nx to this one
|
|
223
74
|
|
|
224
|
-
const dynamicPaths = generateDynamicPaths(unisphereConfig.cwd);
|
|
225
|
-
|
|
226
|
-
const tsConfig = createTempBuildTsconfig({
|
|
227
|
-
projectRoot: unisphereConfig.cwd,
|
|
228
|
-
baseTsconfigPath: 'tsconfig.lib.json',
|
|
229
|
-
compilerOptions: {
|
|
230
|
-
paths: dynamicPaths,
|
|
231
|
-
},
|
|
232
|
-
});
|
|
233
75
|
return withUnisphere(withNx(
|
|
234
76
|
{
|
|
235
77
|
main: './src/index.ts',
|
|
236
78
|
outputPath,
|
|
237
|
-
tsConfig:
|
|
79
|
+
tsConfig: './tsconfig.lib.json',
|
|
80
|
+
compiler: 'babel',
|
|
238
81
|
external: ['react', 'react-dom', 'react/jsx-runtime'],
|
|
239
82
|
format: ['esm'],
|
|
240
83
|
assets: [{ input: '.', output: '.', glob: 'README.md' }],
|
|
241
84
|
},
|
|
242
|
-
|
|
85
|
+
{
|
|
243
86
|
// Provide additional rollup configuration here. See: https://rollupjs.org/configuration-options
|
|
244
87
|
plugins: [
|
|
245
88
|
svg({
|
|
@@ -251,7 +94,7 @@ module.exports = (unisphereConfig) => {
|
|
|
251
94
|
limit: 10000, // 10kB
|
|
252
95
|
}),
|
|
253
96
|
],
|
|
254
|
-
}
|
|
97
|
+
}
|
|
255
98
|
)
|
|
256
99
|
)
|
|
257
100
|
}
|
|
@@ -11,92 +11,152 @@ const url = require('@rollup/plugin-url');
|
|
|
11
11
|
const svg = require('@svgr/rollup');
|
|
12
12
|
const { getEnvVariables } = require('../../src/lib/utils/unisphere/get-env-variables');
|
|
13
13
|
const { getUnisphereWorkspaceFile } = require('../../src/lib/utils/unisphere/unisphere-workspace-file');
|
|
14
|
+
const os = require('os');
|
|
14
15
|
|
|
15
|
-
const { envVariables, isUnisphereEnvironment } = getEnvVariables();
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
const isDeployingRuntime = envVariables.UNISPHERE_MODE === 'runtime';
|
|
17
|
+
function findWorkspaceRoot(projectRoot) {
|
|
18
|
+
let currentPath = projectRoot;
|
|
19
|
+
let tsconfigPath = path.join(currentPath, 'tsconfig.json');
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
console.log(`[unisphere] Starting search from: ${projectRoot}`);
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
while (fs.existsSync(tsconfigPath)) {
|
|
24
|
+
const tsconfig = JSON.parse(fs.readFileSync(tsconfigPath, 'utf8'));
|
|
25
|
+
const extendsPath = tsconfig.extends;
|
|
27
26
|
|
|
27
|
+
if (!extendsPath) {
|
|
28
|
+
// No extends, this might be the base
|
|
29
|
+
return { workspaceRoot: currentPath, baseTsconfigPath: tsconfigPath };
|
|
30
|
+
}
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
interceptors: {
|
|
32
|
-
compilerOptions : (options) => {
|
|
33
|
-
// Monkey patch TS paths for shared libraries to be consumed by runtimes from dist like other dependencies
|
|
34
|
-
const projectPackages = unispherePackagesDistList.reduce((acc, item) => {
|
|
35
|
-
acc[item.packageName] = [item.distPath];
|
|
36
|
-
return acc;
|
|
37
|
-
}, {});
|
|
32
|
+
console.log(`[unisphere] Found extends: ${extendsPath} in ${tsconfigPath}`);
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
// Resolve the extends path
|
|
35
|
+
const resolvedExtendsPath = path.resolve(path.dirname(tsconfigPath), extendsPath);
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
...projectPackages
|
|
46
|
-
}
|
|
47
|
-
};
|
|
37
|
+
if (!fs.existsSync(resolvedExtendsPath)) {
|
|
38
|
+
// Can't follow the chain further
|
|
39
|
+
return { workspaceRoot: currentPath, baseTsconfigPath: tsconfigPath };
|
|
40
|
+
}
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
// Check if this is tsconfig.base.json (likely the root)
|
|
43
|
+
if (path.basename(resolvedExtendsPath) === 'tsconfig.base.json') {
|
|
44
|
+
const workspaceRoot = path.dirname(resolvedExtendsPath);
|
|
45
|
+
return { workspaceRoot, baseTsconfigPath: resolvedExtendsPath };
|
|
51
46
|
}
|
|
47
|
+
|
|
48
|
+
// Continue following the chain
|
|
49
|
+
currentPath = path.dirname(resolvedExtendsPath);
|
|
50
|
+
tsconfigPath = resolvedExtendsPath;
|
|
52
51
|
}
|
|
52
|
+
|
|
53
|
+
// Fallback - couldn't find the chain
|
|
54
|
+
throw new Error('Could not find workspace root through tsconfig extends chain');
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
function createTempBuildTsconfig({
|
|
58
|
+
projectRoot,
|
|
59
|
+
baseTsconfigPath, // can be absolute OR relative to projectRoot
|
|
60
|
+
compilerOptions = {},
|
|
61
|
+
}) {
|
|
62
|
+
if (!projectRoot) {
|
|
63
|
+
throw new Error('createTempBuildTsconfig: projectRoot is required');
|
|
64
|
+
}
|
|
65
|
+
if (!baseTsconfigPath) {
|
|
66
|
+
throw new Error('createTempBuildTsconfig: baseTsconfigPath is required');
|
|
67
|
+
}
|
|
56
68
|
|
|
57
|
-
const
|
|
69
|
+
const resolvedProjectRoot = path.resolve(projectRoot);
|
|
58
70
|
|
|
59
|
-
|
|
71
|
+
// ✅ resolve base tsconfig relative to projectRoot (unless already absolute)
|
|
72
|
+
const resolvedBaseTsconfig = path.isAbsolute(baseTsconfigPath)
|
|
73
|
+
? baseTsconfigPath
|
|
74
|
+
: path.resolve(resolvedProjectRoot, baseTsconfigPath);
|
|
60
75
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
if (!fs.existsSync(resolvedBaseTsconfig)) {
|
|
77
|
+
throw new Error(
|
|
78
|
+
`createTempBuildTsconfig: base tsconfig not found at: ${resolvedBaseTsconfig}`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'unisphere-tsc-'));
|
|
83
|
+
const tempTsconfigPath = path.join(tempDir, 'tsconfig.build.json');
|
|
84
|
+
|
|
85
|
+
// ✅ important: "extends" can be absolute; TS supports it.
|
|
86
|
+
const tsconfig = {
|
|
87
|
+
extends: resolvedBaseTsconfig,
|
|
88
|
+
compilerOptions: {
|
|
89
|
+
...compilerOptions,
|
|
90
|
+
},
|
|
69
91
|
};
|
|
70
92
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
svg({
|
|
74
|
-
svgo: false,
|
|
75
|
-
titleProp: true,
|
|
76
|
-
ref: true,
|
|
77
|
-
}),
|
|
78
|
-
url({
|
|
79
|
-
limit: 10000, // 10kB
|
|
80
|
-
}),
|
|
81
|
-
]
|
|
82
|
-
}
|
|
93
|
+
console.log(`creating temporary build file in '${tempTsconfigPath}'`)
|
|
94
|
+
fs.writeFileSync(tempTsconfigPath, JSON.stringify(tsconfig, null, 2), 'utf8');
|
|
83
95
|
|
|
84
|
-
|
|
85
|
-
|
|
96
|
+
// Optional cleanup
|
|
97
|
+
const cleanup = () => {
|
|
98
|
+
try {
|
|
99
|
+
console.log(`removing temporary folder '${tempDir}'`)
|
|
100
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
101
|
+
} catch { }
|
|
102
|
+
};
|
|
103
|
+
process.on('exit', cleanup);
|
|
104
|
+
process.on('SIGINT', cleanup);
|
|
105
|
+
process.on('SIGTERM', cleanup);
|
|
86
106
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
107
|
+
return tempTsconfigPath;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const { envVariables, isUnisphereEnvironment } = getEnvVariables();
|
|
111
|
+
|
|
112
|
+
function generateDynamicPaths(projectRoot) {
|
|
113
|
+
const paths = {};
|
|
114
|
+
|
|
115
|
+
try {
|
|
116
|
+
// Find workspace root by following tsconfig extends chain
|
|
117
|
+
const { workspaceRoot, baseTsconfigPath } = findWorkspaceRoot(projectRoot);
|
|
118
|
+
console.log(`[unisphere] Found workspace root: ${workspaceRoot}`);
|
|
119
|
+
console.log(`[unisphere] Base tsconfig path: ${baseTsconfigPath}`);
|
|
120
|
+
|
|
121
|
+
// Read base tsconfig to get original paths
|
|
122
|
+
if (fs.existsSync(baseTsconfigPath)) {
|
|
123
|
+
const baseTsconfig = JSON.parse(fs.readFileSync(baseTsconfigPath, 'utf8'));
|
|
124
|
+
const originalPaths = baseTsconfig.compilerOptions?.paths || {};
|
|
125
|
+
|
|
126
|
+
console.log(`[unisphere] Found ${Object.keys(originalPaths).length} original paths in base tsconfig`);
|
|
127
|
+
|
|
128
|
+
// Convert each path from .ts to .d.ts in dist folder
|
|
129
|
+
Object.entries(originalPaths).forEach(([key, pathArray]) => {
|
|
130
|
+
const convertedPaths = pathArray.map(originalPath => {
|
|
131
|
+
// Convert index.ts to index.d.ts and prefix with dist
|
|
132
|
+
return originalPath.replace(/index\.ts$/, 'index.d.ts').replace(/^/, 'dist/');
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
paths[key] = convertedPaths;
|
|
136
|
+
console.log(`[unisphere] Converted path mapping: ${key} -> ${convertedPaths.join(', ')}`);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
} catch (error) {
|
|
140
|
+
throw new Error(`Failed to generate dynamic paths: ${error.message}`);
|
|
141
|
+
console.warn(`[unisphere] Failed to generate dynamic paths: ${error.message}`);
|
|
142
|
+
console.log(`[unisphere] Falling back to basic path generation`);
|
|
92
143
|
}
|
|
93
144
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
145
|
+
console.log(`[unisphere] Generated ${Object.keys(paths).length} path mappings`);
|
|
146
|
+
return paths;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (!isUnisphereEnvironment) {
|
|
150
|
+
console.warn(
|
|
151
|
+
'WARNING: Building or linting unisphere elements from outside the unisphere cli will not handle runtimes.'
|
|
97
152
|
);
|
|
98
153
|
}
|
|
99
154
|
|
|
155
|
+
const isProduction = envVariables.UNISPHERE_ENV === 'production';
|
|
156
|
+
|
|
157
|
+
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`.');
|
|
158
|
+
|
|
159
|
+
|
|
100
160
|
function getUnispherePackagesDistList(cwd) {
|
|
101
161
|
|
|
102
162
|
let folderPattern = path.join(cwd, 'dist', 'unisphere', 'packages', '*');
|
|
@@ -105,7 +165,7 @@ function getUnispherePackagesDistList(cwd) {
|
|
|
105
165
|
console.log('[unisphere] running on Windows');
|
|
106
166
|
folderPattern = folderPattern.replace(/\\/g, '/');
|
|
107
167
|
}
|
|
108
|
-
console.log('[unisphere] looking for packages in', folderPattern);
|
|
168
|
+
console.log('[unisphere] looking for packages in', folderPattern);
|
|
109
169
|
const folderPaths = glob.sync(folderPattern);
|
|
110
170
|
const result = [];
|
|
111
171
|
|
|
@@ -118,7 +178,7 @@ function getUnispherePackagesDistList(cwd) {
|
|
|
118
178
|
const packageName = packageJson.name;
|
|
119
179
|
|
|
120
180
|
if (packageName) {
|
|
121
|
-
result.push({distPath, packageName});
|
|
181
|
+
result.push({ distPath, packageName });
|
|
122
182
|
}
|
|
123
183
|
}
|
|
124
184
|
});
|
|
@@ -128,50 +188,102 @@ function getUnispherePackagesDistList(cwd) {
|
|
|
128
188
|
return result;
|
|
129
189
|
}
|
|
130
190
|
|
|
131
|
-
const withUnisphere = (rollupConfig, unispherePackagesDistList) => {
|
|
132
191
|
|
|
133
|
-
|
|
134
|
-
delete rollupConfig.unisphere;
|
|
192
|
+
const getWithNx = (unisphereConfig) => {
|
|
135
193
|
|
|
136
|
-
|
|
137
|
-
if (warning.code === 'THIS_IS_UNDEFINED') return;
|
|
138
|
-
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') return;
|
|
139
|
-
warn(warning); // this requires Rollup 0.46
|
|
140
|
-
};
|
|
194
|
+
const relativeSourcePath = path.relative(unisphereConfig.cwd, unisphereConfig.workspaceConfiguration.cwd);
|
|
141
195
|
|
|
142
|
-
|
|
196
|
+
const outputPath = path.join(relativeSourcePath, 'dist', ...unisphereConfig.sourcePath);
|
|
143
197
|
|
|
144
|
-
|
|
145
|
-
rollupConfig.output[0].entryFileNames = 'index.esm.js'
|
|
146
|
-
} else {
|
|
147
|
-
rollupConfig.output[0].entryFileNames = 'index.dev.esm.js'
|
|
148
|
-
}
|
|
198
|
+
const dynamicPaths = generateDynamicPaths(unisphereConfig.cwd);
|
|
149
199
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
200
|
+
const tsConfig = createTempBuildTsconfig({
|
|
201
|
+
projectRoot: unisphereConfig.cwd,
|
|
202
|
+
baseTsconfigPath: 'tsconfig.lib.json',
|
|
203
|
+
compilerOptions: {
|
|
204
|
+
paths: dynamicPaths,
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
// dev note - this one is copied from the original rollup config file created by npm create nx-workspace
|
|
209
|
+
// when upgrading nx from 22 should compare the file created by nx to this one
|
|
210
|
+
const nxConfig = {
|
|
211
|
+
main: './src/index.ts',
|
|
212
|
+
outputPath,
|
|
213
|
+
tsConfig,
|
|
214
|
+
compiler: 'babel',
|
|
215
|
+
external: [],
|
|
216
|
+
format: ['esm'],
|
|
217
|
+
assets: [{ input: '.', output: '.', glob: 'README.md' }],
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const rollupConfig = {
|
|
221
|
+
external: () => false,
|
|
222
|
+
plugins: [
|
|
223
|
+
svg({
|
|
224
|
+
svgo: false,
|
|
225
|
+
titleProp: true,
|
|
226
|
+
ref: true,
|
|
163
227
|
}),
|
|
164
|
-
|
|
165
|
-
|
|
228
|
+
url({
|
|
229
|
+
limit: 10000, // 10kB
|
|
166
230
|
}),
|
|
167
|
-
|
|
168
|
-
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const unispherePackagesDistList = getUnispherePackagesDistList(unisphereConfig.workspaceConfiguration.cwd);
|
|
235
|
+
return withUnisphere(withNx(
|
|
236
|
+
nxConfig,
|
|
237
|
+
rollupConfig
|
|
238
|
+
), unispherePackagesDistList);
|
|
239
|
+
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const withUnisphere = (rollupConfig, unispherePackagesDistList) => {
|
|
169
243
|
|
|
244
|
+
console.log('[unisphere] removing unisphere config used to monkey patch @nw/rollup');
|
|
245
|
+
delete rollupConfig.unisphere;
|
|
170
246
|
|
|
171
|
-
|
|
247
|
+
rollupConfig.onwarn = (warning, warn) => {
|
|
248
|
+
if (warning.code === 'THIS_IS_UNDEFINED') return;
|
|
249
|
+
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') return;
|
|
250
|
+
warn(warning); // this requires Rollup 0.46
|
|
172
251
|
};
|
|
173
252
|
|
|
174
253
|
|
|
254
|
+
if (isProduction) {
|
|
255
|
+
rollupConfig.output[0].entryFileNames = 'index.esm.js'
|
|
256
|
+
} else {
|
|
257
|
+
rollupConfig.output[0].entryFileNames = 'index.dev.esm.js'
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// dev note - i'm almost certain that the alias is responsible for rollup to avoid
|
|
261
|
+
// (!) Unresolved dependencies
|
|
262
|
+
rollupConfig.plugins.push(
|
|
263
|
+
alias({
|
|
264
|
+
entries: unispherePackagesDistList.map(item => {
|
|
265
|
+
return { find: item.packageName, replacement: item.distPath }
|
|
266
|
+
})
|
|
267
|
+
}),
|
|
268
|
+
analyze({
|
|
269
|
+
summaryOnly: true, // Adjusts the output to show summary information
|
|
270
|
+
limit: 20 // Limits the output to the top 10 items
|
|
271
|
+
}), replace({
|
|
272
|
+
'process.env.UNISPHERE_DEV': JSON.stringify(`${envVariables.UNISPHERE_DEV}`),
|
|
273
|
+
'process.env.NODE_ENV': JSON.stringify(`${envVariables.UNISPHERE_ENV}`),
|
|
274
|
+
preventAssignment: true,
|
|
275
|
+
}),
|
|
276
|
+
shim({
|
|
277
|
+
'@statelyai/inspect': `export const createBrowserInspector = () => { return undefined };`
|
|
278
|
+
}),
|
|
279
|
+
isProduction ? terser() : undefined
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
return rollupConfig;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
|
|
175
287
|
|
|
176
288
|
|
|
177
289
|
module.exports = (unisphereConfig) => {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-commands.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/package/package-commands.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,+CAAyD;AACzD,mDAAqD;
|
|
1
|
+
{"version":3,"file":"package-commands.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/package/package-commands.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,+CAAyD;AACzD,mDAAqD;AAG9C,MAAM,oBAAoB,GAAG,GAAY,EAAE;IAChD,MAAM,cAAc,GAAG,IAAI,mBAAO,CAAC,SAAS,CAAC,CAAC;IAE9C,cAAc,CAAC,WAAW,CAAC,iDAAiD,CAAC,CAAC;IAE9E,IAAA,kCAAkB,EAAC,cAAc,CAAC,CAAC;IACnC,IAAA,8BAAoB,EAAC,cAAc,CAAC,CAAC;IACrC,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AARW,QAAA,oBAAoB,wBAQ/B"}
|
|
@@ -145,7 +145,6 @@ const createListrForBuildingUnisphereApplication = (_a) => tslib_1.__awaiter(voi
|
|
|
145
145
|
title: 'Running lint',
|
|
146
146
|
command: `npx nx run ${nxProjectName}:lint --fix`,
|
|
147
147
|
cwd,
|
|
148
|
-
env: (0, exports.getUnisphereEnv)(production, 'runtime'),
|
|
149
148
|
}),
|
|
150
149
|
(0, create_exec_task_1.createExecTask)({
|
|
151
150
|
title: 'Running build',
|
|
@@ -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;AAE5D,yEAAmE;AACnE,iCAA0B;AAC1B,iEAA2E;AAC3E,wDAAmD;AACnD,mFAAqE;AACrE,yBAAyB;AAEzB,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,2BAA2B,CAAC,CAAC;AAE1C,MAAM,sCAAsC,GAAG,KAoBnD,EAAE,oDApBwD,EAC3D,GAAG,EACH,aAAa,EACb,UAAU,EACV,IAAI,EACJ,OAAO,EACP,UAAU,EACV,QAAQ,EACR,WAAW,EACX,GAAG,GAAG,EAAE,GAWT;IACC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,GAAG,GAAG,aAAa,CAAC;IAElE,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAC/B,GAAG,EACH,yBAAyB,EACzB,WAAW,CACZ,CAAC;IACF,6CAA6C;IAC7C,OAAO,UAAU,CAAC,QAAQ,CACxB;QACE,IAAA,iCAAc,EAAC;YACb,KAAK,EAAE,0BAA0B;YACjC,OAAO,EAAE,kBAAkB;YAC3B,GAAG;SACJ,CAAC;QACF,IAAA,iCAAc,EAAC;YACb,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI;YACjB,K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YAC3B,GAAG;SACJ,CAAC;QACF,IAAA,iCAAc,EAAC;YACb,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI;YACjB,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,cAAc,aAAa,aAAa;YACjD,GAAG;
|
|
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;AAE5D,yEAAmE;AACnE,iCAA0B;AAC1B,iEAA2E;AAC3E,wDAAmD;AACnD,mFAAqE;AACrE,yBAAyB;AAEzB,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,2BAA2B,CAAC,CAAC;AAE1C,MAAM,sCAAsC,GAAG,KAoBnD,EAAE,oDApBwD,EAC3D,GAAG,EACH,aAAa,EACb,UAAU,EACV,IAAI,EACJ,OAAO,EACP,UAAU,EACV,QAAQ,EACR,WAAW,EACX,GAAG,GAAG,EAAE,GAWT;IACC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,GAAG,GAAG,aAAa,CAAC;IAElE,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAC/B,GAAG,EACH,yBAAyB,EACzB,WAAW,CACZ,CAAC;IACF,6CAA6C;IAC7C,OAAO,UAAU,CAAC,QAAQ,CACxB;QACE,IAAA,iCAAc,EAAC;YACb,KAAK,EAAE,0BAA0B;YACjC,OAAO,EAAE,kBAAkB;YAC3B,GAAG;SACJ,CAAC;QACF,IAAA,iCAAc,EAAC;YACb,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI;YACjB,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,cAAc,aAAa,eAAe,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EACzE,EAAE;YACJ,GAAG;YACH,GAAG,EAAE,IAAA,uBAAe,EAAC,KAAK,EAAE,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