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.
@@ -1,4 +1,4 @@
1
- const version = "0.19.13";
1
+ const version = "0.19.15";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -257,7 +257,6 @@ const prepare = defineCommand({
257
257
  }
258
258
  },
259
259
  async run({ args }) {
260
- console.log("args", args);
261
260
  const rootDir = resolve(args.dir || args._dir || ".");
262
261
  const silgi = await createSilgiCLI({
263
262
  rootDir,
@@ -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
- "#silgi/app/": join(options.build.dir, "/")
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 Promise.all([...silgi.options.modules, ...silgi.options._modules].map(async (id) => {
729
- if (typeof id !== "string") {
730
- return;
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))];
@@ -1,4 +1,4 @@
1
- const version = "0.19.13";
1
+ const version = "0.19.15";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1,4 +1,4 @@
1
- const version = "0.19.13";
1
+ const version = "0.19.15";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.19.13",
4
+ "version": "0.19.15",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {