@lark-apaas/fullstack-cli 1.1.63-alpha.20260826182714 → 1.1.63-alpha.20260826190313

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": "@lark-apaas/fullstack-cli",
3
- "version": "1.1.63-alpha.20260826182714",
3
+ "version": "1.1.63-alpha.20260826190313",
4
4
  "description": "CLI tool for fullstack template management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -125,6 +125,26 @@ function cleanStaleSwcOutputs(projectRoot) {
125
125
  : sourceExtension === '.cts'
126
126
  ? '.cjs'
127
127
  : '.js';
128
+ const declarationExtension =
129
+ sourceExtension === '.mts'
130
+ ? '.d.mts'
131
+ : sourceExtension === '.cts'
132
+ ? '.d.cts'
133
+ : '.d.ts';
134
+ const sourceBasePath = sourcePath.slice(0, -sourceExtension.length);
135
+ for (const suffix of [
136
+ outputExtension,
137
+ `${outputExtension}.map`,
138
+ declarationExtension,
139
+ `${declarationExtension}.map`,
140
+ ]) {
141
+ const generatedSourceSibling = `${sourceBasePath}${suffix}`;
142
+ if (fs.existsSync(generatedSourceSibling)) {
143
+ fs.rmSync(generatedSourceSibling, { force: true });
144
+ removed += 1;
145
+ }
146
+ }
147
+
128
148
  for (const emitRoot of emitRoots) {
129
149
  const relativeSourcePath = path.relative(emitRoot, sourcePath);
130
150
  if (
@@ -142,8 +162,8 @@ function cleanStaleSwcOutputs(projectRoot) {
142
162
  for (const suffix of [
143
163
  outputExtension,
144
164
  `${outputExtension}.map`,
145
- '.d.ts',
146
- '.d.ts.map',
165
+ declarationExtension,
166
+ `${declarationExtension}.map`,
147
167
  ]) {
148
168
  const outputPath = `${outputBasePath}${suffix}`;
149
169
  if (fs.existsSync(outputPath)) {