@webqit/webflo 0.11.32 → 0.11.34
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/package.json +1 -1
- package/src/runtime-pi/Cookies.js +9 -2
- package/src/runtime-pi/client/Workport.js +1 -1
- package/src/runtime-pi/xRequestHeaders.js +4 -0
- package/src/runtime-pi/xResponseHeaders.js +4 -0
- package/src/services-pi/cert/http-auth-hook.js +4 -4
- package/src/services-pi/cert/http-cleanup-hook.js +4 -4
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@ export default class Cookies extends Map {
|
|
|
22
22
|
retrn = super.set(name, valueObj);
|
|
23
23
|
if (!this.outLock) {
|
|
24
24
|
if (_isObject(value)) { valueStr = this.stringifyEntry(value); }
|
|
25
|
-
|
|
25
|
+
append(this.headers, `${ name }=${ valueStr }`);
|
|
26
26
|
}
|
|
27
27
|
// -----------------
|
|
28
28
|
this.inLock = false;
|
|
@@ -36,7 +36,7 @@ export default class Cookies extends Map {
|
|
|
36
36
|
let retrn = super.delete(name);
|
|
37
37
|
this.headers.delete(this.headers.cookieHeaderName);
|
|
38
38
|
for (let [ name, definition ] of this) {
|
|
39
|
-
|
|
39
|
+
append(this.headers, `${ name }=${ this.stringifyEntry(definition) }`);
|
|
40
40
|
}
|
|
41
41
|
// -----------------
|
|
42
42
|
this.inLock = false;
|
|
@@ -72,4 +72,11 @@ export default class Cookies extends Map {
|
|
|
72
72
|
return this.headers.get(this.headers.cookieHeaderName);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function append(headers, value) {
|
|
78
|
+
let values = [value];
|
|
79
|
+
let currentValue = headers.get(headers.cookieHeaderName);
|
|
80
|
+
if (currentValue) { values.unshift(currentValue); }
|
|
81
|
+
headers.set(headers.cookieHeaderName, values.join(headers.cookieHeaderSeparator));
|
|
75
82
|
}
|
|
@@ -9,7 +9,7 @@ import { Observer } from './Runtime.js';
|
|
|
9
9
|
export default class Workport {
|
|
10
10
|
|
|
11
11
|
constructor(file, params = {}) {
|
|
12
|
-
this.ready = navigator.serviceWorker ? navigator.serviceWorker.ready : new Promise;
|
|
12
|
+
this.ready = navigator.serviceWorker ? navigator.serviceWorker.ready : new Promise(() => {});
|
|
13
13
|
|
|
14
14
|
// --------
|
|
15
15
|
// Registration and lifecycle
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* imports
|
|
5
5
|
*/
|
|
6
6
|
import Fs from 'fs';
|
|
7
7
|
import Path from 'path';
|
|
8
|
-
import
|
|
8
|
+
import Layout from '../../config-pi/deployment/Layout.js';
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------
|
|
11
11
|
|
|
@@ -16,8 +16,8 @@ const domain = process.env.CERTBOT_DOMAIN,
|
|
|
16
16
|
allDomains = process.env.CERTBOT_ALL_DOMAINS.split(',')*/
|
|
17
17
|
;
|
|
18
18
|
(async function() {
|
|
19
|
-
const layout = await
|
|
19
|
+
const layout = await (new Layout({ name: 'webflo', flags: {} })).read();
|
|
20
20
|
const acmeDir = Path.join(layout.PUBLIC_DIR, './.well-known/acme-challenge/');
|
|
21
21
|
Fs.mkdirSync(acmeDir, {recursive:true});
|
|
22
22
|
Fs.writeFileSync(Path.join(acmeDir, token), validation);
|
|
23
|
-
})();
|
|
23
|
+
})();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* imports
|
|
5
5
|
*/
|
|
6
6
|
import Fs from 'fs';
|
|
7
7
|
import Path from 'path';
|
|
8
|
-
import
|
|
8
|
+
import Layout from '../../config-pi/deployment/Layout.js';
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ const domain = process.env.CERTBOT_DOMAIN,
|
|
|
17
17
|
allDomains = process.env.CERTBOT_ALL_DOMAINS.split(',')*/
|
|
18
18
|
;
|
|
19
19
|
(async function() {
|
|
20
|
-
const layout = await
|
|
20
|
+
const layout = await (new Layout({ name: 'webflo', flags: {} })).read();
|
|
21
21
|
const acmeFile = Path.join(layout.PUBLIC_DIR, './.well-known/acme-challenge/', token);
|
|
22
22
|
Fs.unlinkSync(acmeFile);
|
|
23
|
-
})();
|
|
23
|
+
})();
|