Skip to content

Commit

Permalink
chore: release v0.66.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Oct 14, 2024
1 parent 2df8424 commit 753b7e3
Show file tree
Hide file tree
Showing 106 changed files with 176 additions and 160 deletions.
2 changes: 1 addition & 1 deletion storage/framework/api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stacks-api",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"scripts": {
"build": "bun build.ts",
"dev": "bun --hot run dev.ts",
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/cloud/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stacks-cloud",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "The Stacks cloud/serverless integration & implementation.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/actions",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "The Stacks actions.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
12 changes: 8 additions & 4 deletions storage/framework/core/actions/src/helpers/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Action as ActionType } from '@stacksjs/actions'
import type { Err, Ok, Result } from '@stacksjs/error-handling'
import type { ActionOptions, CommandError, Readable, Subprocess, Writable } from '@stacksjs/types'
import type { ActionOptions, CliOptions, CommandError, Readable, Subprocess, Writable } from '@stacksjs/types'
import process from 'node:process'
import { buddyOptions, runCommand, runCommands } from '@stacksjs/cli'
import { err } from '@stacksjs/error-handling'
Expand All @@ -20,6 +20,8 @@ type Action = ActionPath | ActionName | string
* @returns The result of the command.
*/
export async function runAction(action: Action, options?: ActionOptions): Promise<Result<Subprocess, CommandError>> {
log.debug('runAction:', action, options)

// check if action is a file anywhere in ./app/Actions/**/*.ts
// if it is, return and await the action
const glob = new Bun.Glob('**/*.{ts,js}')
Expand Down Expand Up @@ -50,13 +52,15 @@ export async function runAction(action: Action, options?: ActionOptions): Promis
const opts = buddyOptions()
const path = p.relativeActionsPath(`src/${action}.ts`)
const cmd = `bun ${path} ${opts}`.trimEnd()
const optionsWithCwd = {

const optionsWithCwd: CliOptions = {
cwd: options?.cwd || p.projectPath(),
stdio: [options?.stdin ?? 'inherit', 'pipe', 'pipe'],
...options,
}

log.debug('runAction:', cmd)
log.debug('action options:', optionsWithCwd)
log.debug('action cmd:', cmd)
log.debug('optionsWithCwd:', optionsWithCwd)

return await runCommand(cmd, optionsWithCwd)
}
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/ai/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/ai",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Stacks Artificial Intelligence.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/alias/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/alias",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "The Stacks aliases.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/analytics",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Stacks Analytics. Privacy-friendly.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/api",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "The Stacks array utilities.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/arrays/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/arrays",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "The Stacks array utilities.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/auth",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "A more simplistic way to authenticate.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/browser/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const result = await Bun.build({
format: 'esm',
target: 'browser',
sourcemap: 'linked',
external: ['@stacksjs/path'],
external: ['@stacksjs/path', '@stacksjs/error-handling'],
minify: true,
plugins: [dts({ root: './src', outdir: './dist' })],
})
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/browser",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Stacks core frontend/browser functionalities.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/buddy/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/buddy",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Meet Buddy. The Stacks runtime.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
1 change: 1 addition & 0 deletions storage/framework/core/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { path as p } from '@stacksjs/path'
import { exists, glob } from '@stacksjs/storage'

// import { $ } from 'bun'
console.log('Building in here...')

const dirs = await glob([p.resolve('./', '*')], { onlyDirectories: true, absolute: true })
dirs.sort((a, b) => a.localeCompare(b))
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/build/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/build",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "The Stacks framework build tools and configurations.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/bun-create/bud/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bun-examples/bud",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Your project description.",
"author": "your-name <your-email>",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/bun-create/buddy/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bun-examples/buddy",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Your project description.",
"author": "your-name <your-email>",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/bun-create/stack/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bun-examples/stack",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Your project description.",
"author": "your-name <your-email>",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/bun-create/stacks/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bun-examples/stacks",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Your project description.",
"author": "your-name <your-email>",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/bun-create/stx/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bun-examples/stx",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Your project description.",
"author": "your-name <your-email>",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/cache/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/cache",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Caching the Stacks way.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/calendar/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/calendar-api",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Easily interact with calendar APIs.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/chat/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/chat",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Easily interact with chat APIs.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/cli",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "TypeScript framework for CLI artisans. Build beautiful console apps with ease.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
14 changes: 6 additions & 8 deletions storage/framework/core/cli/src/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@ export async function exec(command: string | string[], options?: CliOptions): Pr
if (!cmd)
return err(handleError(`Failed to parse command: ${cmd}`, options))

let stdio: [SpawnOptions.Writable, SpawnOptions.Readable, SpawnOptions.Readable] | undefined = options?.stdio

if (!stdio)
stdio = (options?.silent || options?.quiet) ? ['ignore', 'pipe', 'pipe'] : [options?.stdin ?? 'inherit', 'pipe', 'pipe']

const cwd = options?.cwd ?? process.cwd()

const proc = Bun.spawn(cmd, {
...options,
stdio,
detached: options?.background || false,
// ...options,
stdin: options?.stdin ?? 'inherit',
stdout: (options?.silent || options?.quiet) ? 'ignore' : options?.stdin ? options.stdin : (options?.stdout || 'inherit'),
stderr: (options?.silent || options?.quiet) ? 'ignore' : (options?.stderr || 'inherit'),

// detached: options?.background || false,
cwd,
// env: { ...e, ...options?.env },
onExit(
Expand Down
24 changes: 21 additions & 3 deletions storage/framework/core/cli/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,25 @@ import { exec, execSync } from './exec'
export async function runCommand(command: string, options?: CliOptions): Promise<Result<Subprocess, CommandError>> {
log.debug('runCommand:', command, options)

return await exec(command, options)
const opts: CliOptions = {
...options,
stdio: [options?.stdin ?? 'inherit', 'pipe', 'pipe'],
verbose: options?.verbose ?? false,
}

return await exec(command, opts)
}

export async function runProcess(command: string, options?: CliOptions): Promise<Result<Subprocess, CommandError>> {
log.debug('runProcess:', command, options)

return await exec(command, options)
const opts: CliOptions = {
...options,
stdio: [options?.stdin ?? 'inherit', 'pipe', 'pipe'],
verbose: options?.verbose ?? false,
}

return await exec(command, opts)
}

/**
Expand Down Expand Up @@ -71,7 +83,13 @@ export async function runProcess(command: string, options?: CliOptions): Promise
export async function runCommandSync(command: string, options?: CliOptions): Promise<string> {
log.debug('runCommandSync:', command, options)

return await execSync(command, options)
const opts: CliOptions = {
...options,
stdio: [options?.stdin ?? 'inherit', 'pipe', 'pipe'],
verbose: options?.verbose ?? false,
}

return await execSync(command, opts)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/cli/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export {
yellow,
} from 'kolorist'

export const quotes: Collection<string> = collect([
export const quotes: Collection<string[]> = collect([
// could be queried from any API or database
'The best way to get started is to quit talking and begin doing.',
'The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.',
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/cloud/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/cloud",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "The Stacks cloud/serverless integration & implementation.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stacks-router-layer",
"version": "0.65.1",
"version": "0.66.0",
"description": "",
"author": "",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/collections/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/collections",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "The Stacks collections.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/components/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/auths",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "An opinionated notification component for Stacks.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/components/calendar/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/calendar",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "Calendar components for all.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/command-palette",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"private": true,
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/components/dropdown/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stacksjs/dropdown",
"type": "module",
"version": "0.65.1",
"version": "0.66.0",
"description": "A dropdown component for all.",
"author": "Chris Breuer",
"contributors": ["Chris Breuer <[email protected]>"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<script lang="ts" setup>
import type { PropType } from 'vue'
import type { Position } from '../types'
// import type { Position } from '../types'
import { computed, ref } from 'vue'
import { notification } from '../'
import { useCopyCode } from '../composables/useCopyCode'
import CheckIcon from './icons/CheckIcon.vue'
import CopyIcon from './icons/CopyIcon.vue'
export type Position = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'
const props = defineProps({
position: String as PropType<Position>,
})
Expand Down
Loading

0 comments on commit 753b7e3

Please sign in to comment.