@xano/cli 0.0.90 → 0.0.91
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/workspace/push/index.d.ts +1 -1
- package/dist/commands/workspace/push/index.js +12 -12
- package/oclif.manifest.json +1509 -1509
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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 -
|
|
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 -
|
|
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 -
|
|
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
|
-
|
|
125
|
-
char: '
|
|
126
|
-
description: 'Glob pattern to
|
|
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
|
|
180
|
-
if (flags.
|
|
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.
|
|
183
|
+
return flags.include.some((pattern) => minimatch(rel, pattern, { matchBase: true }));
|
|
184
184
|
});
|
|
185
185
|
this.log('');
|
|
186
|
-
this.log(` ${ux.colorize('dim', '
|
|
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.
|
|
202
|
-
? `No .xs files remain after ${[flags.
|
|
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
|