Skip to content

Commit 057bf91

Browse files
committed
chore: wip
1 parent f9c3b68 commit 057bf91

File tree

5 files changed

+71
-26
lines changed

5 files changed

+71
-26
lines changed

.stacks/core/cli/build.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { runCommand } from './src'
22

3-
const result = await runCommand('bun --bun build ./src/index.ts --outdir ./cli/dist --external vite --external @antfu/install-pkg --external bun --external @stacksjs/types --external @stacksjs/logging --external prompts --external @stacksjs/utils --external @stacksjs/validation --external @stacksjs/error-handling --external ora --external kolorist --target bun', {
3+
const result = await runCommand('bun --bun build ./src/index.ts --outdir dist --external vite --external @antfu/install-pkg --external bun --external @stacksjs/types --external @stacksjs/logging --external prompts --external @stacksjs/utils --external @stacksjs/validation --external @stacksjs/error-handling --external ora --external kolorist --target node', {
44
cwd: import.meta.dir,
55
})
66

7-
// if (result.isErr())
8-
// console.error(result.error)
7+
if (result.isErr())
8+
console.error(result.error)
99

10-
// else
11-
// console.write('Build complete!')
10+
else
11+
console.write('Build complete')

.stacks/core/cli/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"@stacksjs/utils": "link:@stacksjs/utils",
6262
"@stacksjs/validation": "link:@stacksjs/validation",
6363
"@types/prompts": "^2.4.4",
64+
"bun": "^0.7.0",
6465
"cac": "^6.7.14",
6566
"ora": "^6.3.1",
6667
"prompts": "^2.4.2"
@@ -75,6 +76,7 @@
7576
"@stacksjs/utils": "link:@stacksjs/utils",
7677
"@stacksjs/validation": "link:@stacksjs/validation",
7778
"@types/prompts": "^2.4.4",
79+
"bun": "^0.7.0",
7880
"cac": "^6.7.14",
7981
"kolorist": "1.8.0",
8082
"ora": "^6.3.1",

.stacks/core/types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"@types/node": "^18.16.19",
6060
"@types/nprogress": "^0.2.0",
6161
"@vinejs/vine": "^1.5.1",
62-
"bun-types": "^0.6.14",
62+
"bun-types": "^0.7.0",
6363
"cac": "^6.7.14",
6464
"markdown-it": "^13.0.1",
6565
"meilisearch": "^0.33.0",

.stacks/core/vite/src/vue-components.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ import { app } from '@stacksjs/config'
44
import { alias } from '@stacksjs/alias'
55
import mkcert from 'vite-plugin-mkcert'
66
import { kolorist as c } from '@stacksjs/cli'
7-
8-
// import { version } from '../package.json'
97
import { autoImports, components, cssEngine, inspect, uiEngine } from './stacks'
108
import type { ViteDevServer as DevServer, ViteBuildOptions } from './'
11-
import { defineConfig, loadEnv } from './'
9+
import { defineConfig } from './'
1210

11+
// import { version } from '../package.json'
1312
const version = '0.57.4'
1413

1514
export const vueComponentsConfig: ViteConfig = {
@@ -20,7 +19,8 @@ export const vueComponentsConfig: ViteConfig = {
2019

2120
server: {
2221
https: true,
23-
// host: app.url,
22+
host: 'stacks.test',
23+
// host: app.url || 'stacks.test',
2424
open: true,
2525
},
2626

@@ -30,7 +30,7 @@ export const vueComponentsConfig: ViteConfig = {
3030
},
3131

3232
optimizeDeps: {
33-
exclude: ['vue'],
33+
exclude: ['vue', 'bun', 'bun-types'],
3434
},
3535

3636
plugins: [
@@ -123,19 +123,19 @@ export function vueComponentsBuildOptions(): ViteBuildOptions {
123123
},
124124

125125
rollupOptions: {
126-
external: ['vue', '@stacksjs/path'],
126+
external: ['vue', '@stacksjs/path', 'bun', 'bun-types'],
127127
output: {
128128
globals: {
129-
vue: 'Vue',
129+
'vue': 'Vue',
130+
'Bun': 'Bun',
131+
'globalThis.Bun': 'Bun',
130132
},
131133
},
132134
},
133135
}
134136
}
135137

136-
export default defineConfig(({ command, mode }) => {
137-
process.env = { ...process.env, ...loadEnv(mode, projectPath(), '') }
138-
138+
export default defineConfig(({ command }) => {
139139
if (command === 'serve')
140140
return vueComponentsConfig
141141

yarn.lock

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
22
# yarn lockfile v1
3-
# bun ./bun.lockb --hash: 0634ABB5B267B899-587888a9a315ce26-E2F5BE2317A2E065-33ee1d228983e9a8
3+
# bun ./bun.lockb --hash: 16C6C425E6F5877E-a37215dd170d804f-F79E1C3C3081733C-4a555b8366fc0444
44

55

66
"@aashutoshrathi/word-wrap@^1.2.3":
@@ -3211,6 +3211,36 @@
32113211
resolved "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz"
32123212
integrity sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==
32133213

3214+
"@oven/bun-darwin-aarch64@0.7.0":
3215+
version "0.7.0"
3216+
resolved "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-0.7.0.tgz"
3217+
integrity sha512-G8IMj5RrqMW8t31qQ0B+xVID+GrU4PSHzF5579sLLH+EhS3UUS4isH4dZmZmzno5R21qxzRIQgIu7znQApchBw==
3218+
3219+
"@oven/bun-darwin-x64@0.7.0":
3220+
version "0.7.0"
3221+
resolved "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-0.7.0.tgz"
3222+
integrity sha512-mA3L3nvR1TjLN3tTPvK7M41h0JuVFpq8rRiBvFmPJn2kqJ2s+VgzKm+0/IIrA4ElSY9Q6JCwaS0dezf1kfEx/Q==
3223+
3224+
"@oven/bun-darwin-x64-baseline@0.7.0":
3225+
version "0.7.0"
3226+
resolved "https://registry.npmjs.org/@oven/bun-darwin-x64-baseline/-/bun-darwin-x64-baseline-0.7.0.tgz"
3227+
integrity sha512-Q/5/jjMPWDnXELt9Vw1FJQrsKUig8sLdGrjWSAxMAWgKDfyxPHU6ef9Tg3iR8EqkPT+UYzecSghAZFzgl8qsfA==
3228+
3229+
"@oven/bun-linux-aarch64@0.7.0":
3230+
version "0.7.0"
3231+
resolved "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-0.7.0.tgz"
3232+
integrity sha512-N2z/0UKv/Jr1xruxEzJVflrMLYa7FaxejkTBGevypYOHYU+ov2pXfLpe1ymfXo8Fgg1D4P/GlAf8tHrWVhX5Cg==
3233+
3234+
"@oven/bun-linux-x64@0.7.0":
3235+
version "0.7.0"
3236+
resolved "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-0.7.0.tgz"
3237+
integrity sha512-MJF9NVBgaPnWATsd8PEn1F3YjSnCCuIa4OfntYKxRWhfsrKK24IsZzMg6j+xZWyezTJJGhyicj1o/TV90JlvHQ==
3238+
3239+
"@oven/bun-linux-x64-baseline@0.7.0":
3240+
version "0.7.0"
3241+
resolved "https://registry.npmjs.org/@oven/bun-linux-x64-baseline/-/bun-linux-x64-baseline-0.7.0.tgz"
3242+
integrity sha512-ZCJIaEsdK6LeeO3ph+Gs8umXlXtawI+kPKqi81bL+0SGFuu37RUDSDOS5LF2RInxBXT6Ne0fCKEV/CNudNtFmw==
3243+
32143244
"@ow3/eslint-config@^0.47.1":
32153245
version "0.47.1"
32163246
resolved "https://registry.npmjs.org/@ow3/eslint-config/-/eslint-config-0.47.1.tgz"
@@ -3988,6 +4018,7 @@
39884018
"@stacksjs/utils" "link:@stacksjs/utils"
39894019
"@stacksjs/validation" "link:@stacksjs/validation"
39904020
"@types/prompts" "^2.4.4"
4021+
bun "^0.7.0"
39914022
cac "^6.7.14"
39924023
kolorist "1.8.0"
39934024
ora "^6.3.1"
@@ -4508,7 +4539,7 @@
45084539
"@types/node" "^18.16.19"
45094540
"@types/nprogress" "^0.2.0"
45104541
"@vinejs/vine" "^1.5.1"
4511-
bun-types "^0.6.14"
4542+
bun-types "^0.7.0"
45124543
cac "^6.7.14"
45134544
markdown-it "^13.0.1"
45144545
meilisearch "^0.33.0"
@@ -6524,10 +6555,22 @@ bumpp@^9.1.1:
65246555
prompts "^2.4.2"
65256556
semver "^7.5.1"
65266557

6527-
bun-types@^0.6.14:
6528-
version "0.6.14"
6529-
resolved "https://registry.npmjs.org/bun-types/-/bun-types-0.6.14.tgz"
6530-
integrity sha512-sRdvu+t59+H/TVOe7FSGFWYITbqkhiCx9NxVUHt2+JOXM9gUOe5uMPvVvcr/hGngnh+/yb5a7uPE4JaS6uxujg==
6558+
bun@^0.7.0:
6559+
version "0.7.0"
6560+
resolved "https://registry.npmjs.org/bun/-/bun-0.7.0.tgz"
6561+
integrity sha512-D7z/R4gqgdPXjPZCP/bNiwK0IhfFtU1pUGDimN77lb8XbrLnmHsHAtOCYaM2wi55Ql1tT3bAkUr4Woz6Z8L9bg==
6562+
optionalDependencies:
6563+
"@oven/bun-darwin-aarch64" "0.7.0"
6564+
"@oven/bun-darwin-x64" "0.7.0"
6565+
"@oven/bun-darwin-x64-baseline" "0.7.0"
6566+
"@oven/bun-linux-aarch64" "0.7.0"
6567+
"@oven/bun-linux-x64" "0.7.0"
6568+
"@oven/bun-linux-x64-baseline" "0.7.0"
6569+
6570+
bun-types@^0.7.0:
6571+
version "0.7.0"
6572+
resolved "https://registry.npmjs.org/bun-types/-/bun-types-0.7.0.tgz"
6573+
integrity sha512-jXFiYtwSUQtD/Y3LHRWeWNwhFaUYvcO96zI7y3gSPgTq+ozxXpuTGDxABLdIKmFc672Q7Qp/OgrfJFEjg4Mnkg==
65316574

65326575
bundle-name@^3.0.0:
65336576
version "3.0.0"
@@ -14127,14 +14170,14 @@ rimraf@^5.0.1:
1412714170
dependencies:
1412814171
glob "^10.2.5"
1412914172

14130-
"rollup@^1.20.0 || ^2.0.0", "rollup@^1.20.0||^2.0.0||^3.0.0", rollup@^2.0.0, rollup@^2.42.0, rollup@^2.43.1, rollup@^2.58.0:
14173+
"rollup@^1.20.0 || ^2.0.0", rollup@^2.0.0, rollup@^2.42.0, rollup@^2.43.1, rollup@^2.58.0:
1413114174
version "2.79.1"
1413214175
resolved "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz"
1413314176
integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==
1413414177
optionalDependencies:
1413514178
fsevents "~2.3.2"
1413614179

14137-
rollup@^3.25.2:
14180+
"rollup@^1.20.0||^2.0.0||^3.0.0", rollup@^3.25.2:
1413814181
version "3.26.3"
1413914182
resolved "https://registry.npmjs.org/rollup/-/rollup-3.26.3.tgz"
1414014183
integrity sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==
@@ -15350,7 +15393,7 @@ terminal-link@^3.0.0:
1535015393
ansi-escapes "^5.0.0"
1535115394
supports-hyperlinks "^2.2.0"
1535215395

15353-
terser@^5.0.0, terser@^5.4.0, terser@^5.9.0:
15396+
terser@^5.0.0, terser@^5.9.0:
1535415397
version "5.19.2"
1535515398
resolved "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz"
1535615399
integrity sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==
@@ -15508,7 +15551,7 @@ ts-map@^1.0.3:
1550815551
resolved "https://registry.npmjs.org/ts-map/-/ts-map-1.0.3.tgz"
1550915552
integrity sha512-vDWbsl26LIcPGmDpoVzjEP6+hvHZkBkLW7JpvwbCv/5IYPJlsbzCVXY3wsCeAxAUeTclNOUZxnLdGh3VBD/J6w==
1551015553

15511-
ts-node@>=10, ts-node@^10.8.1:
15554+
ts-node@>=10, ts-node@>=9.0.0, ts-node@^10.8.1:
1551215555
version "10.9.1"
1551315556
resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz"
1551415557
integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==

0 commit comments

Comments
 (0)