@awesomeness-js/server 1.1.10 → 1.1.11

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 (52) 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 +269 -0
  6. package/src/componentDependencies.js +9 -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 +171 -0
  11. package/tests/fetchPage.test.js +257 -0
  12. package/tests/fixtures/site-and-components/components/card/index.js +88 -0
  13. package/tests/fixtures/site-and-components/components/cardMain/index.js +86 -0
  14. package/tests/fixtures/site-and-components/components/cardMount/index.js +86 -0
  15. package/tests/fixtures/site-and-components/components/pageInit/index.js +86 -0
  16. package/tests/fixtures/site-and-components/components/pageScript/index.js +86 -0
  17. package/tests/fixtures/site-and-components/components/pageWidget/index.js +86 -0
  18. package/tests/fixtures/site-and-components/sites/site-a/pages/home/init.js +78 -0
  19. package/tests/fixtures/site-and-components/sites/site-a/pages/home/js/index.js +60 -0
  20. package/tests/setup.js +1 -0
  21. package/tsconfig.json +18 -0
  22. package/types/errors.d.ts +0 -0
  23. package/types/index.d.ts +109 -0
  24. package/types/src/applicationMap.d.ts +1 -0
  25. package/types/src/awesomenessNormalizeRequest.d.ts +27 -0
  26. package/types/src/brotliJsonResponse.d.ts +10 -0
  27. package/types/src/checkAccess.d.ts +5 -0
  28. package/types/src/componentAndPageMemory.d.ts +75 -0
  29. package/types/src/componentDependencies.d.ts +6 -0
  30. package/types/src/config.d.ts +7 -0
  31. package/types/src/extractUiComponentRefs.d.ts +5 -0
  32. package/types/src/fetchPage.d.ts +4 -0
  33. package/types/src/getConfig.d.ts +2 -0
  34. package/types/src/getMD.d.ts +1 -0
  35. package/types/src/init.d.ts +2 -0
  36. package/types/src/koa/attachAwesomenessRequest.d.ts +1 -0
  37. package/types/src/koa/cors.d.ts +1 -0
  38. package/types/src/koa/errorHandler.d.ts +1 -0
  39. package/types/src/koa/finalFormat.d.ts +1 -0
  40. package/types/src/koa/jsonBodyParser.d.ts +1 -0
  41. package/types/src/koa/routeRequest.d.ts +1 -0
  42. package/types/src/koa/serverUp.d.ts +1 -0
  43. package/types/src/koa/staticFiles.d.ts +1 -0
  44. package/types/src/koa/timeout.d.ts +1 -0
  45. package/types/src/pageInfo.d.ts +8 -0
  46. package/types/src/reRoute.d.ts +7 -0
  47. package/types/src/resolveRealCasePath.d.ts +1 -0
  48. package/types/src/specialPaths.d.ts +3 -0
  49. package/types/src/start.d.ts +1 -0
  50. package/types/src/validateRequest.d.ts +2 -0
  51. package/types/src/ws/handlers.d.ts +4 -0
  52. package/types/src/ws/index.d.ts +1 -0
@@ -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;