vscode-behavior3 2.5.0 → 2.6.0

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.
@@ -23,18 +23,140 @@ export type BuildLogger = {
23
23
  error: (...args: unknown[]) => void;
24
24
  };
25
25
 
26
+ export type FsEncoding =
27
+ | "ascii"
28
+ | "base64"
29
+ | "base64url"
30
+ | "binary"
31
+ | "hex"
32
+ | "latin1"
33
+ | "ucs-2"
34
+ | "ucs2"
35
+ | "utf-8"
36
+ | "utf16le"
37
+ | "utf8";
38
+
39
+ export type FsFileData = string | Uint8Array;
40
+
41
+ export type FsReadFileOptions = {
42
+ encoding?: FsEncoding | null;
43
+ flag?: string;
44
+ };
45
+
46
+ export type FsWriteFileOptions = {
47
+ encoding?: FsEncoding | null;
48
+ mode?: number | string;
49
+ flag?: string;
50
+ flush?: boolean;
51
+ };
52
+
53
+ export type FsDirentLike = {
54
+ name: string;
55
+ path?: string;
56
+ parentPath?: string;
57
+ isBlockDevice(): boolean;
58
+ isCharacterDevice(): boolean;
59
+ isDirectory(): boolean;
60
+ isFIFO(): boolean;
61
+ isFile(): boolean;
62
+ isSocket(): boolean;
63
+ isSymbolicLink(): boolean;
64
+ };
65
+
66
+ export type FsStatsLike = {
67
+ atime: Date;
68
+ atimeMs: number;
69
+ birthtime: Date;
70
+ birthtimeMs: number;
71
+ blocks: number;
72
+ blksize: number;
73
+ ctime: Date;
74
+ ctimeMs: number;
75
+ dev: number;
76
+ gid: number;
77
+ ino: number;
78
+ mode: number;
79
+ mtime: Date;
80
+ mtimeMs: number;
81
+ nlink: number;
82
+ rdev: number;
83
+ size: number;
84
+ uid: number;
85
+ isBlockDevice(): boolean;
86
+ isCharacterDevice(): boolean;
87
+ isDirectory(): boolean;
88
+ isFIFO(): boolean;
89
+ isFile(): boolean;
90
+ isSocket(): boolean;
91
+ isSymbolicLink(): boolean;
92
+ };
93
+
94
+ export type FsMkdirOptions = {
95
+ recursive?: boolean;
96
+ mode?: number | string;
97
+ };
98
+
99
+ export type FsReaddirOptions = {
100
+ encoding?: FsEncoding;
101
+ recursive?: boolean;
102
+ withFileTypes?: false;
103
+ };
104
+
105
+ export type FsReaddirDirentOptions = {
106
+ encoding?: FsEncoding;
107
+ recursive?: boolean;
108
+ withFileTypes: true;
109
+ };
110
+
111
+ export type FsMkdtempOptions = {
112
+ encoding?: FsEncoding;
113
+ };
114
+
115
+ export type FsRmOptions = {
116
+ force?: boolean;
117
+ maxRetries?: number;
118
+ recursive?: boolean;
119
+ retryDelay?: number;
120
+ };
121
+
122
+ export type FsCpOptions = {
123
+ dereference?: boolean;
124
+ errorOnExist?: boolean;
125
+ filter?: (source: string, destination: string) => boolean;
126
+ force?: boolean;
127
+ mode?: number;
128
+ preserveTimestamps?: boolean;
129
+ recursive?: boolean;
130
+ verbatimSymlinks?: boolean;
131
+ };
132
+
26
133
  export type FsLike = {
27
- readFileSync(path: string, encoding: "utf8" | "utf-8"): string;
28
- writeFileSync(path: string, data: string, encoding?: "utf8" | "utf-8"): void;
134
+ accessSync(path: string, mode?: number): void;
135
+ appendFileSync(path: string, data: FsFileData, options?: FsEncoding | FsWriteFileOptions): void;
136
+ chmodSync(path: string, mode: number | string): void;
29
137
  readdirSync(path: string): string[];
30
- readdirSync(
31
- path: string,
32
- options: { encoding: "utf8" | "utf-8"; recursive?: boolean }
33
- ): string[];
34
- statSync(path: string): { mtimeMs: number; isFile(): boolean };
35
- mkdirSync(path: string, options?: { recursive?: boolean }): unknown;
36
- copyFileSync(source: string, destination: string): void;
138
+ readdirSync(path: string, options: FsReaddirOptions): string[];
139
+ readdirSync(path: string, options: FsReaddirDirentOptions): FsDirentLike[];
140
+ readFileSync(path: string): Uint8Array;
141
+ readFileSync(path: string, encoding: FsEncoding): string;
142
+ readFileSync(path: string, options: FsReadFileOptions & { encoding: FsEncoding }): string;
143
+ readFileSync(path: string, options?: FsReadFileOptions): Uint8Array;
144
+ readlinkSync(path: string, options?: FsEncoding | { encoding?: FsEncoding }): string;
145
+ realpathSync(path: string, options?: FsEncoding | { encoding?: FsEncoding }): string;
146
+ writeFileSync(path: string, data: FsFileData, options?: FsEncoding | FsWriteFileOptions): void;
147
+ copyFileSync(source: string, destination: string, mode?: number): void;
148
+ cpSync(source: string, destination: string, options?: FsCpOptions): void;
149
+ existsSync(path: string): boolean;
150
+ lstatSync(path: string): FsStatsLike;
151
+ mkdirSync(path: string, options?: FsMkdirOptions | number | string): string | undefined;
152
+ mkdtempSync(prefix: string, options?: FsEncoding | FsMkdtempOptions): string;
153
+ renameSync(oldPath: string, newPath: string): void;
154
+ rmSync(path: string, options?: FsRmOptions): void;
155
+ rmdirSync(path: string, options?: FsRmOptions): void;
156
+ statSync(path: string): FsStatsLike;
157
+ symlinkSync(target: string, path: string, type?: "dir" | "file" | "junction"): void;
37
158
  unlinkSync(path: string): void;
159
+ utimesSync(path: string, atime: string | number | Date, mtime: string | number | Date): void;
38
160
  };
39
161
 
40
162
  export type PathLike = {
@@ -58,6 +180,8 @@ export type BuildEnv = {
58
180
  workdir: string;
59
181
  nodeDefs: ReadonlyMap<string, NodeDef>;
60
182
  logger: BuildLogger;
183
+ allowNewFunction?: boolean;
184
+ language?: string;
61
185
  };
62
186
 
63
187
  export type NodeFieldCheckResult = string | string[] | null | undefined;
@@ -87,6 +87,7 @@ export const hasArgOptions = (arg: NodeArg) => arg.options !== undefined;
87
87
  /** `.b3-workspace` file shape. Extension build only reads `settings`; `files` is optional (desktop may still use it). */
88
88
  export interface WorkspaceModel {
89
89
  settings: {
90
+ allowNewFunction?: boolean;
90
91
  checkExpr?: boolean;
91
92
  buildScript?: string;
92
93
  checkScripts?: string[];