()
| 206 | }); |
| 207 | |
| 208 | export async function buildTs() { |
| 209 | let workspaces; |
| 210 | if (argv.workspace && !Array.isArray(argv.workspace)) { |
| 211 | workspaces = [argv.workspace]; |
| 212 | } else if (argv.workspace) { |
| 213 | workspaces = argv.workspace; |
| 214 | } else { |
| 215 | workspaces = getWorkspaces(true); |
| 216 | } |
| 217 | |
| 218 | // Generate types for passed packages in order. |
| 219 | const importModules = {}; |
| 220 | for (const workspace of workspaces) { |
| 221 | const directory = workspace |
| 222 | .replace(`@${scope}/`, "") |
| 223 | .replace(`packages/`, ""); |
| 224 | const workspaceModules = await generateTypeScriptDefinitions( |
| 225 | directory, |
| 226 | `packages/${directory}/index.d.ts`, |
| 227 | `packages/${directory}/tsd-conf.json`, |
| 228 | // The engine package needs additional processing for its enum strings |
| 229 | directory === "engine" ? processEngineSource : undefined, |
| 230 | // Handle engine's module naming exceptions |
| 231 | directory === "engine" ? processEngineModules : undefined, |
| 232 | importModules, |
| 233 | ); |
| 234 | importModules[directory] = workspaceModules; |
| 235 | } |
| 236 | |
| 237 | if (argv.workspace) { |
| 238 | return; |
| 239 | } |
| 240 | |
| 241 | // Generate types for CesiumJS. |
| 242 | await createTypeScriptDefinitions(); |
| 243 | } |
| 244 | |
| 245 | export async function tsc() { |
| 246 | let workspaces; |
nothing calls this directly
no test coverage detected
searching dependent graphs…