silgi 0.7.52 → 0.7.53

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.7.52";
1
+ const version = "0.7.53";
2
2
  const packageJson = {
3
3
  version: version};
4
4
 
@@ -1662,7 +1662,8 @@ const prepare = defineCommand({
1662
1662
  const silgi = await createSilgiCLI({
1663
1663
  rootDir,
1664
1664
  dev: args.stub,
1665
- stub: args.stub
1665
+ stub: args.stub,
1666
+ preset: args.preset
1666
1667
  });
1667
1668
  await prepare$1();
1668
1669
  for (const framework of frameworkSetup) {
@@ -1,77 +1,12 @@
1
1
  import { createConsola } from 'consola';
2
2
  import defu from 'defu';
3
3
  import { createHooks } from 'hookable';
4
- import { defineUntypedSchema, applyDefaults } from 'untyped';
5
- import { isDebug, isTest, isDevelopment } from 'std-env';
6
4
  import { getContext } from 'unctx';
7
5
  import { Buffer } from 'node:buffer';
8
6
  import { klona } from 'klona';
9
7
  import { createStorage as createStorage$1, builtinDrivers, prefixStorage } from 'unstorage';
10
8
  import memoryDriver from 'unstorage/drivers/memory';
11
9
 
12
- const common = defineUntypedSchema({
13
- /**
14
- * Environment to use.
15
- *
16
- * @default 'h3'
17
- */
18
- environment: {
19
- $resolve: (val) => val ?? "h3"
20
- },
21
- /**
22
- * Whether Nuxt is running in development mode.
23
- *
24
- * Normally, you should not need to set this.
25
- */
26
- dev: {
27
- $resolve: (val) => val ?? Boolean(isDevelopment)
28
- },
29
- /**
30
- * Whether your app is being unit tested.
31
- */
32
- test: {
33
- $resolve: (val) => val ?? Boolean(isTest)
34
- },
35
- /**
36
- * Set to `true` to enable debug mode.
37
- *
38
- * At the moment, it prints out hook names and timings on the server, and
39
- * logs hook arguments as well in the browser.
40
- *
41
- */
42
- debug: {
43
- $resolve: (val) => val ?? isDebug
44
- },
45
- plugins: {
46
- $resolve: (val) => (val || []).filter(Boolean)
47
- },
48
- $schema: {}
49
- });
50
-
51
- const internal = defineUntypedSchema({
52
- /** @private */
53
- _majorVersion: 4,
54
- /** @private */
55
- _generate: false,
56
- /** @private */
57
- _prepare: false,
58
- /** @private */
59
- _requiredPlugins: {},
60
- /**
61
- * @private
62
- * @type {Array<{ meta: ModuleMeta; timings?: Record<string, number | undefined>; entryPath?: string }>}
63
- */
64
- _installedPlugins: [],
65
- /** @private */
66
- _plugins: [],
67
- extensions: [".js", ".mjs", ".ts"]
68
- });
69
-
70
- const SilgiConfigSchema = {
71
- ...common,
72
- ...internal
73
- };
74
-
75
10
  const silgiCtx = getContext("silgi");
76
11
  function useSilgi() {
77
12
  const instance = silgiCtx.tryUse();
@@ -550,7 +485,6 @@ async function runSilgiPlugins(silgi) {
550
485
  }
551
486
  async function createSilgi(config) {
552
487
  const hooks = createHooks();
553
- await applyDefaults(SilgiConfigSchema, config.options);
554
488
  const silgi = {
555
489
  schemas: config.schemas,
556
490
  services: config.services ?? {},
@@ -1,3 +1,3 @@
1
- const version = "0.7.52";
1
+ const version = "0.7.53";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "0.7.52";
1
+ const version = "0.7.53";
2
2
 
3
3
  export { version };
@@ -4,14 +4,6 @@ export default async function addNitroApp(silgiCtx = useSilgi()) {
4
4
  const nitro = silgiCtx.framework;
5
5
  nitro.router.use("/srn/**", defineEventHandler(async (event) => {
6
6
  try {
7
- const ctx = useSilgi();
8
- if (ctx.options.environment !== "nitrojs" && ctx.options.environment !== "h3") {
9
- event.node.res.statusCode = 400;
10
- return createError({
11
- statusCode: 400,
12
- statusMessage: "Bad Request"
13
- });
14
- }
15
7
  const silgiConnect = silgi(event);
16
8
  const query = getQuery(event);
17
9
  const body = await readBody(event).catch(() => ({}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.7.52",
4
+ "version": "0.7.53",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {