├── src
├── routes
│ ├── url
│ │ └── +page.svelte
│ ├── Header.svelte
│ ├── +layout.svelte
│ ├── +page.ts
│ ├── about
│ │ ├── +page.ts
│ │ └── +page.svelte
│ ├── api
│ │ ├── kv
│ │ │ ├── +server.ts
│ │ │ └── kv.json
│ │ └── triggerCron
│ │ │ └── +server.ts
│ ├── tailwind.css
│ └── +page.svelte
├── lib
│ ├── images
│ │ ├── svelte-welcome.png
│ │ ├── svelte-welcome.webp
│ │ ├── github.svg
│ │ └── svelte-logo.svg
│ ├── components
│ │ ├── MonitorDayAverage.svelte
│ │ ├── MonitorStatusLabel.svelte
│ │ ├── MonitorStatusHeader.svelte
│ │ ├── MonitorFilter.svelte
│ │ ├── MonitorCard.svelte
│ │ ├── ThemeSwitcher.svelte
│ │ ├── MonitorHistogram.svelte
│ │ └── locations.js
│ └── functions
│ │ ├── helpers.ts
│ │ └── cronTrigger.ts
├── app.html
├── index.test.ts
├── index.ts
├── config.json
└── app.d.ts
├── .npmrc
├── static
├── favicon.png
├── robots.txt
└── logo-192x192.png
├── postcss.config.js
├── .gitignore
├── .editorconfig
├── .eslintignore
├── .prettierignore
├── tailwind.config.js
├── tests
└── test.ts
├── vite.config.ts
├── .prettierrc
├── wrangler.toml
├── playwright.config.ts
├── tsconfig.json
├── .eslintrc.cjs
├── svelte.config.js
├── README.md
├── package.json
├── cli
└── gcMonitors.js
└── pnpm-lock.yaml
/src/routes/url/+page.svelte:
--------------------------------------------------------------------------------
1 |
keep this.
2 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 | resolution-mode=highest
3 |
--------------------------------------------------------------------------------
/src/routes/Header.svelte:
--------------------------------------------------------------------------------
1 |
7 |
About this app
8 |
9 |
10 | This is a SvelteKit app. You can make your own by typing the
11 | following into your command line and following the prompts:
12 |
13 |
14 |
npm create svelte@latest
15 |
16 |
17 | The page you're looking at is purely static HTML, with no client-side interactivity needed.
18 | Because of that, we don't need to load any JavaScript. Try viewing the page's source, or opening
19 | the devtools network panel and reloading.
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/index.test.ts:
--------------------------------------------------------------------------------
1 | import { afterAll, beforeAll, describe, expect, it } from 'vitest';
2 | import type { UnstableDevWorker } from 'wrangler';
3 | import { unstable_dev } from 'wrangler';
4 |
5 | describe('Worker', () => {
6 | let worker: UnstableDevWorker;
7 |
8 | beforeAll(async () => {
9 | worker = await unstable_dev('src/index.ts', {
10 | experimental: { disableExperimentalWarning: true }
11 | });
12 | });
13 |
14 | afterAll(async () => {
15 | await worker.stop();
16 | });
17 |
18 | it('should return Hello World', async () => {
19 | const resp = await worker.fetch();
20 | if (resp) {
21 | const text = await resp.text();
22 | expect(text).toMatchInlineSnapshot(`"Hello World!"`);
23 | }
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/svelte.config.js:
--------------------------------------------------------------------------------
1 | import adapter from '@sveltejs/adapter-cloudflare';
2 | import { vitePreprocess } from '@sveltejs/kit/vite';
3 |
4 | /** @type {import('@sveltejs/kit').Config} */
5 | const config = {
6 | // Consult https://kit.svelte.dev/docs/integrations#preprocessors
7 | // for more information about preprocessors
8 | preprocess: vitePreprocess(),
9 |
10 | kit: {
11 | // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
12 | // If your environment is not supported or you settled on a specific environment, switch out the adapter.
13 | // See https://kit.svelte.dev/docs/adapters for more information about adapters.
14 | adapter: adapter()
15 | }
16 | };
17 |
18 | export default config;
19 |
--------------------------------------------------------------------------------
/src/lib/components/MonitorStatusLabel.svelte:
--------------------------------------------------------------------------------
1 |
23 |
24 |