@stacksjs/defaults 0.72.85 → 0.72.86
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLocaleSwitchResponse } from '@stacksjs/i18n'
|
|
2
2
|
import { existsSync } from 'node:fs'
|
|
3
|
-
import {
|
|
3
|
+
import { siteConfigPath } from '@stacksjs/path'
|
|
4
4
|
|
|
5
5
|
async function loadSiteI18n(): Promise<{ locales: string[], defaultLocale: string } | null> {
|
|
6
|
-
const sitePath =
|
|
6
|
+
const sitePath = siteConfigPath()
|
|
7
7
|
if (!existsSync(sitePath))
|
|
8
8
|
return null
|
|
9
9
|
|
package/ide/vscode/package.json
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.72.
|
|
5
|
+
"version": "0.72.86",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@iconify-json/f7": "^1.2.2",
|
|
53
53
|
"@iconify-json/hugeicons": "^1.2.27",
|
|
54
|
-
"@stacksjs/mobile": "^0.72.
|
|
54
|
+
"@stacksjs/mobile": "^0.72.86",
|
|
55
55
|
"@stacksjs/sanitizer": "^0.2.113"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
package/project/bootstrap
CHANGED
|
@@ -92,10 +92,16 @@ ensure_pantry() {
|
|
|
92
92
|
echo "Pantry installed to ${INSTALL_DIR}/pantry"
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
is_stacks_app() {
|
|
96
|
+
[ -f "package.json" ] \
|
|
97
|
+
&& [ -x "buddy" ] \
|
|
98
|
+
&& grep -Eq '"stacks"[[:space:]]*:' package.json
|
|
99
|
+
}
|
|
100
|
+
|
|
95
101
|
# --- Main ---
|
|
96
102
|
|
|
97
103
|
# If we are outside a project, create one from the latest stable release.
|
|
98
|
-
if [ ! -d "storage/framework/core" ]; then
|
|
104
|
+
if [ ! -d "storage/framework/core" ] && ! is_stacks_app; then
|
|
99
105
|
if [ -z "$PROJECT_NAME" ]; then
|
|
100
106
|
PROJECT_NAME="${STACKS_PROJECT:-stacks}"
|
|
101
107
|
|
|
@@ -142,7 +148,7 @@ if [ ! -d "storage/framework/core" ]; then
|
|
|
142
148
|
fi
|
|
143
149
|
|
|
144
150
|
# Detect if we're in a Stacks project
|
|
145
|
-
if [ ! -d "storage/framework/core" ]; then
|
|
151
|
+
if [ ! -d "storage/framework/core" ] && ! is_stacks_app; then
|
|
146
152
|
echo "Error: not inside a Stacks project."
|
|
147
153
|
exit 1
|
|
148
154
|
fi
|