@silgi/module-builder 0.6.1 → 0.6.3
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/dist/chunks/build.mjs
CHANGED
@@ -15,7 +15,7 @@ import { pkgDir } from 'silgi/runtime/meta';
|
|
15
15
|
import { parse } from 'tsconfck';
|
16
16
|
import { convertCompilerOptionsFromJson } from 'typescript';
|
17
17
|
import { scanExports } from 'unimport';
|
18
|
-
import { v as version, n as name } from '../shared/silgi-module-builder.
|
18
|
+
import { v as version, n as name } from '../shared/silgi-module-builder.BhAYEk5V.mjs';
|
19
19
|
|
20
20
|
const srcDir = fileURLToPath(new URL("src", import.meta.url));
|
21
21
|
const subpaths = [
|
@@ -253,9 +253,6 @@ const build = defineCommand({
|
|
253
253
|
});
|
254
254
|
async function writeTypes(options, _moduleMeta) {
|
255
255
|
const dtsFile = resolve(options.outDir, "moduleTypes.d.mts");
|
256
|
-
if (existsSync(dtsFile)) {
|
257
|
-
return;
|
258
|
-
}
|
259
256
|
const moduleReExports = [];
|
260
257
|
const moduleTypesFile = resolve(options.outDir, "module.d.mts");
|
261
258
|
const moduleTypes = await promises.readFile(moduleTypesFile, "utf8").catch(() => "");
|
@@ -298,8 +295,8 @@ async function writeTypes(options, _moduleMeta) {
|
|
298
295
|
const dtsContents = `${`
|
299
296
|
${moduleImports.length ? `import type { ${moduleImports.join(", ")} } from './module.mjs'` : ""}
|
300
297
|
|
301
|
-
${
|
302
|
-
export
|
298
|
+
${moduleImports.length ? `
|
299
|
+
export type { ${moduleImports.join(", ")} }` : ""}
|
303
300
|
`.trim().replace(/[\n\r]{3,}/g, "\n\n")}
|
304
301
|
`;
|
305
302
|
await promises.writeFile(dtsFile, dtsContents, "utf8");
|
package/dist/cli.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import { defineCommand, runMain } from 'citty';
|
3
3
|
import { consola } from 'consola';
|
4
|
-
import { v as version, d as description, n as name } from './shared/silgi-module-builder.
|
4
|
+
import { v as version, d as description, n as name } from './shared/silgi-module-builder.BhAYEk5V.mjs';
|
5
5
|
|
6
6
|
const _rDefault = (r) => r && typeof r === "object" && "default" in r ? r.default : r;
|
7
7
|
const main = defineCommand({
|
package/dist/index.mjs
CHANGED