@ozdao/prometheus-framework 0.2.156 → 0.2.157
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_virtual/_commonjsHelpers.cjs +1 -1
- package/dist/_virtual/_commonjsHelpers.js +5 -3
- package/dist/_virtual/purify.cjs +1 -0
- package/dist/_virtual/purify.js +4 -0
- package/dist/builder.js +822 -0
- package/dist/builder.mjs +801 -0
- package/dist/{main-D_RRsfEH.mjs → main-Ba3SEUWZ.mjs} +1812 -1774
- package/dist/main-ldzk-jIP.js +92 -0
- package/dist/main.css +1 -1
- package/dist/node_modules/dompurify/dist/purify.cjs +2 -0
- package/dist/node_modules/dompurify/dist/purify.js +531 -0
- package/dist/node_modules/isomorphic-dompurify/browser.cjs +1 -0
- package/dist/node_modules/isomorphic-dompurify/browser.js +7 -0
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/regex.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/regex.js +4 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/rng.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/rng.js +9 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/stringify.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/stringify.js +13 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/v4.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/v4.js +10 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/validate.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +47 -30
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +9 -9
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +10 -10
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +34 -34
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +27 -27
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +58 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +11 -180
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +190 -0
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +9 -7
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +48 -43
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +41 -63
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +37 -36
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +3 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +105 -53
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +92 -98
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Viewer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Viewer.vue.js +39 -0
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +13 -12
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +13 -15
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.js +34 -33
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +13 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +18 -18
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/router/spots.js +4 -0
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{web-3rnOWrQO.mjs → web-CT2tGYho.mjs} +1 -1
- package/dist/{web-C04IcLk4.js → web-DWjMBTNi.js} +1 -1
- package/package.json +3 -2
- package/src/builder/builder.js +14 -0
- package/src/builder/modes/spa.dev.js +100 -0
- package/src/builder/modes/spa.prod.js +59 -0
- package/src/builder/modes/ssr.dev.js +184 -0
- package/src/builder/modes/ssr.prod.js +76 -0
- package/src/builder/ssr/ssr-render-html.js +57 -0
- package/src/builder/ssr/ssr-transform-webpack-stats.js +54 -0
- package/src/builder/templates/page.html +37 -0
- package/src/builder/templates/screen.html +33 -0
- package/src/builder/utils/hot-reload.js +5 -0
- package/src/builder/webpack/index.js +13 -0
- package/src/builder/webpack/webpack.config.base.js +127 -0
- package/src/builder/webpack/webpack.config.client.js +78 -0
- package/src/builder/webpack/webpack.config.server.js +31 -0
- package/src/builder/webpack/webpack.config.spa.js +80 -0
- package/src/builder/webpack/webpack.config.ssr.js +57 -0
- package/src/components/Breadcrumbs/Breadcrumbs.vue +39 -16
- package/src/components/Field/Field.vue +21 -2
- package/src/components/Popup/Popup.vue +1 -1
- package/src/modules/auth/store/auth.js +1 -2
- package/src/modules/backoffice/components/layouts/Backoffice.vue +36 -62
- package/src/modules/backoffice/components/pages/Dashboard.vue +2 -125
- package/src/modules/backoffice/components/partials/Sidebar.vue +176 -0
- package/src/modules/backoffice/router/admin.js +0 -15
- package/src/modules/backoffice/router/backoffice.js +5 -1
- package/src/modules/community/components/blocks/CardBlogpost.vue +6 -1
- package/src/modules/community/components/pages/BlogPost.vue +30 -67
- package/src/modules/community/components/sections/Comments.vue +1 -1
- package/src/modules/community/router/blogposts.js +4 -0
- package/src/modules/constructor/components/elements/Textarea.vue +197 -79
- package/src/modules/constructor/components/sections/Constructor.vue +19 -32
- package/src/modules/constructor/components/sections/Viewer.vue +53 -0
- package/src/modules/globals/components/layouts/Client.vue +21 -7
- package/src/modules/globals/components/layouts/Empty.vue +1 -6
- package/src/modules/globals/components/pages/404.vue +1 -1
- package/src/modules/globals/components/sections/SectionPageTitle.vue +2 -2
- package/src/modules/globals/mixins/mixins.js +129 -97
- package/src/modules/landing/router/landing.js +3 -0
- package/src/modules/marketplace/components/pages/Catalog.vue +1 -1
- package/src/modules/middlewares/client/auth.validation.js +14 -15
- package/src/modules/orders/orders.client.js +4 -2
- package/src/modules/organizations/router/organizations.js +9 -3
- package/src/modules/pages/controllers/factories/pages.factory.js +106 -0
- package/src/modules/pages/controllers/routes/pages.routes.js +24 -0
- package/src/modules/pages/models/page.model.js +18 -11
- package/src/modules/pages/pages.client.js +40 -0
- package/src/modules/pages/pages.server.js +32 -0
- package/src/modules/pages/views/components/blocks/CardPage.vue +123 -0
- package/src/modules/pages/views/components/pages/Page.vue +173 -0
- package/src/modules/pages/views/components/pages/PageEdit.vue +121 -0
- package/src/modules/pages/views/components/pages/Pages.vue +60 -0
- package/src/modules/pages/views/components/partials/SidebarPages.vue +112 -0
- package/src/modules/pages/views/router/pages.backoffice.router.js +46 -0
- package/src/modules/pages/views/router/pages.router.js +25 -0
- package/src/modules/pages/views/store/pages.js +78 -0
- package/src/modules/pages/views/store/pages.store.js +5 -0
- package/src/modules/products/controllers/leftovers.controller.js +1 -1
- package/src/modules/spots/router/spots.js +4 -0
- package/src/styles/base/all.scss +66 -53
- package/dist/index-BshfsiQG.js +0 -220
- package/dist/index-C-8xOJnM.mjs +0 -244
- package/dist/index-C-DW6ra2.js +0 -260
- package/dist/index-CDbtWkBj.js +0 -243
- package/dist/index-D4j29ivg.mjs +0 -261
- package/dist/index-DKtnWDNC.mjs +0 -221
- package/dist/index-DNI4aUP2.js +0 -259
- package/dist/index-Tcyehi73.mjs +0 -260
- package/dist/main-3Vn8SU2y.mjs +0 -14509
- package/dist/main-5IrI2IOV.js +0 -92
- package/dist/main-BFKp44Ze.mjs +0 -14509
- package/dist/main-BF_nMkug.js +0 -92
- package/dist/main-BHr0-Z3t.mjs +0 -14510
- package/dist/main-BY2OvGB9.mjs +0 -14509
- package/dist/main-Bcj0J6tP.mjs +0 -14509
- package/dist/main-Bq5YvSWe.mjs +0 -14509
- package/dist/main-BxHxhrZ_.js +0 -92
- package/dist/main-By5Tbyui.js +0 -92
- package/dist/main-CEoQQpJV.js +0 -92
- package/dist/main-CI9l9xMs.js +0 -92
- package/dist/main-Ckn0Sslr.js +0 -92
- package/dist/main-DBv451oC.js +0 -92
- package/dist/main-DPg58GOU.mjs +0 -14509
- package/dist/main-DTHFR7H_.mjs +0 -14510
- package/dist/main-DxyAONrm.mjs +0 -14438
- package/dist/main-gY_284gJ.js +0 -92
- package/dist/main-wXdocsbd.js +0 -92
- package/dist/middlewares.server.js +0 -19
- package/dist/middlewares.server.mjs +0 -20
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +0 -89
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +0 -95
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +0 -26
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +0 -57
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +0 -83
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +0 -127
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +0 -13
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +0 -77
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +0 -103
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +0 -36
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +0 -44
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +0 -125
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +0 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +0 -47
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +0 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +0 -46
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +0 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +0 -65
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +0 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -67
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +0 -30
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +0 -42
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +0 -26
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +0 -42
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +0 -26
- package/dist/queryProcessor-g8208K6g.mjs +0 -178
- package/dist/queryProcessor-haY_gPGg.js +0 -177
- package/dist/web-5eyiz9L7.mjs +0 -54
- package/dist/web-BPUCAST-.mjs +0 -54
- package/dist/web-Be96Xqd4.mjs +0 -54
- package/dist/web-BmdKi_fZ.js +0 -1
- package/dist/web-Bqpk8Mpk.js +0 -1
- package/dist/web-BwHcRwYc.mjs +0 -54
- package/dist/web-BzUFKqzw.js +0 -1
- package/dist/web-CcFPvlkl.js +0 -1
- package/dist/web-CgjTW1bL.js +0 -1
- package/dist/web-Cw0ijzjY.js +0 -1
- package/dist/web-CwTWV4ca.mjs +0 -54
- package/dist/web-DHeZE1jJ.js +0 -1
- package/dist/web-DZUec7pP.js +0 -1
- package/dist/web-Dh669DqQ.mjs +0 -54
- package/dist/web-DkWpHYrh.mjs +0 -54
- package/dist/web-Dt2RCU54.js +0 -1
- package/dist/web-krQQeSb6.mjs +0 -54
- package/dist/web-nqFW_Sd1.mjs +0 -54
- package/src/modules/community/controllers/comments.controller.aggr.js +0 -280
- package/src/modules/community/controllers/comments.controller.populate.js +0 -180
- package/src/modules/constructor/components/elements/H2.vue +0 -102
- package/src/modules/pages/components/pages/Page.vue +0 -174
- package/src/modules/pages/components/pages/PageEdit.vue +0 -159
- package/src/modules/pages/components/pages/Pages.vue +0 -108
- package/src/modules/pages/controllers/pages.controller.js +0 -71
- package/src/modules/pages/router/pages.router.js +0 -15
- package/src/modules/pages/routes/pages.routes.js +0 -30
- package/src/modules/pages/store/pages.js +0 -94
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ozdao/prometheus-framework",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.157",
|
4
4
|
"description": "Web3 Framework focused on user experience and ease of development.",
|
5
5
|
"author": "OZ DAO <hello@ozdao.dev>",
|
6
6
|
"license": "GPL-3.0-or-later",
|
@@ -157,10 +157,11 @@
|
|
157
157
|
".": "./dist/prometheus-framework.es.js"
|
158
158
|
},
|
159
159
|
"scripts": {
|
160
|
-
"build": "vite build --config vite.components.config.js && vite build --config vite.modules.client.config.js && vite build --config vite.modules.server.config.js",
|
160
|
+
"build": "vite build --config vite.components.config.js && vite build --config vite.modules.client.config.js && vite build --config vite.modules.server.config.js && vite build --config vite.builder.config.js",
|
161
161
|
"build:components": "vite build --config vite.components.config.js",
|
162
162
|
"build:client": "vite build --config vite.modules.client.config.js",
|
163
163
|
"build:server": "vite build --config vite.modules.server.config.js",
|
164
|
+
"build:builder": "vite build --config vite.builder.config.js",
|
164
165
|
"test": "vue-tsc --noEmit",
|
165
166
|
"docs:dev": "vitepress dev docs",
|
166
167
|
"docs:build": "vitepress build docs",
|
@@ -0,0 +1,14 @@
|
|
1
|
+
const createSsrDevServer = require('./modes/ssr.dev.js');
|
2
|
+
const createSsrProdServer = require('./modes/ssr.prod.js');
|
3
|
+
const createSpaDevServer = require('./modes/spa.dev.js');
|
4
|
+
const createSpaProdServer = require('./modes/spa.prod.js');
|
5
|
+
|
6
|
+
const webpackConfigs = require('./webpack');
|
7
|
+
|
8
|
+
module.exports = {
|
9
|
+
createSsrDevServer,
|
10
|
+
createSsrProdServer,
|
11
|
+
createSpaDevServer,
|
12
|
+
createSpaProdServer,
|
13
|
+
webpackConfigs
|
14
|
+
};
|
@@ -0,0 +1,100 @@
|
|
1
|
+
const path = require("path");
|
2
|
+
const webpack = require("webpack");
|
3
|
+
const compression = require('compression');
|
4
|
+
const readline = require('readline');
|
5
|
+
const chalk = require('chalk');
|
6
|
+
const devMiddleware = require("webpack-dev-middleware");
|
7
|
+
const hotMiddleware = require("webpack-hot-middleware");
|
8
|
+
const history = require('connect-history-api-fallback');
|
9
|
+
const express = require('express');
|
10
|
+
|
11
|
+
module.exports = function createSpaDevServer(projectRoot, { spaConfig, serverConfig, createServerPath }) {
|
12
|
+
const spaCompiler = webpack(spaConfig);
|
13
|
+
const serverCompiler = webpack(serverConfig);
|
14
|
+
|
15
|
+
const createDevRenderer = () => {
|
16
|
+
const progressPlugin = new webpack.ProgressPlugin((percentage, message, ...args) => {
|
17
|
+
readline.clearLine(process.stdout, 0);
|
18
|
+
readline.cursorTo(process.stdout, 0);
|
19
|
+
process.stdout.write(
|
20
|
+
chalk.greenBright.bold(`${(percentage * 100).toFixed(2)}% `) +
|
21
|
+
chalk.blueBright(message) +
|
22
|
+
' ' +
|
23
|
+
args.map(arg => chalk.yellow(arg)).join(' ')
|
24
|
+
);
|
25
|
+
});
|
26
|
+
spaConfig.plugins.push(progressPlugin);
|
27
|
+
};
|
28
|
+
|
29
|
+
let serverInstance;
|
30
|
+
const clientDevMiddleware = devMiddleware(spaCompiler, {
|
31
|
+
publicPath: spaConfig.output.publicPath,
|
32
|
+
stats: false,
|
33
|
+
});
|
34
|
+
const clientHotMiddleware = hotMiddleware(spaCompiler, {
|
35
|
+
heartbeat: 5000,
|
36
|
+
log: false
|
37
|
+
});
|
38
|
+
|
39
|
+
const port = process.env.PORT || 8080;
|
40
|
+
|
41
|
+
// Функция для запуска сервера
|
42
|
+
const startServer = async () => {
|
43
|
+
if (serverInstance) {
|
44
|
+
serverInstance.close();
|
45
|
+
}
|
46
|
+
// Очистка кэша модуля и всех его зависимостей
|
47
|
+
Object.keys(require.cache).forEach((id) => {
|
48
|
+
delete require.cache[id];
|
49
|
+
});
|
50
|
+
const { createServer } = require(path.resolve(projectRoot, createServerPath));
|
51
|
+
let { app, server, env } = await createServer();
|
52
|
+
|
53
|
+
// Используем connect-history-api-fallback перед другими middleware
|
54
|
+
app.use(history());
|
55
|
+
|
56
|
+
app.use(clientDevMiddleware);
|
57
|
+
app.use(clientHotMiddleware);
|
58
|
+
|
59
|
+
app.use(compression());
|
60
|
+
|
61
|
+
// Удаляем статическое обслуживание файлов
|
62
|
+
// app.use(express.static(path.resolve(projectRoot, "builds/web/client")));
|
63
|
+
|
64
|
+
// Обрабатываем все маршруты
|
65
|
+
app.get('*', (req, res, next) => {
|
66
|
+
const filename = path.join(spaCompiler.outputPath, 'index.html');
|
67
|
+
spaCompiler.outputFileSystem.readFile(filename, (err, result) => {
|
68
|
+
if (err) {
|
69
|
+
return next(err);
|
70
|
+
}
|
71
|
+
res.set('content-type', 'text/html');
|
72
|
+
res.send(result);
|
73
|
+
res.end();
|
74
|
+
});
|
75
|
+
});
|
76
|
+
|
77
|
+
serverInstance = server;
|
78
|
+
try {
|
79
|
+
await server.listen(port);
|
80
|
+
console.log(`Server started at http://localhost:${port}\n`);
|
81
|
+
} catch (err) {
|
82
|
+
console.error(err);
|
83
|
+
process.exit(1);
|
84
|
+
}
|
85
|
+
};
|
86
|
+
|
87
|
+
// Настройка наблюдения за изменениями
|
88
|
+
serverCompiler.watch({}, async (err, stats) => {
|
89
|
+
if (err) {
|
90
|
+
console.error(err);
|
91
|
+
return;
|
92
|
+
}
|
93
|
+
console.log(stats.toString(serverConfig.stats));
|
94
|
+
console.log('Server.js has changed, updating...');
|
95
|
+
await startServer();
|
96
|
+
});
|
97
|
+
|
98
|
+
createDevRenderer();
|
99
|
+
return startServer;
|
100
|
+
};
|
@@ -0,0 +1,59 @@
|
|
1
|
+
const fs = require("fs");
|
2
|
+
const path = require("path");
|
3
|
+
const compression = require('compression');
|
4
|
+
const express = require('express');
|
5
|
+
const history = require('connect-history-api-fallback');
|
6
|
+
|
7
|
+
module.exports = function createSpaProdServer(projectRoot, { createServerPath }) {
|
8
|
+
let serverInstance;
|
9
|
+
const port = process.env.PORT || 8080;
|
10
|
+
|
11
|
+
// Функция для запуска сервера
|
12
|
+
const startServer = async () => {
|
13
|
+
const { createServer } = require(path.resolve(projectRoot, createServerPath));
|
14
|
+
|
15
|
+
let { app, server } = await createServer();
|
16
|
+
|
17
|
+
// Включаем сжатие ответов
|
18
|
+
app.use(compression());
|
19
|
+
|
20
|
+
// Статическое обслуживание сбилженных файлов
|
21
|
+
app.use(express.static(path.resolve(projectRoot, "builds/web/spa")));
|
22
|
+
|
23
|
+
app.use(history({
|
24
|
+
index: '/index.html'
|
25
|
+
}));
|
26
|
+
|
27
|
+
app.get('*', (req, res) => {
|
28
|
+
fs.readFile(path.resolve(projectRoot, 'builds/web/spa', 'index.html'), 'utf-8', (err, content) => {
|
29
|
+
if (err) {
|
30
|
+
console.log('We cannot open "index.html" file.');
|
31
|
+
res.writeHead(500, {
|
32
|
+
'Content-Type': 'text/plain; charset=utf-8'
|
33
|
+
});
|
34
|
+
res.end('Internal Server Error');
|
35
|
+
return;
|
36
|
+
}
|
37
|
+
|
38
|
+
res.writeHead(200, {
|
39
|
+
'Content-Type': 'text/html; charset=utf-8'
|
40
|
+
});
|
41
|
+
|
42
|
+
res.end(content);
|
43
|
+
});
|
44
|
+
});
|
45
|
+
|
46
|
+
// Запуск сервера
|
47
|
+
serverInstance = server;
|
48
|
+
|
49
|
+
try {
|
50
|
+
await server.listen(port);
|
51
|
+
console.log(`Production server started at http://localhost:${port}\n`);
|
52
|
+
} catch (err) {
|
53
|
+
console.error(err);
|
54
|
+
process.exit(1);
|
55
|
+
}
|
56
|
+
};
|
57
|
+
|
58
|
+
return startServer;
|
59
|
+
};
|
@@ -0,0 +1,184 @@
|
|
1
|
+
const path = require("path");
|
2
|
+
const webpack = require("webpack");
|
3
|
+
const compression = require('compression');
|
4
|
+
const readline = require('readline');
|
5
|
+
const chalk = require('chalk');
|
6
|
+
|
7
|
+
const devMiddleware = require("webpack-dev-middleware");
|
8
|
+
const hotMiddleware = require("webpack-hot-middleware");
|
9
|
+
|
10
|
+
const { createHtmlRenderer } = require("../ssr/ssr-render-html.js");
|
11
|
+
const { transformDevStats } = require("../ssr/ssr-transform-webpack-stats.js");
|
12
|
+
|
13
|
+
module.exports = function createSsrDevServer(projectRoot, { clientConfig, serverConfig, ssrConfig, createServerPath }) {
|
14
|
+
const clientCompiler = webpack(clientConfig);
|
15
|
+
const serverCompiler = webpack(serverConfig);
|
16
|
+
const ssrCompiler = webpack(ssrConfig);
|
17
|
+
|
18
|
+
const createDevRenderer = (onUpdate) => {
|
19
|
+
|
20
|
+
const createHotReloadingServerRenderer = (config) => {
|
21
|
+
const progressPlugin = new webpack.ProgressPlugin((percentage, message, ...args) => {
|
22
|
+
|
23
|
+
readline.clearLine(process.stdout, 0);
|
24
|
+
readline.cursorTo(process.stdout, 0);
|
25
|
+
|
26
|
+
process.stdout.write(
|
27
|
+
chalk.greenBright.bold(`${(percentage * 100).toFixed(2)}% `) +
|
28
|
+
chalk.blueBright(message) +
|
29
|
+
' ' +
|
30
|
+
args.map(arg => chalk.yellow(arg)).join(' ')
|
31
|
+
);
|
32
|
+
});
|
33
|
+
|
34
|
+
config.plugins = config.plugins || [];
|
35
|
+
config.plugins.push(progressPlugin);
|
36
|
+
|
37
|
+
let renderApp = null;
|
38
|
+
let setCompilationDone = null;
|
39
|
+
|
40
|
+
let ssrCompilation = new Promise((resolve) => {
|
41
|
+
setCompilationDone = resolve;
|
42
|
+
});
|
43
|
+
|
44
|
+
ssrCompiler.watch(
|
45
|
+
{
|
46
|
+
"info-verbosity": "none",
|
47
|
+
},
|
48
|
+
(error, stats) => {
|
49
|
+
if (error) {
|
50
|
+
console.error(chalk.red("Server critical error"));
|
51
|
+
console.error(JSON.stringify(error, null, 2)); //
|
52
|
+
throw error;
|
53
|
+
return
|
54
|
+
}
|
55
|
+
|
56
|
+
const jsonStats = stats.toJson();
|
57
|
+
|
58
|
+
if (stats.hasErrors()) {
|
59
|
+
console.error(chalk.red("Client compilation error"));
|
60
|
+
jsonStats.errors.forEach((err) => console.error(chalk.red(err.details)));
|
61
|
+
return;
|
62
|
+
}
|
63
|
+
|
64
|
+
const { entrypoints, outputPath } = jsonStats;
|
65
|
+
const { main: { assets: [mainChunkPath] }} = entrypoints;
|
66
|
+
const { render } = require(path.resolve(outputPath, mainChunkPath.name));
|
67
|
+
renderApp = render;
|
68
|
+
setCompilationDone();
|
69
|
+
}
|
70
|
+
);
|
71
|
+
|
72
|
+
return async (stuff) => {
|
73
|
+
await ssrCompilation;
|
74
|
+
|
75
|
+
const result = await renderApp(stuff);
|
76
|
+
|
77
|
+
return result;
|
78
|
+
};
|
79
|
+
};
|
80
|
+
|
81
|
+
const renderApp = createHotReloadingServerRenderer(ssrConfig);
|
82
|
+
const renderHtml = createHtmlRenderer(onUpdate);
|
83
|
+
|
84
|
+
return async (stuff, { stats, outputFileSystem }) => {
|
85
|
+
const { html, meta, state, statusCode } = await renderApp(stuff);
|
86
|
+
|
87
|
+
const { head, body } = transformDevStats(stats.toJson(), outputFileSystem);
|
88
|
+
|
89
|
+
const userState = JSON.stringify(state.user);
|
90
|
+
|
91
|
+
const completeHtml = await renderHtml({
|
92
|
+
appHtml: html,
|
93
|
+
meta,
|
94
|
+
head,
|
95
|
+
body,
|
96
|
+
userState
|
97
|
+
});
|
98
|
+
return { html: completeHtml, statusCode };
|
99
|
+
};
|
100
|
+
};
|
101
|
+
|
102
|
+
let serverInstance;
|
103
|
+
let rendererInstance;
|
104
|
+
|
105
|
+
const clientDevMiddleware = devMiddleware(clientCompiler, {
|
106
|
+
publicPath: clientConfig.output.publicPath,
|
107
|
+
serverSideRender: true,
|
108
|
+
stats: false,
|
109
|
+
});
|
110
|
+
|
111
|
+
const clientHotMiddleware = hotMiddleware(clientCompiler, {
|
112
|
+
heartbeat: 5000,
|
113
|
+
log: false
|
114
|
+
});
|
115
|
+
|
116
|
+
const port = process.env.PORT || 8080;
|
117
|
+
|
118
|
+
// Функция для запуска сервера
|
119
|
+
const startServer = async () => {
|
120
|
+
if (serverInstance) {
|
121
|
+
serverInstance.close();
|
122
|
+
}
|
123
|
+
|
124
|
+
// Рекурсивная функция для очистки кэша модуля и всех его зависимостей
|
125
|
+
Object.keys(require.cache).forEach((id) => {
|
126
|
+
delete require.cache[id];
|
127
|
+
});
|
128
|
+
|
129
|
+
const { createServer } = require(path.resolve(projectRoot, createServerPath));
|
130
|
+
|
131
|
+
let { app, server, env } = await createServer();
|
132
|
+
|
133
|
+
app.use(clientDevMiddleware);
|
134
|
+
app.use(clientHotMiddleware);
|
135
|
+
|
136
|
+
// Код для SSR клиентской части. Этот блок компилирует приложение
|
137
|
+
if (!rendererInstance) {
|
138
|
+
rendererInstance = createDevRenderer(() => {
|
139
|
+
clientCompiler.hooks.done.tap("reload", () => {
|
140
|
+
setTimeout(() => {
|
141
|
+
require("webpack-hot-middleware/client").reload();
|
142
|
+
}, 500);
|
143
|
+
});
|
144
|
+
});
|
145
|
+
}
|
146
|
+
|
147
|
+
// и сервит его по всем роутам, а там внутри приложения мы уже разбираемся че показывать.
|
148
|
+
app.use("/*", async (req, res) => {
|
149
|
+
const result = await rendererInstance({
|
150
|
+
url: req.originalUrl,
|
151
|
+
cookies: req.cookies,
|
152
|
+
languages: req.acceptsLanguages()
|
153
|
+
}, res.locals.webpack.devMiddleware);
|
154
|
+
|
155
|
+
// тут отправляем статус код и сгенерированный html
|
156
|
+
res.status(result.statusCode).header("Content-Type", "text/html; charset=utf-8").send(result.html);
|
157
|
+
});
|
158
|
+
|
159
|
+
app.use(compression());
|
160
|
+
|
161
|
+
serverInstance = server;
|
162
|
+
|
163
|
+
try {
|
164
|
+
await server.listen(port);
|
165
|
+
console.log(`Server started at localhost:${port}\n`);
|
166
|
+
} catch (err) {
|
167
|
+
console.error(err);
|
168
|
+
process.exit(1);
|
169
|
+
}
|
170
|
+
};
|
171
|
+
|
172
|
+
// Настройка наблюдения за изменениями
|
173
|
+
serverCompiler.watch({}, async (err, stats) => {
|
174
|
+
if (err) {
|
175
|
+
console.error(err);
|
176
|
+
return;
|
177
|
+
}
|
178
|
+
console.log(stats.toString(serverConfig.stats));
|
179
|
+
console.log('Server.js has changed, updating...');
|
180
|
+
await startServer();
|
181
|
+
});
|
182
|
+
|
183
|
+
return startServer;
|
184
|
+
};
|
@@ -0,0 +1,76 @@
|
|
1
|
+
const path = require("path");
|
2
|
+
const express = require("express");
|
3
|
+
|
4
|
+
const { transformProdStats } = require('../ssr/ssr-transform-webpack-stats.js');
|
5
|
+
|
6
|
+
const { renderHtml } = require('../ssr/ssr-render-html.js');
|
7
|
+
|
8
|
+
module.exports =
|
9
|
+
function createSsrProdServer(projectRoot, {clientConfig,serverConfig, createServerPath}) {
|
10
|
+
|
11
|
+
const clientStats = require(path.join(projectRoot, "builds/web/client/stats.json"));
|
12
|
+
const serverManifest = require(path.join(projectRoot, "builds/web/server/manifest.json"));
|
13
|
+
|
14
|
+
const { createServer } = require(path.resolve(projectRoot, createServerPath));
|
15
|
+
|
16
|
+
const startServer = async () => {
|
17
|
+
const { app, server, env } = await createServer();
|
18
|
+
|
19
|
+
app.use(
|
20
|
+
clientConfig.output.publicPath,
|
21
|
+
express.static(path.resolve(projectRoot, "builds/web/client"), {
|
22
|
+
maxAge: '1d' // Кэширование на 1 день
|
23
|
+
})
|
24
|
+
);
|
25
|
+
|
26
|
+
const { render } = require(path.join(
|
27
|
+
serverConfig.output.path,
|
28
|
+
serverManifest["main.js"]
|
29
|
+
));
|
30
|
+
|
31
|
+
const { head, body } = transformProdStats({
|
32
|
+
stats: clientStats,
|
33
|
+
publicPath: clientConfig.output.publicPath,
|
34
|
+
});
|
35
|
+
|
36
|
+
app.use("/*", async (req, res) => {
|
37
|
+
const { html, meta, state, statusCode } = await render({
|
38
|
+
url: req.originalUrl,
|
39
|
+
cookies: req.cookies,
|
40
|
+
languages: req.acceptsLanguages()
|
41
|
+
});
|
42
|
+
|
43
|
+
if (state.NotFound) {
|
44
|
+
res.status(404);
|
45
|
+
}
|
46
|
+
|
47
|
+
const userState = JSON.stringify(state.user);
|
48
|
+
const completeHtml = await renderHtml({
|
49
|
+
appHtml: html,
|
50
|
+
meta,
|
51
|
+
head,
|
52
|
+
body,
|
53
|
+
userState
|
54
|
+
});
|
55
|
+
|
56
|
+
res.status(statusCode).header("Content-Type", "text/html; charset=utf-8").send(completeHtml);
|
57
|
+
});
|
58
|
+
|
59
|
+
return server;
|
60
|
+
};
|
61
|
+
|
62
|
+
const port = process.env.PORT || 8080;
|
63
|
+
|
64
|
+
const start = async () => {
|
65
|
+
const server = await startServer();
|
66
|
+
|
67
|
+
try {
|
68
|
+
server.listen(port, () => console.log(`Server running on port ${port}`));
|
69
|
+
} catch (err) {
|
70
|
+
console.error(err);
|
71
|
+
process.exit(1);
|
72
|
+
}
|
73
|
+
};
|
74
|
+
|
75
|
+
return start;
|
76
|
+
};
|
@@ -0,0 +1,57 @@
|
|
1
|
+
const path = require("path");
|
2
|
+
const Mustache = require("mustache");
|
3
|
+
const chokidar = require("chokidar");
|
4
|
+
const { promises: { readFile } } = require("fs");
|
5
|
+
|
6
|
+
const templatePath = path.resolve(__dirname,"../templates/page.html");
|
7
|
+
|
8
|
+
let template;
|
9
|
+
|
10
|
+
const renderHtml = async (stuff) => {
|
11
|
+
if (!template) {
|
12
|
+
const buffer = await readFile(templatePath);
|
13
|
+
template = buffer.toString();
|
14
|
+
}
|
15
|
+
|
16
|
+
const data = {
|
17
|
+
...stuff,
|
18
|
+
googleTagId: process.env.GOOGLE_TAG_ID,
|
19
|
+
googleMapApiKey: process.env.GOOGLE_MAPS_API_KEY
|
20
|
+
};
|
21
|
+
|
22
|
+
return Mustache.render(template, data);
|
23
|
+
};
|
24
|
+
|
25
|
+
const createHtmlRenderer = (onTemplateUpdate) => {
|
26
|
+
let shouldReload = true;
|
27
|
+
let currentTemplate;
|
28
|
+
|
29
|
+
chokidar.watch(templatePath).on("change", () => {
|
30
|
+
shouldReload = true;
|
31
|
+
onTemplateUpdate();
|
32
|
+
});
|
33
|
+
|
34
|
+
const loadTemplate = async () => {
|
35
|
+
if (!shouldReload) return;
|
36
|
+
const buffer = await readFile(templatePath);
|
37
|
+
currentTemplate = buffer.toString();
|
38
|
+
shouldReload = false;
|
39
|
+
};
|
40
|
+
|
41
|
+
return async (stuff) => {
|
42
|
+
await loadTemplate();
|
43
|
+
|
44
|
+
const data = {
|
45
|
+
...stuff,
|
46
|
+
googleTagId: process.env.GOOGLE_TAG_ID,
|
47
|
+
googleMapApiKey: process.env.GOOGLE_MAPS_API_KEY
|
48
|
+
};
|
49
|
+
|
50
|
+
return Mustache.render(currentTemplate, data);
|
51
|
+
};
|
52
|
+
};
|
53
|
+
|
54
|
+
module.exports = {
|
55
|
+
createHtmlRenderer,
|
56
|
+
renderHtml,
|
57
|
+
};
|
@@ -0,0 +1,54 @@
|
|
1
|
+
const normalizeAssets = (assets) => {
|
2
|
+
if (Array.isArray(assets)) return assets;
|
3
|
+
if (typeof assets === "object") return Object.values(assets);
|
4
|
+
return [assets];
|
5
|
+
};
|
6
|
+
|
7
|
+
const transformDevStats = (stats, outputFileSystem) => {
|
8
|
+
const {
|
9
|
+
assetsByChunkName: { main },
|
10
|
+
outputPath,
|
11
|
+
publicPath,
|
12
|
+
} = stats;
|
13
|
+
|
14
|
+
const head = `
|
15
|
+
<style>
|
16
|
+
${normalizeAssets(main)
|
17
|
+
.filter((path) => path.endsWith(".css"))
|
18
|
+
.map((path) =>
|
19
|
+
outputFileSystem.readFileSync(path.join(outputPath, path))
|
20
|
+
)
|
21
|
+
.join("\n")}
|
22
|
+
</style>
|
23
|
+
`;
|
24
|
+
|
25
|
+
const body = normalizeAssets(main)
|
26
|
+
.filter((path) => path.endsWith(".js"))
|
27
|
+
.map((path) => `<script src="${publicPath}${path}"></script>`)
|
28
|
+
.join("\n");
|
29
|
+
|
30
|
+
return { head, body };
|
31
|
+
};
|
32
|
+
|
33
|
+
const transformProdStats = ({ stats, publicPath }) => {
|
34
|
+
const {
|
35
|
+
assetsByChunkName: { main },
|
36
|
+
} = stats;
|
37
|
+
|
38
|
+
const head = normalizeAssets(main)
|
39
|
+
.filter((path) => path.endsWith(".css"))
|
40
|
+
.map((path) => `<link rel="stylesheet" href="${publicPath}${path}">`)
|
41
|
+
.join("\n");
|
42
|
+
|
43
|
+
const body = normalizeAssets(main)
|
44
|
+
.filter((path) => path.endsWith(".js"))
|
45
|
+
.map((path) => `<script src="${publicPath}${path}"></script>`)
|
46
|
+
.join("\n");
|
47
|
+
|
48
|
+
return { head, body };
|
49
|
+
};
|
50
|
+
|
51
|
+
module.exports = {
|
52
|
+
transformDevStats,
|
53
|
+
transformProdStats,
|
54
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<!-- <!DOCTYPE html> -->
|
2
|
+
<html {{{ meta.htmlAttrs }}}>
|
3
|
+
<head {{{ meta.headAttrs }}}>
|
4
|
+
{{{ meta.head }}}
|
5
|
+
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
|
6
|
+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
|
7
|
+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
|
8
|
+
<link rel="manifest" href="/favicon/site.webmanifest">
|
9
|
+
<link rel="mask-icon" href="/favicon/safari-pinned-tab.svg" color="#5bbad5">
|
10
|
+
<meta name="msapplication-TileColor" content="#000000">
|
11
|
+
<meta name="theme-color" content="#ffffff">
|
12
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
13
|
+
{{{ head }}}
|
14
|
+
<!-- Sign in with Apple -->
|
15
|
+
<!-- <script type="text/javascript" src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"></script> -->
|
16
|
+
</head>
|
17
|
+
<!-- Google tag (gtag.js) -->
|
18
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id={{googleTagId}}"></script>
|
19
|
+
|
20
|
+
<body {{{ meta.bodyAttrs }}}>
|
21
|
+
<div id="app">{{{ appHtml }}}</div>
|
22
|
+
|
23
|
+
<script type="application/json" data-user-state>
|
24
|
+
{{{ userState }}}
|
25
|
+
</script>
|
26
|
+
|
27
|
+
<script>
|
28
|
+
window.dataLayer = window.dataLayer || [];
|
29
|
+
function gtag(){dataLayer.push(arguments);}
|
30
|
+
gtag('js', new Date());
|
31
|
+
|
32
|
+
gtag('config', '{{googleTagId}}');
|
33
|
+
</script>
|
34
|
+
|
35
|
+
{{{ meta.body }}} {{{ body }}}
|
36
|
+
</body>
|
37
|
+
</html>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
|
5
|
+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
|
6
|
+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
|
7
|
+
<!-- <link rel="manifest" href="/favicon/site.webmanifest"> -->
|
8
|
+
<link rel="mask-icon" href="/favicon/safari-pinned-tab.svg" color="#5bbad5">
|
9
|
+
<meta name="msapplication-TileColor" content="#000000">
|
10
|
+
<meta name="theme-color" content="#ffffff">
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
12
|
+
<title>Weeder</title>
|
13
|
+
<!-- Sign in with Apple -->
|
14
|
+
<script type="text/javascript" src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"></script>
|
15
|
+
<!-- Google tag (gtag.js) -->
|
16
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= googleTagId %>"></script>
|
17
|
+
<script>
|
18
|
+
window.dataLayer = window.dataLayer || [];
|
19
|
+
function gtag(){dataLayer.push(arguments);}
|
20
|
+
gtag('js', new Date());
|
21
|
+
|
22
|
+
gtag('config', '<%= googleTagId %>');
|
23
|
+
</script>
|
24
|
+
<!-- Google Map Api -->
|
25
|
+
<script src="https://maps.googleapis.com/maps/api/js?key=<%= googleMapApiKey %>&libraries=places&language=en" async=""></script>
|
26
|
+
<link rel="stylesheet" type="text/css" href="/main.css">
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<div id="app"></div>
|
30
|
+
|
31
|
+
<script src="/main.js"></script>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
const baseConfig = require('./webpack.config.base');
|
2
|
+
const clientConfig = require('./webpack.config.client');
|
3
|
+
const serverConfig = require('./webpack.config.server');
|
4
|
+
const spaConfig = require('./webpack.config.spa');
|
5
|
+
const ssrConfig = require('./webpack.config.ssr');
|
6
|
+
|
7
|
+
module.exports = {
|
8
|
+
baseConfig,
|
9
|
+
clientConfig,
|
10
|
+
serverConfig,
|
11
|
+
spaConfig,
|
12
|
+
ssrConfig,
|
13
|
+
};
|