silgi 0.1.3 → 0.1.5
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/cli/index.mjs +4 -3
- package/dist/ecosystem/nitro/module.d.mts +3 -3
- package/dist/ecosystem/nitro/module.d.ts +3 -3
- package/dist/ecosystem/nitro/module.mjs +36 -39
- package/dist/ecosystem/nuxt/module.d.mts +7 -0
- package/dist/ecosystem/nuxt/module.d.ts +7 -0
- package/dist/ecosystem/nuxt/module.mjs +44 -0
- package/package.json +4 -3
package/dist/cli/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import consola from 'consola';
|
|
|
3
3
|
|
|
4
4
|
const name = "silgi";
|
|
5
5
|
const type = "module";
|
|
6
|
-
const version = "0.1.
|
|
6
|
+
const version = "0.1.4";
|
|
7
7
|
const packageManager = "pnpm@9.15.1";
|
|
8
8
|
const exports = {
|
|
9
9
|
".": {
|
|
@@ -21,8 +21,8 @@ const exports = {
|
|
|
21
21
|
"import": "./dist/ecosystem/nitro/module.mjs"
|
|
22
22
|
},
|
|
23
23
|
"./nuxt": {
|
|
24
|
-
types: "./dist/ecosystem/
|
|
25
|
-
"import": "./dist/ecosystem/
|
|
24
|
+
types: "./dist/ecosystem/nuxt/module.d.mts",
|
|
25
|
+
"import": "./dist/ecosystem/nuxt/module.mjs"
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
const types = "./dist/index.d.ts";
|
|
@@ -92,6 +92,7 @@ const dependencies = {
|
|
|
92
92
|
zod: "^3.24.1"
|
|
93
93
|
};
|
|
94
94
|
const devDependencies = {
|
|
95
|
+
"@nuxt/kit": "^3.15.3",
|
|
95
96
|
"@types/node": "^22.10.7",
|
|
96
97
|
"@types/semver": "^7.5.8",
|
|
97
98
|
h3: "^1.14.0",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NitroModule } from 'nitropack';
|
|
2
2
|
|
|
3
3
|
declare module 'nitropack' {
|
|
4
4
|
interface NitroOptions {
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
declare
|
|
8
|
-
declare function nitroSilgi(arg1: unknown
|
|
7
|
+
declare const nitroModule: NitroModule;
|
|
8
|
+
declare function nitroSilgi(arg1: unknown): void;
|
|
9
9
|
|
|
10
10
|
export { nitroSilgi as default, nitroModule };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NitroModule } from 'nitropack';
|
|
2
2
|
|
|
3
3
|
declare module 'nitropack' {
|
|
4
4
|
interface NitroOptions {
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
declare
|
|
8
|
-
declare function nitroSilgi(arg1: unknown
|
|
7
|
+
declare const nitroModule: NitroModule;
|
|
8
|
+
declare function nitroSilgi(arg1: unknown): void;
|
|
9
9
|
|
|
10
10
|
export { nitroSilgi as default, nitroModule };
|
|
@@ -19,47 +19,44 @@ import 'unctx';
|
|
|
19
19
|
import 'std-env';
|
|
20
20
|
import 'c12';
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
nitro.options.buildDir,
|
|
30
|
-
nitro.options.typescript.tsconfigPath
|
|
31
|
-
);
|
|
32
|
-
const tsconfigDir = dirname(tsConfigPath);
|
|
33
|
-
nitro.options.typescript.strict = true;
|
|
34
|
-
nitro.options.typescript.tsConfig ??= {};
|
|
35
|
-
nitro.options.typescript.tsConfig.include = nitro.options.typescript.tsConfig.include || [];
|
|
36
|
-
nitro.options.typescript.tsConfig.include.push(join(relativeWithDot(tsconfigDir, silgiConfig.buildDir), "**/*"));
|
|
37
|
-
nitro.options.typescript.tsConfig.compilerOptions ||= {
|
|
38
|
-
strict: true,
|
|
39
|
-
allowImportingTsExtensions: true
|
|
40
|
-
};
|
|
41
|
-
if (nitro.options.imports) {
|
|
42
|
-
nitro.options.imports.dirs ??= [];
|
|
43
|
-
nitro.options.imports.dirs.push(
|
|
44
|
-
join(silgiConfig.silgiDir, "**/*")
|
|
22
|
+
const nitroModule = {
|
|
23
|
+
name: "silgi",
|
|
24
|
+
setup: async (nitro) => {
|
|
25
|
+
const silgiConfig = await loadSilgiConfig({});
|
|
26
|
+
nitro.options.plugins = nitro.options.plugins || [];
|
|
27
|
+
nitro.options.plugins.push(
|
|
28
|
+
fileURLToPath(new URL("runtime/plugin", import.meta.url))
|
|
45
29
|
);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
30
|
+
const tsConfigPath = resolve(
|
|
31
|
+
nitro.options.buildDir,
|
|
32
|
+
nitro.options.typescript.tsconfigPath
|
|
33
|
+
);
|
|
34
|
+
const tsconfigDir = dirname(tsConfigPath);
|
|
35
|
+
nitro.options.typescript.strict = true;
|
|
36
|
+
nitro.options.typescript.tsConfig ??= {};
|
|
37
|
+
nitro.options.typescript.tsConfig.include = nitro.options.typescript.tsConfig.include || [];
|
|
38
|
+
nitro.options.typescript.tsConfig.include.push(join(relativeWithDot(tsconfigDir, silgiConfig.buildDir), "**/*"));
|
|
39
|
+
nitro.options.typescript.tsConfig.compilerOptions ||= {
|
|
40
|
+
strict: true,
|
|
41
|
+
allowImportingTsExtensions: true
|
|
42
|
+
};
|
|
43
|
+
if (nitro.options.imports) {
|
|
44
|
+
nitro.options.imports.dirs ??= [];
|
|
45
|
+
nitro.options.imports.dirs.push(
|
|
46
|
+
join(silgiConfig.silgiDir, "**/*")
|
|
47
|
+
);
|
|
48
|
+
nitro.options.imports.presets ??= [];
|
|
49
|
+
nitro.options.imports.presets.push({
|
|
50
|
+
from: "silgi",
|
|
51
|
+
imports: ["silgi"]
|
|
52
|
+
});
|
|
53
|
+
await nitro.unimport?.init();
|
|
54
|
+
}
|
|
62
55
|
}
|
|
56
|
+
};
|
|
57
|
+
function nitroSilgi(arg1) {
|
|
58
|
+
console.log(arg1);
|
|
59
|
+
nitroModule.setup(arg1);
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
export { nitroSilgi as default, nitroModule };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineNuxtModule } from '@nuxt/kit';
|
|
2
|
+
import { nitroModule } from '../nitro/module.mjs';
|
|
3
|
+
import 'node:url';
|
|
4
|
+
import 'pathe';
|
|
5
|
+
import 'consola';
|
|
6
|
+
import 'defu';
|
|
7
|
+
import 'hookable';
|
|
8
|
+
import 'untyped';
|
|
9
|
+
import '../../shared/silgi.wK7ZsagJ.mjs';
|
|
10
|
+
import 'unctx';
|
|
11
|
+
import 'std-env';
|
|
12
|
+
import 'semver/functions/satisfies.js';
|
|
13
|
+
import 'node:fs';
|
|
14
|
+
import 'h3';
|
|
15
|
+
import 'node:buffer';
|
|
16
|
+
import 'klona';
|
|
17
|
+
import 'unstorage';
|
|
18
|
+
import 'unstorage/drivers/memory';
|
|
19
|
+
import 'mlly';
|
|
20
|
+
import 'pathe/utils';
|
|
21
|
+
import '../../shared/silgi.KTm2r-Fb.mjs';
|
|
22
|
+
import 'c12';
|
|
23
|
+
|
|
24
|
+
const module = defineNuxtModule({
|
|
25
|
+
meta: {
|
|
26
|
+
name: "silgi",
|
|
27
|
+
configKey: "silgi",
|
|
28
|
+
compatibility: {
|
|
29
|
+
nuxt: ">=3.14"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaults: {},
|
|
33
|
+
setup(options, nuxt) {
|
|
34
|
+
nuxt.options.build.transpile.push("silgi");
|
|
35
|
+
if (nuxt.options?.nitro) {
|
|
36
|
+
nuxt.hooks.hookOnce("nitro:config", (nitroConfig) => {
|
|
37
|
+
nitroConfig.modules = nitroConfig.modules || [];
|
|
38
|
+
nitroConfig.modules.push(nitroModule);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export { module as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "silgi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"import": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"import": "./dist/ecosystem/nitro/module.mjs"
|
|
19
19
|
},
|
|
20
20
|
"./nuxt": {
|
|
21
|
-
"types": "./dist/ecosystem/
|
|
22
|
-
"import": "./dist/ecosystem/
|
|
21
|
+
"types": "./dist/ecosystem/nuxt/module.d.mts",
|
|
22
|
+
"import": "./dist/ecosystem/nuxt/module.mjs"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"zod": "^3.24.1"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
+
"@nuxt/kit": "^3.15.3",
|
|
79
80
|
"@types/node": "^22.10.7",
|
|
80
81
|
"@types/semver": "^7.5.8",
|
|
81
82
|
"h3": "^1.14.0",
|