Skip to content

Commit 53b3b01

Browse files
chore: wip
1 parent f2d8fac commit 53b3b01

File tree

53 files changed

+147
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+147
-148
lines changed

storage/framework/auto-imports/globals.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,34 @@ Object.assign(globalThis, autoImports)
1010

1111
// TypeScript declarations
1212
declare global {
13-
const increment: typeof autoImports.increment
14-
const count: typeof autoImports.count
15-
const isDark: typeof autoImports.isDark
16-
const toggleDark: typeof autoImports.toggleDark
17-
const preferredDark: typeof autoImports.preferredDark
18-
const parseGpx: typeof autoImports.parseGpx
19-
const parseJsonCoordinates: typeof autoImports.parseJsonCoordinates
20-
const parseGpsData: typeof autoImports.parseGpsData
21-
const generateSampleLoopGpx: typeof autoImports.generateSampleLoopGpx
22-
const generateSampleLoopJson: typeof autoImports.generateSampleLoopJson
23-
const validateGpsDataForClaim: typeof autoImports.validateGpsDataForClaim
24-
const haversineDistance: typeof autoImports.haversineDistance
25-
const isClosedLoop: typeof autoImports.isClosedLoop
26-
const calculatePolygonArea: typeof autoImports.calculatePolygonArea
27-
const calculatePerimeter: typeof autoImports.calculatePerimeter
28-
const simplifyTrack: typeof autoImports.simplifyTrack
29-
const pointInPolygon: typeof autoImports.pointInPolygon
30-
const lineIntersectsPolygon: typeof autoImports.lineIntersectsPolygon
31-
const routeIntersectsPolygon: typeof autoImports.routeIntersectsPolygon
32-
const getBoundingBox: typeof autoImports.getBoundingBox
33-
const parseBoundingBox: typeof autoImports.parseBoundingBox
34-
const boundingBoxesOverlap: typeof autoImports.boundingBoxesOverlap
35-
const getCentroid: typeof autoImports.getCentroid
36-
const coordinatesToGeoJson: typeof autoImports.coordinatesToGeoJson
37-
const geoJsonToCoordinates: typeof autoImports.geoJsonToCoordinates
38-
const findLinePolygonIntersections: typeof autoImports.findLinePolygonIntersections
39-
const splitPolygonByRoute: typeof autoImports.splitPolygonByRoute
40-
const generateLoopCoordinates: typeof autoImports.generateLoopCoordinates
13+
const _increment: typeof autoImports.increment
14+
const _count: typeof autoImports.count
15+
const _isDark: typeof autoImports.isDark
16+
const _toggleDark: typeof autoImports.toggleDark
17+
const _preferredDark: typeof autoImports.preferredDark
18+
const _parseGpx: typeof autoImports.parseGpx
19+
const _parseJsonCoordinates: typeof autoImports.parseJsonCoordinates
20+
const _parseGpsData: typeof autoImports.parseGpsData
21+
const _generateSampleLoopGpx: typeof autoImports.generateSampleLoopGpx
22+
const _generateSampleLoopJson: typeof autoImports.generateSampleLoopJson
23+
const _validateGpsDataForClaim: typeof autoImports.validateGpsDataForClaim
24+
const _haversineDistance: typeof autoImports.haversineDistance
25+
const _isClosedLoop: typeof autoImports.isClosedLoop
26+
const _calculatePolygonArea: typeof autoImports.calculatePolygonArea
27+
const _calculatePerimeter: typeof autoImports.calculatePerimeter
28+
const _simplifyTrack: typeof autoImports.simplifyTrack
29+
const _pointInPolygon: typeof autoImports.pointInPolygon
30+
const _lineIntersectsPolygon: typeof autoImports.lineIntersectsPolygon
31+
const _routeIntersectsPolygon: typeof autoImports.routeIntersectsPolygon
32+
const _getBoundingBox: typeof autoImports.getBoundingBox
33+
const _parseBoundingBox: typeof autoImports.parseBoundingBox
34+
const _boundingBoxesOverlap: typeof autoImports.boundingBoxesOverlap
35+
const _getCentroid: typeof autoImports.getCentroid
36+
const _coordinatesToGeoJson: typeof autoImports.coordinatesToGeoJson
37+
const _geoJsonToCoordinates: typeof autoImports.geoJsonToCoordinates
38+
const _findLinePolygonIntersections: typeof autoImports.findLinePolygonIntersections
39+
const _splitPolygonByRoute: typeof autoImports.splitPolygonByRoute
40+
const _generateLoopCoordinates: typeof autoImports.generateLoopCoordinates
4141
}
4242

4343
export {}

storage/framework/core/actions/deploy.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ echo "Setup complete!"
774774
'ca-central-1': 'ZQSVJUPU6J1EY',
775775
}
776776

777-
const albHostedZoneId = albHostedZoneIds[options.environment === 'production' ? 'us-east-1' : 'us-east-1'] || 'Z35SXDOTRQ7X7K'
777+
const _albHostedZoneId = albHostedZoneIds[options.environment === 'production' ? 'us-east-1' : 'us-east-1'] || 'Z35SXDOTRQ7X7K'
778778

779779
// Create DNS A record for each SSL domain
780780
sslDomains.forEach((domain: string, index: number) => {
@@ -2295,11 +2295,10 @@ export async function deployFrontend(options: DeployFrontendOptions): Promise<vo
22952295
/**
22962296
* Get deployment status and outputs
22972297
*/
2298-
export async function getDeploymentStatus(options: { environment: string, region: string }): Promise<{
2298+
export async function getDeploymentStatus({ environment, region }: { environment: string, region: string }): Promise<{
22992299
status: string
23002300
outputs: Record<string, string>
23012301
}> {
2302-
const { environment, region } = options
23032302
const stackName = `stacks-cloud-${environment}`
23042303

23052304
const { CloudFormationClient } = await import('ts-cloud/aws')

storage/framework/core/actions/src/auth/setup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ const isMysql = dbDriver === 'mysql'
1313
// - PostgreSQL: SERIAL PRIMARY KEY, NOW(), true/false
1414
// - MySQL: INTEGER AUTO_INCREMENT PRIMARY KEY, NOW(), 1/0
1515
// - SQLite: INTEGER PRIMARY KEY AUTOINCREMENT, datetime('now'), 1/0
16-
const autoIncrement = isPostgres ? 'SERIAL' : 'INTEGER'
17-
const primaryKey = isPostgres ? 'PRIMARY KEY' : (isMysql ? 'PRIMARY KEY AUTO_INCREMENT' : 'PRIMARY KEY AUTOINCREMENT')
16+
const _autoIncrement = isPostgres ? 'SERIAL' : 'INTEGER'
17+
const _primaryKey = isPostgres ? 'PRIMARY KEY' : (isMysql ? 'PRIMARY KEY AUTO_INCREMENT' : 'PRIMARY KEY AUTOINCREMENT')
1818
const now = isPostgres || isMysql ? 'NOW()' : `datetime('now')`
1919
const boolTrue = isPostgres ? 'true' : '1'
20-
const boolFalse = isPostgres ? 'false' : '0'
20+
const _boolFalse = isPostgres ? 'false' : '0'
2121

2222
log.info('Setting up authentication...')
2323
log.info(`Database driver: ${dbDriver}`)

storage/framework/core/actions/src/deploy/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ if (!process.env.AWS_ACCESS_KEY_ID || !process.env.AWS_SECRET_ACCESS_KEY) {
123123

124124
// Use ts-cloud deployment instead of CDK
125125
try {
126-
const { deployStack, deployFrontend } = await import('../../deploy')
126+
const { deployStack, deployFrontend: _deployFrontend } = await import('../../deploy')
127127

128128
const environment = process.env.APP_ENV || process.env.NODE_ENV || 'production'
129129
const region = process.env.AWS_REGION || 'us-east-1'
@@ -340,7 +340,7 @@ try {
340340
try {
341341
const { S3Client, CloudFormationClient } = await import('ts-cloud/aws')
342342
const { existsSync, readdirSync, statSync, readFileSync, copyFileSync, mkdirSync, rmSync } = await import('node:fs')
343-
const { join, extname, relative } = await import('node:path')
343+
const { join, extname, relative: _relative } = await import('node:path')
344344

345345
const s3 = new S3Client(region)
346346
const cf = new CloudFormationClient(region)

storage/framework/core/actions/src/dev/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { config } from '@stacksjs/config'
33
import { log } from '@stacksjs/logging'
44
import { cors, route } from '@stacksjs/router'
55

6-
const options = parseOptions()
6+
const _options = parseOptions()
77
const port = config.ports?.api || 3008
88

99
log.info('[API] Starting development server...')

storage/framework/core/actions/src/setup/ssl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export async function trustCertificate(domain: string, verbose?: boolean): Promi
300300
*/
301301
export async function generateCertificates(domain: string, verbose?: boolean): Promise<boolean> {
302302
try {
303-
const { generateCertificate, httpsConfig, createRootCA } = await import('@stacksjs/tlsx')
303+
const { generateCertificate, httpsConfig: _httpsConfig, createRootCA } = await import('@stacksjs/tlsx')
304304

305305
// Ensure SSL directory exists
306306
if (!fs.existsSync(SSL_DIR)) {

storage/framework/core/ai/src/agents/claude/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ export function createClaudeLocalAgent(config: ClaudeAgentConfig = {}): AIDriver
6464
name: 'Claude CLI (Local)',
6565

6666
async process(command: string, context: string, _history: AIMessage[]): Promise<string> {
67-
const { $ } = await import('bun')
67+
const bun = await import('bun')
6868

6969
// Check if claude CLI is available
70-
const whichResult = await $`which claude`.quiet().nothrow()
70+
const whichResult = await bun.$`which claude`.quiet().nothrow()
7171
if (whichResult.exitCode !== 0) {
7272
throw new Error('Claude CLI not found. Install it with: npm install -g @anthropic-ai/claude-code')
7373
}
@@ -80,7 +80,7 @@ export function createClaudeLocalAgent(config: ClaudeAgentConfig = {}): AIDriver
8080
const cwd = config.cwd || process.cwd()
8181

8282
try {
83-
const result = await $`cd ${cwd} && claude --print --dangerously-skip-permissions ${fullPrompt}`.quiet()
83+
const result = await bun.$`cd ${cwd} && claude --print --dangerously-skip-permissions ${fullPrompt}`.quiet()
8484
return result.text().trim()
8585
}
8686
catch {
@@ -111,7 +111,7 @@ export function createClaudeEC2Agent(config: ClaudeAgentConfig): AIDriver {
111111
name: 'Claude CLI (EC2)',
112112

113113
async process(command: string, context: string, _history: AIMessage[]): Promise<string> {
114-
const { $ } = await import('bun')
114+
const bun = await import('bun')
115115

116116
if (!ec2Host) {
117117
throw new Error('BUDDY_EC2_HOST environment variable not set. Set it to your EC2 instance IP/hostname.')
@@ -130,7 +130,7 @@ export function createClaudeEC2Agent(config: ClaudeAgentConfig): AIDriver {
130130
const sshTarget = `${ec2User}@${ec2Host}`
131131

132132
try {
133-
const result = await $`ssh ${sshArgs} ${sshTarget} "claude --print '${escapedPrompt}'"`.quiet()
133+
const result = await bun.$`ssh ${sshArgs} ${sshTarget} "claude --print '${escapedPrompt}'"`.quiet()
134134
return result.text().trim()
135135
}
136136
catch (error) {

storage/framework/core/arrays/src/helpers.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function mergeArrayable<T>(...args: Nullable<Arrayable<T>>[]): Array<T> {
4848
return args.flatMap(i => toArray(i))
4949
}
5050

51-
export type PartitionFilter<T> = (i: T, idx: number, arr: readonly T[]) => any
51+
export type PartitionFilter<T> = (_i: T, _idx: number, _arr: readonly T[]) => any
5252

5353
/**
5454
* Divide an array into two parts by a filter function
@@ -61,37 +61,37 @@ export type PartitionFilter<T> = (i: T, idx: number, arr: readonly T[]) => any
6161
* console.log(even) // [2, 4]
6262
* ```
6363
*/
64-
export function partition<T>(array: readonly T[], f1: PartitionFilter<T>): [T[], T[]]
65-
export function partition<T>(array: readonly T[], f1: PartitionFilter<T>, f2: PartitionFilter<T>): [T[], T[], T[]]
64+
export function partition<T>(array: readonly T[], _f1: PartitionFilter<T>): [T[], T[]]
65+
export function partition<T>(array: readonly T[], _f1: PartitionFilter<T>, _f2: PartitionFilter<T>): [T[], T[], T[]]
6666
export function partition<T>(
6767
array: readonly T[],
68-
f1: PartitionFilter<T>,
69-
f2: PartitionFilter<T>,
70-
f3: PartitionFilter<T>,
68+
_f1: PartitionFilter<T>,
69+
_f2: PartitionFilter<T>,
70+
_f3: PartitionFilter<T>,
7171
): [T[], T[], T[], T[]]
7272
export function partition<T>(
7373
array: readonly T[],
74-
f1: PartitionFilter<T>,
75-
f2: PartitionFilter<T>,
76-
f3: PartitionFilter<T>,
77-
f4: PartitionFilter<T>,
74+
_f1: PartitionFilter<T>,
75+
_f2: PartitionFilter<T>,
76+
_f3: PartitionFilter<T>,
77+
_f4: PartitionFilter<T>,
7878
): [T[], T[], T[], T[], T[]]
7979
export function partition<T>(
8080
array: readonly T[],
81-
f1: PartitionFilter<T>,
82-
f2: PartitionFilter<T>,
83-
f3: PartitionFilter<T>,
84-
f4: PartitionFilter<T>,
85-
f5: PartitionFilter<T>,
81+
_f1: PartitionFilter<T>,
82+
_f2: PartitionFilter<T>,
83+
_f3: PartitionFilter<T>,
84+
_f4: PartitionFilter<T>,
85+
_f5: PartitionFilter<T>,
8686
): [T[], T[], T[], T[], T[], T[]]
8787
export function partition<T>(
8888
array: readonly T[],
89-
f1: PartitionFilter<T>,
90-
f2: PartitionFilter<T>,
91-
f3: PartitionFilter<T>,
92-
f4: PartitionFilter<T>,
93-
f5: PartitionFilter<T>,
94-
f6: PartitionFilter<T>,
89+
_f1: PartitionFilter<T>,
90+
_f2: PartitionFilter<T>,
91+
_f3: PartitionFilter<T>,
92+
_f4: PartitionFilter<T>,
93+
_f5: PartitionFilter<T>,
94+
_f6: PartitionFilter<T>,
9595
): [T[], T[], T[], T[], T[], T[], T[]]
9696
export function partition<T>(array: readonly T[], ...filters: PartitionFilter<T>[]): any {
9797
const result: T[][] = Array.from({ length: filters.length + 1 })

storage/framework/core/auth/src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export async function createPersonalAccessClient(): Promise<Ok<string, never>> {
77
const secret = randomBytes(40).toString('hex')
88

99
// Use unsafe SQL for more reliable execution
10-
const result = await db.unsafe(`
10+
const _result = await db.unsafe(`
1111
INSERT INTO oauth_clients (name, secret, provider, redirect, personal_access_client, password_client, revoked, created_at)
1212
VALUES (?, ?, ?, ?, ?, ?, ?, datetime('now'))
1313
`, ['Personal Access Client', secret, 'local', 'http://localhost', 1, 0, 0]).execute()

storage/framework/core/auth/src/gate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import type { UserModel } from '@stacksjs/orm'
1010
/**
1111
* Gate callback function type
1212
*/
13-
export type GateCallback<T = any> = (user: UserModel | null, ...args: T[]) => boolean | Promise<boolean> | AuthorizationResponse
13+
export type GateCallback<T = any> = (_user: UserModel | null, ..._args: T[]) => boolean | Promise<boolean> | AuthorizationResponse
1414

1515
/**
1616
* Policy method type
1717
*/
18-
export type PolicyMethod<T = any> = (user: UserModel | null, model?: T, ...args: any[]) => boolean | Promise<boolean> | AuthorizationResponse
18+
export type PolicyMethod<T = any> = (_user: UserModel | null, _model?: T, ..._args: any[]) => boolean | Promise<boolean> | AuthorizationResponse
1919

2020
/**
2121
* Authorization response for detailed allow/deny

0 commit comments

Comments
 (0)