@xano/cli 1.0.4-beta.13 → 1.0.4-beta.15
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/sandbox/reset/index.js +12 -0
- package/oclif.manifest.json +2596 -2596
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import BaseCommand from '../../../base-command.js';
|
|
3
|
+
import { pushKnowledge } from '../../../utils/knowledge-sync.js';
|
|
3
4
|
export default class SandboxReset extends BaseCommand {
|
|
4
5
|
static description = '[CRITICAL] NEVER run without explicit user confirmation; this clears all workspace data and drafts. Resets your sandbox environment.';
|
|
5
6
|
static examples = [
|
|
@@ -42,6 +43,17 @@ Sandbox environment has been reset.
|
|
|
42
43
|
const message = await this.parseApiError(response, 'API request failed');
|
|
43
44
|
this.error(message);
|
|
44
45
|
}
|
|
46
|
+
try {
|
|
47
|
+
const knowledgeUrl = `${profile.instance_origin}/api:meta/sandbox/knowledge/sync`;
|
|
48
|
+
await pushKnowledge(knowledgeUrl, profile.access_token, this.verboseFetch.bind(this), flags.verbose, {
|
|
49
|
+
delete: true,
|
|
50
|
+
force: true,
|
|
51
|
+
items: [],
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
this.warn(`Sandbox environment was reset, but clearing knowledge files failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
56
|
+
}
|
|
45
57
|
this.log('Sandbox environment has been reset.');
|
|
46
58
|
}
|
|
47
59
|
catch (error) {
|