@quilted/deno 0.1.2 → 0.2.0

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 (80) hide show
  1. package/.quilt/jest/cache/haste-map-0d1fc0b2d0d6281bd555d7e706dc9986-33077ddc4445b8892d3a131c692f283d-2476e5caf667965f67e0306dc239f39f +0 -0
  2. package/.quilt/jest/cache/haste-map-39c473e25d2c113fabcf6ef63ff713e6-33077ddc4445b8892d3a131c692f283d-e7be052fff861377dbd13fb6283a7ebd +0 -0
  3. package/.quilt/jest/cache/haste-map-91c110a0020c6344757e7ecd75abc315-33077ddc4445b8892d3a131c692f283d-e8dbeaae2ab6a61a73f4f5dd75e91d8a +0 -0
  4. package/CHANGELOG.md +15 -0
  5. package/build/cjs/craft.cjs +1 -1
  6. package/build/esnext/request-router.esnext +2 -7
  7. package/build/tsconfig.tsbuildinfo +1 -1
  8. package/configuration/rollup.config.js +3 -0
  9. package/package.json +7 -22
  10. package/tsconfig.json +1 -1
  11. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/TemplateTag/TemplateTag.cjs +0 -168
  12. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaLists/commaLists.cjs +0 -8
  13. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaListsAnd/commaListsAnd.cjs +0 -8
  14. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaListsOr/commaListsOr.cjs +0 -8
  15. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/html/html.cjs +0 -10
  16. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.cjs +0 -48
  17. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/inlineLists/inlineLists.cjs +0 -8
  18. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLine/oneLine.cjs +0 -7
  19. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.cjs +0 -8
  20. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.cjs +0 -8
  21. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.cjs +0 -8
  22. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.cjs +0 -8
  23. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineTrim/oneLineTrim.cjs +0 -7
  24. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.cjs +0 -23
  25. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.cjs +0 -22
  26. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.cjs +0 -22
  27. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/safeHtml/safeHtml.cjs +0 -10
  28. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.cjs +0 -20
  29. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndent/stripIndent.cjs +0 -11
  30. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.cjs +0 -37
  31. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndents/stripIndents.cjs +0 -7
  32. package/build/cjs/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.cjs +0 -33
  33. package/build/esm/craft.mjs +0 -104
  34. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/TemplateTag/TemplateTag.mjs +0 -164
  35. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaLists/commaLists.mjs +0 -6
  36. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaListsAnd/commaListsAnd.mjs +0 -6
  37. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaListsOr/commaListsOr.mjs +0 -6
  38. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/html/html.mjs +0 -8
  39. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.mjs +0 -44
  40. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/inlineLists/inlineLists.mjs +0 -6
  41. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLine/oneLine.mjs +0 -5
  42. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.mjs +0 -6
  43. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.mjs +0 -6
  44. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.mjs +0 -6
  45. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.mjs +0 -6
  46. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineTrim/oneLineTrim.mjs +0 -5
  47. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.mjs +0 -19
  48. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.mjs +0 -18
  49. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.mjs +0 -18
  50. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/safeHtml/safeHtml.mjs +0 -8
  51. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.mjs +0 -16
  52. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndent/stripIndent.mjs +0 -7
  53. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.mjs +0 -33
  54. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndents/stripIndents.mjs +0 -5
  55. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.mjs +0 -29
  56. package/build/esnext/craft.esnext +0 -104
  57. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/TemplateTag/TemplateTag.esnext +0 -164
  58. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaLists/commaLists.esnext +0 -6
  59. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaListsAnd/commaListsAnd.esnext +0 -6
  60. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaListsOr/commaListsOr.esnext +0 -6
  61. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/html/html.esnext +0 -8
  62. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.esnext +0 -44
  63. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/inlineLists/inlineLists.esnext +0 -6
  64. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLine/oneLine.esnext +0 -5
  65. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.esnext +0 -6
  66. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.esnext +0 -6
  67. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.esnext +0 -6
  68. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.esnext +0 -6
  69. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineTrim/oneLineTrim.esnext +0 -5
  70. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.esnext +0 -19
  71. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.esnext +0 -18
  72. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.esnext +0 -18
  73. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/safeHtml/safeHtml.esnext +0 -8
  74. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.esnext +0 -16
  75. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndent/stripIndent.esnext +0 -7
  76. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.esnext +0 -33
  77. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndents/stripIndents.esnext +0 -5
  78. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.esnext +0 -29
  79. package/quilt.project.ts +0 -5
  80. package/source/craft.ts +0 -128
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var stripIndentTransformer = require('../stripIndentTransformer/stripIndentTransformer.cjs');
5
- var inlineArrayTransformer = require('../inlineArrayTransformer/inlineArrayTransformer.cjs');
6
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
7
-
8
- new TemplateTag["default"](inlineArrayTransformer["default"]({ separator: ',', conjunction: 'and' }), stripIndentTransformer["default"], trimResultTransformer["default"]);
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var stripIndentTransformer = require('../stripIndentTransformer/stripIndentTransformer.cjs');
5
- var inlineArrayTransformer = require('../inlineArrayTransformer/inlineArrayTransformer.cjs');
6
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
7
-
8
- new TemplateTag["default"](inlineArrayTransformer["default"]({ separator: ',', conjunction: 'or' }), stripIndentTransformer["default"], trimResultTransformer["default"]);
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var stripIndentTransformer = require('../stripIndentTransformer/stripIndentTransformer.cjs');
5
- var inlineArrayTransformer = require('../inlineArrayTransformer/inlineArrayTransformer.cjs');
6
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
7
- var splitStringTransformer = require('../splitStringTransformer/splitStringTransformer.cjs');
8
- var removeNonPrintingValuesTransformer = require('../removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.cjs');
9
-
10
- new TemplateTag["default"](splitStringTransformer["default"]('\n'), removeNonPrintingValuesTransformer["default"], inlineArrayTransformer["default"], stripIndentTransformer["default"], trimResultTransformer["default"]);
@@ -1,48 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var defaults = {
6
- separator: '',
7
- conjunction: '',
8
- serial: false
9
- };
10
-
11
- /**
12
- * Converts an array substitution to a string containing a list
13
- * @param {String} [opts.separator = ''] - the character that separates each item
14
- * @param {String} [opts.conjunction = ''] - replace the last separator with this
15
- * @param {Boolean} [opts.serial = false] - include the separator before the conjunction? (Oxford comma use-case)
16
- *
17
- * @return {Object} - a TemplateTag transformer
18
- */
19
- var inlineArrayTransformer = function inlineArrayTransformer() {
20
- var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaults;
21
- return {
22
- onSubstitution: function onSubstitution(substitution, resultSoFar) {
23
- // only operate on arrays
24
- if (Array.isArray(substitution)) {
25
- var arrayLength = substitution.length;
26
- var separator = opts.separator;
27
- var conjunction = opts.conjunction;
28
- var serial = opts.serial;
29
- // join each item in the array into a string where each item is separated by separator
30
- // be sure to maintain indentation
31
- var indent = resultSoFar.match(/(\n?[^\S\n]+)$/);
32
- if (indent) {
33
- substitution = substitution.join(separator + indent[1]);
34
- } else {
35
- substitution = substitution.join(separator + ' ');
36
- }
37
- // if conjunction is set, replace the last separator with conjunction, but only if there is more than one substitution
38
- if (conjunction && arrayLength > 1) {
39
- var separatorIndex = substitution.lastIndexOf(separator);
40
- substitution = substitution.slice(0, separatorIndex) + (serial ? separator : '') + ' ' + conjunction + substitution.slice(separatorIndex + 1);
41
- }
42
- }
43
- return substitution;
44
- }
45
- };
46
- };
47
-
48
- exports["default"] = inlineArrayTransformer;
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var stripIndentTransformer = require('../stripIndentTransformer/stripIndentTransformer.cjs');
5
- var inlineArrayTransformer = require('../inlineArrayTransformer/inlineArrayTransformer.cjs');
6
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
7
-
8
- new TemplateTag["default"](inlineArrayTransformer["default"], stripIndentTransformer["default"], trimResultTransformer["default"]);
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
5
- var replaceResultTransformer = require('../replaceResultTransformer/replaceResultTransformer.cjs');
6
-
7
- new TemplateTag["default"](replaceResultTransformer["default"](/(?:\n(?:\s*))+/g, ' '), trimResultTransformer["default"]);
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var inlineArrayTransformer = require('../inlineArrayTransformer/inlineArrayTransformer.cjs');
5
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
6
- var replaceResultTransformer = require('../replaceResultTransformer/replaceResultTransformer.cjs');
7
-
8
- new TemplateTag["default"](inlineArrayTransformer["default"]({ separator: ',' }), replaceResultTransformer["default"](/(?:\s+)/g, ' '), trimResultTransformer["default"]);
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var inlineArrayTransformer = require('../inlineArrayTransformer/inlineArrayTransformer.cjs');
5
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
6
- var replaceResultTransformer = require('../replaceResultTransformer/replaceResultTransformer.cjs');
7
-
8
- new TemplateTag["default"](inlineArrayTransformer["default"]({ separator: ',', conjunction: 'and' }), replaceResultTransformer["default"](/(?:\s+)/g, ' '), trimResultTransformer["default"]);
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var inlineArrayTransformer = require('../inlineArrayTransformer/inlineArrayTransformer.cjs');
5
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
6
- var replaceResultTransformer = require('../replaceResultTransformer/replaceResultTransformer.cjs');
7
-
8
- new TemplateTag["default"](inlineArrayTransformer["default"]({ separator: ',', conjunction: 'or' }), replaceResultTransformer["default"](/(?:\s+)/g, ' '), trimResultTransformer["default"]);
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var inlineArrayTransformer = require('../inlineArrayTransformer/inlineArrayTransformer.cjs');
5
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
6
- var replaceResultTransformer = require('../replaceResultTransformer/replaceResultTransformer.cjs');
7
-
8
- new TemplateTag["default"](inlineArrayTransformer["default"], replaceResultTransformer["default"](/(?:\s+)/g, ' '), trimResultTransformer["default"]);
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
5
- var replaceResultTransformer = require('../replaceResultTransformer/replaceResultTransformer.cjs');
6
-
7
- new TemplateTag["default"](replaceResultTransformer["default"](/(?:\n\s*)/g, ''), trimResultTransformer["default"]);
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var isValidValue = function isValidValue(x) {
6
- return x != null && !Number.isNaN(x) && typeof x !== 'boolean';
7
- };
8
-
9
- var removeNonPrintingValuesTransformer = function removeNonPrintingValuesTransformer() {
10
- return {
11
- onSubstitution: function onSubstitution(substitution) {
12
- if (Array.isArray(substitution)) {
13
- return substitution.filter(isValidValue);
14
- }
15
- if (isValidValue(substitution)) {
16
- return substitution;
17
- }
18
- return '';
19
- }
20
- };
21
- };
22
-
23
- exports["default"] = removeNonPrintingValuesTransformer;
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- /**
6
- * Replaces tabs, newlines and spaces with the chosen value when they occur in sequences
7
- * @param {(String|RegExp)} replaceWhat - the value or pattern that should be replaced
8
- * @param {*} replaceWith - the replacement value
9
- * @return {Object} - a TemplateTag transformer
10
- */
11
- var replaceResultTransformer = function replaceResultTransformer(replaceWhat, replaceWith) {
12
- return {
13
- onEndResult: function onEndResult(endResult) {
14
- if (replaceWhat == null || replaceWith == null) {
15
- throw new Error('replaceResultTransformer requires at least 2 arguments.');
16
- }
17
- return endResult.replace(replaceWhat, replaceWith);
18
- }
19
- };
20
- };
21
-
22
- exports["default"] = replaceResultTransformer;
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var replaceSubstitutionTransformer = function replaceSubstitutionTransformer(replaceWhat, replaceWith) {
6
- return {
7
- onSubstitution: function onSubstitution(substitution, resultSoFar) {
8
- if (replaceWhat == null || replaceWith == null) {
9
- throw new Error('replaceSubstitutionTransformer requires at least 2 arguments.');
10
- }
11
-
12
- // Do not touch if null or undefined
13
- if (substitution == null) {
14
- return substitution;
15
- } else {
16
- return substitution.toString().replace(replaceWhat, replaceWith);
17
- }
18
- }
19
- };
20
- };
21
-
22
- exports["default"] = replaceSubstitutionTransformer;
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var stripIndentTransformer = require('../stripIndentTransformer/stripIndentTransformer.cjs');
5
- var inlineArrayTransformer = require('../inlineArrayTransformer/inlineArrayTransformer.cjs');
6
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
7
- var splitStringTransformer = require('../splitStringTransformer/splitStringTransformer.cjs');
8
- var replaceSubstitutionTransformer = require('../replaceSubstitutionTransformer/replaceSubstitutionTransformer.cjs');
9
-
10
- new TemplateTag["default"](splitStringTransformer["default"]('\n'), inlineArrayTransformer["default"], stripIndentTransformer["default"], trimResultTransformer["default"], replaceSubstitutionTransformer["default"](/&/g, '&amp;'), replaceSubstitutionTransformer["default"](/</g, '&lt;'), replaceSubstitutionTransformer["default"](/>/g, '&gt;'), replaceSubstitutionTransformer["default"](/"/g, '&quot;'), replaceSubstitutionTransformer["default"](/'/g, '&#x27;'), replaceSubstitutionTransformer["default"](/`/g, '&#x60;'));
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var splitStringTransformer = function splitStringTransformer(splitBy) {
6
- return {
7
- onSubstitution: function onSubstitution(substitution, resultSoFar) {
8
- if (splitBy != null && typeof splitBy === 'string') {
9
- if (typeof substitution === 'string' && substitution.includes(splitBy)) {
10
- substitution = substitution.split(splitBy);
11
- }
12
- } else {
13
- throw new Error('You need to specify a string character to split by.');
14
- }
15
- return substitution;
16
- }
17
- };
18
- };
19
-
20
- exports["default"] = splitStringTransformer;
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
6
- var stripIndentTransformer = require('../stripIndentTransformer/stripIndentTransformer.cjs');
7
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
8
-
9
- var stripIndent = new TemplateTag["default"](stripIndentTransformer["default"], trimResultTransformer["default"]);
10
-
11
- exports["default"] = stripIndent;
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
6
-
7
- /**
8
- * strips indentation from a template literal
9
- * @param {String} type = 'initial' - whether to remove all indentation or just leading indentation. can be 'all' or 'initial'
10
- * @return {Object} - a TemplateTag transformer
11
- */
12
- var stripIndentTransformer = function stripIndentTransformer() {
13
- var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'initial';
14
- return {
15
- onEndResult: function onEndResult(endResult) {
16
- if (type === 'initial') {
17
- // remove the shortest leading indentation from each line
18
- var match = endResult.match(/^[^\S\n]*(?=\S)/gm);
19
- var indent = match && Math.min.apply(Math, _toConsumableArray(match.map(function (el) {
20
- return el.length;
21
- })));
22
- if (indent) {
23
- var regexp = new RegExp('^.{' + indent + '}', 'gm');
24
- return endResult.replace(regexp, '');
25
- }
26
- return endResult;
27
- }
28
- if (type === 'all') {
29
- // remove all indentation from each line
30
- return endResult.replace(/^[^\S\n]+/gm, '');
31
- }
32
- throw new Error('Unknown type: ' + type);
33
- }
34
- };
35
- };
36
-
37
- exports["default"] = stripIndentTransformer;
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- var TemplateTag = require('../TemplateTag/TemplateTag.cjs');
4
- var stripIndentTransformer = require('../stripIndentTransformer/stripIndentTransformer.cjs');
5
- var trimResultTransformer = require('../trimResultTransformer/trimResultTransformer.cjs');
6
-
7
- new TemplateTag["default"](stripIndentTransformer["default"]('all'), trimResultTransformer["default"]);
@@ -1,33 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- /**
6
- * TemplateTag transformer that trims whitespace on the end result of a tagged template
7
- * @param {String} side = '' - The side of the string to trim. Can be 'start' or 'end' (alternatively 'left' or 'right')
8
- * @return {Object} - a TemplateTag transformer
9
- */
10
- var trimResultTransformer = function trimResultTransformer() {
11
- var side = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12
- return {
13
- onEndResult: function onEndResult(endResult) {
14
- if (side === '') {
15
- return endResult.trim();
16
- }
17
-
18
- side = side.toLowerCase();
19
-
20
- if (side === 'start' || side === 'left') {
21
- return endResult.replace(/^\s*/, '');
22
- }
23
-
24
- if (side === 'end' || side === 'right') {
25
- return endResult.replace(/\s*$/, '');
26
- }
27
-
28
- throw new Error('Side not supported: ' + side);
29
- }
30
- };
31
- };
32
-
33
- exports["default"] = trimResultTransformer;
@@ -1,104 +0,0 @@
1
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/TemplateTag/TemplateTag.mjs';
2
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaLists/commaLists.mjs';
3
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaListsAnd/commaListsAnd.mjs';
4
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/commaListsOr/commaListsOr.mjs';
5
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/html/html.mjs';
6
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/safeHtml/safeHtml.mjs';
7
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLine/oneLine.mjs';
8
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineTrim/oneLineTrim.mjs';
9
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.mjs';
10
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.mjs';
11
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.mjs';
12
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/inlineLists/inlineLists.mjs';
13
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.mjs';
14
- import stripIndent from './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndent/stripIndent.mjs';
15
- import './node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/stripIndents/stripIndents.mjs';
16
- import { createProjectPlugin, MAGIC_MODULE_REQUEST_ROUTER } from '@quilted/craft';
17
-
18
- /**
19
- * Configures any code generated for this project to run on Deno.
20
- */
21
- function deno(_ = {}) {
22
- return createProjectPlugin({
23
- name: 'Quilt.Deno',
24
- build({
25
- project,
26
- configure
27
- }) {
28
- configure(addConfiguration({
29
- project,
30
- mode: 'production'
31
- }));
32
- }
33
- // develop({project, configure, hooks}) {
34
- // hooks<DenoDevelopHooks>(() => ({}));
35
-
36
- // configure(
37
- // addConfiguration({
38
- // project,
39
- // mode: 'development',
40
- // }),
41
- // );
42
- // },
43
- });
44
- }
45
-
46
- function addConfiguration({
47
- mode
48
- }) {
49
- return ({
50
- runtimes,
51
- browserslistTargets,
52
- rollupPlugins,
53
- rollupNodeBundle,
54
- quiltRequestRouterPort,
55
- quiltRequestRouterHost,
56
- quiltServiceOutputFormat,
57
- quiltAppServerOutputFormat,
58
- quiltRequestRouterRuntimeContent,
59
- quiltPolyfillFeaturesForEnvironment,
60
- quiltRuntimeEnvironmentVariables
61
- }, options) => {
62
- if (!options.quiltAppServer && !options.quiltService) {
63
- return;
64
- }
65
- runtimes?.(() => [{
66
- target: 'deno'
67
- }]);
68
- browserslistTargets?.(() => ['last 1 chrome version']);
69
- rollupPlugins?.(async plugins => {
70
- const {
71
- rollupReplaceProcessEnv
72
- } = await import('@quilted/craft/rollup');
73
- return [...plugins, await rollupReplaceProcessEnv({
74
- mode,
75
- preserve: false
76
- })];
77
- });
78
- rollupNodeBundle?.(() => true);
79
- quiltRuntimeEnvironmentVariables?.(() => `Deno.env.toObject()`);
80
- quiltServiceOutputFormat?.(() => 'module');
81
- quiltAppServerOutputFormat?.(() => 'module');
82
- const polyfillsWithNativeWorkersSupport = new Set(['crypto', 'fetch', 'abort-controller']);
83
- quiltPolyfillFeaturesForEnvironment?.(features => {
84
- return features.filter(feature => !polyfillsWithNativeWorkersSupport.has(feature));
85
- });
86
-
87
- // @see https://deno.land/api@v1.37.0?s=Deno.ServeOptions
88
- quiltRequestRouterRuntimeContent?.(async () => {
89
- const [port, host] = await Promise.all([quiltRequestRouterPort.run(undefined), quiltRequestRouterHost.run(undefined)]);
90
- return stripIndent`
91
- import {createServeHandler} from '@quilted/deno/request-router';
92
- import RequestRouter from ${JSON.stringify(MAGIC_MODULE_REQUEST_ROUTER)};
93
-
94
- const port = ${port ?? `Number.parseInt(Deno.env.get('PORT') ?? '8080', 10)`};
95
- const hostname = ${host ? JSON.stringify(host) : 'undefined'};
96
- const handleRequest = createServeHandler(RequestRouter);
97
-
98
- Deno.serve({port, hostname}, handleRequest);
99
- `;
100
- });
101
- };
102
- }
103
-
104
- export { deno };
@@ -1,164 +0,0 @@
1
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2
-
3
- var _templateObject = _taggedTemplateLiteral(['', ''], ['', '']);
4
-
5
- function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
6
-
7
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
-
9
- /**
10
- * @class TemplateTag
11
- * @classdesc Consumes a pipeline of composable transformer plugins and produces a template tag.
12
- */
13
- var TemplateTag = function () {
14
- /**
15
- * constructs a template tag
16
- * @constructs TemplateTag
17
- * @param {...Object} [...transformers] - an array or arguments list of transformers
18
- * @return {Function} - a template tag
19
- */
20
- function TemplateTag() {
21
- var _this = this;
22
-
23
- for (var _len = arguments.length, transformers = Array(_len), _key = 0; _key < _len; _key++) {
24
- transformers[_key] = arguments[_key];
25
- }
26
-
27
- _classCallCheck(this, TemplateTag);
28
-
29
- this.tag = function (strings) {
30
- for (var _len2 = arguments.length, expressions = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
31
- expressions[_key2 - 1] = arguments[_key2];
32
- }
33
-
34
- if (typeof strings === 'function') {
35
- // if the first argument passed is a function, assume it is a template tag and return
36
- // an intermediary tag that processes the template using the aforementioned tag, passing the
37
- // result to our tag
38
- return _this.interimTag.bind(_this, strings);
39
- }
40
-
41
- if (typeof strings === 'string') {
42
- // if the first argument passed is a string, just transform it
43
- return _this.transformEndResult(strings);
44
- }
45
-
46
- // else, return a transformed end result of processing the template with our tag
47
- strings = strings.map(_this.transformString.bind(_this));
48
- return _this.transformEndResult(strings.reduce(_this.processSubstitutions.bind(_this, expressions)));
49
- };
50
-
51
- // if first argument is an array, extrude it as a list of transformers
52
- if (transformers.length > 0 && Array.isArray(transformers[0])) {
53
- transformers = transformers[0];
54
- }
55
-
56
- // if any transformers are functions, this means they are not initiated - automatically initiate them
57
- this.transformers = transformers.map(function (transformer) {
58
- return typeof transformer === 'function' ? transformer() : transformer;
59
- });
60
-
61
- // return an ES2015 template tag
62
- return this.tag;
63
- }
64
-
65
- /**
66
- * Applies all transformers to a template literal tagged with this method.
67
- * If a function is passed as the first argument, assumes the function is a template tag
68
- * and applies it to the template, returning a template tag.
69
- * @param {(Function|String|Array<String>)} strings - Either a template tag or an array containing template strings separated by identifier
70
- * @param {...*} ...expressions - Optional list of substitution values.
71
- * @return {(String|Function)} - Either an intermediary tag function or the results of processing the template.
72
- */
73
-
74
-
75
- _createClass(TemplateTag, [{
76
- key: 'interimTag',
77
-
78
-
79
- /**
80
- * An intermediary template tag that receives a template tag and passes the result of calling the template with the received
81
- * template tag to our own template tag.
82
- * @param {Function} nextTag - the received template tag
83
- * @param {Array<String>} template - the template to process
84
- * @param {...*} ...substitutions - `substitutions` is an array of all substitutions in the template
85
- * @return {*} - the final processed value
86
- */
87
- value: function interimTag(previousTag, template) {
88
- for (var _len3 = arguments.length, substitutions = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
89
- substitutions[_key3 - 2] = arguments[_key3];
90
- }
91
-
92
- return this.tag(_templateObject, previousTag.apply(undefined, [template].concat(substitutions)));
93
- }
94
-
95
- /**
96
- * Performs bulk processing on the tagged template, transforming each substitution and then
97
- * concatenating the resulting values into a string.
98
- * @param {Array<*>} substitutions - an array of all remaining substitutions present in this template
99
- * @param {String} resultSoFar - this iteration's result string so far
100
- * @param {String} remainingPart - the template chunk after the current substitution
101
- * @return {String} - the result of joining this iteration's processed substitution with the result
102
- */
103
-
104
- }, {
105
- key: 'processSubstitutions',
106
- value: function processSubstitutions(substitutions, resultSoFar, remainingPart) {
107
- var substitution = this.transformSubstitution(substitutions.shift(), resultSoFar);
108
- return ''.concat(resultSoFar, substitution, remainingPart);
109
- }
110
-
111
- /**
112
- * Iterate through each transformer, applying the transformer's `onString` method to the template
113
- * strings before all substitutions are processed.
114
- * @param {String} str - The input string
115
- * @return {String} - The final results of processing each transformer
116
- */
117
-
118
- }, {
119
- key: 'transformString',
120
- value: function transformString(str) {
121
- var cb = function cb(res, transform) {
122
- return transform.onString ? transform.onString(res) : res;
123
- };
124
- return this.transformers.reduce(cb, str);
125
- }
126
-
127
- /**
128
- * When a substitution is encountered, iterates through each transformer and applies the transformer's
129
- * `onSubstitution` method to the substitution.
130
- * @param {*} substitution - The current substitution
131
- * @param {String} resultSoFar - The result up to and excluding this substitution.
132
- * @return {*} - The final result of applying all substitution transformations.
133
- */
134
-
135
- }, {
136
- key: 'transformSubstitution',
137
- value: function transformSubstitution(substitution, resultSoFar) {
138
- var cb = function cb(res, transform) {
139
- return transform.onSubstitution ? transform.onSubstitution(res, resultSoFar) : res;
140
- };
141
- return this.transformers.reduce(cb, substitution);
142
- }
143
-
144
- /**
145
- * Iterates through each transformer, applying the transformer's `onEndResult` method to the
146
- * template literal after all substitutions have finished processing.
147
- * @param {String} endResult - The processed template, just before it is returned from the tag
148
- * @return {String} - The final results of processing each transformer
149
- */
150
-
151
- }, {
152
- key: 'transformEndResult',
153
- value: function transformEndResult(endResult) {
154
- var cb = function cb(res, transform) {
155
- return transform.onEndResult ? transform.onEndResult(res) : res;
156
- };
157
- return this.transformers.reduce(cb, endResult);
158
- }
159
- }]);
160
-
161
- return TemplateTag;
162
- }();
163
-
164
- export { TemplateTag as default };
@@ -1,6 +0,0 @@
1
- import TemplateTag from '../TemplateTag/TemplateTag.mjs';
2
- import stripIndentTransformer from '../stripIndentTransformer/stripIndentTransformer.mjs';
3
- import inlineArrayTransformer from '../inlineArrayTransformer/inlineArrayTransformer.mjs';
4
- import trimResultTransformer from '../trimResultTransformer/trimResultTransformer.mjs';
5
-
6
- new TemplateTag(inlineArrayTransformer({ separator: ',' }), stripIndentTransformer, trimResultTransformer);
@@ -1,6 +0,0 @@
1
- import TemplateTag from '../TemplateTag/TemplateTag.mjs';
2
- import stripIndentTransformer from '../stripIndentTransformer/stripIndentTransformer.mjs';
3
- import inlineArrayTransformer from '../inlineArrayTransformer/inlineArrayTransformer.mjs';
4
- import trimResultTransformer from '../trimResultTransformer/trimResultTransformer.mjs';
5
-
6
- new TemplateTag(inlineArrayTransformer({ separator: ',', conjunction: 'and' }), stripIndentTransformer, trimResultTransformer);
@@ -1,6 +0,0 @@
1
- import TemplateTag from '../TemplateTag/TemplateTag.mjs';
2
- import stripIndentTransformer from '../stripIndentTransformer/stripIndentTransformer.mjs';
3
- import inlineArrayTransformer from '../inlineArrayTransformer/inlineArrayTransformer.mjs';
4
- import trimResultTransformer from '../trimResultTransformer/trimResultTransformer.mjs';
5
-
6
- new TemplateTag(inlineArrayTransformer({ separator: ',', conjunction: 'or' }), stripIndentTransformer, trimResultTransformer);