@narumitw/pi-starship 0.51.3 → 0.51.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/README.md CHANGED
@@ -8,6 +8,7 @@ A native Pi footer configured with Starship-style TOML. It parses and renders fo
8
8
 
9
9
  ## ✨ Features
10
10
 
11
+ - Loads a generated split TypeScript runtime through Pi's Jiti loader to reduce package startup work.
11
12
  - Uses a readable, palette-free Starship-style built-in configuration until settings are saved.
12
13
  - Starship-style root/module formats, conditional groups, `$all`, styles, and opt-in palettes.
13
14
  - Pi modules for model, thinking, activity, context, tokens, prompt cache, cost, turn, and extension statuses.
@@ -27,12 +28,22 @@ A native Pi footer configured with Starship-style TOML. It parses and renders fo
27
28
  pi install npm:@narumitw/pi-starship
28
29
  ```
29
30
 
30
- Try it directly from a checkout:
31
+ Try the published package without installing it permanently:
32
+
33
+ ```bash
34
+ pi -e npm:@narumitw/pi-starship
35
+ ```
36
+
37
+ Build the generated runtime and try the local package from this repository:
31
38
 
32
39
  ```bash
33
40
  just try starship
34
41
  ```
35
42
 
43
+ The package declares `dist/index.ts`, so an unbuilt local checkout must run `npm --workspace @narumitw/pi-starship run build` before Pi loads the package directory.
44
+
45
+ `just try starship` runs that build automatically.
46
+
36
47
  Do not enable this together with `@narumitw/pi-statusline`: both own Pi's footer, and Pi does not arbitrate that conflict.
37
48
 
38
49
  ## ⚙️ Configuration
@@ -724,7 +735,9 @@ Keep `extension_status` last in the catalog so arbitrary third-party statuses fo
724
735
 
725
736
  ## 🗂️ Package layout
726
737
 
727
- - `src/index.ts` — thin Pi package entrypoint forwarding to the source runtime.
738
+ - `dist/` — generated split TypeScript runtime loaded through Pi's Jiti loader.
739
+ - `scripts/build-runtime.mjs` — deterministic runtime bundler and eager-boundary validator.
740
+ - `src/index.ts` — thin authoritative source entrypoint.
728
741
  - `src/pi-starship.ts` — authoritative extension lifecycle, cached refresh binding, live preview, and footer.
729
742
  - `src/usage.ts` — native-aligned session usage and cache aggregation.
730
743
  - `src/command-contract.ts` — lightweight command routes and completions loaded at startup.
@@ -0,0 +1,10 @@
1
+ // @generated by scripts/build-runtime.mjs; do not edit.
2
+ // @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
3
+
4
+ // src/runtime/types.ts
5
+ var PRIVATE_STYLE_SELECTOR = "__pi_style_selector";
6
+
7
+ export {
8
+ PRIVATE_STYLE_SELECTOR
9
+ };
10
+ //# sourceMappingURL=chunk-2BNGNI6Y.ts.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/runtime/types.ts"],
4
+ "sourcesContent": ["import type { StarshipConfig } from \"../config.js\";\nimport type { ModuleName } from \"../modules/catalog.js\";\nimport type { WorkspaceSnapshot } from \"../modules/types.js\";\n\nexport interface WorkspaceExecResult {\n\tstdout: string;\n\tstderr: string;\n\tcode: number;\n\tkilled: boolean;\n}\n\nexport type WorkspaceExec = (\n\tcommand: string,\n\targs: string[],\n\toptions: {\n\t\tcwd: string;\n\t\ttimeout: number;\n\t\tmaxOutputBytes: number;\n\t\tsignal?: AbortSignal;\n\t\tenvironment: Readonly<Record<string, string | undefined>>;\n\t},\n) => Promise<WorkspaceExecResult>;\n\nexport interface WorkspaceEntry {\n\tname: string;\n\tisFile: boolean;\n\tisDirectory: boolean;\n}\n\nexport interface WorkspaceFileSystem {\n\treadFile(path: string, maxBytes: number): Promise<string | undefined>;\n\treadDirectory(path: string): Promise<readonly WorkspaceEntry[]>;\n\tfileExists(path: string): Promise<boolean>;\n}\n\nexport interface WorkspaceRefreshInput {\n\tcwd: string;\n\tconfig: StarshipConfig;\n\tenvironment: Readonly<Record<string, string | undefined>>;\n\thomeDir: string;\n\tplatform: NodeJS.Platform;\n\thostname: string;\n\tusername: string;\n\texec: WorkspaceExec;\n\tfileSystem?: Partial<WorkspaceFileSystem>;\n\tfileExists?(path: string): Promise<boolean>;\n\treason?: \"initial\" | \"event\" | \"periodic\";\n\tprevious?: WorkspaceSnapshot;\n\tsignal?: AbortSignal;\n}\n\nexport interface CollectorContext {\n\tinput: WorkspaceRefreshInput;\n\tfs: WorkspaceFileSystem;\n\trequirements: ReadonlyMap<ModuleName, ReadonlySet<string>>;\n\tentries(): Promise<readonly WorkspaceEntry[]>;\n\toptions(name: ModuleName): Readonly<Record<string, unknown>>;\n\tneeds(name: ModuleName, variable?: string): boolean;\n}\n\nexport const PRIVATE_STYLE_SELECTOR = \"__pi_style_selector\";\n\nexport type MutableModuleSnapshot = Record<string, Record<string, string>>;\n"],
5
+ "mappings": ";;;;AA4DO,IAAM,yBAAyB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,218 @@
1
+ // @generated by scripts/build-runtime.mjs; do not edit.
2
+ // @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
3
+
4
+ // src/runtime/helpers.ts
5
+ import { open, opendir, stat } from "node:fs/promises";
6
+ import { basename, delimiter, dirname, extname, join, resolve } from "node:path";
7
+ var MAX_METADATA_FILE_BYTES = 64 * 1024;
8
+ var COMMAND_TIMEOUT_MS = 2e3;
9
+ var MAX_COMMAND_OUTPUT_BYTES = 64 * 1024;
10
+ var MAX_DIRECTORY_ENTRIES = 2048;
11
+ var MAX_LABEL_LENGTH = 160;
12
+ function createFileSystem(input) {
13
+ const defaults = {
14
+ async readFile(path, maxBytes) {
15
+ let handle;
16
+ try {
17
+ handle = await open(path, "r");
18
+ const info = await handle.stat();
19
+ if (!info.isFile() || info.size > maxBytes) return void 0;
20
+ const buffer = Buffer.alloc(Math.min(maxBytes + 1, Number(info.size) + 1));
21
+ const { bytesRead } = await handle.read(buffer, 0, buffer.length, 0);
22
+ if (bytesRead > maxBytes) return void 0;
23
+ return buffer.subarray(0, bytesRead).toString("utf8");
24
+ } catch {
25
+ return void 0;
26
+ } finally {
27
+ await handle?.close().catch(() => void 0);
28
+ }
29
+ },
30
+ async readDirectory(path) {
31
+ const entries = [];
32
+ try {
33
+ const directory = await opendir(path);
34
+ for await (const entry of directory) {
35
+ entries.push({
36
+ name: entry.name,
37
+ isFile: entry.isFile(),
38
+ isDirectory: entry.isDirectory()
39
+ });
40
+ if (entries.length >= MAX_DIRECTORY_ENTRIES) break;
41
+ }
42
+ } catch {
43
+ return [];
44
+ }
45
+ return entries;
46
+ },
47
+ async fileExists(path) {
48
+ try {
49
+ await stat(path);
50
+ return true;
51
+ } catch {
52
+ return false;
53
+ }
54
+ }
55
+ };
56
+ return {
57
+ ...defaults,
58
+ ...input.fileSystem,
59
+ ...input.fileExists ? { fileExists: input.fileExists } : {}
60
+ };
61
+ }
62
+ function safeMetadata(value, maxLength = MAX_LABEL_LENGTH) {
63
+ if (typeof value !== "string") return void 0;
64
+ const sanitized = Array.from(value, (character) => {
65
+ const code = character.codePointAt(0) ?? 0;
66
+ return code <= 31 || code >= 127 && code <= 159 || code >= 55296 && code <= 57343 ? "" : character;
67
+ }).join("").trim();
68
+ if (!sanitized) return void 0;
69
+ return Array.from(sanitized).slice(0, maxLength).join("");
70
+ }
71
+ function isRecord(value) {
72
+ return typeof value === "object" && value !== null && !Array.isArray(value);
73
+ }
74
+ function setString(record, key, value) {
75
+ const safe = safeMetadata(value);
76
+ if (!safe) return;
77
+ Object.defineProperty(record, key, {
78
+ value: safe,
79
+ writable: true,
80
+ enumerable: true,
81
+ configurable: true
82
+ });
83
+ }
84
+ function optionString(context, module, key) {
85
+ const value = context.options(module)[key];
86
+ return typeof value === "string" ? value : void 0;
87
+ }
88
+ function optionBoolean(context, module, key) {
89
+ return context.options(module)[key] === true;
90
+ }
91
+ function optionNumber(context, module, key) {
92
+ const value = context.options(module)[key];
93
+ return typeof value === "number" ? value : void 0;
94
+ }
95
+ function optionStrings(context, module, key) {
96
+ const value = context.options(module)[key];
97
+ return Array.isArray(value) && value.every((item) => typeof item === "string") ? value : [];
98
+ }
99
+ function optionMap(context, module, key) {
100
+ const value = context.options(module)[key];
101
+ return isRecord(value) ? value : {};
102
+ }
103
+ function exactAlias(value, aliases) {
104
+ if (!value) return void 0;
105
+ return Object.hasOwn(aliases, value) ? safeMetadata(aliases[value]) : value;
106
+ }
107
+ function formatVersion(raw, format) {
108
+ return (format ?? "v$raw").replaceAll("$raw", raw.replace(/^v/u, ""));
109
+ }
110
+ async function runBounded(context, command, args) {
111
+ try {
112
+ const result = await context.input.exec(command, args, {
113
+ cwd: context.input.cwd,
114
+ timeout: COMMAND_TIMEOUT_MS,
115
+ maxOutputBytes: MAX_COMMAND_OUTPUT_BYTES,
116
+ signal: context.input.signal,
117
+ environment: context.input.environment
118
+ });
119
+ if (result.code !== 0 || result.killed) return void 0;
120
+ const selectedOutput = result.stdout || result.stderr;
121
+ const output = Buffer.from(selectedOutput).subarray(0, MAX_COMMAND_OUTPUT_BYTES + 1);
122
+ if (output.byteLength > MAX_COMMAND_OUTPUT_BYTES) return void 0;
123
+ return output.toString("utf8");
124
+ } catch {
125
+ return void 0;
126
+ }
127
+ }
128
+ function parseIni(source) {
129
+ const result = {};
130
+ let section = "";
131
+ for (const rawLine of source.split(/\r?\n/u)) {
132
+ const line = rawLine.trim();
133
+ if (!line || line.startsWith("#") || line.startsWith(";")) continue;
134
+ const sectionMatch = /^\[([^\]]+)\]$/u.exec(line);
135
+ if (sectionMatch?.[1]) {
136
+ section = sectionMatch[1].trim();
137
+ if (!Object.hasOwn(result, section)) setOwn(result, section, {});
138
+ continue;
139
+ }
140
+ const separator = line.indexOf("=");
141
+ if (separator <= 0) continue;
142
+ const key = line.slice(0, separator).trim();
143
+ const value = safeMetadata(line.slice(separator + 1));
144
+ if (!value) continue;
145
+ if (!Object.hasOwn(result, section)) setOwn(result, section, {});
146
+ setOwn(result[section], key, value);
147
+ }
148
+ return result;
149
+ }
150
+ function directMatch(entries, files, extensions, folders) {
151
+ const positiveFiles = files.filter((value) => !value.startsWith("!"));
152
+ const negativeFiles = new Set(
153
+ files.filter((value) => value.startsWith("!")).map((v) => v.slice(1))
154
+ );
155
+ const positiveExtensions = extensions.filter((value) => !value.startsWith("!")).map((value) => value.replace(/^\./u, ""));
156
+ const negativeExtensions = new Set(
157
+ extensions.filter((value) => value.startsWith("!")).map((value) => value.slice(1).replace(/^\./u, ""))
158
+ );
159
+ const positiveFolders = folders.filter((value) => !value.startsWith("!"));
160
+ const negativeFolders = new Set(
161
+ folders.filter((value) => value.startsWith("!")).map((value) => value.slice(1))
162
+ );
163
+ if (entries.some(
164
+ (entry) => negativeFiles.has(entry.name) || entry.isFile && negativeExtensions.has(extname(entry.name).slice(1)) || entry.isDirectory && negativeFolders.has(entry.name)
165
+ )) {
166
+ return false;
167
+ }
168
+ return entries.some(
169
+ (entry) => positiveFiles.includes(entry.name) || entry.isFile && positiveExtensions.includes(extname(entry.name).slice(1)) || entry.isDirectory && positiveFolders.includes(entry.name)
170
+ );
171
+ }
172
+ function parentDirectories(start, limit) {
173
+ const result = [];
174
+ let current = resolve(start);
175
+ for (let index = 0; index < limit; index += 1) {
176
+ const parent = dirname(current);
177
+ if (parent === current) break;
178
+ result.push(parent);
179
+ current = parent;
180
+ }
181
+ return result;
182
+ }
183
+ function pathName(path) {
184
+ return basename(path.replace(/[\\/]+$/u, "")) || path;
185
+ }
186
+ function joinHome(input, ...parts) {
187
+ return join(input.homeDir, ...parts);
188
+ }
189
+ function setOwn(record, key, value) {
190
+ Object.defineProperty(record, key, {
191
+ value,
192
+ writable: true,
193
+ enumerable: true,
194
+ configurable: true
195
+ });
196
+ }
197
+
198
+ export {
199
+ MAX_METADATA_FILE_BYTES,
200
+ createFileSystem,
201
+ safeMetadata,
202
+ isRecord,
203
+ setString,
204
+ optionString,
205
+ optionBoolean,
206
+ optionNumber,
207
+ optionStrings,
208
+ optionMap,
209
+ exactAlias,
210
+ formatVersion,
211
+ runBounded,
212
+ parseIni,
213
+ directMatch,
214
+ parentDirectories,
215
+ pathName,
216
+ joinHome
217
+ };
218
+ //# sourceMappingURL=chunk-PV5KIAAP.ts.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/runtime/helpers.ts"],
4
+ "sourcesContent": ["import { type FileHandle, open, opendir, stat } from \"node:fs/promises\";\nimport { basename, delimiter, dirname, extname, join, resolve } from \"node:path\";\nimport type {\n\tCollectorContext,\n\tWorkspaceEntry,\n\tWorkspaceFileSystem,\n\tWorkspaceRefreshInput,\n} from \"./types.js\";\n\nexport const MAX_METADATA_FILE_BYTES = 64 * 1024;\nexport const COMMAND_TIMEOUT_MS = 2_000;\nexport const MAX_COMMAND_OUTPUT_BYTES = 64 * 1024;\nconst MAX_DIRECTORY_ENTRIES = 2_048;\nconst MAX_LABEL_LENGTH = 160;\n\nexport function createFileSystem(input: WorkspaceRefreshInput): WorkspaceFileSystem {\n\tconst defaults: WorkspaceFileSystem = {\n\t\tasync readFile(path, maxBytes) {\n\t\t\tlet handle: FileHandle | undefined;\n\t\t\ttry {\n\t\t\t\thandle = await open(path, \"r\");\n\t\t\t\tconst info = await handle.stat();\n\t\t\t\tif (!info.isFile() || info.size > maxBytes) return undefined;\n\t\t\t\tconst buffer = Buffer.alloc(Math.min(maxBytes + 1, Number(info.size) + 1));\n\t\t\t\tconst { bytesRead } = await handle.read(buffer, 0, buffer.length, 0);\n\t\t\t\tif (bytesRead > maxBytes) return undefined;\n\t\t\t\treturn buffer.subarray(0, bytesRead).toString(\"utf8\");\n\t\t\t} catch {\n\t\t\t\treturn undefined;\n\t\t\t} finally {\n\t\t\t\tawait handle?.close().catch(() => undefined);\n\t\t\t}\n\t\t},\n\t\tasync readDirectory(path) {\n\t\t\tconst entries: WorkspaceEntry[] = [];\n\t\t\ttry {\n\t\t\t\tconst directory = await opendir(path);\n\t\t\t\tfor await (const entry of directory) {\n\t\t\t\t\tentries.push({\n\t\t\t\t\t\tname: entry.name,\n\t\t\t\t\t\tisFile: entry.isFile(),\n\t\t\t\t\t\tisDirectory: entry.isDirectory(),\n\t\t\t\t\t});\n\t\t\t\t\tif (entries.length >= MAX_DIRECTORY_ENTRIES) break;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn entries;\n\t\t},\n\t\tasync fileExists(path) {\n\t\t\ttry {\n\t\t\t\tawait stat(path);\n\t\t\t\treturn true;\n\t\t\t} catch {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t};\n\treturn {\n\t\t...defaults,\n\t\t...input.fileSystem,\n\t\t...(input.fileExists ? { fileExists: input.fileExists } : {}),\n\t};\n}\n\nexport function safeMetadata(value: unknown, maxLength = MAX_LABEL_LENGTH): string | undefined {\n\tif (typeof value !== \"string\") return undefined;\n\tconst sanitized = Array.from(value, (character) => {\n\t\tconst code = character.codePointAt(0) ?? 0;\n\t\treturn code <= 0x1f || (code >= 0x7f && code <= 0x9f) || (code >= 0xd800 && code <= 0xdfff)\n\t\t\t? \"\"\n\t\t\t: character;\n\t})\n\t\t.join(\"\")\n\t\t.trim();\n\tif (!sanitized) return undefined;\n\treturn Array.from(sanitized).slice(0, maxLength).join(\"\");\n}\n\nexport function ownString(record: unknown, key: string): string | undefined {\n\tif (!isRecord(record) || !Object.hasOwn(record, key)) return undefined;\n\treturn safeMetadata(record[key]);\n}\n\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nexport function setString(record: Record<string, string>, key: string, value: unknown): void {\n\tconst safe = safeMetadata(value);\n\tif (!safe) return;\n\tObject.defineProperty(record, key, {\n\t\tvalue: safe,\n\t\twritable: true,\n\t\tenumerable: true,\n\t\tconfigurable: true,\n\t});\n}\n\nexport function optionString(\n\tcontext: CollectorContext,\n\tmodule: Parameters<CollectorContext[\"options\"]>[0],\n\tkey: string,\n): string | undefined {\n\tconst value = context.options(module)[key];\n\treturn typeof value === \"string\" ? value : undefined;\n}\n\nexport function optionBoolean(\n\tcontext: CollectorContext,\n\tmodule: Parameters<CollectorContext[\"options\"]>[0],\n\tkey: string,\n): boolean {\n\treturn context.options(module)[key] === true;\n}\n\nexport function optionNumber(\n\tcontext: CollectorContext,\n\tmodule: Parameters<CollectorContext[\"options\"]>[0],\n\tkey: string,\n): number | undefined {\n\tconst value = context.options(module)[key];\n\treturn typeof value === \"number\" ? value : undefined;\n}\n\nexport function optionStrings(\n\tcontext: CollectorContext,\n\tmodule: Parameters<CollectorContext[\"options\"]>[0],\n\tkey: string,\n): readonly string[] {\n\tconst value = context.options(module)[key];\n\treturn Array.isArray(value) && value.every((item) => typeof item === \"string\") ? value : [];\n}\n\nexport function optionMap(\n\tcontext: CollectorContext,\n\tmodule: Parameters<CollectorContext[\"options\"]>[0],\n\tkey: string,\n): Readonly<Record<string, string>> {\n\tconst value = context.options(module)[key];\n\treturn isRecord(value) ? (value as Record<string, string>) : {};\n}\n\nexport function exactAlias(value: string | undefined, aliases: Readonly<Record<string, string>>) {\n\tif (!value) return undefined;\n\treturn Object.hasOwn(aliases, value) ? safeMetadata(aliases[value]) : value;\n}\n\nexport function formatVersion(raw: string, format: string | undefined): string {\n\treturn (format ?? \"v$raw\").replaceAll(\"$raw\", raw.replace(/^v/u, \"\"));\n}\n\nexport async function runBounded(\n\tcontext: CollectorContext,\n\tcommand: string,\n\targs: string[],\n): Promise<string | undefined> {\n\ttry {\n\t\tconst result = await context.input.exec(command, args, {\n\t\t\tcwd: context.input.cwd,\n\t\t\ttimeout: COMMAND_TIMEOUT_MS,\n\t\t\tmaxOutputBytes: MAX_COMMAND_OUTPUT_BYTES,\n\t\t\tsignal: context.input.signal,\n\t\t\tenvironment: context.input.environment,\n\t\t});\n\t\tif (result.code !== 0 || result.killed) return undefined;\n\t\tconst selectedOutput = result.stdout || result.stderr;\n\t\tconst output = Buffer.from(selectedOutput).subarray(0, MAX_COMMAND_OUTPUT_BYTES + 1);\n\t\tif (output.byteLength > MAX_COMMAND_OUTPUT_BYTES) return undefined;\n\t\treturn output.toString(\"utf8\");\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nexport function parseIni(source: string): Record<string, Record<string, string>> {\n\tconst result: Record<string, Record<string, string>> = {};\n\tlet section = \"\";\n\tfor (const rawLine of source.split(/\\r?\\n/u)) {\n\t\tconst line = rawLine.trim();\n\t\tif (!line || line.startsWith(\"#\") || line.startsWith(\";\")) continue;\n\t\tconst sectionMatch = /^\\[([^\\]]+)\\]$/u.exec(line);\n\t\tif (sectionMatch?.[1]) {\n\t\t\tsection = sectionMatch[1].trim();\n\t\t\tif (!Object.hasOwn(result, section)) setOwn(result, section, {});\n\t\t\tcontinue;\n\t\t}\n\t\tconst separator = line.indexOf(\"=\");\n\t\tif (separator <= 0) continue;\n\t\tconst key = line.slice(0, separator).trim();\n\t\tconst value = safeMetadata(line.slice(separator + 1));\n\t\tif (!value) continue;\n\t\tif (!Object.hasOwn(result, section)) setOwn(result, section, {});\n\t\tsetOwn(result[section] as Record<string, string>, key, value);\n\t}\n\treturn result;\n}\n\nexport function envPathList(value: string | undefined): string[] {\n\treturn (value ?? \"\")\n\t\t.split(delimiter)\n\t\t.map((part) => part.trim())\n\t\t.filter(Boolean);\n}\n\nexport function directMatch(\n\tentries: readonly WorkspaceEntry[],\n\tfiles: readonly string[],\n\textensions: readonly string[],\n\tfolders: readonly string[],\n): boolean {\n\tconst positiveFiles = files.filter((value) => !value.startsWith(\"!\"));\n\tconst negativeFiles = new Set(\n\t\tfiles.filter((value) => value.startsWith(\"!\")).map((v) => v.slice(1)),\n\t);\n\tconst positiveExtensions = extensions\n\t\t.filter((value) => !value.startsWith(\"!\"))\n\t\t.map((value) => value.replace(/^\\./u, \"\"));\n\tconst negativeExtensions = new Set(\n\t\textensions\n\t\t\t.filter((value) => value.startsWith(\"!\"))\n\t\t\t.map((value) => value.slice(1).replace(/^\\./u, \"\")),\n\t);\n\tconst positiveFolders = folders.filter((value) => !value.startsWith(\"!\"));\n\tconst negativeFolders = new Set(\n\t\tfolders.filter((value) => value.startsWith(\"!\")).map((value) => value.slice(1)),\n\t);\n\tif (\n\t\tentries.some(\n\t\t\t(entry) =>\n\t\t\t\tnegativeFiles.has(entry.name) ||\n\t\t\t\t(entry.isFile && negativeExtensions.has(extname(entry.name).slice(1))) ||\n\t\t\t\t(entry.isDirectory && negativeFolders.has(entry.name)),\n\t\t)\n\t) {\n\t\treturn false;\n\t}\n\treturn entries.some(\n\t\t(entry) =>\n\t\t\tpositiveFiles.includes(entry.name) ||\n\t\t\t(entry.isFile && positiveExtensions.includes(extname(entry.name).slice(1))) ||\n\t\t\t(entry.isDirectory && positiveFolders.includes(entry.name)),\n\t);\n}\n\nexport function parentDirectories(start: string, limit: number): string[] {\n\tconst result: string[] = [];\n\tlet current = resolve(start);\n\tfor (let index = 0; index < limit; index += 1) {\n\t\tconst parent = dirname(current);\n\t\tif (parent === current) break;\n\t\tresult.push(parent);\n\t\tcurrent = parent;\n\t}\n\treturn result;\n}\n\nexport function pathName(path: string): string {\n\treturn basename(path.replace(/[\\\\/]+$/u, \"\")) || path;\n}\n\nexport function joinHome(input: WorkspaceRefreshInput, ...parts: string[]): string {\n\treturn join(input.homeDir, ...parts);\n}\n\nfunction setOwn<T>(record: Record<string, T>, key: string, value: T): void {\n\tObject.defineProperty(record, key, {\n\t\tvalue,\n\t\twritable: true,\n\t\tenumerable: true,\n\t\tconfigurable: true,\n\t});\n}\n"],
5
+ "mappings": ";;;;AAAA,SAA0B,MAAM,SAAS,YAAY;AACrD,SAAS,UAAU,WAAW,SAAS,SAAS,MAAM,eAAe;AAQ9D,IAAM,0BAA0B,KAAK;AACrC,IAAM,qBAAqB;AAC3B,IAAM,2BAA2B,KAAK;AAC7C,IAAM,wBAAwB;AAC9B,IAAM,mBAAmB;AAElB,SAAS,iBAAiB,OAAmD;AACnF,QAAM,WAAgC;AAAA,IACrC,MAAM,SAAS,MAAM,UAAU;AAC9B,UAAI;AACJ,UAAI;AACH,iBAAS,MAAM,KAAK,MAAM,GAAG;AAC7B,cAAM,OAAO,MAAM,OAAO,KAAK;AAC/B,YAAI,CAAC,KAAK,OAAO,KAAK,KAAK,OAAO,SAAU,QAAO;AACnD,cAAM,SAAS,OAAO,MAAM,KAAK,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