Skip to content

Commit

Permalink
chore: pre-release 0.2.4-canary.2
Browse files Browse the repository at this point in the history
  • Loading branch information
aralroca committed Jan 22, 2025
1 parent b678f07 commit ff98f19
Show file tree
Hide file tree
Showing 24 changed files with 42 additions and 40 deletions.
12 changes: 6 additions & 6 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
},
"packages/adapter-vercel": {
"name": "brisa-adapter-vercel",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"devDependencies": {
"brisa": "workspace:*",
},
},
"packages/brisa": {
"name": "brisa",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"bin": {
"brisa": "./index.js"
},
Expand All @@ -40,15 +40,15 @@
},
"packages/brisa-pandacss": {
"name": "brisa-pandacss",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"dependencies": {
"@pandacss/dev": "0.47.0",
"postcss": "8.4.47",
},
},
"packages/brisa-tailwindcss": {
"name": "brisa-tailwindcss",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"devDependencies": {
"@tailwindcss/postcss": "4.0.0-alpha.33",
"postcss": "8.4.49",
Expand All @@ -62,7 +62,7 @@
},
"packages/create-brisa": {
"name": "create-brisa",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"bin": {
"create-brisa": "./create-brisa.cjs"
},
Expand All @@ -72,7 +72,7 @@
},
"packages/www": {
"name": "www",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"dependencies": {
"@swc/wasm-web": "1.9.3",
"brisa": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-api-routes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "brisa start"
},
"dependencies": {
"brisa": "0.2.4-canary.1"
"brisa": "0.2.4-canary.2"
},
"devDependencies": {
"@types/bun": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-elysia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "brisa start"
},
"dependencies": {
"brisa": "0.2.4-canary.1",
"brisa": "0.2.4-canary.2",
"elysia": "latest"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-external-web-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "brisa start"
},
"dependencies": {
"brisa": "0.2.4-canary.1",
"brisa": "0.2.4-canary.2",
"counter-wc": "0.1.3",
"calendar-native-web-component": "0.0.32"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/with-i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "brisa start"
},
"dependencies": {
"brisa": "0.2.4-canary.1"
"brisa": "0.2.4-canary.2"
},
"devDependencies": {
"@types/bun": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"start": "brisa start"
},
"dependencies": {
"brisa": "0.2.4-canary.1"
"brisa": "0.2.4-canary.2"
},
"devDependencies": {
"@types/bun": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-pandacss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"start": "brisa start"
},
"dependencies": {
"brisa": "0.2.4-canary.1"
"brisa": "0.2.4-canary.2"
},
"devDependencies": {
"@pandacss/dev": "0.51.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-sqlite-with-server-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "brisa start"
},
"dependencies": {
"brisa": "0.2.4-canary.1"
"brisa": "0.2.4-canary.2"
},
"devDependencies": {
"@types/bun": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-ssr-modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"start": "brisa start"
},
"dependencies": {
"brisa": "0.2.4-canary.1"
"brisa": "0.2.4-canary.2"
},
"devDependencies": {
"@types/bun": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-streaming-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"start": "brisa start"
},
"dependencies": {
"brisa": "0.2.4-canary.1"
"brisa": "0.2.4-canary.2"
},
"devDependencies": {
"@types/bun": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-suspense/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"start": "brisa start"
},
"dependencies": {
"brisa": "0.2.4-canary.1"
"brisa": "0.2.4-canary.2"
},
"devDependencies": {
"@types/bun": "latest",
Expand Down
4 changes: 2 additions & 2 deletions examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"@tailwindcss/postcss": "4.0.0-alpha.33",
"brisa": "0.2.4-canary.1",
"brisa-tailwindcss": "0.2.4-canary.1",
"brisa": "0.2.4-canary.2",
"brisa-tailwindcss": "0.2.4-canary.2",
"postcss": "8.4.49",
"tailwindcss": "4.0.0-alpha.33"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/with-view-transitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"@tailwindcss/postcss": "4.0.0-alpha.25",
"brisa": "0.2.4-canary.1",
"brisa-tailwindcss": "0.2.4-canary.1",
"brisa": "0.2.4-canary.2",
"brisa-tailwindcss": "0.2.4-canary.2",
"postcss": "8.4.47",
"tailwindcss": "4.0.0-alpha.25"
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "brisa-monorepo",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"description": "The next-gen web framework.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -58,4 +58,4 @@
"@biomejs/biome": "1.9.4",
"husky": "9.1.6"
}
}
}
4 changes: 2 additions & 2 deletions packages/adapter-vercel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "brisa-adapter-vercel",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"license": "MIT",
"type": "module",
"main": "./dist/index.js",
Expand Down Expand Up @@ -36,4 +36,4 @@
"url": "https://github.com/brisa-build/brisa/issues"
},
"homepage": "https://github.com/brisa-build/brisa#readme"
}
}
4 changes: 2 additions & 2 deletions packages/brisa-pandacss/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "brisa-pandacss",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"license": "MIT",
"type": "module",
"main": "./index.ts",
Expand Down Expand Up @@ -35,4 +35,4 @@
"url": "https://github.com/brisa-build/brisa/issues"
},
"homepage": "https://github.com/brisa-build/brisa#readme"
}
}
4 changes: 2 additions & 2 deletions packages/brisa-tailwindcss/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "brisa-tailwindcss",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"license": "MIT",
"type": "module",
"main": "./index.ts",
Expand Down Expand Up @@ -45,4 +45,4 @@
"url": "https://github.com/brisa-build/brisa/issues"
},
"homepage": "https://github.com/brisa-build/brisa#readme"
}
}
2 changes: 1 addition & 1 deletion packages/brisa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "brisa",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"description": "Brisa, the next-gen web framework.",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions packages/brisa/src/utils/client-build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export async function clientBuild(
),
);
writes.push(
Bun.write(`${i18nPagePath}.br`, brotliCompressSync(i18nCode)),
Bun.write(`${i18nPagePath}.br`, brotliCompressSync(i18nCode) as any),
);
}
}
Expand All @@ -170,7 +170,7 @@ export async function clientBuild(
const gzipClientPage = gzipSync(new TextEncoder().encode(code));

writes.push(Bun.write(`${clientPage}.gz`, gzipClientPage));
writes.push(Bun.write(`${clientPage}.br`, brotliCompressSync(code)));
writes.push(Bun.write(`${clientPage}.br`, brotliCompressSync(code) as any));
clientSizesPerPage[route] += gzipClientPage.length;
}
}
Expand Down Expand Up @@ -241,7 +241,7 @@ function addExtraChunk(
writes.push(
Bun.write(
join(pagesClientPath, `${jsFilename}.br`),
brotliCompressSync(code),
brotliCompressSync(code) as any,
),
);
return gzipUnsuspense.length;
Expand Down
4 changes: 3 additions & 1 deletion packages/brisa/src/utils/crypto/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ const getAlorithm = () =>
'aes-256-cbc',
Buffer.from(process.env.__CRYPTO_KEY__ ?? '', 'hex'),
process.env.__CRYPTO_IV__ ?? '',
] satisfies [string, Uint8Array<ArrayBufferLike>, string];
] satisfies [string, Buffer, string];

export const ENCRYPT_PREFIX = '__encrypted:';
export const ENCRYPT_NONTEXT_PREFIX = '__encrypted-notext:';

export function encrypt(textOrObject: unknown) {
if (textOrObject == null) return textOrObject;

// @ts-ignore
const cipher = crypto.createCipheriv(...getAlorithm());
let text = textOrObject;
let prefix = ENCRYPT_PREFIX;
Expand All @@ -30,6 +31,7 @@ export function encrypt(textOrObject: unknown) {

export function decrypt(encrypted: string) {
const isString = encrypted.startsWith(ENCRYPT_PREFIX);
// @ts-ignore
const decipher = crypto.createDecipheriv(...getAlorithm());
const input = encrypted
.replace(ENCRYPT_PREFIX, '')
Expand Down
4 changes: 2 additions & 2 deletions packages/brisa/src/utils/handle-css-files/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ export default async function handleCSSFiles() {

for (const file of cssFilePaths) {
const buffer = fs.readFileSync(path.join(publicFolder, file));
Bun.write(path.join(publicFolder, file + '.gz'), gzipSync(buffer));
Bun.write(path.join(publicFolder, file + '.gz'), gzipSync(buffer as any) as any);
Bun.write(
path.join(publicFolder, file + '.br'),
brotliCompressSync(buffer),
brotliCompressSync(buffer as any) as any,
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/brisa/src/utils/precompress-assets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default async function precompressAssets(assetsPath: string) {
console.timeEnd(logGzipMsg);

console.time(logBrotliMsg);
Bun.write(`${asset}.br`, brotliCompressSync(buffer));
Bun.write(`${asset}.br`, brotliCompressSync(buffer) as any);
console.timeEnd(logBrotliMsg);
}),
);
Expand Down
4 changes: 2 additions & 2 deletions packages/create-brisa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-brisa",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"license": "MIT",
"type": "module",
"scripts": {
Expand Down Expand Up @@ -35,4 +35,4 @@
"devDependencies": {
"brisa": "latest"
}
}
}
4 changes: 2 additions & 2 deletions packages/www/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "www",
"version": "0.2.4-canary.1",
"version": "0.2.4-canary.2",
"module": "src/pages/index.tsx",
"type": "module",
"scripts": {
Expand Down Expand Up @@ -43,4 +43,4 @@
"yarn": ">= 3.0.0",
"pnpm": ">= 9.8.0"
}
}
}

0 comments on commit ff98f19

Please sign in to comment.