silgi 0.41.44 → 0.41.45
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 +1 -1
- package/dist/cli/init.mjs +1 -1
- package/dist/cli/install.mjs +1 -1
- package/dist/cli/loader.mjs +1 -0
- package/dist/cli/prepare.mjs +7 -1
- package/dist/types/index.d.mts +3 -2
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
package/dist/cli/init.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { defineCommand, runCommand } from 'citty';
|
|
|
5
5
|
import consola from 'consola';
|
|
6
6
|
import { dirname } from 'pathe';
|
|
7
7
|
import { c as cancelOnCancel, a as command$1 } from './prepare.mjs';
|
|
8
|
+
import 'pkg-types';
|
|
8
9
|
import 'silgi/meta';
|
|
9
10
|
import './build.mjs';
|
|
10
11
|
import 'hookable';
|
|
@@ -37,7 +38,6 @@ import 'klona/full';
|
|
|
37
38
|
import 'std-env';
|
|
38
39
|
import 'consola/utils';
|
|
39
40
|
import 'escape-string-regexp';
|
|
40
|
-
import 'pkg-types';
|
|
41
41
|
import 'apiful/openapi';
|
|
42
42
|
import '../_chunks/silgiApp.mjs';
|
|
43
43
|
import 'unctx';
|
package/dist/cli/install.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import { c as commonArgs } from './common.mjs';
|
|
|
8
8
|
import { a as command$1 } from './prepare.mjs';
|
|
9
9
|
import 'unctx';
|
|
10
10
|
import 'pathe';
|
|
11
|
+
import 'pkg-types';
|
|
11
12
|
import './build.mjs';
|
|
12
13
|
import 'hookable';
|
|
13
14
|
import 'silgi';
|
|
@@ -41,7 +42,6 @@ import 'klona/full';
|
|
|
41
42
|
import 'std-env';
|
|
42
43
|
import 'consola/utils';
|
|
43
44
|
import 'escape-string-regexp';
|
|
44
|
-
import 'pkg-types';
|
|
45
45
|
import 'apiful/openapi';
|
|
46
46
|
import 'pathe/utils';
|
|
47
47
|
import 'untyped';
|
package/dist/cli/loader.mjs
CHANGED
|
@@ -580,6 +580,7 @@ async function _loadUserConfig(configOverrides = {}, opts = {}) {
|
|
|
580
580
|
options._c12 = loadedConfig;
|
|
581
581
|
const _presetName = (loadedConfig.layers || []).find((l) => l.config?._meta?.name)?.config?._meta?.name || presetOverride;
|
|
582
582
|
options.preset = _presetName;
|
|
583
|
+
options.package.present = _presetName;
|
|
583
584
|
options.compatibilityDate = resolveCompatibilityDates(
|
|
584
585
|
compatibilityDate,
|
|
585
586
|
options.compatibilityDate
|
package/dist/cli/prepare.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineCommand, runCommand } from 'citty';
|
|
2
2
|
import { resolve } from 'pathe';
|
|
3
|
+
import { readPackageJSON } from 'pkg-types';
|
|
3
4
|
import { version } from 'silgi/meta';
|
|
4
5
|
import { p as prepareEnv, c as createSilgiCLI, b as build } from './build.mjs';
|
|
5
6
|
import { c as commonArgs } from './common.mjs';
|
|
@@ -157,13 +158,18 @@ const command = defineCommand({
|
|
|
157
158
|
},
|
|
158
159
|
async run({ args }) {
|
|
159
160
|
const rootDir = resolve(args.dir || args._dir || ".");
|
|
161
|
+
const packageJson = await readPackageJSON(rootDir);
|
|
162
|
+
const packageName = packageJson.name || "";
|
|
160
163
|
const silgi = await createSilgiCLI({
|
|
161
164
|
rootDir,
|
|
162
165
|
dev: args.dev || args.stub,
|
|
163
166
|
stub: args.stub,
|
|
164
167
|
preset: args.preset,
|
|
165
168
|
commandType: args.commandType || "prepare",
|
|
166
|
-
activeEnvironment: args.env
|
|
169
|
+
activeEnvironment: args.env,
|
|
170
|
+
package: {
|
|
171
|
+
name: packageName
|
|
172
|
+
}
|
|
167
173
|
});
|
|
168
174
|
await build(silgi);
|
|
169
175
|
if (args.commandType !== "commands") {
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1435,8 +1435,9 @@ type Schema = 'zod' | 'valibot' | 'arkType' | 'typebox';
|
|
|
1435
1435
|
interface SilgiCLIOptions extends PresetOptions {
|
|
1436
1436
|
_config: SilgiCLIConfig;
|
|
1437
1437
|
_c12: ResolvedConfig<SilgiCLIConfig> | ConfigWatcher<SilgiCLIConfig>;
|
|
1438
|
-
|
|
1439
|
-
|
|
1438
|
+
package: {
|
|
1439
|
+
present: PresetName;
|
|
1440
|
+
name: string;
|
|
1440
1441
|
};
|
|
1441
1442
|
commandType: CommandType;
|
|
1442
1443
|
commands: Commands[];
|