Skip to content

Commit c12b170

Browse files
committed
chore: wip
1 parent d24b670 commit c12b170

File tree

12 files changed

+33
-23
lines changed

12 files changed

+33
-23
lines changed

.stacks/core/storage/src/drivers/aws.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ export class StorageStack extends NestedStack {
77
constructor(scope: Construct, id: string, props?: NestedStackProps) {
88
super(scope, id, props)
99

10-
if (!storage.name)
11-
throw new Error('./config storage.name is not defined')
10+
// if (!storage.name)
11+
// throw new Error('./config storage.name is not defined')
1212

13-
// eslint-disable-next-line no-new
14-
new s3.Bucket(this, storage.name)
13+
// // eslint-disable-next-line no-new
14+
// new s3.Bucket(this, storage.name)
1515
}
1616
}

.stacks/core/storage/src/files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ type Data = Blob | TypedArray | ArrayBufferLike | string | BlobPart[]
3434
export async function writeFile(path: Path, data: Data): Promise<number> {
3535
if (typeof path === 'string') {
3636
const dirPath = dirname(path)
37-
if (!existsSync(dirPath))
38-
createFolder(dirPath)
37+
if (!await existsSync(dirPath))
38+
await createFolder(dirPath)
3939

4040
return await Bun.write(Bun.file(path), data)
4141
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
type Visibility = 'public' | 'private'
1+
// type Visibility = 'public' | 'private'
22

3-
export function setVisibility(path: string, visibility: Visibility) {
3+
// export function setVisibility(path: string, visibility: Visibility) {
4+
export function setVisibility() {
45
return 'wip'
56
}

.stacks/core/storage/src/zip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function gunzipSync(data: Uint8Array) {
4646
return Bun.gunzipSync(data) // decompressed
4747
}
4848

49-
export async function deflateSync(data: Uint8Array, options?: ZlibCompressionOptions) {
49+
export function deflateSync(data: Uint8Array, options?: ZlibCompressionOptions) {
5050
return Bun.deflateSync(data, options) // compressed
5151
}
5252

.stacks/core/types/src/cloud.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export interface CloudOptions {
22
driver: 'aws'
33

4+
// eslint-disable-next-line @typescript-eslint/ban-types
45
storage: {}
56

67
firewall: {
@@ -15,6 +16,7 @@ export interface CloudOptions {
1516
rules: {
1617
name: string
1718
priority: number
19+
// eslint-disable-next-line @typescript-eslint/ban-types
1820
action: { block?: {}; allow?: {} }
1921
visibilityConfig: {
2022
sampledRequestsEnabled: boolean

.stacks/core/types/src/events.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
* useEvent('user:registered', { name: 'Chris', email: 'chris@stacksjs.dev' })
1414
* events.emit('user:registered', { name: 'Chris', email: 'chris@stacksjs.dev' })
1515
* useEvents.emit('user:registered', { name: 'Chris', email: 'chris@stacksjs.dev' })
16-
* ````
17-
16+
* ```
17+
*
1818
* @example To capture an event, you may use any of the following approaches:
1919
* ```ts
2020
* listen('user:registered', (user) => sendWelcomeEmail(user))

.stacks/core/types/src/router.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export interface Route {
4949
export interface MiddlewareType {
5050
name: string
5151
priority: number
52+
// eslint-disable-next-line @typescript-eslint/ban-types
5253
handle: Function
5354
}
5455

.stacks/core/types/src/security.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface SecurityOptions {
1414
rules: {
1515
name: string
1616
priority: number
17+
// eslint-disable-next-line @typescript-eslint/ban-types
1718
action: { block?: {}; allow?: {} }
1819
visibilityConfig: {
1920
sampledRequestsEnabled: boolean

.stacks/core/utils/src/throttle.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
22
* Throttle a function.
33
*
4-
* @param fn: Function
5-
* @param wait = 300
6-
* @returns
4+
* @param {Function} fn
5+
* @param {number} [wait]
6+
* @returns {Function}
77
*
88
* @example
99
* ```ts

.stacks/core/vite-plugin-vue-layouts/src/index.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { resolve } from 'node:path'
2+
import process from 'node:process'
23
import type { ModuleNode, Plugin, ResolvedConfig } from 'vite'
34
import { createVirtualModuleCode } from './clientSide'
45
import { getFilesFromPath } from './files'
@@ -76,10 +77,15 @@ export default function Layout(userOptions: UserOptions = {}): Plugin {
7677
updateVirtualModule()
7778
})
7879

79-
watcher.on('change', async (path) => {
80+
watcher.on('change', (path) => {
8081
path = `/${normalizePath(path)}`
81-
const module = await moduleGraph.getModuleByUrl(path)
82-
reloadModule(module, path)
82+
moduleGraph.getModuleByUrl(path)
83+
.then((module) => {
84+
reloadModule(module, path)
85+
})
86+
.catch((error) => {
87+
console.error('Error while getting module by URL:', error)
88+
})
8389
})
8490
},
8591
resolveId(id) {

0 commit comments

Comments
 (0)