@xano/cli 0.0.90 → 0.0.92

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/README.md CHANGED
@@ -124,8 +124,11 @@ xano workspace push ./my-workspace --records # Include table records
124
124
  xano workspace push ./my-workspace --env # Include environment variables
125
125
  xano workspace push ./my-workspace --truncate # Truncate tables before import
126
126
  xano workspace push ./my-workspace --no-transaction # Disable database transaction wrapping
127
- xano workspace push ./my-workspace --no-guids # Skip writing GUIDs back to local files
127
+ xano workspace push ./my-workspace --no-guids # Skip writing GUIDs back to local files
128
128
  xano workspace push ./my-workspace --force # Skip preview and confirmation (for CI/CD)
129
+ xano workspace push ./my-workspace -i "function/*" # Push only matching files
130
+ xano workspace push ./my-workspace -e "table/*" # Push all files except tables
131
+ xano workspace push ./my-workspace -i "function/*" -e "**/test*" # Include functions, exclude tests
129
132
 
130
133
  # Pull from a git repository to local files
131
134
  xano workspace git pull ./output -r https://github.com/owner/repo
@@ -17,7 +17,7 @@ export default class Push extends BaseCommand {
17
17
  truncate: import("@oclif/core/interfaces").BooleanFlag<boolean>;
18
18
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
19
  exclude: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
- filter: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ include: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
21
  force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
22
22
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
23
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
@@ -48,16 +48,16 @@ Push without overwriting environment variables
48
48
  `$ xano workspace push ./my-workspace --truncate
49
49
  Truncate all table records before importing
50
50
  `,
51
- `$ xano workspace push ./my-workspace -f "**/func*"
51
+ `$ xano workspace push ./my-workspace -i "**/func*"
52
52
  Push only files matching the glob pattern
53
53
  `,
54
- `$ xano workspace push ./my-workspace -f "function/*" -f "table/*"
54
+ `$ xano workspace push ./my-workspace -i "function/*" -i "table/*"
55
55
  Push files matching multiple patterns
56
56
  `,
57
57
  `$ xano workspace push ./my-workspace -e "table/*"
58
58
  Push all files except tables
59
59
  `,
60
- `$ xano workspace push ./my-workspace -f "function/*" -e "**/test*"
60
+ `$ xano workspace push ./my-workspace -i "function/*" -e "**/test*"
61
61
  Push functions but exclude test files
62
62
  `,
63
63
  ];
@@ -121,9 +121,9 @@ Push functions but exclude test files
121
121
  multiple: true,
122
122
  required: false,
123
123
  }),
124
- filter: Flags.string({
125
- char: 'f',
126
- description: 'Glob pattern to filter files (e.g. "**/func*", "table/*.xs"). Matched against relative paths from the push directory.',
124
+ include: Flags.string({
125
+ char: 'i',
126
+ description: 'Glob pattern to include files (e.g. "**/func*", "table/*.xs"). Matched against relative paths from the push directory.',
127
127
  multiple: true,
128
128
  required: false,
129
129
  }),
@@ -176,14 +176,14 @@ Push functions but exclude test files
176
176
  // Collect all .xs files from the directory tree
177
177
  const allFiles = this.collectFiles(inputDir);
178
178
  let files = allFiles;
179
- // Apply glob filter(s) if specified
180
- if (flags.filter && flags.filter.length > 0) {
179
+ // Apply glob include(s) if specified
180
+ if (flags.include && flags.include.length > 0) {
181
181
  files = files.filter((f) => {
182
182
  const rel = path.relative(inputDir, f);
183
- return flags.filter.some((pattern) => minimatch(rel, pattern, { matchBase: true }));
183
+ return flags.include.some((pattern) => minimatch(rel, pattern, { matchBase: true }));
184
184
  });
185
185
  this.log('');
186
- this.log(` ${ux.colorize('dim', 'Filter:')} ${flags.filter.map((p) => ux.colorize('cyan', p)).join(', ')}`);
186
+ this.log(` ${ux.colorize('dim', 'Include:')} ${flags.include.map((p) => ux.colorize('cyan', p)).join(', ')}`);
187
187
  this.log(` ${ux.colorize('dim', 'Matched:')} ${ux.colorize('bold', String(files.length))} of ${allFiles.length} files`);
188
188
  }
189
189
  // Apply glob exclude(s) if specified
@@ -198,8 +198,8 @@ Push functions but exclude test files
198
198
  this.log(` ${ux.colorize('dim', 'Kept:')} ${ux.colorize('bold', String(files.length))} of ${beforeCount} files (excluded ${beforeCount - files.length})`);
199
199
  }
200
200
  if (files.length === 0) {
201
- this.error(flags.filter || flags.exclude
202
- ? `No .xs files remain after ${[flags.filter ? `filter ${flags.filter.join(', ')}` : '', flags.exclude ? `exclude ${flags.exclude.join(', ')}` : ''].filter(Boolean).join(' and ')} in ${args.directory}`
201
+ this.error(flags.include || flags.exclude
202
+ ? `No .xs files remain after ${[flags.include ? `include ${flags.include.join(', ')}` : '', flags.exclude ? `exclude ${flags.exclude.join(', ')}` : ''].filter(Boolean).join(' and ')} in ${args.directory}`
203
203
  : `No .xs files found in ${args.directory}`);
204
204
  }
205
205
  // Read each file and track file path alongside content