babelfhir-ts 1.0.40 → 1.0.41

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.
@@ -1332,6 +1332,20 @@ export async function generateIntoPackage(packageArchivePath, outArchivePath, fl
1332
1332
  // Compile TypeScript to JavaScript
1333
1333
  logger.log('Compiling TypeScript to JavaScript...');
1334
1334
  await compileTypeScriptToJS(outputDir);
1335
+ // Remove base client type stubs — they were only needed for tsc to resolve
1336
+ // @babelfhir-ts/client-r4 imports during compilation. The real package is
1337
+ // installed by the consumer via npm.
1338
+ const stubDir = path.join(outputDir, 'node_modules', '@babelfhir-ts');
1339
+ try {
1340
+ fs.rmSync(stubDir, { recursive: true, force: true });
1341
+ }
1342
+ catch { /* ignore */ }
1343
+ // Clean up empty node_modules if nothing else is in it
1344
+ const nodeModulesDir = path.join(outputDir, 'node_modules');
1345
+ try {
1346
+ fs.rmdirSync(nodeModulesDir);
1347
+ }
1348
+ catch { /* not empty or doesn't exist — fine */ }
1335
1349
  // Copy package.json to root of extractedRoot so it's at the tarball root
1336
1350
  const rootPackageJsonPath = path.join(extractedRoot, 'package.json');
1337
1351
  fs.copyFileSync(generatedPackageJsonPath, rootPackageJsonPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babelfhir-ts",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "BabelFHIR-TS: generate TypeScript interfaces, validators, and helper classes from FHIR R4 StructureDefinitions (profiles) directly inside package archives.",
5
5
  "type": "module",
6
6
  "main": "out/src/main.js",