stacks 0.58.28 → 0.58.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/README.md +1 -1
- package/core/actions/dist/src/deploy/index.js +1 -1
- package/core/actions/dist/src/dev/components.js +1 -1
- package/core/actions/dist/src/dev/index.js +10 -0
- package/core/actions/dist/src/generate/lib-entries.js +3 -3
- package/core/actions/dist/src/helpers/lib-entries.js +3 -3
- package/core/actions/dist/src/index.js +10 -0
- package/core/actions/dist/src/lint/fix.js +1 -1
- package/core/actions/dist/src/release.js +8 -0
- package/core/actions/dist/src/upgrade.js +1 -1
- package/core/actions/package.json +1 -1
- package/core/actions/src/build/docs.ts +7 -0
- package/core/actions/src/deploy/index.ts +1 -1
- package/core/actions/src/dev/api.ts +2 -2
- package/core/actions/src/dev/components.ts +1 -1
- package/core/actions/src/dev/dashboard.ts +7 -0
- package/core/actions/src/dev/desktop.ts +3 -3
- package/core/actions/src/dev/index.ts +10 -0
- package/core/actions/src/dev/system-tray.ts +6 -0
- package/core/actions/src/helpers/lib-entries.ts +3 -3
- package/core/actions/src/lint/fix.ts +1 -1
- package/core/ai/package.json +3 -3
- package/core/alias/package.json +1 -1
- package/core/analytics/package.json +1 -1
- package/core/api/package.json +1 -1
- package/core/arrays/package.json +1 -1
- package/core/auth/package.json +1 -1
- package/core/buddy/README.md +2 -2
- package/core/buddy/dist/{chunk-b75e6db0012faa55.js → chunk-0455e53fab4244b1.js} +1 -4
- package/core/buddy/dist/{chunk-fd47b42fb923a4be.js → chunk-61e8f138963fc709.js} +173 -137
- package/core/buddy/dist/cli.js +2 -2
- package/core/buddy/dist/index.js +2 -2
- package/core/buddy/package.json +1 -1
- package/core/buddy/src/commands/add.ts +4 -0
- package/core/buddy/src/commands/build.ts +12 -1
- package/core/buddy/src/commands/changelog.ts +2 -0
- package/core/buddy/src/commands/clean.ts +2 -0
- package/core/buddy/src/commands/cloud.ts +6 -0
- package/core/buddy/src/commands/commit.ts +2 -0
- package/core/buddy/src/commands/configure.ts +3 -0
- package/core/buddy/src/commands/create.ts +8 -8
- package/core/buddy/src/commands/deploy.ts +24 -23
- package/core/buddy/src/commands/dev.ts +50 -10
- package/core/buddy/src/commands/dns.ts +2 -0
- package/core/buddy/src/commands/domains.ts +2 -0
- package/core/buddy/src/commands/example.ts +4 -0
- package/core/buddy/src/commands/fresh.ts +2 -0
- package/core/buddy/src/commands/generate.ts +12 -3
- package/core/buddy/src/commands/http.ts +2 -0
- package/core/buddy/src/commands/install.ts +2 -0
- package/core/buddy/src/commands/key.ts +4 -2
- package/core/buddy/src/commands/lint.ts +3 -0
- package/core/buddy/src/commands/make.ts +11 -1
- package/core/buddy/src/commands/migrate.ts +3 -0
- package/core/buddy/src/commands/prepublish.ts +2 -0
- package/core/buddy/src/commands/release.ts +2 -0
- package/core/buddy/src/commands/seed.ts +2 -0
- package/core/buddy/src/commands/setup.ts +33 -34
- package/core/buddy/src/commands/test.ts +2 -0
- package/core/buddy/src/commands/tinker.ts +2 -0
- package/core/buddy/src/commands/types.ts +3 -0
- package/core/buddy/src/commands/upgrade.ts +6 -0
- package/core/build/package.json +1 -1
- package/core/bun-create/bud/package.json +3 -2
- package/core/bun-create/buddy/package.json +2 -2
- package/core/bun-create/stack/package.json +2 -2
- package/core/bun-create/stacks/package.json +2 -2
- package/core/bun-create/stx/package.json +2 -2
- package/core/bun-plugin-yaml/dist/index.js +1 -19
- package/core/bun-plugin-yaml/package.json +1 -1
- package/core/bun-plugin-yaml/src/index.ts +1 -1
- package/core/cache/package.json +2 -2
- package/core/chat/package.json +1 -1
- package/core/cli/dist/index.js +24 -23
- package/core/cli/package.json +1 -1
- package/core/cli/src/helpers.ts +21 -31
- package/core/cli/src/run.ts +9 -7
- package/core/cloud/buddy +2 -0
- package/core/cloud/package.json +33 -33
- package/core/cloud/src/cloud/ai.ts +45 -36
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package-lock.json +10 -10
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +2 -2
- package/core/cloud/src/cloud/cdn.ts +44 -5
- package/core/cloud/src/cloud/cli.ts +45 -0
- package/core/cloud/src/cloud/compute.ts +1 -1
- package/core/cloud/src/cloud/index.ts +6 -1
- package/core/cloud/src/cloud/lambda/cli-setup/index.js +67 -0
- package/core/cloud/src/index.ts +1 -0
- package/core/cloud/src/runtime/example/lambda.ts +1 -1
- package/core/cloud/src/runtime/runtime.ts +1 -0
- package/core/cloud/src/runtime/server.ts +1 -1
- package/core/collections/package.json +1 -1
- package/core/config/dist/index.js +130 -122
- package/core/config/package.json +1 -1
- package/core/config/src/overrides.ts +0 -2
- package/core/database/package.json +2 -2
- package/core/database/src/kysely-bun-worker/driver.ts +1 -0
- package/core/database/src/kysely-bun-worker/worker.ts +1 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/dist/index.js +6 -0
- package/core/desktop/package.json +5 -5
- package/core/desktop/src/index.ts +2 -0
- package/core/desktop/src/system-tray.ts +1 -0
- package/core/development/package.json +1 -1
- package/core/dns/package.json +7 -7
- package/core/docs/build.ts +1 -1
- package/core/docs/dist/index.js +29878 -9995
- package/core/docs/package.json +6 -5
- package/core/docs/src/index.ts +7 -1
- package/core/docs/src/meta.ts +32 -0
- package/core/docs/src/scripts/pwa.ts +116 -0
- package/core/email/email-forwarder.cjs +1 -0
- package/core/email/package.json +3 -3
- package/core/email/src/server/converter.ts +1 -0
- package/core/email/src/server/inbound.ts +1 -0
- package/core/email/src/server/outbound.ts +6 -4
- package/core/enums/dist/index.js +4 -2
- package/core/enums/package.json +1 -1
- package/core/enums/src/index.ts +4 -2
- package/core/env/package.json +1 -1
- package/core/error-handling/package.json +1 -1
- package/core/eslint-config/package.json +18 -18
- package/core/eslint-config/src/configs/comments.ts +1 -1
- package/core/eslint-config/src/configs/imports.ts +9 -0
- package/core/eslint-config/src/configs/svelte.ts +1 -0
- package/core/eslint-config/src/configs/unicorn.ts +1 -1
- package/core/eslint-config/src/configs/vue.ts +0 -1
- package/core/eslint-config/src/factory.ts +2 -8
- package/core/events/package.json +1 -1
- package/core/faker/package.json +2 -2
- package/core/git/dist/index.js +40 -0
- package/core/git/package.json +3 -3
- package/core/git/src/index.ts +62 -0
- package/core/health/package.json +1 -1
- package/core/http/package.json +1 -1
- package/core/lint/package.json +1 -1
- package/core/logging/dist/index.js +0 -6
- package/core/logging/package.json +1 -1
- package/core/music/package.json +3 -3
- package/core/notifications/package.json +2 -2
- package/core/objects/package.json +1 -1
- package/core/orm/package.json +1 -1
- package/core/path/dist/index.js +6 -3
- package/core/path/package.json +1 -1
- package/core/path/src/index.ts +7 -3
- package/core/payments/dist/index.js +2 -5
- package/core/payments/package.json +3 -3
- package/core/push/package.json +1 -1
- package/core/query-builder/package.json +1 -1
- package/core/queue/package.json +1 -1
- package/core/raycast/package.json +5 -0
- package/core/raycast/src/index.ts +0 -0
- package/core/realtime/package.json +1 -1
- package/core/repl/package.json +1 -1
- package/core/router/dist/index.js +16 -496
- package/core/router/package.json +1 -1
- package/core/router/src/middleware.ts +16 -14
- package/core/scheduler/package.json +1 -1
- package/core/search-engine/package.json +2 -2
- package/core/security/dist/index.js +3 -6
- package/core/security/package.json +2 -2
- package/core/server/dist/index.js +6 -2
- package/core/server/package.json +2 -2
- package/core/server/src/config.ts +14 -9
- package/core/signals/package.json +1 -1
- package/core/slug/package.json +1 -1
- package/core/sms/package.json +1 -1
- package/core/storage/dist/index.js +28 -10
- package/core/storage/package.json +1 -1
- package/core/storage/src/files.ts +10 -2
- package/core/storage/src/zip.ts +1 -1
- package/core/strings/package.json +3 -3
- package/core/stx +2 -0
- package/core/tables/package.json +3 -3
- package/core/testing/package.json +3 -3
- package/core/tinker/package.json +1 -1
- package/core/tsconfig.json +4 -9
- package/core/tunnel/package.json +1 -1
- package/core/types/dist/index.js +3 -1
- package/core/types/package.json +13 -13
- package/core/types/src/cli.ts +3 -3
- package/core/types/src/cloud.ts +4 -1
- package/core/types/src/dns.ts +1 -1
- package/core/types/src/native.ts +0 -0
- package/core/types/src/stacks.ts +0 -10
- package/core/ui/package.json +8 -8
- package/core/utils/dist/index.js +1 -1
- package/core/utils/package.json +1 -1
- package/core/validation/package.json +1 -1
- package/core/vite/README.md +1 -1
- package/core/vite/build.ts +1 -1
- package/core/vite/dist/index.js +211 -203
- package/core/vite/package.json +5 -5
- package/core/vite/src/components.ts +1 -1
- package/core/vite/src/dashboard.ts +100 -0
- package/core/vite/src/desktop.ts +2 -58
- package/core/vite/src/example-vue.ts +1 -1
- package/core/vite/src/example-wc.ts +1 -1
- package/core/vite/src/functions.ts +1 -1
- package/core/vite/src/index.ts +9 -11
- package/core/vite/src/plugin/auto-imports.ts +1 -1
- package/core/vite/src/plugin/layouts.ts +6 -7
- package/core/vite/src/plugin/router.ts +3 -1
- package/core/vite/src/system-tray.ts +100 -0
- package/core/vite/src/views.ts +13 -2
- package/core/vite/src/web-components.ts +1 -1
- package/core/whois/dist/index.js +1 -2
- package/core/whois/package.json +1 -1
- package/core/whois/src/index.ts +10 -8
- package/core/x-ray/package.json +1 -1
- package/core/zsh-buddy/README.md +51 -0
- package/core/zsh-buddy/package.json +29 -0
- package/ide/dictionary.txt +12 -0
- package/ide/jetbrains/.idea/stacks.iml +0 -1
- package/ide/vscode/.vscode/settings.json +7 -2
- package/ide/vscode/package.json +2 -4
- package/package.json +12 -7
- package/core/cloud/src/server/.dockerignore +0 -15
- package/core/cloud/src/server/Dockerfile +0 -21
- package/core/cloud/src/server/index.ts +0 -3
- package/core/cloud/src/server/package.json +0 -12
- package/core/cloud/src/server/runtime.ts +0 -828
- package/core/scripts/build +0 -58
- package/core/scripts/ensure +0 -33
- package/core/scripts/fresh +0 -14
- package/core/scripts/link +0 -14
- package/core/scripts/move-built-src-files.ts +0 -28
- package/core/scripts/move-dts-files.ts +0 -35
- package/core/scripts/publish +0 -43
- package/core/scripts/setup +0 -176
- package/core/tables/vite.config.ts +0 -84
- package/core/vite/src/plugin/index.ts +0 -21
- /package/core/vite/src/{stacks.ts → plugins.ts} +0 -0
package/core/scripts/build
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
# Get the script's directory
|
|
4
|
-
script_dir=$(realpath $(dirname "$0"))
|
|
5
|
-
|
|
6
|
-
# Get all directories in the core path
|
|
7
|
-
dirs=$(find "$script_dir/../" -type d -maxdepth 1)
|
|
8
|
-
|
|
9
|
-
# Check if no directories found
|
|
10
|
-
if [ -z "$dirs" ]; then
|
|
11
|
-
echo "No core packages found"
|
|
12
|
-
exit 1
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
# Loop through each directory
|
|
16
|
-
for dir in $dirs; do
|
|
17
|
-
# Skip the ../scripts directory
|
|
18
|
-
if [ "$dir" = "$script_dir/../scripts" ]; then
|
|
19
|
-
continue
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
echo ""
|
|
23
|
-
echo "🏗️ Building..."
|
|
24
|
-
echo "📦 $dir"
|
|
25
|
-
|
|
26
|
-
# Change to the directory
|
|
27
|
-
cd $dir
|
|
28
|
-
|
|
29
|
-
# Check if the directory is one of the specified ones
|
|
30
|
-
case "$dir" in
|
|
31
|
-
## This is because eslint requires cjs builds which we use tsup for
|
|
32
|
-
*"/eslint-config")
|
|
33
|
-
# build the package
|
|
34
|
-
bun run build
|
|
35
|
-
;;
|
|
36
|
-
*)
|
|
37
|
-
# Check if build.ts exists in the directory
|
|
38
|
-
if [ -f "build.ts" ]; then
|
|
39
|
-
# Extract the command from build.ts
|
|
40
|
-
cmd=$(sed -nE "s/.*runCommand\('(.*)',.*/\1/p" build.ts)
|
|
41
|
-
# Run the extracted command
|
|
42
|
-
eval $cmd
|
|
43
|
-
fi
|
|
44
|
-
;;
|
|
45
|
-
esac
|
|
46
|
-
|
|
47
|
-
# Check if the build command was successful
|
|
48
|
-
if [ $? -ne 0 ]; then
|
|
49
|
-
echo "Failed to build $dir"
|
|
50
|
-
exit 1
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
|
-
echo "✅ Build complete"
|
|
54
|
-
echo ""
|
|
55
|
-
|
|
56
|
-
# Change back to the original directory
|
|
57
|
-
cd - >/dev/null
|
|
58
|
-
done
|
package/core/scripts/ensure
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
## This script ensures that Bun is installed.
|
|
4
|
-
|
|
5
|
-
REQUIRED_BUN_VERSION=$(awk '/bun.sh/{print substr($2, 2)}' ../../pkgx.yaml | tr -d "'")
|
|
6
|
-
|
|
7
|
-
# Remove the '>=v' prefix from the version string
|
|
8
|
-
REQUIRED_BUN_VERSION=${REQUIRED_BUN_VERSION#>=v}
|
|
9
|
-
|
|
10
|
-
REQUIRED_BUN_MAJOR=$(echo "$REQUIRED_BUN_VERSION" | cut -d. -f1)
|
|
11
|
-
REQUIRED_BUN_MINOR=$(echo "$REQUIRED_BUN_VERSION" | cut -d. -f2)
|
|
12
|
-
REQUIRED_BUN_PATCH=$(echo "$REQUIRED_BUN_VERSION" | cut -d. -f3)
|
|
13
|
-
|
|
14
|
-
INSTALLED_BUN_VERSION=$(node -v 2>/dev/null || echo "")
|
|
15
|
-
INSTALLED_BUN_VERSION=${INSTALLED_BUN_VERSION#v} # removes the 'v' prefix
|
|
16
|
-
INSTALLED_BUN_MAJOR=$(echo "$INSTALLED_BUN_VERSION" | cut -d. -f1)
|
|
17
|
-
INSTALLED_BUN_MINOR=$(echo "$INSTALLED_BUN_VERSION" | cut -d. -f2)
|
|
18
|
-
INSTALLED_BUN_PATCH=$(echo "$INSTALLED_BUN_VERSION" | cut -d. -f3)
|
|
19
|
-
|
|
20
|
-
if [[ "$INSTALLED_BUN_MAJOR" -lt "$REQUIRED_BUN_MAJOR" ||
|
|
21
|
-
("$INSTALLED_BUN_MAJOR" -eq "$REQUIRED_BUN_MAJOR" && "$INSTALLED_BUN_MINOR" -lt "$REQUIRED_BUN_MINOR") ||
|
|
22
|
-
("$INSTALLED_BUN_MAJOR" -eq "$REQUIRED_BUN_MAJOR" && "$INSTALLED_BUN_MINOR" -eq "$REQUIRED_BUN_MINOR" && "$INSTALLED_BUN_PATCH" -lt "$REQUIRED_BUN_PATCH") ]]; then
|
|
23
|
-
sh ./setup.sh
|
|
24
|
-
bun_version=$(exec $SHELL -l -c "source ~/.zshrc; tea +bun.sh'=$REQUIRED_BUN_VERSION' >/dev/null 2>&1; tea +bun.sh'=$REQUIRED_BUN_VERSION' bun -v")
|
|
25
|
-
exec $SHELL -c "source ~/.zshrc; tea -SE >/dev/null 2>&1 && cd ."
|
|
26
|
-
echo " # managed by stacks"
|
|
27
|
-
echo " • bun $bun_version"
|
|
28
|
-
echo "\n Please reopen your shell for updates to take effect." | awk '{print "\033[3m" $0 "\033[0m"}'
|
|
29
|
-
|
|
30
|
-
exit
|
|
31
|
-
fi
|
|
32
|
-
|
|
33
|
-
echo "Bun v$REQUIRED_BUN_VERSION or greater is installed!"
|
package/core/scripts/fresh
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
# delete ../../../bun.lockb
|
|
4
|
-
rm ../../bun.lock
|
|
5
|
-
|
|
6
|
-
# delete all node_modules and dist folders
|
|
7
|
-
rimraf ../../**/dist
|
|
8
|
-
rimraf ../../**/node_modules # ensure this runs last or else rimraf will delete itself
|
|
9
|
-
|
|
10
|
-
# install dependencies via Bun
|
|
11
|
-
bun install
|
|
12
|
-
|
|
13
|
-
# link all core packages
|
|
14
|
-
# ./link.sh
|
package/core/scripts/link
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
# loop over every directory in ./storage/framework/core/*
|
|
4
|
-
for dir in ../src/*/; do
|
|
5
|
-
# -d checks if it's a directory
|
|
6
|
-
if [[ -d "$dir" ]]; then
|
|
7
|
-
# navigate into directory
|
|
8
|
-
cd "$dir"
|
|
9
|
-
# execute your command
|
|
10
|
-
bun link
|
|
11
|
-
# navigate back to the original directory
|
|
12
|
-
cd -
|
|
13
|
-
fi
|
|
14
|
-
done
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import process from 'node:process'
|
|
2
|
-
import { italic, log } from '@stacksjs/cli'
|
|
3
|
-
import { glob, storage } from '@stacksjs/storage'
|
|
4
|
-
import { ExitCode } from '@stacksjs/types'
|
|
5
|
-
|
|
6
|
-
log.info('Moving built src files to right path in the dist folder...')
|
|
7
|
-
|
|
8
|
-
const files = await glob([
|
|
9
|
-
'../src/**/dist/src/**',
|
|
10
|
-
])
|
|
11
|
-
|
|
12
|
-
if (files.length === 0) {
|
|
13
|
-
log.info('No files to move')
|
|
14
|
-
process.exit(ExitCode.Success)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
for (const file of files) {
|
|
18
|
-
const path = file.replace('dist/src', 'dist')
|
|
19
|
-
|
|
20
|
-
log.info('Moving', italic(file), 'to', italic(path))
|
|
21
|
-
|
|
22
|
-
await storage.move(file, path, { overwrite: true })
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// delete empty /dist/src folder
|
|
26
|
-
await storage.del('../src/**/dist/src')
|
|
27
|
-
|
|
28
|
-
log.success('Moved built src files to right path in the dist folder')
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import process from 'node:process'
|
|
2
|
-
import { italic, log } from '@stacksjs/cli'
|
|
3
|
-
import { glob, storage } from '@stacksjs/storage'
|
|
4
|
-
import { ExitCode } from '@stacksjs/types'
|
|
5
|
-
import { corePath } from '@stacksjs/path'
|
|
6
|
-
|
|
7
|
-
log.info('Getting started to move d.ts & d.ts.map files...')
|
|
8
|
-
|
|
9
|
-
const files = await glob([
|
|
10
|
-
'../dist/types/storage/framework/core/**/src/*.d.ts',
|
|
11
|
-
'../dist/types/storage/framework/core/**/src/*.d.ts.map',
|
|
12
|
-
'../dist/types/storage/framework/core/**/src/**/*.d.ts',
|
|
13
|
-
'../dist/types/storage/framework/core/**/src/**/*.d.ts.map',
|
|
14
|
-
'../dist/types/storage/framework/core/**/src/**/**/*.d.ts',
|
|
15
|
-
'../dist/types/storage/framework/core/**/src/**/**/*.d.ts.map',
|
|
16
|
-
])
|
|
17
|
-
|
|
18
|
-
if (files.length === 0) {
|
|
19
|
-
log.info('No d.ts files found')
|
|
20
|
-
process.exit(ExitCode.Success)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
for (const file of files) {
|
|
24
|
-
const path = file
|
|
25
|
-
.replace('../dist/types/storage/framework/core/', '../src/')
|
|
26
|
-
.replace('/src/', '/dist/')
|
|
27
|
-
|
|
28
|
-
log.info('Moving', italic(file), 'to', italic(path))
|
|
29
|
-
|
|
30
|
-
await storage.move(file, path, { overwrite: true })
|
|
31
|
-
}
|
|
32
|
-
log.success('Moved d.ts files')
|
|
33
|
-
|
|
34
|
-
log.info('Deleting dist/src folders')
|
|
35
|
-
await storage.del(corePath('**/dist/src'))
|
package/core/scripts/publish
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
# Get the script's directory
|
|
4
|
-
script_dir=$(realpath $(dirname "$0"))
|
|
5
|
-
|
|
6
|
-
# Get all directories in the core path except for src/bun-create
|
|
7
|
-
dirs=$(find "$script_dir/../" -type d -maxdepth 1 -not -path "$script_dir/../bun-create")
|
|
8
|
-
|
|
9
|
-
# Get all directories in src/bun-create up to two levels deep
|
|
10
|
-
bun_create_dirs=$(find "$script_dir/../src" -type d -maxdepth 2)
|
|
11
|
-
|
|
12
|
-
# Combine the two directory lists
|
|
13
|
-
dirs="$dirs $bun_create_dirs"
|
|
14
|
-
|
|
15
|
-
# Check if no directories found
|
|
16
|
-
if [ -z "$dirs" ]; then
|
|
17
|
-
echo "No core packages found"
|
|
18
|
-
exit 1
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
# Loop through each directory
|
|
22
|
-
for dir in $dirs; do
|
|
23
|
-
echo ""
|
|
24
|
-
echo "🏗️ Releasing..."
|
|
25
|
-
echo "📦 $dir"
|
|
26
|
-
|
|
27
|
-
# Change to the directory
|
|
28
|
-
cd $dir
|
|
29
|
-
|
|
30
|
-
npm publish --access public --no-git-checks || echo "Failed to publish $dir"
|
|
31
|
-
|
|
32
|
-
# Check if the build command was successful
|
|
33
|
-
if [ $? -ne 0 ]; then
|
|
34
|
-
echo "Failed to publish $dir"
|
|
35
|
-
exit 1
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
echo "✅ Latest is published"
|
|
39
|
-
echo ""
|
|
40
|
-
|
|
41
|
-
# Change back to the original directory
|
|
42
|
-
cd - >/dev/null
|
|
43
|
-
done
|
package/core/scripts/setup
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
## updates or installs pkgx
|
|
4
|
-
### thanks to pkgx.sh for this script 💙
|
|
5
|
-
|
|
6
|
-
set -e
|
|
7
|
-
|
|
8
|
-
if test -n "$VERBOSE" -o -n "$GITHUB_ACTIONS" -a -n "$RUNNER_DEBUG"; then
|
|
9
|
-
set -x
|
|
10
|
-
fi
|
|
11
|
-
|
|
12
|
-
if test -d /usr/local/bin -a ! -w /usr/local/bin; then
|
|
13
|
-
SUDO="sudo"
|
|
14
|
-
elif test -d /usr/local -a ! -w /usr/local; then
|
|
15
|
-
SUDO="sudo"
|
|
16
|
-
elif test -d /usr -a ! -w /usr; then
|
|
17
|
-
SUDO="sudo"
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
_install_pre_reqs() {
|
|
21
|
-
if test -f /etc/debian_version; then
|
|
22
|
-
apt update --yes
|
|
23
|
-
|
|
24
|
-
# minimal but required or networking doesn’t work
|
|
25
|
-
# https://packages.debian.org/buster/all/netbase/filelist
|
|
26
|
-
A=netbase
|
|
27
|
-
|
|
28
|
-
# difficult to pkg in our opinion
|
|
29
|
-
B=libudev-dev
|
|
30
|
-
|
|
31
|
-
case $(cat /etc/debian_version) in
|
|
32
|
-
jessie/sid|8.*|stretch/sid|9.*)
|
|
33
|
-
apt --yes install libc-dev libstdc++-4.8-dev libgcc-4.7-dev $A $B;;
|
|
34
|
-
buster/sid|10.*)
|
|
35
|
-
apt --yes install libc-dev libstdc++-8-dev libgcc-8-dev $A $B;;
|
|
36
|
-
bullseye/sid|11.*)
|
|
37
|
-
apt --yes install libc-dev libstdc++-10-dev libgcc-9-dev $A $B;;
|
|
38
|
-
bookworm/sid|12.*|*)
|
|
39
|
-
apt --yes install libc-dev libstdc++-11-dev libgcc-11-dev $A $B;;
|
|
40
|
-
esac
|
|
41
|
-
elif test -f /etc/fedora-release; then
|
|
42
|
-
$SUDO yum --assumeyes install libatomic
|
|
43
|
-
fi
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
_is_ci() {
|
|
47
|
-
[ -n "$CI" ] && [ $CI != 0 ]
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
_install_pkgx() {
|
|
51
|
-
if _is_ci; then
|
|
52
|
-
progress="--no-progress-meter"
|
|
53
|
-
else
|
|
54
|
-
progress="--progress-bar"
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
tmpdir=$(mktemp -d)
|
|
58
|
-
|
|
59
|
-
if [ $# -eq 0 ]; then
|
|
60
|
-
if [ -f /usr/local/bin/pkgx ]; then
|
|
61
|
-
echo "upgrading: /usr/local/bin/pkgx" >&2
|
|
62
|
-
else
|
|
63
|
-
echo "installing: /usr/local/bin/pkgx" >&2
|
|
64
|
-
fi
|
|
65
|
-
|
|
66
|
-
# using a named pipe to prevent curl progress output trumping the sudo password prompt
|
|
67
|
-
pipe="$tmpdir/pipe"
|
|
68
|
-
mkfifo "$pipe"
|
|
69
|
-
|
|
70
|
-
curl $progress --fail --proto '=https' "https://pkgx.sh/$(uname)/$(uname -m)".tgz > "$pipe" &
|
|
71
|
-
$SUDO sh -c "
|
|
72
|
-
mkdir -p /usr/local/bin
|
|
73
|
-
tar xz --directory /usr/local/bin < '$pipe'
|
|
74
|
-
" &
|
|
75
|
-
wait
|
|
76
|
-
|
|
77
|
-
rm -r "$tmpdir"
|
|
78
|
-
|
|
79
|
-
if [ "$(command which pkgx)" != /usr/local/bin/pkgx ]; then
|
|
80
|
-
echo "warning: active pkgx is not /usr/local/bin/pkgx" >&2
|
|
81
|
-
export PATH="/usr/local/bin:$PATH" # so we can exec if required
|
|
82
|
-
fi
|
|
83
|
-
|
|
84
|
-
# tell the user what version we just installed
|
|
85
|
-
pkgx --version
|
|
86
|
-
|
|
87
|
-
else
|
|
88
|
-
curl $progress --fail --proto '=https' \
|
|
89
|
-
"https://pkgx.sh/$(uname)/$(uname -m)".tgz \
|
|
90
|
-
| tar xz --directory "$tmpdir"
|
|
91
|
-
|
|
92
|
-
export PATH="$tmpdir:$PATH"
|
|
93
|
-
export PKGX_DIR="$tmpdir"
|
|
94
|
-
fi
|
|
95
|
-
|
|
96
|
-
unset tmpdir pipe
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
_pkgx_is_old() {
|
|
100
|
-
v="$(/usr/local/bin/pkgx --version || echo pkgx 0)"
|
|
101
|
-
/usr/local/bin/pkgx --silent semverator gt \
|
|
102
|
-
$(curl -Ssf https://pkgx.sh/VERSION) \
|
|
103
|
-
$(echo $v | awk '{print $2}')
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
_should_install_pkgx() {
|
|
107
|
-
if [ ! -f /usr/local/bin/pkgx ]; then
|
|
108
|
-
return 0
|
|
109
|
-
elif _pkgx_is_old >/dev/null 2>&1; then
|
|
110
|
-
return 0
|
|
111
|
-
else
|
|
112
|
-
return 1
|
|
113
|
-
fi
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
########################################################################### meat
|
|
117
|
-
|
|
118
|
-
if _should_install_pkgx; then
|
|
119
|
-
_install_pkgx "$@"
|
|
120
|
-
elif [ $# -eq 0 ]; then
|
|
121
|
-
echo "$(pkgx --version) already installed" >&2
|
|
122
|
-
fi
|
|
123
|
-
|
|
124
|
-
if _is_ci; then
|
|
125
|
-
apt() {
|
|
126
|
-
# we should use apt-get not apt in CI
|
|
127
|
-
# weird shit ref: https://askubuntu.com/a/668859
|
|
128
|
-
export DEBIAN_FRONTEND=noninteractive
|
|
129
|
-
cmd=$1
|
|
130
|
-
shift
|
|
131
|
-
$SUDO apt-get $cmd -qq -o=Dpkg::Use-Pty=0 $@
|
|
132
|
-
}
|
|
133
|
-
else
|
|
134
|
-
apt() {
|
|
135
|
-
case "$1" in
|
|
136
|
-
update)
|
|
137
|
-
echo "ensure you have the `pkgx` pre-requisites installed:" >&2
|
|
138
|
-
echo >&2
|
|
139
|
-
;;
|
|
140
|
-
install)
|
|
141
|
-
echo " apt-get" "$@" >&2
|
|
142
|
-
;;
|
|
143
|
-
esac
|
|
144
|
-
}
|
|
145
|
-
yum() {
|
|
146
|
-
echo " yum" "$@" >&2
|
|
147
|
-
}
|
|
148
|
-
unset SUDO
|
|
149
|
-
fi
|
|
150
|
-
|
|
151
|
-
_install_pre_reqs
|
|
152
|
-
|
|
153
|
-
if [ $# -gt 0 ]; then
|
|
154
|
-
pkgx "$@"
|
|
155
|
-
elif [ $(basename "/$0") != 'installer.sh' ]; then
|
|
156
|
-
# ^^ temporary exception for action.ts
|
|
157
|
-
|
|
158
|
-
if type eval >/dev/null 2>&1; then
|
|
159
|
-
# we `type eval` as on Travis there was no `eval`!
|
|
160
|
-
eval "$(pkgx --shellcode)" 2>/dev/null
|
|
161
|
-
fi
|
|
162
|
-
|
|
163
|
-
if ! _is_ci; then
|
|
164
|
-
echo "for more info: pkgx --help" >&2
|
|
165
|
-
fi
|
|
166
|
-
fi
|
|
167
|
-
|
|
168
|
-
eval "$(pkgx integrate)"
|
|
169
|
-
|
|
170
|
-
# todo: need to check if this repo already exists locally
|
|
171
|
-
git clone https://github.com/stacksjs/stacks.git $1
|
|
172
|
-
|
|
173
|
-
cd $1
|
|
174
|
-
|
|
175
|
-
# need to log to console: "in order to finish the setup,
|
|
176
|
-
# please run
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import process from 'node:process'
|
|
2
|
-
import { defineConfig, loadEnv } from 'vite'
|
|
3
|
-
import type { BuildOptions as ViteBuildOptions } from 'vite'
|
|
4
|
-
import Components from 'unplugin-vue-components/vite'
|
|
5
|
-
import type { ViteConfig } from '../types/src'
|
|
6
|
-
import { libraryEntryPath, libsPath, projectPath, storagePath } from '../path/src'
|
|
7
|
-
import { app, library } from '../config/src'
|
|
8
|
-
import { alias } from '../alias/src'
|
|
9
|
-
import { autoImports, uiEngine } from '../vite/src'
|
|
10
|
-
|
|
11
|
-
export const vueComponentsConfig: ViteConfig = {
|
|
12
|
-
envDir: projectPath(),
|
|
13
|
-
envPrefix: 'FRONTEND_',
|
|
14
|
-
publicDir: storagePath('public'),
|
|
15
|
-
|
|
16
|
-
server: {
|
|
17
|
-
host: app.url,
|
|
18
|
-
open: false,
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
resolve: {
|
|
22
|
-
dedupe: ['vue'],
|
|
23
|
-
alias,
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
optimizeDeps: {
|
|
27
|
-
exclude: ['stacks', 'vue', 'fsevents', 'emitter', '@stacksjs/utils', '@stacksjs/validation', '@stacksjs/vite', '@stacksjs/server', '@stacksjs/config', 'stacks/utils', 'stacks/validation'],
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
plugins: [
|
|
31
|
-
// preview(),
|
|
32
|
-
uiEngine(),
|
|
33
|
-
// cssEngine(),
|
|
34
|
-
autoImports(),
|
|
35
|
-
Components({
|
|
36
|
-
// allow auto load markdown components under `./src/components/`
|
|
37
|
-
extensions: ['stx', 'vue', 'md'],
|
|
38
|
-
// allow auto import and register components used in markdown
|
|
39
|
-
include: [/\.stx$/, /\.stx\?stx/, /\.vue$/, /\.vue\?vue/, /\.md$/],
|
|
40
|
-
dts: 'src/components.d.ts',
|
|
41
|
-
}),
|
|
42
|
-
],
|
|
43
|
-
|
|
44
|
-
build: vueComponentsBuildOptions(),
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function vueComponentsBuildOptions(): ViteBuildOptions {
|
|
48
|
-
return {
|
|
49
|
-
outDir: libsPath('components/vue/dist'),
|
|
50
|
-
emptyOutDir: true,
|
|
51
|
-
lib: {
|
|
52
|
-
entry: libraryEntryPath('vue-components'),
|
|
53
|
-
name: library.vueComponents?.name,
|
|
54
|
-
formats: ['cjs', 'es'],
|
|
55
|
-
fileName: (format: string) => {
|
|
56
|
-
if (format === 'es')
|
|
57
|
-
return 'index.mjs'
|
|
58
|
-
|
|
59
|
-
if (format === 'cjs')
|
|
60
|
-
return 'index.cjs'
|
|
61
|
-
|
|
62
|
-
return 'index.?.js'
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
rollupOptions: {
|
|
67
|
-
external: ['vue', '@stacksjs/vite'],
|
|
68
|
-
output: {
|
|
69
|
-
globals: {
|
|
70
|
-
vue: 'Vue',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export default defineConfig(({ command, mode }) => {
|
|
78
|
-
process.env = { ...process.env, ...loadEnv(mode, projectPath(), '') }
|
|
79
|
-
|
|
80
|
-
if (command === 'serve')
|
|
81
|
-
return vueComponentsConfig
|
|
82
|
-
|
|
83
|
-
return vueComponentsConfig
|
|
84
|
-
})
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ConfigEnv, Plugin } from 'vite'
|
|
2
|
-
import type { UserConfig } from 'vitepress'
|
|
3
|
-
|
|
4
|
-
// import { autoImports, components, cssEngine, inspect, layouts, pages, uiEngine } from '@stacksjs/build'
|
|
5
|
-
// import type { ConfigEnv, Plugin, PluginOption } from 'vite'
|
|
6
|
-
|
|
7
|
-
export interface StacksPlugin extends Plugin {
|
|
8
|
-
config: (config: UserConfig, env: ConfigEnv) => UserConfig
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// export default function framework(config: any) {
|
|
12
|
-
// return <PluginOption> [
|
|
13
|
-
// inspect(config),
|
|
14
|
-
// layouts(config),
|
|
15
|
-
// components(config),
|
|
16
|
-
// pages(config),
|
|
17
|
-
// autoImports(config),
|
|
18
|
-
// uiEngine(config),
|
|
19
|
-
// cssEngine(config),
|
|
20
|
-
// ]
|
|
21
|
-
// }
|
|
File without changes
|