Skip to content

Commit f917e31

Browse files
committed
chore: wip
1 parent 202941f commit f917e31

Some content is hidden

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

56 files changed

+53
-66
lines changed

.idea/stacks.iml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.stacks/core/actions/src/helpers/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import storage from '@stacksjs/storage'
1+
import { storage } from '@stacksjs/storage'
22
import { italic, log, runCommand, runCommands } from '@stacksjs/cli'
33
import { actionsPath, functionsPath } from '@stacksjs/path'
44
import type { ActionOptions, CommandResult } from '@stacksjs/types'

.stacks/core/actions/src/upgrade.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { intro, log, outro, prompt, runCommand, spawn } from '@stacksjs/cli'
2-
import storage from '@stacksjs/storage'
2+
import { storage } from '@stacksjs/storage'
33
import { determineDebugLevel } from '@stacksjs/utils'
44
import { projectPath } from '@stacksjs/path'
55
import type { UpgradeOptions } from '@stacksjs/types'

.stacks/core/actions/src/upgrade/framework.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// import { log, outro } from '@stacksjs/cli'
2-
// import storage from '@stacksjs/storage'
2+
// import { storage } from '@stacksjs/storage'
33
// import { determineDebugLevel, loop } from '@stacksjs/utils'
44
// import { frameworkPath, projectPath } from '@stacksjs/path'
55
//

.stacks/core/buddy/src/commands/onboarding.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { CLI } from '@stacksjs/types'
22

3-
async function onboarding(buddy: CLI) {
3+
export async function onboarding(buddy: CLI) {
44
// const descriptions = {
55
// command: 'Generate Onboarding Pages',
66
// verbose: 'Enable verbose output',
@@ -20,5 +20,3 @@ async function onboarding(buddy: CLI) {
2020
// outro('Pages generated successfully', { startTime })
2121
// })
2222
}
23-
24-
export { onboarding }

.stacks/core/buddy/src/commands/version.ts

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
import type { CLI } from '@stacksjs/types'
22
import { bold, dim, green, intro } from '@stacksjs/cli'
3-
import { filesystem } from '@stacksjs/storage'
43
import { log } from '@stacksjs/logging'
5-
import { frameworkPath } from '@stacksjs/path'
4+
import { storage } from '@stacksjs/storage'
65

76
async function version(buddy: CLI) {
8-
// maybe use type-fest?
9-
interface PackageJson {
10-
engines: {
11-
node: string
12-
pnpm: string
13-
}
14-
version: string
15-
}
16-
17-
const { fs } = filesystem
18-
197
const descriptions = {
208
version: 'Retrieving Stacks build version',
219
}
@@ -25,15 +13,15 @@ async function version(buddy: CLI) {
2513
.action(async () => {
2614
await intro('buddy version')
2715

28-
const depVersions = JSON.parse(fs.readFileSync('./package.json', 'utf8')) as PackageJson
29-
const nodeVersion = depVersions.engines.node.replace('>=v', '')
30-
const pnpmVersion = depVersions.engines.pnpm.replace('>=', '')
31-
const stacksVersion = JSON.parse(fs.readFileSync(frameworkPath('/package.json'), 'utf8')) as PackageJson
16+
const pkg = await storage.readPackageJson('./package.json')
17+
const nodeVersion = pkg.engines.node.replace('>=v', '')
18+
const pnpmVersion = pkg.engines.pnpm.replace('>=', '')
19+
const stacksVersion = pkg.version
3220

33-
log.info(green(bold('Stacks: ')) + dim(` ${stacksVersion.version}`))
21+
log.info(green(bold('Stacks: ')) + dim(` ${stacksVersion}`))
3422
log.info(green(bold('node: ')) + dim(` ${nodeVersion}`))
3523
log.info(green(bold('pnpm: ')) + dim(` ${pnpmVersion}`))
36-
// redis (or other cache/s), mysql (or other database/s),
24+
// redis (or other cache/s), mysql (or other database/s),
3725
})
3826
}
3927

.stacks/core/buddy/src/index.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1 @@
11
export * from './commands'
2-
export * from '@stacksjs/alias'
3-
// export * from '@stacksjs/ai'
4-
export * from '@stacksjs/arrays'
5-
export * from '@stacksjs/build'
6-
export * from '@stacksjs/cli'
7-
export * from '@stacksjs/cloud'
8-
export * from '@stacksjs/collections'
9-
export * from '@stacksjs/config'
10-
export * from '@stacksjs/faker'
11-
// export * from '@stacksjs/events'
12-
// export * from '@stacksjs/desktop'
13-
// export * from '@stacksjs/notifications'
14-
export * from '@stacksjs/storage'
15-
export * from '@stacksjs/router'
16-
export * from '@stacksjs/server'
17-
export * from '@stacksjs/strings'
18-
export * from '@stacksjs/types'
19-
export * from '@stacksjs/objects'
20-
export * from '@stacksjs/path'
21-
export * from '@stacksjs/ui'
22-
// export * from '@stacksjs/utils'

.stacks/core/database/src/factory/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { filesystem } from '@stacksjs/storage'
1+
import { storage } from '@stacksjs/storage'
22

3-
const { fs } = filesystem
3+
const { fs } = storage
44

55
function generateFactoryFile(modelName: string, fileName: string, path: string): void {
66
const generateMethodName = 'generate'

.stacks/core/database/src/migrations/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// import { filesystem } from '@stacksjs/storage'
1+
// import { storage } from '@stacksjs/storage'
22
// import { frameworkPath, projectPath } from '@stacksjs/path'
33
// import type { Model, SchemaOptions } from '@stacksjs/types'
44
// import { titleCase } from '@stacksjs/strings'
55

6-
// const { fs } = filesystem
6+
// const { fs } = storage
77

88
// function generatePrismaSchema(models: Model[], path: string, options: SchemaOptions): void {
99
// let schema = `datasource db {

.stacks/core/email/src/actions/send.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { italic } from '@stacksjs/cli'
33
import { log } from '@stacksjs/logging'
44
import { ResultAsync } from '@stacksjs/error-handling'
55

6-
// @ts-expect-error
6+
// @ts-expect-error check if types are available
77
import * as Maizzle from '@maizzle/framework'
88
import * as maizzleConfig from '../utils/config'
99
import { config } from '../tailwind.config'

0 commit comments

Comments
 (0)