Skip to content

Commit f95c65c

Browse files
committed
chore: wip
chore: wip
1 parent 0da014a commit f95c65c

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

resources/views/dashboard/dependencies/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ useHead({
131131
<a
132132
id="menu-item-0"
133133
href="#"
134-
class="text-gray-700 block px-4 py-1.5 text-sm hover:bg-blue-gray-50 text-xs"
134+
class="text-gray-700 block px-4 py-1.5 hover:bg-blue-gray-50 text-xs"
135135
role="menuitem"
136136
tabindex="-1"
137137
>Edit</a>
138138

139139
<a
140140
id="menu-item-2"
141141
href="#"
142-
class="text-gray-700 block px-4 py-1.5 text-sm hover:bg-blue-gray-50 text-xs"
142+
class="text-gray-700 block px-4 py-1.5 hover:bg-blue-gray-50 text-xs"
143143
role="menuitem"
144144
tabindex="-1"
145145
>Uninstall</a>

storage/framework/core/cloud/src/cloud/docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class DocsStack {
2424
// this needs to have timestamp to ensure uniqueness. Since Origin Request (Lambda@Edge) functions are replicated functions, the
2525
// deletion process takes a "long time". This way, the function is always unique in cases of quick recreations.
2626
functionName: `${props.slug}-${props.appEnv}-origin-request-${props.timestamp}`,
27-
description: 'The Stacks Origin Request function that prettifies URLs',
27+
description: 'The Stacks Origin Request function that prettifies URLs by removing the .html extension',
2828
runtime: lambda.Runtime.NODEJS_20_X,
2929
handler: 'dist/origin-request.handler',
3030
code: lambda.Code.fromAsset(p.cloudPath('dist.zip'), {

storage/framework/core/cloud/src/edge/origin-request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const regexSuffixless = /\/[^/.]+$/ // e.g. "/some/page" but not "/", "/some/" o
77
const regexTrailingSlash = /.+\/$/ // e.g. "/some/" or "/some/page/" but not root "/"
88

99
// TODO: narrow types here
10-
export function handler(event: any, context: any, callback: any) {
10+
export function handler(event: any, context: any, callback: any): void {
1111
const { request } = event.Records[0].cf
1212
const { uri } = request
1313
const { suffix } = config
Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import { runCommand } from '@stacksjs/cli'
2+
import type { Result } from '@stacksjs/error-handling'
3+
import type { CommandError, Subprocess } from '@stacksjs/types'
24
import type { ZlibCompressionOptions } from 'bun'
35

46
interface ZipOptions {
57
cwd?: string
68
}
79

8-
export async function zip(from: string | string[], to?: string, options?: ZipOptions) {
10+
export async function zip(
11+
from: string | string[],
12+
to?: string,
13+
options?: ZipOptions,
14+
): Promise<Result<Subprocess, CommandError>> {
915
const toPath = to || 'archive.zip'
1016
const fromPath = Array.isArray(from) ? from.join(' ') : from
1117

@@ -14,40 +20,40 @@ export async function zip(from: string | string[], to?: string, options?: ZipOpt
1420
return runCommand(`zip -r ${to} ${from}`, options)
1521
}
1622

17-
export async function unzip(paths: string | string[]) {
23+
export async function unzip(paths: string | string[]): Promise<Result<Subprocess, CommandError>> {
1824
if (Array.isArray(paths)) return runCommand(`unzip ${paths.join(' ')}`)
1925

2026
return runCommand(`unzip ${paths}`)
2127
}
2228

23-
export function archive(paths: string | string[]) {
29+
export function archive(paths: string | string[]): Promise<Result<Subprocess, CommandError>> {
2430
return zip(paths)
2531
}
2632

27-
export function unarchive(paths: string | string[]) {
33+
export function unarchive(paths: string | string[]): Promise<Result<Subprocess, CommandError>> {
2834
return unzip(paths)
2935
}
3036

31-
export function compress(paths: string[]) {
37+
export function compress(paths: string[]): Promise<Result<Subprocess, CommandError>> {
3238
return zip(paths)
3339
}
3440

35-
export function decompress(paths: string | string[]) {
41+
export function decompress(paths: string | string[]): Promise<Result<Subprocess, CommandError>> {
3642
return unzip(paths)
3743
}
3844

39-
export function gzipSync(data: Uint8Array, options?: ZlibCompressionOptions) {
45+
export function gzipSync(data: Uint8Array, options?: ZlibCompressionOptions): Uint8Array {
4046
return Bun.gzipSync(data, options) // buffer extends Uint8Array
4147
}
4248

43-
export function gunzipSync(data: Uint8Array) {
49+
export function gunzipSync(data: Uint8Array): Uint8Array {
4450
return Bun.gunzipSync(data) // decompressed
4551
}
4652

47-
export function deflateSync(data: Uint8Array, options?: ZlibCompressionOptions) {
53+
export function deflateSync(data: Uint8Array, options?: ZlibCompressionOptions): Uint8Array {
4854
return Bun.deflateSync(data, options) // compressed
4955
}
5056

51-
export function inflateSync(data: Uint8Array) {
57+
export function inflateSync(data: Uint8Array): Uint8Array {
5258
return Bun.inflateSync(data) // decompressed
5359
}

0 commit comments

Comments
 (0)