silgi 0.6.0 → 0.7.0

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,233 +1,5 @@
1
- const name = "silgi";
2
- const type = "module";
3
- const version = "0.6.0";
4
- const packageManager = "pnpm@9.15.1";
5
- const sideEffects = false;
6
- const exports = {
7
- "./cli": {
8
- types: "./cli.d.ts",
9
- "import": "./dist/cli/index.mjs"
10
- },
11
- "./config": {
12
- types: "./config.d.ts",
13
- "import": "./dist/config/index.mjs"
14
- },
15
- ".": {
16
- types: "./dist/core/index.d.ts",
17
- "import": "./dist/core/index.mjs"
18
- },
19
- "./ecosystem/nitro": {
20
- types: "./dist/ecosystem/nitro/index.d.ts",
21
- "import": "./dist/ecosystem/nitro/index.mjs"
22
- },
23
- "./ecosystem/nitro/runtime/*": {
24
- types: "./dist/ecosystem/nitro/runtime/*.d.ts",
25
- "import": "./dist/ecosystem/nitro/runtime/*.mjs"
26
- },
27
- "./ecosystem/nuxt/runtime/*": {
28
- silgi: "./dist/ecosystem/nuxt/runtime/**/*.ts",
29
- silgiTypes: "./dist/ecosystem/nuxt/runtime/**/*.ts",
30
- types: "./dist/ecosystem/nuxt/runtime/*.d.ts",
31
- "import": "./dist/ecosystem/nuxt/runtime/*.mjs"
32
- },
33
- "./nuxt": {
34
- types: "./dist/ecosystem/nuxt/module.d.ts",
35
- "import": "./dist/ecosystem/nuxt/module.mjs"
36
- },
37
- "./meta": {
38
- types: "./dist/meta/index.d.ts",
39
- "import": "./dist/meta/index.mjs"
40
- },
41
- "./types": {
42
- types: "./types.d.ts",
43
- "import": "./dist/types/index.mjs"
44
- },
45
- "./kit": {
46
- types: "./kit.d.ts",
47
- "import": "./dist/kit/index.mjs"
48
- },
49
- "./core": {
50
- types: "./core.d.ts",
51
- "import": "./dist/core/index.mjs"
52
- },
53
- "./presets": {
54
- types: "./presets.d.ts",
55
- "import": "./dist/presets/index.mjs"
56
- },
57
- "./runtime": {
58
- silgi: "./dist/runtime/*.ts",
59
- silgiTypes: "./dist/runtime/*.ts",
60
- types: "./runtime.d.ts",
61
- "import": "./dist/runtime/index.mjs"
62
- },
63
- "./runtime/meta": {
64
- types: "./runtime-meta.d.ts",
65
- "import": "./runtime-meta.mjs"
66
- },
67
- "./runtime/*": {
68
- silgi: "./dist/runtime/*.ts",
69
- silgiTypes: "./dist/runtime/*.ts",
70
- types: "./dist/runtime/*.d.ts",
71
- "import": "./dist/runtime/*.mjs"
72
- },
73
- "./dist/runtime/*": {
74
- silgi: "./dist/runtime/*.ts",
75
- silgiTypes: "./dist/runtime/*.ts",
76
- types: "./dist/runtime/*.d.ts",
77
- "import": "./dist/runtime/*.mjs"
78
- },
79
- "./package.json": "./package.json"
80
- };
81
- const main = "./dist/core/index.mjs";
82
- const types = "./dist/core/index.d.ts";
83
- const bin = {
84
- silgi: "./dist/cli/index.mjs"
85
- };
86
- const files = [
87
- "*.d.ts",
88
- "bin",
89
- "dist",
90
- "package.json",
91
- "runtime-meta.*"
92
- ];
93
- const scripts = {
94
- build: "pnpm gen-presets && pnpm build:package && pnpm --filter './modules/*' generate && pnpm build:module",
95
- "build:prepare": "pnpm build:stub && pnpm --filter './modules/*' silgi:prepare",
96
- "build:package": "unbuild",
97
- "build:module": "pnpm --filter '@silgi/*' build",
98
- "build:stub": "pnpm gen-presets && unbuild --stub && pnpm --filter './modules/*' build:stub && pnpm --filter './module-builder' build:stub",
99
- "dev:k6": "k6 run ./__tests__/k6.js",
100
- test: "vitest",
101
- "test:coverage": "vitest run --coverage",
102
- lint: "eslint .",
103
- "lint:fix": "eslint . --fix",
104
- silgi: "tsx cli/index.ts",
105
- pb: "pnpm unbuild && pnpm publish --no-git-checks --access public",
106
- generate: "pnpm --filter './playground/*' silgi:prepare && pnpm --filter './modules/*' silgi:prepare && pnpm --filter './ecosystem/*' silgi:prepare && pnpm --filter './examples/**' silgi:prepare",
107
- "gen-presets": "pnpm jiti scripts/gen-presets.ts"
108
- };
109
- const peerDependencies = {
110
- "@nuxt/kit": "^3.15.3",
111
- h3: "^1.14.0",
112
- nitropack: "^2.10.4",
113
- nuxt: "^3.15.3",
114
- typescript: "^5.7.3",
115
- vue: "^3.5.13",
116
- zod: "^3.24.1"
117
- };
118
- const peerDependenciesMeta = {
119
- "@nuxt/kit": {
120
- optional: true
121
- },
122
- h3: {
123
- optional: true
124
- },
125
- nitropack: {
126
- optional: true
127
- },
128
- nuxt: {
129
- optional: true
130
- },
131
- vue: {
132
- optional: true
133
- },
134
- zod: {
135
- optional: true
136
- }
137
- };
138
- const dependencies = {
139
- "@antfu/eslint-config": "^3.16.0",
140
- "@graphql-tools/graphql-file-loader": "^8.0.12",
141
- "@graphql-tools/load": "^8.0.12",
142
- "@graphql-tools/schema": "^10.0.16",
143
- "@graphql-tools/utils": "^10.7.2",
144
- "@nuxt/schema": "^3.15.2",
145
- "@oxc-parser/wasm": "^0.48.0",
146
- "@standard-schema/spec": "^1.0.0",
147
- c12: "^2.0.1",
148
- chokidar: "^4.0.3",
149
- citty: "^0.1.6",
150
- compatx: "^0.1.8",
151
- consola: "^3.4.0",
152
- defu: "^6.1.4",
153
- "dot-prop": "^9.0.0",
154
- "escape-string-regexp": "^5.0.0",
155
- eslint: "^9.18.0",
156
- esno: "^4.8.0",
157
- globby: "^14.0.2",
158
- graphql: "^16.10.0",
159
- hookable: "^5.5.3",
160
- ignore: "^7.0.3",
161
- jiti: "^2.4.2",
162
- klona: "^2.0.6",
163
- mlly: "^1.7.4",
164
- ofetch: "^1.4.1",
165
- ohash: "^1.1.4",
166
- pathe: "^2.0.2",
167
- "pkg-types": "^1.3.1",
168
- scule: "^1.3.0",
169
- semver: "^7.6.3",
170
- "std-env": "^3.8.0",
171
- tsconfck: "^3.1.4",
172
- typescript: "^5.7.3",
173
- ufo: "^1.5.4",
174
- unctx: "^2.4.1",
175
- unimport: "^4.0.0",
176
- unstorage: "^1.14.4",
177
- untyped: "^1.5.2"
178
- };
179
- const devDependencies = {
180
- "@graphql-codegen/core": "^4.0.2",
181
- "@graphql-codegen/introspection": "^4.0.3",
182
- "@nuxt/kit": "^3.15.3",
183
- "@types/node": "^22.10.7",
184
- "@types/semver": "^7.5.8",
185
- "@vitest/coverage-v8": "3.0.4",
186
- "graphql-yoga": "^5.10.11",
187
- h3: "^1.14.0",
188
- nitropack: "^2.10.4",
189
- nuxt: "^3.15.3",
190
- unbuild: "^3.3.1",
191
- vitest: "^3.0.3",
192
- vue: "^3.5.13",
193
- zod: "^3.24.1"
194
- };
195
- const pnpm = {
196
- patchedDependencies: {
197
- "nitropack@2.10.4": "patches/nitropack@2.10.4.patch",
198
- "unbuild@3.3.1": "patches/unbuild@3.3.1.patch"
199
- }
200
- };
201
- const resolutions = {
202
- "@silgi/module-builder": "link:./module-builder",
203
- "@silgi/openapi": "link:./modules/openapi",
204
- "@silgi/permission": "link:./modules/permission",
205
- "@silgi/scalar": "link:./modules/scalar",
206
- "@silgi/yoga": "link:./modules/yoga",
207
- silgi: "link:./"
208
- };
209
- const publishConfig = {
210
- access: "public"
211
- };
1
+ const version = "0.7.0";
212
2
  const packageJson = {
213
- name: name,
214
- type: type,
215
- version: version,
216
- packageManager: packageManager,
217
- sideEffects: sideEffects,
218
- exports: exports,
219
- main: main,
220
- types: types,
221
- bin: bin,
222
- files: files,
223
- scripts: scripts,
224
- peerDependencies: peerDependencies,
225
- peerDependenciesMeta: peerDependenciesMeta,
226
- dependencies: dependencies,
227
- devDependencies: devDependencies,
228
- pnpm: pnpm,
229
- resolutions: resolutions,
230
- publishConfig: publishConfig
231
- };
3
+ version: version};
232
4
 
233
5
  export { packageJson as p, version as v };
@@ -1,18 +1,6 @@
1
1
  import satisfies from 'semver/functions/satisfies.js';
2
+ import { useSilgiCLI } from 'silgi/core';
2
3
  import { version } from 'silgi/meta';
3
- import { getContext } from 'unctx';
4
-
5
- const silgiCLICtx = getContext("SilgiCLI");
6
- function useSilgiCLI() {
7
- const instance = silgiCLICtx.tryUse();
8
- if (!instance) {
9
- throw new Error("Silgi instance is unavailable!");
10
- }
11
- return instance;
12
- }
13
- function tryUseSilgiCLI() {
14
- return silgiCLICtx.tryUse();
15
- }
16
4
 
17
5
  const SEMANTIC_VERSION_RE = /-\d+\.[0-9a-f]+/;
18
6
  function normalizeSemanticVersion(version) {
@@ -39,4 +27,4 @@ function hasInstalledModule(moduleKey, silgi = useSilgiCLI()) {
39
27
  return find?.installed ?? false;
40
28
  }
41
29
 
42
- export { checkSilgiCompatibility as c, hasInstalledModule as h, silgiCLICtx as s, tryUseSilgiCLI as t, useSilgiCLI as u };
30
+ export { checkSilgiCompatibility as c, hasInstalledModule as h };