j1-template 2021.0.12 → 2021.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/blocks/footer/boxes/legal_statements.proc +4 -0
- data/_includes/themes/j1/layouts/content_generator_blog_archive.html +34 -12
- data/_includes/themes/j1/layouts/content_generator_post.html +7 -5
- data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +1 -1
- data/_includes/themes/j1/modules/connectors/ads +1 -1
- data/_includes/themes/j1/modules/connectors/analytic/google-analytics-legacy.html +36 -0
- data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +1 -1
- data/_includes/themes/j1/modules/connectors/analytics +2 -3
- data/_includes/themes/j1/modules/connectors/comment/disqus.html +1 -1
- data/_includes/themes/j1/modules/navigator/generator.html +6 -6
- data/_includes/themes/j1/procedures/posts/create_series_header.proc +2 -0
- data/_layouts/default.html +11 -1
- data/assets/data/authclient.html +1 -1
- data/assets/data/carousel.json +1 -1
- data/assets/data/fam.html +2 -2
- data/assets/data/galleries.json +2 -2
- data/assets/data/gallery_customizer.html +2 -2
- data/assets/data/menu.html +15 -17
- data/assets/themes/j1/adapter/js/asciidoctor.js +166 -0
- data/assets/themes/j1/adapter/js/carousel.js +30 -1
- data/assets/themes/j1/adapter/js/fam.js +8 -12
- data/assets/themes/j1/adapter/js/j1.js +71 -24
- data/assets/themes/j1/adapter/js/{jf_gallery.js → justifiedGallery.js} +9 -9
- data/assets/themes/j1/adapter/js/{gallery_customizer.js → justifiedGalleryCustomizer.js} +11 -11
- data/assets/themes/j1/adapter/js/logger.js +35 -23
- data/assets/themes/j1/adapter/js/mmenu.js +9 -4
- data/assets/themes/j1/adapter/js/navigator.js +14 -18
- data/assets/themes/j1/adapter/js/themer.js +32 -27
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +25 -7
- data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +14 -2
- data/assets/themes/j1/core/css/vendor.min.css +1 -1
- data/assets/themes/j1/core/js/template.js +6 -6
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +6 -6
- data/assets/themes/j1/core/js/template.min.js.map +1 -0
- data/assets/themes/j1/modules/lightbox/js/lightbox.js +1 -1
- data/assets/themes/j1/modules/lightbox/js/lightbox.min.js +1 -1
- data/assets/themes/j1/modules/log4javascript/docs/backwardsincompatibilities.html +90 -0
- data/assets/themes/j1/modules/log4javascript/docs/distribution.html +87 -0
- data/assets/themes/j1/modules/log4javascript/docs/index.html +190 -0
- data/assets/themes/j1/modules/log4javascript/docs/lite.html +182 -0
- data/assets/themes/j1/modules/log4javascript/docs/manual.html +3217 -0
- data/assets/themes/j1/modules/log4javascript/docs/manual_lite.html +383 -0
- data/assets/themes/j1/modules/log4javascript/docs/quickstart.html +230 -0
- data/assets/themes/j1/modules/log4javascript/docs/whatsnew.html +86 -0
- data/assets/themes/j1/modules/log4javascript/js/log4javascript.js +5826 -0
- data/assets/themes/j1/modules/{util/js/log4javascript.js → log4javascript/js/log4javascript.min.js} +17 -0
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +9 -4
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +1 -1
- data/exe/j1 +1 -1
- data/lib/j1/commands/generate.rb +32 -9
- data/lib/{patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.6 → j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.7}/fastfilereaderext.so +0 -0
- data/lib/{patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.6 → j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.7}/rubyeventmachine.so +0 -0
- data/lib/j1/patches/rubygems/execjs-2.7.0/lib/execjs/external_runtime.rb +246 -0
- data/lib/j1/version.rb +1 -1
- data/lib/j1_app.rb +1 -1
- data/lib/j1_app/j1_auth_manager/auth_manager.rb +8 -2
- data/lib/j1_app/j1_site_manager/static_site.no-cross-origin.rb +94 -0
- data/lib/j1_app/j1_site_manager/static_site.rb +13 -11
- data/lib/starter_web/Gemfile +21 -15
- data/lib/starter_web/_config.yml +7 -48
- data/lib/starter_web/_data/_defaults/j1_config.yml +460 -0
- data/lib/starter_web/_data/_defaults/private.yml +156 -0
- data/lib/starter_web/_data/_defaults/resources.yml +626 -325
- data/lib/starter_web/_data/apps/defaults/{justified_gallery.yml → justifiedGallery.yml} +2 -2
- data/lib/starter_web/_data/apps/defaults/{gallery_customizer.yml → justifiedGalleryCustomizer.yml} +0 -0
- data/lib/starter_web/_data/apps/defaults/{light_gallery.yml → lightGallery.yml} +0 -0
- data/lib/starter_web/_data/apps/{justified_gallery.yml → justifiedGallery.yml} +7 -7
- data/lib/starter_web/_data/apps/{gallery_customizer.yml → justifiedGalleryCustomizer.yml} +0 -0
- data/lib/starter_web/_data/apps/{light_gallery.yml → lightGallery.yml} +0 -0
- data/lib/starter_web/_data/blocks/banner.yml +18 -30
- data/lib/starter_web/_data/blocks/footer.yml +15 -3
- data/lib/starter_web/_data/blocks/panel.yml +4 -6
- data/lib/starter_web/_data/builder/blog_navigator.yml +4 -4
- data/lib/starter_web/_data/j1_config.yml +8 -7
- data/lib/starter_web/_data/modules/authentication.yml +11 -100
- data/lib/starter_web/_data/modules/defaults/log4javascript.yml +37 -40
- data/lib/starter_web/_data/modules/defaults/quicksearch.yml +5 -24
- data/lib/starter_web/_data/modules/fam.yml +13 -2
- data/lib/starter_web/_data/modules/log4javascript.yml +11 -83
- data/lib/starter_web/_data/modules/navigator_menu.yml +26 -7
- data/lib/starter_web/_data/modules/quicksearch.yml +5 -3
- data/lib/starter_web/_data/plugins/defaults/paginator.yml +15 -12
- data/lib/starter_web/_data/plugins/paginator.yml +5 -3
- data/lib/starter_web/_data/private.yml +29 -57
- data/lib/starter_web/_data/private@default.yml +119 -0
- data/lib/starter_web/_data/private@localhost.yml +156 -0
- data/lib/starter_web/_data/resources.yml +33 -16
- data/lib/starter_web/_data/utilities/defaults/util_srv.yml +49 -3
- data/lib/starter_web/_data/utilities/util_srv.yml +8 -65
- data/lib/starter_web/_includes/attributes.asciidoc +10 -6
- data/lib/starter_web/_plugins/asciidoctor-extensions/callout.rb +47 -5
- data/lib/starter_web/_plugins/asciidoctor-extensions/conum.rb +28 -1
- data/lib/starter_web/_plugins/lunr_index.rb +24 -5
- data/lib/starter_web/assets/images/collections/blog/featured/dynamic-web-access.png +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/jamstack-generators.gif +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/jamstack-generators.jpg +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/static-web-access.png +0 -0
- data/lib/starter_web/assets/images/modules/attics/leon-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/machine-generator-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/markus-spiske4-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/icons/j1/j1-256x256.gif +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +45 -46
- data/lib/starter_web/collections/posts/public/featured/_posts/{2020-06-01-about-cookies.adoc → 2020-01-01-about-cookies.adoc} +42 -40
- data/lib/starter_web/collections/posts/public/featured/_posts/{2020-05-01-top-site-generators.adoc → 2021-03-01-site-generators.adoc} +58 -31
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-03-about-j1.adoc +125 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/_includes/attributes.asciidoc +4 -0
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +8 -5
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +8 -5
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +8 -5
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +8 -5
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +2 -2
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +2 -2
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +2 -2
- data/lib/starter_web/dot.gitattributes +1 -1
- data/lib/starter_web/dot.gitignore +5 -1
- data/lib/starter_web/package.json +3 -2
- data/lib/starter_web/pages/public/about/about_site.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/gallery.asciidoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/200_chapter.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/200_chapter.asciidoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +1 -1
- data/lib/starter_web/pages/public/blog/navigator/archive.html +9 -7
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +9 -7
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +16 -11
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +9 -7
- data/lib/starter_web/pages/public/blog/navigator/index.html +10 -11
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +44 -47
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +20 -19
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +5 -1
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +38 -34
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +37 -35
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +15 -13
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +10 -8
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +29 -26
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +50 -49
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/100_gistblock.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +43 -16
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +114 -0
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +81 -0
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +70 -48
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +121 -0
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +78 -70
- data/lib/starter_web/pages/public/previewer/_includes/tables/rouge/300_supported_languages.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +161 -591
- data/lib/starter_web/pages/public/previewer/iframer.adoc +2 -1
- data/lib/starter_web/pages/public/previewer/justified_gallery.html +4 -4
- data/lib/starter_web/pages/public/previewer/md_color_palette.adoc +511 -0
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +10 -12
- data/lib/starter_web/pages/public/previewer/rouge.adoc +3 -3
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +3 -3
- data/lib/starter_web/utilsrv/_defaults/package.json +13 -9
- data/lib/starter_web/utilsrv/package.json +6 -2
- data/lib/starter_web/utilsrv/server.js +228 -55
- metadata +48 -210
- data/lib/starter_web/_data/_defaults/j1_light_gallery.yml +0 -110
- data/lib/starter_web/_data/_defaults/template_settings.yml +0 -258
- data/lib/starter_web/_data/plugins/defaults/notebooks.yml +0 -61
- data/lib/starter_web/_data/plugins/notebooks.yml +0 -70
- data/lib/starter_web/assets/images/collections/blog/featured/staticgen.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/aditya-joshi-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/alex-holyoake-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/anaya-katlego-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonella-lombardi-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/docker-1280x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/jekyll.1200x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/signpost-1920x800-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/water-journal-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/write-1280x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/brandon-mowinkel-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/daniel-jensen-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/florian-olivo-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/go-up-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/ian-schneider-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/jason-rosewell-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/joel-filipe-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/library-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280-v.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/markus-spiske3-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/modules-apps-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/nicola-styles-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/no-time-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/nousnou-iwasaki-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/premium-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/responsive-text-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/robert-v-ruggiero-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/spider-web-1920x1200-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/the-place-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/icons/algolia/search-by-algolia.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-256x256.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-32x32.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-512x512.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-64x64.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/favicon.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/scalable/d1.svg +0 -2025
- data/lib/starter_web/assets/images/modules/icons/netlify/nf-logo.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/favicon.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-256x256.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-32x32.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-512x512.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-64x64.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/scalable/p1.svg +0 -2020
- data/lib/starter_web/assets/images/modules/icons/patreon/favicon-16x16.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/patreon/favicon-32x32.png +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/000_browser_console-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/001_smee_channel-1280x400.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/002_gh_repo_settings-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/003_gh_webhook_settings-1280x1000.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/004_gh_webhook_settings-post-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/005_smee_channel_ping_receive-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/006_gh_redeliver_payload-1280x900.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/007_receive_redelivered_payload-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/000_browser_console.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/000_smee_channel.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/002_gh_repo-settings.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/003_gh_webhook_settings.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/004_gh_webhook_settings-post.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/005_smee_channel_ping_received.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/006_gh_redeliver_payload.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/007_receive_redelivered_payload.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/webhook_flow.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/flows/webhook_flow-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/scaleable/webhook_flow.svg +0 -432
- data/lib/starter_web/assets/images/pages/j1_webhooks/uml/auth_mgmr_signin_request_flow.uxf +0 -632
- data/lib/starter_web/assets/images/pages/j1_webhooks/uml/webhook_flow.uxf +0 -648
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/get-started-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/130_layout_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/content_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/content_inheritance_thumb.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/html_layout.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/j1-quickstart-windows.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/j1-template-theme.jpg +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/j1_layout.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/jekyll-minima-theme.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/lane_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/layout_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/preparations/msys_installation.jpg +0 -0
- data/lib/starter_web/assets/images/pages/log4j/apache-log4j-logo.png +0 -0
- data/lib/starter_web/assets/images/pages/log4r/code-1920x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/log4r/log4r-logo.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_000.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_001.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_002.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_003.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_004.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_005.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_006.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_007.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_008.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_009.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_010.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_011.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_012.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_013.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_014.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_015.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_016.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_017.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_018.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_019.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_020.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_021.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_022.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_023.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_024.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_025.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_026.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_027.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_028.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_029.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_030.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_031.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_032.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_033.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_034.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_035.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_036.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_037.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_038.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_039.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_040.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_041.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_042.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_043.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_044.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_045.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_046.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_047.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_048.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_049.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_050.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_051.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_052.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_053.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_054.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_055.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_056.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_057.png +0 -0
- data/lib/starter_web/assets/images/pages/material/apple-touch-icon.png +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/jQuery-logo.png +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/jquery-banner-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/jquery-banner-1920x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/src/JQuery-Logo.svg +0 -122
- data/lib/starter_web/assets/images/pages/pen/jquery/src/banner.psd +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/coordinate-map.png +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/kibana-powershell.jpg +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/option_ignore_outgoing.png +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/winlogbeat-dashboard.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/1280px-PDCA_Process.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/annie-spratt-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/deming-cycle.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/humble-lamb-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/john-schnobrich-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/sigmund-1920x1280.jpg +0 -0
- data/lib/starter_web/pages/protected/site_search.adoc +0 -180
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.pdf +1 -5439
- data/lib/starter_web/pages/public/legal/en/000_copyright.adoc +0 -93
- data/lib/starter_web/pages/public/legal/en/100_impress.adoc +0 -55
- data/lib/starter_web/pages/public/legal/en/200_terms_of_use.adoc +0 -53
- data/lib/starter_web/pages/public/legal/en/eu/cookie.policy.asciidoc +0 -50
@@ -8,15 +8,15 @@ description: >
|
|
8
8
|
designers and developers targeting various platforms to download
|
9
9
|
icons in the format, color and size they need for any project.
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
categories: [ Preview ]
|
12
|
+
tags: [ MDI, Icons, Fonts ]
|
13
13
|
|
14
|
-
scrollbar:
|
14
|
+
scrollbar: false
|
15
15
|
|
16
16
|
permalink: /pages/public/previewer/mdi_font/
|
17
17
|
regenerate: false
|
18
18
|
|
19
|
-
resources: [ clipboard, lightbox, rouge, mdi_previewer
|
19
|
+
resources: [ clipboard, lightbox, rouge, mdi_previewer ]
|
20
20
|
resource_options:
|
21
21
|
- attic:
|
22
22
|
padding_top: 400
|
@@ -89,21 +89,19 @@ include equivalent text either inside the `<i>` tag or right next to it
|
|
89
89
|
click to reply, the link is usable if CSS doesn't load, and human readers
|
90
90
|
with good eyesight and a decent browser see a pretty icon.
|
91
91
|
|
92
|
-
/////
|
93
92
|
== Asciidoc Markup
|
94
93
|
|
94
|
+
For pages using Asciidoc for the source (default), a easier solution is to
|
95
|
+
use Markups from Asciidoc.
|
96
|
+
|
95
97
|
[source, html]
|
96
98
|
----
|
97
|
-
pass:[<i class="mdi mdi
|
98
|
-
mdi
|
99
|
+
pass:[<i class="mdi mdi-<name> mdi-<size> mdi-<modifier>"></i>] <1>
|
100
|
+
mdi:<name>[<size>, <modifier>] <2>
|
99
101
|
----
|
100
102
|
<1> Markup using a pass block
|
101
|
-
<2> Markup using the Asciidoc extension
|
103
|
+
<2> Markup using the Asciidoc extension (mdi:)
|
102
104
|
|
103
|
-
NOTE: The `<i>` tag provides more meaning to machines because of the HTML spec,
|
104
|
-
it provides more meaning to *humans* because the `i` can easily associated with
|
105
|
-
`icon`.
|
106
|
-
/////
|
107
105
|
|
108
106
|
== Sizes
|
109
107
|
|
@@ -7,16 +7,16 @@ description: >
|
|
7
7
|
syntax highlighter. It can highlight over 100 different
|
8
8
|
languages fully integrated with J1 Template.
|
9
9
|
|
10
|
+
categories: [ Previewer ]
|
10
11
|
tags: [ Rouge, Highlighter ]
|
11
|
-
categories: [ App, Previewer ]
|
12
12
|
|
13
|
-
scrollbar:
|
13
|
+
scrollbar: false
|
14
14
|
toc: true
|
15
15
|
|
16
16
|
permalink: /pages/public/previewer/rouge/
|
17
17
|
regenerate: true
|
18
18
|
|
19
|
-
resources: [ rouge, clipboard
|
19
|
+
resources: [ rouge, clipboard ]
|
20
20
|
resource_options:
|
21
21
|
- toccer:
|
22
22
|
collapseDepth: 4
|
@@ -7,10 +7,10 @@ description: >
|
|
7
7
|
icon font developed by Twitter. The full icon set is fully
|
8
8
|
supported by J1 Template.
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
categories: [ Previewer ]
|
11
|
+
tags: [ Emoji, Icons, Fonts, Twitter ]
|
12
12
|
|
13
|
-
scrollbar:
|
13
|
+
scrollbar: false
|
14
14
|
|
15
15
|
permalink: /pages/public/previewer/twitter_emoji/
|
16
16
|
regenerate: false
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"private": true,
|
3
3
|
"name": "utls",
|
4
|
-
"version": "2021.0
|
4
|
+
"version": "2021.1.0",
|
5
5
|
"description": "J1 Template Utility Server",
|
6
6
|
"homepage": "https://jekyll.one",
|
7
7
|
"author": {
|
@@ -19,15 +19,17 @@
|
|
19
19
|
"yarn": ">=1.6"
|
20
20
|
},
|
21
21
|
"utilsrv": {
|
22
|
-
"enabled": "true"
|
22
|
+
"enabled": "true"
|
23
23
|
},
|
24
24
|
"scripts": {
|
25
25
|
"clean": "shx rm -f *.lock && shx rm -f package-lock.json",
|
26
|
-
"start": "run-s utilsrv-run",
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"utilsrv
|
26
|
+
"start": "run-p -s utilsrv-run",
|
27
|
+
"app": "run-p -s utilsrv",
|
28
|
+
"develop": "run-p -s utilsrv",
|
29
|
+
"site": "run-p -s utilsrv",
|
30
|
+
"utilsrv": "cross-env UTILSRV_ENABLED=$npm_package_utilsrv_enabled if-env UTILSRV_ENABLED=true && run-p -s utilsrv-run || run-p -s utilsrv-exit",
|
31
|
+
"utilsrv-run": "echo Startup UTILSRV .. && node server.js",
|
32
|
+
"utilsrv-exit": "echo UTILSRV disabled. Not started."
|
31
33
|
},
|
32
34
|
"dependencies": {
|
33
35
|
"body-parser": "^1.19.0",
|
@@ -38,12 +40,14 @@
|
|
38
40
|
"express": "^4.15.2",
|
39
41
|
"fs": "0.0.1-security",
|
40
42
|
"if-env": "^1.0.4",
|
41
|
-
"js-yaml": "^
|
43
|
+
"js-yaml": "^4.0",
|
42
44
|
"lite-url": "^1.0.5",
|
45
|
+
"log4js": "^6.3.0",
|
43
46
|
"moment": "^2.24.0",
|
47
|
+
"node-cron": "^3.0.0",
|
44
48
|
"npm-run-all": "^4.1.5",
|
45
49
|
"randomstring": "^1.1.5",
|
46
|
-
"shx": "^0.
|
50
|
+
"shx": "^0.3.3",
|
47
51
|
"simple-git": "^1.113.0",
|
48
52
|
"simple-oauth2": "^1.6.0",
|
49
53
|
"sprintf-js": "^1.1.2",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"private": true,
|
3
3
|
"name": "utls",
|
4
|
-
"version": "2021.0
|
4
|
+
"version": "2021.1.0",
|
5
5
|
"description": "J1 Template Utility Server",
|
6
6
|
"homepage": "https://jekyll.one",
|
7
7
|
"author": {
|
@@ -19,12 +19,14 @@
|
|
19
19
|
"yarn": ">=1.6"
|
20
20
|
},
|
21
21
|
"utilsrv": {
|
22
|
-
"enabled": "
|
22
|
+
"enabled": "true"
|
23
23
|
},
|
24
24
|
"scripts": {
|
25
25
|
"clean": "shx rm -f *.lock && shx rm -f package-lock.json",
|
26
26
|
"start": "run-p -s utilsrv-run",
|
27
|
+
"app": "run-p -s utilsrv",
|
27
28
|
"develop": "run-p -s utilsrv",
|
29
|
+
"site": "run-p -s utilsrv",
|
28
30
|
"utilsrv": "cross-env UTILSRV_ENABLED=$npm_package_utilsrv_enabled if-env UTILSRV_ENABLED=true && run-p -s utilsrv-run || run-p -s utilsrv-exit",
|
29
31
|
"utilsrv-run": "echo Startup UTILSRV .. && node server.js",
|
30
32
|
"utilsrv-exit": "echo UTILSRV disabled. Not started."
|
@@ -40,7 +42,9 @@
|
|
40
42
|
"if-env": "^1.0.4",
|
41
43
|
"js-yaml": "^4.0",
|
42
44
|
"lite-url": "^1.0.5",
|
45
|
+
"log4js": "^6.3.0",
|
43
46
|
"moment": "^2.24.0",
|
47
|
+
"node-cron": "^3.0.0",
|
44
48
|
"npm-run-all": "^4.1.5",
|
45
49
|
"randomstring": "^1.1.5",
|
46
50
|
"shx": "^0.3.3",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
# Netlify-cms-github-oauth-provider is licensed under UNKNOWN License.
|
18
18
|
# See: https://github.com/vencax/netlify-cms-github-oauth-provider/blob/master/README.md
|
19
19
|
# -----------------------------------------------------------------------------
|
20
|
-
# NOTE:
|
20
|
+
# NOTE:
|
21
21
|
# To fix Webstorm NodeJS API issue see:
|
22
22
|
# https://stackoverflow.com/questions/19532660/webstorm-7-cannot-recognize-node-api-methods
|
23
23
|
# -----------------------------------------------------------------------------
|
@@ -61,6 +61,9 @@ const exec = util.promisify(require('child_process').exec);
|
|
61
61
|
const moment = require('moment');
|
62
62
|
const sprintf = require('sprintf-js').sprintf;
|
63
63
|
const vsprintf = require('sprintf-js').vsprintf;
|
64
|
+
const cron = require('node-cron');
|
65
|
+
const log4js = require('log4js');
|
66
|
+
|
64
67
|
|
65
68
|
// =============================================================================
|
66
69
|
// base settings
|
@@ -68,7 +71,7 @@ const vsprintf = require('sprintf-js').vsprintf;
|
|
68
71
|
const daemon_home = path.resolve(__dirname);
|
69
72
|
const environment = daemon_home.indexOf('packages') !== -1 ? 'dev' : 'prod';
|
70
73
|
const current_date = moment().format('YYYY-MM-DD');
|
71
|
-
|
74
|
+
|
72
75
|
let config_home;
|
73
76
|
let project_home;
|
74
77
|
let log_home;
|
@@ -76,6 +79,7 @@ let utilsrv_options;
|
|
76
79
|
let log4javascript_options;
|
77
80
|
let private_data;
|
78
81
|
let logStream;
|
82
|
+
let fsStats;
|
79
83
|
|
80
84
|
// timestamp settings
|
81
85
|
//
|
@@ -87,18 +91,13 @@ moment().format('YYYY-MM-DD hh:mm:ss.SSS');
|
|
87
91
|
if (environment === 'dev') {
|
88
92
|
project_home = daemon_home + '/../400_template_site';
|
89
93
|
config_home = daemon_home + '/../400_template_site/_data';
|
90
|
-
//dotenv_home = daemon_home + '/../400_template_site';
|
91
94
|
log_home = daemon_home + '/../..';
|
92
95
|
} else {
|
93
96
|
project_home = daemon_home + '/..';
|
94
97
|
config_home = daemon_home + '/../_data';
|
95
|
-
//dotenv_home = daemon_home + '/..';
|
96
98
|
log_home = daemon_home + '/..';
|
97
99
|
}
|
98
100
|
|
99
|
-
// const dotenv = require('dotenv').config({ path: dotenv_home + '/.env', silent: true });
|
100
|
-
// const dotenv_json = JSON.stringify( dotenv, null, 2 ); // JSON pretty print
|
101
|
-
|
102
101
|
// =============================================================================
|
103
102
|
// load configuration data
|
104
103
|
// -----------------------------------------------------------------------------
|
@@ -118,68 +117,191 @@ const utilsrv_defaults_file = util_defaults + '/' + 'util_srv.yml';
|
|
118
117
|
const utilsrv_settings_file = util_settings + '/' + 'util_srv.yml';
|
119
118
|
|
120
119
|
try {
|
121
|
-
const log4javascript_defaults = yaml.
|
122
|
-
const log4javascript_settings = yaml.
|
123
|
-
const utilsrv_defaults = yaml.
|
124
|
-
const utilsrv_settings = yaml.
|
125
|
-
const private_data_settings = yaml.
|
120
|
+
const log4javascript_defaults = yaml.load(fs.readFileSync(log4javascript_defaults_file, 'utf8'));
|
121
|
+
const log4javascript_settings = yaml.load(fs.readFileSync(log4javascript_settings_file, 'utf8'));
|
122
|
+
const utilsrv_defaults = yaml.load(fs.readFileSync(utilsrv_defaults_file, 'utf8'));
|
123
|
+
const utilsrv_settings = yaml.load(fs.readFileSync(utilsrv_settings_file, 'utf8'));
|
124
|
+
const private_data_settings = yaml.load(fs.readFileSync(private_data_file, 'utf8'));
|
126
125
|
|
126
|
+
// noinspection JSUnresolvedVariable
|
127
127
|
private_data = private_data_settings.util_srv;
|
128
|
-
log4javascript_options = mergeData(log4javascript_defaults.defaults, log4javascript_settings_file.settings);
|
129
128
|
utilsrv_options = mergeData(utilsrv_defaults.defaults, utilsrv_settings.settings);
|
130
|
-
|
129
|
+
log4javascript_options = mergeData(log4javascript_defaults.defaults, utilsrv_settings.settings);
|
131
130
|
} catch (e) {
|
132
131
|
console.log(e);
|
133
132
|
}
|
134
133
|
const ajaxAppenderOptions = log4javascript_options.appenders[1].appender;
|
135
134
|
|
136
135
|
// -----------------------------------------------------------------------------
|
137
|
-
// utility server
|
136
|
+
// utility server settings
|
138
137
|
//
|
139
|
-
const
|
140
|
-
const
|
141
|
-
const
|
142
|
-
const
|
143
|
-
const
|
144
|
-
const
|
145
|
-
const
|
146
|
-
const
|
147
|
-
const
|
148
|
-
const
|
138
|
+
const enabled = utilsrv_options.enabled || false;
|
139
|
+
const ssl = utilsrv_options.ssl || false;
|
140
|
+
const port = utilsrv_options.port || 40020;
|
141
|
+
const origin = utilsrv_options.origin || 'localhost';
|
142
|
+
const hostName = utilsrv_options.host_name || '0.0.0.0';
|
143
|
+
const verbose = utilsrv_options.verbose || false;
|
144
|
+
const logFileName = ajaxAppenderOptions.log_file_name + '_' + current_date || 'messages' + '_' + current_date;
|
145
|
+
const logFileExt = ajaxAppenderOptions.log_file_ext || 'log';
|
146
|
+
const logFolder = ajaxAppenderOptions.log_folder || 'log';
|
147
|
+
const logFileNamePath = log_home + '/' + logFolder + '/' + logFileName + '.' + logFileExt;
|
148
|
+
const current_logFile = log_home + '/' + logFolder + '/' + 'messages.current';
|
149
|
+
const util_srv_url = ssl ? 'https://' + origin + ':' + port : 'http://' + origin + ':' + port;
|
150
|
+
const thread_id = generateId (11);
|
151
|
+
const page = '/util_srv';
|
152
|
+
const isWin = process.platform === "win32";
|
149
153
|
|
150
154
|
// -----------------------------------------------------------------------------
|
151
|
-
//
|
155
|
+
// logger settings
|
156
|
+
// See: https://github.com/log4js-node/log4js-node/blob/master/docs/layouts.md
|
152
157
|
//
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
}
|
158
|
+
log4js.configure({
|
159
|
+
appenders: {
|
160
|
+
stdout: {
|
161
|
+
type: 'stdout',
|
162
|
+
layout: {
|
163
|
+
type: 'pattern',
|
164
|
+
pattern: '[%d{yyyy-MM-dd hh:mm:ss.SSS}] [%p] [%-40c] %m%n'
|
165
|
+
}
|
166
|
+
},
|
167
|
+
file: {
|
168
|
+
type: 'file',
|
169
|
+
filename: logFileNamePath,
|
170
|
+
layout: {
|
171
|
+
type: 'pattern',
|
172
|
+
pattern: '[%d{yyyy-MM-dd hh:mm:ss.SSS}] [%-11x{thread}] [%-5p] [%-60x{page}] [%-40c] %m',
|
173
|
+
tokens: {
|
174
|
+
thread: thread_id,
|
175
|
+
page: page
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
},
|
180
|
+
categories: {
|
181
|
+
default: {
|
182
|
+
appenders: ['stdout'],
|
183
|
+
level: 'info'
|
184
|
+
},
|
185
|
+
'j1.util_srv': {
|
186
|
+
appenders: ['file'],
|
187
|
+
level: 'info'
|
188
|
+
},
|
189
|
+
'j1.util_srv.preflight': {
|
190
|
+
appenders: ['file'],
|
191
|
+
level: 'info'
|
192
|
+
},
|
193
|
+
'j1.util_srv.task': {
|
194
|
+
appenders: ['file'],
|
195
|
+
level: 'info'
|
196
|
+
}
|
197
|
+
}
|
198
|
+
});
|
161
199
|
|
162
200
|
// -----------------------------------------------------------------------------
|
163
|
-
//
|
164
|
-
// fs.writeFile(logFileNamePath, '', function(){console.log('Reset file: ' +logFileNamePath)});
|
201
|
+
// create loggers
|
165
202
|
//
|
203
|
+
let stdout = log4js.getLogger('stdout');
|
204
|
+
let preflight = log4js.getLogger('j1.util_srv.preflight');
|
205
|
+
let logger = log4js.getLogger('j1.util_srv.core');
|
166
206
|
|
167
|
-
|
168
|
-
|
169
|
-
|
207
|
+
// -----------------------------------------------------------------------------
|
208
|
+
// scheduler task settings
|
209
|
+
// See: https://github.com/node-cron/node-cron
|
210
|
+
//
|
211
|
+
let test_per_minute = cron.schedule('* * * * *', () => {
|
212
|
+
let timestamp = moment().format('YYYY-MM-DD HH:mm');
|
213
|
+
console.log(timestamp + ': scheduled test task running every minute');
|
214
|
+
}, {
|
215
|
+
scheduled: false
|
216
|
+
});
|
217
|
+
|
218
|
+
let rolling_logs = cron.schedule('* * * * *', () => {
|
219
|
+
let logger = log4js.getLogger( 'j1.util_srv.task');
|
220
|
+
// logger_stdout.info('rolling log task running every minute');
|
221
|
+
logger.info('rolling log task running every minute');
|
222
|
+
let timestamp = moment().format('YYYY-MM-DD HH:mm');
|
223
|
+
console.log(timestamp + ': rolling log task running every minute');
|
224
|
+
}, {
|
225
|
+
scheduled: false
|
226
|
+
});
|
227
|
+
|
228
|
+
// -----------------------------------------------------------------------------
|
229
|
+
// initialize the logfile
|
230
|
+
|
231
|
+
// check if the logfile exists
|
232
|
+
try {
|
233
|
+
fsStats = fs.statSync(logFileNamePath);
|
234
|
+
console.log('Log file exists : ' + logFileName);
|
235
|
+
preflight.info('log file exists: ' + logFileName)
|
236
|
+
|
237
|
+
if ( ajaxAppenderOptions.reset_on_start === true) {
|
238
|
+
fs.truncate(logFileNamePath, 0, function(){console.log('Reset file: ' + logFileName)});
|
239
|
+
}
|
240
|
+
}
|
241
|
+
catch (e) {
|
242
|
+
console.log('Create Log file :' + logFileName);
|
243
|
+
preflight.info('create log file :' + logFileName);
|
244
|
+
// create empty logfile
|
170
245
|
touch(logFileNamePath);
|
171
246
|
}
|
172
247
|
|
173
|
-
|
174
|
-
|
248
|
+
// symlinks on Windows are only supported by elevated user rights
|
249
|
+
//
|
250
|
+
if (isWin === false) {
|
251
|
+
// (Re-)Create symlink to current logfile
|
252
|
+
//
|
253
|
+
fs.unlink(current_logFile, (err => {
|
254
|
+
if (err) {
|
255
|
+
fs.symlink (
|
256
|
+
logFileNamePath,
|
257
|
+
current_logFile,
|
258
|
+
function (err) { console.log(err || 'Symlink to current log created.'); }
|
259
|
+
);
|
260
|
+
} else {
|
261
|
+
// See: https://stackoverflow.com/questions/29777506/create-relative-symlinks-using-absolute-paths-in-node-js
|
262
|
+
//
|
263
|
+
fs.symlink (
|
264
|
+
logFileNamePath,
|
265
|
+
current_logFile,
|
266
|
+
function (err) { console.log(err || 'Symlink to current log re-created.'); }
|
267
|
+
);
|
268
|
+
}
|
269
|
+
}));
|
175
270
|
}
|
176
271
|
|
177
|
-
|
272
|
+
|
273
|
+
// check if logs should be appended
|
274
|
+
//
|
275
|
+
preflight.info('appender options, mode: ' + ajaxAppenderOptions.mode);
|
276
|
+
if (ajaxAppenderOptions.mode === 'append') {
|
178
277
|
logStream = fs.createWriteStream(logFileNamePath, {'flags': 'a'});
|
179
278
|
} else {
|
279
|
+
fs.truncate(logFileNamePath, 0, function(){console.log('Reset file: ' + logFileName)});
|
180
280
|
logStream = fs.createWriteStream(logFileNamePath, {'flags': 'a'});
|
181
281
|
}
|
182
282
|
|
283
|
+
// check if logs should be rolled (e.g. daily)
|
284
|
+
//
|
285
|
+
preflight.info('appender options, rolling files: ' + ajaxAppenderOptions.rolling_files);
|
286
|
+
if (ajaxAppenderOptions.rolling_files === true) {
|
287
|
+
// start the scheduled task for rolling (log) files
|
288
|
+
//
|
289
|
+
rolling_logs.start();
|
290
|
+
}
|
291
|
+
|
292
|
+
// -----------------------------------------------------------------------------
|
293
|
+
// print utility server issue
|
294
|
+
//
|
295
|
+
if (environment === 'dev') {
|
296
|
+
console.log('Server enabled: ' + enabled);
|
297
|
+
console.log('Environment detected as: ' + environment);
|
298
|
+
console.log('Daemon path set to: ' + daemon_home);
|
299
|
+
console.log('Daemon verbosity set to: ' + verbose);
|
300
|
+
console.log('Project path set to: ' + project_home);
|
301
|
+
console.log('Data path set to: ' + config_home);
|
302
|
+
console.log('Log file set to: ' + logFileNamePath);
|
303
|
+
}
|
304
|
+
|
183
305
|
// -----------------------------------------------------------------------------
|
184
306
|
// Github OAuth client settings (used for CC)
|
185
307
|
//
|
@@ -193,11 +315,10 @@ const oauthProviderClientScope = private_data.oauth.client_scope;
|
|
193
315
|
const oauthProviderClientId = private_data.oauth.client_id;
|
194
316
|
const oauthProviderClientSecret = private_data.oauth.client_secret;
|
195
317
|
|
196
|
-
|
197
318
|
// -----------------------------------------------------------------------------
|
198
319
|
// cors settings
|
199
320
|
//
|
200
|
-
|
321
|
+
let corsSettings = {
|
201
322
|
origin: '*',
|
202
323
|
optionsSuccessStatus: 200 // Some legacy browsers (IE11, various SmartTVs) choke on 204
|
203
324
|
}
|
@@ -211,7 +332,7 @@ var corsSettings = {
|
|
211
332
|
//
|
212
333
|
|
213
334
|
// =============================================================================
|
214
|
-
// initialize libraries
|
335
|
+
// initialize runtime libraries
|
215
336
|
// -----------------------------------------------------------------------------
|
216
337
|
const app = express();
|
217
338
|
const oauth2 = simpleOauthModule.create({
|
@@ -322,6 +443,7 @@ app.get('/auth/github/callback', (req, res) => {
|
|
322
443
|
}
|
323
444
|
|
324
445
|
// see: http://usefulangle.com/post/4/javascript-communication-parent-child-window
|
446
|
+
//
|
325
447
|
const script = `
|
326
448
|
<script>
|
327
449
|
(function() {
|
@@ -524,6 +646,10 @@ app.post('/log2disk', (req, res) => {
|
|
524
646
|
// ---------------------------------------------------------------------------
|
525
647
|
// globals
|
526
648
|
let pageID = req.headers['x-page-id'];
|
649
|
+
let tzOffset = req.headers['x-tz-offset'];
|
650
|
+
const tz_offset = tzOffset.replace(/GMT/g, '');
|
651
|
+
let tz_factor;
|
652
|
+
let tz_offset_milli;
|
527
653
|
let logLine;
|
528
654
|
let msgDate2Int;
|
529
655
|
let timestamp;
|
@@ -532,6 +658,7 @@ app.post('/log2disk', (req, res) => {
|
|
532
658
|
|
533
659
|
// ---------------------------------------------------------------------------
|
534
660
|
// process the POST response body
|
661
|
+
//
|
535
662
|
if (req.body.layout === 'XmlLayout') {
|
536
663
|
logLine = req.body.data;
|
537
664
|
} else if (req.body.layout === 'JsonLayout' || req.body.layout === 'PatternLayout' || req.body.layout === 'SimpleLayout' || req.body.layout === 'NullLayout') {
|
@@ -539,18 +666,35 @@ app.post('/log2disk', (req, res) => {
|
|
539
666
|
} else if (req.body.layout === 'HttpPostDataLayout') {
|
540
667
|
url = new parseURL(req.body.url);
|
541
668
|
path = url.pathname;
|
542
|
-
|
669
|
+
|
670
|
+
msgDate2Int = parseInt(req.body.timestamp, 10);
|
671
|
+
|
672
|
+
// calculate TZ offset
|
673
|
+
//
|
674
|
+
let tz_split = tz_offset.split(':');
|
675
|
+
let tz_offset_hours = eval(tz_split[0]*1);
|
676
|
+
let tz_offset_minutes = eval(tz_split[1]*1);
|
677
|
+
|
678
|
+
tz_factor = tz_offset_hours < 0 ? -1 : 1;
|
679
|
+
|
680
|
+
tz_offset_hours = tz_factor*tz_offset_hours;
|
681
|
+
tz_offset_milli = tz_factor*((3600*1000*tz_offset_hours) + (tz_offset_minutes*60*1000));
|
682
|
+
msgDate2Int += tz_offset_milli;
|
683
|
+
|
684
|
+
// ISOString: yyyy-MM-ddThh:mm:ss.sssZ
|
543
685
|
timestamp = new Date(msgDate2Int).toISOString().slice(0, 23).replace('T', ' ');
|
686
|
+
|
544
687
|
// [10:05:12.666] [INFO ] [j1.logger.writer ] [logger.js:154] [state: finished]
|
545
688
|
// [http://localhost:41000/assets/themes/j1/adapter/js/logger.js:154]
|
546
|
-
logLine
|
689
|
+
logLine = sprintf('[%s] [%s] [%-5s] [%-60s] [%-40s] %s\n', timestamp, pageID, req.body.level, path, req.body.logger, req.body.message);
|
547
690
|
} else {
|
548
691
|
logLine = req.body + '\n';
|
549
692
|
}
|
550
693
|
|
551
|
-
|
552
|
-
|
553
|
-
if (verbose) console.log('Utility Server: write message: ' + logLine);
|
694
|
+
// if (verbose) console.log('Utility Server: endpoint /log2disk entered');
|
695
|
+
// if (verbose) console.log('Utility Server: processing request: ' + req.query.request);
|
696
|
+
// if (verbose) console.log('Utility Server: write message: ' + logLine);
|
697
|
+
|
554
698
|
logStream.write(logLine);
|
555
699
|
res.send('');
|
556
700
|
|
@@ -577,6 +721,20 @@ function mergeData () {
|
|
577
721
|
return o;
|
578
722
|
}
|
579
723
|
|
724
|
+
// -------------------------------------------------------------------------
|
725
|
+
// generateId()
|
726
|
+
// Generate a unique (thread) id used by the logger
|
727
|
+
// -------------------------------------------------------------------------
|
728
|
+
function generateId (length) {
|
729
|
+
let result = '';
|
730
|
+
let characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
731
|
+
let charactersLength = characters.length;
|
732
|
+
for ( let i = 0; i < length; i++ ) {
|
733
|
+
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
734
|
+
}
|
735
|
+
return result;
|
736
|
+
} // END generateId
|
737
|
+
|
580
738
|
|
581
739
|
// =============================================================================
|
582
740
|
// main
|
@@ -594,8 +752,23 @@ process.on('uncaughtException', function(err) {
|
|
594
752
|
process.exit;
|
595
753
|
});
|
596
754
|
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
755
|
+
if (utilsrv_options.enabled) {
|
756
|
+
|
757
|
+
// test_per_minute.start();
|
758
|
+
|
759
|
+
logger.info('utility server is starting');
|
760
|
+
|
761
|
+
// run the daemon (use IPV4, all interfaces)
|
762
|
+
// see https://github.com/expressjs/express/issues/3528
|
763
|
+
app.listen(port, hostName, () => {
|
764
|
+
console.log("Utility Server is listening on port: " + port);
|
765
|
+
logger.info('utility server is listening on port: ' + port);
|
766
|
+
});
|
767
|
+
} else {
|
768
|
+
logger.info('found utility server: disabled');
|
769
|
+
logger.info('stop the server');
|
770
|
+
console.log('Stop the server. Exiting ...');
|
771
|
+
}
|
772
|
+
|
773
|
+
// END main
|
774
|
+
// -----------------------------------------------------------------------------
|