Skip to content

Commit dc59a99

Browse files
style(Sky): Apply consistent code formatting across source files
Run Prettier across Sky source files to enforce consistent formatting: - Alphabetize import statements (BuildVSCode.ts, Debug.ts, BuildWithMemory.js) - Standardize quote style from single to double quotes - Reformat array literals for consistent multi-line layout - Add missing trailing newlines to files Also update DeepDive documentation tables with wider column widths for improved readability of module and configuration references. Build artifact files in .astro/ receive minor formatting fixes (newlines, content.d.ts spacing).
1 parent b80e240 commit dc59a99

12 files changed

Lines changed: 191 additions & 142 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"collections": [],
3-
"entries": {}
4-
}
2+
"collections": [],
3+
"entries": {}
4+
}

.astro/content-assets.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default new Map();
1+
export default new Map();

.astro/content-modules.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default new Map();
1+
export default new Map();

.astro/content.d.ts

Lines changed: 81 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
declare module 'astro:content' {
1+
declare module "astro:content" {
22
export interface RenderResult {
3-
Content: import('astro/runtime/server/index.js').AstroComponentFactory;
4-
headings: import('astro').MarkdownHeading[];
3+
Content: import("astro/runtime/server/index.js").AstroComponentFactory;
4+
headings: import("astro").MarkdownHeading[];
55
remarkPluginFrontmatter: Record<string, any>;
66
}
77
interface Render {
8-
'.md': Promise<RenderResult>;
8+
".md": Promise<RenderResult>;
99
}
1010

1111
export interface RenderedContent {
@@ -19,7 +19,9 @@ declare module 'astro:content' {
1919
type Flatten<T> = T extends { [K: string]: infer U } ? U : never;
2020

2121
export type CollectionKey = keyof DataEntryMap;
22-
export type CollectionEntry<C extends CollectionKey> = Flatten<DataEntryMap[C]>;
22+
export type CollectionEntry<C extends CollectionKey> = Flatten<
23+
DataEntryMap[C]
24+
>;
2325

2426
type AllValuesOf<T> = T extends any ? T[keyof T] : never;
2527

@@ -31,12 +33,17 @@ declare module 'astro:content' {
3133
id: E;
3234
};
3335

34-
export type ReferenceLiveEntry<C extends keyof LiveContentConfig['collections']> = {
36+
export type ReferenceLiveEntry<
37+
C extends keyof LiveContentConfig["collections"],
38+
> = {
3539
collection: C;
3640
id: string;
3741
};
3842

39-
export function getCollection<C extends keyof DataEntryMap, E extends CollectionEntry<C>>(
43+
export function getCollection<
44+
C extends keyof DataEntryMap,
45+
E extends CollectionEntry<C>,
46+
>(
4047
collection: C,
4148
filter?: (entry: CollectionEntry<C>) => entry is E,
4249
): Promise<E[]>;
@@ -45,11 +52,16 @@ declare module 'astro:content' {
4552
filter?: (entry: CollectionEntry<C>) => unknown,
4653
): Promise<CollectionEntry<C>[]>;
4754

48-
export function getLiveCollection<C extends keyof LiveContentConfig['collections']>(
55+
export function getLiveCollection<
56+
C extends keyof LiveContentConfig["collections"],
57+
>(
4958
collection: C,
5059
filter?: LiveLoaderCollectionFilterType<C>,
5160
): Promise<
52-
import('astro').LiveDataCollectionResult<LiveLoaderDataType<C>, LiveLoaderErrorType<C>>
61+
import("astro").LiveDataCollectionResult<
62+
LiveLoaderDataType<C>,
63+
LiveLoaderErrorType<C>
64+
>
5365
>;
5466

5567
export function getEntry<
@@ -71,10 +83,17 @@ declare module 'astro:content' {
7183
? Promise<DataEntryMap[C][E]> | undefined
7284
: Promise<DataEntryMap[C][E]>
7385
: Promise<CollectionEntry<C> | undefined>;
74-
export function getLiveEntry<C extends keyof LiveContentConfig['collections']>(
86+
export function getLiveEntry<
87+
C extends keyof LiveContentConfig["collections"],
88+
>(
7589
collection: C,
7690
filter: string | LiveLoaderEntryFilterType<C>,
77-
): Promise<import('astro').LiveDataEntryResult<LiveLoaderDataType<C>, LiveLoaderErrorType<C>>>;
91+
): Promise<
92+
import("astro").LiveDataEntryResult<
93+
LiveLoaderDataType<C>,
94+
LiveLoaderErrorType<C>
95+
>
96+
>;
7897

7998
/** Resolve an array of entry references from the same collection */
8099
export function getEntries<C extends keyof DataEntryMap>(
@@ -94,9 +113,9 @@ declare module 'astro:content' {
94113
| (string & {}),
95114
>(
96115
collection: C,
97-
): import('astro/zod').ZodPipe<
98-
import('astro/zod').ZodString,
99-
import('astro/zod').ZodTransform<
116+
): import("astro/zod").ZodPipe<
117+
import("astro/zod").ZodString,
118+
import("astro/zod").ZodTransform<
100119
C extends keyof DataEntryMap
101120
? {
102121
collection: C;
@@ -107,47 +126,67 @@ declare module 'astro:content' {
107126
>
108127
>;
109128

110-
type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R ? R : T;
111-
type InferEntrySchema<C extends keyof DataEntryMap> = import('astro/zod').infer<
112-
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
113-
>;
129+
type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R
130+
? R
131+
: T;
132+
type InferEntrySchema<C extends keyof DataEntryMap> =
133+
import("astro/zod").infer<
134+
ReturnTypeOrOriginal<
135+
Required<ContentConfig["collections"][C]>["schema"]
136+
>
137+
>;
114138
type ExtractLoaderConfig<T> = T extends { loader: infer L } ? L : never;
115139
type InferLoaderSchema<
116140
C extends keyof DataEntryMap,
117-
L = ExtractLoaderConfig<ContentConfig['collections'][C]>,
118-
> = L extends { schema: import('astro/zod').ZodSchema }
119-
? import('astro/zod').infer<L['schema']>
141+
L = ExtractLoaderConfig<ContentConfig["collections"][C]>,
142+
> = L extends { schema: import("astro/zod").ZodSchema }
143+
? import("astro/zod").infer<L["schema"]>
120144
: any;
121145

122-
type DataEntryMap = {
123-
124-
};
146+
type DataEntryMap = {};
125147

126-
type ExtractLoaderTypes<T> = T extends import('astro/loaders').LiveLoader<
148+
type ExtractLoaderTypes<T> = T extends import("astro/loaders").LiveLoader<
127149
infer TData,
128150
infer TEntryFilter,
129151
infer TCollectionFilter,
130152
infer TError
131153
>
132-
? { data: TData; entryFilter: TEntryFilter; collectionFilter: TCollectionFilter; error: TError }
133-
: { data: never; entryFilter: never; collectionFilter: never; error: never };
134-
type ExtractEntryFilterType<T> = ExtractLoaderTypes<T>['entryFilter'];
135-
type ExtractCollectionFilterType<T> = ExtractLoaderTypes<T>['collectionFilter'];
136-
type ExtractErrorType<T> = ExtractLoaderTypes<T>['error'];
137-
138-
type LiveLoaderDataType<C extends keyof LiveContentConfig['collections']> =
139-
LiveContentConfig['collections'][C]['schema'] extends undefined
140-
? ExtractDataType<LiveContentConfig['collections'][C]['loader']>
141-
: import('astro/zod').infer<
142-
Exclude<LiveContentConfig['collections'][C]['schema'], undefined>
154+
? {
155+
data: TData;
156+
entryFilter: TEntryFilter;
157+
collectionFilter: TCollectionFilter;
158+
error: TError;
159+
}
160+
: {
161+
data: never;
162+
entryFilter: never;
163+
collectionFilter: never;
164+
error: never;
165+
};
166+
type ExtractEntryFilterType<T> = ExtractLoaderTypes<T>["entryFilter"];
167+
type ExtractCollectionFilterType<T> =
168+
ExtractLoaderTypes<T>["collectionFilter"];
169+
type ExtractErrorType<T> = ExtractLoaderTypes<T>["error"];
170+
171+
type LiveLoaderDataType<C extends keyof LiveContentConfig["collections"]> =
172+
LiveContentConfig["collections"][C]["schema"] extends undefined
173+
? ExtractDataType<LiveContentConfig["collections"][C]["loader"]>
174+
: import("astro/zod").infer<
175+
Exclude<
176+
LiveContentConfig["collections"][C]["schema"],
177+
undefined
178+
>
143179
>;
144-
type LiveLoaderEntryFilterType<C extends keyof LiveContentConfig['collections']> =
145-
ExtractEntryFilterType<LiveContentConfig['collections'][C]['loader']>;
146-
type LiveLoaderCollectionFilterType<C extends keyof LiveContentConfig['collections']> =
147-
ExtractCollectionFilterType<LiveContentConfig['collections'][C]['loader']>;
148-
type LiveLoaderErrorType<C extends keyof LiveContentConfig['collections']> = ExtractErrorType<
149-
LiveContentConfig['collections'][C]['loader']
180+
type LiveLoaderEntryFilterType<
181+
C extends keyof LiveContentConfig["collections"],
182+
> = ExtractEntryFilterType<LiveContentConfig["collections"][C]["loader"]>;
183+
type LiveLoaderCollectionFilterType<
184+
C extends keyof LiveContentConfig["collections"],
185+
> = ExtractCollectionFilterType<
186+
LiveContentConfig["collections"][C]["loader"]
150187
>;
188+
type LiveLoaderErrorType<C extends keyof LiveContentConfig["collections"]> =
189+
ExtractErrorType<LiveContentConfig["collections"][C]["loader"]>;
151190

152191
export type ContentConfig = never;
153192
export type LiveContentConfig = never;

.astro/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/// <reference types="astro/client" />
2-
/// <reference path="content.d.ts" />
2+
/// <reference path="content.d.ts" />

.github/Update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Update: Mon Apr 6 02:07:35 UTC 2026
1+
Update: Mon Apr 6 02:07:35 UTC 2026

Documentation/GitHub/DeepDive.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,27 @@ graph TB
4848

4949
## Key Modules
5050

51-
| Path | Description |
52-
| :--- | :--- |
53-
| `Source/pages/index.astro` | Default entry point; reads environment variables to select workbench variant |
54-
| `Source/pages/Mountain.astro` | A2 workbench page — recommended production entry point |
55-
| `Source/pages/Browser.astro` | A1 browser-only workbench page |
56-
| `Source/pages/BrowserProxy.astro` | A1 browser workbench with services proxy |
57-
| `Source/pages/Electron.astro` | A3 workbench page with Electron polyfills |
58-
| `Source/pages/Isolation.astro` | Isolated mode page for extension sandboxing |
59-
| `Source/Workbench/Mountain.astro` | A2 workbench component — loads VSCode UI with Mountain providers |
60-
| `Source/Workbench/Browser.astro` | A1 workbench component — pure browser workbench |
61-
| `Source/Workbench/BrowserProxy/Layout.astro` | A1 layout with service proxy bootstrapping |
62-
| `Source/Workbench/BrowserProxy/Bootstrap.ts` | Initializes Effect-TS runtime and services for BrowserProxy |
63-
| `Source/Workbench/BrowserProxy/ServicesProxy.ts` | Service proxy implementation |
64-
| `Source/Workbench/Electron/Layout.astro` | A3 layout with Electron polyfill injection |
65-
| `Source/Workbench/Electron/Polyfills.ts` | Electron compatibility shims |
66-
| `Source/Workbench/NLS.astro` | Natural language support component |
67-
| `Source/Function/Debug.ts` | Build-time debug utilities |
68-
| `Source/Function/Shared.ts` | Shared runtime utilities |
69-
| `Source/Function/Meta.astro` | HTML meta tag component |
70-
| `Source/Function/Markup/Base.astro` | Base HTML layout skeleton |
71-
| `astro.config.ts` | Astro build configuration, alias resolution, Vite settings |
51+
| Path | Description |
52+
| :----------------------------------------------- | :--------------------------------------------------------------------------- |
53+
| `Source/pages/index.astro` | Default entry point; reads environment variables to select workbench variant |
54+
| `Source/pages/Mountain.astro` | A2 workbench page — recommended production entry point |
55+
| `Source/pages/Browser.astro` | A1 browser-only workbench page |
56+
| `Source/pages/BrowserProxy.astro` | A1 browser workbench with services proxy |
57+
| `Source/pages/Electron.astro` | A3 workbench page with Electron polyfills |
58+
| `Source/pages/Isolation.astro` | Isolated mode page for extension sandboxing |
59+
| `Source/Workbench/Mountain.astro` | A2 workbench component — loads VSCode UI with Mountain providers |
60+
| `Source/Workbench/Browser.astro` | A1 workbench component — pure browser workbench |
61+
| `Source/Workbench/BrowserProxy/Layout.astro` | A1 layout with service proxy bootstrapping |
62+
| `Source/Workbench/BrowserProxy/Bootstrap.ts` | Initializes Effect-TS runtime and services for BrowserProxy |
63+
| `Source/Workbench/BrowserProxy/ServicesProxy.ts` | Service proxy implementation |
64+
| `Source/Workbench/Electron/Layout.astro` | A3 layout with Electron polyfill injection |
65+
| `Source/Workbench/Electron/Polyfills.ts` | Electron compatibility shims |
66+
| `Source/Workbench/NLS.astro` | Natural language support component |
67+
| `Source/Function/Debug.ts` | Build-time debug utilities |
68+
| `Source/Function/Shared.ts` | Shared runtime utilities |
69+
| `Source/Function/Meta.astro` | HTML meta tag component |
70+
| `Source/Function/Markup/Base.astro` | Base HTML layout skeleton |
71+
| `astro.config.ts` | Astro build configuration, alias resolution, Vite settings |
7272

7373
---
7474

@@ -109,28 +109,28 @@ sequenceDiagram
109109

110110
## Integration Points
111111

112-
| Connecting Element | Direction | Mechanism | Description |
113-
| :--- | :--- | :--- | :--- |
114-
| **Wind** | Inbound | Direct import | Sky consumes Wind Effect-TS services for all business logic |
115-
| **Mountain** | Bidirectional | Tauri IPC + Events | Commands sent via Tauri invoke; updates received as Tauri events |
116-
| **Output** | Inbound | Static bundle | VSCode core UI components loaded from `@codeeditorland/output` |
117-
| **Worker** | Inbound | Web Worker API | Web workers for background processing imported from `@codeeditorland/worker` |
112+
| Connecting Element | Direction | Mechanism | Description |
113+
| :----------------- | :------------ | :----------------- | :--------------------------------------------------------------------------- |
114+
| **Wind** | Inbound | Direct import | Sky consumes Wind Effect-TS services for all business logic |
115+
| **Mountain** | Bidirectional | Tauri IPC + Events | Commands sent via Tauri invoke; updates received as Tauri events |
116+
| **Output** | Inbound | Static bundle | VSCode core UI components loaded from `@codeeditorland/output` |
117+
| **Worker** | Inbound | Web Worker API | Web workers for background processing imported from `@codeeditorland/worker` |
118118

119119
---
120120

121121
## Configuration
122122

123-
| Variable | Default | Description |
124-
| :--- | :--- | :--- |
125-
| `Mountain` | unset | Set to `true` to load the A2 Mountain workbench (recommended) |
126-
| `Electron` | unset | Set to `true` to load the A3 Electron workbench |
127-
| `BrowserProxy` | unset | Set to `true` to load the A1 BrowserProxy workbench |
128-
| `Browser` | unset | Set to `true` to load the A1 Browser workbench |
129-
| `NODE_ENV` | `production` | Controls source map generation and debug output |
123+
| Variable | Default | Description |
124+
| :------------- | :----------- | :------------------------------------------------------------ |
125+
| `Mountain` | unset | Set to `true` to load the A2 Mountain workbench (recommended) |
126+
| `Electron` | unset | Set to `true` to load the A3 Electron workbench |
127+
| `BrowserProxy` | unset | Set to `true` to load the A1 BrowserProxy workbench |
128+
| `Browser` | unset | Set to `true` to load the A1 Browser workbench |
129+
| `NODE_ENV` | `production` | Controls source map generation and debug output |
130130

131-
When no variant flag is set, `index.astro` loads `Workbench/Default.astro`.
132-
The recommended deployment always sets `Mountain=true`.
131+
When no variant flag is set, `index.astro` loads `Workbench/Default.astro`. The
132+
recommended deployment always sets `Mountain=true`.
133133

134134
**Astro configuration** (`astro.config.ts`) resolves Wind and other
135-
`@codeeditorland/*` packages through Vite aliases, sets `Source/` as the
136-
content root, and directs build output to `Target/`.
135+
`@codeeditorland/*` packages through Vite aliases, sets `Source/` as the content
136+
root, and directs build output to `Target/`.

Source/Function/BuildVSCode.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* vs/ directory structure to be present at the root of the package.
99
*/
1010

11-
import { readFile, mkdir, cp, rm } from "node:fs/promises";
12-
import { join, dirname } from "node:path";
11+
import { cp, mkdir, readFile, rm } from "node:fs/promises";
12+
import { dirname, join } from "node:path";
1313
import process from "node:process";
1414

1515
/**
@@ -108,7 +108,9 @@ async function verifyVSCodeOutput(vscodePath: string): Promise<void> {
108108
for (const file of requiredFiles) {
109109
const fullPath = join(vscodePath, file);
110110
if (!fs.existsSync(fullPath)) {
111-
console.warn(`[BuildVSCode] WARNING: Missing required file: ${file}`);
111+
console.warn(
112+
`[BuildVSCode] WARNING: Missing required file: ${file}`,
113+
);
112114
} else {
113115
console.log(`[BuildVSCode] ✓ Found: ${file}`);
114116
}
@@ -123,4 +125,4 @@ if (import.meta.url === `file://${process.argv[1]}`) {
123125
console.error("[BuildVSCode] Build failed:", error);
124126
process.exit(1);
125127
});
126-
}
128+
}

Source/Function/BuildWithMemory.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
#!/usr/bin/env node
2-
const { execSync } = require('node:child_process');
3-
const { join } = require('node:path');
2+
const { execSync } = require("node:child_process");
3+
const { join } = require("node:path");
44

55
// Set high memory limit
6-
process.env.NODE_OPTIONS = '--max-old-space-size=32768'; // 32GB
6+
process.env.NODE_OPTIONS = "--max-old-space-size=32768"; // 32GB
77

8-
console.log('[Build] Starting build with 32GB memory limit...');
8+
console.log("[Build] Starting build with 32GB memory limit...");
99

1010
// Get Sky directory
11-
const skyDir = join(__dirname, '../..');
11+
const skyDir = join(__dirname, "../..");
1212

1313
// Run copy first
14-
console.log('[Build] Copying VSCode output...');
15-
execSync('node ./Source/Function/CopyVSCode.js', { stdio: 'inherit', cwd: skyDir });
14+
console.log("[Build] Copying VSCode output...");
15+
execSync("node ./Source/Function/CopyVSCode.js", {
16+
stdio: "inherit",
17+
cwd: skyDir,
18+
});
1619

1720
// Run astro build using npx to ensure correct PATH
18-
console.log('[Build] Running astro build...');
19-
execSync('npx astro build', { stdio: 'inherit', cwd: skyDir });
21+
console.log("[Build] Running astro build...");
22+
execSync("npx astro build", { stdio: "inherit", cwd: skyDir });
2023

21-
console.log('[Build] ✓ Build completed successfully');
24+
console.log("[Build] ✓ Build completed successfully");

0 commit comments

Comments
 (0)