silgi 0.27.10 → 0.27.11

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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.27.10";
4
+ const version = "0.27.11";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -108,6 +108,11 @@ const command$1 = defineCommand({
108
108
  label: "Command Tags",
109
109
  hint: "It executes all commands that are related to the tags you select."
110
110
  }] : [],
111
+ {
112
+ value: "functions",
113
+ label: "Functions",
114
+ hint: "Select and run individual functions"
115
+ },
111
116
  ...Object.keys(cliJson).filter((key) => {
112
117
  const scripts = cliJson[key];
113
118
  const scriptValues = Object.values(scripts);
@@ -141,6 +146,42 @@ const command$1 = defineCommand({
141
146
  })).filter((script) => script.handler.tags?.includes(selectedTags));
142
147
  }
143
148
  ).flat();
149
+ } else if (commandName === "functions") {
150
+ const availableFunctions = [];
151
+ for (const cmd of Object.keys(cliJson)) {
152
+ const scripts = cliJson[cmd];
153
+ for (const scriptName of Object.keys(scripts)) {
154
+ const script = scripts[scriptName];
155
+ if (script.type === "function") {
156
+ availableFunctions.push({
157
+ command: cmd,
158
+ script: scriptName,
159
+ handler: script
160
+ });
161
+ }
162
+ }
163
+ }
164
+ if (availableFunctions.length === 0) {
165
+ consola.warn("No functions found in cli.json");
166
+ return;
167
+ }
168
+ const selectedFunction = await p.select({
169
+ message: "Select a function to run",
170
+ options: availableFunctions.map((fn) => ({
171
+ label: `${fn.command} \u2192 ${fn.script}`,
172
+ value: `${fn.command}:${fn.script}`,
173
+ hint: fn.handler.description || void 0
174
+ }))
175
+ });
176
+ if (!selectedFunction)
177
+ return;
178
+ const [selectedCmd, selectedScript] = selectedFunction.split(":");
179
+ const functionDef = cliJson[selectedCmd][selectedScript];
180
+ selectedCommands = [{
181
+ command: selectedCmd,
182
+ script: selectedScript,
183
+ handler: functionDef
184
+ }];
144
185
  } else {
145
186
  const scripts = cliJson[commandName];
146
187
  const scriptName = await p.select({
@@ -47,6 +47,7 @@ const SilgiCLIDefaults = {
47
47
  },
48
48
  serverDir: "{{ rootDir }}/server",
49
49
  clientDir: "{{ rootDir }}/client",
50
+ migrationDir: "{{ rootDir }}/migration",
50
51
  silgi: {
51
52
  serverDir: "{{ serverDir }}/silgi",
52
53
  clientDir: "{{ clientDir }}/silgi",
@@ -620,6 +620,7 @@ interface SilgiCLIOptions extends PresetOptions {
620
620
  workspaceDir: string;
621
621
  rootDir: string;
622
622
  srcDir: string;
623
+ migrationDir: string;
623
624
  scanDirs: string[];
624
625
  build: {
625
626
  dir: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.27.10",
4
+ "version": "0.27.11",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {
@@ -32,16 +32,16 @@
32
32
  "lib"
33
33
  ],
34
34
  "peerDependencies": {
35
- "@fastify/deepmerge": "^3.0.0",
36
- "@nuxt/kit": "^3.16.1",
37
- "@nuxt/schema": "^3.16.1",
38
- "@silgi/ecosystem": "^0.4.4",
39
- "h3": "^1.15.1",
40
- "nitropack": "^2.11.7",
41
- "nuxt": "^3.16.1",
42
- "typescript": "^5.8.2",
43
- "vue": "^3.5.13",
44
- "zod": "^3.24.2"
35
+ "@fastify/deepmerge": ">=3.0.0",
36
+ "@nuxt/kit": ">=3.16.1",
37
+ "@nuxt/schema": ">=3.16.1",
38
+ "@silgi/ecosystem": ">=0.4.4",
39
+ "h3": ">=1.15.1",
40
+ "nitropack": ">=2.11.7",
41
+ "nuxt": ">=3.16.1",
42
+ "typescript": ">=5.8.2",
43
+ "vue": ">=3.5.13",
44
+ "zod": ">=3.24.2"
45
45
  },
46
46
  "peerDependenciesMeta": {
47
47
  "@nuxt/kit": {