@webqit/webflo 0.11.32 → 0.11.33

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 CHANGED
@@ -12,7 +12,7 @@
12
12
  "vanila-javascript"
13
13
  ],
14
14
  "homepage": "https://webqit.io/tooling/webflo",
15
- "version": "0.11.32",
15
+ "version": "0.11.33",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -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
- this.headers.append(this.headers.cookieHeaderName, `${ name }=${ valueStr }`);
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
- this.headers.append(this.headers.cookieHeaderName, `${ name }=${ this.stringifyEntry(definition) }`);
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
  }
@@ -36,6 +36,10 @@ const xRequestHeaders = NativeHeaders => class extends xHeaders(NativeHeaders) {
36
36
  get cookieHeaderName() {
37
37
  return 'Cookie';
38
38
  }
39
+
40
+ get cookieHeaderSeparator() {
41
+ return ';';
42
+ }
39
43
 
40
44
  get Cookies() {
41
45
  return Cookies;
@@ -55,6 +55,10 @@ const _ResponseHeaders = NativeHeaders => class extends _Headers(NativeHeaders)
55
55
  get cookieHeaderName() {
56
56
  return 'Set-Cookie';
57
57
  }
58
+
59
+ get cookieHeaderSeparator() {
60
+ return ',';
61
+ }
58
62
 
59
63
  get Cookies() {
60
64
  return Cookies;
@@ -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 * as _layout from '../../config/layout.js';
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 _layout.read({});
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 * as _layout from '../../config/layout.js';
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 _layout.read({});
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
+ })();