Skip to content

Commit 3449072

Browse files
committed
chore: wip
1 parent dc1d8b4 commit 3449072

Some content is hidden

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

55 files changed

+58
-1803
lines changed

bootstrap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fi
2424
# Get the directory of the current script and go up 3 directories
2525
PROJECT_ROOT="$(cd "$(dirname "$0")" && pwd)"
2626
CLI_PATH="$PROJECT_ROOT/storage/framework/core/buddy/src/cli.ts"
27-
SCRIPT_PATH="$PROJECT_ROOT/storage/framework/scripts/pkgx-install"
27+
SCRIPT_PATH="$PROJECT_ROOT/storage/framework/scripts/pantry-install"
2828
LOG_PATH="$PROJECT_ROOT/storage/logs/console.log"
2929

3030
case "$*" in
@@ -38,7 +38,7 @@ case "$*" in
3838
esac
3939

4040
cd "$PROJECT_ROOT" || exit 1
41-
# Run the pkgx-install script
41+
# Run the pantry-install script
4242
case "$*" in
4343
*--verbose*)
4444
"$SCRIPT_PATH"

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,10 @@ export async function generateTypes(options?: GeneratorOptions): Promise<void> {
112112
log.success('Types were generated successfully')
113113
}
114114

115-
export function generatePkgxConfig(): void {
115+
export function generatePantryConfig(): void {
116116
// write the yaml string to a file in your project root
117-
// files.put(projectPath('./pkgx.yaml'), yamlStr)
118-
119-
log.success('Successfully generated `./pkgx.yaml` based on your config')
117+
// files.put(projectPath('./pantry.yaml'), yamlStr)
118+
log.success('Successfully generated `./pantry.yaml` based on your config')
120119
}
121120

122121
export async function generateSeeder(): Promise<void> {
Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,70 @@
11
import { log, runCommand } from '@stacksjs/cli'
2-
// generates the pkgx file based on the user configuration
2+
// generates the pantry file based on the user configuration
33
import { config } from '@stacksjs/config'
4-
5-
// @ts-expect-error - no types
6-
import data from '../../../../../pkgx.yaml'
4+
import data from '../../../../../pantry.yaml'
75

86
if (!data)
9-
throw new Error('pkgx.yaml file not found')
7+
throw new Error('pantry.yaml file not found')
108

119
if (data.dependencies['aws.amazon.com/cdk'] === undefined) {
12-
log.info('aws.amazon.com/cdk dependency not found in pkgx.yaml.')
10+
log.info('aws.amazon.com/cdk dependency not found in pantry.yaml.')
1311
// throw an error unless its installed locally
1412
const result = await runCommand('which cdk')
1513
if (result.isErr())
16-
throw new Error('aws.amazon.com/cdk dependency not found in pkgx.yaml. To confirm, run `which cdk`')
14+
throw new Error('aws.amazon.com/cdk dependency not found in pantry.yaml. To confirm, run `which cdk`')
1715
}
1816

1917
if (data.dependencies['aws.amazon.com/cli'] === undefined) {
20-
log.info('aws.amazon.com/cli dependency not found in pkgx.yaml.')
18+
log.info('aws.amazon.com/cli dependency not found in pantry.yaml.')
2119
const result = await runCommand('which aws')
2220
if (result.isErr())
23-
throw new Error('aws.amazon.com/cli dependency not found in pkgx.yaml. To confirm, run `which aws`')
21+
throw new Error('aws.amazon.com/cli dependency not found in pantry.yaml. To confirm, run `which aws`')
2422
}
2523

2624
if (data.dependencies['bun.sh'] === undefined) {
27-
log.info('bun.sh dependency not found in pkgx.yaml.')
25+
log.info('bun.sh dependency not found in pantry.yaml.')
2826
// throw an error unless its installed locally
2927
const result = await runCommand('which aws')
3028
if (result.isErr())
31-
throw new Error('bun.sh dependency not found in pkgx.yaml. To confirm, run `which bun`')
29+
throw new Error('bun.sh dependency not found in pantry.yaml. To confirm, run `which bun`')
3230
}
3331

3432
if (data.dependencies['info-zip.org/zip'] === undefined) {
35-
log.info('info-zip.org/zip dependency not found in pkgx.yaml.')
33+
log.info('info-zip.org/zip dependency not found in pantry.yaml.')
3634
// throw an error unless its installed locally
3735
const result = await runCommand('which zip')
3836
if (result.isErr())
39-
throw new Error('info-zip.org/zip dependency not found in pkgx.yaml. To confirm, run `which zip`')
37+
throw new Error('info-zip.org/zip dependency not found in pantry.yaml. To confirm, run `which zip`')
4038
}
4139

4240
if (data.dependencies['info-zip.org/unzip'] === undefined) {
43-
log.info('info-zip.org/unzip dependency not found in pkgx.yaml.')
41+
log.info('info-zip.org/unzip dependency not found in pantry.yaml.')
4442
// throw an error unless its installed locally
4543
const result = await runCommand('which unzip')
4644
if (result.isErr())
47-
throw new Error('info-zip.org/unzip dependency not found in pkgx.yaml. To confirm, run `which unzip`')
45+
throw new Error('info-zip.org/unzip dependency not found in pantry.yaml. To confirm, run `which unzip`')
4846
}
4947

5048
if (data.dependencies['mailpit.axllent.org'] === undefined) {
51-
log.info('mailpit.axllent.org dependency not found in pkgx.yaml.')
49+
log.info('mailpit.axllent.org dependency not found in pantry.yaml.')
5250
// throw an error unless its installed locally
5351
const result = await runCommand('which mailpit')
5452
if (result.isErr())
55-
throw new Error('mailpit.axllent.org dependency not found in pkgx.yaml. To confirm, run `which mailpit`')
53+
throw new Error('mailpit.axllent.org dependency not found in pantry.yaml. To confirm, run `which mailpit`')
5654
}
5755

5856
if (data.dependencies['redis.io'] === undefined) {
59-
log.info('redis.io dependency not found in pkgx.yaml.')
57+
log.info('redis.io dependency not found in pantry.yaml.')
6058
// throw an error unless its installed locally
6159
const result = await runCommand('which redis')
6260
if (result.isErr())
63-
throw new Error('redis.io dependency not found in pkgx.yaml. To confirm, run `which redis`')
61+
throw new Error('redis.io dependency not found in pantry.yaml. To confirm, run `which redis`')
6462
}
6563

6664
if (config.database.default === 'sqlite' && data.dependencies['sqlite.org'] === undefined) {
67-
log.info('sqlite.org dependency not found in pkgx.yaml.')
65+
log.info('sqlite.org dependency not found in pantry.yaml.')
6866
// throw an error unless its installed locally
6967
const result = await runCommand('which sqlite')
7068
if (result.isErr())
71-
throw new Error('sqlite.org dependency not found in pkgx.yaml. To confirm, run `which sqlite`')
69+
throw new Error('sqlite.org dependency not found in pantry.yaml. To confirm, run `which sqlite`')
7270
}

storage/framework/core/buddy/src/commands/create.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ async function download(name: string, path: string, options: CreateOptions) {
109109

110110
async function ensureEnv(path: string, options: CreateOptions) {
111111
log.info('Ensuring your environment is ready...')
112-
await runCommand('pkgx --update ', { ...options, cwd: path })
112+
await runCommand('pantry --update ', { ...options, cwd: path })
113113
log.success('Environment is ready')
114114
}
115115

@@ -131,7 +131,7 @@ async function install(path: string, options: CreateOptions) {
131131

132132
await runAction(Action.KeyGenerate, { ...options, cwd: path })
133133

134-
// TODO: we should ask quite a few questions here, similar how we do in `buddy new my-project`, so we can generate a custom pkgx.yaml file
134+
// TODO: we should ask quite a few questions here, similar how we do in `buddy new my-project`, so we can generate a custom pantry.yaml file
135135

136136
result = await runCommand('git init', { ...options, cwd: path }) // do we need this? or does giget do this already?
137137
if (result.isErr()) {

storage/framework/core/buddy/src/commands/generate.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
generateIdeHelpers,
77
generateLibEntries,
88
generateOpenApiSpec,
9-
generatePkgxConfig,
9+
generatePantryConfig,
1010
generateTypes,
1111
generateVsCodeCustomData,
1212
generateWebTypes,
@@ -28,7 +28,7 @@ export function generate(buddy: CLI): void {
2828
ideHelpers: 'Generate IDE helpers',
2929
componentMeta: 'Generate component meta information',
3030
coreSymlink: 'Generate symlink of the core framework to the project root',
31-
pkgx: 'Generate the pkgx configuration file',
31+
pantry: 'Generate the pantry configuration file',
3232
modelFiles: 'Generate the model files',
3333
openApi: 'Generate the OpenAPI specification',
3434
select: 'What are you trying to generate?',
@@ -44,7 +44,7 @@ export function generate(buddy: CLI): void {
4444
.option('-c, --custom-data', descriptions.customData)
4545
.option('-i, --ide-helpers', descriptions.ideHelpers)
4646
.option('-c, --component-meta', descriptions.componentMeta)
47-
.option('-p, --pkgx', descriptions.pkgx)
47+
.option('-p, --pantry', descriptions.pantry)
4848
.option('-m, --model-files', descriptions.modelFiles)
4949
.option('-o, --openapi', descriptions.openApi)
5050
.option('-p, --project [project]', descriptions.project, { default: false })
@@ -135,12 +135,12 @@ export function generate(buddy: CLI): void {
135135
})
136136

137137
buddy
138-
.command('generate:pkgx-config', descriptions.pkgx)
138+
.command('generate:pantry-config', descriptions.pantry)
139139
.option('-p, --project [project]', descriptions.project, { default: false })
140140
.option('--verbose', descriptions.verbose, { default: false })
141141
.action((options: GeneratorOptions) => {
142-
log.debug('Running `buddy generate:pkgx-config` ...', options)
143-
generatePkgxConfig()
142+
log.debug('Running `buddy generate:pantry-config` ...', options)
143+
generatePantryConfig()
144144
})
145145

146146
buddy

storage/framework/core/buddy/src/commands/setup.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export function setup(buddy: CLI): void {
2525
.action(async (options: CliOptions) => {
2626
log.debug('Running `buddy setup` ...', options)
2727

28-
if (!(await isPkgxInstalled()))
29-
await installPkgx()
28+
if (!(await isPantryInstalled()))
29+
await installPantry()
3030

31-
// ensure the minimal amount of deps are written to ./pkgx.yaml
32-
await optimizePkgxDeps()
31+
// ensure the minimal amount of deps are written to ./pantry.yaml
32+
await optimizePantryDeps()
3333

3434
// TODO: optimizeConfigDir()
3535
// TODO: optimizeAddDir()
@@ -57,17 +57,17 @@ export function setup(buddy: CLI): void {
5757
})
5858
}
5959

60-
async function isPkgxInstalled(): Promise<boolean> {
61-
const result = await runCommand('pkgx --version', { silent: true })
60+
async function isPantryInstalled(): Promise<boolean> {
61+
const result = await runCommand('pantry --version', { silent: true })
6262

6363
if (result.isOk())
6464
return true
6565

6666
return false
6767
}
6868

69-
async function installPkgx(): Promise<void> {
70-
const result = await runCommand(p.frameworkPath('scripts/pkgx-install'))
69+
async function installPantry(): Promise<void> {
70+
const result = await runCommand(p.frameworkPath('scripts/pantry-install'))
7171

7272
if (result.isOk())
7373
return
@@ -120,7 +120,7 @@ async function initializeProject(options: CliOptions): Promise<void> {
120120
log.info('Happy coding! 💙')
121121
}
122122

123-
export async function optimizePkgxDeps(): Promise<void> {
123+
export async function optimizePantryDeps(): Promise<void> {
124124
return new Promise(resolve => setTimeout(resolve, 300))
125125
}
126126

storage/framework/core/buddy/src/commands/upgrade.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function upgrade(buddy: CLI): void {
1010
const descriptions = {
1111
command: 'Upgrade dependencies, framework, package manager, JS/TS runtime',
1212
framework: 'Upgrade the Stacks framework',
13-
dependencies: 'Upgrade your dependencies (pkgx.yaml & package.json)',
13+
dependencies: 'Upgrade your dependencies (pantry.yaml & package.json)',
1414
bun: 'Upgrade Bun to the latest version',
1515
shell: 'Upgrade the to the latest shell integration (currently only supports Oh My Zsh)',
1616
binary:

storage/framework/core/enums/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export enum NpmScript {
4141
Preinstall = 'preinstall',
4242
Prepublish = 'prepublish',
4343
UpgradeBun = './storage/framework/scripts/setup.sh +bun.sh',
44-
UpgradeDependencies = 'pkgx --update && bun install',
44+
UpgradeDependencies = 'pantry --update && bun install',
4545
}
4646

4747
export enum Action {

storage/framework/core/types/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export type GeneratorOption =
267267
| 'componentMeta'
268268
| 'coreSymlink'
269269
| 'openApiSpec'
270-
| 'pkgxConfig'
270+
| 'pantryConfig'
271271
| 'openapi'
272272
| 'modelFiles'
273273
export type GeneratorOptions = {

storage/framework/core/ui/package.json

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
"engine",
2626
"styles",
2727
"stacks",
28+
"headwind",
29+
"tailwind",
2830
"unocss"
2931
],
3032
"sideEffects": false,
@@ -37,11 +39,6 @@
3739
"bun": "./src/components.ts",
3840
"types": "./dist/components.d.ts",
3941
"import": "./dist/components.js"
40-
},
41-
"./unocss": {
42-
"bun": "./src/unocss.ts",
43-
"types": "./dist/unocss.d.ts",
44-
"import": "./dist/unocss.js"
4542
}
4643
},
4744
"module": "dist/index.js",
@@ -57,26 +54,10 @@
5754
"prepublishOnly": "bun run build"
5855
},
5956
"devDependencies": {
60-
"@headlessui/vue": "^1.7.23",
61-
"@iconify-json/hugeicons": "^1.2.14",
62-
"@iconify/json": "^2.2.381",
63-
"@julr/unocss-preset-forms": "^2.0.0",
6457
"@stacksjs/build": "workspace:*",
6558
"@stacksjs/config": "workspace:*",
6659
"@stacksjs/development": "workspace:*",
67-
"@stacksjs/router": "workspace:*",
68-
"@unhead/vue": "^2.0.14",
69-
"bun-plugin-unocss": "^0.1.3",
70-
"chart.js": "^4.5.0",
71-
"pinia": "^3.0.3",
72-
"unhead": "^2.0.14",
73-
"unocss": "66.4.2",
74-
"unocss-preset-primitives": "0.0.2-beta.2",
75-
"vue": "^3.5.20",
76-
"vue-chartjs": "^5.3.2",
77-
"vue-tsc": "^3.0.6"
78-
},
79-
"overrides": {
80-
"vite": "npm:rolldown-vite@latest"
60+
"@stacksjs/headwind": "^0.1.3",
61+
"@stacksjs/router": "workspace:*"
8162
}
8263
}

0 commit comments

Comments
 (0)