silgi 0.19.13 → 0.19.15
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/index.mjs +1 -1
- package/dist/cli/prepare.mjs +0 -1
- package/dist/cli/types.mjs +7 -9
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
package/dist/cli/types.mjs
CHANGED
|
@@ -339,8 +339,8 @@ async function resolvePathOptions(options) {
|
|
|
339
339
|
};
|
|
340
340
|
if (options.preset === "npm-package") {
|
|
341
341
|
options.alias = {
|
|
342
|
-
...options.alias
|
|
343
|
-
|
|
342
|
+
...options.alias
|
|
343
|
+
// '#silgi/app/': join(options.build.dir, '/'),
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
346
|
if (options.alias && typeof options.alias === "object") {
|
|
@@ -595,6 +595,7 @@ async function silgiGenerateType(silgi) {
|
|
|
595
595
|
/^(?=[^.])/,
|
|
596
596
|
"./"
|
|
597
597
|
),
|
|
598
|
+
silgi.options.preset === "npm-package" ? join(relativeWithDot(tsconfigDir, silgi.options.rootDir), "dist/moduleTypes.d.ts") : "",
|
|
598
599
|
join(relativeWithDot(tsconfigDir, silgi.options.rootDir), "**/*"),
|
|
599
600
|
...silgi.options.srcDir === silgi.options.rootDir ? [] : [join(relativeWithDot(tsconfigDir, silgi.options.srcDir), "**/*")]
|
|
600
601
|
]);
|
|
@@ -725,13 +726,10 @@ async function silgiGenerateType(silgi) {
|
|
|
725
726
|
);
|
|
726
727
|
}
|
|
727
728
|
const references = [];
|
|
728
|
-
await
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
const pkg = await readPackageJSON(id, { url: silgi.options.rootDir }).catch(() => null);
|
|
733
|
-
references.push({ types: pkg?.name || id });
|
|
734
|
-
}));
|
|
729
|
+
const pkg = await readPackageJSON(resolve(silgi.options.rootDir, "package.json"));
|
|
730
|
+
if (pkg.name && silgi.options.preset === "npm-package") {
|
|
731
|
+
references.push({ types: pkg.name });
|
|
732
|
+
}
|
|
735
733
|
const declarations = [];
|
|
736
734
|
await silgi.callHook("prepare:types", { references, declarations, tsConfig });
|
|
737
735
|
tsConfig.include = [...new Set(tsConfig.include.map((p) => isAbsolute(p) ? relativeWithDot(tsconfigDir, p) : p))];
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED