refactor(10.2-01): nest framework packages under modules
- Move remaining beach packages and embedded admin assets\n- Rewrite framework, example, build, and gate paths
This commit is contained in:
@@ -157,7 +157,7 @@ expect_detect() {
|
||||
}
|
||||
|
||||
# The directories the hygiene stage scans, copied for the self-test.
|
||||
HYGIENE_DIRS=(admin/src admin/tests admin/openapi admin/package.json boardwalk cabana phrasebook)
|
||||
HYGIENE_DIRS=(admin/src admin/tests admin/openapi admin/package.json modules/boardwalk modules/cabana modules/phrasebook)
|
||||
|
||||
run_self_test() {
|
||||
bash -n "${BASH_SOURCE[0]}"
|
||||
@@ -165,7 +165,7 @@ run_self_test() {
|
||||
expect_detect fail 1 '{"Action":"pass","Package":"p","Test":"TestA"}
|
||||
{"Action":"fail","Package":"p","Test":"TestPhase10CSRF"}'
|
||||
expect_detect skip 2 '{"Action":"skip","Package":"p","Test":"TestPhase10AssembledAcceptance"}'
|
||||
expect_detect zero 3 '{"Action":"pass","Package":"git.golem15.com/golem15/summercms/cabana"}'
|
||||
expect_detect zero 3 '{"Action":"pass","Package":"git.golem15.com/golem15/summercms/modules/cabana"}'
|
||||
expect_detect nonjson 4 '{"Action":"pass",'
|
||||
expect_detect build 1 '{"Action":"build-fail","ImportPath":"p"}
|
||||
{"Action":"pass","Package":"q","Test":"TestA"}'
|
||||
@@ -250,10 +250,10 @@ run_go() {
|
||||
}
|
||||
|
||||
run_security() {
|
||||
phase10_tests "$ROOT" ./cabana TestPhase10CookieAuth TestPhase10CSRF TestPhase10Prefix TestPhase10RelationForgedID TestPhase10Bundle TestPhase10Coverage
|
||||
phase10_tests "$ROOT" ./bouncer TestPhase10CookieGuard
|
||||
phase10_tests "$ROOT" ./surf TestPhase10AdminPrefixCollision
|
||||
phase10_go "$ROOT" ./boardwalk
|
||||
phase10_tests "$ROOT" ./modules/cabana TestPhase10CookieAuth TestPhase10CSRF TestPhase10Prefix TestPhase10RelationForgedID TestPhase10Bundle TestPhase10Coverage
|
||||
phase10_tests "$ROOT" ./modules/bouncer TestPhase10CookieGuard
|
||||
phase10_tests "$ROOT" ./modules/surf TestPhase10AdminPrefixCollision
|
||||
phase10_go "$ROOT" ./modules/boardwalk
|
||||
phase10_tests "$APP" ./plugins/golem15/fonoteka TestPhase10CollectionOwnerReadOnly TestPhase10AdminAuth
|
||||
"$ROOT/scripts/check-phase9.sh" --security
|
||||
echo "phase10 security passed"
|
||||
@@ -262,7 +262,7 @@ run_security() {
|
||||
run_postgres() {
|
||||
phase10_tests "$APP" ./plugins/golem15/fonoteka TestPhase10TracerSPA TestPhase10AdminAuth TestPhase10AlbumRelations \
|
||||
TestPhase10Controllers TestPhase10AssembledAcceptance
|
||||
phase10_tests "$ROOT" ./cabana TestPhase10RelationOptions TestPhase10RelationSave TestPhase10OpenAPIConformance TestPhase10Coverage
|
||||
phase10_tests "$ROOT" ./modules/cabana TestPhase10RelationOptions TestPhase10RelationSave TestPhase10OpenAPIConformance TestPhase10Coverage
|
||||
echo "phase10 postgres passed"
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ run_spa() {
|
||||
|
||||
run_openapi() {
|
||||
"$ROOT/scripts/check-admin-openapi.sh" --check
|
||||
phase10_tests "$ROOT" ./cabana TestPhase10OpenAPIConformance TestPhase09ContractInventory
|
||||
phase10_tests "$ROOT" ./modules/cabana TestPhase10OpenAPIConformance TestPhase09ContractInventory
|
||||
(cd "$APP" && bash scripts/check-openapi.sh)
|
||||
if ! git -C "$APP" diff --quiet -- docs/openapi.json; then
|
||||
git -C "$APP" diff --stat -- docs/openapi.json >&2
|
||||
@@ -313,7 +313,7 @@ hygiene_checks() {
|
||||
local hits
|
||||
# Application or Polish catalogue names in framework code, tests and build.
|
||||
hits="$(cd "$tree" && grep -rniIE 'pl[yý]tarium|fonoteka|albumy|kolekcj|winyl|p[lł]yt[aęy]' \
|
||||
admin/src admin/tests admin/openapi boardwalk cabana phrasebook 2>/dev/null || true)"
|
||||
admin/src admin/tests admin/openapi modules/boardwalk modules/cabana modules/phrasebook 2>/dev/null || true)"
|
||||
[[ -z "$hits" ]] || fail "application names in the framework: $hits"
|
||||
# Plugin and server strings are rendered as text only.
|
||||
hits="$(cd "$tree" && grep -rnE 'v-html|innerHTML|outerHTML|insertAdjacentHTML' admin/src 2>/dev/null || true)"
|
||||
@@ -334,11 +334,11 @@ hygiene_checks() {
|
||||
grep -v '^admin/src/state/useSidebar.ts:' || true)"
|
||||
[[ -z "$hits" ]] || fail "browser storage outside admin/src/state/useSidebar.ts: $hits"
|
||||
# The embedded build loads nothing from another origin.
|
||||
hits="$(cd "$tree" && grep -noE '(src|href)="(https?:)?//[^"]*"|url\((["'"'"']?)(https?:)?//' boardwalk/dist/index.html boardwalk/dist/assets/*.css 2>/dev/null || true)"
|
||||
[[ -z "$hits" ]] || fail "boardwalk/dist references another origin: $hits"
|
||||
hits="$(cd "$tree" && grep -ohE 'https?://[A-Za-z0-9.-]+' boardwalk/dist/assets/*.js 2>/dev/null | sort -u |
|
||||
hits="$(cd "$tree" && grep -noE '(src|href)="(https?:)?//[^"]*"|url\((["'"'"']?)(https?:)?//' modules/boardwalk/dist/index.html modules/boardwalk/dist/assets/*.css 2>/dev/null || true)"
|
||||
[[ -z "$hits" ]] || fail "modules/boardwalk/dist references another origin: $hits"
|
||||
hits="$(cd "$tree" && grep -ohE 'https?://[A-Za-z0-9.-]+' modules/boardwalk/dist/assets/*.js 2>/dev/null | sort -u |
|
||||
grep -vxE 'http://www\.w3\.org|https://vuejs\.org|http://local' || true)"
|
||||
[[ -z "$hits" ]] || fail "boardwalk/dist JS names another origin: $hits"
|
||||
[[ -z "$hits" ]] || fail "modules/boardwalk/dist JS names another origin: $hits"
|
||||
# Icons: named imports only, and never the deprecated lucide package.
|
||||
hits="$(cd "$tree" && grep -rnE "import \* as [A-Za-z_]+ from '@lucide/vue'|lucide-vue-next" admin/src admin/package.json 2>/dev/null || true)"
|
||||
[[ -z "$hits" ]] || fail "lucide namespace import or deprecated package: $hits"
|
||||
|
||||
Reference in New Issue
Block a user