@awesomeness-js/server 1.1.8 → 1.1.9

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/index.js CHANGED
@@ -1,105 +1,105 @@
1
- /**
2
- * This file is auto-generated by the build script.
3
- * It consolidates API functions for use in the application.
4
- * Do not edit manually.
5
- */
6
- import _applicationMap from './src/applicationMap.js';
7
- import _awesomenessNormalizeRequest from './src/awesomenessNormalizeRequest.js';
8
- import _brotliJsonResponse from './src/brotliJsonResponse.js';
9
- import _checkAccess from './src/checkAccess.js';
10
- import _componentDependencies from './src/componentDependencies.js';
11
- import _config from './src/config.js';
12
- import _fetchPage from './src/fetchPage.js';
13
- import _getConfig from './src/getConfig.js';
14
- import _getMD from './src/getMD.js';
15
- import _init from './src/init.js';
16
- import _koa_attachAwesomenessRequest from './src/koa/attachAwesomenessRequest.js';
17
- import _koa_cors from './src/koa/cors.js';
18
- import _koa_errorHandler from './src/koa/errorHandler.js';
19
- import _koa_finalFormat from './src/koa/finalFormat.js';
20
- import _koa_jsonBodyParser from './src/koa/jsonBodyParser.js';
21
- import _koa_routeRequest from './src/koa/routeRequest.js';
22
- import _koa_serverUp from './src/koa/serverUp.js';
23
- import _koa_staticFiles from './src/koa/staticFiles.js';
24
- import _koa_timeout from './src/koa/timeout.js';
25
- import _pageInfo from './src/pageInfo.js';
26
- import _reRoute from './src/reRoute.js';
27
- import _resolveRealCasePath from './src/resolveRealCasePath.js';
28
- import _specialPaths from './src/specialPaths.js';
29
- import _start from './src/start.js';
30
- import _validateRequest from './src/validateRequest.js';
31
- import _ws_handlers from './src/ws/handlers.js';
32
- import _ws_index from './src/ws/index.js';
33
-
34
- export { _applicationMap as applicationMap };
35
- export { _awesomenessNormalizeRequest as awesomenessNormalizeRequest };
36
- export { _brotliJsonResponse as brotliJsonResponse };
37
- export { _checkAccess as checkAccess };
38
- export { _componentDependencies as componentDependencies };
39
- export { _config as config };
40
- export { _fetchPage as fetchPage };
41
- export { _getConfig as getConfig };
42
- export { _getMD as getMD };
43
- export { _init as init };
44
- export { _pageInfo as pageInfo };
45
- export { _reRoute as reRoute };
46
- export { _resolveRealCasePath as resolveRealCasePath };
47
- export { _specialPaths as specialPaths };
48
- export { _start as start };
49
- export { _validateRequest as validateRequest };
50
-
51
- export const koa = {
52
- attachAwesomenessRequest: _koa_attachAwesomenessRequest,
53
- cors: _koa_cors,
54
- errorHandler: _koa_errorHandler,
55
- finalFormat: _koa_finalFormat,
56
- jsonBodyParser: _koa_jsonBodyParser,
57
- routeRequest: _koa_routeRequest,
58
- serverUp: _koa_serverUp,
59
- staticFiles: _koa_staticFiles,
60
- timeout: _koa_timeout
61
- };
62
-
63
- export const ws = {
64
- handlers: _ws_handlers,
65
- index: _ws_index
66
- };
67
-
68
-
69
- export default {
70
- applicationMap: _applicationMap,
71
- awesomenessNormalizeRequest: _awesomenessNormalizeRequest,
72
- brotliJsonResponse: _brotliJsonResponse,
73
- checkAccess: _checkAccess,
74
- componentDependencies: _componentDependencies,
75
- config: _config,
76
- fetchPage: _fetchPage,
77
- getConfig: _getConfig,
78
- getMD: _getMD,
79
- init: _init,
80
- pageInfo: _pageInfo,
81
- reRoute: _reRoute,
1
+ /**
2
+ * This file is auto-generated by the build script.
3
+ * It consolidates API functions for use in the application.
4
+ * Do not edit manually.
5
+ */
6
+ import _applicationMap from './src/applicationMap.js';
7
+ import _awesomenessNormalizeRequest from './src/awesomenessNormalizeRequest.js';
8
+ import _brotliJsonResponse from './src/brotliJsonResponse.js';
9
+ import _checkAccess from './src/checkAccess.js';
10
+ import _componentDependencies from './src/componentDependencies.js';
11
+ import _config from './src/config.js';
12
+ import _fetchPage from './src/fetchPage.js';
13
+ import _getConfig from './src/getConfig.js';
14
+ import _getMD from './src/getMD.js';
15
+ import _init from './src/init.js';
16
+ import _koa_attachAwesomenessRequest from './src/koa/attachAwesomenessRequest.js';
17
+ import _koa_cors from './src/koa/cors.js';
18
+ import _koa_errorHandler from './src/koa/errorHandler.js';
19
+ import _koa_finalFormat from './src/koa/finalFormat.js';
20
+ import _koa_jsonBodyParser from './src/koa/jsonBodyParser.js';
21
+ import _koa_routeRequest from './src/koa/routeRequest.js';
22
+ import _koa_serverUp from './src/koa/serverUp.js';
23
+ import _koa_staticFiles from './src/koa/staticFiles.js';
24
+ import _koa_timeout from './src/koa/timeout.js';
25
+ import _pageInfo from './src/pageInfo.js';
26
+ import _reRoute from './src/reRoute.js';
27
+ import _resolveRealCasePath from './src/resolveRealCasePath.js';
28
+ import _specialPaths from './src/specialPaths.js';
29
+ import _start from './src/start.js';
30
+ import _validateRequest from './src/validateRequest.js';
31
+ import _ws_handlers from './src/ws/handlers.js';
32
+ import _ws_index from './src/ws/index.js';
33
+
34
+ export { _applicationMap as applicationMap };
35
+ export { _awesomenessNormalizeRequest as awesomenessNormalizeRequest };
36
+ export { _brotliJsonResponse as brotliJsonResponse };
37
+ export { _checkAccess as checkAccess };
38
+ export { _componentDependencies as componentDependencies };
39
+ export { _config as config };
40
+ export { _fetchPage as fetchPage };
41
+ export { _getConfig as getConfig };
42
+ export { _getMD as getMD };
43
+ export { _init as init };
44
+ export { _pageInfo as pageInfo };
45
+ export { _reRoute as reRoute };
46
+ export { _resolveRealCasePath as resolveRealCasePath };
47
+ export { _specialPaths as specialPaths };
48
+ export { _start as start };
49
+ export { _validateRequest as validateRequest };
50
+
51
+ export const koa = {
52
+ attachAwesomenessRequest: _koa_attachAwesomenessRequest,
53
+ cors: _koa_cors,
54
+ errorHandler: _koa_errorHandler,
55
+ finalFormat: _koa_finalFormat,
56
+ jsonBodyParser: _koa_jsonBodyParser,
57
+ routeRequest: _koa_routeRequest,
58
+ serverUp: _koa_serverUp,
59
+ staticFiles: _koa_staticFiles,
60
+ timeout: _koa_timeout
61
+ };
62
+
63
+ export const ws = {
64
+ handlers: _ws_handlers,
65
+ index: _ws_index
66
+ };
67
+
68
+
69
+ export default {
70
+ applicationMap: _applicationMap,
71
+ awesomenessNormalizeRequest: _awesomenessNormalizeRequest,
72
+ brotliJsonResponse: _brotliJsonResponse,
73
+ checkAccess: _checkAccess,
74
+ componentDependencies: _componentDependencies,
75
+ config: _config,
76
+ fetchPage: _fetchPage,
77
+ getConfig: _getConfig,
78
+ getMD: _getMD,
79
+ init: _init,
80
+ pageInfo: _pageInfo,
81
+ reRoute: _reRoute,
82
82
  /**
83
83
  * Case-insensitive real path resolver.
84
84
  * Works correctly on Windows, macOS, and Linux/Docker.
85
- */
86
- resolveRealCasePath: _resolveRealCasePath,
87
- specialPaths: _specialPaths,
88
- start: _start,
89
- validateRequest: _validateRequest,
90
- koa: {
91
- attachAwesomenessRequest: _koa_attachAwesomenessRequest,
92
- cors: _koa_cors,
93
- errorHandler: _koa_errorHandler,
94
- finalFormat: _koa_finalFormat,
95
- jsonBodyParser: _koa_jsonBodyParser,
96
- routeRequest: _koa_routeRequest,
97
- serverUp: _koa_serverUp,
98
- staticFiles: _koa_staticFiles,
99
- timeout: _koa_timeout,
100
- },
101
- ws: {
102
- handlers: _ws_handlers,
103
- index: _ws_index,
104
- },
85
+ */
86
+ resolveRealCasePath: _resolveRealCasePath,
87
+ specialPaths: _specialPaths,
88
+ start: _start,
89
+ validateRequest: _validateRequest,
90
+ koa: {
91
+ attachAwesomenessRequest: _koa_attachAwesomenessRequest,
92
+ cors: _koa_cors,
93
+ errorHandler: _koa_errorHandler,
94
+ finalFormat: _koa_finalFormat,
95
+ jsonBodyParser: _koa_jsonBodyParser,
96
+ routeRequest: _koa_routeRequest,
97
+ serverUp: _koa_serverUp,
98
+ staticFiles: _koa_staticFiles,
99
+ timeout: _koa_timeout,
100
+ },
101
+ ws: {
102
+ handlers: _ws_handlers,
103
+ index: _ws_index,
104
+ },
105
105
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomeness-js/server",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "Awesomeness Multi-Site Server",
5
5
  "author": "Scott Forte",
6
6
  "type": "module",
@@ -318,6 +318,30 @@ export default function componentDependencies(
318
318
 
319
319
  each(out[component], (files, type) => {
320
320
 
321
+ if (type === "js") {
322
+
323
+ const jsKeys = Object.keys(files);
324
+
325
+ jsKeys.forEach((key) => {
326
+
327
+ const keyParts = key.split(".");
328
+
329
+ for (let i = 2; i < keyParts.length; i++) {
330
+
331
+ const parentPath = keyParts.slice(0, i).join(".");
332
+
333
+ if (!files[parentPath]) {
334
+
335
+ files[parentPath] = `${parentPath} = ${parentPath} || {}; `;
336
+
337
+ }
338
+
339
+ }
340
+
341
+ });
342
+
343
+ }
344
+
321
345
  if (type === "js" && !files[`${namespace}.${component}`]) {
322
346
 
323
347
  files[`${namespace}.${component}`] = `${namespace}.${component} = {}; `;