@webqit/webflo 0.11.60 → 0.11.61

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 (91) hide show
  1. package/.gitignore +7 -7
  2. package/LICENSE +20 -20
  3. package/README.md +2079 -2074
  4. package/docker/Dockerfile +42 -42
  5. package/docker/README.md +91 -91
  6. package/docker/package.json +2 -2
  7. package/package.json +80 -81
  8. package/src/Context.js +79 -79
  9. package/src/config-pi/deployment/Env.js +68 -68
  10. package/src/config-pi/deployment/Layout.js +63 -63
  11. package/src/config-pi/deployment/Origins.js +139 -139
  12. package/src/config-pi/deployment/Proxy.js +74 -74
  13. package/src/config-pi/deployment/index.js +17 -17
  14. package/src/config-pi/index.js +15 -15
  15. package/src/config-pi/runtime/Client.js +116 -98
  16. package/src/config-pi/runtime/Server.js +125 -125
  17. package/src/config-pi/runtime/client/Worker.js +109 -134
  18. package/src/config-pi/runtime/client/index.js +11 -11
  19. package/src/config-pi/runtime/index.js +17 -17
  20. package/src/config-pi/runtime/server/Headers.js +74 -74
  21. package/src/config-pi/runtime/server/Redirects.js +69 -69
  22. package/src/config-pi/runtime/server/index.js +13 -13
  23. package/src/config-pi/static/Manifest.js +319 -319
  24. package/src/config-pi/static/Ssg.js +49 -49
  25. package/src/config-pi/static/index.js +13 -13
  26. package/src/deployment-pi/index.js +10 -10
  27. package/src/deployment-pi/origins/index.js +216 -216
  28. package/src/index.js +19 -19
  29. package/src/runtime-pi/Application.js +28 -28
  30. package/src/runtime-pi/Cookies.js +81 -81
  31. package/src/runtime-pi/HttpEvent.js +106 -106
  32. package/src/runtime-pi/Router.js +130 -130
  33. package/src/runtime-pi/Runtime.js +20 -20
  34. package/src/runtime-pi/client/Application.js +76 -100
  35. package/src/runtime-pi/client/Context.js +7 -7
  36. package/src/runtime-pi/client/Router.js +48 -48
  37. package/src/runtime-pi/client/Runtime.js +524 -331
  38. package/src/runtime-pi/client/Url.js +204 -205
  39. package/src/runtime-pi/client/Workport.js +190 -178
  40. package/src/runtime-pi/client/createStorage.js +57 -56
  41. package/src/runtime-pi/client/generate.js +480 -471
  42. package/src/runtime-pi/client/index.js +21 -21
  43. package/src/runtime-pi/client/worker/Application.js +44 -44
  44. package/src/runtime-pi/client/worker/Context.js +7 -7
  45. package/src/runtime-pi/client/worker/Runtime.js +274 -268
  46. package/src/runtime-pi/client/worker/Workport.js +77 -89
  47. package/src/runtime-pi/client/worker/index.js +21 -21
  48. package/src/runtime-pi/index.js +13 -13
  49. package/src/runtime-pi/server/Application.js +100 -115
  50. package/src/runtime-pi/server/Context.js +15 -15
  51. package/src/runtime-pi/server/Router.js +159 -159
  52. package/src/runtime-pi/server/Runtime.js +557 -556
  53. package/src/runtime-pi/server/index.js +21 -21
  54. package/src/runtime-pi/util-http.js +85 -85
  55. package/src/runtime-pi/util-url.js +146 -146
  56. package/src/runtime-pi/xFormData.js +23 -23
  57. package/src/runtime-pi/xHeaders.js +145 -145
  58. package/src/runtime-pi/xRequest.js +45 -45
  59. package/src/runtime-pi/xRequestHeaders.js +108 -108
  60. package/src/runtime-pi/xResponse.js +32 -32
  61. package/src/runtime-pi/xResponseHeaders.js +116 -116
  62. package/src/runtime-pi/xURL.js +105 -105
  63. package/src/runtime-pi/xfetch.js +22 -22
  64. package/src/runtime-pi/xxHttpMessage.js +101 -101
  65. package/src/services-pi/cert/http-auth-hook.js +22 -22
  66. package/src/services-pi/cert/http-cleanup-hook.js +22 -22
  67. package/src/services-pi/cert/index.js +79 -79
  68. package/src/services-pi/index.js +8 -8
  69. package/src/static-pi/index.js +10 -10
  70. package/src/webflo.js +30 -30
  71. package/test/index.test.js +26 -26
  72. package/test/site/package.json +9 -9
  73. package/test/site/public/bundle.html +5 -5
  74. package/test/site/public/bundle.html.json +3 -3
  75. package/test/site/public/bundle.js +2 -2
  76. package/test/site/public/bundle.webflo.js +15 -15
  77. package/test/site/public/index.html +29 -29
  78. package/test/site/public/index1.html +34 -34
  79. package/test/site/public/page-2/bundle.html +4 -4
  80. package/test/site/public/page-2/bundle.js +2 -2
  81. package/test/site/public/page-2/index.html +45 -45
  82. package/test/site/public/page-2/main.html +2 -2
  83. package/test/site/public/page-4/subpage/bundle.js +2 -2
  84. package/test/site/public/page-4/subpage/index.html +30 -30
  85. package/test/site/public/sparoots.json +4 -4
  86. package/test/site/public/worker.js +3 -3
  87. package/test/site/server/index.js +15 -15
  88. package/src/runtime-pi/client/oohtml/full.js +0 -7
  89. package/src/runtime-pi/client/oohtml/namespacing.js +0 -7
  90. package/src/runtime-pi/client/oohtml/scripting.js +0 -8
  91. package/src/runtime-pi/client/oohtml/templating.js +0 -8
@@ -1,74 +1,74 @@
1
-
2
- /**
3
- * imports
4
- */
5
- import { Dotfile } from '@webqit/backpack';
6
-
7
- export default class Headers extends Dotfile {
8
-
9
- // Base name
10
- get name() {
11
- return 'headers';
12
- }
13
-
14
- // @desc
15
- static get ['@desc']() {
16
- return 'Automatic headers config.';
17
- }
18
-
19
- // Defaults merger
20
- withDefaults(config) {
21
- return this.merge({
22
- entries: [],
23
- }, config, 'patch');
24
- }
25
-
26
- // Questions generator
27
- getSchema(config, choices = {}) {
28
- const CHOICES = this.merge({
29
- type: [
30
- {value: 'request', title: 'Request Header'},
31
- {value: 'response', title: 'Response Header'},
32
- ]
33
- }, choices, 'patch');
34
- // Questions
35
- return [
36
- {
37
- name: 'entries',
38
- type: 'recursive',
39
- controls: {
40
- name: 'header',
41
- },
42
- initial: config.entries,
43
- schema: [
44
- {
45
- name: 'type',
46
- type: 'text',
47
- message: 'Choose header type',
48
- validation: ['important'],
49
- initial: function() { return this.indexOfInitial(CHOICES.type, this.value); },
50
- },
51
- {
52
- name: 'url',
53
- type: 'text',
54
- message: 'Enter URL',
55
- validation: ['important'],
56
- },
57
- {
58
- name: 'name',
59
- type: 'text',
60
- message: 'Enter header name',
61
- validation: ['important'],
62
- },
63
- {
64
- name: 'value',
65
- type: 'text',
66
- message: 'Enter header value',
67
- validation: ['important'],
68
- },
69
- ],
70
- },
71
-
72
- ];
73
- }
74
- }
1
+
2
+ /**
3
+ * imports
4
+ */
5
+ import { Dotfile } from '@webqit/backpack';
6
+
7
+ export default class Headers extends Dotfile {
8
+
9
+ // Base name
10
+ get name() {
11
+ return 'headers';
12
+ }
13
+
14
+ // @desc
15
+ static get ['@desc']() {
16
+ return 'Automatic headers config.';
17
+ }
18
+
19
+ // Defaults merger
20
+ withDefaults(config) {
21
+ return this.merge({
22
+ entries: [],
23
+ }, config, 'patch');
24
+ }
25
+
26
+ // Questions generator
27
+ getSchema(config, choices = {}) {
28
+ const CHOICES = this.merge({
29
+ type: [
30
+ {value: 'request', title: 'Request Header'},
31
+ {value: 'response', title: 'Response Header'},
32
+ ]
33
+ }, choices, 'patch');
34
+ // Questions
35
+ return [
36
+ {
37
+ name: 'entries',
38
+ type: 'recursive',
39
+ controls: {
40
+ name: 'header',
41
+ },
42
+ initial: config.entries,
43
+ schema: [
44
+ {
45
+ name: 'type',
46
+ type: 'text',
47
+ message: 'Choose header type',
48
+ validation: ['important'],
49
+ initial: function() { return this.indexOfInitial(CHOICES.type, this.value); },
50
+ },
51
+ {
52
+ name: 'url',
53
+ type: 'text',
54
+ message: 'Enter URL',
55
+ validation: ['important'],
56
+ },
57
+ {
58
+ name: 'name',
59
+ type: 'text',
60
+ message: 'Enter header name',
61
+ validation: ['important'],
62
+ },
63
+ {
64
+ name: 'value',
65
+ type: 'text',
66
+ message: 'Enter header value',
67
+ validation: ['important'],
68
+ },
69
+ ],
70
+ },
71
+
72
+ ];
73
+ }
74
+ }
@@ -1,69 +1,69 @@
1
-
2
- /**
3
- * imports
4
- */
5
- import { Dotfile } from '@webqit/backpack';
6
-
7
- export default class Redirects extends Dotfile {
8
-
9
- // Base name
10
- get name() {
11
- return 'redirects';
12
- }
13
-
14
- // @desc
15
- static get ['@desc']() {
16
- return 'Automatic redirects config.';
17
- }
18
-
19
- // Defaults merger
20
- withDefaults(config) {
21
- return this.merge({
22
- entries: [],
23
- }, config, 'patch');
24
- }
25
-
26
- // Questions generator
27
- getSchema(config, choices = {}) {
28
- // Choices
29
- const CHOICES = this.merge({
30
- code: [
31
- {value: 302,},
32
- {value: 301,},
33
- ],
34
- }, choices, 'patch');
35
- // Questions
36
- return [
37
- {
38
- name: 'entries',
39
- type: 'recursive',
40
- controls: {
41
- name: 'redirect',
42
- },
43
- initial: config.entries,
44
- schema: [
45
- {
46
- name: 'from',
47
- type: 'text',
48
- message: 'Enter "from" URL',
49
- validation: ['important'],
50
- },
51
- {
52
- name: 'to',
53
- type: 'text',
54
- message: 'Enter "to" URL',
55
- validation: ['important'],
56
- },
57
- {
58
- name: 'code',
59
- type: 'select',
60
- choices: CHOICES.code,
61
- message: 'Enter redirect code',
62
- validation: ['number'],
63
- },
64
- ],
65
- },
66
-
67
- ];
68
- }
69
- }
1
+
2
+ /**
3
+ * imports
4
+ */
5
+ import { Dotfile } from '@webqit/backpack';
6
+
7
+ export default class Redirects extends Dotfile {
8
+
9
+ // Base name
10
+ get name() {
11
+ return 'redirects';
12
+ }
13
+
14
+ // @desc
15
+ static get ['@desc']() {
16
+ return 'Automatic redirects config.';
17
+ }
18
+
19
+ // Defaults merger
20
+ withDefaults(config) {
21
+ return this.merge({
22
+ entries: [],
23
+ }, config, 'patch');
24
+ }
25
+
26
+ // Questions generator
27
+ getSchema(config, choices = {}) {
28
+ // Choices
29
+ const CHOICES = this.merge({
30
+ code: [
31
+ {value: 302,},
32
+ {value: 301,},
33
+ ],
34
+ }, choices, 'patch');
35
+ // Questions
36
+ return [
37
+ {
38
+ name: 'entries',
39
+ type: 'recursive',
40
+ controls: {
41
+ name: 'redirect',
42
+ },
43
+ initial: config.entries,
44
+ schema: [
45
+ {
46
+ name: 'from',
47
+ type: 'text',
48
+ message: 'Enter "from" URL',
49
+ validation: ['important'],
50
+ },
51
+ {
52
+ name: 'to',
53
+ type: 'text',
54
+ message: 'Enter "to" URL',
55
+ validation: ['important'],
56
+ },
57
+ {
58
+ name: 'code',
59
+ type: 'select',
60
+ choices: CHOICES.code,
61
+ message: 'Enter redirect code',
62
+ validation: ['number'],
63
+ },
64
+ ],
65
+ },
66
+
67
+ ];
68
+ }
69
+ }
@@ -1,14 +1,14 @@
1
-
2
- /**
3
- * @imports
4
- */
5
- import Headers from './Headers.js';
6
- import Redirects from './Redirects.js';
7
-
8
- /**
9
- * @exports
10
- */
11
- export {
12
- Headers,
13
- Redirects,
1
+
2
+ /**
3
+ * @imports
4
+ */
5
+ import Headers from './Headers.js';
6
+ import Redirects from './Redirects.js';
7
+
8
+ /**
9
+ * @exports
10
+ */
11
+ export {
12
+ Headers,
13
+ Redirects,
14
14
  }