@chatbi-v/cli 1.0.4 → 1.0.5
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/bin/chatbi-cli.js +2 -1
- package/dist/index.js +160 -67119
- package/package.json +4 -4
- package/dist/chunk-HEBXNMVQ.mjs +0 -48
- package/dist/execa-S2LPQPPX.mjs +0 -2204
- package/dist/fsevents-DT6RUA5O.mjs +0 -101
- package/dist/fsevents-X6WP4TKM.node +0 -0
- package/dist/index.mjs +0 -69546
- package/dist/prompt-LZV7IEVF.mjs +0 -769
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__commonJS,
|
|
3
|
-
__esm,
|
|
4
|
-
__require
|
|
5
|
-
} from "./chunk-HEBXNMVQ.mjs";
|
|
6
|
-
|
|
7
|
-
// ../../../node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node
|
|
8
|
-
var fsevents_default;
|
|
9
|
-
var init_fsevents = __esm({
|
|
10
|
-
"../../../node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node"() {
|
|
11
|
-
fsevents_default = "./fsevents-X6WP4TKM.node";
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
// node-file:/Users/Zeng/Documents/trae_projects/chatbi-v/node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node
|
|
16
|
-
var require_fsevents = __commonJS({
|
|
17
|
-
"node-file:/Users/Zeng/Documents/trae_projects/chatbi-v/node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node"(exports, module) {
|
|
18
|
-
"use strict";
|
|
19
|
-
init_fsevents();
|
|
20
|
-
try {
|
|
21
|
-
module.exports = __require(fsevents_default);
|
|
22
|
-
} catch {
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
// ../../../node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.js
|
|
28
|
-
var require_fsevents2 = __commonJS({
|
|
29
|
-
"../../../node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.js"(exports) {
|
|
30
|
-
if (process.platform !== "darwin") {
|
|
31
|
-
throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`);
|
|
32
|
-
}
|
|
33
|
-
var Native = require_fsevents();
|
|
34
|
-
var events = Native.constants;
|
|
35
|
-
function watch(path, since, handler) {
|
|
36
|
-
if (typeof path !== "string") {
|
|
37
|
-
throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`);
|
|
38
|
-
}
|
|
39
|
-
if ("function" === typeof since && "undefined" === typeof handler) {
|
|
40
|
-
handler = since;
|
|
41
|
-
since = Native.flags.SinceNow;
|
|
42
|
-
}
|
|
43
|
-
if (typeof since !== "number") {
|
|
44
|
-
throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof since}`);
|
|
45
|
-
}
|
|
46
|
-
if (typeof handler !== "function") {
|
|
47
|
-
throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof handler}`);
|
|
48
|
-
}
|
|
49
|
-
let instance = Native.start(Native.global, path, since, handler);
|
|
50
|
-
if (!instance) throw new Error(`could not watch: ${path}`);
|
|
51
|
-
return () => {
|
|
52
|
-
const result = instance ? Promise.resolve(instance).then(Native.stop) : Promise.resolve(void 0);
|
|
53
|
-
instance = void 0;
|
|
54
|
-
return result;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function getInfo(path, flags) {
|
|
58
|
-
return {
|
|
59
|
-
path,
|
|
60
|
-
flags,
|
|
61
|
-
event: getEventType(flags),
|
|
62
|
-
type: getFileType(flags),
|
|
63
|
-
changes: getFileChanges(flags)
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function getFileType(flags) {
|
|
67
|
-
if (events.ItemIsFile & flags) return "file";
|
|
68
|
-
if (events.ItemIsDir & flags) return "directory";
|
|
69
|
-
if (events.MustScanSubDirs & flags) return "directory";
|
|
70
|
-
if (events.ItemIsSymlink & flags) return "symlink";
|
|
71
|
-
}
|
|
72
|
-
function anyIsTrue(obj) {
|
|
73
|
-
for (let key in obj) {
|
|
74
|
-
if (obj[key]) return true;
|
|
75
|
-
}
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
function getEventType(flags) {
|
|
79
|
-
if (events.ItemRemoved & flags) return "deleted";
|
|
80
|
-
if (events.ItemRenamed & flags) return "moved";
|
|
81
|
-
if (events.ItemCreated & flags) return "created";
|
|
82
|
-
if (events.ItemModified & flags) return "modified";
|
|
83
|
-
if (events.RootChanged & flags) return "root-changed";
|
|
84
|
-
if (events.ItemCloned & flags) return "cloned";
|
|
85
|
-
if (anyIsTrue(flags)) return "modified";
|
|
86
|
-
return "unknown";
|
|
87
|
-
}
|
|
88
|
-
function getFileChanges(flags) {
|
|
89
|
-
return {
|
|
90
|
-
inode: !!(events.ItemInodeMetaMod & flags),
|
|
91
|
-
finder: !!(events.ItemFinderInfoMod & flags),
|
|
92
|
-
access: !!(events.ItemChangeOwner & flags),
|
|
93
|
-
xattrs: !!(events.ItemXattrMod & flags)
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
exports.watch = watch;
|
|
97
|
-
exports.getInfo = getInfo;
|
|
98
|
-
exports.constants = events;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
export default require_fsevents2();
|
|
Binary file
|