@xano/cli 0.0.18 → 0.0.19
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/commands/run/exec/index.js +15 -4
- package/oclif.manifest.json +711 -714
- package/package.json +1 -1
|
@@ -28,10 +28,9 @@ export default class RunExec extends BaseRunCommand {
|
|
|
28
28
|
}),
|
|
29
29
|
edit: Flags.boolean({
|
|
30
30
|
char: 'e',
|
|
31
|
-
description: 'Open file in editor before running (requires --file)',
|
|
31
|
+
description: 'Open file in editor before running (requires path argument or --file)',
|
|
32
32
|
required: false,
|
|
33
33
|
default: false,
|
|
34
|
-
dependsOn: ['file'],
|
|
35
34
|
}),
|
|
36
35
|
output: Flags.string({
|
|
37
36
|
char: 'o',
|
|
@@ -91,10 +90,22 @@ Executed successfully!
|
|
|
91
90
|
const { args, flags } = await this.parse(RunExec);
|
|
92
91
|
// Initialize with project required
|
|
93
92
|
await this.initRunCommandWithProject(flags.profile);
|
|
94
|
-
// Read XanoScript content
|
|
95
|
-
let xanoscript;
|
|
96
93
|
// Determine input source: path argument, --file flag, or --stdin
|
|
97
94
|
const inputPath = args.path || flags.file;
|
|
95
|
+
// Validate --edit flag requirements
|
|
96
|
+
if (flags.edit) {
|
|
97
|
+
if (!inputPath) {
|
|
98
|
+
this.error('--edit requires a file path (either path argument or --file flag)');
|
|
99
|
+
}
|
|
100
|
+
if (this.isUrl(inputPath)) {
|
|
101
|
+
this.error('--edit cannot be used with URLs');
|
|
102
|
+
}
|
|
103
|
+
if (fs.existsSync(inputPath) && fs.statSync(inputPath).isDirectory()) {
|
|
104
|
+
this.error('--edit cannot be used with directories');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// Read XanoScript content
|
|
108
|
+
let xanoscript;
|
|
98
109
|
if (inputPath) {
|
|
99
110
|
if (this.isUrl(inputPath)) {
|
|
100
111
|
// Fetch URL content
|