@hiai-gg/hiai-docs 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.all-contributorsrc +18 -0
- package/.claude/settings.local.json +61 -0
- package/.dockerignore +113 -0
- package/.env.example +68 -0
- package/.github/FUNDING.yml +5 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +74 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +78 -0
- package/.github/dependabot.yml +136 -0
- package/.github/pull_request_template.md +96 -0
- package/.github/workflows/ci.yml +283 -0
- package/AGENTS.md +237 -0
- package/CODE_OF_CONDUCT.md +134 -0
- package/CONTRIBUTING.md +77 -0
- package/Caddyfile +50 -0
- package/Dockerfile.backend +60 -0
- package/LICENSE +21 -0
- package/README.md +284 -0
- package/RELEASE_CHECKLIST.md +34 -0
- package/SECURITY.md +60 -0
- package/backend/package.json +43 -0
- package/backend/src/__tests__/auth-helpers.test.ts +51 -0
- package/backend/src/__tests__/chunker.test.ts +65 -0
- package/backend/src/__tests__/config.test.ts +91 -0
- package/backend/src/__tests__/csrf.test.ts +91 -0
- package/backend/src/__tests__/embedding.test.ts +48 -0
- package/backend/src/__tests__/rate-limit.test.ts +46 -0
- package/backend/src/__tests__/routes.test.ts +38 -0
- package/backend/src/__tests__/schema.test.ts +31 -0
- package/backend/src/__tests__/validation.test.ts +556 -0
- package/backend/src/api/middleware/auth.ts +56 -0
- package/backend/src/api/middleware/csrf.ts +91 -0
- package/backend/src/api/middleware/rate-limit.ts +77 -0
- package/backend/src/api/middleware/webhook-verify.ts +22 -0
- package/backend/src/api/routes/attachments.ts +280 -0
- package/backend/src/api/routes/auth.ts +52 -0
- package/backend/src/api/routes/collaboration.ts +121 -0
- package/backend/src/api/routes/documents.ts +664 -0
- package/backend/src/api/routes/folders.ts +226 -0
- package/backend/src/api/routes/search.ts +354 -0
- package/backend/src/api/routes/share.ts +512 -0
- package/backend/src/api/routes/tags.ts +247 -0
- package/backend/src/api/routes/versions.ts +99 -0
- package/backend/src/api/routes/webhooks.ts +43 -0
- package/backend/src/embedding/chunker.ts +74 -0
- package/backend/src/embedding/index.ts +117 -0
- package/backend/src/embedding/providers/ollama.ts +63 -0
- package/backend/src/embedding/providers/openrouter.ts +71 -0
- package/backend/src/embedding/utils.ts +13 -0
- package/backend/src/embedding/worker.ts +89 -0
- package/backend/src/index.ts +147 -0
- package/backend/src/lib/auth-helpers.ts +27 -0
- package/backend/src/lib/auth.ts +35 -0
- package/backend/src/lib/config.ts +73 -0
- package/backend/src/lib/db.ts +7 -0
- package/backend/src/lib/embedding-queue.ts +12 -0
- package/backend/src/lib/logger.ts +18 -0
- package/backend/src/lib/markdown-to-doc.ts +45 -0
- package/backend/src/lib/minio.ts +46 -0
- package/backend/src/lib/redis.ts +19 -0
- package/backend/src/lib/yjs-provider.ts +182 -0
- package/backend/tests/integration/_harness.ts +754 -0
- package/backend/tests/integration/auth.test.ts +296 -0
- package/backend/tests/integration/routes.documents.test.ts +459 -0
- package/backend/tests/integration/routes.folders.test.ts +337 -0
- package/backend/tests/integration/routes.search.test.ts +322 -0
- package/backend/tests/integration/routes.share.test.ts +773 -0
- package/backend/tests/integration/routes.tags.test.ts +425 -0
- package/backend/tests/integration/routes.versions.test.ts +233 -0
- package/backend/tsconfig.json +18 -0
- package/docker-compose.yml +218 -0
- package/docs/API.md +328 -0
- package/docs/ARCHITECTURE.md +75 -0
- package/docs/DEPLOYMENT.md +113 -0
- package/docs/PRODUCTION_STATUS.md +61 -0
- package/docs/openapi.json +385 -0
- package/frontend/.svelte-kit.old/ambient.d.ts +230 -0
- package/frontend/.svelte-kit.old/env.d.ts +1 -0
- package/frontend/.svelte-kit.old/generated/client/app.js +46 -0
- package/frontend/.svelte-kit.old/generated/client/matchers.js +1 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/0.js +3 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/1.js +1 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/10.js +3 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/2.js +1 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/3.js +1 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/4.js +1 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/5.js +3 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/6.js +1 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/7.js +3 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/8.js +1 -0
- package/frontend/.svelte-kit.old/generated/client/nodes/9.js +3 -0
- package/frontend/.svelte-kit.old/generated/root.js +3 -0
- package/frontend/.svelte-kit.old/generated/root.svelte +80 -0
- package/frontend/.svelte-kit.old/generated/server/internal.js +55 -0
- package/frontend/.svelte-kit.old/non-ambient.d.ts +59 -0
- package/frontend/.svelte-kit.old/tsconfig.json +59 -0
- package/frontend/.svelte-kit.old/types/route_meta_data.json +40 -0
- package/frontend/.svelte-kit.old/types/src/routes/$types.d.ts +21 -0
- package/frontend/.svelte-kit.old/types/src/routes/(app)/$types.d.ts +30 -0
- package/frontend/.svelte-kit.old/types/src/routes/(app)/docs/[id]/$types.d.ts +27 -0
- package/frontend/.svelte-kit.old/types/src/routes/(app)/docs/[id]/proxy+page.ts +25 -0
- package/frontend/.svelte-kit.old/types/src/routes/api/[...path]/$types.d.ts +10 -0
- package/frontend/.svelte-kit.old/types/src/routes/folders/[id]/$types.d.ts +27 -0
- package/frontend/.svelte-kit.old/types/src/routes/folders/[id]/proxy+page.ts +15 -0
- package/frontend/.svelte-kit.old/types/src/routes/login/$types.d.ts +17 -0
- package/frontend/.svelte-kit.old/types/src/routes/register/$types.d.ts +17 -0
- package/frontend/.svelte-kit.old/types/src/routes/s/[token]/$types.d.ts +20 -0
- package/frontend/.svelte-kit.old/types/src/routes/s/[token]/proxy+page.ts +6 -0
- package/frontend/.svelte-kit.old/types/src/routes/search/$types.d.ts +19 -0
- package/frontend/.svelte-kit.old/types/src/routes/search/proxy+page.ts +26 -0
- package/frontend/.svelte-kit.old/types/src/routes/settings/$types.d.ts +17 -0
- package/frontend/Dockerfile +44 -0
- package/frontend/biome.json +40 -0
- package/frontend/components.json +18 -0
- package/frontend/messages/en.json +434 -0
- package/frontend/package.json +70 -0
- package/frontend/project.inlang/settings.json +12 -0
- package/frontend/src/app.css +6 -0
- package/frontend/src/app.d.ts +13 -0
- package/frontend/src/app.html +30 -0
- package/frontend/src/hooks.server.ts +10 -0
- package/frontend/src/hooks.ts +10 -0
- package/frontend/src/lib/api/attachments.ts +45 -0
- package/frontend/src/lib/api/client.test.ts +15 -0
- package/frontend/src/lib/api/client.ts +57 -0
- package/frontend/src/lib/api/documents.ts +83 -0
- package/frontend/src/lib/api/folders.ts +180 -0
- package/frontend/src/lib/api/search.test.ts +52 -0
- package/frontend/src/lib/api/search.ts +128 -0
- package/frontend/src/lib/api/settings.ts +95 -0
- package/frontend/src/lib/api/share.ts +71 -0
- package/frontend/src/lib/api/tags.test.ts +91 -0
- package/frontend/src/lib/api/tags.ts +87 -0
- package/frontend/src/lib/auth-client.ts +10 -0
- package/frontend/src/lib/collaboration.ts +63 -0
- package/frontend/src/lib/components/AttachmentUpload.svelte +110 -0
- package/frontend/src/lib/components/DatePicker.svelte +322 -0
- package/frontend/src/lib/components/DocumentCard.svelte +166 -0
- package/frontend/src/lib/components/EmptyState.svelte +49 -0
- package/frontend/src/lib/components/FolderCard.svelte +93 -0
- package/frontend/src/lib/components/ScrollToTop.svelte +72 -0
- package/frontend/src/lib/components/SearchBar.svelte +47 -0
- package/frontend/src/lib/components/SearchResult.svelte +115 -0
- package/frontend/src/lib/components/SettingsDialog.svelte +271 -0
- package/frontend/src/lib/components/ShareDialog.svelte +158 -0
- package/frontend/src/lib/components/ShareLink.svelte +98 -0
- package/frontend/src/lib/components/TagCreateDialog.svelte +284 -0
- package/frontend/src/lib/components/VersionDiff.svelte +55 -0
- package/frontend/src/lib/components/VersionHistory.svelte +96 -0
- package/frontend/src/lib/components/editor/DocumentTitle.svelte +87 -0
- package/frontend/src/lib/components/editor/EditorToolbar.svelte +1367 -0
- package/frontend/src/lib/components/editor/HiAiEditor.svelte +531 -0
- package/frontend/src/lib/components/editor/LinkDialog.svelte +134 -0
- package/frontend/src/lib/components/editor/MarkdownToggle.svelte +88 -0
- package/frontend/src/lib/components/editor/editorExtensions.ts +53 -0
- package/frontend/src/lib/components/editor/markdown.ts +38 -0
- package/frontend/src/lib/components/sidebar/FolderTree.svelte +731 -0
- package/frontend/src/lib/components/sidebar/RecentDocs.svelte +311 -0
- package/frontend/src/lib/components/sidebar/Sidebar.svelte +156 -0
- package/frontend/src/lib/components/sidebar/TagList.svelte +200 -0
- package/frontend/src/lib/components/ui/confirm-dialog/ConfirmDialog.svelte +76 -0
- package/frontend/src/lib/components/ui/confirm-dialog/index.ts +1 -0
- package/frontend/src/lib/stores/tag-store.svelte.ts +56 -0
- package/frontend/src/lib/stores/theme.svelte.ts +97 -0
- package/frontend/src/lib/svelte.d.ts +6 -0
- package/frontend/src/lib/types.ts +44 -0
- package/frontend/src/lib/utils/clipboard.ts +17 -0
- package/frontend/src/lib/utils/strip-markdown.ts +59 -0
- package/frontend/src/lib/utils.ts +33 -0
- package/frontend/src/routes/(app)/+layout.svelte +17 -0
- package/frontend/src/routes/(app)/+page.server.ts +10 -0
- package/frontend/src/routes/(app)/+page.svelte +303 -0
- package/frontend/src/routes/(app)/docs/[id]/+page.server.ts +10 -0
- package/frontend/src/routes/(app)/docs/[id]/+page.svelte +1108 -0
- package/frontend/src/routes/(app)/docs/[id]/+page.ts +24 -0
- package/frontend/src/routes/(app)/search/+page.svelte +593 -0
- package/frontend/src/routes/(app)/search/+page.ts +25 -0
- package/frontend/src/routes/+error.svelte +12 -0
- package/frontend/src/routes/+layout.svelte +18 -0
- package/frontend/src/routes/+layout.ts +2 -0
- package/frontend/src/routes/api/[...path]/+server.ts +111 -0
- package/frontend/src/routes/folders/[id]/+page.server.ts +10 -0
- package/frontend/src/routes/folders/[id]/+page.svelte +319 -0
- package/frontend/src/routes/folders/[id]/+page.ts +14 -0
- package/frontend/src/routes/login/+page.svelte +90 -0
- package/frontend/src/routes/register/+page.svelte +97 -0
- package/frontend/src/routes/s/[token]/+page.svelte +496 -0
- package/frontend/src/routes/s/[token]/+page.ts +5 -0
- package/frontend/src/routes/settings/+page.svelte +175 -0
- package/frontend/static/favicon.png +0 -0
- package/frontend/static/logo.png +0 -0
- package/frontend/svelte.config.js +15 -0
- package/frontend/tsconfig.json +15 -0
- package/frontend/vite.config.ts +25 -0
- package/init.sql +9 -0
- package/logo.png +0 -0
- package/package.json +39 -0
- package/package.public.json +39 -0
- package/packages/db/drizzle.config.ts +10 -0
- package/packages/db/package.json +30 -0
- package/packages/db/src/client.ts +9 -0
- package/packages/db/src/index.ts +2 -0
- package/packages/db/src/migrations/0000_nice_bedlam.sql +165 -0
- package/packages/db/src/migrations/0001_w2_3_test.sql +5 -0
- package/packages/db/src/migrations/0002_rename_content_json.sql +2 -0
- package/packages/db/src/migrations/meta/0000_snapshot.json +1331 -0
- package/packages/db/src/migrations/meta/0001_snapshot.json +1399 -0
- package/packages/db/src/migrations/meta/0002_snapshot.json +1399 -0
- package/packages/db/src/migrations/meta/_journal.json +27 -0
- package/packages/db/src/schema.ts +378 -0
- package/packages/db/tsconfig.json +17 -0
- package/scripts/export-openapi.ts +37 -0
- package/scripts/health-check.sh +75 -0
- package/scripts/migrate.sh +135 -0
- package/scripts/prework_backup.sh +25 -0
- package/scripts/release.sh +83 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
|
|
2
|
+
// this file is generated — do not edit it
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/// <reference types="@sveltejs/kit" />
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* This module provides access to environment variables that are injected _statically_ into your bundle at build time and are limited to _private_ access.
|
|
9
|
+
*
|
|
10
|
+
* | | Runtime | Build time |
|
|
11
|
+
* | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
12
|
+
* | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
|
|
13
|
+
* | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
|
|
14
|
+
*
|
|
15
|
+
* Static environment variables are [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env` at build time and then statically injected into your bundle at build time, enabling optimisations like dead code elimination.
|
|
16
|
+
*
|
|
17
|
+
* **_Private_ access:**
|
|
18
|
+
*
|
|
19
|
+
* - This module cannot be imported into client-side code
|
|
20
|
+
* - This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured)
|
|
21
|
+
*
|
|
22
|
+
* For example, given the following build time environment:
|
|
23
|
+
*
|
|
24
|
+
* ```env
|
|
25
|
+
* ENVIRONMENT=production
|
|
26
|
+
* PUBLIC_BASE_URL=http://site.com
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* With the default `publicPrefix` and `privatePrefix`:
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { ENVIRONMENT, PUBLIC_BASE_URL } from '$env/static/private';
|
|
33
|
+
*
|
|
34
|
+
* console.log(ENVIRONMENT); // => "production"
|
|
35
|
+
* console.log(PUBLIC_BASE_URL); // => throws error during build
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* The above values will be the same _even if_ different values for `ENVIRONMENT` or `PUBLIC_BASE_URL` are set at runtime, as they are statically replaced in your code with their build time values.
|
|
39
|
+
*/
|
|
40
|
+
declare module '$env/static/private' {
|
|
41
|
+
export const npm_config_user_agent: string;
|
|
42
|
+
export const HOSTNAME: string;
|
|
43
|
+
export const BUN_INSTALL_BIN: string;
|
|
44
|
+
export const npm_node_execpath: string;
|
|
45
|
+
export const SHLVL: string;
|
|
46
|
+
export const WEB_PORT: string;
|
|
47
|
+
export const PORT: string;
|
|
48
|
+
export const HOME: string;
|
|
49
|
+
export const OLDPWD: string;
|
|
50
|
+
export const npm_package_json: string;
|
|
51
|
+
export const npm_config_local_prefix: string;
|
|
52
|
+
export const PATH: string;
|
|
53
|
+
export const npm_package_name: string;
|
|
54
|
+
export const NODE: string;
|
|
55
|
+
export const npm_lifecycle_script: string;
|
|
56
|
+
export const npm_package_version: string;
|
|
57
|
+
export const npm_lifecycle_event: string;
|
|
58
|
+
export const PWD: string;
|
|
59
|
+
export const npm_execpath: string;
|
|
60
|
+
export const npm_command: string;
|
|
61
|
+
export const API_URL: string;
|
|
62
|
+
export const NODE_ENV: string;
|
|
63
|
+
export const BUN_RUNTIME_TRANSPILER_CACHE_PATH: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* This module provides access to environment variables that are injected _statically_ into your bundle at build time and are _publicly_ accessible.
|
|
68
|
+
*
|
|
69
|
+
* | | Runtime | Build time |
|
|
70
|
+
* | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
71
|
+
* | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
|
|
72
|
+
* | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
|
|
73
|
+
*
|
|
74
|
+
* Static environment variables are [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env` at build time and then statically injected into your bundle at build time, enabling optimisations like dead code elimination.
|
|
75
|
+
*
|
|
76
|
+
* **_Public_ access:**
|
|
77
|
+
*
|
|
78
|
+
* - This module _can_ be imported into client-side code
|
|
79
|
+
* - **Only** variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`) are included
|
|
80
|
+
*
|
|
81
|
+
* For example, given the following build time environment:
|
|
82
|
+
*
|
|
83
|
+
* ```env
|
|
84
|
+
* ENVIRONMENT=production
|
|
85
|
+
* PUBLIC_BASE_URL=http://site.com
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* With the default `publicPrefix` and `privatePrefix`:
|
|
89
|
+
*
|
|
90
|
+
* ```ts
|
|
91
|
+
* import { ENVIRONMENT, PUBLIC_BASE_URL } from '$env/static/public';
|
|
92
|
+
*
|
|
93
|
+
* console.log(ENVIRONMENT); // => throws error during build
|
|
94
|
+
* console.log(PUBLIC_BASE_URL); // => "http://site.com"
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* The above values will be the same _even if_ different values for `ENVIRONMENT` or `PUBLIC_BASE_URL` are set at runtime, as they are statically replaced in your code with their build time values.
|
|
98
|
+
*/
|
|
99
|
+
declare module '$env/static/public' {
|
|
100
|
+
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* This module provides access to environment variables set _dynamically_ at runtime and that are limited to _private_ access.
|
|
105
|
+
*
|
|
106
|
+
* | | Runtime | Build time |
|
|
107
|
+
* | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
108
|
+
* | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
|
|
109
|
+
* | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
|
|
110
|
+
*
|
|
111
|
+
* Dynamic environment variables are defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`.
|
|
112
|
+
*
|
|
113
|
+
* **_Private_ access:**
|
|
114
|
+
*
|
|
115
|
+
* - This module cannot be imported into client-side code
|
|
116
|
+
* - This module includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured)
|
|
117
|
+
*
|
|
118
|
+
* > [!NOTE] In `dev`, `$env/dynamic` includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
|
|
119
|
+
*
|
|
120
|
+
* > [!NOTE] To get correct types, environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
|
|
121
|
+
* >
|
|
122
|
+
* > ```env
|
|
123
|
+
* > MY_FEATURE_FLAG=
|
|
124
|
+
* > ```
|
|
125
|
+
* >
|
|
126
|
+
* > You can override `.env` values from the command line like so:
|
|
127
|
+
* >
|
|
128
|
+
* > ```sh
|
|
129
|
+
* > MY_FEATURE_FLAG="enabled" npm run dev
|
|
130
|
+
* > ```
|
|
131
|
+
*
|
|
132
|
+
* For example, given the following runtime environment:
|
|
133
|
+
*
|
|
134
|
+
* ```env
|
|
135
|
+
* ENVIRONMENT=production
|
|
136
|
+
* PUBLIC_BASE_URL=http://site.com
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* With the default `publicPrefix` and `privatePrefix`:
|
|
140
|
+
*
|
|
141
|
+
* ```ts
|
|
142
|
+
* import { env } from '$env/dynamic/private';
|
|
143
|
+
*
|
|
144
|
+
* console.log(env.ENVIRONMENT); // => "production"
|
|
145
|
+
* console.log(env.PUBLIC_BASE_URL); // => undefined
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
declare module '$env/dynamic/private' {
|
|
149
|
+
export const env: {
|
|
150
|
+
npm_config_user_agent: string;
|
|
151
|
+
HOSTNAME: string;
|
|
152
|
+
BUN_INSTALL_BIN: string;
|
|
153
|
+
npm_node_execpath: string;
|
|
154
|
+
SHLVL: string;
|
|
155
|
+
WEB_PORT: string;
|
|
156
|
+
PORT: string;
|
|
157
|
+
HOME: string;
|
|
158
|
+
OLDPWD: string;
|
|
159
|
+
npm_package_json: string;
|
|
160
|
+
npm_config_local_prefix: string;
|
|
161
|
+
PATH: string;
|
|
162
|
+
npm_package_name: string;
|
|
163
|
+
NODE: string;
|
|
164
|
+
npm_lifecycle_script: string;
|
|
165
|
+
npm_package_version: string;
|
|
166
|
+
npm_lifecycle_event: string;
|
|
167
|
+
PWD: string;
|
|
168
|
+
npm_execpath: string;
|
|
169
|
+
npm_command: string;
|
|
170
|
+
API_URL: string;
|
|
171
|
+
NODE_ENV: string;
|
|
172
|
+
BUN_RUNTIME_TRANSPILER_CACHE_PATH: string;
|
|
173
|
+
[key: `PUBLIC_${string}`]: undefined;
|
|
174
|
+
[key: `${string}`]: string | undefined;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* This module provides access to environment variables set _dynamically_ at runtime and that are _publicly_ accessible.
|
|
180
|
+
*
|
|
181
|
+
* | | Runtime | Build time |
|
|
182
|
+
* | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
183
|
+
* | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
|
|
184
|
+
* | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
|
|
185
|
+
*
|
|
186
|
+
* Dynamic environment variables are defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`.
|
|
187
|
+
*
|
|
188
|
+
* **_Public_ access:**
|
|
189
|
+
*
|
|
190
|
+
* - This module _can_ be imported into client-side code
|
|
191
|
+
* - **Only** variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`) are included
|
|
192
|
+
*
|
|
193
|
+
* > [!NOTE] In `dev`, `$env/dynamic` includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
|
|
194
|
+
*
|
|
195
|
+
* > [!NOTE] To get correct types, environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
|
|
196
|
+
* >
|
|
197
|
+
* > ```env
|
|
198
|
+
* > MY_FEATURE_FLAG=
|
|
199
|
+
* > ```
|
|
200
|
+
* >
|
|
201
|
+
* > You can override `.env` values from the command line like so:
|
|
202
|
+
* >
|
|
203
|
+
* > ```sh
|
|
204
|
+
* > MY_FEATURE_FLAG="enabled" npm run dev
|
|
205
|
+
* > ```
|
|
206
|
+
*
|
|
207
|
+
* For example, given the following runtime environment:
|
|
208
|
+
*
|
|
209
|
+
* ```env
|
|
210
|
+
* ENVIRONMENT=production
|
|
211
|
+
* PUBLIC_BASE_URL=http://example.com
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* With the default `publicPrefix` and `privatePrefix`:
|
|
215
|
+
*
|
|
216
|
+
* ```ts
|
|
217
|
+
* import { env } from '$env/dynamic/public';
|
|
218
|
+
* console.log(env.ENVIRONMENT); // => undefined, not public
|
|
219
|
+
* console.log(env.PUBLIC_BASE_URL); // => "http://example.com"
|
|
220
|
+
* ```
|
|
221
|
+
*
|
|
222
|
+
* ```
|
|
223
|
+
*
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
declare module '$env/dynamic/public' {
|
|
227
|
+
export const env: {
|
|
228
|
+
[key: `PUBLIC_${string}`]: string | undefined;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// See https://svelte.dev/docs/kit/environment-variables for more information
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as universal_hooks from '../../../src/hooks.ts';
|
|
2
|
+
|
|
3
|
+
export { matchers } from './matchers.js';
|
|
4
|
+
|
|
5
|
+
export const nodes = [
|
|
6
|
+
() => import('./nodes/0'),
|
|
7
|
+
() => import('./nodes/1'),
|
|
8
|
+
() => import('./nodes/2'),
|
|
9
|
+
() => import('./nodes/3'),
|
|
10
|
+
() => import('./nodes/4'),
|
|
11
|
+
() => import('./nodes/5'),
|
|
12
|
+
() => import('./nodes/6'),
|
|
13
|
+
() => import('./nodes/7'),
|
|
14
|
+
() => import('./nodes/8'),
|
|
15
|
+
() => import('./nodes/9'),
|
|
16
|
+
() => import('./nodes/10')
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
export const server_loads = [];
|
|
20
|
+
|
|
21
|
+
export const dictionary = {
|
|
22
|
+
"/(app)": [~6,[2]],
|
|
23
|
+
"/(app)/docs/[id]": [~7,[2]],
|
|
24
|
+
"/folders/[id]": [~5],
|
|
25
|
+
"/login": [8],
|
|
26
|
+
"/register": [3],
|
|
27
|
+
"/search": [10],
|
|
28
|
+
"/settings": [4],
|
|
29
|
+
"/s/[token]": [9]
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const hooks = {
|
|
33
|
+
handleError: (({ error }) => { console.error(error) }),
|
|
34
|
+
|
|
35
|
+
reroute: universal_hooks.reroute || (() => {}),
|
|
36
|
+
transport: universal_hooks.transport || {}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode]));
|
|
40
|
+
export const encoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.encode]));
|
|
41
|
+
|
|
42
|
+
export const hash = false;
|
|
43
|
+
|
|
44
|
+
export const decode = (type, value) => decoders[type](value);
|
|
45
|
+
|
|
46
|
+
export { default as root } from '../root.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const matchers = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as component } from "../../../../src/routes/+error.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as component } from "../../../../src/routes/(app)/+layout.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as component } from "../../../../src/routes/register/+page.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as component } from "../../../../src/routes/settings/+page.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as component } from "../../../../src/routes/(app)/+page.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as component } from "../../../../src/routes/login/+page.svelte";
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!-- This file is generated by @sveltejs/kit — do not edit it! -->
|
|
2
|
+
<svelte:options runes={true} />
|
|
3
|
+
<script>
|
|
4
|
+
import { setContext, onMount, tick } from 'svelte';
|
|
5
|
+
import { browser } from '$app/env';
|
|
6
|
+
|
|
7
|
+
// stores
|
|
8
|
+
let { stores, page, constructors, components = [], form, data_0 = null, data_1 = null, data_2 = null } = $props();
|
|
9
|
+
|
|
10
|
+
if (!browser) {
|
|
11
|
+
// svelte-ignore state_referenced_locally
|
|
12
|
+
setContext('__svelte__', stores);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (browser) {
|
|
16
|
+
$effect.pre(() => stores.page.set(page));
|
|
17
|
+
} else {
|
|
18
|
+
// svelte-ignore state_referenced_locally
|
|
19
|
+
stores.page.set(page);
|
|
20
|
+
}
|
|
21
|
+
$effect(() => {
|
|
22
|
+
stores;page;constructors;components;form;data_0;data_1;data_2;
|
|
23
|
+
stores.page.notify();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
let mounted = $state(false);
|
|
27
|
+
let navigated = $state(false);
|
|
28
|
+
let title = $state(null);
|
|
29
|
+
|
|
30
|
+
onMount(() => {
|
|
31
|
+
const unsubscribe = stores.page.subscribe(() => {
|
|
32
|
+
if (mounted) {
|
|
33
|
+
navigated = true;
|
|
34
|
+
tick().then(() => {
|
|
35
|
+
title = document.title || 'untitled page';
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
mounted = true;
|
|
41
|
+
return unsubscribe;
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const Pyramid_2=$derived(constructors[2])
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
{#if constructors[1]}
|
|
48
|
+
{@const Pyramid_0 = constructors[0]}
|
|
49
|
+
<!-- svelte-ignore binding_property_non_reactive -->
|
|
50
|
+
<Pyramid_0 bind:this={components[0]} data={data_0} {form} params={page.params}>
|
|
51
|
+
{#if constructors[2]}
|
|
52
|
+
{@const Pyramid_1 = constructors[1]}
|
|
53
|
+
<!-- svelte-ignore binding_property_non_reactive -->
|
|
54
|
+
<Pyramid_1 bind:this={components[1]} data={data_1} {form} params={page.params}>
|
|
55
|
+
<!-- svelte-ignore binding_property_non_reactive -->
|
|
56
|
+
<Pyramid_2 bind:this={components[2]} data={data_2} {form} params={page.params} />
|
|
57
|
+
</Pyramid_1>
|
|
58
|
+
|
|
59
|
+
{:else}
|
|
60
|
+
{@const Pyramid_1 = constructors[1]}
|
|
61
|
+
<!-- svelte-ignore binding_property_non_reactive -->
|
|
62
|
+
<Pyramid_1 bind:this={components[1]} data={data_1} {form} params={page.params} />
|
|
63
|
+
|
|
64
|
+
{/if}
|
|
65
|
+
</Pyramid_0>
|
|
66
|
+
|
|
67
|
+
{:else}
|
|
68
|
+
{@const Pyramid_0 = constructors[0]}
|
|
69
|
+
<!-- svelte-ignore binding_property_non_reactive -->
|
|
70
|
+
<Pyramid_0 bind:this={components[0]} data={data_0} {form} params={page.params} />
|
|
71
|
+
|
|
72
|
+
{/if}
|
|
73
|
+
|
|
74
|
+
{#if mounted}
|
|
75
|
+
<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px">
|
|
76
|
+
{#if navigated}
|
|
77
|
+
{title}
|
|
78
|
+
{/if}
|
|
79
|
+
</div>
|
|
80
|
+
{/if}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
import root from '../root.js';
|
|
3
|
+
import { set_building, set_prerendering } from '$app/env/internal';
|
|
4
|
+
import { set_assets } from '$app/paths/internal/server';
|
|
5
|
+
import { set_manifest, set_read_implementation } from '__sveltekit/server';
|
|
6
|
+
import { set_env } from '__sveltekit/env';
|
|
7
|
+
import { set_private_env, set_public_env } from '../../../../node_modules/.bun/@sveltejs+kit@2.65.0+a852e93d1356ebb6/node_modules/@sveltejs/kit/src/runtime/shared-server.js';
|
|
8
|
+
|
|
9
|
+
export const options = {
|
|
10
|
+
app_template_contains_nonce: false,
|
|
11
|
+
async: false,
|
|
12
|
+
csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false},"reportOnly":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}},
|
|
13
|
+
csrf_check_origin: true,
|
|
14
|
+
csrf_trusted_origins: [],
|
|
15
|
+
embedded: false,
|
|
16
|
+
env_public_prefix: 'PUBLIC_',
|
|
17
|
+
env_private_prefix: '',
|
|
18
|
+
hash_routing: false,
|
|
19
|
+
hooks: null, // added lazily, via `get_hooks`
|
|
20
|
+
preload_strategy: "modulepreload",
|
|
21
|
+
root,
|
|
22
|
+
service_worker: false,
|
|
23
|
+
service_worker_options: undefined,
|
|
24
|
+
server_error_boundaries: false,
|
|
25
|
+
templates: {
|
|
26
|
+
app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"%lang%\" dir=\"%dir%\">\n <head>\n <meta charset=\"utf-8\" />\n <link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.embed.tiptap.dev; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https: http://localhost:9020 http://minio:9000; connect-src 'self' http://localhost:* ws://localhost:*; frame-src 'self';\" />\n " + head + "\n <script>\n (function () {\n try {\n var stored = localStorage.getItem(\"hiai-docs-theme\");\n var prefersDark = window.matchMedia(\"(prefers-color-scheme: dark)\").matches;\n var isDark = stored === \"dark\" || ((stored === null || stored === \"system\") && prefersDark);\n if (isDark) {\n document.documentElement.classList.add(\"dark\");\n } else {\n document.documentElement.classList.remove(\"dark\");\n }\n } catch (_) {\n /* no-op: localStorage may be unavailable (e.g. private mode) */\n }\n })();\n </script>\n </head>\n <body data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
|
|
27
|
+
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
|
|
28
|
+
},
|
|
29
|
+
version_hash: "19bda3b"
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export async function get_hooks() {
|
|
33
|
+
let handle;
|
|
34
|
+
let handleFetch;
|
|
35
|
+
let handleError;
|
|
36
|
+
let handleValidationError;
|
|
37
|
+
let init;
|
|
38
|
+
({ handle, handleFetch, handleError, handleValidationError, init } = await import("../../../src/hooks.server.ts"));
|
|
39
|
+
|
|
40
|
+
let reroute;
|
|
41
|
+
let transport;
|
|
42
|
+
({ reroute, transport } = await import("../../../src/hooks.ts"));
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
handle,
|
|
46
|
+
handleFetch,
|
|
47
|
+
handleError,
|
|
48
|
+
handleValidationError,
|
|
49
|
+
init,
|
|
50
|
+
reroute,
|
|
51
|
+
transport
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { set_assets, set_building, set_env, set_manifest, set_prerendering, set_private_env, set_public_env, set_read_implementation };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
|
|
2
|
+
// this file is generated — do not edit it
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
declare module "svelte/elements" {
|
|
6
|
+
export interface HTMLAttributes<T> {
|
|
7
|
+
'data-sveltekit-keepfocus'?: true | '' | 'off' | undefined | null;
|
|
8
|
+
'data-sveltekit-noscroll'?: true | '' | 'off' | undefined | null;
|
|
9
|
+
'data-sveltekit-preload-code'?:
|
|
10
|
+
| true
|
|
11
|
+
| ''
|
|
12
|
+
| 'eager'
|
|
13
|
+
| 'viewport'
|
|
14
|
+
| 'hover'
|
|
15
|
+
| 'tap'
|
|
16
|
+
| 'off'
|
|
17
|
+
| undefined
|
|
18
|
+
| null;
|
|
19
|
+
'data-sveltekit-preload-data'?: true | '' | 'hover' | 'tap' | 'off' | undefined | null;
|
|
20
|
+
'data-sveltekit-reload'?: true | '' | 'off' | undefined | null;
|
|
21
|
+
'data-sveltekit-replacestate'?: true | '' | 'off' | undefined | null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export {};
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
declare module "$app/types" {
|
|
29
|
+
type MatcherParam<M> = M extends (param : string) => param is (infer U extends string) ? U : string;
|
|
30
|
+
|
|
31
|
+
export interface AppTypes {
|
|
32
|
+
RouteId(): "/(app)" | "/" | "/api" | "/api/[...path]" | "/(app)/docs" | "/(app)/docs/[id]" | "/folders" | "/folders/[id]" | "/login" | "/register" | "/search" | "/settings" | "/s" | "/s/[token]";
|
|
33
|
+
RouteParams(): {
|
|
34
|
+
"/api/[...path]": { path: string };
|
|
35
|
+
"/(app)/docs/[id]": { id: string };
|
|
36
|
+
"/folders/[id]": { id: string };
|
|
37
|
+
"/s/[token]": { token: string }
|
|
38
|
+
};
|
|
39
|
+
LayoutParams(): {
|
|
40
|
+
"/(app)": { id?: string | undefined };
|
|
41
|
+
"/": { path?: string | undefined; id?: string | undefined; token?: string | undefined };
|
|
42
|
+
"/api": { path?: string | undefined };
|
|
43
|
+
"/api/[...path]": { path: string };
|
|
44
|
+
"/(app)/docs": { id?: string | undefined };
|
|
45
|
+
"/(app)/docs/[id]": { id: string };
|
|
46
|
+
"/folders": { id?: string | undefined };
|
|
47
|
+
"/folders/[id]": { id: string };
|
|
48
|
+
"/login": Record<string, never>;
|
|
49
|
+
"/register": Record<string, never>;
|
|
50
|
+
"/search": Record<string, never>;
|
|
51
|
+
"/settings": Record<string, never>;
|
|
52
|
+
"/s": { token?: string | undefined };
|
|
53
|
+
"/s/[token]": { token: string }
|
|
54
|
+
};
|
|
55
|
+
Pathname(): "/" | `/api/${string}` & {} | `/docs/${string}` & {} | `/folders/${string}` & {} | "/login" | "/register" | "/search" | "/settings" | `/s/${string}` & {};
|
|
56
|
+
ResolvedPathname(): `${"" | `/${string}`}${ReturnType<AppTypes['Pathname']>}`;
|
|
57
|
+
Asset(): "/favicon.png" | string & {};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"paths": {
|
|
4
|
+
"$lib/*": [
|
|
5
|
+
"../src/lib/*"
|
|
6
|
+
],
|
|
7
|
+
"$lib": [
|
|
8
|
+
"../src/lib"
|
|
9
|
+
],
|
|
10
|
+
"$app/types": [
|
|
11
|
+
"./types/index.d.ts"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"rootDirs": [
|
|
15
|
+
"..",
|
|
16
|
+
"./types"
|
|
17
|
+
],
|
|
18
|
+
"verbatimModuleSyntax": true,
|
|
19
|
+
"isolatedModules": true,
|
|
20
|
+
"lib": [
|
|
21
|
+
"esnext",
|
|
22
|
+
"DOM",
|
|
23
|
+
"DOM.Iterable"
|
|
24
|
+
],
|
|
25
|
+
"moduleResolution": "bundler",
|
|
26
|
+
"module": "esnext",
|
|
27
|
+
"noEmit": true,
|
|
28
|
+
"target": "esnext",
|
|
29
|
+
"types": [
|
|
30
|
+
"node"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"include": [
|
|
34
|
+
"ambient.d.ts",
|
|
35
|
+
"env.d.ts",
|
|
36
|
+
"non-ambient.d.ts",
|
|
37
|
+
"./types/**/$types.d.ts",
|
|
38
|
+
"../vite.config.js",
|
|
39
|
+
"../vite.config.ts",
|
|
40
|
+
"../src/**/*.js",
|
|
41
|
+
"../src/**/*.ts",
|
|
42
|
+
"../src/**/*.svelte",
|
|
43
|
+
"../test/**/*.js",
|
|
44
|
+
"../test/**/*.ts",
|
|
45
|
+
"../test/**/*.svelte",
|
|
46
|
+
"../tests/**/*.js",
|
|
47
|
+
"../tests/**/*.ts",
|
|
48
|
+
"../tests/**/*.svelte"
|
|
49
|
+
],
|
|
50
|
+
"exclude": [
|
|
51
|
+
"../node_modules/**",
|
|
52
|
+
"../src/service-worker.js",
|
|
53
|
+
"../src/service-worker/**/*.js",
|
|
54
|
+
"../src/service-worker.ts",
|
|
55
|
+
"../src/service-worker/**/*.ts",
|
|
56
|
+
"../src/service-worker.d.ts",
|
|
57
|
+
"../src/service-worker/**/*.d.ts"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"/(app)": [
|
|
3
|
+
"src/routes/(app)/+page.server.ts",
|
|
4
|
+
"src/routes/+layout.ts",
|
|
5
|
+
"src/routes/+layout.ts"
|
|
6
|
+
],
|
|
7
|
+
"/": [
|
|
8
|
+
"src/routes/+layout.ts"
|
|
9
|
+
],
|
|
10
|
+
"/api/[...path]": [
|
|
11
|
+
"src/routes/api/[...path]/+server.ts"
|
|
12
|
+
],
|
|
13
|
+
"/(app)/docs/[id]": [
|
|
14
|
+
"src/routes/(app)/docs/[id]/+page.ts",
|
|
15
|
+
"src/routes/(app)/docs/[id]/+page.server.ts",
|
|
16
|
+
"src/routes/+layout.ts"
|
|
17
|
+
],
|
|
18
|
+
"/folders/[id]": [
|
|
19
|
+
"src/routes/folders/[id]/+page.ts",
|
|
20
|
+
"src/routes/folders/[id]/+page.server.ts",
|
|
21
|
+
"src/routes/+layout.ts"
|
|
22
|
+
],
|
|
23
|
+
"/login": [
|
|
24
|
+
"src/routes/+layout.ts"
|
|
25
|
+
],
|
|
26
|
+
"/register": [
|
|
27
|
+
"src/routes/+layout.ts"
|
|
28
|
+
],
|
|
29
|
+
"/search": [
|
|
30
|
+
"src/routes/search/+page.ts",
|
|
31
|
+
"src/routes/+layout.ts"
|
|
32
|
+
],
|
|
33
|
+
"/settings": [
|
|
34
|
+
"src/routes/+layout.ts"
|
|
35
|
+
],
|
|
36
|
+
"/s/[token]": [
|
|
37
|
+
"src/routes/s/[token]/+page.ts",
|
|
38
|
+
"src/routes/+layout.ts"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as Kit from '@sveltejs/kit';
|
|
2
|
+
|
|
3
|
+
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
|
4
|
+
type MatcherParam<M> = M extends (param : string) => param is (infer U extends string) ? U : string;
|
|
5
|
+
type RouteParams = { };
|
|
6
|
+
type RouteId = '/';
|
|
7
|
+
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
8
|
+
export type RequiredKeys<T> = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
|
|
9
|
+
type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Partial<Pick<App.PageData, keyof T & keyof App.PageData>> & Record<string, any>>
|
|
10
|
+
type EnsureDefined<T> = T extends null | undefined ? {} : T;
|
|
11
|
+
type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
|
|
12
|
+
export type Snapshot<T = any> = Kit.Snapshot<T>;
|
|
13
|
+
type LayoutRouteId = RouteId | "/register" | "/settings" | "/folders/[id]" | "/(app)" | "/(app)/docs/[id]" | "/login" | "/s/[token]" | "/search" | null
|
|
14
|
+
type LayoutParams = RouteParams & { id?: string | undefined; token?: string | undefined }
|
|
15
|
+
type LayoutParentData = EnsureDefined<{}>;
|
|
16
|
+
|
|
17
|
+
export type LayoutServerData = null;
|
|
18
|
+
export type LayoutLoad<OutputData extends OutputDataShape<LayoutParentData> = OutputDataShape<LayoutParentData>> = Kit.Load<LayoutParams, LayoutServerData, LayoutParentData, OutputData, LayoutRouteId>;
|
|
19
|
+
export type LayoutLoadEvent = Parameters<LayoutLoad>[0];
|
|
20
|
+
export type LayoutData = Expand<Omit<LayoutParentData, keyof LayoutParentData & EnsureDefined<LayoutServerData>> & OptionalUnion<EnsureDefined<LayoutParentData & EnsureDefined<LayoutServerData>>>>;
|
|
21
|
+
export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
|