@silgi/module-builder 0.6.9 → 0.7.1

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,7 +1,7 @@
1
1
  import { existsSync, promises } from 'node:fs';
2
2
  import { mkdir, writeFile } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
- import { fileURLToPath, pathToFileURL } from 'node:url';
4
+ import { pathToFileURL } from 'node:url';
5
5
  import { defineCommand } from 'citty';
6
6
  import { consola } from 'consola';
7
7
  import defu from 'defu';
@@ -15,9 +15,8 @@ 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.CE3Tiqv_.mjs';
18
+ import { v as version, n as name } from '../shared/silgi-module-builder.BNHMleRo.mjs';
19
19
 
20
- const srcDir = fileURLToPath(new URL("src", import.meta.url));
21
20
  const subpaths = [
22
21
  "runtime",
23
22
  "types"
@@ -54,7 +53,19 @@ const build = defineCommand({
54
53
  const { build } = await import('unbuild');
55
54
  const cwd = resolve(context.args.cwd || context.args.rootDir || ".");
56
55
  const packageData = await readPackageJSON(cwd);
57
- const jiti = createJiti(cwd);
56
+ const jiti = createJiti(cwd, {
57
+ fsCache: false,
58
+ moduleCache: false,
59
+ alias: {
60
+ [`${packageData.name}/runtime/*`]: resolve(cwd, "src/runtime/*"),
61
+ ...Object.fromEntries(
62
+ subpaths.map((subpath) => [
63
+ `${packageData.name}/${subpath}`,
64
+ resolve(cwd, `${subpath}/index.ts`)
65
+ ])
66
+ )
67
+ }
68
+ });
58
69
  const outDir = context.args.outDir || "dist";
59
70
  const rootPkg = await readPackageJSON(join(pkgDir, "package.json"));
60
71
  const isDataFolder = existsSync(join(cwd, "src", "data"));
@@ -237,11 +248,11 @@ const build = defineCommand({
237
248
  stubOptions: {
238
249
  jiti: {
239
250
  alias: {
240
- [`${packageData.name}/runtime/*`]: resolve(srcDir, "../runtime/*"),
251
+ [`${packageData.name}/runtime/*`]: resolve(cwd, "src/runtime/*"),
241
252
  ...Object.fromEntries(
242
253
  subpaths.map((subpath) => [
243
254
  `${packageData.name}/${subpath}`,
244
- resolve(srcDir, `${subpath}/index.ts`)
255
+ resolve(cwd, `${subpath}/index.ts`)
245
256
  ])
246
257
  )
247
258
  }
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.CE3Tiqv_.mjs';
4
+ import { v as version, d as description, n as name } from './shared/silgi-module-builder.BNHMleRo.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
@@ -16,4 +16,4 @@ import 'silgi/runtime/meta';
16
16
  import 'tsconfck';
17
17
  import 'typescript';
18
18
  import 'unimport';
19
- import './shared/silgi-module-builder.CE3Tiqv_.mjs';
19
+ import './shared/silgi-module-builder.BNHMleRo.mjs';
@@ -1,5 +1,5 @@
1
1
  const name = "@silgi/module-builder";
2
- const version = "0.6.9";
2
+ const version = "0.7.1";
3
3
  const description = "Complete solution for building Silgi modules";
4
4
 
5
5
  export { description as d, name as n, version as v };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silgi/module-builder",
3
3
  "type": "module",
4
- "version": "0.6.9",
4
+ "version": "0.7.1",
5
5
  "private": false,
6
6
  "description": "Complete solution for building Silgi modules",
7
7
  "exports": {
@@ -23,14 +23,14 @@
23
23
  "mlly": "^1.7.4",
24
24
  "pathe": "^2.0.3",
25
25
  "pkg-types": "^2.1.0",
26
- "silgi": "^0.37.39",
26
+ "silgi": "^0.39.0",
27
27
  "tsconfck": "^3.1.5",
28
28
  "unbuild": "^3.5.0",
29
29
  "unimport": "^5.0.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@antfu/eslint-config": "^4.13.0",
33
- "@types/node": "^22.15.16",
33
+ "@types/node": "^22.15.17",
34
34
  "eslint": "^9.26.0",
35
35
  "typescript": "^5.8.3"
36
36
  },