create-swdg-frontend 0.1.6 → 0.2.0
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/README.md +31 -13
- package/bin/index.js +3 -244
- package/lib/argv.js +43 -0
- package/lib/cli.js +141 -0
- package/lib/constants.js +24 -0
- package/lib/gis.js +92 -0
- package/lib/manifest.js +23 -0
- package/lib/prompts.js +55 -0
- package/lib/scaffold.js +118 -0
- package/package.json +6 -2
- package/scripts/sync-template.js +120 -0
- package/scripts/validate-template.mjs +74 -0
- package/stubs/tsconfig.node.json +11 -0
- package/stubs/types-env.d.ts +9 -0
- package/stubs/vite.config.ts +64 -0
- package/template/.env.example +6 -0
- package/template/.github/workflows/ci.yml +23 -0
- package/template/.github/workflows/release.yml +69 -0
- package/template/.husky/commit-msg +42 -42
- package/template/.husky/pre-commit +2 -2
- package/template/.husky/prepare-commit-msg +0 -0
- package/template/.lintstagedrc +5 -5
- package/template/.prettierignore +26 -26
- package/template/.prettierrc.cjs +10 -10
- package/template/.stylelintignore +1 -1
- package/template/.stylelintrc.json +12 -6
- package/template/README.md +99 -36
- package/template/auto-imports.d.ts +10 -0
- package/template/commitlint.config.cjs +64 -64
- package/template/docs/MAINTAINER.md +77 -0
- package/template/docs/ONBOARDING.md +284 -0
- package/template/docs/TESTING.md +104 -0
- package/template/eslint.config.js +97 -96
- package/template/index.html +17 -17
- package/template/interface/user.ts +5 -5
- package/template/package.json +88 -86
- package/template/pnpm-lock.yaml +6360 -0
- package/template/postcss.config.js +5 -0
- package/template/scripts/gen-api.cjs +280 -230
- package/template/scripts/release.mjs +53 -59
- package/template/scripts/set-release-version.mjs +46 -0
- package/template/scripts/test-pipeline.mjs +85 -0
- package/template/scripts/test-scaffold.mjs +197 -0
- package/template/scripts/test-template.mjs +52 -0
- package/template/scripts/verify.mjs +28 -0
- package/template/scripts/vite-plugin-cesium-dev.ts +56 -0
- package/template/src/App.vue +6 -6
- package/template/src/api/README.md +7 -3
- package/template/src/assets/favicon.svg +49 -49
- package/template/src/components/Body/index.vue +80 -16
- package/template/src/components/CesiumViewer/index.vue +36 -0
- package/template/src/components/Header/index.vue +19 -8
- package/template/src/components/OnboardingDeck/index.vue +449 -0
- package/template/src/data/onboardingSlides.ts +208 -0
- package/template/src/directive/focus.ts +9 -9
- package/template/src/layout/BasicLayout.vue +28 -28
- package/template/src/main.ts +25 -33
- package/template/src/router/index.ts +30 -24
- package/template/src/router/routeUtils.ts +13 -0
- package/template/src/stores/README.md +3 -3
- package/template/src/stores/useCounter.ts +12 -12
- package/template/src/styles/alerts.less +85 -85
- package/template/src/styles/global.css +326 -326
- package/template/src/styles/shell.css +232 -0
- package/template/src/utils/alert.ts +58 -58
- package/template/src/utils/axios-middleware.js +180 -0
- package/template/src/utils/cesium/index.ts +71 -0
- package/template/src/utils/components.ts +21 -21
- package/template/src/utils/composables/useAlert.ts +14 -14
- package/template/src/utils/composables/useFeatureGis.ts +24 -0
- package/template/src/utils/http.ts +5 -0
- package/template/src/views/examples/cesium/index.vue +85 -0
- package/template/src/views/examples/guide/index.vue +42 -0
- package/template/src/views/examples/test/index.vue +63 -0
- package/template/src/views/index.vue +8 -9
- package/template/src/vite-env.d.ts +1 -1
- package/template/tests/README.md +7 -6
- package/template/tests/e2e/README.md +3 -3
- package/template/tests/setup.ts +1 -1
- package/template/tests/unit/onboardingSlides.test.ts +20 -0
- package/template/tests/unit/router.utils.test.ts +21 -0
- package/template/tests/unit/scaffold.lib.test.ts +44 -0
- package/template/tests/unit/useFeatureGis.test.ts +14 -0
- package/template/tests/utils/helpers.ts +1 -1
- package/template/tsconfig.json +51 -51
- package/template/tsconfig.node.json +11 -11
- package/template/types/README.md +3 -3
- package/template/types/env.d.ts +13 -0
- package/template/types/global.d.ts +9 -9
- package/template/vite.config.ts +89 -75
- package/template/vitest.config.ts +22 -9
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_0.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_1.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_10.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_11.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_12.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_13.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_14.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_15.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_16.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_17.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_18.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_19.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_2.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_20.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_21.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_22.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_23.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_24.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_25.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_26.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_27.json +0 -438
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_3.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_4.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_5.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_6.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_7.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_8.json +0 -1012
- package/template/public/Cesium1.119/Assets/IAU2006_XYS/IAU2006_XYS_9.json +0 -1012
- package/template/public/Cesium1.119/Assets/Images/bing_maps_credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Images/cesium_credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Images/google_earth_credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Images/ion-credit.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/NaturalEarthII/tilemapresource.xml +0 -14
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/airfield.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/airport.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/alcohol-shop.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/america-football.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/art-gallery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bakery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bank.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bar.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/baseball.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/basketball.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/beer.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bicycle.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/building.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/bus.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cafe.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/camera.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/campsite.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/car.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cemetery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cesium.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/chemist.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cinema.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/circle-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/circle.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/city.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/clothing-store.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/college.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/commercial.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cricket.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/cross.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/dam.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/danger.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/disability.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/dog-park.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/embassy.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/emergency-telephone.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/entrance.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/farm.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/fast-food.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/ferry.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/fire-station.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/fuel.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/garden.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/gift.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/golf.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/grocery.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/hairdresser.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/harbor.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/heart.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/heliport.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/hospital.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/ice-cream.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/industrial.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/land-use.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/laundry.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/library.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/lighthouse.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/lodging.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/logging.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/london-underground.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/marker-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/marker.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/minefield.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/mobilephone.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/monument.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/museum.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/music.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/oil-well.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/park.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/park2.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/parking-garage.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/parking.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/pharmacy.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/pitch.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/place-of-worship.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/playground.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/police.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/polling-place.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/post.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/prison.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-above.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-light.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-metro.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail-underground.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rail.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/religious-christian.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/religious-jewish.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/religious-muslim.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/restaurant.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/roadblock.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/rocket.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/school.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/scooter.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/shop.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/skiing.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/slaughterhouse.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/soccer.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/square-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/square.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/star-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/star.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/suitcase.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/swimming.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/telephone.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/tennis.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/theatre.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/toilets.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/town-hall.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/town.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/triangle-stroked.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/triangle.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/village.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/warehouse.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/waste-basket.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/water.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/wetland.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/maki/zoo.png +0 -0
- package/template/public/Cesium1.119/Assets/Textures/moonSmall.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/pin.svg +0 -1
- package/template/public/Cesium1.119/Assets/Textures/waterNormals.jpg +0 -0
- package/template/public/Cesium1.119/Assets/Textures/waterNormalsSmall.jpg +0 -0
- package/template/public/Cesium1.119/Assets/approximateTerrainHeights.json +0 -10924
- package/template/public/Cesium1.119/Cesium.js +0 -185772
- package/template/public/Cesium1.119/ThirdParty/Workers/package.json +0 -3
- package/template/public/Cesium1.119/ThirdParty/Workers/pako_deflate.min.js +0 -1681
- package/template/public/Cesium1.119/ThirdParty/Workers/pako_inflate.min.js +0 -1489
- package/template/public/Cesium1.119/ThirdParty/Workers/z-worker-pako.js +0 -1070
- package/template/public/Cesium1.119/ThirdParty/basis_transcoder.wasm +0 -0
- package/template/public/Cesium1.119/ThirdParty/draco_decoder.wasm +0 -0
- package/template/public/Cesium1.119/ThirdParty/google-earth-dbroot-parser.js +0 -11424
- package/template/public/Cesium1.119/Widgets/Animation/Animation.css +0 -127
- package/template/public/Cesium1.119/Widgets/Animation/lighter.css +0 -78
- package/template/public/Cesium1.119/Widgets/BaseLayerPicker/BaseLayerPicker.css +0 -112
- package/template/public/Cesium1.119/Widgets/BaseLayerPicker/lighter.css +0 -28
- package/template/public/Cesium1.119/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +0 -104
- package/template/public/Cesium1.119/Widgets/CesiumInspector/CesiumInspector.css +0 -115
- package/template/public/Cesium1.119/Widgets/CesiumWidget/CesiumWidget.css +0 -119
- package/template/public/Cesium1.119/Widgets/CesiumWidget/lighter.css +0 -14
- package/template/public/Cesium1.119/Widgets/FullscreenButton/FullscreenButton.css +0 -8
- package/template/public/Cesium1.119/Widgets/Geocoder/Geocoder.css +0 -72
- package/template/public/Cesium1.119/Widgets/Geocoder/lighter.css +0 -17
- package/template/public/Cesium1.119/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +0 -27
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/Mouse.svg +0 -84
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseLeft.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseMiddle.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/MouseRight.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/Touch.svg +0 -120
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchDrag.svg +0 -129
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchRotate.svg +0 -76
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchTilt.svg +0 -135
- package/template/public/Cesium1.119/Widgets/Images/NavigationHelp/TouchZoom.svg +0 -74
- package/template/public/Cesium1.119/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/TimelineIcons.png +0 -0
- package/template/public/Cesium1.119/Widgets/Images/info-loading.gif +0 -0
- package/template/public/Cesium1.119/Widgets/InfoBox/InfoBox.css +0 -94
- package/template/public/Cesium1.119/Widgets/InfoBox/InfoBoxDescription.css +0 -178
- package/template/public/Cesium1.119/Widgets/NavigationHelpButton/NavigationHelpButton.css +0 -95
- package/template/public/Cesium1.119/Widgets/NavigationHelpButton/lighter.css +0 -38
- package/template/public/Cesium1.119/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +0 -15
- package/template/public/Cesium1.119/Widgets/ProjectionPicker/ProjectionPicker.css +0 -46
- package/template/public/Cesium1.119/Widgets/SceneModePicker/SceneModePicker.css +0 -72
- package/template/public/Cesium1.119/Widgets/SelectionIndicator/SelectionIndicator.css +0 -22
- package/template/public/Cesium1.119/Widgets/Timeline/Timeline.css +0 -103
- package/template/public/Cesium1.119/Widgets/Timeline/lighter.css +0 -18
- package/template/public/Cesium1.119/Widgets/VRButton/VRButton.css +0 -8
- package/template/public/Cesium1.119/Widgets/Viewer/Viewer.css +0 -107
- package/template/public/Cesium1.119/Widgets/VoxelInspector/VoxelInspector.css +0 -18
- package/template/public/Cesium1.119/Widgets/lighter.css +0 -246
- package/template/public/Cesium1.119/Widgets/lighterShared.css +0 -46
- package/template/public/Cesium1.119/Widgets/shared.css +0 -103
- package/template/public/Cesium1.119/Widgets/widgets.css +0 -1376
- package/template/public/Cesium1.119/Workers/chunk-3C7WC463.js +0 -611
- package/template/public/Cesium1.119/Workers/chunk-3JW36LZF.js +0 -166
- package/template/public/Cesium1.119/Workers/chunk-4BTGX3WJ.js +0 -264
- package/template/public/Cesium1.119/Workers/chunk-4WRMLZA7.js +0 -128
- package/template/public/Cesium1.119/Workers/chunk-7Z5IIKOJ.js +0 -8046
- package/template/public/Cesium1.119/Workers/chunk-ABGXSJNX.js +0 -341
- package/template/public/Cesium1.119/Workers/chunk-AMQUWUD4.js +0 -269
- package/template/public/Cesium1.119/Workers/chunk-ATPDRNKI.js +0 -28
- package/template/public/Cesium1.119/Workers/chunk-BMHPVZ4H.js +0 -199
- package/template/public/Cesium1.119/Workers/chunk-CBEO3SHS.js +0 -1102
- package/template/public/Cesium1.119/Workers/chunk-CV7DLCWG.js +0 -485
- package/template/public/Cesium1.119/Workers/chunk-DQO6B4EQ.js +0 -76
- package/template/public/Cesium1.119/Workers/chunk-ED3TLP6D.js +0 -91
- package/template/public/Cesium1.119/Workers/chunk-EFZKO5RU.js +0 -42
- package/template/public/Cesium1.119/Workers/chunk-F5IHREXR.js +0 -2678
- package/template/public/Cesium1.119/Workers/chunk-FKRG4HDY.js +0 -516
- package/template/public/Cesium1.119/Workers/chunk-FYOYUPXG.js +0 -399
- package/template/public/Cesium1.119/Workers/chunk-GFN7NNSJ.js +0 -65
- package/template/public/Cesium1.119/Workers/chunk-HEEMUCG6.js +0 -92
- package/template/public/Cesium1.119/Workers/chunk-HSWA4OEL.js +0 -672
- package/template/public/Cesium1.119/Workers/chunk-IAC5XVZV.js +0 -287
- package/template/public/Cesium1.119/Workers/chunk-II4VNKYR.js +0 -50
- package/template/public/Cesium1.119/Workers/chunk-ILGBPNP6.js +0 -28
- package/template/public/Cesium1.119/Workers/chunk-IRH46BDL.js +0 -124
- package/template/public/Cesium1.119/Workers/chunk-IUA6FAOZ.js +0 -31
- package/template/public/Cesium1.119/Workers/chunk-K4ASOM65.js +0 -331
- package/template/public/Cesium1.119/Workers/chunk-KCIZBVXL.js +0 -258
- package/template/public/Cesium1.119/Workers/chunk-KF5NF354.js +0 -162
- package/template/public/Cesium1.119/Workers/chunk-KRKI6AAO.js +0 -773
- package/template/public/Cesium1.119/Workers/chunk-KZNJOCYU.js +0 -162
- package/template/public/Cesium1.119/Workers/chunk-O5IJ3OGP.js +0 -857
- package/template/public/Cesium1.119/Workers/chunk-OO23RBLX.js +0 -183
- package/template/public/Cesium1.119/Workers/chunk-P37AI2DW.js +0 -85
- package/template/public/Cesium1.119/Workers/chunk-PDMQLSBL.js +0 -108
- package/template/public/Cesium1.119/Workers/chunk-PEYJTJPE.js +0 -73
- package/template/public/Cesium1.119/Workers/chunk-POASMU2N.js +0 -2372
- package/template/public/Cesium1.119/Workers/chunk-PXCJYT2S.js +0 -73
- package/template/public/Cesium1.119/Workers/chunk-Q6L7X3LP.js +0 -538
- package/template/public/Cesium1.119/Workers/chunk-QB3MDM4J.js +0 -1670
- package/template/public/Cesium1.119/Workers/chunk-R6KGAEF6.js +0 -392
- package/template/public/Cesium1.119/Workers/chunk-RXTBM4OI.js +0 -57
- package/template/public/Cesium1.119/Workers/chunk-SB224QGV.js +0 -72
- package/template/public/Cesium1.119/Workers/chunk-T6BE4RZK.js +0 -37
- package/template/public/Cesium1.119/Workers/chunk-TAMCUKAR.js +0 -814
- package/template/public/Cesium1.119/Workers/chunk-TMSETF7M.js +0 -579
- package/template/public/Cesium1.119/Workers/chunk-TOGHF3VN.js +0 -376
- package/template/public/Cesium1.119/Workers/chunk-UH2WFNTA.js +0 -111
- package/template/public/Cesium1.119/Workers/chunk-V7JEDBOE.js +0 -573
- package/template/public/Cesium1.119/Workers/chunk-VBIROZR5.js +0 -633
- package/template/public/Cesium1.119/Workers/chunk-W23CU777.js +0 -271
- package/template/public/Cesium1.119/Workers/chunk-X5IHHI6X.js +0 -173
- package/template/public/Cesium1.119/Workers/chunk-XHX2UPDO.js +0 -217
- package/template/public/Cesium1.119/Workers/combineGeometry.js +0 -53
- package/template/public/Cesium1.119/Workers/createBoxGeometry.js +0 -45
- package/template/public/Cesium1.119/Workers/createBoxOutlineGeometry.js +0 -189
- package/template/public/Cesium1.119/Workers/createCircleGeometry.js +0 -148
- package/template/public/Cesium1.119/Workers/createCircleOutlineGeometry.js +0 -105
- package/template/public/Cesium1.119/Workers/createCoplanarPolygonGeometry.js +0 -293
- package/template/public/Cesium1.119/Workers/createCoplanarPolygonOutlineGeometry.js +0 -143
- package/template/public/Cesium1.119/Workers/createCorridorGeometry.js +0 -830
- package/template/public/Cesium1.119/Workers/createCorridorOutlineGeometry.js +0 -417
- package/template/public/Cesium1.119/Workers/createCylinderGeometry.js +0 -47
- package/template/public/Cesium1.119/Workers/createCylinderOutlineGeometry.js +0 -170
- package/template/public/Cesium1.119/Workers/createEllipseGeometry.js +0 -58
- package/template/public/Cesium1.119/Workers/createEllipseOutlineGeometry.js +0 -51
- package/template/public/Cesium1.119/Workers/createEllipsoidGeometry.js +0 -46
- package/template/public/Cesium1.119/Workers/createEllipsoidOutlineGeometry.js +0 -45
- package/template/public/Cesium1.119/Workers/createFrustumGeometry.js +0 -45
- package/template/public/Cesium1.119/Workers/createFrustumOutlineGeometry.js +0 -164
- package/template/public/Cesium1.119/Workers/createGeometry.js +0 -159
- package/template/public/Cesium1.119/Workers/createGroundPolylineGeometry.js +0 -911
- package/template/public/Cesium1.119/Workers/createPlaneGeometry.js +0 -185
- package/template/public/Cesium1.119/Workers/createPlaneOutlineGeometry.js +0 -93
- package/template/public/Cesium1.119/Workers/createPolygonGeometry.js +0 -884
- package/template/public/Cesium1.119/Workers/createPolygonOutlineGeometry.js +0 -359
- package/template/public/Cesium1.119/Workers/createPolylineGeometry.js +0 -349
- package/template/public/Cesium1.119/Workers/createPolylineVolumeGeometry.js +0 -262
- package/template/public/Cesium1.119/Workers/createPolylineVolumeOutlineGeometry.js +0 -177
- package/template/public/Cesium1.119/Workers/createRectangleGeometry.js +0 -787
- package/template/public/Cesium1.119/Workers/createRectangleOutlineGeometry.js +0 -299
- package/template/public/Cesium1.119/Workers/createSimplePolylineGeometry.js +0 -294
- package/template/public/Cesium1.119/Workers/createSphereGeometry.js +0 -84
- package/template/public/Cesium1.119/Workers/createSphereOutlineGeometry.js +0 -83
- package/template/public/Cesium1.119/Workers/createTaskProcessorWorker.js +0 -28
- package/template/public/Cesium1.119/Workers/createVectorTileClampedPolylines.js +0 -289
- package/template/public/Cesium1.119/Workers/createVectorTileGeometries.js +0 -258
- package/template/public/Cesium1.119/Workers/createVectorTilePoints.js +0 -79
- package/template/public/Cesium1.119/Workers/createVectorTilePolygons.js +0 -275
- package/template/public/Cesium1.119/Workers/createVectorTilePolylines.js +0 -176
- package/template/public/Cesium1.119/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -375
- package/template/public/Cesium1.119/Workers/createVerticesFromHeightmap.js +0 -1772
- package/template/public/Cesium1.119/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -425
- package/template/public/Cesium1.119/Workers/createWallGeometry.js +0 -320
- package/template/public/Cesium1.119/Workers/createWallOutlineGeometry.js +0 -229
- package/template/public/Cesium1.119/Workers/decodeDraco.js +0 -227
- package/template/public/Cesium1.119/Workers/decodeGoogleEarthEnterprisePacket.js +0 -1836
- package/template/public/Cesium1.119/Workers/decodeI3S.js +0 -924
- package/template/public/Cesium1.119/Workers/transcodeKTX2.js +0 -3180
- package/template/public/Cesium1.119/Workers/transferTypedArrayTest.js +0 -34
- package/template/public/Cesium1.119/Workers/upsampleQuantizedTerrainMesh.js +0 -534
- package/template/public/Cesium1.119/index.cjs +0 -185632
- package/template/public/Cesium1.119/index.js +0 -182874
- package/template/src/views/Test/index.vue +0 -23
- package/template/tests/unit/example.test.ts +0 -7
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# 测试与发布门禁
|
|
2
|
+
|
|
3
|
+
发布 `create-swdg-frontend` / `swdg` 到 npmjs **前必须** 通过完整测试管道。本地与 CI 使用同一套命令。
|
|
4
|
+
|
|
5
|
+
## 命令一览
|
|
6
|
+
|
|
7
|
+
| 命令 | 用途 | 何时跑 |
|
|
8
|
+
| -------------------- | --------------------------------------- | ----------------- |
|
|
9
|
+
| `pnpm verify` | typecheck + eslint | 日常提交前 |
|
|
10
|
+
| `pnpm test:unit` | Vitest 单元测试 | 开发中 |
|
|
11
|
+
| `pnpm test:scaffold` | 脚手架集成(无 install) | 改 create-swdg 后 |
|
|
12
|
+
| `pnpm test:template` | sync + template install/typecheck/build | 改模板后 |
|
|
13
|
+
| **`pnpm test:ci`** | **完整发布门禁(四阶段)** | **PR / 发布前** |
|
|
14
|
+
|
|
15
|
+
## 发布门禁管道(`pnpm test:ci`)
|
|
16
|
+
|
|
17
|
+
顺序固定,任一失败即 `exit 1`:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
1. verify 根项目 typecheck + eslint
|
|
21
|
+
2. unit vitest 单元测试
|
|
22
|
+
3. scaffold --no-gis / --gis 产物、manifest、CLI smoke
|
|
23
|
+
4. template sync-template → template 目录 install → typecheck → build
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`pnpm release x.y.z` 会在改版本号、打 npm 包 **之前** 自动执行 `test:ci`。
|
|
27
|
+
|
|
28
|
+
`create-swdg` 的 `prepublishOnly` 会 sync + `test:template`(防止单独 publish 时模板未验证)。
|
|
29
|
+
|
|
30
|
+
## 单元测试范围
|
|
31
|
+
|
|
32
|
+
位于 `tests/unit/`:
|
|
33
|
+
|
|
34
|
+
| 文件 | 覆盖 |
|
|
35
|
+
| -------------------------- | ----------------------------- |
|
|
36
|
+
| `router.utils.test.ts` | 约定式路由、examples 过滤规则 |
|
|
37
|
+
| `scaffold.lib.test.ts` | CLI argv、包名校验 |
|
|
38
|
+
| `useFeatureGis.test.ts` | GIS feature flag 逻辑 |
|
|
39
|
+
| `onboardingSlides.test.ts` | onboarding 幻灯片数据结构 |
|
|
40
|
+
|
|
41
|
+
## 集成测试(scaffold)
|
|
42
|
+
|
|
43
|
+
`scripts/test-scaffold.mjs` 在系统临时目录生成项目,断言:
|
|
44
|
+
|
|
45
|
+
**--no-gis**
|
|
46
|
+
|
|
47
|
+
- 无 `cesium` / `vite-plugin-static-copy` 依赖
|
|
48
|
+
- 删除 Cesium 相关目录与脚本
|
|
49
|
+
- `.env.example` 无 `VITE_FEATURE_GIS=true`
|
|
50
|
+
- `.swdg/manifest.json` → `features.gis: false`
|
|
51
|
+
|
|
52
|
+
**--gis**
|
|
53
|
+
|
|
54
|
+
- 保留 cesium 示例页与 env 配置
|
|
55
|
+
- `manifest.features.gis: true`
|
|
56
|
+
|
|
57
|
+
**CLI**
|
|
58
|
+
|
|
59
|
+
- 合法参数能退出 0
|
|
60
|
+
- 非法项目名退出非 0
|
|
61
|
+
|
|
62
|
+
## 模板测试(template)
|
|
63
|
+
|
|
64
|
+
`scripts/test-template.mjs`:
|
|
65
|
+
|
|
66
|
+
1. 从 monorepo 根 sync 到 `create-swdg/template`
|
|
67
|
+
2. 检查必要文件存在
|
|
68
|
+
3. `pnpm install` + `typecheck` + `build`(带 `VITE_FEATURE_GIS=true`)
|
|
69
|
+
|
|
70
|
+
确保 npm 包内 template **能真实构建**。
|
|
71
|
+
|
|
72
|
+
## CI
|
|
73
|
+
|
|
74
|
+
GitHub Actions `.github/workflows/ci.yml`:
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
pnpm install --frozen-lockfile
|
|
78
|
+
pnpm test:ci
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 推荐工作流
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# 日常
|
|
85
|
+
pnpm verify
|
|
86
|
+
|
|
87
|
+
# 改脚手架 / 模板后
|
|
88
|
+
pnpm test:scaffold
|
|
89
|
+
pnpm test:template
|
|
90
|
+
|
|
91
|
+
# 发布前(与 CI 一致)
|
|
92
|
+
pnpm test:ci
|
|
93
|
+
pnpm release 0.2.1
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## 故障排查
|
|
97
|
+
|
|
98
|
+
| 失败阶段 | 常见原因 |
|
|
99
|
+
| -------- | ------------------------------------------------ |
|
|
100
|
+
| verify | TS 错误、ESLint、单元测试红 |
|
|
101
|
+
| scaffold | GIS 剥离不完整、manifest 版本与 constants 不一致 |
|
|
102
|
+
| template | 未 sync、template build 失败(Cesium/路由等) |
|
|
103
|
+
|
|
104
|
+
template 阶段最慢(install + build),本地可先 `pnpm test:scaffold` 快速迭代脚手架逻辑。
|
|
@@ -1,96 +1,97 @@
|
|
|
1
|
-
import { FlatCompat } from '@eslint/eslintrc';
|
|
2
|
-
import js from '@eslint/js';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { dirname } from 'node:path';
|
|
5
|
-
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
6
|
-
import tsParser from '@typescript-eslint/parser';
|
|
7
|
-
import vue from 'eslint-plugin-vue';
|
|
8
|
-
import vueParser from 'vue-eslint-parser';
|
|
9
|
-
|
|
10
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
-
const __dirname = dirname(__filename);
|
|
12
|
-
|
|
13
|
-
const compat = new FlatCompat({
|
|
14
|
-
baseDirectory: __dirname,
|
|
15
|
-
recommendedConfig: js.configs.recommended,
|
|
16
|
-
allConfig: js.configs.all,
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export default [
|
|
20
|
-
{
|
|
21
|
-
ignores: [
|
|
22
|
-
'dist',
|
|
23
|
-
'out',
|
|
24
|
-
'node_modules',
|
|
25
|
-
'index.html',
|
|
26
|
-
'*.d.ts',
|
|
27
|
-
'.env',
|
|
28
|
-
'.env.local',
|
|
29
|
-
'.env.*.local',
|
|
30
|
-
'src/components.d.ts',
|
|
31
|
-
'public/**',
|
|
32
|
-
'
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'
|
|
38
|
-
'plugin
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
'@typescript-eslint/explicit-
|
|
68
|
-
'
|
|
69
|
-
'
|
|
70
|
-
'
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
'ts-
|
|
75
|
-
'ts-
|
|
76
|
-
'ts-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
'vue/
|
|
81
|
-
'vue/html-
|
|
82
|
-
'vue/
|
|
83
|
-
'vue/
|
|
84
|
-
'vue/
|
|
85
|
-
'vue/
|
|
86
|
-
'
|
|
87
|
-
'
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
1
|
+
import { FlatCompat } from '@eslint/eslintrc';
|
|
2
|
+
import js from '@eslint/js';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { dirname } from 'node:path';
|
|
5
|
+
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
6
|
+
import tsParser from '@typescript-eslint/parser';
|
|
7
|
+
import vue from 'eslint-plugin-vue';
|
|
8
|
+
import vueParser from 'vue-eslint-parser';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
|
|
13
|
+
const compat = new FlatCompat({
|
|
14
|
+
baseDirectory: __dirname,
|
|
15
|
+
recommendedConfig: js.configs.recommended,
|
|
16
|
+
allConfig: js.configs.all,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export default [
|
|
20
|
+
{
|
|
21
|
+
ignores: [
|
|
22
|
+
'dist',
|
|
23
|
+
'out',
|
|
24
|
+
'node_modules',
|
|
25
|
+
'index.html',
|
|
26
|
+
'*.d.ts',
|
|
27
|
+
'.env',
|
|
28
|
+
'.env.local',
|
|
29
|
+
'.env.*.local',
|
|
30
|
+
'src/components.d.ts',
|
|
31
|
+
'public/**',
|
|
32
|
+
'src/api/**',
|
|
33
|
+
'dev-dist',
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
...compat.extends(
|
|
37
|
+
'eslint:recommended',
|
|
38
|
+
'plugin:@typescript-eslint/recommended',
|
|
39
|
+
'plugin:prettier/recommended'
|
|
40
|
+
),
|
|
41
|
+
...vue.configs['flat/recommended'],
|
|
42
|
+
{
|
|
43
|
+
plugins: {
|
|
44
|
+
vue,
|
|
45
|
+
'@typescript-eslint': tseslint,
|
|
46
|
+
},
|
|
47
|
+
languageOptions: {
|
|
48
|
+
parser: vueParser,
|
|
49
|
+
parserOptions: {
|
|
50
|
+
parser: tsParser,
|
|
51
|
+
ecmaVersion: 2021,
|
|
52
|
+
sourceType: 'module',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
rules: {
|
|
56
|
+
'require-jsdoc': 'off',
|
|
57
|
+
'no-unused-vars': 'off',
|
|
58
|
+
'@typescript-eslint/no-unused-vars': [
|
|
59
|
+
'warn',
|
|
60
|
+
{
|
|
61
|
+
argsIgnorePattern: '^_',
|
|
62
|
+
varsIgnorePattern: '^_',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
'no-console': 'off',
|
|
66
|
+
'vue/no-unused-components': 'warn',
|
|
67
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
68
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
69
|
+
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
|
|
70
|
+
'vue/multi-word-component-names': 'off',
|
|
71
|
+
'@typescript-eslint/ban-ts-comment': [
|
|
72
|
+
'error',
|
|
73
|
+
{
|
|
74
|
+
'ts-ignore': 'allow-with-description',
|
|
75
|
+
'ts-expect-error': 'allow-with-description',
|
|
76
|
+
'ts-nocheck': true,
|
|
77
|
+
'ts-check': false,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
'vue/attribute-hyphenation': 'off',
|
|
81
|
+
'vue/html-closing-bracket-newline': 'off',
|
|
82
|
+
'vue/html-indent': 'off',
|
|
83
|
+
'vue/max-attributes-per-line': 'off',
|
|
84
|
+
'vue/multiline-html-element-content-newline': 'off',
|
|
85
|
+
'vue/no-mutating-props': 'off',
|
|
86
|
+
'vue/singleline-html-element-content-newline': 'off',
|
|
87
|
+
'no-undef': 'off',
|
|
88
|
+
'spaced-comment': 'off',
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
files: ['**/*.cjs'],
|
|
93
|
+
rules: {
|
|
94
|
+
'@typescript-eslint/no-require-imports': 'off',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
];
|
package/template/index.html
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="zh-CN">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/src/assets/favicon.svg" />
|
|
6
|
-
<meta
|
|
7
|
-
name="viewport"
|
|
8
|
-
content="width=device-width, initial-scale=1, viewport-fit=cover"
|
|
9
|
-
/>
|
|
10
|
-
<title>物联网地下水位监测系统</title>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<div hidden>Copyright © 2026 四川水发勘测设计研究有限公司</div>
|
|
14
|
-
<div id="app"></div>
|
|
15
|
-
<script type="module" src="/src/main.ts"></script>
|
|
16
|
-
</body>
|
|
17
|
-
</html>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/src/assets/favicon.svg" />
|
|
6
|
+
<meta
|
|
7
|
+
name="viewport"
|
|
8
|
+
content="width=device-width, initial-scale=1, viewport-fit=cover"
|
|
9
|
+
/>
|
|
10
|
+
<title>物联网地下水位监测系统</title>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div hidden>Copyright © 2026 四川水发勘测设计研究有限公司</div>
|
|
14
|
+
<div id="app"></div>
|
|
15
|
+
<script type="module" src="/src/main.ts"></script>
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface User {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
role: 'admin' | 'member';
|
|
5
|
-
}
|
|
1
|
+
export interface User {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
role: 'admin' | 'member';
|
|
5
|
+
}
|
package/template/package.json
CHANGED
|
@@ -1,86 +1,88 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "frontend-framework",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"author": "inupedia",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"prepare": "husky install",
|
|
9
|
-
"dev": "vite",
|
|
10
|
-
"build": "vue-tsc -b && vite build",
|
|
11
|
-
"preview": "vite preview",
|
|
12
|
-
"
|
|
13
|
-
"lint
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"pinia": "^3.0.4",
|
|
42
|
-
"pinia-plugin-persistedstate": "^4.7.1",
|
|
43
|
-
"vue": "^3.5.
|
|
44
|
-
"vue-router": "^
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@commitlint/cli": "^
|
|
48
|
-
"@commitlint/config-conventional": "^
|
|
49
|
-
"@commitlint/lint": "^
|
|
50
|
-
"@commitlint/load": "^
|
|
51
|
-
"@eslint/eslintrc": "^3.3.
|
|
52
|
-
"@eslint/js": "^
|
|
53
|
-
"@openapitools/openapi-generator-cli": "^2.
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
55
|
-
"@typescript-eslint/parser": "^8.
|
|
56
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
57
|
-
"@vue/tsconfig": "^0.
|
|
58
|
-
"
|
|
59
|
-
"eslint
|
|
60
|
-
"eslint-config-
|
|
61
|
-
"eslint-
|
|
62
|
-
"eslint-plugin-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"less
|
|
68
|
-
"
|
|
69
|
-
"prettier": "^3.8.
|
|
70
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
71
|
-
"sass-embedded": "^1.
|
|
72
|
-
"stylelint": "^
|
|
73
|
-
"stylelint-config-recommended-vue": "^1.6.1",
|
|
74
|
-
"stylelint-config-standard": "^
|
|
75
|
-
"typescript": "~
|
|
76
|
-
"unplugin-auto-import": "^21.0.0",
|
|
77
|
-
"unplugin-vue-components": "^
|
|
78
|
-
"vite": "^
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"vue-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "frontend-framework",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": "inupedia",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"prepare": "husky install",
|
|
9
|
+
"dev": "vite",
|
|
10
|
+
"build": "vue-tsc -b && vite build",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"typecheck": "vue-tsc -b --pretty false",
|
|
13
|
+
"lint": "eslint src tests --ext .ts,.vue",
|
|
14
|
+
"lint:fix": "eslint src tests --ext .ts,.vue --fix",
|
|
15
|
+
"lint:style": "stylelint \"src/**/*.{vue,css,less,scss}\"",
|
|
16
|
+
"lint:all": "npm run lint && npm run lint:style && npm run prettier",
|
|
17
|
+
"prettier": "prettier --check .",
|
|
18
|
+
"prettier:fix": "prettier --write .",
|
|
19
|
+
"gen:api": "node ./scripts/gen-api.cjs",
|
|
20
|
+
"release": "node scripts/release.mjs",
|
|
21
|
+
"test": "vitest",
|
|
22
|
+
"test:unit": "vitest run",
|
|
23
|
+
"test:run": "vitest run",
|
|
24
|
+
"test:scaffold": "node scripts/test-scaffold.mjs",
|
|
25
|
+
"test:template": "node scripts/test-template.mjs",
|
|
26
|
+
"test:ci": "node scripts/test-pipeline.mjs",
|
|
27
|
+
"verify": "node scripts/verify.mjs"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=22",
|
|
31
|
+
"pnpm": ">=9"
|
|
32
|
+
},
|
|
33
|
+
"husky": {
|
|
34
|
+
"hooks": {
|
|
35
|
+
"pre-commit": "npx lint-staged"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"axios": "^1.16.1",
|
|
40
|
+
"cesium": "^1.141.0",
|
|
41
|
+
"pinia": "^3.0.4",
|
|
42
|
+
"pinia-plugin-persistedstate": "^4.7.1",
|
|
43
|
+
"vue": "^3.5.34",
|
|
44
|
+
"vue-router": "^5.0.7"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@commitlint/cli": "^21.0.1",
|
|
48
|
+
"@commitlint/config-conventional": "^21.0.1",
|
|
49
|
+
"@commitlint/lint": "^21.0.1",
|
|
50
|
+
"@commitlint/load": "^21.0.1",
|
|
51
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
52
|
+
"@eslint/js": "^10.0.1",
|
|
53
|
+
"@openapitools/openapi-generator-cli": "^2.34.0",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^8.59.4",
|
|
55
|
+
"@typescript-eslint/parser": "^8.59.4",
|
|
56
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
57
|
+
"@vue/tsconfig": "^0.9.1",
|
|
58
|
+
"autoprefixer": "^10.5.0",
|
|
59
|
+
"eslint": "^10.4.0",
|
|
60
|
+
"eslint-config-google": "^0.14.0",
|
|
61
|
+
"eslint-config-prettier": "^10.1.8",
|
|
62
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
63
|
+
"eslint-plugin-vue": "^10.9.1",
|
|
64
|
+
"fs-extra": "^11.3.5",
|
|
65
|
+
"husky": "^9.1.7",
|
|
66
|
+
"jsdom": "^29.1.1",
|
|
67
|
+
"less": "^4.6.4",
|
|
68
|
+
"lint-staged": "^17.0.5",
|
|
69
|
+
"prettier": "^3.8.3",
|
|
70
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
71
|
+
"sass-embedded": "^1.100.0",
|
|
72
|
+
"stylelint": "^17.12.0",
|
|
73
|
+
"stylelint-config-recommended-vue": "^1.6.1",
|
|
74
|
+
"stylelint-config-standard": "^40.0.0",
|
|
75
|
+
"typescript": "~6.0.3",
|
|
76
|
+
"unplugin-auto-import": "^21.0.0",
|
|
77
|
+
"unplugin-vue-components": "^32.1.0",
|
|
78
|
+
"vite": "^8.0.14",
|
|
79
|
+
"vite-plugin-static-copy": "^4.1.0",
|
|
80
|
+
"vitest": "^4.1.7",
|
|
81
|
+
"vue-eslint-parser": "^10.4.0",
|
|
82
|
+
"vue-tsc": "^3.3.1"
|
|
83
|
+
},
|
|
84
|
+
"volta": {
|
|
85
|
+
"node": "22.17.0"
|
|
86
|
+
},
|
|
87
|
+
"packageManager": "pnpm@9"
|
|
88
|
+
}
|