Skip to content

Commit 6d02192

Browse files
committed
chore: wip
chore: wip chore: wip chore: wip chore: wip
1 parent f9b7297 commit 6d02192

File tree

138 files changed

+412
-1076
lines changed

Some content is hidden

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

138 files changed

+412
-1076
lines changed

.stacks/api/nitro.config.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

.stacks/api/routes/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

.stacks/core/actions/build.ts

Lines changed: 0 additions & 123 deletions
This file was deleted.

.stacks/core/actions/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@
222222
],
223223
"scripts": {
224224
"build": "bun build ./src/index.ts ./src/build/component-libs.ts ./src/build/core.ts ./src/build/stacks.ts ./src/dev/index.ts ./src/dev/components.ts ./src/dev/docs.ts ./src/generate/index.ts ./src/generate/component-meta.ts ./src/generate/ide-helpers.ts ./src/generate/lib-entries.ts ./src/generate/vscode-custom-data.ts ./src/generate/vue-compat.ts ./src/helpers/index.ts ./src/helpers/component-meta.ts ./src/helpers/lib-entries.ts ./src/helpers/package-json.ts ./src/helpers/utils.ts ./src/helpers/vscode-custom-data.ts ./src/helpers/vue-compat.ts ./src/lint/index.ts ./src/lint/fix.ts ./src/test/coverage.ts ./src/test/feature.ts ./src/test/ui.ts ./src/test/unit.ts ./src/upgrade/dependencies.ts ./src/upgrade/framework.ts ./src/upgrade/index.ts ./src/index.ts ./src/add.ts ./src/build.ts ./src/bump.ts ./src/changelog.ts ./src/clean.ts ./src/commit.ts ./src/copy-types.ts ./src/deploy/index.ts ./src/examples.ts ./src/fresh.ts ./src/key-generate.ts ./src/make.ts ./src/migrate.ts ./src/preinstall.ts ./src/prepublish.ts ./src/release.ts ./src/seed.ts ./src/test.ts ./src/tinker.ts ./src/typecheck.ts ./src/types.ts ./src/upgrade.ts --target node --external @stacksjs/path --external @stacksjs/cli --external @stacksjs/types --external @stacksjs/logging --external @stacksjs/storage --external @stacksjs/utils --external markdown-it --external vue-component-meta --external @stacksjs/strings --external @stacksjs/config --external @stacksjs/error-handling --external @stacksjs/security --outdir ./dist",
225-
"typecheck": "tsc --noEmit"
225+
"typecheck": "tsc --noEmit",
226+
"prepublishOnly": "bun run build"
226227
},
227228
"peerDependencies": {
228229
"@stacksjs/cli": "link:@stacksjs/cli",

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as storage from '@stacksjs/storage'
22
import { italic, runCommand, runCommands } from '@stacksjs/cli'
33
import { log } from '@stacksjs/logging'
44
import { actionsPath, functionsPath } from '@stacksjs/path'
5-
import type { ActionOptions, CommandResult } from '@stacksjs/types'
5+
import type { ActionOptions } from '@stacksjs/types'
66
import { err } from '@stacksjs/error-handling'
77

88
function parseOptions(options?: ActionOptions) {
@@ -23,7 +23,7 @@ function parseOptions(options?: ActionOptions) {
2323
return parsedOptions.filter(Boolean).join(' ').replace('----=', '')
2424
}
2525

26-
export type ActionResult = CommandResult
26+
// export type ActionResult = CommandResult
2727

2828
/**
2929
* Run an Action the Stacks way.
@@ -32,7 +32,7 @@ export type ActionResult = CommandResult
3232
* @param options The options to pass to the command.
3333
* @returns The result of the command.
3434
*/
35-
export async function runAction(action: string, options?: ActionOptions): Promise<CommandResult> {
35+
export async function runAction(action: string, options?: ActionOptions): Promise<any> {
3636
if (!hasAction(action))
3737
return err(`The specified action "${action}" does not exist`)
3838

@@ -44,7 +44,7 @@ export async function runAction(action: string, options?: ActionOptions): Promis
4444
log.debug('running command:', italic(cmd))
4545

4646
return options?.showSpinner
47-
? await runCommands([cmd], options) as CommandResult
47+
? await runCommands([cmd], options)
4848
: await runCommand(cmd, options)
4949
}
5050

@@ -55,7 +55,8 @@ export async function runAction(action: string, options?: ActionOptions): Promis
5555
* @param options The options to pass to the command.
5656
* @returns The result of the command.
5757
*/
58-
export async function runActions(actions: string[], options?: ActionOptions): Promise<CommandResult | CommandResult[]> {
58+
// export async function runActions(actions: string[], options?: ActionOptions): Promise<CommandResult | CommandResult[]> {
59+
export async function runActions(actions: string[], options?: ActionOptions) {
5960
if (!actions.length)
6061
return err('No actions were specified')
6162

.stacks/core/actions/src/make.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { italic, spawn } from '@stacksjs/cli'
1+
import { italic } from '@stacksjs/cli'
22
import { log } from '@stacksjs/logging'
33
import { createFolder, doesFolderExist, writeTextFile } from '@stacksjs/storage'
44
import { frameworkPath, projectPath, resolve } from '@stacksjs/path'
@@ -216,7 +216,7 @@ export async function stack(options: MakeOptions) {
216216
log.info(`Creating your ${name} stack...`)
217217
const path = resolve(process.cwd(), name)
218218

219-
await spawn(`giget stacks ${path}`)
219+
// await spawn(`giget stacks ${path}`)
220220
log.success('Successfully scaffolded your project')
221221
log.info(`cd ${path} && pnpm install`)
222222
}

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

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
import { intro, outro, runCommand, spawn } from '@stacksjs/cli'
1+
import { intro, outro, runCommand } from '@stacksjs/cli'
22
import { log } from '@stacksjs/logging'
33
import * as storage from '@stacksjs/storage'
4-
import { determineDebugLevel } from '@stacksjs/utils'
54
import { projectPath } from '@stacksjs/path'
65
import type { UpgradeOptions } from '@stacksjs/types'
7-
import { ExitCode, NpmScript } from '@stacksjs/types'
6+
import { NpmScript } from '@stacksjs/types'
87

9-
export async function checkForUncommittedChanges(path = './.stacks', options: UpgradeOptions) {
8+
// import { determineDebugLevel } from '@stacksjs/utils'
9+
10+
// export async function checkForUncommittedChanges(path = './.stacks', options: UpgradeOptions) {
11+
export async function checkForUncommittedChanges(options: UpgradeOptions) {
1012
try {
11-
const stdio = determineDebugLevel(options) ? 'inherit' : 'ignore'
13+
// const stdio = determineDebugLevel(options) ? 'inherit' : 'ignore'
1214

1315
// check if the .stacks folder has any updates
1416
// https://carlosbecker.com/posts/git-changed/
15-
await spawn(`git diff --quiet HEAD -- ${path}`, { stdio, cwd: projectPath() })
17+
// await spawn(`git diff --quiet HEAD -- ${path}`, { stdio, cwd: projectPath() })
1618
}
1719
catch (error: any) {
1820
if (error.status === 1) {
@@ -21,15 +23,15 @@ export async function checkForUncommittedChanges(path = './.stacks', options: Up
2123
// the user knows what they are doing. There is also a change that simply the deps within .stacks
2224
// folder have been updated and that could produce a diff.
2325
if (!options?.force) {
24-
const confirmed = await log.prompt('We detected there are uncommitted in the ./stacks folder. Do you want to overwrite those?', {
25-
type: 'confirm',
26-
})
27-
28-
if (!confirmed) {
29-
log.info('Aborted. Stacks did not update itself.')
30-
log.info('Note: if you commit your changes and replay the update, you can see what changed.')
31-
process.exit(ExitCode.Success)
32-
}
26+
// const confirmed = await log.prompt('We detected there are uncommitted in the ./stacks folder. Do you want to overwrite those?', {
27+
// type: 'confirm',
28+
// })
29+
30+
// if (!confirmed) {
31+
// log.info('Aborted. Stacks did not update itself.')
32+
// log.info('Note: if you commit your changes and replay the update, you can see what changed.')
33+
// process.exit(ExitCode.Success)
34+
// }
3335
}
3436
}
3537
}

.stacks/core/ai/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
],
4141
"scripts": {
4242
"build": "bun build ./src/index.ts --outdir dist --format esm",
43-
"typecheck": "tsc --noEmit"
43+
"typecheck": "tsc --noEmit",
44+
"prepublishOnly": "bun run build"
4445
},
4546
"devDependencies": {
4647
"@stacksjs/development": "link:@stacksjs/development"

.stacks/core/alias/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
],
3838
"scripts": {
3939
"build": "bun build ./src/index.ts --external @stacksjs/path --outdir dist --format esm",
40-
"typecheck": "tsc --noEmit"
40+
"typecheck": "tsc --noEmit",
41+
"prepublishOnly": "bun run build"
4142
},
4243
"peerDependencies": {
4344
"@stacksjs/path": "link:@stacksjs/path"

.stacks/core/analytics/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
],
4747
"scripts": {
4848
"build": "bun build ./src/index.ts --outdir dist --format esm",
49-
"typecheck": "tsc --noEmit"
49+
"typecheck": "tsc --noEmit",
50+
"prepublishOnly": "bun run build"
5051
},
5152
"devDependencies": {
5253
"@stacksjs/development": "link:@stacksjs/development"

0 commit comments

Comments
 (0)