@awesomeness-js/server 1.1.10 → 1.1.13

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.
Files changed (76) hide show
  1. package/build/build.js +4 -1
  2. package/build/postBuild.js +4 -1
  3. package/index.js +6 -4
  4. package/package.json +1 -1
  5. package/src/componentAndPageMemory.js +297 -0
  6. package/src/componentDependencies.js +7 -19
  7. package/src/extractUiComponentRefs.js +55 -0
  8. package/src/fetchPage.js +79 -4
  9. package/src/resolveRealCasePath.js +0 -4
  10. package/tests/componentAndPageMemory.test.js +172 -0
  11. package/tests/fetchPage.test.js +259 -0
  12. package/tests/fixtures/site-and-components/components/app/cleanMain/index.js +26 -0
  13. package/tests/fixtures/site-and-components/components/app/cleanMain.js +14 -0
  14. package/tests/fixtures/site-and-components/components/app/index.css +4 -0
  15. package/tests/fixtures/site-and-components/components/app/index.js +42 -0
  16. package/tests/fixtures/site-and-components/components/app/insertIntoList.jquery.js +150 -0
  17. package/tests/fixtures/site-and-components/components/app/keyUpWithTimeout.jQuery.js +26 -0
  18. package/tests/fixtures/site-and-components/components/app/onEnter.jQuery.js +39 -0
  19. package/tests/fixtures/site-and-components/components/app/onResize.jQuery.js +64 -0
  20. package/tests/fixtures/site-and-components/components/app/pwa/_.css +305 -0
  21. package/tests/fixtures/site-and-components/components/app/pwa/index.js +235 -0
  22. package/tests/fixtures/site-and-components/components/app/pwa/updateProfileImage.js +7 -0
  23. package/tests/fixtures/site-and-components/components/app/shapes.css +3 -0
  24. package/tests/fixtures/site-and-components/components/app/simple/_.css +151 -0
  25. package/tests/fixtures/site-and-components/components/app/simple/index.js +170 -0
  26. package/tests/fixtures/site-and-components/components/app/start.js +165 -0
  27. package/tests/fixtures/site-and-components/components/app/vanilla/_.css +1 -0
  28. package/tests/fixtures/site-and-components/components/app/vanilla/index.js +27 -0
  29. package/tests/fixtures/site-and-components/components/card/index.js +88 -0
  30. package/tests/fixtures/site-and-components/components/cardMain/index.js +86 -0
  31. package/tests/fixtures/site-and-components/components/cardMount/index.js +86 -0
  32. package/tests/fixtures/site-and-components/components/pageInit/index.js +86 -0
  33. package/tests/fixtures/site-and-components/components/pageScript/index.js +86 -0
  34. package/tests/fixtures/site-and-components/components/pageWidget/index.js +86 -0
  35. package/tests/fixtures/site-and-components/components/scrollSpy/elm.js +172 -0
  36. package/tests/fixtures/site-and-components/components/scrollSpy/index.js +63 -0
  37. package/tests/fixtures/site-and-components/components/scrollSpy/observerPoolGet.js +91 -0
  38. package/tests/fixtures/site-and-components/components/scrollSpy/observerPoolRegistry.js +18 -0
  39. package/tests/fixtures/site-and-components/components/scrollSpy/observerPoolSubscribe.js +37 -0
  40. package/tests/fixtures/site-and-components/components/scrollSpy/observerPoolUnsubscribe.js +44 -0
  41. package/tests/fixtures/site-and-components/components/scrollSpy/top.js +86 -0
  42. package/tests/fixtures/site-and-components/sites/site-a/pages/home/init.js +78 -0
  43. package/tests/fixtures/site-and-components/sites/site-a/pages/home/js/index.js +93 -0
  44. package/tests/setup.js +1 -0
  45. package/tsconfig.json +18 -0
  46. package/types/errors.d.ts +0 -0
  47. package/types/index.d.ts +109 -0
  48. package/types/src/applicationMap.d.ts +1 -0
  49. package/types/src/awesomenessNormalizeRequest.d.ts +27 -0
  50. package/types/src/brotliJsonResponse.d.ts +10 -0
  51. package/types/src/checkAccess.d.ts +5 -0
  52. package/types/src/componentAndPageMemory.d.ts +75 -0
  53. package/types/src/componentDependencies.d.ts +6 -0
  54. package/types/src/config.d.ts +7 -0
  55. package/types/src/extractUiComponentRefs.d.ts +5 -0
  56. package/types/src/fetchPage.d.ts +4 -0
  57. package/types/src/getConfig.d.ts +2 -0
  58. package/types/src/getMD.d.ts +1 -0
  59. package/types/src/init.d.ts +2 -0
  60. package/types/src/koa/attachAwesomenessRequest.d.ts +1 -0
  61. package/types/src/koa/cors.d.ts +1 -0
  62. package/types/src/koa/errorHandler.d.ts +1 -0
  63. package/types/src/koa/finalFormat.d.ts +1 -0
  64. package/types/src/koa/jsonBodyParser.d.ts +1 -0
  65. package/types/src/koa/routeRequest.d.ts +1 -0
  66. package/types/src/koa/serverUp.d.ts +1 -0
  67. package/types/src/koa/staticFiles.d.ts +1 -0
  68. package/types/src/koa/timeout.d.ts +1 -0
  69. package/types/src/pageInfo.d.ts +8 -0
  70. package/types/src/reRoute.d.ts +7 -0
  71. package/types/src/resolveRealCasePath.d.ts +1 -0
  72. package/types/src/specialPaths.d.ts +3 -0
  73. package/types/src/start.d.ts +1 -0
  74. package/types/src/validateRequest.d.ts +2 -0
  75. package/types/src/ws/handlers.d.ts +4 -0
  76. package/types/src/ws/index.d.ts +1 -0
@@ -0,0 +1,44 @@
1
+ export default ({
2
+ registry,
3
+ poolEntry,
4
+ targetElm,
5
+ subscriber
6
+ } = {}) => {
7
+
8
+ if (!poolEntry || !targetElm || !subscriber) {
9
+
10
+ return;
11
+
12
+ }
13
+
14
+ const subscribers = poolEntry.targets.get(targetElm);
15
+
16
+ if (!subscribers) {
17
+
18
+ return;
19
+
20
+ }
21
+
22
+ subscribers.delete(subscriber);
23
+
24
+ if (subscribers.size === 0) {
25
+
26
+ poolEntry.targets.delete(targetElm);
27
+ poolEntry.observer.unobserve(targetElm);
28
+
29
+ }
30
+
31
+ if (poolEntry.targets.size === 0) {
32
+
33
+ poolEntry.observer.disconnect();
34
+
35
+ if (registry?.pools) {
36
+
37
+ registry.pools.delete(poolEntry.key);
38
+
39
+ }
40
+
41
+
42
+ }
43
+
44
+ };
@@ -0,0 +1,86 @@
1
+ export default ({
2
+ $spyOn,
3
+ $applyTo,
4
+ threshold = 100, // X px
5
+ deadZone = 0, // optional hysteresis to avoid flicker
6
+ className = 'spy-past-threshold'
7
+ } = {}) => {
8
+
9
+ const $classEl = ($applyTo && $applyTo.length)
10
+ ? $applyTo
11
+ : $('body');
12
+
13
+ const spyTarget = ($spyOn && $spyOn.length)
14
+ ? $spyOn.get(0)
15
+ : window;
16
+
17
+ const isWindow = (spyTarget === window);
18
+
19
+ let ticking = false;
20
+ let isApplied = null; // unknown at start
21
+
22
+ function readTop() {
23
+
24
+ return isWindow
25
+ ? (window.pageYOffset || document.documentElement.scrollTop || 0)
26
+ : (spyTarget.scrollTop || 0);
27
+
28
+ }
29
+
30
+ function apply(shouldApply) {
31
+
32
+ if (shouldApply) $classEl.addClass(className);
33
+ else $classEl.removeClass(className);
34
+
35
+ }
36
+
37
+ function onRaf() {
38
+
39
+ ticking = false;
40
+
41
+ const topNow = readTop();
42
+
43
+ // deadZone gives you hysteresis:
44
+ // once applied, it won't unapply until threshold - deadZone
45
+ // once unapplied, it won't apply until threshold + deadZone
46
+ let shouldApply;
47
+
48
+ if (isApplied === true) {
49
+
50
+ shouldApply = topNow >= (threshold - deadZone);
51
+
52
+ } else if (isApplied === false) {
53
+
54
+ shouldApply = topNow >= (threshold + deadZone);
55
+
56
+ } else {
57
+
58
+ // first run
59
+ shouldApply = topNow >= threshold;
60
+
61
+ }
62
+
63
+ if (shouldApply === isApplied) return;
64
+
65
+ isApplied = shouldApply;
66
+ apply(shouldApply);
67
+
68
+ }
69
+
70
+ function onScroll() {
71
+
72
+ if (ticking) return;
73
+ ticking = true;
74
+ requestAnimationFrame(onRaf);
75
+
76
+ }
77
+
78
+ spyTarget.addEventListener('scroll', onScroll, { passive: true });
79
+
80
+ // run once immediately so the class is correct on load
81
+ onRaf();
82
+
83
+ // optional cleanup if you want it
84
+ return () => spyTarget.removeEventListener('scroll', onScroll);
85
+
86
+ };
@@ -0,0 +1,78 @@
1
+ export default function home() {
2
+
3
+ ui.pageInit();
4
+ ui.cardMain();
5
+
6
+ const renderRef = ui.pageWidget.render();
7
+ const mountRef = ui.cardMount.mount();
8
+ const sections = [
9
+ { id: "hero", title: "Hero", enabled: true },
10
+ { id: "features", title: "Features", enabled: true },
11
+ { id: "pricing", title: "Pricing", enabled: true },
12
+ { id: "faq", title: "FAQ", enabled: true },
13
+ { id: "footer", title: "Footer", enabled: true },
14
+ ];
15
+
16
+ const metrics = {
17
+ visitors: 10234,
18
+ signups: 789,
19
+ conversionRate: 0.077,
20
+ avgSessionMs: 184000,
21
+ };
22
+
23
+ const user = {
24
+ id: "user-42",
25
+ name: "Fixture User",
26
+ roles: [ "viewer", "editor" ],
27
+ preferences: {
28
+ theme: "light",
29
+ language: "en-US",
30
+ notifications: true,
31
+ },
32
+ };
33
+
34
+ const model = sections
35
+ .filter((section) => section.enabled)
36
+ .map((section, index) => ({
37
+ ...section,
38
+ order: index + 1,
39
+ slug: `${section.id}-${index + 1}`,
40
+ updatedAt: new Date(2024, 0, index + 1).toISOString(),
41
+ }));
42
+
43
+ for (let i = 0; i < model.length; i++) {
44
+
45
+ if (i % 2 === 0) {
46
+
47
+ ui.pageInit();
48
+
49
+ }
50
+
51
+ if (model[i].id === "features") {
52
+
53
+ ui.pageWidget.render();
54
+
55
+ }
56
+
57
+ }
58
+
59
+ const summary = {
60
+ sectionCount: model.length,
61
+ metrics,
62
+ user,
63
+ flags: {
64
+ hasHero: model.some((section) => section.id === "hero"),
65
+ hasPricing: model.some((section) => section.id === "pricing"),
66
+ showFooter: true,
67
+ },
68
+ };
69
+
70
+ const payload = {
71
+ renderRef,
72
+ mountRef,
73
+ summary,
74
+ model,
75
+ };
76
+
77
+ return payload;
78
+ }
@@ -0,0 +1,93 @@
1
+ export default function homePage() {
2
+
3
+ ui.pageScript();
4
+
5
+ ui.app.start();
6
+
7
+ const cards = [
8
+ {
9
+ id: "a",
10
+ label: "Analytics",
11
+ value: 132
12
+ },
13
+ {
14
+ id: "b",
15
+ label: "Sales",
16
+ value: 98
17
+ },
18
+ {
19
+ id: "c",
20
+ label: "Leads",
21
+ value: 211
22
+ },
23
+ {
24
+ id: "d",
25
+ label: "Retention",
26
+ value: 87
27
+ },
28
+ {
29
+ id: "e",
30
+ label: "Support",
31
+ value: 56
32
+ },
33
+ {
34
+ id: "f",
35
+ label: "Backlog",
36
+ value: 23
37
+ },
38
+ ];
39
+
40
+ const rows = [];
41
+
42
+ for (let i = 0; i < cards.length; i++) {
43
+
44
+ const card = cards[i];
45
+ const ratio = card.value / 250;
46
+
47
+ rows.push({
48
+ index: i,
49
+ id: card.id,
50
+ label: card.label,
51
+ value: card.value,
52
+ ratio,
53
+ status: ratio > 0.6 ? "high" : ratio > 0.3 ? "medium" : "low",
54
+ });
55
+
56
+ }
57
+
58
+ const totals = rows.reduce(
59
+ (acc, row) => {
60
+
61
+ acc.total += row.value;
62
+ acc.high += row.status === "high" ? 1 : 0;
63
+ acc.medium += row.status === "medium" ? 1 : 0;
64
+ acc.low += row.status === "low" ? 1 : 0;
65
+
66
+ return acc;
67
+
68
+ },
69
+ {
70
+ total: 0,
71
+ high: 0,
72
+ medium: 0,
73
+ low: 0
74
+ }
75
+ );
76
+
77
+ const report = {
78
+ generatedAt: new Date(2024, 6, 4, 9, 30, 0).toISOString(),
79
+ rows,
80
+ totals,
81
+ meta: {
82
+ source: "fixture",
83
+ version: "1.0.0",
84
+ notes: [
85
+ "This fixture intentionally has larger content for benchmark-style tests.",
86
+ "ui references in this file: ui.pageScript(), ui.app.start().",
87
+ ],
88
+ },
89
+ };
90
+
91
+ return report;
92
+
93
+ }
package/tests/setup.js ADDED
@@ -0,0 +1 @@
1
+ process.env.NODE_ENV = "test";
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "declaration": true, // Generates .d.ts files
4
+ "emitDeclarationOnly": true, // Only output .d.ts files
5
+ "allowJs": true, // Allows JS files
6
+ "outDir": "types", // Output directory for type files
7
+ "moduleResolution": "node",
8
+ "skipLibCheck": true,
9
+ "esModuleInterop": true,
10
+ "types": [
11
+ "vitest/globals"
12
+ ]
13
+ },
14
+ "include": [
15
+ "src/**/*"
16
+ ],
17
+ "exclude": []
18
+ }
File without changes
@@ -0,0 +1,109 @@
1
+ /**
2
+ * This file is auto-generated by the build script.
3
+ * It consolidates API type declarations for use in the application.
4
+ * Do not edit manually.
5
+ */
6
+ import type _applicationMap from './applicationMap';
7
+ import type _awesomenessNormalizeRequest from './awesomenessNormalizeRequest';
8
+ import type _brotliJsonResponse from './brotliJsonResponse';
9
+ import type _checkAccess from './checkAccess';
10
+ import type _componentAndPageMemory from './componentAndPageMemory';
11
+ import type _componentDependencies from './componentDependencies';
12
+ import type _config from './config';
13
+ import type _extractUiComponentRefs from './extractUiComponentRefs';
14
+ import type _fetchPage from './fetchPage';
15
+ import type _getConfig from './getConfig';
16
+ import type _getMD from './getMD';
17
+ import type _init from './init';
18
+ import type _koa_attachAwesomenessRequest from './koa/attachAwesomenessRequest';
19
+ import type _koa_cors from './koa/cors';
20
+ import type _koa_errorHandler from './koa/errorHandler';
21
+ import type _koa_finalFormat from './koa/finalFormat';
22
+ import type _koa_jsonBodyParser from './koa/jsonBodyParser';
23
+ import type _koa_routeRequest from './koa/routeRequest';
24
+ import type _koa_serverUp from './koa/serverUp';
25
+ import type _koa_staticFiles from './koa/staticFiles';
26
+ import type _koa_timeout from './koa/timeout';
27
+ import type _pageInfo from './pageInfo';
28
+ import type _reRoute from './reRoute';
29
+ import type _resolveRealCasePath from './resolveRealCasePath';
30
+ import type _specialPaths from './specialPaths';
31
+ import type _start from './start';
32
+ import type _validateRequest from './validateRequest';
33
+ import type _ws_handlers from './ws/handlers';
34
+ import type _ws_index from './ws/index';
35
+
36
+ export declare const applicationMap: typeof _applicationMap;
37
+ export declare const awesomenessNormalizeRequest: typeof _awesomenessNormalizeRequest;
38
+ export declare const brotliJsonResponse: typeof _brotliJsonResponse;
39
+ export declare const checkAccess: typeof _checkAccess;
40
+ export declare const componentAndPageMemory: typeof _componentAndPageMemory;
41
+ export declare const componentDependencies: typeof _componentDependencies;
42
+ export declare const config: typeof _config;
43
+ export declare const extractUiComponentRefs: typeof _extractUiComponentRefs;
44
+ export declare const fetchPage: typeof _fetchPage;
45
+ export declare const getConfig: typeof _getConfig;
46
+ export declare const getMD: typeof _getMD;
47
+ export declare const init: typeof _init;
48
+ export declare const pageInfo: typeof _pageInfo;
49
+ export declare const reRoute: typeof _reRoute;
50
+ export declare const resolveRealCasePath: typeof _resolveRealCasePath;
51
+ export declare const specialPaths: typeof _specialPaths;
52
+ export declare const start: typeof _start;
53
+ export declare const validateRequest: typeof _validateRequest;
54
+
55
+ export declare const koa: {
56
+ attachAwesomenessRequest: typeof _koa_attachAwesomenessRequest;
57
+ cors: typeof _koa_cors;
58
+ errorHandler: typeof _koa_errorHandler;
59
+ finalFormat: typeof _koa_finalFormat;
60
+ jsonBodyParser: typeof _koa_jsonBodyParser;
61
+ routeRequest: typeof _koa_routeRequest;
62
+ serverUp: typeof _koa_serverUp;
63
+ staticFiles: typeof _koa_staticFiles;
64
+ timeout: typeof _koa_timeout;
65
+ };
66
+
67
+ export declare const ws: {
68
+ handlers: typeof _ws_handlers;
69
+ index: typeof _ws_index;
70
+ };
71
+
72
+
73
+ declare const _default: {
74
+ applicationMap: typeof _applicationMap;
75
+ awesomenessNormalizeRequest: typeof _awesomenessNormalizeRequest;
76
+ brotliJsonResponse: typeof _brotliJsonResponse;
77
+ checkAccess: typeof _checkAccess;
78
+ componentAndPageMemory: typeof _componentAndPageMemory;
79
+ componentDependencies: typeof _componentDependencies;
80
+ config: typeof _config;
81
+ extractUiComponentRefs: typeof _extractUiComponentRefs;
82
+ fetchPage: typeof _fetchPage;
83
+ getConfig: typeof _getConfig;
84
+ getMD: typeof _getMD;
85
+ init: typeof _init;
86
+ pageInfo: typeof _pageInfo;
87
+ reRoute: typeof _reRoute;
88
+ resolveRealCasePath: typeof _resolveRealCasePath;
89
+ specialPaths: typeof _specialPaths;
90
+ start: typeof _start;
91
+ validateRequest: typeof _validateRequest;
92
+ koa: {
93
+ attachAwesomenessRequest: typeof _koa_attachAwesomenessRequest,
94
+ cors: typeof _koa_cors,
95
+ errorHandler: typeof _koa_errorHandler,
96
+ finalFormat: typeof _koa_finalFormat,
97
+ jsonBodyParser: typeof _koa_jsonBodyParser,
98
+ routeRequest: typeof _koa_routeRequest,
99
+ serverUp: typeof _koa_serverUp,
100
+ staticFiles: typeof _koa_staticFiles,
101
+ timeout: typeof _koa_timeout,
102
+ },
103
+ ws: {
104
+ handlers: typeof _ws_handlers,
105
+ index: typeof _ws_index,
106
+ },
107
+ };
108
+
109
+ export default _default;
@@ -0,0 +1 @@
1
+ export default function _default(host: any): any;
@@ -0,0 +1,27 @@
1
+ export default awesomenessNormalizeRequest;
2
+ export function awesomenessNormalizeRequest({ req }?: {
3
+ req?: {};
4
+ }): Promise<{
5
+ headers: any;
6
+ ip: any;
7
+ userAgent: any;
8
+ method: any;
9
+ host: any;
10
+ mainDomain: any;
11
+ domain: any;
12
+ subDomain: string;
13
+ site: any;
14
+ application: any;
15
+ path: any;
16
+ pageRoute: any;
17
+ slug: any;
18
+ meta: any;
19
+ testing: any;
20
+ device: any;
21
+ data: {};
22
+ awesomenessType: any;
23
+ urlParams: {};
24
+ _RAW: {};
25
+ log: (message: any, data?: {}) => void;
26
+ logData: any[];
27
+ }>;
@@ -0,0 +1,10 @@
1
+ export default brotliJsonResponse;
2
+ export function brotliJsonResponse(data: any, {}?: {}): {
3
+ statusCode: number;
4
+ isBase64Encoded: boolean;
5
+ headers: {
6
+ 'Content-Type': string;
7
+ 'Content-Encoding': string;
8
+ };
9
+ body: any;
10
+ };
@@ -0,0 +1,5 @@
1
+ declare function _default({ permissionsAllowed, awesomenessRequest, }: {
2
+ permissionsAllowed: any;
3
+ awesomenessRequest: any;
4
+ }): Promise<boolean>;
5
+ export default _default;
@@ -0,0 +1,75 @@
1
+ export function readFileMemoized(filePath: any): any;
2
+ export function extractUiRefsMemoized(content: any, options?: {}): any;
3
+ export function extractUiRefsFromFileMemoized(filePath: any, options?: {}): any;
4
+ export function clearComponentAndPageMemory(): void;
5
+ export function getComponentAndPageMemoryStatus({ includeKeys, sampleSize, }?: {
6
+ includeKeys?: boolean;
7
+ sampleSize?: number;
8
+ }): {
9
+ limits: {
10
+ fileCacheLimit: number;
11
+ refsCacheLimit: number;
12
+ };
13
+ counts: {
14
+ fileCacheEntries: any;
15
+ refsCacheEntries: any;
16
+ };
17
+ approximateBytes: {
18
+ fileCacheBytes: number;
19
+ refsCacheBytes: number;
20
+ totalCacheBytes: number;
21
+ };
22
+ approximateMemory: {
23
+ fileCache: {
24
+ bytes: any;
25
+ mb: number;
26
+ gb: number;
27
+ };
28
+ refsCache: {
29
+ bytes: any;
30
+ mb: number;
31
+ gb: number;
32
+ };
33
+ totalCache: {
34
+ bytes: any;
35
+ mb: number;
36
+ gb: number;
37
+ };
38
+ };
39
+ processMemoryUsage: any;
40
+ processMemoryUsageWithUnits: {
41
+ rss: {
42
+ bytes: any;
43
+ mb: number;
44
+ gb: number;
45
+ };
46
+ heapTotal: {
47
+ bytes: any;
48
+ mb: number;
49
+ gb: number;
50
+ };
51
+ heapUsed: {
52
+ bytes: any;
53
+ mb: number;
54
+ gb: number;
55
+ };
56
+ external: {
57
+ bytes: any;
58
+ mb: number;
59
+ gb: number;
60
+ };
61
+ arrayBuffers: {
62
+ bytes: any;
63
+ mb: number;
64
+ gb: number;
65
+ };
66
+ };
67
+ };
68
+ export default componentAndPageMemory;
69
+ declare namespace componentAndPageMemory {
70
+ export { readFileMemoized };
71
+ export { extractUiRefsMemoized };
72
+ export { extractUiRefsFromFileMemoized };
73
+ export { clearComponentAndPageMemory };
74
+ export { getComponentAndPageMemoryStatus };
75
+ }
@@ -0,0 +1,6 @@
1
+ export default function componentDependencies(allComponents: any, { componentLocations, namespace, showDetails, ignore, }?: {
2
+ componentLocations?: any[];
3
+ namespace?: string;
4
+ showDetails?: boolean;
5
+ ignore?: string[];
6
+ }): {};
@@ -0,0 +1,7 @@
1
+ export function init(userConfig?: {}): Readonly<{}>;
2
+ export function getConfig(): Readonly<{}>;
3
+ declare namespace _default {
4
+ export { init };
5
+ export { getConfig };
6
+ }
7
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export default function extractUiComponentRefs(str: any, { namespace, includeCall, includeDotAccess, }?: {
2
+ namespace?: string;
3
+ includeCall?: boolean;
4
+ includeDotAccess?: boolean;
5
+ }): any[];
@@ -0,0 +1,4 @@
1
+ export default function fetchPage(awesomenessRequest: any, { about, cssPath, jsPath, getData, showDetails, page }?: {
2
+ showDetails?: boolean;
3
+ page?: any;
4
+ }): Promise<any>;
@@ -0,0 +1,2 @@
1
+ export default getConfig;
2
+ import { getConfig } from "./config.js";
@@ -0,0 +1 @@
1
+ export default function getMD(relativePath: any, callerUrl: any): Promise<any>;
@@ -0,0 +1,2 @@
1
+ export default init;
2
+ import { init } from "./config.js";
@@ -0,0 +1 @@
1
+ export default function attachAwesomenessRequest(ctx: any, next: any): Promise<void>;
@@ -0,0 +1 @@
1
+ export default function cors(ctx: any, next: any): Promise<void>;
@@ -0,0 +1 @@
1
+ export default function errorHandler(ctx: any, next: any): Promise<void>;
@@ -0,0 +1 @@
1
+ export default function finalFormat(awesomenessRequest: any, ctx: any): void;
@@ -0,0 +1 @@
1
+ export default function jsonBodyParser(ctx: any, next: any): Promise<void>;
@@ -0,0 +1 @@
1
+ export default function routeRequest(ctx: any, next: any): Promise<void>;
@@ -0,0 +1 @@
1
+ export default function serverUp(): Promise<void>;
@@ -0,0 +1 @@
1
+ export default function staticFiles(ctx: any, next: any): Promise<void>;
@@ -0,0 +1 @@
1
+ export default function timeout(ms: any): (ctx: any, next: any) => Promise<void>;
@@ -0,0 +1,8 @@
1
+ export default function pageInfo(awesomenessRequest: any, { page }?: {
2
+ page?: any;
3
+ }): Promise<{
4
+ getData: any;
5
+ about: any;
6
+ cssPath: any;
7
+ jsPath: any;
8
+ }>;
@@ -0,0 +1,7 @@
1
+ export default function reRoute({ goToPage, awesomenessRequest }: {
2
+ goToPage: any;
3
+ awesomenessRequest: any;
4
+ }): Promise<{
5
+ pageData: any;
6
+ pageRouteFixed: any;
7
+ }>;
@@ -0,0 +1 @@
1
+ export default function resolveRealCasePath(inputPath: any, returnAbsolute?: boolean): any;
@@ -0,0 +1,3 @@
1
+ export function matchPathSite(site: any, pattern: any, path: any): {};
2
+ export function specialPaths(awesomenessRequest: any, routes: any): Promise<void>;
3
+ export default specialPaths;
@@ -0,0 +1 @@
1
+ export default function start(): Promise<void>;
@@ -0,0 +1,2 @@
1
+ declare function _default(awesomenessRequest: any): Promise<boolean>;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export default function handleWsMessage({ socket, raw }: {
2
+ socket: any;
3
+ raw: any;
4
+ }): void;
@@ -0,0 +1 @@
1
+ export default function attachWs(server: any, path?: string): any;