Skip to content

Commit 2cae184

Browse files
committed
Update import mapping of modules
1 parent 799e8e5 commit 2cae184

File tree

12 files changed

+64
-64
lines changed

12 files changed

+64
-64
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ imports:
99
'@shgysk8zer0/components/': https://cdn.kernvalley.us/components/
1010
'@kernvalley/components/': https://cdn.kernvalley.us/components/krv/
1111
'leaflet': https://unpkg.com/leaflet@1.9.3/dist/leaflet-src.esm.js
12-
'firebase': https://www.gstatic.com/firebasejs/9.16.0/firebase-app.js
12+
'firebase/': https://www.gstatic.com/firebasejs/9.16.0/
1313
'url-pattern': https://unpkg.com/urlpattern-polyfill@1.0.0-rc1/dist/index.modern.js
14+
'custom-elements': https://unpkg.com/@webcomponents/custom-elements@1.4.2/custom-elements.min.js

_headers

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Link: <https://unpkg.com/@shgysk8zer0/polyfills@0.0.5/all.min.js>; rel=preload; as=script; referrerpolicy=no-referrrer; crossorigin=anonymous;
88
Link: <https://unpkg.com/@shgysk8zer0/kazoo@0.0.5/harden.js>; rel=preload; as=script; referrerpolicy=no-referrrer; crossorigin=anonymous;
99
Link: </js/index.min.js>; rel=preload; as=script; referrerpolicy=no-referrrer;
10-
Content-Security-Policy: default-src 'self'; img-src *; script-src 'self' cdn.kernvalley.us unpkg.com/ www.google-analytics.com www.googletagmanager.com cdn.polyfill.io/v3/polyfill.min.js www.gstatic.com/firebasejs/; style-src 'self' cdn.kernvalley.us unpkg.com/; connect-src 'self' cdn.kernvalley.us store.kernvalley.us apps.kernvalley.us ads.kernvalley.us/api/ api.github.com/users/ api.openweathermap.org/data/2.5/weather www.google-analytics.com/ www.googletagmanager.com/gtag/ firestore.googleapis.com; font-src cdn.kernvalley.us; media-src *; frame-src www.youtube-nocookie.com; form-action 'self'; manifest-src 'self'; worker-src 'self'; reflected-xss block; upgrade-insecure-requests; block-all-mixed-content; disown-opener; trusted-types default empty#html empty#script sanitizer-raw#html purify-raw#html purify#html weather-current#html youtube#embed pwa-install share-to-buttons#html github-user#html ga#script-url goog#html; require-trusted-types-for 'script';
10+
Content-Security-Policy: default-src 'self'; img-src *; script-src 'self' cdn.kernvalley.us unpkg.com/ www.google-analytics.com www.googletagmanager.com cdn.polyfill.io/v3/polyfill.min.js www.gstatic.com/firebasejs/ 'nonce-c23ddb4e-a8ec-44f0-ad77-d1ac60938c7e'; style-src 'self' cdn.kernvalley.us unpkg.com/; connect-src 'self' cdn.kernvalley.us store.kernvalley.us apps.kernvalley.us ads.kernvalley.us/api/ api.github.com/users/ api.openweathermap.org/data/2.5/weather www.google-analytics.com/ www.googletagmanager.com/gtag/ firestore.googleapis.com; font-src cdn.kernvalley.us; media-src *; frame-src www.youtube-nocookie.com; form-action 'self'; manifest-src 'self'; worker-src 'self'; reflected-xss block; upgrade-insecure-requests; block-all-mixed-content; disown-opener; trusted-types default empty#html empty#script sanitizer-raw#html purify-raw#html purify#html weather-current#html youtube#embed pwa-install share-to-buttons#html github-user#html ga#script-url goog#html; require-trusted-types-for 'script';
1111

1212
/:placeholder/
1313
X-Content-Type-Options: nosniff
@@ -19,7 +19,7 @@
1919
Link: <https://unpkg.com/@shgysk8zer0/polyfills@0.0.5/all.min.js>; rel=preload; as=script; referrerpolicy=no-referrrer; crossorigin=anonymous;
2020
Link: <//cdn.kernvalley.us/js/std-js/harden.js>; rel=preload; as=script; referrerpolicy=no-referrrer; crossorigin=anonymous;
2121
Link: </js/index.min.js>; rel=preload; as=script; referrerpolicy=no-referrrer;
22-
Content-Security-Policy: default-src 'self'; img-src * data: blob:; script-src 'self' cdn.kernvalley.us unpkg.com/ www.google-analytics.com www.googletagmanager.com cdn.polyfill.io/v3/polyfill.min.js js.stripe.com/v3/ www.gstatic.com/firebasejs/; style-src 'self' cdn.kernvalley.us unpkg.com/; connect-src 'self' cdn.kernvalley.us store.kernvalley.us apps.kernvalley.us ads.kernvalley.us/api/ api.github.com/users/ api.openweathermap.org/data/2.5/weather www.google-analytics.com/ www.googletagmanager.com/gtag/ firestore.googleapis.com; font-src cdn.kernvalley.us; media-src *; frame-src www.youtube-nocookie.com maps.kernvalley.us/embed js.stripe.com/v3/; form-action 'self'; manifest-src 'self'; worker-src 'self'; reflected-xss block; upgrade-insecure-requests; block-all-mixed-content; disown-opener; trusted-types default empty#html empty#script sanitizer-raw#html purify-raw#html purify#html weather-current#html youtube#embed github-user#html pwa-install share-to-buttons#html ga#script-url goog#html; require-trusted-types-for 'script';
22+
Content-Security-Policy: default-src 'self'; img-src * data: blob:; script-src 'self' cdn.kernvalley.us unpkg.com/ www.google-analytics.com www.googletagmanager.com cdn.polyfill.io/v3/polyfill.min.js js.stripe.com/v3/ www.gstatic.com/firebasejs/ 'nonce-c23ddb4e-a8ec-44f0-ad77-d1ac60938c7e'; style-src 'self' cdn.kernvalley.us unpkg.com/; connect-src 'self' cdn.kernvalley.us store.kernvalley.us apps.kernvalley.us ads.kernvalley.us/api/ api.github.com/users/ api.openweathermap.org/data/2.5/weather www.google-analytics.com/ www.googletagmanager.com/gtag/ firestore.googleapis.com; font-src cdn.kernvalley.us; media-src *; frame-src www.youtube-nocookie.com maps.kernvalley.us/embed js.stripe.com/v3/; form-action 'self'; manifest-src 'self'; worker-src 'self'; reflected-xss block; upgrade-insecure-requests; block-all-mixed-content; disown-opener; trusted-types default empty#html empty#script sanitizer-raw#html purify-raw#html purify#html weather-current#html youtube#embed github-user#html pwa-install share-to-buttons#html ga#script-url goog#html; require-trusted-types-for 'script';
2323

2424
/reset
2525
Referrer-Policy: no-referrer
@@ -29,7 +29,7 @@
2929
/embed/
3030
Referrer-Policy: no-referrer
3131
X-Frame-Options: ALLOW
32-
Content-Security-Policy: default-src 'none'; img-src 'self' *; style-src 'self' cdn.kernvalley.us/components/wfd/events.css; script-src 'self' cdn.kernvalley.us/js/ cdn.kernvalley.us/components/wfd/events.min.js; font-src cdn.kernvalley.us/fonts/; connect-src 'self' whiskeyflatdays.com/events.json cdn.kernvalley.us/components/wfd/events.html; Cross-Origin-Embedder-Policy: unsafe-none; frame-ancestors *; upgrade-insecure-requests; block-all-mixed-content; disown-opener; trusted-types empty#html empty#script sanitizer-raw#html wfd-events#html; require-trusted-types-for 'script';
32+
Content-Security-Policy: default-src 'none'; img-src 'self' *; style-src 'self' cdn.kernvalley.us/components/wfd/events.css; script-src 'self' cdn.kernvalley.us/js/ cdn.kernvalley.us/components/wfd/events.min.js 'nonce-c23ddb4e-a8ec-44f0-ad77-d1ac60938c7e'; font-src cdn.kernvalley.us/fonts/; connect-src 'self' whiskeyflatdays.com/events.json cdn.kernvalley.us/components/wfd/events.html; Cross-Origin-Embedder-Policy: unsafe-none; frame-ancestors *; upgrade-insecure-requests; block-all-mixed-content; disown-opener; trusted-types empty#html empty#script sanitizer-raw#html wfd-events#html; require-trusted-types-for 'script';
3333
Link: <https://unpkg.com/@shgysk8zer0/polyfills@0.0.5/all.min.js> rel=preload; as=script; crossorigin=anonymous; referrerpolicy=no-referrer;
3434
Link: <//cdn.kernvalley.us/js/std-js/harden.js> rel=preload; as=script; crossorigin=anonymous; referrerpolicy=no-referrer;
3535
Link: <//cdn.kernvalley.us/components/wfd/events.html>; rel=preload; as=fetch; type=text/html; crossorigin=anonymous; referrerpolicy=no-referrer;

_includes/window-controls.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<window-controls>
2-
<button type="button" is="app-list" id="app-menu" class="btn" title="Open KernValley.US Apps Menu" source="{{ site.data.ads.source }}" slot="titlebar" hidden="">
2+
<button type="button" is="app-list" class="btn" title="Open KernValley.US Apps Menu" source="{{ site.data.ads.source }}" slot="titlebar" hidden="">
33
{% include common/icon.html icon="apps" fill="currentColor" height=30 width=30 class="window-icon icon" %}
44
</button>
55
<a href="/" class="window-controls{% if page.url == '/' %} disabled{% endif %}" slot="titlebar" hidden="">

embed/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<link rel="preload" href="https://cdn.kernvalley.us/components/wfd/events.html" as="fetch" type="text/html" crossorigin="anonymous" referrerpolicy="no-referrer" fetchpriority="high" />
1111
<link rel="preload" href="https://cdn.kernvalley.us/components/wfd/events.css" as="style" type="text/css" crossorigin="anonymous" referrerpolicy="no-referrer" fetchpriority="high" />
1212
<link rel="preload" href="/events.json" as="fetch" type="application/json" crossorigin="anonymous" referrerpolicy="no-referrer" />
13+
<script type="application/javascript" referrerpolicy="no-referrer" crossorigin="anonymous" integrity="sha384-xoY6kDRPTvbDfGdGA3S6Ercudev5mWGBWZIErLB38f7TeN6hV7zof6WBpzMdx/z0" src="https://unpkg.com/@shgysk8zer0/polyfills@0.0.5/all.min.js" fetchpriority="hight" defer=""></script>
14+
<script type="application/javascript" referrerpolicy="no-referrer" crossorigin="anonymous" integrity="sha384-55L/wO9o0uIVTeubRIDQB4bewfNqyxrj4OXuxlW24NMEk+ioZwMHVw/tFV78mM+k" src="https://unpkg.com/@shgysk8zer0/kazoo@0.0.5/harden.js" fetchpriority="high" defer=""></script>
1315
<script src="https://unpkg.com/@webcomponents/custom-elements@1.4.2/custom-elements.min.js" crossorigin="anonymous" referrerpolicy="no-referrer" integrity="sha384-fKk84RJZVb9omR6vx3MyOKCs7zxYfhNoXpMbxyz3aMPpzPF+9dp3j8BmZEn35WwA" defer="" nomodule=""></script>
14-
<script src="https://cdn.kernvalley.us/js/shims.min.js" crossorigin="anonymous" referrerpolicy="no-referrer" defer=""></script>
15-
<script src="https://cdn.kernvalley.us/js/harden.min.js" crossorigin="anonymous" referrerpolicy="no-referrer" defer=""></script>
1616
<script src="https://cdn.kernvalley.us/components/wfd/events.min.js" crossorigin="anonymous" referrerpolicy="no-referrer" defer=""></script>
1717
<script src="./index.js" referrerpolicy="no-referrer" defer=""></script>
1818
</head>

js/auth.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { on, each } from 'https://cdn.kernvalley.us/js/std-js/dom.js';
2-
import { md5 } from 'https://cdn.kernvalley.us/js/std-js/hash.js';
3-
import { showDialog } from 'https://cdn.kernvalley.us/js/std-js/error-handler.js';
4-
import { isObject } from 'https://cdn.kernvalley.us/js/std-js/utility.js';
1+
import { on, each } from 'std-js/dom.js';
2+
import { md5 } from 'std-js/hash.js';
3+
import { showDialog } from 'std-js/error-handler.js';
4+
import { isObject } from 'std-js/utility.js';
55
import { register, login, resetPassword, whenLoggedIn } from './firebase.js';
66
import { redirect, getPages } from './functions.js';
77
const url = new URL(location.href);

js/firebase.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import { firebase } from './consts.js';
2-
import { initializeApp } from 'https://www.gstatic.com/firebasejs/9.16.0/firebase-app.js';
2+
import { initializeApp } from 'firebase/firebase-app.js';
33

44
import {
55
getFirestore, collection, getDocs, getDoc, doc, addDoc, setDoc,
66
enableIndexedDbPersistence,
7-
} from 'https://www.gstatic.com/firebasejs/9.16.0/firebase-firestore.js';
7+
} from 'firebase/firebase-firestore.js';
88

99
/**
1010
* @see https://firebase.google.com/docs/auth/web/manage-users?authuser=0
1111
*/
1212
import {
1313
getAuth, createUserWithEmailAndPassword, signInWithEmailAndPassword, signOut,
1414
onAuthStateChanged, updateProfile, sendPasswordResetEmail,
15-
} from 'https://www.gstatic.com/firebasejs/9.16.0/firebase-auth.js';
15+
} from 'firebase/firebase-auth.js';
1616

17-
import { getStorage, ref, getDownloadURL, uploadBytes } from 'https://www.gstatic.com/firebasejs/9.16.0/firebase-storage.js';
17+
import { getStorage, ref, getDownloadURL, uploadBytes } from 'firebase/firebase-storage.js';
1818

1919
export const loadFirebase = (async () => {
2020
return new initializeApp(firebase.config);

js/functions.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { createCustomElement } from 'https://cdn.kernvalley.us/js/std-js/custom-elements.js';
2-
import { getJSON, navigateTo } from 'https://cdn.kernvalley.us/js/std-js/http.js';
3-
import { isObject } from 'https://cdn.kernvalley.us/js/std-js/utility.js';
4-
import { find } from 'https://cdn.kernvalley.us/js/std-js/dom.js';
1+
import { createCustomElement } from 'std-js/custom-elements.js';
2+
import { getJSON, navigateTo } from 'std-js/http.js';
3+
import { isObject } from 'std-js/utility.js';
4+
import { find } from 'std-js/dom.js';
55
import { site, icons, mapSelector, startDate, endDate } from './consts.js';
66

77
const allowedOrigins = [];

js/handlers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { each, attr } from 'https://cdn.kernvalley.us/js/std-js/dom.js';
1+
import { each, attr } from 'std-js/dom.js';
22

33
export function searchDateTimeRange({ from = new Date('2020-02-14T11:00'), hours = 2 } = {}) {
44
if (! (from instanceof Date)) {

js/index.js

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
1-
import 'https://cdn.kernvalley.us/js/std-js/deprefixer.js';
2-
import 'https://cdn.kernvalley.us/js/std-js/theme-cookie.js';
3-
import 'https://cdn.kernvalley.us/components/share-button.js';
4-
import 'https://cdn.kernvalley.us/components/current-year.js';
5-
import 'https://cdn.kernvalley.us/components/not-supported.js';
6-
// import 'https://cdn.kernvalley.us/components/ad/block.js';
7-
import 'https://cdn.kernvalley.us/components/krv/ad.js';
8-
import 'https://cdn.kernvalley.us/components/weather/current.js';
9-
import 'https://cdn.kernvalley.us/components/github/user.js';
10-
import 'https://cdn.kernvalley.us/components/install/prompt.js';
11-
import 'https://cdn.kernvalley.us/components/app/list-button.js';
12-
import 'https://cdn.kernvalley.us/components/app/stores.js';
13-
import 'https://cdn.kernvalley.us/components/share-to-button/share-to-button.js';
14-
import 'https://cdn.kernvalley.us/components/disqus/comments.js';
15-
// import 'https://cdn.kernvalley.us/components/youtube/player.js';
16-
import 'https://cdn.kernvalley.us/components/window-controls.js';
17-
import { init } from 'https://cdn.kernvalley.us/js/std-js/data-handlers.js';
18-
import { debounce } from 'https://cdn.kernvalley.us/js/std-js/events.js';
19-
import { URLPattern as URLPatternShim } from 'https://unpkg.com/urlpattern-polyfill@1.0.0-rc1/dist/index.modern.js';
1+
import 'std-js/theme-cookie.js';
2+
import '@shgysk8zer0/components/share-button.js';
3+
import '@shgysk8zer0/components/current-year.js';
4+
import '@shgysk8zer0/components/not-supported.js';
5+
import '@kernvalley/components/ad.js';
6+
import '@shgysk8zer0/components/weather/current.js';
7+
import '@shgysk8zer0/components/github/user.js';
8+
import '@shgysk8zer0/components/install/prompt.js';
9+
import '@shgysk8zer0/components/app/list-button.js';
10+
import '@shgysk8zer0/components/app/stores.js';
11+
import '@shgysk8zer0/components/share-to-button/share-to-button.js';
12+
import '@shgysk8zer0/components/disqus/comments.js';
13+
// import '@shgysk8zer0/components/youtube/player.js';
14+
import '@shgysk8zer0/components/window-controls.js';
15+
import { init } from 'std-js/data-handlers.js';
16+
import { debounce } from 'std-js/events.js';
17+
import { URLPattern as URLPatternShim } from 'url-pattern';
2018
import {
2119
searchDateTimeRange, eventSearchHandler, businessCategorySearch,
2220
} from './handlers.js';
23-
import { shareInit } from 'https://cdn.kernvalley.us/js/std-js/data-share.js';
21+
import { shareInit } from 'std-js/data-share.js';
2422
import {
2523
ready, loaded, css, on, toggleClass, intersect, attr,
26-
} from 'https://cdn.kernvalley.us/js/std-js/dom.js';
27-
import { getCustomElement } from 'https://cdn.kernvalley.us/js/std-js/custom-elements.js';
28-
import { importGa, externalHandler, telHandler, mailtoHandler } from 'https://cdn.kernvalley.us/js/std-js/google-analytics.js';
29-
import { DAYS } from 'https://cdn.kernvalley.us/js/std-js/date-consts.js';
24+
} from 'std-js/dom.js';
25+
import { getCustomElement } from 'std-js/custom-elements.js';
26+
import { importGa, externalHandler, telHandler, mailtoHandler } from 'std-js/google-analytics.js';
27+
import { DAYS } from 'std-js/date-consts.js';
3028
import {
3129
searchLocationMarker, createMarker, isOnGoing, filterEventNamesDatalist,
3230
intersectCallback, getPages, findNextEvent,
3331
} from './functions.js';
34-
import { getGooglePolicy, getDefaultPolicyWithDisqus } from 'https://cdn.kernvalley.us/js/std-js/trust-policies.js';
35-
import { createPolicy } from 'https://cdn.kernvalley.us/js/std-js/trust.js';
36-
import { createYouTubeEmbed } from 'https://cdn.kernvalley.us/js/std-js/youtube.js';
32+
import { getGooglePolicy, getDefaultPolicyWithDisqus } from 'std-js/trust-policies.js';
33+
import { createPolicy } from 'std-js/trust.js';
34+
import { createYouTubeEmbed } from 'std-js/youtube.js';
3735
import { GA } from './consts.js';
3836
import './store.js';
3937
import './profile.js';

js/stripe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getJSON } from 'https://cdn.kernvalley.us/js/std-js/http.js';
1+
import { getJSON } from 'std-js/http.js';
22

33
const ENDPOINT = '/api/stripe';
44

0 commit comments

Comments
 (0)