silgi 0.9.25 → 0.9.27
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 +51 -4
- package/dist/cli/prepare.mjs +2 -2
- package/dist/kit/index.d.mts +7 -1
- package/dist/kit/index.d.ts +7 -1
- package/dist/kit/index.mjs +17 -4
- package/dist/meta/index.d.mts +51 -4
- package/dist/meta/index.d.ts +51 -4
- package/dist/meta/index.mjs +1 -1
- package/package.json +3 -3
package/dist/_chunks/index.mjs
CHANGED
|
@@ -1,4 +1,51 @@
|
|
|
1
|
-
const version = "0.9.
|
|
1
|
+
const version = "0.9.27";
|
|
2
|
+
const peerDependencies = {
|
|
3
|
+
"@fastify/deepmerge": "^2.0.2",
|
|
4
|
+
"@nuxt/kit": "^3.15.3",
|
|
5
|
+
"@nuxt/schema": "^3.15.4",
|
|
6
|
+
h3: "^1.14.0",
|
|
7
|
+
nitropack: "^2.10.4",
|
|
8
|
+
nuxt: "^3.15.3",
|
|
9
|
+
typescript: "^5.7.3",
|
|
10
|
+
vue: "^3.5.13",
|
|
11
|
+
zod: "^3.24.1"
|
|
12
|
+
};
|
|
13
|
+
const dependencies = {
|
|
14
|
+
"@clack/prompts": "^0.10.0",
|
|
15
|
+
"@fastify/deepmerge": "^2.0.2",
|
|
16
|
+
"@oxc-parser/wasm": "^0.49.0",
|
|
17
|
+
"@standard-schema/spec": "^1.0.0",
|
|
18
|
+
c12: "^2.0.4",
|
|
19
|
+
chokidar: "^4.0.3",
|
|
20
|
+
citty: "^0.1.6",
|
|
21
|
+
compatx: "^0.1.8",
|
|
22
|
+
consola: "^3.4.0",
|
|
23
|
+
defu: "^6.1.4",
|
|
24
|
+
destr: "^2.0.3",
|
|
25
|
+
"dev-jiti": "^2.4.2",
|
|
26
|
+
"dot-prop": "^9.0.0",
|
|
27
|
+
dotenv: "^16.4.7",
|
|
28
|
+
"escape-string-regexp": "^5.0.0",
|
|
29
|
+
globby: "^14.1.0",
|
|
30
|
+
hookable: "^5.5.3",
|
|
31
|
+
ignore: "^7.0.3",
|
|
32
|
+
klona: "^2.0.6",
|
|
33
|
+
knitwork: "^1.2.0",
|
|
34
|
+
mlly: "^1.7.4",
|
|
35
|
+
ofetch: "^1.4.1",
|
|
36
|
+
ohash: "^1.1.4",
|
|
37
|
+
pathe: "^2.0.3",
|
|
38
|
+
picocolors: "^1.1.1",
|
|
39
|
+
"pkg-types": "^1.3.1",
|
|
40
|
+
scule: "^1.3.0",
|
|
41
|
+
semver: "^7.7.1",
|
|
42
|
+
"std-env": "^3.8.0",
|
|
43
|
+
ufo: "^1.5.4",
|
|
44
|
+
unctx: "^2.4.1",
|
|
45
|
+
unimport: "^4.1.2",
|
|
46
|
+
unstorage: "^1.15.0",
|
|
47
|
+
untyped: "^1.5.2"
|
|
48
|
+
};
|
|
2
49
|
const devDependencies = {
|
|
3
50
|
"@antfu/eslint-config": "^4.3.0",
|
|
4
51
|
"@nuxt/kit": "^3.15.4",
|
|
@@ -11,12 +58,12 @@ const devDependencies = {
|
|
|
11
58
|
nitropack: "^2.10.4",
|
|
12
59
|
nuxt: "^3.15.4",
|
|
13
60
|
typescript: "^5.7.3",
|
|
14
|
-
unbuild: "^3.
|
|
15
|
-
vitest: "^3.0.
|
|
61
|
+
unbuild: "^3.5.0",
|
|
62
|
+
vitest: "^3.0.7",
|
|
16
63
|
vue: "^3.5.13",
|
|
17
64
|
zod: "^3.24.2"
|
|
18
65
|
};
|
|
19
66
|
const packageJson = {
|
|
20
67
|
version: version};
|
|
21
68
|
|
|
22
|
-
export { devDependencies as d, packageJson as p, version as v };
|
|
69
|
+
export { devDependencies as a, peerDependencies as b, dependencies as d, packageJson as p, version as v };
|
package/dist/cli/prepare.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineCommand } from 'citty';
|
|
2
2
|
import consola, { consola as consola$1 } from 'consola';
|
|
3
3
|
import { resolve, isAbsolute, relative, join, dirname, basename, extname } from 'pathe';
|
|
4
|
-
import {
|
|
4
|
+
import { peerDependencies, version } from 'silgi/meta';
|
|
5
5
|
import { promises, existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
6
6
|
import { readdir } from 'node:fs/promises';
|
|
7
7
|
import { resolvePath, parseNodeModulePath, lookupNodeModuleSubpath, resolveModuleExportNames, resolve as resolve$1 } from 'mlly';
|
|
@@ -1750,7 +1750,7 @@ async function commands(silgi) {
|
|
|
1750
1750
|
async function installPackages(silgi) {
|
|
1751
1751
|
const packages = {
|
|
1752
1752
|
dependencies: {
|
|
1753
|
-
"@fastify/deepmerge":
|
|
1753
|
+
"@fastify/deepmerge": peerDependencies["@fastify/deepmerge"],
|
|
1754
1754
|
...silgi.options.installPackages?.dependencies
|
|
1755
1755
|
},
|
|
1756
1756
|
devDependencies: {
|
package/dist/kit/index.d.mts
CHANGED
|
@@ -15,6 +15,12 @@ declare function tryResolveModule(id: string, url?: string | string[]): Promise<
|
|
|
15
15
|
declare function writeFile(file: string, contents: Buffer | string, log?: boolean): Promise<void>;
|
|
16
16
|
declare function isDirectory(path: string): Promise<boolean>;
|
|
17
17
|
|
|
18
|
+
declare function hash(data: any, type?: {
|
|
19
|
+
camelCase?: boolean;
|
|
20
|
+
snakeCase?: boolean;
|
|
21
|
+
flatCase?: boolean;
|
|
22
|
+
}): string;
|
|
23
|
+
|
|
18
24
|
declare function isNuxt(): boolean;
|
|
19
25
|
declare function isNitro(): boolean;
|
|
20
26
|
declare function isH3(): boolean;
|
|
@@ -109,4 +115,4 @@ declare const MODE_RE: RegExp;
|
|
|
109
115
|
declare function hasSilgiModule(moduleKey: string, silgi?: SilgiCLI): boolean;
|
|
110
116
|
declare function hasInstalledModule(moduleKey: string, silgi?: SilgiCLI): boolean;
|
|
111
117
|
|
|
112
|
-
export { MODE_RE, addTemplate, applyEnv, createResolver, defineSilgiModule, defineSilgiPreset, filterInPlace, hasInstalledModule, hasSilgiModule, isDirectory, isH3, isNitro, isNuxt, normalizeTemplate, prettyPath, relativeWithDot, resolveAlias, resolvePath, resolveSilgiModule, resolveSilgiPath, toArray, tryResolveModule, useLogger, useSilgiRuntimeConfig, writeFile };
|
|
118
|
+
export { MODE_RE, addTemplate, applyEnv, createResolver, defineSilgiModule, defineSilgiPreset, filterInPlace, hasInstalledModule, hasSilgiModule, hash, isDirectory, isH3, isNitro, isNuxt, normalizeTemplate, prettyPath, relativeWithDot, resolveAlias, resolvePath, resolveSilgiModule, resolveSilgiPath, toArray, tryResolveModule, useLogger, useSilgiRuntimeConfig, writeFile };
|
package/dist/kit/index.d.ts
CHANGED
|
@@ -15,6 +15,12 @@ declare function tryResolveModule(id: string, url?: string | string[]): Promise<
|
|
|
15
15
|
declare function writeFile(file: string, contents: Buffer | string, log?: boolean): Promise<void>;
|
|
16
16
|
declare function isDirectory(path: string): Promise<boolean>;
|
|
17
17
|
|
|
18
|
+
declare function hash(data: any, type?: {
|
|
19
|
+
camelCase?: boolean;
|
|
20
|
+
snakeCase?: boolean;
|
|
21
|
+
flatCase?: boolean;
|
|
22
|
+
}): string;
|
|
23
|
+
|
|
18
24
|
declare function isNuxt(): boolean;
|
|
19
25
|
declare function isNitro(): boolean;
|
|
20
26
|
declare function isH3(): boolean;
|
|
@@ -109,4 +115,4 @@ declare const MODE_RE: RegExp;
|
|
|
109
115
|
declare function hasSilgiModule(moduleKey: string, silgi?: SilgiCLI): boolean;
|
|
110
116
|
declare function hasInstalledModule(moduleKey: string, silgi?: SilgiCLI): boolean;
|
|
111
117
|
|
|
112
|
-
export { MODE_RE, addTemplate, applyEnv, createResolver, defineSilgiModule, defineSilgiPreset, filterInPlace, hasInstalledModule, hasSilgiModule, isDirectory, isH3, isNitro, isNuxt, normalizeTemplate, prettyPath, relativeWithDot, resolveAlias, resolvePath, resolveSilgiModule, resolveSilgiPath, toArray, tryResolveModule, useLogger, useSilgiRuntimeConfig, writeFile };
|
|
118
|
+
export { MODE_RE, addTemplate, applyEnv, createResolver, defineSilgiModule, defineSilgiPreset, filterInPlace, hasInstalledModule, hasSilgiModule, hash, isDirectory, isH3, isNitro, isNuxt, normalizeTemplate, prettyPath, relativeWithDot, resolveAlias, resolvePath, resolveSilgiModule, resolveSilgiPath, toArray, tryResolveModule, useLogger, useSilgiRuntimeConfig, writeFile };
|
package/dist/kit/index.mjs
CHANGED
|
@@ -4,6 +4,8 @@ import consola, { consola as consola$1 } from 'consola';
|
|
|
4
4
|
import { relative, resolve, dirname, normalize, isAbsolute, join, parse, basename } from 'pathe';
|
|
5
5
|
import { colors } from 'consola/utils';
|
|
6
6
|
import { getProperty } from 'dot-prop';
|
|
7
|
+
import { hash as hash$1 } from 'ohash';
|
|
8
|
+
import { camelCase, snakeCase, flatCase } from 'scule';
|
|
7
9
|
import { useSilgi, tryUseSilgiCLI, useSilgiCLI, tryUseSilgi } from 'silgi/core';
|
|
8
10
|
import { defu } from 'defu';
|
|
9
11
|
import { c as checkSilgiCompatibility } from '../cli/compatibility.mjs';
|
|
@@ -13,8 +15,6 @@ import { resolveAlias as resolveAlias$1 } from 'pathe/utils';
|
|
|
13
15
|
import process$1 from 'node:process';
|
|
14
16
|
import destr from 'destr';
|
|
15
17
|
import { klona } from 'klona';
|
|
16
|
-
import { snakeCase } from 'scule';
|
|
17
|
-
import { hash } from 'ohash';
|
|
18
18
|
import 'semver/functions/satisfies.js';
|
|
19
19
|
import 'silgi/meta';
|
|
20
20
|
|
|
@@ -72,6 +72,19 @@ async function isDirectory$1(path) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
function hash(data, type) {
|
|
76
|
+
if (type?.camelCase) {
|
|
77
|
+
return camelCase(hash$1(data));
|
|
78
|
+
}
|
|
79
|
+
if (type?.snakeCase) {
|
|
80
|
+
return snakeCase(hash$1(data));
|
|
81
|
+
}
|
|
82
|
+
if (type?.flatCase) {
|
|
83
|
+
return flatCase(hash$1(data));
|
|
84
|
+
}
|
|
85
|
+
return flatCase(hash$1(data));
|
|
86
|
+
}
|
|
87
|
+
|
|
75
88
|
function isNuxt() {
|
|
76
89
|
const silgi = useSilgi();
|
|
77
90
|
if (silgi.options.present === "nitro" || silgi.options.present === "h3" || silgi.options.present === "nuxt") {
|
|
@@ -340,7 +353,7 @@ function normalizeTemplate(template, buildDir) {
|
|
|
340
353
|
}
|
|
341
354
|
if (!template.filename) {
|
|
342
355
|
const srcPath = parse(template.src);
|
|
343
|
-
template.filename = template.fileName || `${basename(srcPath.dir)}.${srcPath.name}.${hash(template.src)}${srcPath.ext}`;
|
|
356
|
+
template.filename = template.fileName || `${basename(srcPath.dir)}.${srcPath.name}.${hash$1(template.src)}${srcPath.ext}`;
|
|
344
357
|
}
|
|
345
358
|
}
|
|
346
359
|
if (!template.src && !template.getContents) {
|
|
@@ -360,4 +373,4 @@ function normalizeTemplate(template, buildDir) {
|
|
|
360
373
|
return template;
|
|
361
374
|
}
|
|
362
375
|
|
|
363
|
-
export { MODE_RE, addTemplate, applyEnv, createResolver, defineSilgiModule, defineSilgiPreset, filterInPlace, hasInstalledModule, hasSilgiModule, isDirectory$1 as isDirectory, isH3, isNitro, isNuxt, normalizeTemplate, prettyPath, relativeWithDot, resolveAlias, resolvePath, resolveSilgiModule, resolveSilgiPath, toArray, tryResolveModule, useLogger, useSilgiRuntimeConfig, writeFile };
|
|
376
|
+
export { MODE_RE, addTemplate, applyEnv, createResolver, defineSilgiModule, defineSilgiPreset, filterInPlace, hasInstalledModule, hasSilgiModule, hash, isDirectory$1 as isDirectory, isH3, isNitro, isNuxt, normalizeTemplate, prettyPath, relativeWithDot, resolveAlias, resolvePath, resolveSilgiModule, resolveSilgiPath, toArray, tryResolveModule, useLogger, useSilgiRuntimeConfig, writeFile };
|
package/dist/meta/index.d.mts
CHANGED
|
@@ -1,4 +1,51 @@
|
|
|
1
|
-
const version = "0.9.
|
|
1
|
+
const version = "0.9.27";
|
|
2
|
+
const peerDependencies = {
|
|
3
|
+
"@fastify/deepmerge": "^2.0.2",
|
|
4
|
+
"@nuxt/kit": "^3.15.3",
|
|
5
|
+
"@nuxt/schema": "^3.15.4",
|
|
6
|
+
h3: "^1.14.0",
|
|
7
|
+
nitropack: "^2.10.4",
|
|
8
|
+
nuxt: "^3.15.3",
|
|
9
|
+
typescript: "^5.7.3",
|
|
10
|
+
vue: "^3.5.13",
|
|
11
|
+
zod: "^3.24.1"
|
|
12
|
+
};
|
|
13
|
+
const dependencies = {
|
|
14
|
+
"@clack/prompts": "^0.10.0",
|
|
15
|
+
"@fastify/deepmerge": "^2.0.2",
|
|
16
|
+
"@oxc-parser/wasm": "^0.49.0",
|
|
17
|
+
"@standard-schema/spec": "^1.0.0",
|
|
18
|
+
c12: "^2.0.4",
|
|
19
|
+
chokidar: "^4.0.3",
|
|
20
|
+
citty: "^0.1.6",
|
|
21
|
+
compatx: "^0.1.8",
|
|
22
|
+
consola: "^3.4.0",
|
|
23
|
+
defu: "^6.1.4",
|
|
24
|
+
destr: "^2.0.3",
|
|
25
|
+
"dev-jiti": "^2.4.2",
|
|
26
|
+
"dot-prop": "^9.0.0",
|
|
27
|
+
dotenv: "^16.4.7",
|
|
28
|
+
"escape-string-regexp": "^5.0.0",
|
|
29
|
+
globby: "^14.1.0",
|
|
30
|
+
hookable: "^5.5.3",
|
|
31
|
+
ignore: "^7.0.3",
|
|
32
|
+
klona: "^2.0.6",
|
|
33
|
+
knitwork: "^1.2.0",
|
|
34
|
+
mlly: "^1.7.4",
|
|
35
|
+
ofetch: "^1.4.1",
|
|
36
|
+
ohash: "^1.1.4",
|
|
37
|
+
pathe: "^2.0.3",
|
|
38
|
+
picocolors: "^1.1.1",
|
|
39
|
+
"pkg-types": "^1.3.1",
|
|
40
|
+
scule: "^1.3.0",
|
|
41
|
+
semver: "^7.7.1",
|
|
42
|
+
"std-env": "^3.8.0",
|
|
43
|
+
ufo: "^1.5.4",
|
|
44
|
+
unctx: "^2.4.1",
|
|
45
|
+
unimport: "^4.1.2",
|
|
46
|
+
unstorage: "^1.15.0",
|
|
47
|
+
untyped: "^1.5.2"
|
|
48
|
+
};
|
|
2
49
|
const devDependencies = {
|
|
3
50
|
"@antfu/eslint-config": "^4.3.0",
|
|
4
51
|
"@nuxt/kit": "^3.15.4",
|
|
@@ -11,10 +58,10 @@ const devDependencies = {
|
|
|
11
58
|
nitropack: "^2.10.4",
|
|
12
59
|
nuxt: "^3.15.4",
|
|
13
60
|
typescript: "^5.7.3",
|
|
14
|
-
unbuild: "^3.
|
|
15
|
-
vitest: "^3.0.
|
|
61
|
+
unbuild: "^3.5.0",
|
|
62
|
+
vitest: "^3.0.7",
|
|
16
63
|
vue: "^3.5.13",
|
|
17
64
|
zod: "^3.24.2"
|
|
18
65
|
};
|
|
19
66
|
|
|
20
|
-
export { devDependencies, version };
|
|
67
|
+
export { dependencies, devDependencies, peerDependencies, version };
|
package/dist/meta/index.d.ts
CHANGED
|
@@ -1,4 +1,51 @@
|
|
|
1
|
-
const version = "0.9.
|
|
1
|
+
const version = "0.9.27";
|
|
2
|
+
const peerDependencies = {
|
|
3
|
+
"@fastify/deepmerge": "^2.0.2",
|
|
4
|
+
"@nuxt/kit": "^3.15.3",
|
|
5
|
+
"@nuxt/schema": "^3.15.4",
|
|
6
|
+
h3: "^1.14.0",
|
|
7
|
+
nitropack: "^2.10.4",
|
|
8
|
+
nuxt: "^3.15.3",
|
|
9
|
+
typescript: "^5.7.3",
|
|
10
|
+
vue: "^3.5.13",
|
|
11
|
+
zod: "^3.24.1"
|
|
12
|
+
};
|
|
13
|
+
const dependencies = {
|
|
14
|
+
"@clack/prompts": "^0.10.0",
|
|
15
|
+
"@fastify/deepmerge": "^2.0.2",
|
|
16
|
+
"@oxc-parser/wasm": "^0.49.0",
|
|
17
|
+
"@standard-schema/spec": "^1.0.0",
|
|
18
|
+
c12: "^2.0.4",
|
|
19
|
+
chokidar: "^4.0.3",
|
|
20
|
+
citty: "^0.1.6",
|
|
21
|
+
compatx: "^0.1.8",
|
|
22
|
+
consola: "^3.4.0",
|
|
23
|
+
defu: "^6.1.4",
|
|
24
|
+
destr: "^2.0.3",
|
|
25
|
+
"dev-jiti": "^2.4.2",
|
|
26
|
+
"dot-prop": "^9.0.0",
|
|
27
|
+
dotenv: "^16.4.7",
|
|
28
|
+
"escape-string-regexp": "^5.0.0",
|
|
29
|
+
globby: "^14.1.0",
|
|
30
|
+
hookable: "^5.5.3",
|
|
31
|
+
ignore: "^7.0.3",
|
|
32
|
+
klona: "^2.0.6",
|
|
33
|
+
knitwork: "^1.2.0",
|
|
34
|
+
mlly: "^1.7.4",
|
|
35
|
+
ofetch: "^1.4.1",
|
|
36
|
+
ohash: "^1.1.4",
|
|
37
|
+
pathe: "^2.0.3",
|
|
38
|
+
picocolors: "^1.1.1",
|
|
39
|
+
"pkg-types": "^1.3.1",
|
|
40
|
+
scule: "^1.3.0",
|
|
41
|
+
semver: "^7.7.1",
|
|
42
|
+
"std-env": "^3.8.0",
|
|
43
|
+
ufo: "^1.5.4",
|
|
44
|
+
unctx: "^2.4.1",
|
|
45
|
+
unimport: "^4.1.2",
|
|
46
|
+
unstorage: "^1.15.0",
|
|
47
|
+
untyped: "^1.5.2"
|
|
48
|
+
};
|
|
2
49
|
const devDependencies = {
|
|
3
50
|
"@antfu/eslint-config": "^4.3.0",
|
|
4
51
|
"@nuxt/kit": "^3.15.4",
|
|
@@ -11,10 +58,10 @@ const devDependencies = {
|
|
|
11
58
|
nitropack: "^2.10.4",
|
|
12
59
|
nuxt: "^3.15.4",
|
|
13
60
|
typescript: "^5.7.3",
|
|
14
|
-
unbuild: "^3.
|
|
15
|
-
vitest: "^3.0.
|
|
61
|
+
unbuild: "^3.5.0",
|
|
62
|
+
vitest: "^3.0.7",
|
|
16
63
|
vue: "^3.5.13",
|
|
17
64
|
zod: "^3.24.2"
|
|
18
65
|
};
|
|
19
66
|
|
|
20
|
-
export { devDependencies, version };
|
|
67
|
+
export { dependencies, devDependencies, peerDependencies, version };
|
package/dist/meta/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { d as devDependencies, v as version } from '../_chunks/index.mjs';
|
|
1
|
+
export { d as dependencies, a as devDependencies, b as peerDependencies, v as version } from '../_chunks/index.mjs';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "silgi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.27",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
@@ -157,8 +157,8 @@
|
|
|
157
157
|
"nitropack": "^2.10.4",
|
|
158
158
|
"nuxt": "^3.15.4",
|
|
159
159
|
"typescript": "^5.7.3",
|
|
160
|
-
"unbuild": "^3.
|
|
161
|
-
"vitest": "^3.0.
|
|
160
|
+
"unbuild": "^3.5.0",
|
|
161
|
+
"vitest": "^3.0.7",
|
|
162
162
|
"vue": "^3.5.13",
|
|
163
163
|
"zod": "^3.24.2"
|
|
164
164
|
},
|